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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
xcv-/pipes-find | src/System/HFind/Expr/Types/AST.hs | mit | opSymbol OpLT = ">" | 19 | opSymbol OpLT = ">" | 19 | opSymbol OpLT = ">" | 19 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
cje/hilbert | test/THilbert.hs | bsd-3-clause | -- Line where i =0
test_DRef3 :: Assertion
test_DRef3 = let w = mkPrecisionNum (1::Integer) (2::Integer)
d = mkPrecisionNum (0::Integer) (2::Integer) -- T_(e,d) == 3
dimension = mkPrecisionNum (2::Integer) (2::Integer)
res = mkPrecisionNum (0::Integer) (2::Integ... | 393 | test_DRef3 :: Assertion
test_DRef3 = let w = mkPrecisionNum (1::Integer) (2::Integer)
d = mkPrecisionNum (0::Integer) (2::Integer) -- T_(e,d) == 3
dimension = mkPrecisionNum (2::Integer) (2::Integer)
res = mkPrecisionNum (0::Integer) (2::Integer)
in ... | 372 | test_DRef3 = let w = mkPrecisionNum (1::Integer) (2::Integer)
d = mkPrecisionNum (0::Integer) (2::Integer) -- T_(e,d) == 3
dimension = mkPrecisionNum (2::Integer) (2::Integer)
res = mkPrecisionNum (0::Integer) (2::Integer)
in
liftA... | 348 | true | true | 0 | 10 | 133 | 127 | 69 | 58 | null | null |
chadbrewbaker/shellcheck | ShellCheck/Analytics.hs | gpl-3.0 | -- Get a literal string ignoring all non-literals
onlyLiteralString :: Token -> String
onlyLiteralString = fromJust . getLiteralStringExt (const $ return "") | 157 | onlyLiteralString :: Token -> String
onlyLiteralString = fromJust . getLiteralStringExt (const $ return "") | 107 | onlyLiteralString = fromJust . getLiteralStringExt (const $ return "") | 70 | true | true | 0 | 9 | 21 | 33 | 17 | 16 | null | null |
brendanhay/gogol | gogol-vision/gen/Network/Google/Vision/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'GoogleCloudVisionV1p4beta1EntityAnnotation' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'gcvveacScore'
--
-- * 'gcvveacTopicality'
--
-- * 'gcvveacLocale'
--
-- * 'gcvveacBoundingPoly'
--
-- * 'gcvveacConfi... | 922 | googleCloudVisionV1p4beta1EntityAnnotation
:: GoogleCloudVisionV1p4beta1EntityAnnotation
googleCloudVisionV1p4beta1EntityAnnotation =
GoogleCloudVisionV1p4beta1EntityAnnotation'
{ _gcvveacScore = Nothing
, _gcvveacTopicality = Nothing
, _gcvveacLocale = Nothing
, _gcvveacBoundingPoly = Nothing
... | 490 | googleCloudVisionV1p4beta1EntityAnnotation =
GoogleCloudVisionV1p4beta1EntityAnnotation'
{ _gcvveacScore = Nothing
, _gcvveacTopicality = Nothing
, _gcvveacLocale = Nothing
, _gcvveacBoundingPoly = Nothing
, _gcvveacConfidence = Nothing
, _gcvveacMid = Nothing
, _gcvveacLocations = Nothing... | 397 | true | true | 1 | 7 | 154 | 95 | 65 | 30 | null | null |
ratatosk/learn | gen/CharGenerator.hs | bsd-3-clause | sW :: String
sW = show width | 28 | sW :: String
sW = show width | 28 | sW = show width | 15 | false | true | 0 | 5 | 6 | 14 | 7 | 7 | null | null |
acowley/ghc | compiler/types/Type.hs | bsd-3-clause | splitTyConApp_maybe (TyConApp tc tys) = Just (tc, tys) | 54 | splitTyConApp_maybe (TyConApp tc tys) = Just (tc, tys) | 54 | splitTyConApp_maybe (TyConApp tc tys) = Just (tc, tys) | 54 | false | false | 0 | 6 | 7 | 27 | 13 | 14 | null | null |
BartMassey/extensible-printf | Text/Printf/Extensible.hs | bsd-3-clause | -- Given a suffix of the format string starting just after
-- the percent sign, and the list of remaining unprocessed
-- arguments in the form described above, format the portion
-- of the output described by this field description, and
-- then continue with 'uprintfs'.
fmt :: String -> [UPrintf] -> ShowS
fmt cs0 us0 =... | 717 | fmt :: String -> [UPrintf] -> ShowS
fmt cs0 us0 =
case getSpecs False False Nothing False cs0 us0 of
(_, _, []) -> errorMissingArgument
(ufmt, cs, (_, u) : us) -> u ufmt . uprintfs cs us
-- Given field formatting information, and a tuple
-- consisting of a prefix (for example, a minus sign) that
-- is suppos... | 446 | fmt cs0 us0 =
case getSpecs False False Nothing False cs0 us0 of
(_, _, []) -> errorMissingArgument
(ufmt, cs, (_, u) : us) -> u ufmt . uprintfs cs us
-- Given field formatting information, and a tuple
-- consisting of a prefix (for example, a minus sign) that
-- is supposed to go before the argument value a... | 410 | true | true | 0 | 10 | 137 | 113 | 63 | 50 | null | null |
brendanhay/gogol | gogol-vision/gen/Network/Google/Vision/Types/Product.hs | mpl-2.0 | -- | The \`fd_bounding_poly\` bounding polygon is tighter than the
-- \`boundingPoly\`, and encloses only the skin part of the face.
-- Typically, it is used to eliminate the face from any image analysis that
-- detects the \"amount of skin\" visible in an image. It is not based on
-- the landmarker results, only on th... | 582 | gFdBoundingPoly :: Lens' GoogleCloudVisionV1p1beta1FaceAnnotation (Maybe GoogleCloudVisionV1p1beta1BoundingPoly)
gFdBoundingPoly
= lens _gFdBoundingPoly
(\ s a -> s{_gFdBoundingPoly = a}) | 195 | gFdBoundingPoly
= lens _gFdBoundingPoly
(\ s a -> s{_gFdBoundingPoly = a}) | 82 | true | true | 1 | 9 | 91 | 56 | 30 | 26 | null | null |
eddywestbrook/hobbits | archival/LambdaLiftingDB2.hs | bsd-3-clause | mprettyName (Left pf) varnames = unStringF (ctxLookup pf varnames) | 66 | mprettyName (Left pf) varnames = unStringF (ctxLookup pf varnames) | 66 | mprettyName (Left pf) varnames = unStringF (ctxLookup pf varnames) | 66 | false | false | 0 | 7 | 8 | 28 | 13 | 15 | null | null |
ezyang/ghc | compiler/coreSyn/CoreFVs.hs | bsd-3-clause | freeVarsBind :: CoreBind
-> DVarSet -- Free vars of scope of binding
-> (CoreBindWithFVs, DVarSet) -- Return free vars of binding + scope
freeVarsBind (NonRec binder rhs) body_fvs
= ( AnnNonRec binder rhs2
, freeVarsOf rhs2 `unionFVs` body_fvs2
... | 457 | freeVarsBind :: CoreBind
-> DVarSet -- Free vars of scope of binding
-> (CoreBindWithFVs, DVarSet)
freeVarsBind (NonRec binder rhs) body_fvs
= ( AnnNonRec binder rhs2
, freeVarsOf rhs2 `unionFVs` body_fvs2
`unionFVs` bndrRuleAndUnfoldingVarsDSet ... | 417 | freeVarsBind (NonRec binder rhs) body_fvs
= ( AnnNonRec binder rhs2
, freeVarsOf rhs2 `unionFVs` body_fvs2
`unionFVs` bndrRuleAndUnfoldingVarsDSet binder )
where
rhs2 = freeVars rhs
body_fvs2 = binder `delBinderFV` body_fvs | 272 | true | true | 0 | 8 | 147 | 91 | 50 | 41 | null | null |
mumuki/mulang | src/Language/Mulang/Ast/Visitor.hs | gpl-3.0 | extractTerminal (Other _ Nothing) = True | 42 | extractTerminal (Other _ Nothing) = True | 42 | extractTerminal (Other _ Nothing) = True | 42 | false | false | 0 | 7 | 7 | 17 | 8 | 9 | null | null |
dillonhuff/AFL | src/Parser.hs | bsd-3-clause | letExpr = do
letTok
vDecs <- sepBy varDec commaTok
inTok
res <- expr
return $ cLet vDecs res | 102 | letExpr = do
letTok
vDecs <- sepBy varDec commaTok
inTok
res <- expr
return $ cLet vDecs res | 102 | letExpr = do
letTok
vDecs <- sepBy varDec commaTok
inTok
res <- expr
return $ cLet vDecs res | 102 | false | false | 0 | 8 | 27 | 43 | 18 | 25 | null | null |
martin-kolinek/some-board-game-rules | test/ArbitraryUniverseTest.hs | mit | allPlayersWaiting :: Universe -> Bool
allPlayersWaiting = allOf (players . traverse . playerStatus) (==Waiting) | 111 | allPlayersWaiting :: Universe -> Bool
allPlayersWaiting = allOf (players . traverse . playerStatus) (==Waiting) | 111 | allPlayersWaiting = allOf (players . traverse . playerStatus) (==Waiting) | 73 | false | true | 0 | 8 | 13 | 35 | 19 | 16 | null | null |
alexbiehl/StringMap | Data/StringMap/StringSet.hs | mit | nullPS _ = False | 39 | nullPS _ = False | 39 | nullPS _ = False | 39 | false | false | 0 | 4 | 26 | 10 | 4 | 6 | null | null |
tmcdonell/hfx | src/haskell/Mass.hs | bsd-3-clause | massOH = 17.002740 | 19 | massOH = 17.002740 | 19 | massOH = 17.002740 | 19 | false | false | 0 | 4 | 3 | 6 | 3 | 3 | null | null |
shlevy/ghc | compiler/types/TyCoRep.hs | bsd-3-clause | coVarsOfCos :: [Coercion] -> CoVarSet
coVarsOfCos cos = mapUnionVarSet coVarsOfCo cos | 85 | coVarsOfCos :: [Coercion] -> CoVarSet
coVarsOfCos cos = mapUnionVarSet coVarsOfCo cos | 85 | coVarsOfCos cos = mapUnionVarSet coVarsOfCo cos | 47 | false | true | 0 | 7 | 10 | 32 | 14 | 18 | null | null |
spacekitteh/smcghc | compiler/codeGen/StgCmmMonad.hs | bsd-3-clause | initHpUsage :: HeapUsage
initHpUsage = HeapUsage { virtHp = 0, realHp = 0 } | 75 | initHpUsage :: HeapUsage
initHpUsage = HeapUsage { virtHp = 0, realHp = 0 } | 75 | initHpUsage = HeapUsage { virtHp = 0, realHp = 0 } | 50 | false | true | 0 | 7 | 13 | 32 | 16 | 16 | null | null |
DavidAlphaFox/darcs | src/Darcs/Patch/Info.hs | gpl-2.0 | -- | Returns the author of a patch.
piAuthor :: PatchInfo -> String
piAuthor = metadataToString . _piAuthor | 107 | piAuthor :: PatchInfo -> String
piAuthor = metadataToString . _piAuthor | 71 | piAuthor = metadataToString . _piAuthor | 39 | true | true | 0 | 5 | 17 | 20 | 11 | 9 | null | null |
23Skidoo/aeson | Data/Aeson/TH.hs | bsd-3-clause | -- A single constructor is directly encoded. The constructor itself may be
-- forgotten.
consToEncoding opts [con] = do
value <- newName "value"
lam1E (varP value) $ caseE (varE value) [argsToEncoding opts False con]
-- Encode just the name of the constructor of a sum type iff all the
-- constructors are nulla... | 323 | consToEncoding opts [con] = do
value <- newName "value"
lam1E (varP value) $ caseE (varE value) [argsToEncoding opts False con]
-- Encode just the name of the constructor of a sum type iff all the
-- constructors are nullary. | 234 | consToEncoding opts [con] = do
value <- newName "value"
lam1E (varP value) $ caseE (varE value) [argsToEncoding opts False con]
-- Encode just the name of the constructor of a sum type iff all the
-- constructors are nullary. | 234 | true | false | 0 | 10 | 61 | 67 | 32 | 35 | null | null |
gereeter/bounded-intmap | src/Data/WordMap/Lazy.hs | mit | -- | /O(min(n,W))/. Lookup and update.
-- The function returns original value, if it is updated.
-- This is different behavior than 'Data.Map.updateLookupWithKey'.
-- Returns the original key value if the map entry is deleted.
--
-- > let f k x = if x == "a" then Just ((show k) ++ ":new a") else Nothing
-- > updateLook... | 2,948 | updateLookupWithKey :: (Key -> a -> Maybe a) -> Key -> WordMap a -> (Maybe a, WordMap a)
updateLookupWithKey f k = k `seq` start
where
start (WordMap Empty) = (Nothing, WordMap Empty)
start m@(WordMap (NonEmpty min minV Tip))
| k == min = case f min minV of
Nothing -> (Just minV, WordMap E... | 2,339 | updateLookupWithKey f k = k `seq` start
where
start (WordMap Empty) = (Nothing, WordMap Empty)
start m@(WordMap (NonEmpty min minV Tip))
| k == min = case f min minV of
Nothing -> (Just minV, WordMap Empty)
Just minV' -> (Just minV, WordMap (NonEmpty min minV' Tip))
| o... | 2,250 | true | true | 61 | 12 | 977 | 910 | 475 | 435 | null | null |
ekmett/wxHaskell | samples/test/XRCControls/XRCMenu.hs | lgpl-2.1 | gui :: IO ()
gui =
do
f <- frameLoadRes "xrcmenu.xrc" "menuTest" []
-- Attach event handlers to the menu items loaded above.
menuItemOnCommandRes f "new" (onFileNew f)
menuItemOnCommandRes f "open" (onFileOpen f)
set f [clientSize := sz 400 300]
windowShow... | 339 | gui :: IO ()
gui =
do
f <- frameLoadRes "xrcmenu.xrc" "menuTest" []
-- Attach event handlers to the menu items loaded above.
menuItemOnCommandRes f "new" (onFileNew f)
menuItemOnCommandRes f "open" (onFileOpen f)
set f [clientSize := sz 400 300]
windowShow ... | 338 | gui =
do
f <- frameLoadRes "xrcmenu.xrc" "menuTest" []
-- Attach event handlers to the menu items loaded above.
menuItemOnCommandRes f "new" (onFileNew f)
menuItemOnCommandRes f "open" (onFileOpen f)
set f [clientSize := sz 400 300]
windowShow f
retu... | 325 | false | true | 1 | 11 | 114 | 103 | 44 | 59 | null | null |
projedi/fluidsynth-hs-complete | src/Sound/Fluidsynth/Synth.hs | bsd-3-clause | defaultChorusParams :: ChorusParams
defaultChorusParams = undefined | 67 | defaultChorusParams :: ChorusParams
defaultChorusParams = undefined | 67 | defaultChorusParams = undefined | 31 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
pparkkin/eta | compiler/ETA/Main/HscTypes.hs | bsd-3-clause | pprTargetId (TargetFile f _) = text f | 37 | pprTargetId (TargetFile f _) = text f | 37 | pprTargetId (TargetFile f _) = text f | 37 | false | false | 0 | 6 | 6 | 21 | 9 | 12 | null | null |
sdiehl/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | decidedUnpackDataConName = dcQual gHC_GENERICS (fsLit "DecidedUnpack") decidedUnpackDataConKey | 108 | decidedUnpackDataConName = dcQual gHC_GENERICS (fsLit "DecidedUnpack") decidedUnpackDataConKey | 108 | decidedUnpackDataConName = dcQual gHC_GENERICS (fsLit "DecidedUnpack") decidedUnpackDataConKey | 108 | false | false | 0 | 7 | 20 | 19 | 9 | 10 | null | null |
ghc-android/ghc | testsuite/tests/ghci/should_run/ghcirun004.hs | bsd-3-clause | 356 = 355 | 9 | 356 = 355 | 9 | 356 = 355 | 9 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
deepfire/mood | src/Data/TypeMap/Constrained.hs | agpl-3.0 | insert
:: forall c t x proxy
. (Typeable t, c t) => proxy t -> TM.Item x t -> CTypeMap x -> CTypeMap x
insert t v (CTypeMap (c, TM.TypeMap m)) = CTypeMap . (c,) $ TM.TypeMap (Map.insert (typeRep t) (coerce v) m)
where
coerce :: TM.Item x t -> Any
coerce = unsafeCoerce
-- | Lookup an element indexed by t... | 328 | insert
:: forall c t x proxy
. (Typeable t, c t) => proxy t -> TM.Item x t -> CTypeMap x -> CTypeMap x
insert t v (CTypeMap (c, TM.TypeMap m)) = CTypeMap . (c,) $ TM.TypeMap (Map.insert (typeRep t) (coerce v) m)
where
coerce :: TM.Item x t -> Any
coerce = unsafeCoerce
-- | Lookup an element indexed by t... | 328 | insert t v (CTypeMap (c, TM.TypeMap m)) = CTypeMap . (c,) $ TM.TypeMap (Map.insert (typeRep t) (coerce v) m)
where
coerce :: TM.Item x t -> Any
coerce = unsafeCoerce
-- | Lookup an element indexed by type @t@. | 220 | false | true | 0 | 10 | 79 | 156 | 79 | 77 | null | null |
sebastiaanvisser/salvia-extras | src/Util/Terminal.hs | bsd-3-clause | moveForward cs = esc "" [show cs] "C" | 37 | moveForward cs = esc "" [show cs] "C" | 37 | moveForward cs = esc "" [show cs] "C" | 37 | false | false | 0 | 7 | 7 | 22 | 10 | 12 | null | null |
Concelo/concelo | src/Database/Concelo/Trie.hs | bsd-3-clause | empty = Trie $ V.empty | 22 | empty = Trie $ V.empty | 22 | empty = Trie $ V.empty | 22 | false | false | 3 | 6 | 4 | 17 | 6 | 11 | null | null |
stgm/prac-testing | week4/TAMO.hs | mit | test3b = logEquiv2 (\ p q -> not (p ==> q)) (\ p q -> p && not q) | 65 | test3b = logEquiv2 (\ p q -> not (p ==> q)) (\ p q -> p && not q) | 65 | test3b = logEquiv2 (\ p q -> not (p ==> q)) (\ p q -> p && not q) | 65 | false | false | 1 | 10 | 18 | 52 | 25 | 27 | null | null |
federicotdn/hvc | src/DirTreeUtils.hs | gpl-3.0 | makeTreeRelative :: FilePath -> DirTree a -> DirTree a
makeTreeRelative path =
foldDirTree (DirNode . (makeRelative path))
id
(FileNode . (makeRelative path)) | 188 | makeTreeRelative :: FilePath -> DirTree a -> DirTree a
makeTreeRelative path =
foldDirTree (DirNode . (makeRelative path))
id
(FileNode . (makeRelative path)) | 188 | makeTreeRelative path =
foldDirTree (DirNode . (makeRelative path))
id
(FileNode . (makeRelative path)) | 133 | false | true | 0 | 9 | 51 | 68 | 31 | 37 | null | null |
iteloo/tsuru-sample | iteratee-0.8.9.6/tests/testIteratee.hs | bsd-3-clause | prop_breakE2 f xs = runner1 (enumPure1Chunk xs (joinI (Iter.breakE f stream2stream) >> stream2list)) == snd (break f xs)
where types = xs :: [Int] | 148 | prop_breakE2 f xs = runner1 (enumPure1Chunk xs (joinI (Iter.breakE f stream2stream) >> stream2list)) == snd (break f xs)
where types = xs :: [Int] | 148 | prop_breakE2 f xs = runner1 (enumPure1Chunk xs (joinI (Iter.breakE f stream2stream) >> stream2list)) == snd (break f xs)
where types = xs :: [Int] | 148 | false | false | 0 | 14 | 25 | 71 | 35 | 36 | null | null |
hpacheco/HAAP | examples/plab/oracle/BotHugo.hs | mit | ladoPonto Oeste (intToDouble -> x,intToDouble -> y) = (x+0.01,y+0.5) | 68 | ladoPonto Oeste (intToDouble -> x,intToDouble -> y) = (x+0.01,y+0.5) | 68 | ladoPonto Oeste (intToDouble -> x,intToDouble -> y) = (x+0.01,y+0.5) | 68 | false | false | 0 | 6 | 8 | 41 | 21 | 20 | null | null |
gamelost/pcgen-rules | src/Common.hs | apache-2.0 | yesOrNo :: PParser Bool
yesOrNo = liftM (== "YES") allCaps | 58 | yesOrNo :: PParser Bool
yesOrNo = liftM (== "YES") allCaps | 58 | yesOrNo = liftM (== "YES") allCaps | 34 | false | true | 0 | 6 | 9 | 30 | 13 | 17 | null | null |
johntyree/ghc-mod | ErrMsg.hs | bsd-3-clause | setLogger True df = do
ref <- newIORef [] :: IO (IORef [String])
let newdf = df { log_action = appendLog ref }
return (newdf, reverse <$> readIORef ref)
where
appendLog ref _ src stl msg = modifyIORef ref (\ls -> ppMsg src msg stl : ls)
---------------------------------------------------------------... | 321 | setLogger True df = do
ref <- newIORef [] :: IO (IORef [String])
let newdf = df { log_action = appendLog ref }
return (newdf, reverse <$> readIORef ref)
where
appendLog ref _ src stl msg = modifyIORef ref (\ls -> ppMsg src msg stl : ls)
---------------------------------------------------------------... | 321 | setLogger True df = do
ref <- newIORef [] :: IO (IORef [String])
let newdf = df { log_action = appendLog ref }
return (newdf, reverse <$> readIORef ref)
where
appendLog ref _ src stl msg = modifyIORef ref (\ls -> ppMsg src msg stl : ls)
---------------------------------------------------------------... | 321 | false | false | 0 | 12 | 67 | 120 | 59 | 61 | null | null |
lwm/haskellnews | src/TagSoup.hs | bsd-3-clause | skipTagByNameClass :: String -> String -> Soup()
skipTagByNameClass name cls =
skipTagByNameAttrs name
(any (\(key,value) -> key == "class" && any (==cls) (words value))) | 193 | skipTagByNameClass :: String -> String -> Soup()
skipTagByNameClass name cls =
skipTagByNameAttrs name
(any (\(key,value) -> key == "class" && any (==cls) (words value))) | 193 | skipTagByNameClass name cls =
skipTagByNameAttrs name
(any (\(key,value) -> key == "class" && any (==cls) (words value))) | 144 | false | true | 0 | 13 | 46 | 77 | 40 | 37 | null | null |
tekul/cryptonite | tests/KAT_HMAC.hs | bsd-3-clause | keccak_224_MAC_Vectors :: [MACVector Keccak_224]
keccak_224_MAC_Vectors =
[ MACVector keccak_key1 keccak_data1 $ digest "\xe8\x24\xfe\xc9\x6c\x07\x4f\x22\xf9\x92\x35\xbb\x94\x2d\xa1\x98\x26\x64\xab\x69\x2c\xa8\x50\x10\x53\xcb\xd4\x14"
] | 244 | keccak_224_MAC_Vectors :: [MACVector Keccak_224]
keccak_224_MAC_Vectors =
[ MACVector keccak_key1 keccak_data1 $ digest "\xe8\x24\xfe\xc9\x6c\x07\x4f\x22\xf9\x92\x35\xbb\x94\x2d\xa1\x98\x26\x64\xab\x69\x2c\xa8\x50\x10\x53\xcb\xd4\x14"
] | 244 | keccak_224_MAC_Vectors =
[ MACVector keccak_key1 keccak_data1 $ digest "\xe8\x24\xfe\xc9\x6c\x07\x4f\x22\xf9\x92\x35\xbb\x94\x2d\xa1\x98\x26\x64\xab\x69\x2c\xa8\x50\x10\x53\xcb\xd4\x14"
] | 195 | false | true | 0 | 7 | 21 | 32 | 16 | 16 | null | null |
vikraman/ghc | libraries/template-haskell/Language/Haskell/TH/Ppr.hs | bsd-3-clause | pprMaybeExp i (Just e) = pprExp i e | 35 | pprMaybeExp i (Just e) = pprExp i e | 35 | pprMaybeExp i (Just e) = pprExp i e | 35 | false | false | 0 | 7 | 7 | 22 | 10 | 12 | null | null |
ekmett/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcTypes.hs | lgpl-2.1 | withColourRef :: String -> Color -> (Ptr (TColour a) -> IO b) -> IO b
withColourRef msg c f
= withColourPtr c $ \p -> withValidPtr msg p f | 140 | withColourRef :: String -> Color -> (Ptr (TColour a) -> IO b) -> IO b
withColourRef msg c f
= withColourPtr c $ \p -> withValidPtr msg p f | 140 | withColourRef msg c f
= withColourPtr c $ \p -> withValidPtr msg p f | 70 | false | true | 0 | 12 | 30 | 71 | 34 | 37 | null | null |
SjorsVanGelderen/Conway | Conway.hs | mit | primeSequence :: Conditions -> Rules r -> Generations -> Options -> Conditions
primeSequence c r g o = c | 104 | primeSequence :: Conditions -> Rules r -> Generations -> Options -> Conditions
primeSequence c r g o = c | 104 | primeSequence c r g o = c | 25 | false | true | 0 | 10 | 18 | 45 | 20 | 25 | null | null |
gorkinovich/Haskell | Checkers/src/Console/Console.hs | mit | checkCmdMov::String -> Command
checkCmdMov text
| cond = checkCmdMovEx (dropToken line) (tokens-1)
| otherwise = CmdNone
where line = (quitSpaces text)
tokens = (countTokens line)
cond = ((getToken line 1) == "move") && (tokens > 3)
-- ***********************************************************... | 715 | checkCmdMov::String -> Command
checkCmdMov text
| cond = checkCmdMovEx (dropToken line) (tokens-1)
| otherwise = CmdNone
where line = (quitSpaces text)
tokens = (countTokens line)
cond = ((getToken line 1) == "move") && (tokens > 3)
-- ***********************************************************... | 715 | checkCmdMov text
| cond = checkCmdMovEx (dropToken line) (tokens-1)
| otherwise = CmdNone
where line = (quitSpaces text)
tokens = (countTokens line)
cond = ((getToken line 1) == "move") && (tokens > 3)
-- *********************************************************************************
-- ... | 684 | false | true | 7 | 10 | 117 | 120 | 63 | 57 | null | null |
snoyberg/ghc | libraries/base/GHC/Show.hs | bsd-3-clause | -- | utility function converting a 'String' to a show function that
-- simply prepends the string unchanged.
showString :: String -> ShowS
showString = (++) | 167 | showString :: String -> ShowS
showString = (++) | 58 | showString = (++) | 23 | true | true | 0 | 7 | 36 | 26 | 13 | 13 | null | null |
yliu120/K3 | src/Language/K3/Codegen/CPP/Declaration.hs | apache-2.0 | genDoRead :: String -> K3 Type -> String -> CPPGenM R.Definition
genDoRead suf typ name = do
ret_type <- genCType $ last $ children typ
let source_name = stripSuffix suf name
let result_dec = R.Forward $ R.ScalarDecl (R.Name "result") (R.SharedPointer ret_type) $ Just $
(R.Call (R... | 943 | genDoRead :: String -> K3 Type -> String -> CPPGenM R.Definition
genDoRead suf typ name = do
ret_type <- genCType $ last $ children typ
let source_name = stripSuffix suf name
let result_dec = R.Forward $ R.ScalarDecl (R.Name "result") (R.SharedPointer ret_type) $ Just $
(R.Call (R... | 943 | genDoRead suf typ name = do
ret_type <- genCType $ last $ children typ
let source_name = stripSuffix suf name
let result_dec = R.Forward $ R.ScalarDecl (R.Name "result") (R.SharedPointer ret_type) $ Just $
(R.Call (R.Project (R.Variable $ R.Name "__engine")
... | 878 | false | true | 0 | 18 | 281 | 345 | 170 | 175 | null | null |
micknelso/language-c | src/Language/CFamily/C/Syntax/Ops.hs | bsd-3-clause | assignBinop CDivAssOp = CDivOp | 30 | assignBinop CDivAssOp = CDivOp | 30 | assignBinop CDivAssOp = CDivOp | 30 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
Teaspot-Studio/Urho3D-Haskell | src/Graphics/Urho3D/UI/BorderImage.hs | mit | borderImageSetImageRect :: (Parent BorderImage a, Pointer p a, MonadIO m)
=> p -- ^ Pointer to BorderImage or child
-> IntRect -- ^ Part of texture to use as the image
-> m ()
borderImageSetImageRect p r = liftIO $ with r $ \r' -> do
let ptr = parentPointer p
[C.exp| void {$(BorderImage* ptr)->SetImageRect(*$... | 376 | borderImageSetImageRect :: (Parent BorderImage a, Pointer p a, MonadIO m)
=> p -- ^ Pointer to BorderImage or child
-> IntRect -- ^ Part of texture to use as the image
-> m ()
borderImageSetImageRect p r = liftIO $ with r $ \r' -> do
let ptr = parentPointer p
[C.exp| void {$(BorderImage* ptr)->SetImageRect(*$... | 376 | borderImageSetImageRect p r = liftIO $ with r $ \r' -> do
let ptr = parentPointer p
[C.exp| void {$(BorderImage* ptr)->SetImageRect(*$(IntRect* r'))} |]
-- | Use whole texture as the image. | 194 | false | true | 0 | 12 | 75 | 99 | 50 | 49 | null | null |
rossng/CspBookHs | src/Csp/Csp.hs | bsd-3-clause | catenate :: Trace -> Trace -> Trace
catenate = (⌒) | 50 | catenate :: Trace -> Trace -> Trace
catenate = (⌒) | 50 | catenate = (⌒) | 14 | false | true | 0 | 8 | 9 | 28 | 13 | 15 | null | null |
ekmett/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxBLACK :: Int
wxBLACK = 0 | 26 | wxBLACK :: Int
wxBLACK = 0 | 26 | wxBLACK = 0 | 11 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
edom/dns-server | DNS/Lens/Inside.hs | bsd-3-clause | rcode :: Inside D.RCODE D.DNSFlags
rcode = mkWithSet D.rcode (\ x y -> y { D.rcode = x }) | 89 | rcode :: Inside D.RCODE D.DNSFlags
rcode = mkWithSet D.rcode (\ x y -> y { D.rcode = x }) | 89 | rcode = mkWithSet D.rcode (\ x y -> y { D.rcode = x }) | 54 | false | true | 0 | 9 | 18 | 54 | 26 | 28 | null | null |
prt2121/haskell-practice | parconc/geturlscancel2.hs | apache-2.0 | timeDownload :: String -> IO ()
timeDownload url = do
(page, time) <- timeit $ getURL url
printf "downloaded: %s (%d bytes, %.2fs)\n" url (B.length page) time
-- <<main | 173 | timeDownload :: String -> IO ()
timeDownload url = do
(page, time) <- timeit $ getURL url
printf "downloaded: %s (%d bytes, %.2fs)\n" url (B.length page) time
-- <<main | 173 | timeDownload url = do
(page, time) <- timeit $ getURL url
printf "downloaded: %s (%d bytes, %.2fs)\n" url (B.length page) time
-- <<main | 141 | false | true | 0 | 11 | 33 | 68 | 32 | 36 | null | null |
vTurbine/ghc | compiler/basicTypes/DataCon.hs | bsd-3-clause | -- | The representation type of the data constructor, i.e. the sort
-- type that will represent values of this type at runtime
dataConRepType :: DataCon -> Type
dataConRepType = dcRepType | 187 | dataConRepType :: DataCon -> Type
dataConRepType = dcRepType | 60 | dataConRepType = dcRepType | 26 | true | true | 0 | 5 | 30 | 17 | 10 | 7 | null | null |
hvr/lens | src/Control/Exception/Lens.hs | bsd-3-clause | -- | Handle division by zero.
--
-- @
-- '_DivideByZero' ≡ '_ArithException' '.' '_DivideByZero'
-- @
--
-- @
-- '_DivideByZero' :: 'Prism'' 'ArithException' 'ArithException'
-- '_DivideByZero' :: 'Prism'' 'SomeException' 'ArithException'
-- @
_DivideByZero :: AsArithException t => Prism' t ()
_DivideByZero = _ArithEx... | 460 | _DivideByZero :: AsArithException t => Prism' t ()
_DivideByZero = _ArithException . dimap seta (either id id) . right' . rmap (DivideByZero <$) where
seta DivideByZero = Right ()
seta t = Left (pure t)
| 215 | _DivideByZero = _ArithException . dimap seta (either id id) . right' . rmap (DivideByZero <$) where
seta DivideByZero = Right ()
seta t = Left (pure t)
| 164 | true | true | 0 | 10 | 82 | 99 | 53 | 46 | null | null |
brunjlar/pell | Math/NumberTheory/Pell/Test/Solve.hs | mit | genD :: Gen Integer
genD = scale (* 2) $ suchThat arbitrary isProperD | 69 | genD :: Gen Integer
genD = scale (* 2) $ suchThat arbitrary isProperD | 69 | genD = scale (* 2) $ suchThat arbitrary isProperD | 49 | false | true | 0 | 7 | 12 | 30 | 15 | 15 | null | null |
jean-edouard/manager | rpc-proxy/Msg/JsonRpc.hs | gpl-2.0 | jrespFromJson :: JSValue -> Maybe JResp
jrespFromJson (JSObject v) = from (fromJSObject v)
where
from kv
= JResp
<$> (JReqID <$> ("id" `nget` kv))
<*> (JReqID <$> ("response-to" `nget` kv))
<*> pure (s "dbus-signature")
<*> (mapM arg =<< arr "args")
where ... | 500 | jrespFromJson :: JSValue -> Maybe JResp
jrespFromJson (JSObject v) = from (fromJSObject v)
where
from kv
= JResp
<$> (JReqID <$> ("id" `nget` kv))
<*> (JReqID <$> ("response-to" `nget` kv))
<*> pure (s "dbus-signature")
<*> (mapM arg =<< arr "args")
where ... | 500 | jrespFromJson (JSObject v) = from (fromJSObject v)
where
from kv
= JResp
<$> (JReqID <$> ("id" `nget` kv))
<*> (JReqID <$> ("response-to" `nget` kv))
<*> pure (s "dbus-signature")
<*> (mapM arg =<< arr "args")
where s k = TL.pack <$> k `sget` kv
... | 460 | false | true | 0 | 12 | 205 | 184 | 95 | 89 | null | null |
lambda-zorn/det | src/Server.hs | bsd-3-clause | sendMessageTo :: Msg -> (String, String) -> IO ()
sendMessageTo msg addr =
do tried <- try $ getSock (fst addr) (snd addr)
:: IO (Either SomeException Socket)
case tried of
Left e -> putErr (show e)
Right sock -> do
send sock $ encode msg
putStrLn $ "Message... | 365 | sendMessageTo :: Msg -> (String, String) -> IO ()
sendMessageTo msg addr =
do tried <- try $ getSock (fst addr) (snd addr)
:: IO (Either SomeException Socket)
case tried of
Left e -> putErr (show e)
Right sock -> do
send sock $ encode msg
putStrLn $ "Message... | 365 | sendMessageTo msg addr =
do tried <- try $ getSock (fst addr) (snd addr)
:: IO (Either SomeException Socket)
case tried of
Left e -> putErr (show e)
Right sock -> do
send sock $ encode msg
putStrLn $ "Message sent to " ++ (fst addr) ++ ":" ++ (snd addr) | 315 | false | true | 0 | 16 | 121 | 160 | 74 | 86 | null | null |
Xophmeister/tapestry | Palette.hs | mit | getToken :: (Eq a, Colour a) => [a] -> [Char] -> a -> Maybe Char
getToken palette tokens colour = case elemIndex colour palette of
Just i -> Just (tokens !! i)
Nothing -> Nothing | 183 | getToken :: (Eq a, Colour a) => [a] -> [Char] -> a -> Maybe Char
getToken palette tokens colour = case elemIndex colour palette of
Just i -> Just (tokens !! i)
Nothing -> Nothing | 183 | getToken palette tokens colour = case elemIndex colour palette of
Just i -> Just (tokens !! i)
Nothing -> Nothing | 118 | false | true | 0 | 10 | 39 | 93 | 45 | 48 | null | null |
martin-kolinek/stack | src/Stack/Types/Compiler.hs | bsd-3-clause | compilerVersionString :: CompilerVersion a -> String
compilerVersionString = T.unpack . compilerVersionText | 107 | compilerVersionString :: CompilerVersion a -> String
compilerVersionString = T.unpack . compilerVersionText | 107 | compilerVersionString = T.unpack . compilerVersionText | 54 | false | true | 0 | 6 | 10 | 24 | 12 | 12 | null | null |
GRACeFUL-project/haskelzinc | src/Interfaces/MZAST.hs | bsd-3-clause | decideWhere :: Maybe Expr -> Maybe Expr -> Maybe Expr
decideWhere Nothing Nothing = Nothing | 95 | decideWhere :: Maybe Expr -> Maybe Expr -> Maybe Expr
decideWhere Nothing Nothing = Nothing | 95 | decideWhere Nothing Nothing = Nothing | 41 | false | true | 0 | 7 | 18 | 33 | 15 | 18 | null | null |
pikajude/melvin | src/Melvin/Types.hs | mit | mkPrivclass :: Int -> Text -> Privclass
mkPrivclass n t = Privclass n t (toSymbol n)
where toSymbol s
| s == 99 = Founder
| s >= 70 = Op
| s >= 35 = Voice
| otherwise = None | 225 | mkPrivclass :: Int -> Text -> Privclass
mkPrivclass n t = Privclass n t (toSymbol n)
where toSymbol s
| s == 99 = Founder
| s >= 70 = Op
| s >= 35 = Voice
| otherwise = None | 225 | mkPrivclass n t = Privclass n t (toSymbol n)
where toSymbol s
| s == 99 = Founder
| s >= 70 = Op
| s >= 35 = Voice
| otherwise = None | 185 | false | true | 0 | 8 | 92 | 110 | 48 | 62 | null | null |
loadimpact/http2-test | hs-src/Rede/Research/ResearchWorker.hs | bsd-3-clause | -- |SystemCancelled_CAS
-- |Done_CAS
-- Time to wait before unleashing an alarm...
timeForAlarm :: Int
timeForAlarm = 40000000 | 134 | timeForAlarm :: Int
timeForAlarm = 40000000 | 43 | timeForAlarm = 40000000 | 23 | true | true | 0 | 4 | 25 | 14 | 9 | 5 | null | null |
mettekou/ghc | libraries/ghci/GHCi/Run.hs | bsd-3-clause | evalStringToString :: HValueRef -> String -> IO (EvalResult String)
evalStringToString r str = do
io <- localRef r
tryEval $ do
r <- (unsafeCoerce io :: String -> IO String) str
evaluate (force r)
-- When running a computation, we redirect ^C exceptions to the running
-- thread. ToDo: we might want a way ... | 739 | evalStringToString :: HValueRef -> String -> IO (EvalResult String)
evalStringToString r str = do
io <- localRef r
tryEval $ do
r <- (unsafeCoerce io :: String -> IO String) str
evaluate (force r)
-- When running a computation, we redirect ^C exceptions to the running
-- thread. ToDo: we might want a way ... | 739 | evalStringToString r str = do
io <- localRef r
tryEval $ do
r <- (unsafeCoerce io :: String -> IO String) str
evaluate (force r)
-- When running a computation, we redirect ^C exceptions to the running
-- thread. ToDo: we might want a way to continue even if the target
-- thread doesn't die when it receive... | 671 | false | true | 0 | 15 | 140 | 102 | 50 | 52 | null | null |
paradoxix/haskellplayground | src/Lib.hs | bsd-3-clause | listUsersHandler :: ActionT Except WebM ()
listUsersHandler = do
p <- webM $ ask >>= return . databasePool
userIds <- liftAndCatchIO $ allUserIds p
json userIds | 166 | listUsersHandler :: ActionT Except WebM ()
listUsersHandler = do
p <- webM $ ask >>= return . databasePool
userIds <- liftAndCatchIO $ allUserIds p
json userIds | 166 | listUsersHandler = do
p <- webM $ ask >>= return . databasePool
userIds <- liftAndCatchIO $ allUserIds p
json userIds | 123 | false | true | 0 | 10 | 31 | 59 | 27 | 32 | null | null |
LinusU/fbthrift | thrift/lib/hs/Thrift/Protocol/JSON.hs | apache-2.0 | parseJSONValue T_FLOAT = TFloat . realToFrac <$> double | 55 | parseJSONValue T_FLOAT = TFloat . realToFrac <$> double | 55 | parseJSONValue T_FLOAT = TFloat . realToFrac <$> double | 55 | false | false | 0 | 6 | 7 | 17 | 8 | 9 | null | null |
portnov/simple-pascal-compiler | Language/Pascal/TypeCheck.hs | lgpl-3.0 | getSymbol :: Throws (Located TypeError) e => Id -> Check e Symbol
getSymbol name = do
table <- gets symbolTable
case lookupSymbol name table of
Nothing -> failCheck UnknownSymbol name
Just s -> return s | 215 | getSymbol :: Throws (Located TypeError) e => Id -> Check e Symbol
getSymbol name = do
table <- gets symbolTable
case lookupSymbol name table of
Nothing -> failCheck UnknownSymbol name
Just s -> return s | 215 | getSymbol name = do
table <- gets symbolTable
case lookupSymbol name table of
Nothing -> failCheck UnknownSymbol name
Just s -> return s | 149 | false | true | 0 | 10 | 47 | 83 | 37 | 46 | null | null |
mgmillani/pictikz | src/Pictikz/Parser.hs | gpl-3.0 | readHexa xyz =
let hexa = map digitToInt xyz
in case hexa of
(xh:xl:yh:yl:zh:zl:[]) -> ((xh*16 + xl), (yh*16 + yl), (zh*16 + zl))
(x:y:z:[]) -> ((x*17), (y*17), (z*17)) | 180 | readHexa xyz =
let hexa = map digitToInt xyz
in case hexa of
(xh:xl:yh:yl:zh:zl:[]) -> ((xh*16 + xl), (yh*16 + yl), (zh*16 + zl))
(x:y:z:[]) -> ((x*17), (y*17), (z*17)) | 180 | readHexa xyz =
let hexa = map digitToInt xyz
in case hexa of
(xh:xl:yh:yl:zh:zl:[]) -> ((xh*16 + xl), (yh*16 + yl), (zh*16 + zl))
(x:y:z:[]) -> ((x*17), (y*17), (z*17)) | 180 | false | false | 0 | 17 | 40 | 159 | 85 | 74 | null | null |
ktvoelker/state-record | examples/old/Foo.hs | gpl-3.0 | -- | Run this example.
runOne = runState one $ Bar (Foo 0 1) (Foo 2 3) | 70 | runOne = runState one $ Bar (Foo 0 1) (Foo 2 3) | 47 | runOne = runState one $ Bar (Foo 0 1) (Foo 2 3) | 47 | true | false | 3 | 7 | 16 | 40 | 17 | 23 | null | null |
sourcewave/pg-schema-diff | Trigger.hs | unlicense | showTrigger x = concat [schema x, ".", relation x, "." , name x] | 64 | showTrigger x = concat [schema x, ".", relation x, "." , name x] | 64 | showTrigger x = concat [schema x, ".", relation x, "." , name x] | 64 | false | false | 1 | 7 | 12 | 39 | 18 | 21 | null | null |
vikraman/ghc | compiler/coreSyn/CoreFVs.hs | bsd-3-clause | orphNamesOfCo (SymCo co) = orphNamesOfCo co | 54 | orphNamesOfCo (SymCo co) = orphNamesOfCo co | 54 | orphNamesOfCo (SymCo co) = orphNamesOfCo co | 54 | false | false | 0 | 7 | 16 | 18 | 8 | 10 | null | null |
mmarx/jebediah | cli/spaceplane-hangar/Main.hs | gpl-3.0 | lead1A = toLead1 id $ sub | 25 | lead1A = toLead1 id $ sub | 25 | lead1A = toLead1 id $ sub | 25 | false | false | 0 | 6 | 5 | 13 | 6 | 7 | null | null |
danr/hipspec | examples/old-examples/quickspec/ProductiveUseOfFailure.hs | gpl-3.0 | half (S Z) = Z | 14 | half (S Z) = Z | 14 | half (S Z) = Z | 14 | false | false | 0 | 6 | 4 | 16 | 7 | 9 | null | null |
wjt/bustle | Bustle/UI/DetailsView.hs | lgpl-2.1 | getDestination :: Detailed Message -> Maybe TaggedBusName
getDestination (Detailed _ m _ _) = case m of
Signal { signalDestination = d } -> d
_ -> Just (destination m) | 206 | getDestination :: Detailed Message -> Maybe TaggedBusName
getDestination (Detailed _ m _ _) = case m of
Signal { signalDestination = d } -> d
_ -> Just (destination m) | 206 | getDestination (Detailed _ m _ _) = case m of
Signal { signalDestination = d } -> d
_ -> Just (destination m) | 148 | false | true | 3 | 7 | 68 | 71 | 34 | 37 | null | null |
dylanmc/cryptol | sbv/Data/SBV/SMT/SMTLib2.hs | bsd-3-clause | -- | Translate a problem into an SMTLib2 script
cvt :: RoundingMode -- ^ User selected rounding mode to be used for floating point arithmetic
-> SolverCapabilities -- ^ capabilities of the current solver
-> Set.Set Kind -- ^ kinds used
-> Bool ... | 6,599 | cvt :: RoundingMode -- ^ User selected rounding mode to be used for floating point arithmetic
-> SolverCapabilities -- ^ capabilities of the current solver
-> Set.Set Kind -- ^ kinds used
-> Bool -- ^ is this a sat problem?
-> [String] ... | 6,551 | cvt rm solverCaps kindInfo isSat comments inputs skolemInps consts tbls arrs uis axs (SBVPgm asgnsSeq) cstrs out = (pre, [])
where -- the logic is an over-approaximation
hasInteger = KUnbounded `Set.member` kindInfo
hasReal = KReal `Set.member` kindInfo
hasFloat = KFloat `Set.mem... | 5,554 | true | true | 58 | 40 | 2,577 | 1,679 | 916 | 763 | null | null |
rakete/ObjViewer | src/Parser/ObjParser.hs | bsd-3-clause | many3 :: GenParser tok st a -> GenParser tok st [a]
many3 p = do{ x <- p; y <- p; z <- p; xs <- many p; return (x:y:z:xs) } | 123 | many3 :: GenParser tok st a -> GenParser tok st [a]
many3 p = do{ x <- p; y <- p; z <- p; xs <- many p; return (x:y:z:xs) } | 123 | many3 p = do{ x <- p; y <- p; z <- p; xs <- many p; return (x:y:z:xs) } | 71 | false | true | 0 | 11 | 30 | 93 | 46 | 47 | null | null |
wfleming/advent-of-code-2016 | 2017/D11/src/D11Lib.hs | bsd-3-clause | parseDir :: Parser Dir
parseDir =
dir <$> choice
[ string "nw"
, string "ne"
, string "n"
, string "se"
, string "sw"
, string "s"
] | 218 | parseDir :: Parser Dir
parseDir =
dir <$> choice
[ string "nw"
, string "ne"
, string "n"
, string "se"
, string "sw"
, string "s"
] | 218 | parseDir =
dir <$> choice
[ string "nw"
, string "ne"
, string "n"
, string "se"
, string "sw"
, string "s"
] | 195 | false | true | 2 | 7 | 113 | 64 | 29 | 35 | null | null |
tolysz/dsp | DSP/Estimation/Frequency/FCI.hs | gpl-2.0 | rv :: (Ix a, Integral a, RealFloat b) => Array a (Complex b) -- ^ X[k]
-> a -- ^ k
-> b -- ^ w
rv x k = 2 * pi * ((fromIntegral k) + d) / (fromIntegral n)
where d = fromIntegral at * magnitude (x!(k+at) / x!k) / (1 + magnitude (x!(k+at) / x!k))
at | (magnitude (x!(k+1)))^!2 > (magnitude (x!... | 438 | rv :: (Ix a, Integral a, RealFloat b) => Array a (Complex b) -- ^ X[k]
-> a -- ^ k
-> b
rv x k = 2 * pi * ((fromIntegral k) + d) / (fromIntegral n)
where d = fromIntegral at * magnitude (x!(k+at) / x!k) / (1 + magnitude (x!(k+at) / x!k))
at | (magnitude (x!(k+1)))^!2 > (magnitude (x!(k-1)))^... | 430 | rv x k = 2 * pi * ((fromIntegral k) + d) / (fromIntegral n)
where d = fromIntegral at * magnitude (x!(k+at) / x!k) / (1 + magnitude (x!(k+at) / x!k))
at | (magnitude (x!(k+1)))^!2 > (magnitude (x!(k-1)))^!2 = 1
| otherwise = -1
n = snd (bound... | 328 | true | true | 0 | 18 | 170 | 257 | 133 | 124 | null | null |
apriori/daak | lib/DAAK/Algorithms/Gamo/Encoding.hs | mit | -- | Defines selection for a value of >= 0.5
useSelector :: Double -> Bool
useSelector = (>= 0.5) | 97 | useSelector :: Double -> Bool
useSelector = (>= 0.5) | 52 | useSelector = (>= 0.5) | 22 | true | true | 0 | 5 | 18 | 20 | 12 | 8 | null | null |
vikraman/ghc | compiler/main/HscMain.hs | bsd-3-clause | hscGetSafeMode :: TcGblEnv -> Hsc SafeHaskellMode
hscGetSafeMode tcg_env = do
dflags <- getDynFlags
liftIO $ finalSafeMode dflags tcg_env
--------------------------------------------------------------
-- Simplifiers
-------------------------------------------------------------- | 288 | hscGetSafeMode :: TcGblEnv -> Hsc SafeHaskellMode
hscGetSafeMode tcg_env = do
dflags <- getDynFlags
liftIO $ finalSafeMode dflags tcg_env
--------------------------------------------------------------
-- Simplifiers
-------------------------------------------------------------- | 288 | hscGetSafeMode tcg_env = do
dflags <- getDynFlags
liftIO $ finalSafeMode dflags tcg_env
--------------------------------------------------------------
-- Simplifiers
-------------------------------------------------------------- | 238 | false | true | 0 | 8 | 31 | 43 | 21 | 22 | null | null |
chrisdone/descriptive | src/Descriptive/Options.hs | bsd-3-clause | clean (Or (Or a b) None) = Or (clean a) (clean b) | 49 | clean (Or (Or a b) None) = Or (clean a) (clean b) | 49 | clean (Or (Or a b) None) = Or (clean a) (clean b) | 49 | false | false | 0 | 8 | 11 | 44 | 20 | 24 | null | null |
meiersi/scyther-proof | src/Scyther/Theory/FOL.hs | gpl-3.0 | encMsg (MHash x) = F.apply hashF <$> sequenceA [encMsg x] | 61 | encMsg (MHash x) = F.apply hashF <$> sequenceA [encMsg x] | 61 | encMsg (MHash x) = F.apply hashF <$> sequenceA [encMsg x] | 61 | false | false | 0 | 8 | 13 | 34 | 15 | 19 | null | null |
GaloisInc/halvm-ghc | libraries/template-haskell/Language/Haskell/TH/Lib.hs | bsd-3-clause | pragAnnD :: AnnTarget -> ExpQ -> DecQ
pragAnnD target expr
= do
exp1 <- expr
return $ PragmaD $ AnnP target exp1 | 126 | pragAnnD :: AnnTarget -> ExpQ -> DecQ
pragAnnD target expr
= do
exp1 <- expr
return $ PragmaD $ AnnP target exp1 | 126 | pragAnnD target expr
= do
exp1 <- expr
return $ PragmaD $ AnnP target exp1 | 88 | false | true | 0 | 8 | 35 | 47 | 22 | 25 | null | null |
anton-dessiatov/stack | src/Stack/Build/Target.hs | bsd-3-clause | combineResolveResults
:: forall env. HasLogFunc env
=> [ResolveResult]
-> RIO env ([Text], Map PackageName Target, Map PackageName (PackageLocationIndex FilePath))
combineResolveResults results = do
addedDeps <- fmap Map.unions $ forM results $ \result ->
case rrAddedDep result of
Nothing -> ret... | 1,757 | combineResolveResults
:: forall env. HasLogFunc env
=> [ResolveResult]
-> RIO env ([Text], Map PackageName Target, Map PackageName (PackageLocationIndex FilePath))
combineResolveResults results = do
addedDeps <- fmap Map.unions $ forM results $ \result ->
case rrAddedDep result of
Nothing -> ret... | 1,757 | combineResolveResults results = do
addedDeps <- fmap Map.unions $ forM results $ \result ->
case rrAddedDep result of
Nothing -> return Map.empty
Just version -> do
let ident = PackageIdentifier (rrName result) version
return $ Map.singleton (rrName result) $ PLIndex $ Pack... | 1,587 | false | true | 0 | 25 | 519 | 471 | 229 | 242 | null | null |
elieux/ghc | compiler/main/HscTypes.hs | bsd-3-clause | msHsFilePath, msHiFilePath, msObjFilePath :: ModSummary -> FilePath
msHsFilePath ms = expectJust "msHsFilePath" (ml_hs_file (ms_location ms)) | 143 | msHsFilePath, msHiFilePath, msObjFilePath :: ModSummary -> FilePath
msHsFilePath ms = expectJust "msHsFilePath" (ml_hs_file (ms_location ms)) | 143 | msHsFilePath ms = expectJust "msHsFilePath" (ml_hs_file (ms_location ms)) | 75 | false | true | 0 | 9 | 16 | 39 | 21 | 18 | null | null |
fhsjaagshs/niagra | src/Data/Niagra/Properties/Font.hs | mit | {- INTERNAL -}
commaSeparate :: [Builder] -> Builder
commaSeparate = f mempty True
where
f a _ [] = a
f a True (x:xs) = f x False xs
f a False (x:xs) = f (a <> singleton ',' <> x) False xs
{-
TODO
font-feature-settings Allows control over advanced typographic features in OpenType fonts 3
font-kerning C... | 892 | commaSeparate :: [Builder] -> Builder
commaSeparate = f mempty True
where
f a _ [] = a
f a True (x:xs) = f x False xs
f a False (x:xs) = f (a <> singleton ',' <> x) False xs
{-
TODO
font-feature-settings Allows control over advanced typographic features in OpenType fonts 3
font-kerning Controls the usag... | 876 | commaSeparate = f mempty True
where
f a _ [] = a
f a True (x:xs) = f x False xs
f a False (x:xs) = f (a <> singleton ',' <> x) False xs
{-
TODO
font-feature-settings Allows control over advanced typographic features in OpenType fonts 3
font-kerning Controls the usage of the kerning information (how lett... | 838 | true | true | 0 | 9 | 158 | 108 | 55 | 53 | null | null |
jgardella/nancy | src/Nancy/Core/Language.hs | mit | mapTrail _ trailFunc typeFunc (LamTrail var varType lamTrail) =
LamTrail var (typeFunc varType) (trailFunc lamTrail) | 118 | mapTrail _ trailFunc typeFunc (LamTrail var varType lamTrail) =
LamTrail var (typeFunc varType) (trailFunc lamTrail) | 118 | mapTrail _ trailFunc typeFunc (LamTrail var varType lamTrail) =
LamTrail var (typeFunc varType) (trailFunc lamTrail) | 118 | false | false | 0 | 7 | 16 | 44 | 21 | 23 | null | null |
DaMSL/K3 | src/Language/K3/Interpreter/Values.hs | apache-2.0 | orderingAsInt GT = 1 | 20 | orderingAsInt GT = 1 | 20 | orderingAsInt GT = 1 | 20 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
brendanhay/gogol | gogol-compute/gen/Network/Google/Resource/Compute/Addresses/AggregatedList.hs | mpl-2.0 | -- | Indicates whether every visible scope for each scope type (zone, region,
-- global) should be included in the response. For new resource types added
-- after this field, the flag has no effect as new resource types will
-- always include every visible scope for each scope type in response. For
-- resource types wh... | 641 | aalIncludeAllScopes :: Lens' AddressesAggregatedList (Maybe Bool)
aalIncludeAllScopes
= lens _aalIncludeAllScopes
(\ s a -> s{_aalIncludeAllScopes = a}) | 160 | aalIncludeAllScopes
= lens _aalIncludeAllScopes
(\ s a -> s{_aalIncludeAllScopes = a}) | 94 | true | true | 0 | 9 | 111 | 54 | 31 | 23 | null | null |
ruicc/structured-concurrent | src/Control/Concurrent/Structured/Async.hs | mit | waitEitherCatch :: A.Async a -> A.Async b -> CIO r (Either (Either E.SomeException a) (Either E.SomeException b))
waitEitherCatch a b = liftIO $ A.waitEitherCatch a b | 166 | waitEitherCatch :: A.Async a -> A.Async b -> CIO r (Either (Either E.SomeException a) (Either E.SomeException b))
waitEitherCatch a b = liftIO $ A.waitEitherCatch a b | 166 | waitEitherCatch a b = liftIO $ A.waitEitherCatch a b | 52 | false | true | 0 | 12 | 25 | 78 | 37 | 41 | null | null |
NCrashed/hjass | src/library/Language/Jass/Semantic/Type.hs | mit | -- | Returns variable type
inferVariableType :: TypeInfer m => SrcPos -> Name -> m JassType
inferVariableType src name = do
mvar <- findVariable name
case mvar of
Nothing -> throwError $ SemanticError src $ "Unknown variable " ++ name
Just var -> return $ getVarType var
-- | Is b type is more general t... | 330 | inferVariableType :: TypeInfer m => SrcPos -> Name -> m JassType
inferVariableType src name = do
mvar <- findVariable name
case mvar of
Nothing -> throwError $ SemanticError src $ "Unknown variable " ++ name
Just var -> return $ getVarType var
-- | Is b type is more general than a type | 303 | inferVariableType src name = do
mvar <- findVariable name
case mvar of
Nothing -> throwError $ SemanticError src $ "Unknown variable " ++ name
Just var -> return $ getVarType var
-- | Is b type is more general than a type | 238 | true | true | 0 | 13 | 74 | 90 | 42 | 48 | null | null |
termite2/simple-abstractor | SimpleAbstractor/Analysis.hs | bsd-3-clause | abstract (AST.CaseC cases) = join $ res <$> sequenceA subcases
where
subcases = map (abstract . snd) cases
res subcases = if' (all (==hd) rst) (return $ Return hd abs2 astR) (throwError "Different vars assigned in case branches")
where
(hd:rst) = map (sort . varsRet) subcases
... | 915 | abstract (AST.CaseC cases) = join $ res <$> sequenceA subcases
where
subcases = map (abstract . snd) cases
res subcases = if' (all (==hd) rst) (return $ Return hd abs2 astR) (throwError "Different vars assigned in case branches")
where
(hd:rst) = map (sort . varsRet) subcases
... | 915 | abstract (AST.CaseC cases) = join $ res <$> sequenceA subcases
where
subcases = map (abstract . snd) cases
res subcases = if' (all (==hd) rst) (return $ Return hd abs2 astR) (throwError "Different vars assigned in case branches")
where
(hd:rst) = map (sort . varsRet) subcases
... | 915 | false | false | 0 | 13 | 343 | 330 | 167 | 163 | null | null |
romanb/amazonka | amazonka-sqs/gen/Network/AWS/SQS/Types.hs | mpl-2.0 | -- | An error code representing why the action failed on this entry.
breeCode :: Lens' BatchResultErrorEntry Text
breeCode = lens _breeCode (\s a -> s { _breeCode = a }) | 169 | breeCode :: Lens' BatchResultErrorEntry Text
breeCode = lens _breeCode (\s a -> s { _breeCode = a }) | 100 | breeCode = lens _breeCode (\s a -> s { _breeCode = a }) | 55 | true | true | 0 | 9 | 30 | 40 | 22 | 18 | null | null |
zchn/ethereum-analyzer | ethereum-analyzer/src/Ethereum/Analyzer/Common.hs | apache-2.0 | unexpectedPanic
:: ShowText a
=> a -> b
unexpectedPanic n = panic $ "unexpected: " <> showText n | 100 | unexpectedPanic
:: ShowText a
=> a -> b
unexpectedPanic n = panic $ "unexpected: " <> showText n | 100 | unexpectedPanic n = panic $ "unexpected: " <> showText n | 56 | false | true | 0 | 6 | 21 | 39 | 18 | 21 | null | null |
IxpertaSolutions/windows-named-pipes | src/Data/Streaming/NamedPipes/Internal.hs | bsd-3-clause | getPipePath :: HasPipePath s => s -> PipePath
getPipePath = getConst . pipePathLens Const | 89 | getPipePath :: HasPipePath s => s -> PipePath
getPipePath = getConst . pipePathLens Const | 89 | getPipePath = getConst . pipePathLens Const | 43 | false | true | 1 | 8 | 13 | 36 | 15 | 21 | null | null |
colah/ImplicitCAD | tests/ParserSpec/Expr.hs | agpl-3.0 | literalSpec :: Spec
literalSpec = do
it "handles integers" $
"12356" --> num 12356
it "handles positive leading zero integers" $
"000012356" --> num 12356
it "handles zero integer" $
"0" --> num 0
it "handles leading zero integer" $
"0000" --> num 0
it "handles floats" $
"23.42" --> num 23... | 1,031 | literalSpec :: Spec
literalSpec = do
it "handles integers" $
"12356" --> num 12356
it "handles positive leading zero integers" $
"000012356" --> num 12356
it "handles zero integer" $
"0" --> num 0
it "handles leading zero integer" $
"0000" --> num 0
it "handles floats" $
"23.42" --> num 23... | 1,031 | literalSpec = do
it "handles integers" $
"12356" --> num 12356
it "handles positive leading zero integers" $
"000012356" --> num 12356
it "handles zero integer" $
"0" --> num 0
it "handles leading zero integer" $
"0000" --> num 0
it "handles floats" $
"23.42" --> num 23.42
it "handles fl... | 1,011 | false | true | 0 | 12 | 250 | 301 | 124 | 177 | null | null |
shlevy/ghc | compiler/typecheck/TcGenDeriv.hs | bsd-3-clause | gtAddr_RDR = varQual_RDR gHC_PRIM (fsLit "gtAddr#") | 56 | gtAddr_RDR = varQual_RDR gHC_PRIM (fsLit "gtAddr#") | 56 | gtAddr_RDR = varQual_RDR gHC_PRIM (fsLit "gtAddr#") | 56 | false | false | 0 | 7 | 10 | 17 | 8 | 9 | null | null |
HIPERFIT/futhark | src/Futhark/CodeGen/ImpGen.hs | isc | defCompileBasicOp _ Scratch {} =
return () | 44 | defCompileBasicOp _ Scratch {} =
return () | 44 | defCompileBasicOp _ Scratch {} =
return () | 44 | false | false | 0 | 6 | 8 | 20 | 9 | 11 | null | null |
zepto-lang/zepto | src/Zepto/Parser.hs | gpl-2.0 | parseHex :: Parser LispVal
parseHex = do _ <- try $ string "#x"
x <- many1 hexDigit
return $ fromSimple $ Number $ NumI (hex2dig x) | 159 | parseHex :: Parser LispVal
parseHex = do _ <- try $ string "#x"
x <- many1 hexDigit
return $ fromSimple $ Number $ NumI (hex2dig x) | 159 | parseHex = do _ <- try $ string "#x"
x <- many1 hexDigit
return $ fromSimple $ Number $ NumI (hex2dig x) | 132 | false | true | 0 | 10 | 53 | 62 | 28 | 34 | null | null |
adinapoli/xmonad-contrib | XMonad/Actions/DynamicWorkspaces.hs | bsd-3-clause | -- | Remove the current workspace.
removeWorkspace :: X ()
removeWorkspace = gets (currentTag . windowset) >>= removeWorkspaceByTag | 131 | removeWorkspace :: X ()
removeWorkspace = gets (currentTag . windowset) >>= removeWorkspaceByTag | 96 | removeWorkspace = gets (currentTag . windowset) >>= removeWorkspaceByTag | 72 | true | true | 0 | 7 | 17 | 37 | 17 | 20 | null | null |
glutamate/tnutils | TNUtils.hs | bsd-3-clause | thin n xs = let (x:_, ys) = splitAt (n+1) xs
in x : thin n ys | 73 | thin n xs = let (x:_, ys) = splitAt (n+1) xs
in x : thin n ys | 73 | thin n xs = let (x:_, ys) = splitAt (n+1) xs
in x : thin n ys | 73 | false | false | 0 | 11 | 28 | 55 | 26 | 29 | null | null |
DanBurton/MHask | MHask/Impl/Identity.hs | bsd-3-clause | fmap :: (Monad m, Monad n)
=> (m ~> n) -> (IdentityT m ~> IdentityT n)
fmap f m = IdentityT (f (runIdentityT m)) | 114 | fmap :: (Monad m, Monad n)
=> (m ~> n) -> (IdentityT m ~> IdentityT n)
fmap f m = IdentityT (f (runIdentityT m)) | 114 | fmap f m = IdentityT (f (runIdentityT m)) | 41 | false | true | 0 | 9 | 25 | 70 | 35 | 35 | null | null |
dougmvieira/MTSParser | MTS/LOB.hs | apache-2.0 | choice2 :: (Alternative f, Alternative g) => (f a, g b) -> (f a, g b) -> (f a, g b)
choice2 (x, y) (x', y') = (x <|> x', y <|> y') | 130 | choice2 :: (Alternative f, Alternative g) => (f a, g b) -> (f a, g b) -> (f a, g b)
choice2 (x, y) (x', y') = (x <|> x', y <|> y') | 130 | choice2 (x, y) (x', y') = (x <|> x', y <|> y') | 46 | false | true | 0 | 9 | 32 | 101 | 54 | 47 | null | null |
GaloisInc/gidl | src/Gidl/Backend/Haskell/Types.hs | bsd-3-clause | primTypeGetter :: PrimType -> Doc
primTypeGetter (Newtype tn _) = text "get" <> text (userTypeModuleName tn) | 108 | primTypeGetter :: PrimType -> Doc
primTypeGetter (Newtype tn _) = text "get" <> text (userTypeModuleName tn) | 108 | primTypeGetter (Newtype tn _) = text "get" <> text (userTypeModuleName tn) | 74 | false | true | 0 | 8 | 15 | 42 | 20 | 22 | null | null |
samscott89/tamarin-prover | lib/term/src/Term/Substitution/SubstVFree.hs | gpl-3.0 | prettyLNSubst :: (Show (Lit c LVar), Ord c, HighlightDocument d, Show c)
=> LSubst c -> d
prettyLNSubst = vcat . prettySubst (text . show) (text . show) | 166 | prettyLNSubst :: (Show (Lit c LVar), Ord c, HighlightDocument d, Show c)
=> LSubst c -> d
prettyLNSubst = vcat . prettySubst (text . show) (text . show) | 166 | prettyLNSubst = vcat . prettySubst (text . show) (text . show) | 62 | false | true | 0 | 8 | 41 | 76 | 39 | 37 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.