Search is not available for this dataset
repo_name string | path string | license string | full_code string | full_size int64 | uncommented_code string | uncommented_size int64 | function_only_code string | function_only_size int64 | is_commented bool | is_signatured bool | n_ast_errors int64 | ast_max_depth int64 | n_whitespaces int64 | n_ast_nodes int64 | n_ast_terminals int64 | n_ast_nonterminals int64 | loc int64 | cycloplexity int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
sleepomeno/TForth | src/TF/WordsBuilder.hs | apache-2.0 | compileComing = liftF $ COMPILE_COMING () | 41 | compileComing = liftF $ COMPILE_COMING () | 41 | compileComing = liftF $ COMPILE_COMING () | 41 | false | false | 1 | 7 | 5 | 18 | 7 | 11 | null | null |
zinfra/khan | khan/src/Khan/Internal/Parser.hs | mpl-2.0 | fileNameVersion :: Text -> Maybe Version
fileNameVersion = lastMay . Text.split (== '/') >=> hush . Ver.fromText | 112 | fileNameVersion :: Text -> Maybe Version
fileNameVersion = lastMay . Text.split (== '/') >=> hush . Ver.fromText | 112 | fileNameVersion = lastMay . Text.split (== '/') >=> hush . Ver.fromText | 71 | false | true | 0 | 9 | 16 | 41 | 21 | 20 | null | null |
denibertovic/haskell | kubernetes/lib/Kubernetes/OpenAPI/ModelLens.hs | bsd-3-clause | -- | 'v1beta1CertificateSigningRequestSpecRequest' Lens
v1beta1CertificateSigningRequestSpecRequestL :: Lens_' V1beta1CertificateSigningRequestSpec (ByteArray)
v1beta1CertificateSigningRequestSpecRequestL f V1beta1CertificateSigningRequestSpec{..} = (\v1beta1CertificateSigningRequestSpecRequest -> V1beta1CertificateSig... | 438 | v1beta1CertificateSigningRequestSpecRequestL :: Lens_' V1beta1CertificateSigningRequestSpec (ByteArray)
v1beta1CertificateSigningRequestSpecRequestL f V1beta1CertificateSigningRequestSpec{..} = (\v1beta1CertificateSigningRequestSpecRequest -> V1beta1CertificateSigningRequestSpec { v1beta1CertificateSigningRequestSpecRe... | 382 | v1beta1CertificateSigningRequestSpecRequestL f V1beta1CertificateSigningRequestSpec{..} = (\v1beta1CertificateSigningRequestSpecRequest -> V1beta1CertificateSigningRequestSpec { v1beta1CertificateSigningRequestSpecRequest, ..} ) <$> f v1beta1CertificateSigningRequestSpecRequest | 278 | true | true | 0 | 8 | 22 | 54 | 29 | 25 | null | null |
quintype/ringo | src/Ringo/Generator/Sql.hs | mit | -- Pretty print statement
ppStatement :: Statement -> Text
ppStatement st = TL.toStrict $ prettyStatements (PrettyFlags postgresDialect) [st] | 141 | ppStatement :: Statement -> Text
ppStatement st = TL.toStrict $ prettyStatements (PrettyFlags postgresDialect) [st] | 115 | ppStatement st = TL.toStrict $ prettyStatements (PrettyFlags postgresDialect) [st] | 82 | true | true | 0 | 8 | 17 | 39 | 20 | 19 | null | null |
green-haskell/ghc | compiler/typecheck/TcRnTypes.hs | bsd-3-clause | -- | Checks whether the evidence can be used to solve a goal with the given minimum depth
-- See Note [Preventing recursive dictionaries]
ctEvCheckDepth :: Class -> CtLoc -> CtEvidence -> Bool
ctEvCheckDepth cls target ev
| isWanted ev
, cls == coercibleClass -- The restriction applies only to Coercible
= ctLocD... | 379 | ctEvCheckDepth :: Class -> CtLoc -> CtEvidence -> Bool
ctEvCheckDepth cls target ev
| isWanted ev
, cls == coercibleClass -- The restriction applies only to Coercible
= ctLocDepth target <= ctLocDepth (ctEvLoc ev)
| otherwise = True | 241 | ctEvCheckDepth cls target ev
| isWanted ev
, cls == coercibleClass -- The restriction applies only to Coercible
= ctLocDepth target <= ctLocDepth (ctEvLoc ev)
| otherwise = True | 186 | true | true | 1 | 9 | 70 | 74 | 36 | 38 | null | null |
plumlife/cabal | Cabal/Distribution/PackageDescription/Configuration.hs | bsd-3-clause | flattenTaggedTargets :: TargetSet PDTagged ->
(Maybe Library, [(String, Executable)], [(String, TestSuite)]
, [(String, Benchmark)])
flattenTaggedTargets (TargetSet targets) = foldr untag (Nothing, [], [], []) targets
where
untag (_, Lib _) (Just _, _, _, _) = userBug "Only one library expected"
... | 2,636 | flattenTaggedTargets :: TargetSet PDTagged ->
(Maybe Library, [(String, Executable)], [(String, TestSuite)]
, [(String, Benchmark)])
flattenTaggedTargets (TargetSet targets) = foldr untag (Nothing, [], [], []) targets
where
untag (_, Lib _) (Just _, _, _, _) = userBug "Only one library expected"
... | 2,636 | flattenTaggedTargets (TargetSet targets) = foldr untag (Nothing, [], [], []) targets
where
untag (_, Lib _) (Just _, _, _, _) = userBug "Only one library expected"
untag (deps, Lib l) (Nothing, exes, tests, bms) =
(Just l', exes, tests, bms)
where
l' = l {
libBuildInfo = ... | 2,487 | false | true | 25 | 11 | 848 | 922 | 480 | 442 | null | null |
llelf/prose | gather-props.hs | bsd-3-clause | fullDecExclData = S.fromList
. map fst
. filter (_fullDecompositionExclusion . snd) | 115 | fullDecExclData = S.fromList
. map fst
. filter (_fullDecompositionExclusion . snd) | 115 | fullDecExclData = S.fromList
. map fst
. filter (_fullDecompositionExclusion . snd) | 115 | false | false | 0 | 8 | 42 | 29 | 14 | 15 | null | null |
ownclo/jpeg-on-steroids | vendor/Haskell/bitmap-0.0.2/Data/Bitmap/Internal.hs | bsd-3-clause | rettyPrintBitmap :: (BitmapClass bitmap, PixelComponent t) => String -> bitmap t -> String
prettyPrintBitmap prefix bm = text where
text = "<" ++ prefix ++ " " ++ typ ++ ", " ++ show xres ++ "x" ++ show yres ++ ", " ++ show nchn ++ " channels>" where
(xres,yres) = bitmapSize bm
typ = prettyPrintPixelComponentType... | 374 | prettyPrintBitmap :: (BitmapClass bitmap, PixelComponent t) => String -> bitmap t -> String
prettyPrintBitmap prefix bm = text where
text = "<" ++ prefix ++ " " ++ typ ++ ", " ++ show xres ++ "x" ++ show yres ++ ", " ++ show nchn ++ " channels>" where
(xres,yres) = bitmapSize bm
typ = prettyPrintPixelComponentTyp... | 374 | prettyPrintBitmap prefix bm = text where
text = "<" ++ prefix ++ " " ++ typ ++ ", " ++ show xres ++ "x" ++ show yres ++ ", " ++ show nchn ++ " channels>" where
(xres,yres) = bitmapSize bm
typ = prettyPrintPixelComponentType (bitmapComponentType bm)
nchn = bitmapNChannels bm | 282 | false | true | 0 | 14 | 71 | 135 | 68 | 67 | null | null |
kmels/hledger | hledger-lib/Hledger/Query.hs | gpl-3.0 | parseQueryTerm d ('d':'a':'t':'e':':':s) =
case parsePeriodExpr d s of Left e -> error' $ "\"date:"++s++"\" gave a "++showDateParseError e
Right (_,span) -> Left $ Date span | 225 | parseQueryTerm d ('d':'a':'t':'e':':':s) =
case parsePeriodExpr d s of Left e -> error' $ "\"date:"++s++"\" gave a "++showDateParseError e
Right (_,span) -> Left $ Date span | 225 | parseQueryTerm d ('d':'a':'t':'e':':':s) =
case parsePeriodExpr d s of Left e -> error' $ "\"date:"++s++"\" gave a "++showDateParseError e
Right (_,span) -> Left $ Date span | 225 | false | false | 0 | 11 | 77 | 95 | 45 | 50 | null | null |
corajr/cataskell | src/Cataskell/Game.hs | bsd-3-clause | runGame :: (RandomGen g) => GameState g -> Game -> g -> (Game, g)
runGame stModify game = runRand (execStateT stModify game) | 124 | runGame :: (RandomGen g) => GameState g -> Game -> g -> (Game, g)
runGame stModify game = runRand (execStateT stModify game) | 124 | runGame stModify game = runRand (execStateT stModify game) | 58 | false | true | 0 | 9 | 21 | 57 | 29 | 28 | null | null |
bjin/monad-lrs | Math/LinearRecursive/Internal/Matrix.hs | bsd-3-clause | matrix :: [[a]] -> Matrix a
matrix = Matrix | 43 | matrix :: [[a]] -> Matrix a
matrix = Matrix | 43 | matrix = Matrix | 15 | false | true | 0 | 7 | 8 | 24 | 13 | 11 | null | null |
creichert/persistent | persistent-postgresql/Database/Persist/Postgresql.hs | mit | createBackend :: LogFunc -> Maybe Double
-> IORef (Map.Map Text Statement) -> PG.Connection -> SqlBackend
createBackend logFunc serverVersion smap conn = do
SqlBackend
{ connPrepare = prepare' conn
, connStmtMap = smap
, connInsertSql = insertSql'
, connInsertMan... | 1,429 | createBackend :: LogFunc -> Maybe Double
-> IORef (Map.Map Text Statement) -> PG.Connection -> SqlBackend
createBackend logFunc serverVersion smap conn = do
SqlBackend
{ connPrepare = prepare' conn
, connStmtMap = smap
, connInsertSql = insertSql'
, connInsertMan... | 1,429 | createBackend logFunc serverVersion smap conn = do
SqlBackend
{ connPrepare = prepare' conn
, connStmtMap = smap
, connInsertSql = insertSql'
, connInsertManySql = Just insertManySql'
, connUpsertSql = serverVersion >>= upsertFunction upsertSql'
, connPutManyS... | 1,309 | false | true | 0 | 19 | 457 | 304 | 162 | 142 | null | null |
nickspinale/lambda-calculi | src/Language/Lambda/Untyped.hs | mit | compare' Z Zero = EQ | 20 | compare' Z Zero = EQ | 20 | compare' Z Zero = EQ | 20 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
AaronFriel/eff-experiments | examples/eff.hs | bsd-3-clause | decomp :: Union (t ': r) v -> Either (Union r v) (t v)
decomp (Union 0 v) = Right $ unsafeCoerce v | 98 | decomp :: Union (t ': r) v -> Either (Union r v) (t v)
decomp (Union 0 v) = Right $ unsafeCoerce v | 98 | decomp (Union 0 v) = Right $ unsafeCoerce v | 43 | false | true | 0 | 8 | 22 | 66 | 32 | 34 | null | null |
leshchevds/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | hvKvmFloppyImagePath :: String
hvKvmFloppyImagePath = "floppy_image_path" | 73 | hvKvmFloppyImagePath :: String
hvKvmFloppyImagePath = "floppy_image_path" | 73 | hvKvmFloppyImagePath = "floppy_image_path" | 42 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
nfjinjing/yuuko | src/Text/HTML/TagSoup/Match.hs | bsd-3-clause | -- | Check if the 'Tag str' is 'TagOpen' and matches the given name
tagOpenNameLit :: Eq str => str -> Tag str -> Bool
tagOpenNameLit name = tagOpenLit name (const True) | 169 | tagOpenNameLit :: Eq str => str -> Tag str -> Bool
tagOpenNameLit name = tagOpenLit name (const True) | 101 | tagOpenNameLit name = tagOpenLit name (const True) | 50 | true | true | 0 | 8 | 31 | 47 | 22 | 25 | null | null |
ksaveljev/hake-2 | src/CVarVariables.hs | bsd-3-clause | genderCVar = CVar.getExisting "gender" | 56 | genderCVar = CVar.getExisting "gender" | 56 | genderCVar = CVar.getExisting "gender" | 56 | false | false | 0 | 6 | 21 | 11 | 5 | 6 | null | null |
brendanhay/gogol | gogol-ml/gen/Network/Google/Resource/Ml/Projects/Models/Versions/Delete.hs | mpl-2.0 | -- | V1 error format.
pmvdXgafv :: Lens' ProjectsModelsVersionsDelete (Maybe Xgafv)
pmvdXgafv
= lens _pmvdXgafv (\ s a -> s{_pmvdXgafv = a}) | 142 | pmvdXgafv :: Lens' ProjectsModelsVersionsDelete (Maybe Xgafv)
pmvdXgafv
= lens _pmvdXgafv (\ s a -> s{_pmvdXgafv = a}) | 120 | pmvdXgafv
= lens _pmvdXgafv (\ s a -> s{_pmvdXgafv = a}) | 58 | true | true | 0 | 9 | 23 | 48 | 25 | 23 | null | null |
opentower/carnap | Carnap/src/Carnap/Core/Data/Util.hs | gpl-3.0 | withArity f (a :: Arity i o ret') (phi :: FixLang l a) =
case eqT :: Maybe (a :~: ret') of
Nothing -> Nothing
Just Refl -> Just (f a phi)
{-|
this function checks to see if phi occurs as a child of psi
-} | 238 | withArity f (a :: Arity i o ret') (phi :: FixLang l a) =
case eqT :: Maybe (a :~: ret') of
Nothing -> Nothing
Just Refl -> Just (f a phi)
{-|
this function checks to see if phi occurs as a child of psi
-} | 238 | withArity f (a :: Arity i o ret') (phi :: FixLang l a) =
case eqT :: Maybe (a :~: ret') of
Nothing -> Nothing
Just Refl -> Just (f a phi)
{-|
this function checks to see if phi occurs as a child of psi
-} | 238 | false | false | 0 | 10 | 80 | 83 | 41 | 42 | null | null |
ndmitchell/extra | src/Data/Foldable/Extra.hs | bsd-3-clause | -- | A generalization of 'Control.Monad.Extra.findM' to 'Foldable' instances.
findM :: (Foldable f, Monad m) => (a -> m Bool) -> f a -> m (Maybe a)
findM p = foldr (\x -> MX.ifM (p x) (pure $ Just x)) (pure Nothing) | 215 | findM :: (Foldable f, Monad m) => (a -> m Bool) -> f a -> m (Maybe a)
findM p = foldr (\x -> MX.ifM (p x) (pure $ Just x)) (pure Nothing) | 137 | findM p = foldr (\x -> MX.ifM (p x) (pure $ Just x)) (pure Nothing) | 67 | true | true | 0 | 11 | 41 | 106 | 52 | 54 | null | null |
dgvncsz0f/nws | src/Jerimum/PostgreSQL/Types/Numeric.hs | bsd-3-clause | encodeInt64 :: Maybe Int64 -> E.Encoding
encodeInt64 = encodeWithVersion v0 int64EncoderV0 | 90 | encodeInt64 :: Maybe Int64 -> E.Encoding
encodeInt64 = encodeWithVersion v0 int64EncoderV0 | 90 | encodeInt64 = encodeWithVersion v0 int64EncoderV0 | 49 | false | true | 0 | 6 | 10 | 25 | 12 | 13 | null | null |
joehillen/aura | src/Aura/Languages.hs | gpl-3.0 | install_2 :: Language -> String
install_2 = \case
Japanese -> "適当なパッケージを入力してください。"
Polish -> "Nie podano prawidłowych pakietów."
Croatian -> "Nije specificiran nijedan ispravan paket."
Swedish -> "Inga giltiga paket valda."
German -> "Keine gültigen Pakete angegeben."
Spanish -... | 815 | install_2 :: Language -> String
install_2 = \case
Japanese -> "適当なパッケージを入力してください。"
Polish -> "Nie podano prawidłowych pakietów."
Croatian -> "Nije specificiran nijedan ispravan paket."
Swedish -> "Inga giltiga paket valda."
German -> "Keine gültigen Pakete angegeben."
Spanish -... | 815 | install_2 = \case
Japanese -> "適当なパッケージを入力してください。"
Polish -> "Nie podano prawidłowych pakietów."
Croatian -> "Nije specificiran nijedan ispravan paket."
Swedish -> "Inga giltiga paket valda."
German -> "Keine gültigen Pakete angegeben."
Spanish -> "No se ha especificado ningún ... | 783 | false | true | 0 | 8 | 197 | 108 | 52 | 56 | null | null |
GaloisInc/halvm-ghc | compiler/basicTypes/Module.hs | bsd-3-clause | lookupModuleEnv :: ModuleEnv a -> Module -> Maybe a
lookupModuleEnv (ModuleEnv e) m = Map.lookup (NDModule m) e | 111 | lookupModuleEnv :: ModuleEnv a -> Module -> Maybe a
lookupModuleEnv (ModuleEnv e) m = Map.lookup (NDModule m) e | 111 | lookupModuleEnv (ModuleEnv e) m = Map.lookup (NDModule m) e | 59 | false | true | 0 | 7 | 17 | 49 | 23 | 26 | null | null |
Javran/misc | max-flow/src/Javran/MaxFlow/Algorithm/Internal.hs | mit | logM :: T.Text -> M ()
logM t =
lift $
lift $
Control.Monad.Trans.Writer.CPS.tell $
DL.singleton t | 118 | logM :: T.Text -> M ()
logM t =
lift $
lift $
Control.Monad.Trans.Writer.CPS.tell $
DL.singleton t | 118 | logM t =
lift $
lift $
Control.Monad.Trans.Writer.CPS.tell $
DL.singleton t | 95 | false | true | 2 | 8 | 36 | 53 | 26 | 27 | null | null |
rueshyna/gogol | gogol-android-publisher/gen/Network/Google/AndroidPublisher/Types/Product.hs | mpl-2.0 | -- | Subscription period, specified in ISO 8601 format. Acceptable values are
-- \"P1W\" (one week), \"P1M\" (one month), \"P3M\" (three months), \"P6M\"
-- (six months), and \"P1Y\" (one year).
iapSubscriptionPeriod :: Lens' InAppProduct (Maybe Text)
iapSubscriptionPeriod
= lens _iapSubscriptionPeriod
(\ s a -... | 352 | iapSubscriptionPeriod :: Lens' InAppProduct (Maybe Text)
iapSubscriptionPeriod
= lens _iapSubscriptionPeriod
(\ s a -> s{_iapSubscriptionPeriod = a}) | 157 | iapSubscriptionPeriod
= lens _iapSubscriptionPeriod
(\ s a -> s{_iapSubscriptionPeriod = a}) | 100 | true | true | 0 | 9 | 54 | 50 | 27 | 23 | null | null |
adept/hledger | hledger-lib/Hledger/Utils/Parse.hs | gpl-3.0 | rtp = runTextParser | 19 | rtp = runTextParser | 19 | rtp = runTextParser | 19 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
begriffs/optparse-applicative | Options/Applicative/Builder.hs | bsd-3-clause | -- | Specify an exit code if a parse error occurs.
failureCode :: Int -> InfoMod a
failureCode n = InfoMod $ \i -> i { infoFailureCode = n } | 140 | failureCode :: Int -> InfoMod a
failureCode n = InfoMod $ \i -> i { infoFailureCode = n } | 89 | failureCode n = InfoMod $ \i -> i { infoFailureCode = n } | 57 | true | true | 0 | 8 | 29 | 39 | 21 | 18 | null | null |
xenog/json-rpc | examples/concurrent-client.hs | unlicense | responder :: MonadLoggerIO m => JSONRPCT m ()
responder = do
$(logDebug) "listening for new request"
qM <- receiveBatchRequest
case qM of
Nothing -> do
$(logDebug) "closed request channel, exting"
return ()
Just (SingleRequest q) -> do
$(logDebug) "got req... | 645 | responder :: MonadLoggerIO m => JSONRPCT m ()
responder = do
$(logDebug) "listening for new request"
qM <- receiveBatchRequest
case qM of
Nothing -> do
$(logDebug) "closed request channel, exting"
return ()
Just (SingleRequest q) -> do
$(logDebug) "got req... | 645 | responder = do
$(logDebug) "listening for new request"
qM <- receiveBatchRequest
case qM of
Nothing -> do
$(logDebug) "closed request channel, exting"
return ()
Just (SingleRequest q) -> do
$(logDebug) "got request"
rM <- buildResponse respond ... | 599 | false | true | 0 | 16 | 226 | 191 | 82 | 109 | null | null |
PavelClaudiuStefan/FMI | An_3_Semestru_1/ProgramareDeclarativa/Laboratoare/Laborator9/LSystem.hs | cc0-1.0 | red = Colour 1.0 0.0 0.0 | 26 | red = Colour 1.0 0.0 0.0 | 26 | red = Colour 1.0 0.0 0.0 | 26 | false | false | 0 | 5 | 7 | 13 | 6 | 7 | null | null |
TomMD/ghc | compiler/main/DynFlags.hs | bsd-3-clause | supportedExtensions :: [String]
supportedExtensions
= concatMap (\name -> [name, "No" ++ name]) (map flagSpecName xFlags) | 125 | supportedExtensions :: [String]
supportedExtensions
= concatMap (\name -> [name, "No" ++ name]) (map flagSpecName xFlags) | 125 | supportedExtensions
= concatMap (\name -> [name, "No" ++ name]) (map flagSpecName xFlags) | 93 | false | true | 0 | 9 | 18 | 52 | 26 | 26 | null | null |
accraze/discogs-haskell | src/Discogs.hs | mit | ---- | Run a 'Discogs' or 'DiscogsT' action with custom settings. Us this
---- if you want to persist a connection over multiple 'Discogs' sessions or
---- use a custom user-agent string.
runDiscogsWith :: MonadIO m => DiscogsOptions -> DiscogsT m a -> m (Either (APIError DiscogsError) a)
runDiscogsWith opts discog... | 376 | runDiscogsWith :: MonadIO m => DiscogsOptions -> DiscogsT m a -> m (Either (APIError DiscogsError) a)
runDiscogsWith opts discogs = liftM dropResume $ runResumeDiscogsWith opts discogs | 184 | runDiscogsWith opts discogs = liftM dropResume $ runResumeDiscogsWith opts discogs | 82 | true | true | 0 | 12 | 61 | 68 | 33 | 35 | null | null |
shlevy/ghc | compiler/coreSyn/CoreFVs.hs | bsd-3-clause | orphNamesOfCo (UnivCo p _ t1 t2) = orphNamesOfProv p `unionNameSet` orphNamesOfType t1 `unionNameSet` orphNamesOfType t2 | 123 | orphNamesOfCo (UnivCo p _ t1 t2) = orphNamesOfProv p `unionNameSet` orphNamesOfType t1 `unionNameSet` orphNamesOfType t2 | 123 | orphNamesOfCo (UnivCo p _ t1 t2) = orphNamesOfProv p `unionNameSet` orphNamesOfType t1 `unionNameSet` orphNamesOfType t2 | 123 | false | false | 0 | 7 | 17 | 42 | 21 | 21 | null | null |
23Skidoo/text | Data/Text/Lazy.hs | bsd-2-clause | -- | /O(n)/ 'maximum' returns the maximum value from a 'Text', which
-- must be non-empty. Subject to fusion.
maximum :: Text -> Char
maximum t = S.maximum (stream t) | 166 | maximum :: Text -> Char
maximum t = S.maximum (stream t) | 56 | maximum t = S.maximum (stream t) | 32 | true | true | 0 | 7 | 29 | 31 | 16 | 15 | null | null |
jystic/ssa-anf | src/ANF/SCCP.hs | bsd-3-clause | join con_x Bot = con_x | 28 | join con_x Bot = con_x | 28 | join con_x Bot = con_x | 28 | false | false | 0 | 4 | 10 | 13 | 5 | 8 | null | null |
capitanbatata/sandbox | streaming-endpoints/src/NumberStreamServer.hs | gpl-3.0 | app :: Application
app = simpleCors $ serve api server
where
api :: Proxy API
api = Proxy
server :: Server API
server = return streamNumbers | 168 | app :: Application
app = simpleCors $ serve api server
where
api :: Proxy API
api = Proxy
server :: Server API
server = return streamNumbers | 168 | app = simpleCors $ serve api server
where
api :: Proxy API
api = Proxy
server :: Server API
server = return streamNumbers | 149 | false | true | 1 | 6 | 53 | 61 | 27 | 34 | null | null |
bgamari/model-fit | CsvUtils.hs | bsd-3-clause | readPoints :: FromRecord a => FilePath -> EitherT String IO (V.Vector a)
readPoints path =
liftIO (BSL.readFile path) >>= EitherT . return . decodePoints | 157 | readPoints :: FromRecord a => FilePath -> EitherT String IO (V.Vector a)
readPoints path =
liftIO (BSL.readFile path) >>= EitherT . return . decodePoints | 157 | readPoints path =
liftIO (BSL.readFile path) >>= EitherT . return . decodePoints | 84 | false | true | 0 | 11 | 27 | 68 | 31 | 37 | null | null |
rvion/lamdu | Lamdu/GUI/WidgetIds.hs | gpl-3.0 | flyNav :: AnimId
flyNav = ["flyNav"] | 36 | flyNav :: AnimId
flyNav = ["flyNav"] | 36 | flyNav = ["flyNav"] | 19 | false | true | 0 | 5 | 5 | 14 | 8 | 6 | null | null |
olsner/ghc | compiler/backpack/RnModIface.hs | bsd-3-clause | rnIfaceType (IfaceCoercionTy co)
= IfaceCoercionTy <$> rnIfaceCo co | 71 | rnIfaceType (IfaceCoercionTy co)
= IfaceCoercionTy <$> rnIfaceCo co | 71 | rnIfaceType (IfaceCoercionTy co)
= IfaceCoercionTy <$> rnIfaceCo co | 71 | false | false | 2 | 6 | 11 | 25 | 10 | 15 | null | null |
ghc-android/ghc | testsuite/tests/ghci/should_run/ghcirun004.hs | bsd-3-clause | 1836 = 1835 | 11 | 1836 = 1835 | 11 | 1836 = 1835 | 11 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
psfblair/freepalace | src/FreePalace/Handlers/Incoming.hs | apache-2.0 | handleProtocolUpdate :: State.Connected -> InboundMessages.ProtocolInfo -> State.Connected
handleProtocolUpdate clientState (InboundMessages.PalaceProtocol connection endianness) =
State.withProtocol clientState (State.PalaceProtocolState connection newMessageConverters)
where newMessageConverters = Connect.messag... | 711 | handleProtocolUpdate :: State.Connected -> InboundMessages.ProtocolInfo -> State.Connected
handleProtocolUpdate clientState (InboundMessages.PalaceProtocol connection endianness) =
State.withProtocol clientState (State.PalaceProtocolState connection newMessageConverters)
where newMessageConverters = Connect.messag... | 711 | handleProtocolUpdate clientState (InboundMessages.PalaceProtocol connection endianness) =
State.withProtocol clientState (State.PalaceProtocolState connection newMessageConverters)
where newMessageConverters = Connect.messageConvertersFor endianness
{- Re AlternateLogonReply: OpenPalace comments say:
This is onl... | 619 | false | true | 0 | 8 | 95 | 71 | 35 | 36 | null | null |
gbwey/persistentold | persistent-mongoDB/Database/Persist/MongoDB.hs | mit | entityToFields :: (PersistEntity record) => record -> [DB.Field]
entityToFields = entityToDocument | 98 | entityToFields :: (PersistEntity record) => record -> [DB.Field]
entityToFields = entityToDocument | 98 | entityToFields = entityToDocument | 33 | false | true | 0 | 8 | 10 | 29 | 16 | 13 | null | null |
Lainepress/hub-src | Hub/System.hs | bsd-3-clause | fileExists :: FilePath -> IO Bool
fileExists fp = flip E.catch (hdl_ioe False) $
do st <- getFileStatus fp
return $ isRegularFile st | 145 | fileExists :: FilePath -> IO Bool
fileExists fp = flip E.catch (hdl_ioe False) $
do st <- getFileStatus fp
return $ isRegularFile st | 145 | fileExists fp = flip E.catch (hdl_ioe False) $
do st <- getFileStatus fp
return $ isRegularFile st | 111 | false | true | 0 | 10 | 35 | 64 | 27 | 37 | null | null |
tcsavage/lazy-compiler | src/STG/FromCore.hs | mit | stripTypeAbstractions expr@(Core.L lit) = expr | 46 | stripTypeAbstractions expr@(Core.L lit) = expr | 46 | stripTypeAbstractions expr@(Core.L lit) = expr | 46 | false | false | 0 | 9 | 4 | 20 | 10 | 10 | null | null |
jsnajder/multext-east-msd | src/Data/MultextEastMsd.hs | bsd-3-clause | decode (Clitic _) = dec Clitic | 36 | decode (Clitic _) = dec Clitic | 36 | decode (Clitic _) = dec Clitic | 36 | false | false | 0 | 6 | 11 | 19 | 8 | 11 | null | null |
oldmanmike/ghc | compiler/nativeGen/X86/Ppr.hs | bsd-3-clause | --text "subl $4,%esp ; fstps (%esp) ; flds (%esp) ; addl $4,%esp ; "
gcoerceto _ = panic "X86.Ppr.gcoerceto: no match" | 121 | gcoerceto _ = panic "X86.Ppr.gcoerceto: no match" | 52 | gcoerceto _ = panic "X86.Ppr.gcoerceto: no match" | 52 | true | false | 0 | 5 | 23 | 13 | 6 | 7 | null | null |
PierreR/Haskell-Turtle-Library | src/Turtle/Prelude.hs | bsd-3-clause | -- | Time of last access
accessTime :: PosixCompat.FileStatus -> POSIXTime
accessTime = realToFrac . PosixCompat.accessTime | 123 | accessTime :: PosixCompat.FileStatus -> POSIXTime
accessTime = realToFrac . PosixCompat.accessTime | 98 | accessTime = realToFrac . PosixCompat.accessTime | 48 | true | true | 0 | 6 | 15 | 24 | 13 | 11 | null | null |
GaloisInc/halvm-ghc | compiler/utils/FastString.hs | bsd-3-clause | fastZStringToByteString :: FastZString -> ByteString
fastZStringToByteString (FastZString bs) = bs | 98 | fastZStringToByteString :: FastZString -> ByteString
fastZStringToByteString (FastZString bs) = bs | 98 | fastZStringToByteString (FastZString bs) = bs | 45 | false | true | 0 | 7 | 9 | 24 | 12 | 12 | null | null |
luoyetx/LearnCode | euler/p007.hs | bsd-3-clause | p7 = primes !! 10000 | 20 | p7 = primes !! 10000 | 20 | p7 = primes !! 10000 | 20 | false | false | 1 | 5 | 4 | 13 | 5 | 8 | null | null |
Gurmeet-Singh/Zeno | src/Zeno/HaskellParser.hs | mit | convertBindings (Hs.Rec binds) =
Rec <$> convertBinds True binds | 67 | convertBindings (Hs.Rec binds) =
Rec <$> convertBinds True binds | 67 | convertBindings (Hs.Rec binds) =
Rec <$> convertBinds True binds | 67 | false | false | 2 | 7 | 11 | 30 | 12 | 18 | null | null |
rahulmutt/ghcvm | compiler/Eta/Prelude/PrimOp.hs | bsd-3-clause | primOpCodeSize Addr2StablePtrOp = primOpCodeSizeForeignCall | 59 | primOpCodeSize Addr2StablePtrOp = primOpCodeSizeForeignCall | 59 | primOpCodeSize Addr2StablePtrOp = primOpCodeSizeForeignCall | 59 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
Bodigrim/katas | src/haskell/4-Sort-binary-tree-by-levels.hs | bsd-2-clause | treeByLevels (Just node) = value node : treeByLevels (left node) ++ treeByLevels (right node) | 93 | treeByLevels (Just node) = value node : treeByLevels (left node) ++ treeByLevels (right node) | 93 | treeByLevels (Just node) = value node : treeByLevels (left node) ++ treeByLevels (right node) | 93 | false | false | 0 | 9 | 13 | 44 | 20 | 24 | null | null |
ggreif/clash-compiler | clash-lib/src/CLaSH/Util.hs | bsd-2-clause | -- | ceiling (log_2(c))
clog2 :: (Integral a, Integral c) => a -> c
clog2 = ceiling . logBase (2 :: Float) . fromIntegral | 121 | clog2 :: (Integral a, Integral c) => a -> c
clog2 = ceiling . logBase (2 :: Float) . fromIntegral | 97 | clog2 = ceiling . logBase (2 :: Float) . fromIntegral | 53 | true | true | 0 | 8 | 23 | 48 | 26 | 22 | null | null |
slpopejoy/fadno-braids | src/Fadno/Braids/Graphics.hs | bsd-2-clause | -- | Draw a strand with specified stepWidth, color, and draw decorators.
renderStrand :: Integral a => DrawConf -> [StrandDrawF a] -> FilePath -> Colour Double -> Strand a -> IO ()
renderStrand dc drawFs fp color s@(Strand ss _l) =
renderRast fp (stepWidth dc * (length ss + 1))
(reflectY $ bg whi... | 429 | renderStrand :: Integral a => DrawConf -> [StrandDrawF a] -> FilePath -> Colour Double -> Strand a -> IO ()
renderStrand dc drawFs fp color s@(Strand ss _l) =
renderRast fp (stepWidth dc * (length ss + 1))
(reflectY $ bg white $ frame 0.4 $
runFs drawFs s $ lwO 5 $ lc color $
... | 356 | renderStrand dc drawFs fp color s@(Strand ss _l) =
renderRast fp (stepWidth dc * (length ss + 1))
(reflectY $ bg white $ frame 0.4 $
runFs drawFs s $ lwO 5 $ lc color $
drawStrand dc s) | 248 | true | true | 0 | 13 | 133 | 154 | 73 | 81 | null | null |
m-alvarez/jhc | drift_processed/FrontEnd/KindInfer.hs | mit | kiData context tyconName args condecls = do
args <- mapM (lookupKind KindSimple . toName TypeVal) args
kc <- lookupKind KindSimple (toName TypeConstructor tyconName)
kiApps' kc args kindStar
mapM_ kiPred context
flip mapM_ (concatMap (map hsBangType . hsConDeclArgs) condecls) $ \t -> do
v <... | 373 | kiData context tyconName args condecls = do
args <- mapM (lookupKind KindSimple . toName TypeVal) args
kc <- lookupKind KindSimple (toName TypeConstructor tyconName)
kiApps' kc args kindStar
mapM_ kiPred context
flip mapM_ (concatMap (map hsBangType . hsConDeclArgs) condecls) $ \t -> do
v <... | 373 | kiData context tyconName args condecls = do
args <- mapM (lookupKind KindSimple . toName TypeVal) args
kc <- lookupKind KindSimple (toName TypeConstructor tyconName)
kiApps' kc args kindStar
mapM_ kiPred context
flip mapM_ (concatMap (map hsBangType . hsConDeclArgs) condecls) $ \t -> do
v <... | 373 | false | false | 0 | 13 | 86 | 137 | 61 | 76 | null | null |
bamboo/idris-cil | src/IRTS/CodegenCil.hs | bsd-3-clause | emit :: SExp -> CilEmitter ()
emit (SLet (Loc i) v e) = do
case v of
SNothing -> tell [ loadNothing ]
_ -> emit v
localIndex i >>= storeLocal
emit e | 169 | emit :: SExp -> CilEmitter ()
emit (SLet (Loc i) v e) = do
case v of
SNothing -> tell [ loadNothing ]
_ -> emit v
localIndex i >>= storeLocal
emit e | 169 | emit (SLet (Loc i) v e) = do
case v of
SNothing -> tell [ loadNothing ]
_ -> emit v
localIndex i >>= storeLocal
emit e | 139 | false | true | 0 | 11 | 53 | 83 | 38 | 45 | null | null |
Cahu/krpc-hs | src/KRPCHS/SpaceCenter.hs | gpl-3.0 | getLightActiveStreamReq :: KRPCHS.SpaceCenter.Light -> KRPCStreamReq (Bool)
getLightActiveStreamReq thisArg =
let req = makeRequest "SpaceCenter" "Light_get_Active" [makeArgument 0 thisArg]
in makeStream req | 216 | getLightActiveStreamReq :: KRPCHS.SpaceCenter.Light -> KRPCStreamReq (Bool)
getLightActiveStreamReq thisArg =
let req = makeRequest "SpaceCenter" "Light_get_Active" [makeArgument 0 thisArg]
in makeStream req | 216 | getLightActiveStreamReq thisArg =
let req = makeRequest "SpaceCenter" "Light_get_Active" [makeArgument 0 thisArg]
in makeStream req | 140 | false | true | 0 | 11 | 29 | 61 | 28 | 33 | null | null |
ekmett/ghc | compiler/nativeGen/PPC/Ppr.hs | bsd-3-clause | -- nuke 'em
{-
pprInstr (COMMENT s) =
if platformOS platform == OSLinux
then ptext (sLit "# ") <> ftext s
else ptext (sLit "; ") <> ftext s
-}
pprInstr (DELTA d)
= pprInstr (COMMENT (mkFastString ("\tdelta = " ++ show d))) | 240 | pprInstr (DELTA d)
= pprInstr (COMMENT (mkFastString ("\tdelta = " ++ show d))) | 82 | pprInstr (DELTA d)
= pprInstr (COMMENT (mkFastString ("\tdelta = " ++ show d))) | 82 | true | false | 0 | 12 | 60 | 42 | 21 | 21 | null | null |
bartavelle/manglingrules | Mangling.hs | gpl-3.0 | showRule' _ (ReplaceAll cc c ) = return ('s' : showCC cc ++ [c]) | 84 | showRule' _ (ReplaceAll cc c ) = return ('s' : showCC cc ++ [c]) | 84 | showRule' _ (ReplaceAll cc c ) = return ('s' : showCC cc ++ [c]) | 84 | false | false | 1 | 9 | 33 | 41 | 19 | 22 | null | null |
DavidAlphaFox/darcs | src/Darcs/UI/Commands/Convert.hs | gpl-2.0 | convertImportBasicOpts :: DarcsOption a
(Maybe String
-> O.SetScriptsExecutable
-> O.PatchFormat
-> O.WithWorkingDir
-> a)
convertImportBasicOpts
= O.reponame
^ O.setScriptsExecutabl... | 359 | convertImportBasicOpts :: DarcsOption a
(Maybe String
-> O.SetScriptsExecutable
-> O.PatchFormat
-> O.WithWorkingDir
-> a)
convertImportBasicOpts
= O.reponame
^ O.setScriptsExecutabl... | 359 | convertImportBasicOpts
= O.reponame
^ O.setScriptsExecutable
^ O.patchFormat
^ O.useWorkingDir | 102 | false | true | 6 | 12 | 164 | 70 | 32 | 38 | null | null |
tilltheis/propositional-logic | src/Data/Foldable.hs | bsd-3-clause | -- | 'or' returns the disjunction of a container of Bools. For the
-- result to be 'False', the container must be finite; 'True', however,
-- results from a 'True' value finitely far from the left end.
or :: Foldable t => t Bool -> Bool
or = getAny . foldMap Any | 263 | or :: Foldable t => t Bool -> Bool
or = getAny . foldMap Any | 60 | or = getAny . foldMap Any | 25 | true | true | 0 | 7 | 52 | 35 | 18 | 17 | null | null |
phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/Tokens.hs | bsd-3-clause | gl_GUILTY_CONTEXT_RESET :: GLenum
gl_GUILTY_CONTEXT_RESET = 0x8253 | 66 | gl_GUILTY_CONTEXT_RESET :: GLenum
gl_GUILTY_CONTEXT_RESET = 0x8253 | 66 | gl_GUILTY_CONTEXT_RESET = 0x8253 | 32 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
danr/hipspec | testsuite/prod/zeno_version/PropT48.hs | gpl-3.0 | sorted _ = True | 15 | sorted _ = True | 15 | sorted _ = True | 15 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
christian-marie/votnik | lib/Botlike/AutomationDSL.hs | bsd-3-clause | markdownToRST =
writeRST def {writerReferenceLinks = True} .
handleError . readMarkdown def | 95 | markdownToRST =
writeRST def {writerReferenceLinks = True} .
handleError . readMarkdown def | 95 | markdownToRST =
writeRST def {writerReferenceLinks = True} .
handleError . readMarkdown def | 95 | false | false | 0 | 9 | 15 | 28 | 14 | 14 | null | null |
ford-prefect/haskell-gi | lib/Data/GI/CodeGen/Inheritance.hs | lgpl-2.1 | getParent _ = Nothing | 21 | getParent _ = Nothing | 21 | getParent _ = Nothing | 21 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
AlexeyRaga/eta | libraries/base/GHC/IO/Handle/Internals.hs | bsd-3-clause | wantReadableHandle :: String -> Handle -> (Handle__ -> IO (Handle__,a)) -> IO a
wantReadableHandle fun h act = withHandle fun h (checkReadableHandle act) | 153 | wantReadableHandle :: String -> Handle -> (Handle__ -> IO (Handle__,a)) -> IO a
wantReadableHandle fun h act = withHandle fun h (checkReadableHandle act) | 153 | wantReadableHandle fun h act = withHandle fun h (checkReadableHandle act) | 73 | false | true | 0 | 11 | 22 | 62 | 31 | 31 | null | null |
chengzh2008/hpffp | src/ch05-Types2/singaSong.hs | bsd-3-clause | fstString :: String -> String
fstString x = x ++ " in the rain" | 63 | fstString :: String -> String
fstString x = x ++ " in the rain" | 63 | fstString x = x ++ " in the rain" | 33 | false | true | 0 | 5 | 13 | 22 | 11 | 11 | null | null |
DougBurke/swish | src/Swish/RDF/Parser/Turtle.hs | lgpl-2.1 | {-
[128s] RDFLiteral ::= String (LANGTAG | '^^' iri)?
TODO: remove 'Lit lbl' form, since dtype=xsd:string in this case.
-}
rdfLiteral :: TurtleParser RDFLabel
rdfLiteral = do
lbl <- L.toStrict <$> turtleString
opt <- optional ((Left <$> (_langTag <? "Unable to parse the language tag"))
<|>
... | 679 | rdfLiteral :: TurtleParser RDFLabel
rdfLiteral = do
lbl <- L.toStrict <$> turtleString
opt <- optional ((Left <$> (_langTag <? "Unable to parse the language tag"))
<|>
(string "^^" *> (Right <$> (commit iri <? "Unable to parse the datatype of the literal"))))
ignore $ optiona... | 555 | rdfLiteral = do
lbl <- L.toStrict <$> turtleString
opt <- optional ((Left <$> (_langTag <? "Unable to parse the language tag"))
<|>
(string "^^" *> (Right <$> (commit iri <? "Unable to parse the datatype of the literal"))))
ignore $ optional whiteSpace
return $ case opt of
... | 519 | true | true | 0 | 17 | 201 | 157 | 76 | 81 | null | null |
sdiehl/ghc | compiler/prelude/TysWiredIn.hs | bsd-3-clause | tupleTyConName BoxedTuple a = tyConName (tupleTyCon Boxed a) | 65 | tupleTyConName BoxedTuple a = tyConName (tupleTyCon Boxed a) | 65 | tupleTyConName BoxedTuple a = tyConName (tupleTyCon Boxed a) | 65 | false | false | 0 | 7 | 12 | 22 | 10 | 12 | null | null |
shayan-najd/HsParser | U/Outputable.hs | gpl-3.0 | pprPrimInt, pprPrimWord, pprPrimInt64, pprPrimWord64 :: Integer -> SDoc
pprPrimChar c = pprHsChar c <> primCharSuffix | 119 | pprPrimInt, pprPrimWord, pprPrimInt64, pprPrimWord64 :: Integer -> SDoc
pprPrimChar c = pprHsChar c <> primCharSuffix | 119 | pprPrimChar c = pprHsChar c <> primCharSuffix | 47 | false | true | 0 | 6 | 16 | 31 | 18 | 13 | null | null |
plaprade/haskoin | haskoin-core/test/Network/Haskoin/Script/Tests.hs | unlicense | -- | Some of the scripts tests require transactions be built in a
-- standard way. This function builds the crediting transaction.
-- Quoting the top comment of script_valid.json: "It is evaluated as
-- if there was a crediting coinbase transaction with two 0 pushes as
-- scriptSig, and one output of 0 satoshi and giv... | 979 | buildCreditTx :: ByteString -> Tx
buildCreditTx scriptPubKey =
createTx 1 [ txI ] [ txO ] 0
where
txO = TxOut { outValue = 0
, scriptOutput = scriptPubKey
}
txI = TxIn { prevOutput = nullOutPoint
, scriptInput = encode $ Script [ OP_0, OP_0 ]
,... | 457 | buildCreditTx scriptPubKey =
createTx 1 [ txI ] [ txO ] 0
where
txO = TxOut { outValue = 0
, scriptOutput = scriptPubKey
}
txI = TxIn { prevOutput = nullOutPoint
, scriptInput = encode $ Script [ OP_0, OP_0 ]
, txInSequence = maxSeqNum
... | 423 | true | true | 2 | 10 | 249 | 110 | 63 | 47 | null | null |
limansky/wbxml | src/Wbxml/Tables.hs | bsd-3-clause | prov11TagTable :: WbxmlTagTable
prov11TagTable =
[ (0x00, [ (0x05, "wap-provisioningdoc")
, (0x06, "characteristic")
, (0x07, "parm")
])
, (0x01, [ (0x06, "characteristic") -- OMA
, (0x07, "parm") -- OMA
])
] | 285 | prov11TagTable :: WbxmlTagTable
prov11TagTable =
[ (0x00, [ (0x05, "wap-provisioningdoc")
, (0x06, "characteristic")
, (0x07, "parm")
])
, (0x01, [ (0x06, "characteristic") -- OMA
, (0x07, "parm") -- OMA
])
] | 285 | prov11TagTable =
[ (0x00, [ (0x05, "wap-provisioningdoc")
, (0x06, "characteristic")
, (0x07, "parm")
])
, (0x01, [ (0x06, "characteristic") -- OMA
, (0x07, "parm") -- OMA
])
] | 253 | false | true | 0 | 8 | 107 | 76 | 50 | 26 | null | null |
jdavidberger/project-euler | prob91.hs | lgpl-3.0 | check (p1, p2) =
let l1 = sqlength p1
l2 = sqlength p2
l3 = sqlength (pdiff p1 p2)
in checkl l1 l2 l3 | 117 | check (p1, p2) =
let l1 = sqlength p1
l2 = sqlength p2
l3 = sqlength (pdiff p1 p2)
in checkl l1 l2 l3 | 117 | check (p1, p2) =
let l1 = sqlength p1
l2 = sqlength p2
l3 = sqlength (pdiff p1 p2)
in checkl l1 l2 l3 | 117 | false | false | 0 | 11 | 39 | 61 | 29 | 32 | null | null |
alephcloud/hs-aws-performance-tests | tests/SequenceBenchmarks.hs | mit | main :: IO ()
main = defaultMain
[ genBench "DList" (V.fromList . D.toList)
, genBench "Seq" (V.fromList . F.toList :: Seq.Seq Double -> V.Vector Double)
, genBench "DListS" (\(DListS a) -> uncurry (flip V.fromListN) (a [] 0))
-- , genBench "Stream" GV.unstream
-- , genBench "Vector" (Proxy :: Proxy... | 4,063 | main :: IO ()
main = defaultMain
[ genBench "DList" (V.fromList . D.toList)
, genBench "Seq" (V.fromList . F.toList :: Seq.Seq Double -> V.Vector Double)
, genBench "DListS" (\(DListS a) -> uncurry (flip V.fromListN) (a [] 0))
-- , genBench "Stream" GV.unstream
-- , genBench "Vector" (Proxy :: Proxy... | 4,063 | main = defaultMain
[ genBench "DList" (V.fromList . D.toList)
, genBench "Seq" (V.fromList . F.toList :: Seq.Seq Double -> V.Vector Double)
, genBench "DListS" (\(DListS a) -> uncurry (flip V.fromListN) (a [] 0))
-- , genBench "Stream" GV.unstream
-- , genBench "Vector" (Proxy :: Proxy (V.Vector Dou... | 4,049 | false | true | 15 | 12 | 1,376 | 1,670 | 810 | 860 | null | null |
bhickey/cloudyfs | System/CloudyFS/Weather.hs | agpl-3.0 | asByteString :: Weather -> ByteString
asByteString w = pack $ conditions w ++ "\n" ++ temp w ++ "\n" | 100 | asByteString :: Weather -> ByteString
asByteString w = pack $ conditions w ++ "\n" ++ temp w ++ "\n" | 100 | asByteString w = pack $ conditions w ++ "\n" ++ temp w ++ "\n" | 62 | false | true | 0 | 9 | 18 | 40 | 19 | 21 | null | null |
nyaxt/dmix | nkmd/as/Mnemonic.hs | mit | assemble i@ArithInsn{t = Left rt} =
(assembleCommon i) .|.
((regSelBits rt) `shiftL` 8) | 95 | assemble i@ArithInsn{t = Left rt} =
(assembleCommon i) .|.
((regSelBits rt) `shiftL` 8) | 95 | assemble i@ArithInsn{t = Left rt} =
(assembleCommon i) .|.
((regSelBits rt) `shiftL` 8) | 95 | false | false | 2 | 9 | 20 | 60 | 28 | 32 | null | null |
vrom911/hs-init | summoner-cli/examples/cabal-full/test/Spec.hs | mit | main :: IO ()
main = putStrLn ("Tests for " ++ projectName) | 59 | main :: IO ()
main = putStrLn ("Tests for " ++ projectName) | 59 | main = putStrLn ("Tests for " ++ projectName) | 45 | false | true | 0 | 7 | 11 | 32 | 14 | 18 | null | null |
dmpots/fibon | tools/fibon-run/Fibon/Run/Actions.hs | bsd-3-clause | sanityCheck :: FibonRunMonad ()
sanityCheck = do
bb <- ask
let bmPath = pathToBench bb
io $ Log.info ("Checking for directory:\n"++bmPath)
bdExists <- io $ doesDirectoryExist bmPath
unless bdExists (throwError $ pathDoesNotExist bmPath)
io $ Log.info ("Checking for cabal file in:\n"++bmPath)
dirContents <... | 732 | sanityCheck :: FibonRunMonad ()
sanityCheck = do
bb <- ask
let bmPath = pathToBench bb
io $ Log.info ("Checking for directory:\n"++bmPath)
bdExists <- io $ doesDirectoryExist bmPath
unless bdExists (throwError $ pathDoesNotExist bmPath)
io $ Log.info ("Checking for cabal file in:\n"++bmPath)
dirContents <... | 732 | sanityCheck = do
bb <- ask
let bmPath = pathToBench bb
io $ Log.info ("Checking for directory:\n"++bmPath)
bdExists <- io $ doesDirectoryExist bmPath
unless bdExists (throwError $ pathDoesNotExist bmPath)
io $ Log.info ("Checking for cabal file in:\n"++bmPath)
dirContents <- io $ getDirectoryContents bmPa... | 700 | false | true | 0 | 15 | 140 | 219 | 102 | 117 | null | null |
bitemyapp/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | cvEnodessh :: (String, String, String)
cvEnodessh =
("node",
Types.cVErrorCodeToRaw CvENODESSH,
"SSH-related node error") | 129 | cvEnodessh :: (String, String, String)
cvEnodessh =
("node",
Types.cVErrorCodeToRaw CvENODESSH,
"SSH-related node error") | 129 | cvEnodessh =
("node",
Types.cVErrorCodeToRaw CvENODESSH,
"SSH-related node error") | 90 | false | true | 0 | 8 | 20 | 41 | 21 | 20 | null | null |
yangsiwei880813/CS644 | src/CodeConstruct.hs | gpl-2.0 | listStringFromDFExpr (Unary _ expr) = listStringFromDFExpr expr | 63 | listStringFromDFExpr (Unary _ expr) = listStringFromDFExpr expr | 63 | listStringFromDFExpr (Unary _ expr) = listStringFromDFExpr expr | 63 | false | false | 0 | 7 | 6 | 20 | 9 | 11 | null | null |
rolph-recto/liquidhaskell | src/Language/Haskell/Liquid/RefType.hs | bsd-3-clause | makeLexRefa es' es = uTop $ Reft (vv, Refa $ PIff (PBexp $ EVar vv) $ pOr rs)
where
rs = makeLexReft [] [] es es'
vv = "vvRec" | 136 | makeLexRefa es' es = uTop $ Reft (vv, Refa $ PIff (PBexp $ EVar vv) $ pOr rs)
where
rs = makeLexReft [] [] es es'
vv = "vvRec" | 136 | makeLexRefa es' es = uTop $ Reft (vv, Refa $ PIff (PBexp $ EVar vv) $ pOr rs)
where
rs = makeLexReft [] [] es es'
vv = "vvRec" | 136 | false | false | 0 | 13 | 38 | 74 | 36 | 38 | null | null |
mcschroeder/ghc | compiler/typecheck/TcType.hs | bsd-3-clause | pprUserTypeCtxt DefaultDeclCtxt = text "a type in a `default' declaration" | 76 | pprUserTypeCtxt DefaultDeclCtxt = text "a type in a `default' declaration" | 76 | pprUserTypeCtxt DefaultDeclCtxt = text "a type in a `default' declaration" | 76 | false | false | 0 | 5 | 11 | 12 | 5 | 7 | null | null |
Jim-Holmstroem/Maskin | src/Lib.hs | gpl-3.0 | unaryApply :: (Bits w, Num w, Ord w) => UnaryOperation w -> w -> w
unaryApply Increment = (+1) | 94 | unaryApply :: (Bits w, Num w, Ord w) => UnaryOperation w -> w -> w
unaryApply Increment = (+1) | 94 | unaryApply Increment = (+1) | 27 | false | true | 0 | 7 | 18 | 50 | 26 | 24 | null | null |
Teaspot-Studio/Urho3D-Haskell | src/Graphics/Urho3D/UI/Window.hs | mit | windowSetResizeBorder :: (Parent Window a, Pointer ptr a, MonadIO m)
=> ptr -- ^ Pointer to 'Window' or ascentor
-> IntRect
-> m ()
windowSetResizeBorder p v = liftIO $ with v $ \v' -> do
let ptr = parentPointer p
[C.exp| void { $(Window* ptr)->SetResizeBorder(*$(IntRect* v')) } |]
-- | Set modal flag. When ... | 461 | windowSetResizeBorder :: (Parent Window a, Pointer ptr a, MonadIO m)
=> ptr -- ^ Pointer to 'Window' or ascentor
-> IntRect
-> m ()
windowSetResizeBorder p v = liftIO $ with v $ \v' -> do
let ptr = parentPointer p
[C.exp| void { $(Window* ptr)->SetResizeBorder(*$(IntRect* v')) } |]
-- | Set modal flag. When ... | 461 | windowSetResizeBorder p v = liftIO $ with v $ \v' -> do
let ptr = parentPointer p
[C.exp| void { $(Window* ptr)->SetResizeBorder(*$(IntRect* v')) } |]
-- | Set modal flag. When the modal flag is set, the focused window needs to be dismissed first to allow other UI elements to gain focus.
-- void SetModal(bool moda... | 323 | false | true | 0 | 12 | 90 | 95 | 49 | 46 | null | null |
pjones/xmonad-test | vendor/xmonad-contrib/XMonad/Actions/OnScreen.hs | bsd-2-clause | -- ^ focus tag i only if workspace with tag i is visible on the old stack
-- | Run any function that modifies the stack on a given screen. This function
-- will also need to know which Screen to focus after the function has been
-- run.
onScreen :: (WindowSet -> WindowSet) -- ^ function to run
-> Focus ... | 671 | onScreen :: (WindowSet -> WindowSet) -- ^ function to run
-> Focus -- ^ what to do with the focus
-> ScreenId -- ^ screen id
-> WindowSet -- ^ current stack
-> WindowSet
onScreen f foc sc st = fromMaybe st $ do
ws <- lookupWorkspa... | 432 | onScreen f foc sc st = fromMaybe st $ do
ws <- lookupWorkspace sc st
let fStack = f $ view ws st
return $ setFocus foc st fStack
-- set focus for new stack | 176 | true | true | 0 | 12 | 226 | 103 | 53 | 50 | null | null |
keera-studios/hsQt | Qtc/Enums/Gui/QLayout.hs | bsd-2-clause | eSetMaximumSize :: SizeConstraint
eSetMaximumSize
= ieSizeConstraint $ 4 | 74 | eSetMaximumSize :: SizeConstraint
eSetMaximumSize
= ieSizeConstraint $ 4 | 74 | eSetMaximumSize
= ieSizeConstraint $ 4 | 40 | false | true | 0 | 6 | 9 | 18 | 8 | 10 | null | null |
juhp/stack | src/Stack/Constants.hs | bsd-3-clause | relDirShare :: Path Rel Dir
relDirShare = $(mkRelDir "share") | 61 | relDirShare :: Path Rel Dir
relDirShare = $(mkRelDir "share") | 61 | relDirShare = $(mkRelDir "share") | 33 | false | true | 0 | 8 | 8 | 29 | 12 | 17 | null | null |
mzini/TcT | source/Tct/Processors.hs | gpl-3.0 | {- |
[on :: strict|weak|both|union /(optional)/] Chooses the TRS from the problem on which the predicate is applied (only applies to predicates on TRSs).
-}
isOutermost :: S.StdProcessor Predicate
isOutermost = isOutermostProcessor | 234 | isOutermost :: S.StdProcessor Predicate
isOutermost = isOutermostProcessor | 74 | isOutermost = isOutermostProcessor | 34 | true | true | 0 | 6 | 34 | 17 | 9 | 8 | null | null |
apanagio/easykenak | slicer2/src/Utils.hs | gpl-3.0 | measureObst :: Double -> TempObstacle -> Double
measureObst he (i, (d1, d2), h) = (he - h/2) / (d1 + d2) | 104 | measureObst :: Double -> TempObstacle -> Double
measureObst he (i, (d1, d2), h) = (he - h/2) / (d1 + d2) | 104 | measureObst he (i, (d1, d2), h) = (he - h/2) / (d1 + d2) | 56 | false | true | 0 | 8 | 20 | 61 | 34 | 27 | null | null |
michalkonecny/aern2 | aern2-real/examples/AERN2/Real/Examples/ClosestPairDist.hs | bsd-3-clause | closestPairDist_run_naive ::
(RealNumber r, CanSinCosSameType r, CanMinMaxSameType r, CanAbsSameType r)
=>
Integer -> r
closestPairDist_run_naive =
closestPairDist_run closestPairDist_naive | 200 | closestPairDist_run_naive ::
(RealNumber r, CanSinCosSameType r, CanMinMaxSameType r, CanAbsSameType r)
=>
Integer -> r
closestPairDist_run_naive =
closestPairDist_run closestPairDist_naive | 200 | closestPairDist_run_naive =
closestPairDist_run closestPairDist_naive | 71 | false | true | 0 | 8 | 28 | 48 | 23 | 25 | null | null |
keizo042/quic-prototype | Network/QUIC/Error.hs | bsd-3-clause | err2int InvalidStreamData = 0x2e | 53 | err2int InvalidStreamData = 0x2e | 53 | err2int InvalidStreamData = 0x2e | 53 | false | false | 0 | 5 | 24 | 9 | 4 | 5 | null | null |
AlexeyRaga/eta | compiler/ETA/Main/DynFlags.hs | bsd-3-clause | wayGeneralFlags _ WayNDP = [] | 34 | wayGeneralFlags _ WayNDP = [] | 34 | wayGeneralFlags _ WayNDP = [] | 34 | false | false | 0 | 5 | 9 | 13 | 6 | 7 | null | null |
enolan/Idris-dev | src/Idris/Reflection.hs | bsd-3-clause | claimTy :: Name -> Raw -> ElabD Name
claimTy n ty = do n' <- getNameFrom n
claim n' ty
return n' | 132 | claimTy :: Name -> Raw -> ElabD Name
claimTy n ty = do n' <- getNameFrom n
claim n' ty
return n' | 132 | claimTy n ty = do n' <- getNameFrom n
claim n' ty
return n' | 95 | false | true | 0 | 9 | 57 | 56 | 23 | 33 | null | null |
bruno-cadorette/TheLambdaReactor | src/Backend/ClientSideGeneration.hs | mit | myAlteration :: ETypeDef -> ETypeDef
myAlteration = recAlterType $ \t -> case t of
ETyCon (ETCon "Id") -> ETyCon (ETCon "String")
-- Do not use V2 with something other than a float if you plan on sending it to Elm
ETyApp (ETyCon (ETCon "V2")) _ -> ETyCon (ETCon "Vec2")
_ ... | 453 | myAlteration :: ETypeDef -> ETypeDef
myAlteration = recAlterType $ \t -> case t of
ETyCon (ETCon "Id") -> ETyCon (ETCon "String")
-- Do not use V2 with something other than a float if you plan on sending it to Elm
ETyApp (ETyCon (ETCon "V2")) _ -> ETyCon (ETCon "Vec2")
_ ... | 453 | myAlteration = recAlterType $ \t -> case t of
ETyCon (ETCon "Id") -> ETyCon (ETCon "String")
-- Do not use V2 with something other than a float if you plan on sending it to Elm
ETyApp (ETyCon (ETCon "V2")) _ -> ETyCon (ETCon "Vec2")
_ -> t
--I don't thing there is a bet... | 416 | false | true | 0 | 14 | 124 | 93 | 47 | 46 | null | null |
sol/pandoc | src/Text/Pandoc/Writers/OpenDocument.hs | gpl-2.0 | addTextStyle :: Doc -> State WriterState ()
addTextStyle i = modify $ \s -> s { stTextStyles = i : stTextStyles s } | 115 | addTextStyle :: Doc -> State WriterState ()
addTextStyle i = modify $ \s -> s { stTextStyles = i : stTextStyles s } | 115 | addTextStyle i = modify $ \s -> s { stTextStyles = i : stTextStyles s } | 71 | false | true | 0 | 10 | 22 | 49 | 25 | 24 | null | null |
Proclivis/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxSTC_CACHE_PAGE :: Int
wxSTC_CACHE_PAGE = 2 | 44 | wxSTC_CACHE_PAGE :: Int
wxSTC_CACHE_PAGE = 2 | 44 | wxSTC_CACHE_PAGE = 2 | 20 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
z0isch/advent-of-code | src/Day22.hs | bsd-3-clause | spellEffect Recharge = do
gs <- get
es <- use $ player.effects
player.effects .= es ++ [replicate 5 Recharging] | 117 | spellEffect Recharge = do
gs <- get
es <- use $ player.effects
player.effects .= es ++ [replicate 5 Recharging] | 117 | spellEffect Recharge = do
gs <- get
es <- use $ player.effects
player.effects .= es ++ [replicate 5 Recharging] | 117 | false | false | 0 | 9 | 24 | 50 | 23 | 27 | null | null |
sdiehl/ghc | includes/CodeGen.Platform.hs | bsd-3-clause | callerSaves (DoubleReg 3) = True | 36 | callerSaves (DoubleReg 3) = True | 36 | callerSaves (DoubleReg 3) = True | 36 | false | false | 0 | 7 | 8 | 15 | 7 | 8 | null | null |
timmytofu/envy | src/System/Envy.hs | bsd-3-clause | ------------------------------------------------------------------------------
-- | Infix environment variable getter
getE
:: forall a . (Typeable a, Var a)
=> String
-> Parser a
getE k = do
result <- liftIO (lookupEnv k)
case result of
Nothing -> throwError $ "Variable not found for: " ++ k
Just dv -... | 618 | getE
:: forall a . (Typeable a, Var a)
=> String
-> Parser a
getE k = do
result <- liftIO (lookupEnv k)
case result of
Nothing -> throwError $ "Variable not found for: " ++ k
Just dv ->
case fromVar dv :: Maybe a of
Nothing -> throwError $ "Parse failure: field <name> is not of type: "
... | 500 | getE k = do
result <- liftIO (lookupEnv k)
case result of
Nothing -> throwError $ "Variable not found for: " ++ k
Just dv ->
case fromVar dv :: Maybe a of
Nothing -> throwError $ "Parse failure: field <name> is not of type: "
++ show (typeOf dv)
Just x -> return x
... | 433 | true | true | 0 | 17 | 144 | 144 | 69 | 75 | null | null |
Bugfry/exercism | exercism/haskell/simple-linked-list/src/LinkedList.hs | mit | toList (Cons n ls) = n : toList ls | 34 | toList (Cons n ls) = n : toList ls | 34 | toList (Cons n ls) = n : toList ls | 34 | false | false | 2 | 6 | 8 | 26 | 11 | 15 | null | null |
selbert/haskell-test | src/Main.hs | bsd-2-clause | io :: IO a -> Bus a
io = liftIO | 31 | io :: IO a -> Bus a
io = liftIO | 31 | io = liftIO | 11 | false | true | 0 | 7 | 9 | 27 | 11 | 16 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.