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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fredokun/piexplorer | src/Parser.hs | gpl-3.0 | parens :: Parser a -> Parser a
parens = Tok.parens lexer | 56 | parens :: Parser a -> Parser a
parens = Tok.parens lexer | 56 | parens = Tok.parens lexer | 25 | false | true | 0 | 7 | 10 | 32 | 13 | 19 | null | null |
awbraunstein/you-ate-my-fractal | src/QTree.hs | mit | leftN :: QTree a -> Maybe (Neighbor a)
leftN = neighbor left | 60 | leftN :: QTree a -> Maybe (Neighbor a)
leftN = neighbor left | 60 | leftN = neighbor left | 21 | false | true | 0 | 9 | 11 | 36 | 15 | 21 | null | null |
channable/icepeak | server/integration-tests/generate_test_token.hs | bsd-3-clause | testSecret :: JWT.Signer
testSecret = JWT.HMACSecret "foo" | 58 | testSecret :: JWT.Signer
testSecret = JWT.HMACSecret "foo" | 58 | testSecret = JWT.HMACSecret "foo" | 33 | false | true | 0 | 7 | 6 | 25 | 10 | 15 | null | null |
AlexeyRaga/eta | compiler/ETA/Prelude/PrelNames.hs | bsd-3-clause | fractionalClassKeys :: [Unique]
fractionalClassKeys =
[ fractionalClassKey
, floatingClassKey
, realFracClassKey
, realFloatClassKey
] | 174 | fractionalClassKeys :: [Unique]
fractionalClassKeys =
[ fractionalClassKey
, floatingClassKey
, realFracClassKey
, realFloatClassKey
] | 174 | fractionalClassKeys =
[ fractionalClassKey
, floatingClassKey
, realFracClassKey
, realFloatClassKey
] | 142 | false | true | 0 | 5 | 53 | 26 | 16 | 10 | null | null |
jwiegley/ghc-release | libraries/Cabal/cabal/Distribution/Simple/BuildTarget.hs | gpl-3.0 | matchPlus (InexactMatch _ _ ) b@(ExactMatch _ _ ) = b | 60 | matchPlus (InexactMatch _ _ ) b@(ExactMatch _ _ ) = b | 60 | matchPlus (InexactMatch _ _ ) b@(ExactMatch _ _ ) = b | 60 | false | false | 0 | 8 | 17 | 30 | 15 | 15 | null | null |
contivero/hasmin | src/Hasmin/Parser/TransformFunction.hs | bsd-3-clause | skew :: Parser TransformFunction
skew = functionParser $ do
a <- angle
ma <- optional (comma *> angle)
pure $ Skew a ma
-- | Assumes "translate(" has been already parsed | 183 | skew :: Parser TransformFunction
skew = functionParser $ do
a <- angle
ma <- optional (comma *> angle)
pure $ Skew a ma
-- | Assumes "translate(" has been already parsed | 183 | skew = functionParser $ do
a <- angle
ma <- optional (comma *> angle)
pure $ Skew a ma
-- | Assumes "translate(" has been already parsed | 150 | false | true | 0 | 12 | 44 | 61 | 27 | 34 | null | null |
andreasabel/helf | src/Abstract.hs | mit | isGlobalIdent _ = True | 28 | isGlobalIdent _ = True | 28 | isGlobalIdent _ = True | 28 | false | false | 0 | 5 | 9 | 9 | 4 | 5 | null | null |
Happy0/snowdrift | Handler/User.hs | agpl-3.0 | getUserBalanceR' :: UserId -> Handler Html
getUserBalanceR' user_id = do
user <- runYDB $ get404 user_id
-- TODO: restrict viewing balance to user or snowdrift admins (logged) before moving to real money
-- when (user_id /= viewer_id) $ permissionDenied "You can only view your own account balance history."... | 1,722 | getUserBalanceR' :: UserId -> Handler Html
getUserBalanceR' user_id = do
user <- runYDB $ get404 user_id
-- TODO: restrict viewing balance to user or snowdrift admins (logged) before moving to real money
-- when (user_id /= viewer_id) $ permissionDenied "You can only view your own account balance history."... | 1,722 | getUserBalanceR' user_id = do
user <- runYDB $ get404 user_id
-- TODO: restrict viewing balance to user or snowdrift admins (logged) before moving to real money
-- when (user_id /= viewer_id) $ permissionDenied "You can only view your own account balance history."
Just account <- runDB $ get $ userAcc... | 1,679 | false | true | 0 | 26 | 473 | 490 | 234 | 256 | null | null |
olsner/ghc | compiler/deSugar/Coverage.hs | bsd-3-clause | hpcInitCode this_mod (HpcInfo tickCount hashNo)
= vcat
[ text "static void hpc_init_" <> ppr this_mod
<> text "(void) __attribute__((constructor));"
, text "static void hpc_init_" <> ppr this_mod <> text "(void)"
, braces (vcat [
text "extern StgWord64 " <> tickboxes <>
text... | 1,062 | hpcInitCode this_mod (HpcInfo tickCount hashNo)
= vcat
[ text "static void hpc_init_" <> ppr this_mod
<> text "(void) __attribute__((constructor));"
, text "static void hpc_init_" <> ppr this_mod <> text "(void)"
, braces (vcat [
text "extern StgWord64 " <> tickboxes <>
text... | 1,062 | hpcInitCode this_mod (HpcInfo tickCount hashNo)
= vcat
[ text "static void hpc_init_" <> ppr this_mod
<> text "(void) __attribute__((constructor));"
, text "static void hpc_init_" <> ppr this_mod <> text "(void)"
, braces (vcat [
text "extern StgWord64 " <> tickboxes <>
text... | 1,062 | false | false | 6 | 19 | 358 | 282 | 137 | 145 | null | null |
UBMLtonGroup/timberc | src/Termred.hs | bsd-3-clause | redRat FloatPlus a b = ELit (lRat (a + b)) | 53 | redRat FloatPlus a b = ELit (lRat (a + b)) | 53 | redRat FloatPlus a b = ELit (lRat (a + b)) | 53 | false | false | 0 | 9 | 20 | 31 | 14 | 17 | null | null |
thalerjonathan/phd | thesis/code/concurrent/sugarscape/SugarScapeSTMTVar/src/Discrete.hs | gpl-3.0 | leftDelta :: Discrete2dCoord
leftDelta = (-1, 0) | 57 | leftDelta :: Discrete2dCoord
leftDelta = (-1, 0) | 57 | leftDelta = (-1, 0) | 28 | false | true | 0 | 6 | 15 | 19 | 11 | 8 | null | null |
ghc-android/ghc | testsuite/tests/ghci/should_run/ghcirun004.hs | bsd-3-clause | 4642 = 4641 | 11 | 4642 = 4641 | 11 | 4642 = 4641 | 11 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
brendanhay/gogol | gogol-compute/gen/Network/Google/Resource/Compute/NetworkEndpointGroups/ListNetworkEndpoints.hs | mpl-2.0 | -- | The maximum number of results per page that should be returned. If the
-- number of available results is larger than \`maxResults\`, Compute
-- Engine returns a \`nextPageToken\` that can be used to get the next page
-- of results in subsequent list requests. Acceptable values are \`0\` to
-- \`500\`, inclusive. (... | 515 | neglneMaxResults :: Lens' NetworkEndpointGroupsListNetworkEndpoints' Word32
neglneMaxResults
= lens _neglneMaxResults
(\ s a -> s{_neglneMaxResults = a})
. _Coerce | 177 | neglneMaxResults
= lens _neglneMaxResults
(\ s a -> s{_neglneMaxResults = a})
. _Coerce | 101 | true | true | 0 | 10 | 87 | 50 | 28 | 22 | null | null |
srid/spas | src/Main.hs | mit | checkCredsEnv :: String -> String -> ByteString -> ByteString -> Bool
checkCredsEnv username password user pass =
username == (cs user) && password == (cs pass) | 162 | checkCredsEnv :: String -> String -> ByteString -> ByteString -> Bool
checkCredsEnv username password user pass =
username == (cs user) && password == (cs pass) | 162 | checkCredsEnv username password user pass =
username == (cs user) && password == (cs pass) | 92 | false | true | 3 | 10 | 27 | 67 | 32 | 35 | null | null |
atsukotakahashi/wi | src/library/Yi/Tag.hs | gpl-2.0 | readCTags :: String -> Map Tag [(FilePath, Int)]
readCTags =
fromListWith (++) . mapMaybe (parseTagLine . words) . lines
where parseTagLine (tag:tagfile:lineno:_) =
-- remove ctag control lines
if "!_TAG_" `isPrefixOf` tag then Nothing
else Just (mkTag tag, [(tagfile, f... | 425 | readCTags :: String -> Map Tag [(FilePath, Int)]
readCTags =
fromListWith (++) . mapMaybe (parseTagLine . words) . lines
where parseTagLine (tag:tagfile:lineno:_) =
-- remove ctag control lines
if "!_TAG_" `isPrefixOf` tag then Nothing
else Just (mkTag tag, [(tagfile, f... | 425 | readCTags =
fromListWith (++) . mapMaybe (parseTagLine . words) . lines
where parseTagLine (tag:tagfile:lineno:_) =
-- remove ctag control lines
if "!_TAG_" `isPrefixOf` tag then Nothing
else Just (mkTag tag, [(tagfile, fst . head . reads $ lineno)])
parseTagL... | 376 | false | true | 0 | 12 | 120 | 141 | 75 | 66 | null | null |
squest/Zenx-trainer-training | haskell/beta.hs | epl-1.0 | fact 0 = 1 | 10 | fact 0 = 1 | 10 | fact 0 = 1 | 10 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
uduki/hsQt | Qtc/Gui/QAbstractItemDelegate.hs | bsd-2-clause | qAbstractItemDelegate_deleteLater :: QAbstractItemDelegate a -> IO ()
qAbstractItemDelegate_deleteLater x0
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QAbstractItemDelegate_deleteLater cobj_x0 | 191 | qAbstractItemDelegate_deleteLater :: QAbstractItemDelegate a -> IO ()
qAbstractItemDelegate_deleteLater x0
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QAbstractItemDelegate_deleteLater cobj_x0 | 191 | qAbstractItemDelegate_deleteLater x0
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QAbstractItemDelegate_deleteLater cobj_x0 | 121 | false | true | 2 | 7 | 22 | 42 | 19 | 23 | null | null |
josejuan/jj-yesod-translatable | Training/JoseJuan/Yesod/Translatable/Internal/AppCache.hs | mit | translatableSetCached :: T.Text -> T.Text -> T.Text -> T.Text -> IO ()
translatableSetCached lang term uid translation =
do
tvCache <- readIORef translatableGlobalCache
atomically $
do
cache <- readTVar tvCache
let cache' = M.insert (TranslatableCacheKey lang term uid) translation cache
... | 352 | translatableSetCached :: T.Text -> T.Text -> T.Text -> T.Text -> IO ()
translatableSetCached lang term uid translation =
do
tvCache <- readIORef translatableGlobalCache
atomically $
do
cache <- readTVar tvCache
let cache' = M.insert (TranslatableCacheKey lang term uid) translation cache
... | 352 | translatableSetCached lang term uid translation =
do
tvCache <- readIORef translatableGlobalCache
atomically $
do
cache <- readTVar tvCache
let cache' = M.insert (TranslatableCacheKey lang term uid) translation cache
writeTVar tvCache cache' | 281 | false | true | 0 | 15 | 82 | 112 | 51 | 61 | null | null |
aelve/guide | back/tests/WebSpec.hs | bsd-3-clause | parseCategoryURL :: String -> WD (String, String)
parseCategoryURL url = do
case T.stripPrefix "/haskell/" (toText url) of
Nothing -> expectationFailure $
printf "%s doesn't start with /haskell/" (show url)
Just u -> do
let (slug, catId) = T.breakOnEnd "-" u
slug `shouldSatisfy` (... | 432 | parseCategoryURL :: String -> WD (String, String)
parseCategoryURL url = do
case T.stripPrefix "/haskell/" (toText url) of
Nothing -> expectationFailure $
printf "%s doesn't start with /haskell/" (show url)
Just u -> do
let (slug, catId) = T.breakOnEnd "-" u
slug `shouldSatisfy` (... | 432 | parseCategoryURL url = do
case T.stripPrefix "/haskell/" (toText url) of
Nothing -> expectationFailure $
printf "%s doesn't start with /haskell/" (show url)
Just u -> do
let (slug, catId) = T.breakOnEnd "-" u
slug `shouldSatisfy` ("not null", not . T.null)
T.last slug `shoul... | 382 | false | true | 0 | 19 | 107 | 167 | 80 | 87 | null | null |
keithodulaigh/Hets | OMDoc/OMDocInterface.hs | gpl-2.0 | mkOMSimpleVar :: XmlString -> OMSimpleVariable
mkOMSimpleVar = OMV | 66 | mkOMSimpleVar :: XmlString -> OMSimpleVariable
mkOMSimpleVar = OMV | 66 | mkOMSimpleVar = OMV | 19 | false | true | 0 | 7 | 7 | 22 | 9 | 13 | null | null |
kazu-yamamoto/wai | wai-extra/Network/Wai/Middleware/RequestLogger.hs | mit | logStdout :: Middleware
logStdout = unsafePerformIO $ mkRequestLogger def { outputFormat = Apache FromSocket } | 110 | logStdout :: Middleware
logStdout = unsafePerformIO $ mkRequestLogger def { outputFormat = Apache FromSocket } | 110 | logStdout = unsafePerformIO $ mkRequestLogger def { outputFormat = Apache FromSocket } | 86 | false | true | 0 | 9 | 14 | 29 | 15 | 14 | null | null |
drhodes/jade2hdl | src/Jade/TopLevel.hs | bsd-3-clause | makePortWire :: Port -> J Wire
makePortWire (Port (Coord3 x y r) sig) = "TopLevel.makePortWire" <? do
nb "create a wire of length zero, that has the signal from the port"
return $ Wire (Coord5 x y r 0 0) sig | 212 | makePortWire :: Port -> J Wire
makePortWire (Port (Coord3 x y r) sig) = "TopLevel.makePortWire" <? do
nb "create a wire of length zero, that has the signal from the port"
return $ Wire (Coord5 x y r 0 0) sig | 212 | makePortWire (Port (Coord3 x y r) sig) = "TopLevel.makePortWire" <? do
nb "create a wire of length zero, that has the signal from the port"
return $ Wire (Coord5 x y r 0 0) sig | 181 | false | true | 0 | 12 | 45 | 80 | 36 | 44 | null | null |
ryantrinkle/ghcjs | src/Gen2/Prim.hs | mit | genPrim _ _ WriteByteArrayOp_Int [] [a,i,e] = PrimInline [j| `a`.i3[`i`] = `e`; |] | 82 | genPrim _ _ WriteByteArrayOp_Int [] [a,i,e] = PrimInline [j| `a`.i3[`i`] = `e`; |] | 82 | genPrim _ _ WriteByteArrayOp_Int [] [a,i,e] = PrimInline [j| `a`.i3[`i`] = `e`; |] | 82 | false | false | 3 | 6 | 12 | 36 | 20 | 16 | null | null |
facebookincubator/duckling | Duckling/Ordinal/EL/Corpus.hs | bsd-3-clause | allExamples :: [Example]
allExamples = concat
[ examples (OrdinalData 1)
[ "πρώτος"
, "1ος"
, "1ου"
, "πρώτων"
]
, examples (OrdinalData 2)
[ "δεύτερος"
, "2ου"
, "δευτέρου"
]
, examples (OrdinalDa... | 1,133 | allExamples :: [Example]
allExamples = concat
[ examples (OrdinalData 1)
[ "πρώτος"
, "1ος"
, "1ου"
, "πρώτων"
]
, examples (OrdinalData 2)
[ "δεύτερος"
, "2ου"
, "δευτέρου"
]
, examples (OrdinalDa... | 1,133 | allExamples = concat
[ examples (OrdinalData 1)
[ "πρώτος"
, "1ος"
, "1ου"
, "πρώτων"
]
, examples (OrdinalData 2)
[ "δεύτερος"
, "2ου"
, "δευτέρου"
]
, examples (OrdinalData 3)
[ "τρί... | 1,108 | false | true | 0 | 8 | 583 | 232 | 129 | 103 | null | null |
pbrisbin/hgdata | src/Network/Google.hs | mit | appendBody ::
LBS8.ByteString -- ^ The data for the body.
-> Request -- ^ The request.
-> Request -- ^ The request with the body appended.
appendBody bytes request =
request {
requestBody = RequestBodyLBS bytes
} | 248 | appendBody ::
LBS8.ByteString -- ^ The data for the body.
-> Request -- ^ The request.
-> Request
appendBody bytes request =
request {
requestBody = RequestBodyLBS bytes
} | 198 | appendBody bytes request =
request {
requestBody = RequestBodyLBS bytes
} | 81 | true | true | 0 | 8 | 72 | 42 | 22 | 20 | null | null |
imh/plover | src/Language/Plover/Reduce.hs | mit | unifyT _ bs Void Void = return bs | 33 | unifyT _ bs Void Void = return bs | 33 | unifyT _ bs Void Void = return bs | 33 | false | false | 2 | 5 | 7 | 25 | 8 | 17 | null | null |
tzakian/super-eager-evaluation | Tests.hs | mit | test5 =
(TApp 1
(TApp 0
(TLam 0 [("x", 0), ("y", 0), ("z", 0)]
(TOp 1 Plus
(TVar "x" 0)
(TOp 2 Plus
(TVar "y" 0)
(TVar "z" 0))))
[TVar "x" 1, TVar "x" 1])
[TVar "g" 1]) | 209 | test5 =
(TApp 1
(TApp 0
(TLam 0 [("x", 0), ("y", 0), ("z", 0)]
(TOp 1 Plus
(TVar "x" 0)
(TOp 2 Plus
(TVar "y" 0)
(TVar "z" 0))))
[TVar "x" 1, TVar "x" 1])
[TVar "g" 1]) | 209 | test5 =
(TApp 1
(TApp 0
(TLam 0 [("x", 0), ("y", 0), ("z", 0)]
(TOp 1 Plus
(TVar "x" 0)
(TOp 2 Plus
(TVar "y" 0)
(TVar "z" 0))))
[TVar "x" 1, TVar "x" 1])
[TVar "g" 1]) | 209 | false | false | 0 | 16 | 78 | 135 | 72 | 63 | null | null |
phadej/stack | src/Stack/ConfigCmd.hs | bsd-3-clause | cfgCmdSetName :: String
cfgCmdSetName = "set" | 45 | cfgCmdSetName :: String
cfgCmdSetName = "set" | 45 | cfgCmdSetName = "set" | 21 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
phischu/fragnix | tests/packages/scotty/Data.Aeson.Parser.UnescapePure.hs | bsd-3-clause | -- '8'
decodeHex 57 = 9 | 24 | decodeHex 57 = 9 | 17 | decodeHex 57 = 9 | 17 | true | false | 0 | 5 | 6 | 10 | 5 | 5 | null | null |
socrata-platform/ssync | src/main/haskell/SSync/SignatureComputer.hs | apache-2.0 | nameForHash :: HashAlgorithm -> Text
nameForHash = name | 55 | nameForHash :: HashAlgorithm -> Text
nameForHash = name | 55 | nameForHash = name | 18 | false | true | 0 | 5 | 7 | 15 | 8 | 7 | null | null |
atodorov/bdcs | src/BDCS/Export/Utils.hs | lgpl-2.1 | -- | Run filesystem hacks needed to make a directory tree bootable. Any exporter that produces a
-- finished image should call this function. Otherwise, it is not generally useful and should be
-- avoided. The exact hacks required is likely to change over time.
--
-- Any exceptions from 'Control.Exception' will be c... | 631 | runHacks :: (MonadBaseControl IO m, MonadError String m, MonadLoggerIO m) => FilePath -> m ()
runHacks exportPath = runHacks' exportPath `CEL.catch` \e -> throwError $ show (e :: CEL.IOException) | 195 | runHacks exportPath = runHacks' exportPath `CEL.catch` \e -> throwError $ show (e :: CEL.IOException) | 101 | true | true | 0 | 10 | 100 | 89 | 48 | 41 | null | null |
triplepointfive/hogldev | common/Hogldev/RandomTexture.hs | mit | textureLoad :: GLint -> IO RandomTexture
textureLoad size = do
texture <- genObjectName
textureBinding Texture2D $= Just texture
textureData <- replicateM (fromIntegral textureSize)
(randomRIO (0, 1)) :: IO [GLfloat]
withArray textureData $ \ptr ->
texImage2D Texture2D NoProxy 0 RGB32F... | 676 | textureLoad :: GLint -> IO RandomTexture
textureLoad size = do
texture <- genObjectName
textureBinding Texture2D $= Just texture
textureData <- replicateM (fromIntegral textureSize)
(randomRIO (0, 1)) :: IO [GLfloat]
withArray textureData $ \ptr ->
texImage2D Texture2D NoProxy 0 RGB32F... | 676 | textureLoad size = do
texture <- genObjectName
textureBinding Texture2D $= Just texture
textureData <- replicateM (fromIntegral textureSize)
(randomRIO (0, 1)) :: IO [GLfloat]
withArray textureData $ \ptr ->
texImage2D Texture2D NoProxy 0 RGB32F (TextureSize2D size size) 0
... | 635 | false | true | 0 | 11 | 155 | 224 | 108 | 116 | null | null |
vTurbine/ghc | compiler/hsSyn/HsExpr.hs | bsd-3-clause | hsExprNeedsParens (HsRnBracketOut {}) = False | 45 | hsExprNeedsParens (HsRnBracketOut {}) = False | 45 | hsExprNeedsParens (HsRnBracketOut {}) = False | 45 | false | false | 0 | 6 | 4 | 17 | 8 | 9 | null | null |
ucsd-progsys/nanomaly | src/NanoML/Classify.hs | bsd-3-clause | thas_lit_float_ctx :: Feature
thas_lit_float_ctx = ( mkContextLabels "Has-Lit-Float", mkContextFeatures thas_lit_float ) | 120 | thas_lit_float_ctx :: Feature
thas_lit_float_ctx = ( mkContextLabels "Has-Lit-Float", mkContextFeatures thas_lit_float ) | 120 | thas_lit_float_ctx = ( mkContextLabels "Has-Lit-Float", mkContextFeatures thas_lit_float ) | 90 | false | true | 0 | 7 | 10 | 30 | 13 | 17 | null | null |
llvm-hs/llvm-hs-pretty | src/LLVM/Pretty/Typed.hs | mit | getElementType _ = error $ "Expecting pointer type. (Malformed AST)" | 68 | getElementType _ = error $ "Expecting pointer type. (Malformed AST)" | 68 | getElementType _ = error $ "Expecting pointer type. (Malformed AST)" | 68 | false | false | 0 | 5 | 9 | 14 | 6 | 8 | null | null |
unisonweb/platform | parser-typechecker/tests/Unison/Test/MCode.hs | mit | numbering :: RefNums
numbering = RN (builtinTypeNumbering Map.!) builtins | 73 | numbering :: RefNums
numbering = RN (builtinTypeNumbering Map.!) builtins | 73 | numbering = RN (builtinTypeNumbering Map.!) builtins | 52 | false | true | 0 | 6 | 8 | 22 | 12 | 10 | null | null |
vTurbine/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | typeNatAddTyFamNameKey = mkPreludeTyConUnique 166 | 52 | typeNatAddTyFamNameKey = mkPreludeTyConUnique 166 | 52 | typeNatAddTyFamNameKey = mkPreludeTyConUnique 166 | 52 | false | false | 0 | 5 | 6 | 9 | 4 | 5 | null | null |
tjakway/ghcjvm | compiler/prelude/PrelNames.hs | bsd-3-clause | monadFixClassKey :: Unique
monadFixClassKey = mkPreludeClassUnique 28 | 76 | monadFixClassKey :: Unique
monadFixClassKey = mkPreludeClassUnique 28 | 76 | monadFixClassKey = mkPreludeClassUnique 28 | 49 | false | true | 0 | 5 | 13 | 14 | 7 | 7 | null | null |
ezyang/ghc | testsuite/tests/simplCore/should_run/T13429a.hs | bsd-3-clause | appendTree4 (Single x) a b c d xs =
x <| a <| b <| c <| d <| xs | 67 | appendTree4 (Single x) a b c d xs =
x <| a <| b <| c <| d <| xs | 67 | appendTree4 (Single x) a b c d xs =
x <| a <| b <| c <| d <| xs | 67 | false | false | 8 | 6 | 23 | 56 | 26 | 30 | null | null |
kojiromike/Idris-dev | src/Idris/AbsSyntaxTree.hs | bsd-3-clause | declared (PDSL n _) = [n] | 25 | declared (PDSL n _) = [n] | 25 | declared (PDSL n _) = [n] | 25 | false | false | 0 | 6 | 5 | 21 | 10 | 11 | null | null |
rjohnsondev/haskellshop | src/Basket.hs | bsd-2-clause | deSerializePVOIds :: DT.Text -> S.Set Int
deSerializePVOIds pvoss =
textArrayToSet (DT.splitOn "," pvoss)
where
textArrayToSet ta = S.fromList $ filter (> 0) $ map textToInt ta | 196 | deSerializePVOIds :: DT.Text -> S.Set Int
deSerializePVOIds pvoss =
textArrayToSet (DT.splitOn "," pvoss)
where
textArrayToSet ta = S.fromList $ filter (> 0) $ map textToInt ta | 196 | deSerializePVOIds pvoss =
textArrayToSet (DT.splitOn "," pvoss)
where
textArrayToSet ta = S.fromList $ filter (> 0) $ map textToInt ta | 154 | false | true | 0 | 10 | 45 | 70 | 34 | 36 | null | null |
xcv-/hfind | src/System/HFind/Expr/Parser.hs | mit | comparator :: Parser Op
comparator = (reservedOp "==" $> OpEQ)
<|> (reservedOp "<=" $> OpLE)
<|> (reservedOp ">=" $> OpGE)
<|> (reservedOp "<" $> OpLT)
<|> (reservedOp ">" $> OpGT)
<?> "comparison operator" | 253 | comparator :: Parser Op
comparator = (reservedOp "==" $> OpEQ)
<|> (reservedOp "<=" $> OpLE)
<|> (reservedOp ">=" $> OpGE)
<|> (reservedOp "<" $> OpLT)
<|> (reservedOp ">" $> OpGT)
<?> "comparison operator" | 253 | comparator = (reservedOp "==" $> OpEQ)
<|> (reservedOp "<=" $> OpLE)
<|> (reservedOp ">=" $> OpGE)
<|> (reservedOp "<" $> OpLT)
<|> (reservedOp ">" $> OpGT)
<?> "comparison operator" | 229 | false | true | 0 | 12 | 79 | 84 | 42 | 42 | null | null |
michaelficarra/purescript | src/Language/PureScript/TypeChecker/Types.hs | mit | check' (ArrayLiteral vals) t@(TypeApp a ty) = do
unifyTypes a tyArray
array <- ArrayLiteral <$> forM vals (`check` ty)
return $ TypedValue True array t | 157 | check' (ArrayLiteral vals) t@(TypeApp a ty) = do
unifyTypes a tyArray
array <- ArrayLiteral <$> forM vals (`check` ty)
return $ TypedValue True array t | 157 | check' (ArrayLiteral vals) t@(TypeApp a ty) = do
unifyTypes a tyArray
array <- ArrayLiteral <$> forM vals (`check` ty)
return $ TypedValue True array t | 157 | false | false | 0 | 10 | 30 | 72 | 35 | 37 | null | null |
ajnsit/glambda | src/Language/Glambda/Lex.hs | bsd-3-clause | -- | Lex either one token or some whitespace
lexer1_ws :: Lexer (Maybe LToken)
lexer1_ws
= (Nothing <$ whitespace)
<|>
(Just <$> lexer1) | 146 | lexer1_ws :: Lexer (Maybe LToken)
lexer1_ws
= (Nothing <$ whitespace)
<|>
(Just <$> lexer1) | 101 | lexer1_ws
= (Nothing <$ whitespace)
<|>
(Just <$> lexer1) | 67 | true | true | 5 | 7 | 32 | 49 | 23 | 26 | null | null |
xkollar/handy-haskell | other/pt-2012-03/fasttree.hs | gpl-3.0 | treeFold :: a -> (b -> a -> a -> a) -> BinTree b -> a
treeFold v _ Empty = v | 76 | treeFold :: a -> (b -> a -> a -> a) -> BinTree b -> a
treeFold v _ Empty = v | 76 | treeFold v _ Empty = v | 22 | false | true | 0 | 11 | 21 | 54 | 25 | 29 | null | null |
dmjio/aeson | src/Data/Aeson/Encoding/Internal.hs | bsd-3-clause | -------------------------------------------------------------------------------
-- Value
-------------------------------------------------------------------------------
value :: Value -> Encoding
value = Encoding . EB.encodeToBuilder | 234 | value :: Value -> Encoding
value = Encoding . EB.encodeToBuilder | 64 | value = Encoding . EB.encodeToBuilder | 37 | true | true | 0 | 7 | 14 | 31 | 15 | 16 | null | null |
kebertx/Monadgrab | src/SDL.hs | mit | main :: IO ()
main = SDL.withInit [SDL.InitEverything] $ do
vs <- SDL.setVideoMode scrW scrH 32 []
SDL.setCaption "Moneygrab" "Monadgrab"
clearSurface vs
eventLoop | 199 | main :: IO ()
main = SDL.withInit [SDL.InitEverything] $ do
vs <- SDL.setVideoMode scrW scrH 32 []
SDL.setCaption "Moneygrab" "Monadgrab"
clearSurface vs
eventLoop | 199 | main = SDL.withInit [SDL.InitEverything] $ do
vs <- SDL.setVideoMode scrW scrH 32 []
SDL.setCaption "Moneygrab" "Monadgrab"
clearSurface vs
eventLoop | 185 | false | true | 0 | 10 | 58 | 69 | 31 | 38 | null | null |
diorge/challenge-attack-rooks | src/Rooks.hs | mit | highestRooks' :: Board -> Int
highestRooks' = (+1) . vecmax . Vec.map highestRooks' . derivedStates
where vecmax v | Vec.null v = (-1)
| otherwise = Vec.maximum v | 186 | highestRooks' :: Board -> Int
highestRooks' = (+1) . vecmax . Vec.map highestRooks' . derivedStates
where vecmax v | Vec.null v = (-1)
| otherwise = Vec.maximum v | 186 | highestRooks' = (+1) . vecmax . Vec.map highestRooks' . derivedStates
where vecmax v | Vec.null v = (-1)
| otherwise = Vec.maximum v | 156 | false | true | 0 | 11 | 51 | 76 | 37 | 39 | null | null |
jm-g/global-variables | test/src/Data/Global/Registry/Test.hs | bsd-3-clause | tests :: Test
tests = testGroup "Data.Global.Registry"
[ testProperty "lookupIO is idempotent" prop_idempotent_lookupIO
, testProperty "lookupIO is safe" prop_safe_lookupIO
, testGroup "IORef"
[ testProperty "declareIORef is pure" $ prop_pure_declare declareIORef
-- These tests are redund... | 2,481 | tests :: Test
tests = testGroup "Data.Global.Registry"
[ testProperty "lookupIO is idempotent" prop_idempotent_lookupIO
, testProperty "lookupIO is safe" prop_safe_lookupIO
, testGroup "IORef"
[ testProperty "declareIORef is pure" $ prop_pure_declare declareIORef
-- These tests are redund... | 2,481 | tests = testGroup "Data.Global.Registry"
[ testProperty "lookupIO is idempotent" prop_idempotent_lookupIO
, testProperty "lookupIO is safe" prop_safe_lookupIO
, testGroup "IORef"
[ testProperty "declareIORef is pure" $ prop_pure_declare declareIORef
-- These tests are redundant, but they p... | 2,466 | false | true | 0 | 15 | 526 | 325 | 152 | 173 | null | null |
robx/puzzle-draw | src/Parse/Component.hs | mit | parseFullGrid :: Object -> Parser (Component a)
parseFullGrid o = do
g <- o .: "grid"
r <- parseReplacements o
let pdec = parseDecorationWithReplacements r
(ns, cs, es) <- Util.parseEdgeGridWith pdec pdec pdec g
return $ FullGrid ns cs es | 248 | parseFullGrid :: Object -> Parser (Component a)
parseFullGrid o = do
g <- o .: "grid"
r <- parseReplacements o
let pdec = parseDecorationWithReplacements r
(ns, cs, es) <- Util.parseEdgeGridWith pdec pdec pdec g
return $ FullGrid ns cs es | 248 | parseFullGrid o = do
g <- o .: "grid"
r <- parseReplacements o
let pdec = parseDecorationWithReplacements r
(ns, cs, es) <- Util.parseEdgeGridWith pdec pdec pdec g
return $ FullGrid ns cs es | 200 | false | true | 0 | 11 | 49 | 106 | 48 | 58 | null | null |
geophf/1HaskellADay | exercises/HAD/Y2021/M04/D05/Solution.hs | mit | {--
>>> vtake 50 (mkVect [1,2,3])
Nothing
>>> vtake 1 (mkVect [1,2,3])
Just (Vect {sz = 1, vals = [1]})
--}
-- What does this function return?
hey = mapM print (mkVect [1,2,3]) | 179 | hey = mapM print (mkVect [1,2,3]) | 33 | hey = mapM print (mkVect [1,2,3]) | 33 | true | false | 0 | 8 | 35 | 28 | 16 | 12 | null | null |
atemerev/icfpc2013 | src/solver-lib/PP.hs | apache-2.0 | ppProg :: ExpC -> String
ppProg = render . ppProgDoc | 52 | ppProg :: ExpC -> String
ppProg = render . ppProgDoc | 52 | ppProg = render . ppProgDoc | 27 | false | true | 0 | 7 | 9 | 26 | 11 | 15 | null | null |
brianshourd/adventOfCode2016 | src/Day9.hs | mit | -- Input
run :: IO ()
run = do
putStrLn "Day 9 results: "
input <- readFile "inputs/day9.txt"
putStrLn $ " " ++ show (day9 input)
putStrLn $ " " ++ show (day9' input) | 184 | run :: IO ()
run = do
putStrLn "Day 9 results: "
input <- readFile "inputs/day9.txt"
putStrLn $ " " ++ show (day9 input)
putStrLn $ " " ++ show (day9' input) | 175 | run = do
putStrLn "Day 9 results: "
input <- readFile "inputs/day9.txt"
putStrLn $ " " ++ show (day9 input)
putStrLn $ " " ++ show (day9' input) | 162 | true | true | 1 | 11 | 51 | 77 | 33 | 44 | null | null |
UBMLtonGroup/timberc | src/Desugar2.hs | bsd-3-clause | dsBinds (BSig vs qt : bs) = do bs <- dsBinds bs
return (BSig vs (dsQualWildType qt) : bs) | 132 | dsBinds (BSig vs qt : bs) = do bs <- dsBinds bs
return (BSig vs (dsQualWildType qt) : bs) | 132 | dsBinds (BSig vs qt : bs) = do bs <- dsBinds bs
return (BSig vs (dsQualWildType qt) : bs) | 132 | false | false | 0 | 12 | 61 | 55 | 25 | 30 | null | null |
rahulmutt/ghcvm | compiler/Eta/TypeCheck/TcRules.hs | bsd-3-clause | ruleCtxt :: FastString -> SDoc
ruleCtxt name = ptext (sLit "When checking the transformation rule") <+>
doubleQuotes (ftext name) | 145 | ruleCtxt :: FastString -> SDoc
ruleCtxt name = ptext (sLit "When checking the transformation rule") <+>
doubleQuotes (ftext name) | 145 | ruleCtxt name = ptext (sLit "When checking the transformation rule") <+>
doubleQuotes (ftext name) | 114 | false | true | 0 | 8 | 34 | 45 | 20 | 25 | null | null |
recursion-ninja/megaparsec | Text/Megaparsec.hs | bsd-2-clause | -- | Set the number of tokens processed so far.
--
-- @since 6.0.0
setTokensProcessed :: MonadParsec e s m => Int -> m ()
setTokensProcessed tp = updateParserState $ \(State s pos _ w) ->
State s pos tp w | 207 | setTokensProcessed :: MonadParsec e s m => Int -> m ()
setTokensProcessed tp = updateParserState $ \(State s pos _ w) ->
State s pos tp w | 139 | setTokensProcessed tp = updateParserState $ \(State s pos _ w) ->
State s pos tp w | 84 | true | true | 0 | 8 | 43 | 67 | 34 | 33 | null | null |
chadbrewbaker/combinat | Math/Combinat/Permutations.hs | bsd-3-clause | inPermSize = 1
| 15 | minPermSize = 1 | 15 | minPermSize = 1 | 15 | false | false | 0 | 4 | 3 | 6 | 3 | 3 | null | null |
javgh/mtgoxapi | TestSuite.hs | bsd-3-clause | manualSubmitOrderTest :: IO ()
manualSubmitOrderTest = do
credentials <- loadCredentials
apiData <- prepareAPI credentials
submitOrder apiData OrderTypeSellBTC cent >>= print
submitOrder apiData OrderTypeBuyBTC cent >>= print | 241 | manualSubmitOrderTest :: IO ()
manualSubmitOrderTest = do
credentials <- loadCredentials
apiData <- prepareAPI credentials
submitOrder apiData OrderTypeSellBTC cent >>= print
submitOrder apiData OrderTypeBuyBTC cent >>= print | 241 | manualSubmitOrderTest = do
credentials <- loadCredentials
apiData <- prepareAPI credentials
submitOrder apiData OrderTypeSellBTC cent >>= print
submitOrder apiData OrderTypeBuyBTC cent >>= print | 210 | false | true | 0 | 8 | 41 | 61 | 27 | 34 | null | null |
dschalk/JS-monads-stable | Main.hs | mit | changeGroupKeepScore :: Text -> Text -> ServerState -> ServerState
changeGroupKeepScore name group = map (newGroupKeepScore name group) | 135 | changeGroupKeepScore :: Text -> Text -> ServerState -> ServerState
changeGroupKeepScore name group = map (newGroupKeepScore name group) | 135 | changeGroupKeepScore name group = map (newGroupKeepScore name group) | 68 | false | true | 0 | 7 | 16 | 39 | 19 | 20 | null | null |
kim/amazonka | amazonka-cognito-identity/gen/Network/AWS/CognitoIdentity/UpdateIdentityPool.hs | mpl-2.0 | -- | The "domain" by which Cognito will refer to your users.
uipDeveloperProviderName :: Lens' UpdateIdentityPool (Maybe Text)
uipDeveloperProviderName =
lens _uipDeveloperProviderName
(\s a -> s { _uipDeveloperProviderName = a }) | 242 | uipDeveloperProviderName :: Lens' UpdateIdentityPool (Maybe Text)
uipDeveloperProviderName =
lens _uipDeveloperProviderName
(\s a -> s { _uipDeveloperProviderName = a }) | 181 | uipDeveloperProviderName =
lens _uipDeveloperProviderName
(\s a -> s { _uipDeveloperProviderName = a }) | 115 | true | true | 0 | 9 | 42 | 46 | 25 | 21 | null | null |
DavidAlphaFox/ghc | libraries/Cabal/Cabal/Distribution/Simple/Command.hs | bsd-3-clause | -- | Create an option taking a single OptDescr.
-- No explicit Name is given for the Option, the name is the first LFlag given.
option :: SFlags -> LFlags -> Description -> get -> set -> MkOptDescr get set a
-> OptionField a
option sf lf@(n:_) d get set arg = OptionField n [arg sf lf d get set] | 307 | option :: SFlags -> LFlags -> Description -> get -> set -> MkOptDescr get set a
-> OptionField a
option sf lf@(n:_) d get set arg = OptionField n [arg sf lf d get set] | 177 | option sf lf@(n:_) d get set arg = OptionField n [arg sf lf d get set] | 70 | true | true | 3 | 7 | 71 | 87 | 46 | 41 | null | null |
ezyang/ghc | compiler/utils/Pretty.hs | bsd-3-clause | nonEmptySet (_ `Union` _) = True | 37 | nonEmptySet (_ `Union` _) = True | 37 | nonEmptySet (_ `Union` _) = True | 37 | false | false | 0 | 7 | 10 | 18 | 10 | 8 | null | null |
apyrgio/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | -- * Dynamic disk parameters
ddpLocalIp :: String
ddpLocalIp = "local-ip" | 74 | ddpLocalIp :: String
ddpLocalIp = "local-ip" | 44 | ddpLocalIp = "local-ip" | 23 | true | true | 0 | 4 | 11 | 12 | 7 | 5 | null | null |
nbrendler/hackerrank-exercises | fair-rations/Main.hs | mit | walk (x:[]) loaves = case (even x) of
True -> Just loaves
False -> Nothing | 82 | walk (x:[]) loaves = case (even x) of
True -> Just loaves
False -> Nothing | 82 | walk (x:[]) loaves = case (even x) of
True -> Just loaves
False -> Nothing | 82 | false | false | 2 | 8 | 22 | 47 | 22 | 25 | null | null |
matthewscottgordon/funk | test/Test/Module.hs | apache-2.0 | testGetDeclEmptyModule = (getDecl empty "foo") @?= Nothing | 58 | testGetDeclEmptyModule = (getDecl empty "foo") @?= Nothing | 58 | testGetDeclEmptyModule = (getDecl empty "foo") @?= Nothing | 58 | false | false | 1 | 7 | 6 | 22 | 9 | 13 | null | null |
jwiegley/hnix | src/Nix/Builtins.hs | bsd-3-clause | builtinsList :: forall e t f m . MonadNix e t f m => m [Builtin (NValue t f m)]
builtinsList = sequence
[ do
version <- toValue (principledMakeNixStringWithoutContext "2.0")
pure $ Builtin Normal ("nixVersion", version)
, do
version <- toValue (5 :: Int)
pure $ Builtin Normal ("langVersion", version... | 6,702 | builtinsList :: forall e t f m . MonadNix e t f m => m [Builtin (NValue t f m)]
builtinsList = sequence
[ do
version <- toValue (principledMakeNixStringWithoutContext "2.0")
pure $ Builtin Normal ("nixVersion", version)
, do
version <- toValue (5 :: Int)
pure $ Builtin Normal ("langVersion", version... | 6,702 | builtinsList = sequence
[ do
version <- toValue (principledMakeNixStringWithoutContext "2.0")
pure $ Builtin Normal ("nixVersion", version)
, do
version <- toValue (5 :: Int)
pure $ Builtin Normal ("langVersion", version)
, add0 Normal "nixPath" nixPath
, add TopLevel "abort" ... | 6,622 | false | true | 0 | 14 | 2,327 | 1,689 | 846 | 843 | null | null |
mvdan/hint | src/Hint/Context.hs | bsd-3-clause | getContext :: GHC.GhcMonad m => m ([GHC.Module], [GHC.ImportDecl GHC.GhcPs])
getContext = GHC.getContext >>= foldM f ([], [])
where
f :: (GHC.GhcMonad m) =>
([GHC.Module], [GHC.ImportDecl GHC.GhcPs]) ->
GHC.InteractiveImport ->
m ([GHC.Module], [GHC.ImportDecl GHC.GhcPs])
f (ns, ds)... | 452 | getContext :: GHC.GhcMonad m => m ([GHC.Module], [GHC.ImportDecl GHC.GhcPs])
getContext = GHC.getContext >>= foldM f ([], [])
where
f :: (GHC.GhcMonad m) =>
([GHC.Module], [GHC.ImportDecl GHC.GhcPs]) ->
GHC.InteractiveImport ->
m ([GHC.Module], [GHC.ImportDecl GHC.GhcPs])
f (ns, ds)... | 452 | getContext = GHC.getContext >>= foldM f ([], [])
where
f :: (GHC.GhcMonad m) =>
([GHC.Module], [GHC.ImportDecl GHC.GhcPs]) ->
GHC.InteractiveImport ->
m ([GHC.Module], [GHC.ImportDecl GHC.GhcPs])
f (ns, ds) i = case i of
(GHC.IIDecl d) -> return (ns, d : ds)
m@(GHC.I... | 375 | false | true | 2 | 13 | 114 | 236 | 122 | 114 | null | null |
pjones/xmonad-test | vendor/xmonad-contrib/XMonad/Actions/GroupNavigation.hs | bsd-2-clause | -- ^ Backward in history
-- | Focuses the next window for which the given query produces the
-- same result as the currently focused window. Does nothing if there
-- is no focused window (i.e., the current workspace is empty).
nextMatchWithThis :: Eq a => Direction -> Query a -> X ()
nextMatchWithThis dir qry = withF... | 583 | nextMatchWithThis :: Eq a => Direction -> Query a -> X ()
nextMatchWithThis dir qry = withFocused $ \win -> do
prop <- runQuery qry win
nextMatch dir (qry =? prop)
-- | Focuses the next window that matches the given boolean query.
-- Does nothing if there is no such window. This is the same as
-- 'nextMatchOrDo' ... | 354 | nextMatchWithThis dir qry = withFocused $ \win -> do
prop <- runQuery qry win
nextMatch dir (qry =? prop)
-- | Focuses the next window that matches the given boolean query.
-- Does nothing if there is no such window. This is the same as
-- 'nextMatchOrDo' with alternate action @return ()@. | 296 | true | true | 0 | 12 | 112 | 87 | 43 | 44 | null | null |
adarqui/Complexity | examples/simple.hs | bsd-3-clause | expFibs :: [Experiment]
expFibs = [ pureExperiment "fib0" (cpuTimeSensor 10) id fib0
, pureExperiment "fib1" (cpuTimeSensor 10) id fib1
, pureExperiment "fib2" (cpuTimeSensor 10) id fib2
, pureExperiment "fib3" (cpuTimeSensor 10) id fib3
, pureExperiment "fib4" (cpuTimeSensor 10)... | 462 | expFibs :: [Experiment]
expFibs = [ pureExperiment "fib0" (cpuTimeSensor 10) id fib0
, pureExperiment "fib1" (cpuTimeSensor 10) id fib1
, pureExperiment "fib2" (cpuTimeSensor 10) id fib2
, pureExperiment "fib3" (cpuTimeSensor 10) id fib3
, pureExperiment "fib4" (cpuTimeSensor 10)... | 462 | expFibs = [ pureExperiment "fib0" (cpuTimeSensor 10) id fib0
, pureExperiment "fib1" (cpuTimeSensor 10) id fib1
, pureExperiment "fib2" (cpuTimeSensor 10) id fib2
, pureExperiment "fib3" (cpuTimeSensor 10) id fib3
, pureExperiment "fib4" (cpuTimeSensor 10) id fib4
, pur... | 438 | false | true | 0 | 9 | 124 | 147 | 72 | 75 | null | null |
pachopepe/mfxparser | src/MixFix/Parser.hs | bsd-3-clause | parseGenericPrefix _ _ = error ("Invalid call to parseGenericPrefix") | 69 | parseGenericPrefix _ _ = error ("Invalid call to parseGenericPrefix") | 69 | parseGenericPrefix _ _ = error ("Invalid call to parseGenericPrefix") | 69 | false | false | 0 | 6 | 8 | 17 | 8 | 9 | null | null |
sitewisely/zellige | src/Data/Geometry/VectorTile/Internal.hs | apache-2.0 | -- | Decode a Z-encoded Word32 into a 64-bit Int.
unzig :: Word.Word32 -> Int
unzig n = fromIntegral (fromIntegral unzigged :: Int32)
where unzigged = Bits.shift n (-1) `Bits.xor` negate (n Bits..&. 1)
| 204 | unzig :: Word.Word32 -> Int
unzig n = fromIntegral (fromIntegral unzigged :: Int32)
where unzigged = Bits.shift n (-1) `Bits.xor` negate (n Bits..&. 1)
| 154 | unzig n = fromIntegral (fromIntegral unzigged :: Int32)
where unzigged = Bits.shift n (-1) `Bits.xor` negate (n Bits..&. 1)
| 126 | true | true | 4 | 7 | 36 | 79 | 39 | 40 | null | null |
mfpi/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/ARB/Compatibility/Tokens.hs | bsd-3-clause | gl_SUBTRACT :: GLenum
gl_SUBTRACT = 0x84E7 | 42 | gl_SUBTRACT :: GLenum
gl_SUBTRACT = 0x84E7 | 42 | gl_SUBTRACT = 0x84E7 | 20 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
keithodulaigh/Hets | Isabelle/IsaConsts.hs | gpl-2.0 | dispMN :: Typ -> DTyp
dispMN t = Disp t TMet Nothing | 52 | dispMN :: Typ -> DTyp
dispMN t = Disp t TMet Nothing | 52 | dispMN t = Disp t TMet Nothing | 30 | false | true | 0 | 5 | 11 | 25 | 12 | 13 | null | null |
mattias-lundell/timber-llvm | src/Scp.hs | bsd-3-clause | value (EAp (EVar (Tuple _ _)) es) = all value es | 48 | value (EAp (EVar (Tuple _ _)) es) = all value es | 48 | value (EAp (EVar (Tuple _ _)) es) = all value es | 48 | false | false | 0 | 11 | 10 | 36 | 17 | 19 | null | null |
np/json-tools | jq.hs | bsd-3-clause | constF :: Value -> Filter
constF v _ = [v] | 42 | constF :: Value -> Filter
constF v _ = [v] | 42 | constF v _ = [v] | 16 | false | true | 0 | 7 | 9 | 29 | 13 | 16 | null | null |
f-me/xlsx-parser | temp/xlsx-parser.hs | mit | parseSharedStrings :: L.ByteString -> M.IntMap B.ByteString
parseSharedStrings xml =
M.fromAscList $ zip -- FIXME: to array
[0..]
[B.concat $ L.toChunks x | TagText x <- parseTags xml] | 196 | parseSharedStrings :: L.ByteString -> M.IntMap B.ByteString
parseSharedStrings xml =
M.fromAscList $ zip -- FIXME: to array
[0..]
[B.concat $ L.toChunks x | TagText x <- parseTags xml] | 196 | parseSharedStrings xml =
M.fromAscList $ zip -- FIXME: to array
[0..]
[B.concat $ L.toChunks x | TagText x <- parseTags xml] | 136 | false | true | 0 | 8 | 38 | 71 | 34 | 37 | null | null |
brendanhay/gogol | gogol-iam/gen/Network/Google/Resource/IAM/Projects/Locations/WorkLoadIdentityPools/Providers/Get.hs | mpl-2.0 | -- | Upload protocol for media (e.g. \"raw\", \"multipart\").
plwlippgUploadProtocol :: Lens' ProjectsLocationsWorkLoadIdentityPoolsProvidersGet (Maybe Text)
plwlippgUploadProtocol
= lens _plwlippgUploadProtocol
(\ s a -> s{_plwlippgUploadProtocol = a}) | 261 | plwlippgUploadProtocol :: Lens' ProjectsLocationsWorkLoadIdentityPoolsProvidersGet (Maybe Text)
plwlippgUploadProtocol
= lens _plwlippgUploadProtocol
(\ s a -> s{_plwlippgUploadProtocol = a}) | 199 | plwlippgUploadProtocol
= lens _plwlippgUploadProtocol
(\ s a -> s{_plwlippgUploadProtocol = a}) | 103 | true | true | 0 | 9 | 33 | 48 | 25 | 23 | null | null |
GaloisInc/saw-script | saw-remote-api/src/SAWServer.hs | bsd-3-clause | sawTopLevelRO :: Lens' SAWState TopLevelRO
sawTopLevelRO = lens _sawTopLevelRO (\v ro -> v { _sawTopLevelRO = ro }) | 115 | sawTopLevelRO :: Lens' SAWState TopLevelRO
sawTopLevelRO = lens _sawTopLevelRO (\v ro -> v { _sawTopLevelRO = ro }) | 115 | sawTopLevelRO = lens _sawTopLevelRO (\v ro -> v { _sawTopLevelRO = ro }) | 72 | false | true | 0 | 9 | 17 | 39 | 21 | 18 | null | null |
wangwangwar/cis194 | src/ch7/JoinList.hs | bsd-3-clause | (x:xs) !!? 0 = Just x | 21 | (x:xs) !!? 0 = Just x | 21 | (x:xs) !!? 0 = Just x | 21 | false | false | 0 | 7 | 5 | 22 | 10 | 12 | null | null |
apyrgio/snf-ganeti | src/Ganeti/Errors.hs | bsd-2-clause | formatError (TypeEnforcementError msg) =
"Parameter Error: " ++ msg | 69 | formatError (TypeEnforcementError msg) =
"Parameter Error: " ++ msg | 69 | formatError (TypeEnforcementError msg) =
"Parameter Error: " ++ msg | 69 | false | false | 0 | 7 | 10 | 19 | 9 | 10 | null | null |
channable/icepeak | server/src/Core.hs | bsd-3-clause | enqueueCommand :: Command -> Core -> IO ()
enqueueCommand cmd core = atomically $ writeTBQueue (coreQueue core) cmd | 115 | enqueueCommand :: Command -> Core -> IO ()
enqueueCommand cmd core = atomically $ writeTBQueue (coreQueue core) cmd | 115 | enqueueCommand cmd core = atomically $ writeTBQueue (coreQueue core) cmd | 72 | false | true | 0 | 9 | 17 | 48 | 22 | 26 | null | null |
Concomitant/LambdaHack | Game/LambdaHack/Server/PeriodicServer.hs | bsd-3-clause | advanceTime :: (MonadAtomic m, MonadServer m) => ActorId -> m ()
advanceTime aid = do
b <- getsState $ getActorBody aid
activeItems <- activeItemsServer aid
localTime <- getsState $ getLocalTime (blid b)
let halfActorTurn = timeDeltaDiv (ticksPerMeter $ bspeed b activeItems) 2
-- Dead bodies stay around f... | 906 | advanceTime :: (MonadAtomic m, MonadServer m) => ActorId -> m ()
advanceTime aid = do
b <- getsState $ getActorBody aid
activeItems <- activeItemsServer aid
localTime <- getsState $ getLocalTime (blid b)
let halfActorTurn = timeDeltaDiv (ticksPerMeter $ bspeed b activeItems) 2
-- Dead bodies stay around f... | 906 | advanceTime aid = do
b <- getsState $ getActorBody aid
activeItems <- activeItemsServer aid
localTime <- getsState $ getLocalTime (blid b)
let halfActorTurn = timeDeltaDiv (ticksPerMeter $ bspeed b activeItems) 2
-- Dead bodies stay around for only a half of standard turn,
-- even if paralyzed.
... | 841 | false | true | 0 | 17 | 220 | 200 | 99 | 101 | null | null |
aelyasov/Haslog | src/Eu/Fittest/Logging/Analysis/Base.hs | bsd-3-clause | repeat_ :: Rule_ [EPS e p s] -> Rule_ [EPS e p s]
repeat_ rule s = case rule s of
Nothing -> Just s
Just t -> repeat_ rule t | 176 | repeat_ :: Rule_ [EPS e p s] -> Rule_ [EPS e p s]
repeat_ rule s = case rule s of
Nothing -> Just s
Just t -> repeat_ rule t | 166 | repeat_ rule s = case rule s of
Nothing -> Just s
Just t -> repeat_ rule t | 115 | false | true | 0 | 8 | 82 | 80 | 36 | 44 | null | null |
YoshikuniJujo/funpaala | samples/39_learn_io/sugar.hs | bsd-3-clause | bitter :: IO ()
bitter = putStrLn . reverse =<< getLine | 55 | bitter :: IO ()
bitter = putStrLn . reverse =<< getLine | 55 | bitter = putStrLn . reverse =<< getLine | 39 | false | true | 0 | 6 | 10 | 24 | 12 | 12 | null | null |
brendanhay/gogol | gogol-shopping-content/gen/Network/Google/ShoppingContent/Types/Product.hs | mpl-2.0 | -- | Should be set to true if the item is targeted towards adults.
prorAdult :: Lens' Product (Maybe Bool)
prorAdult
= lens _prorAdult (\ s a -> s{_prorAdult = a}) | 165 | prorAdult :: Lens' Product (Maybe Bool)
prorAdult
= lens _prorAdult (\ s a -> s{_prorAdult = a}) | 98 | prorAdult
= lens _prorAdult (\ s a -> s{_prorAdult = a}) | 58 | true | true | 0 | 9 | 32 | 48 | 25 | 23 | null | null |
enolan/cabal | cabal-install/Distribution/Client/Sandbox/PackageEnvironment.hs | bsd-3-clause | pkgEnvFieldDescrs :: ConstraintSource -> [FieldDescr PackageEnvironment]
pkgEnvFieldDescrs src = [
simpleField "inherit"
(fromFlagOrDefault Disp.empty . fmap Disp.text) (optional parseFilePathQ)
pkgEnvInherit (\v pkgEnv -> pkgEnv { pkgEnvInherit = v })
-- FIXME: Should we make these fields part of ~/.cab... | 1,842 | pkgEnvFieldDescrs :: ConstraintSource -> [FieldDescr PackageEnvironment]
pkgEnvFieldDescrs src = [
simpleField "inherit"
(fromFlagOrDefault Disp.empty . fmap Disp.text) (optional parseFilePathQ)
pkgEnvInherit (\v pkgEnv -> pkgEnv { pkgEnvInherit = v })
-- FIXME: Should we make these fields part of ~/.cab... | 1,842 | pkgEnvFieldDescrs src = [
simpleField "inherit"
(fromFlagOrDefault Disp.empty . fmap Disp.text) (optional parseFilePathQ)
pkgEnvInherit (\v pkgEnv -> pkgEnv { pkgEnvInherit = v })
-- FIXME: Should we make these fields part of ~/.cabal/config ?
, commaNewLineListField "constraints"
(Text.disp . fst)... | 1,769 | false | true | 18 | 13 | 456 | 430 | 229 | 201 | null | null |
brendanhay/gogol | gogol-cloudsearch/gen/Network/Google/CloudSearch/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'CustomerSettings' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'csAuditLoggingSettings'
--
-- * 'csVPCSettings'
customerSettings
:: CustomerSettings
customerSettings =
CustomerSettings'
{_csAuditLo... | 370 | customerSettings
:: CustomerSettings
customerSettings =
CustomerSettings'
{_csAuditLoggingSettings = Nothing, _csVPCSettings = Nothing} | 145 | customerSettings =
CustomerSettings'
{_csAuditLoggingSettings = Nothing, _csVPCSettings = Nothing} | 104 | true | true | 0 | 7 | 59 | 42 | 24 | 18 | null | null |
nathyong/microghc-ghc | compiler/types/InstEnv.hs | bsd-3-clause | mkLocalInstance :: DFunId -> OverlapFlag
-> [TyVar] -> Class -> [Type]
-> ClsInst
-- Used for local instances, where we can safely pull on the DFunId
mkLocalInstance dfun oflag tvs cls tys
= ClsInst { is_flag = oflag, is_dfun = dfun
, is_tvs = tvs
, is_cls = cls... | 1,689 | mkLocalInstance :: DFunId -> OverlapFlag
-> [TyVar] -> Class -> [Type]
-> ClsInst
mkLocalInstance dfun oflag tvs cls tys
= ClsInst { is_flag = oflag, is_dfun = dfun
, is_tvs = tvs
, is_cls = cls, is_cls_nm = cls_name
, is_tys = tys, is_tcs = roughMat... | 1,621 | mkLocalInstance dfun oflag tvs cls tys
= ClsInst { is_flag = oflag, is_dfun = dfun
, is_tvs = tvs
, is_cls = cls, is_cls_nm = cls_name
, is_tys = tys, is_tcs = roughMatchTcs tys
, is_orphan = orph
}
where
cls_name = className cls
dfun_name = idName... | 1,507 | true | true | 12 | 11 | 560 | 477 | 238 | 239 | null | null |
bgamari/haskell-platform | hptool/src/Website.hs | bsd-3-clause | websiteRules :: FilePath -> Rules ()
websiteRules templateSite = do
websiteDir %/> \dst -> do
bcCtx <- buildConfigContext
let rlsCtx = releasesCtx
ctx = ctxConcat [rlsCtx, historyCtx, bcCtx, siteUrlsCtx, errorCtx]
copyExpandedDir ctx templateSite dst | 290 | websiteRules :: FilePath -> Rules ()
websiteRules templateSite = do
websiteDir %/> \dst -> do
bcCtx <- buildConfigContext
let rlsCtx = releasesCtx
ctx = ctxConcat [rlsCtx, historyCtx, bcCtx, siteUrlsCtx, errorCtx]
copyExpandedDir ctx templateSite dst | 290 | websiteRules templateSite = do
websiteDir %/> \dst -> do
bcCtx <- buildConfigContext
let rlsCtx = releasesCtx
ctx = ctxConcat [rlsCtx, historyCtx, bcCtx, siteUrlsCtx, errorCtx]
copyExpandedDir ctx templateSite dst | 253 | false | true | 0 | 15 | 73 | 84 | 42 | 42 | null | null |
DanielSchiavini/ampersand | src/Database/Design/Ampersand/ADL1/P2A_Converters.hs | gpl-3.0 | getConcept Tgt = name . target | 30 | getConcept Tgt = name . target | 30 | getConcept Tgt = name . target | 30 | false | false | 0 | 5 | 5 | 13 | 6 | 7 | null | null |
vikraman/ghc | compiler/utils/Panic.hs | bsd-3-clause | -- | Short usage information to display when we are given the wrong cmd line arguments.
short_usage :: String
short_usage = "Usage: For basic information, try the `--help' option." | 180 | short_usage :: String
short_usage = "Usage: For basic information, try the `--help' option." | 92 | short_usage = "Usage: For basic information, try the `--help' option." | 70 | true | true | 0 | 6 | 28 | 19 | 8 | 11 | null | null |
fmthoma/ghc | compiler/basicTypes/DataCon.hs | bsd-3-clause | promoteKind :: Kind -> SuperKind
-- Promote the kind of a type constructor
-- from (* -> * -> *) to (BOX -> BOX -> BOX)
promoteKind (TyConApp tc [])
| tc `hasKey` liftedTypeKindTyConKey = superKind | 199 | promoteKind :: Kind -> SuperKind
promoteKind (TyConApp tc [])
| tc `hasKey` liftedTypeKindTyConKey = superKind | 112 | promoteKind (TyConApp tc [])
| tc `hasKey` liftedTypeKindTyConKey = superKind | 79 | true | true | 0 | 8 | 37 | 42 | 22 | 20 | null | null |
JPMoresmau/haddock | haddock-api/src/Haddock/Backends/Xhtml/Decl.hs | bsd-2-clause | ppHsContext cxt unicode qual = parenList (map (ppType unicode qual) cxt) | 72 | ppHsContext cxt unicode qual = parenList (map (ppType unicode qual) cxt) | 72 | ppHsContext cxt unicode qual = parenList (map (ppType unicode qual) cxt) | 72 | false | false | 0 | 9 | 10 | 32 | 15 | 17 | null | null |
kim/amazonka | amazonka-redshift/gen/Network/AWS/Redshift/Types.hs | mpl-2.0 | -- | The status of a modify operation, if any, initiated for the cluster.
cModifyStatus :: Lens' Cluster (Maybe Text)
cModifyStatus = lens _cModifyStatus (\s a -> s { _cModifyStatus = a }) | 188 | cModifyStatus :: Lens' Cluster (Maybe Text)
cModifyStatus = lens _cModifyStatus (\s a -> s { _cModifyStatus = a }) | 114 | cModifyStatus = lens _cModifyStatus (\s a -> s { _cModifyStatus = a }) | 70 | true | true | 0 | 9 | 32 | 46 | 25 | 21 | null | null |
fmapfmapfmap/amazonka | amazonka-dynamodb/gen/Network/AWS/DynamoDB/Types/Product.hs | mpl-2.0 | -- | A map of attribute name to attribute values, representing the primary
-- key of the item to delete. All of the table\'s primary key attributes
-- must be specified, and their data types must match those of the table\'s
-- key schema.
drKey :: Lens' DeleteRequest (HashMap Text AttributeValue)
drKey = lens _drKey (\... | 349 | drKey :: Lens' DeleteRequest (HashMap Text AttributeValue)
drKey = lens _drKey (\ s a -> s{_drKey = a}) . _Map | 110 | drKey = lens _drKey (\ s a -> s{_drKey = a}) . _Map | 51 | true | true | 2 | 9 | 63 | 64 | 31 | 33 | null | null |
randen/cabal | cabal-install/Distribution/Client/Setup.hs | bsd-3-clause | testCommand :: CommandUI (TestFlags, BuildFlags, BuildExFlags)
testCommand = parent {
commandDefaultFlags = (commandDefaultFlags parent,
Cabal.defaultBuildFlags, mempty),
commandOptions =
\showOrParseArgs -> liftOptions get1 set1
(commandOptions parent showO... | 958 | testCommand :: CommandUI (TestFlags, BuildFlags, BuildExFlags)
testCommand = parent {
commandDefaultFlags = (commandDefaultFlags parent,
Cabal.defaultBuildFlags, mempty),
commandOptions =
\showOrParseArgs -> liftOptions get1 set1
(commandOptions parent showO... | 958 | testCommand = parent {
commandDefaultFlags = (commandDefaultFlags parent,
Cabal.defaultBuildFlags, mempty),
commandOptions =
\showOrParseArgs -> liftOptions get1 set1
(commandOptions parent showOrParseArgs)
++
... | 895 | false | true | 0 | 13 | 291 | 265 | 153 | 112 | null | null |
beni55/pinhole | Pinhole/Level/Level.hs | gpl-3.0 | initialLevel :: Level
initialLevel =
Level { spawn = (0, 240)
, goal = ((0, -240), (20, 0))
, walls = [ Wall (-screenWidth/2, -screenHeight/2 + 1)
(-screenWidth/3, -screenHeight/2 + 1) -- bottom-left
, Wall (-screenWidth/4, -screenHeight/2 + 1)... | 709 | initialLevel :: Level
initialLevel =
Level { spawn = (0, 240)
, goal = ((0, -240), (20, 0))
, walls = [ Wall (-screenWidth/2, -screenHeight/2 + 1)
(-screenWidth/3, -screenHeight/2 + 1) -- bottom-left
, Wall (-screenWidth/4, -screenHeight/2 + 1)... | 709 | initialLevel =
Level { spawn = (0, 240)
, goal = ((0, -240), (20, 0))
, walls = [ Wall (-screenWidth/2, -screenHeight/2 + 1)
(-screenWidth/3, -screenHeight/2 + 1) -- bottom-left
, Wall (-screenWidth/4, -screenHeight/2 + 1)
... | 687 | false | true | 0 | 12 | 299 | 259 | 147 | 112 | null | null |
joshuaclayton/unused | src/Unused/LikelihoodCalculator.hs | mit | calculateLikelihood :: [LanguageConfiguration] -> TermResults -> TermResults
calculateLikelihood lcs r =
r { trRemoval = uncurry Removal newLikelihood }
where
newLikelihood
| M.isJust firstAutoLowLikelihood = (Low, autoLowLikelihoodMessage)
| singleNonTestUsage r && testsExist r = (High, "only... | 918 | calculateLikelihood :: [LanguageConfiguration] -> TermResults -> TermResults
calculateLikelihood lcs r =
r { trRemoval = uncurry Removal newLikelihood }
where
newLikelihood
| M.isJust firstAutoLowLikelihood = (Low, autoLowLikelihoodMessage)
| singleNonTestUsage r && testsExist r = (High, "only... | 918 | calculateLikelihood lcs r =
r { trRemoval = uncurry Removal newLikelihood }
where
newLikelihood
| M.isJust firstAutoLowLikelihood = (Low, autoLowLikelihoodMessage)
| singleNonTestUsage r && testsExist r = (High, "only the definition and corresponding tests exist")
| doubleNonTestUsage ... | 841 | false | true | 2 | 9 | 186 | 248 | 125 | 123 | null | null |
brinchj/btree-concurrent | Data/BTree/BTree.hs | lgpl-3.0 | lookup :: ( MonadIO m, TreeBackend mc k v
, Key k, Value v)
=> k -- ^ key
-> TreeResult m mc k v (Maybe v) -- ^ The value if present
lookup k = modifyLeaf (findChild k) $ \_ _ _ -> return . M.lookup k | 272 | lookup :: ( MonadIO m, TreeBackend mc k v
, Key k, Value v)
=> k -- ^ key
-> TreeResult m mc k v (Maybe v)
lookup k = modifyLeaf (findChild k) $ \_ _ _ -> return . M.lookup k | 239 | lookup k = modifyLeaf (findChild k) $ \_ _ _ -> return . M.lookup k | 67 | true | true | 0 | 10 | 119 | 103 | 51 | 52 | null | null |
cutsea110/sig | wai/Main.hs | bsd-3-clause | main :: IO ()
main = do
putStrLn "Starting warp server on http://localhost:3000"
run 3000 $ apiToApplication (runSigApi defaultConfig) api | 142 | main :: IO ()
main = do
putStrLn "Starting warp server on http://localhost:3000"
run 3000 $ apiToApplication (runSigApi defaultConfig) api | 142 | main = do
putStrLn "Starting warp server on http://localhost:3000"
run 3000 $ apiToApplication (runSigApi defaultConfig) api | 128 | false | true | 0 | 11 | 23 | 49 | 20 | 29 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.