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
keithshep/txt-sushi
Database/TxtSushi/SQLExecution.hs
bsd-3-clause
selectionToExpressions :: DatabaseTable a -> ColumnSelection -> [(Expression, EvaluationContext a)] selectionToExpressions dbTable AllColumns = columnsWithContext dbTable
170
selectionToExpressions :: DatabaseTable a -> ColumnSelection -> [(Expression, EvaluationContext a)] selectionToExpressions dbTable AllColumns = columnsWithContext dbTable
170
selectionToExpressions dbTable AllColumns = columnsWithContext dbTable
70
false
true
0
9
15
42
21
21
null
null
GaloisInc/saw-script
saw-core/src/Verifier/SAW/Rewriter.hs
bsd-3-clause
ruleOfProp (R.asApplyAll -> (R.isGlobalDef boolEqIdent -> Just (), [x, y])) ann = Just $ mkRewriteRule [] x y ann
115
ruleOfProp (R.asApplyAll -> (R.isGlobalDef boolEqIdent -> Just (), [x, y])) ann = Just $ mkRewriteRule [] x y ann
115
ruleOfProp (R.asApplyAll -> (R.isGlobalDef boolEqIdent -> Just (), [x, y])) ann = Just $ mkRewriteRule [] x y ann
115
false
false
2
11
20
62
31
31
null
null
bitemyapp/ghc
compiler/rename/RnTypes.hs
bsd-3-clause
rnHsTyKi isType doc (HsFunTy ty1 ty2) = do { (ty1', fvs1) <- rnLHsTyKi isType doc ty1 -- Might find a for-all as the arg of a function type ; (ty2', fvs2) <- rnLHsTyKi isType doc ty2 -- Or as the result. This happens when reading Prelude.hi -- when we find return :: forall m. Monad m -...
589
rnHsTyKi isType doc (HsFunTy ty1 ty2) = do { (ty1', fvs1) <- rnLHsTyKi isType doc ty1 -- Might find a for-all as the arg of a function type ; (ty2', fvs2) <- rnLHsTyKi isType doc ty2 -- Or as the result. This happens when reading Prelude.hi -- when we find return :: forall m. Monad m -...
589
rnHsTyKi isType doc (HsFunTy ty1 ty2) = do { (ty1', fvs1) <- rnLHsTyKi isType doc ty1 -- Might find a for-all as the arg of a function type ; (ty2', fvs2) <- rnLHsTyKi isType doc ty2 -- Or as the result. This happens when reading Prelude.hi -- when we find return :: forall m. Monad m -...
589
false
false
0
11
186
125
67
58
null
null
diminishedprime/.org
reading-list/haskell_programming_from_first_principles/22_11.hs
mit
-- Now we want to add the ability to make a Maybe (,) of values using -- Applicative. Have x1 make a tuple of xs and ys, and x2 make a tuple of of ys -- and zs. Also, write x3 which takes one input and makes a tuple of the results -- of two applications of z' from above. x1 :: Maybe (Integer, Integer) x1 = (,) <$> xs ...
326
x1 :: Maybe (Integer, Integer) x1 = (,) <$> xs <*> ys
53
x1 = (,) <$> xs <*> ys
22
true
true
1
7
72
39
21
18
null
null
DaMSL/K3
src/Language/K3/Interpreter/Data/Accessors.hs
apache-2.0
-- | Run an interpretation and extract its value. valueOfInterpretation :: IState -> Interpretation a -> EngineM Value (Maybe a) valueOfInterpretation s i = runInterpretation' s i >>= return . either (const $ Nothing) Just . fst . fst
234
valueOfInterpretation :: IState -> Interpretation a -> EngineM Value (Maybe a) valueOfInterpretation s i = runInterpretation' s i >>= return . either (const $ Nothing) Just . fst . fst
184
valueOfInterpretation s i = runInterpretation' s i >>= return . either (const $ Nothing) Just . fst . fst
105
true
true
0
10
38
72
35
37
null
null
changlinli/nikki
src/Sorts/Nikki/Configuration.hs
lgpl-3.0
frameTimes :: State -> (String, [(Int, Seconds)]) frameTimes state = case (action state, direction state) of (Wait{}, d) -> (addDirection d "wait", wait) (Walk{afterAirborne}, d) -> (addDirection d "walk", walk afterAirborne) (JumpImpulse{}, d) -> (addDirection d "jump", airborne) (Airborne{}, d) -> (ad...
1,382
frameTimes :: State -> (String, [(Int, Seconds)]) frameTimes state = case (action state, direction state) of (Wait{}, d) -> (addDirection d "wait", wait) (Walk{afterAirborne}, d) -> (addDirection d "walk", walk afterAirborne) (JumpImpulse{}, d) -> (addDirection d "jump", airborne) (Airborne{}, d) -> (ad...
1,382
frameTimes state = case (action state, direction state) of (Wait{}, d) -> (addDirection d "wait", wait) (Walk{afterAirborne}, d) -> (addDirection d "walk", walk afterAirborne) (JumpImpulse{}, d) -> (addDirection d "jump", airborne) (Airborne{}, d) -> (addDirection d "jump", airborne) (WallSlide_{}, ...
1,332
false
true
0
10
334
579
320
259
null
null
fehu/h-agents
src/AgentSystem/Simple/Template.hs
mit
_mkFun registersExp fpref fname = funD (mkName fname) [ clause [] (normalB $ impl `appE` registersExp) [] ] where impl = varE . mkName $ fpref ++ "_" ++ fname -----------------------------------------------------------------------------
246
_mkFun registersExp fpref fname = funD (mkName fname) [ clause [] (normalB $ impl `appE` registersExp) [] ] where impl = varE . mkName $ fpref ++ "_" ++ fname -----------------------------------------------------------------------------
246
_mkFun registersExp fpref fname = funD (mkName fname) [ clause [] (normalB $ impl `appE` registersExp) [] ] where impl = varE . mkName $ fpref ++ "_" ++ fname -----------------------------------------------------------------------------
246
false
false
0
10
40
76
39
37
null
null
coghex/abridgefaraway
src/GLUtil/Shaders.hs
bsd-3-clause
-- | @loadShaderBS fileName shaderType src@ loads a shader from source -- code, @src@. The file name is used only for error reporting. loadShaderBS :: FilePath -> ShaderType -> BS.ByteString -> IO Shader loadShaderBS filePath st src = do shader <- createShader st shaderSourceBS shader $= src compileShader shader ...
702
loadShaderBS :: FilePath -> ShaderType -> BS.ByteString -> IO Shader loadShaderBS filePath st src = do shader <- createShader st shaderSourceBS shader $= src compileShader shader printError ok <- get (compileStatus shader) infoLog <- get (shaderInfoLog shader) unless (null infoLog || infoLog == "\NUL") ...
567
loadShaderBS filePath st src = do shader <- createShader st shaderSourceBS shader $= src compileShader shader printError ok <- get (compileStatus shader) infoLog <- get (shaderInfoLog shader) unless (null infoLog || infoLog == "\NUL") (mapM_ putStrLn ["Shader info log for '" ++ fi...
498
true
true
0
12
150
180
82
98
null
null
athanclark/tries
src/Data/Trie/Pseudo.hs
bsd-3-clause
merge xx@(More t mx xs) (Rest (p:|ps) y) | t == p = case ps of [] -> More t (Just y) xs _ -> More t mx $ fmap (flip merge $ Rest (NE.fromList ps) y) xs | otherwise = xx
226
merge xx@(More t mx xs) (Rest (p:|ps) y) | t == p = case ps of [] -> More t (Just y) xs _ -> More t mx $ fmap (flip merge $ Rest (NE.fromList ps) y) xs | otherwise = xx
226
merge xx@(More t mx xs) (Rest (p:|ps) y) | t == p = case ps of [] -> More t (Just y) xs _ -> More t mx $ fmap (flip merge $ Rest (NE.fromList ps) y) xs | otherwise = xx
226
false
false
1
16
99
125
60
65
null
null
magthe/dataenc
src/Codec/Binary/DataEncoding.hs
bsd-3-clause
-- {{{1 base32 -- | Base32 encoding, see "Codec.Binary.Base32" for more details on -- the individual functions. base32 :: DataCodec base32 = DataCodec { encode=Base32.encode, decode=Base32.decode, chop=Base32.chop, unchop=Base32.unchop }
255
base32 :: DataCodec base32 = DataCodec { encode=Base32.encode, decode=Base32.decode, chop=Base32.chop, unchop=Base32.unchop }
141
base32 = DataCodec { encode=Base32.encode, decode=Base32.decode, chop=Base32.chop, unchop=Base32.unchop }
121
true
true
0
8
46
58
32
26
null
null
brenov/set
interpreter/Types.hs
mit
compatible (Real _ _) (Nat _ _) = True
39
compatible (Real _ _) (Nat _ _) = True
39
compatible (Real _ _) (Nat _ _) = True
39
false
false
0
7
9
27
13
14
null
null
jystic/QuickSpec
qs1/Examples.hs
bsd-3-clause
peekl = withLeft (\(x:xs) ys -> x)
34
peekl = withLeft (\(x:xs) ys -> x)
34
peekl = withLeft (\(x:xs) ys -> x)
34
false
false
1
9
6
30
14
16
null
null
rahulmutt/ghcvm
compiler/Eta/Prelude/PrelNames.hs
bsd-3-clause
-- (>>) fmapClassOpKey = mkPreludeMiscIdUnique 173
65
fmapClassOpKey = mkPreludeMiscIdUnique 173
57
fmapClassOpKey = mkPreludeMiscIdUnique 173
57
true
false
0
5
20
10
5
5
null
null
enolive/exercism
haskell/beer-song/src/Beer.hs
mit
verse :: Int -> String verse remaining = interlines [firstLine, secondLine, ""] where firstLine = upperCaseFirst $ beersOnTheWall remaining ++ ", " ++ beers remaining ++ "." secondLine = case remaining of 0 -> "Go to the store and buy some more, " ++ beersOnTheWall maxBeers ++ "." _ -> "...
539
verse :: Int -> String verse remaining = interlines [firstLine, secondLine, ""] where firstLine = upperCaseFirst $ beersOnTheWall remaining ++ ", " ++ beers remaining ++ "." secondLine = case remaining of 0 -> "Go to the store and buy some more, " ++ beersOnTheWall maxBeers ++ "." _ -> "...
539
verse remaining = interlines [firstLine, secondLine, ""] where firstLine = upperCaseFirst $ beersOnTheWall remaining ++ ", " ++ beers remaining ++ "." secondLine = case remaining of 0 -> "Go to the store and buy some more, " ++ beersOnTheWall maxBeers ++ "." _ -> "Take " ++ oneOrIt ++ " ...
516
false
true
4
12
149
178
83
95
null
null
moonKimura/vector-0.10.9.1
Data/Vector/Generic.hs
bsd-3-clause
prescanl f z = unstream . inplace (MStream.prescanl f z) . stream
65
prescanl f z = unstream . inplace (MStream.prescanl f z) . stream
65
prescanl f z = unstream . inplace (MStream.prescanl f z) . stream
65
false
false
0
10
11
32
15
17
null
null
urv/fixhs
src/Data/FIX/Spec/FIX43.hs
lgpl-2.1
tEmailType :: FIXTag tEmailType = FIXTag { tName = "EmailType" , tnum = 94 , tparser = toFIXChar , arbitraryValue = FIXChar <$> (return 'A') }
155
tEmailType :: FIXTag tEmailType = FIXTag { tName = "EmailType" , tnum = 94 , tparser = toFIXChar , arbitraryValue = FIXChar <$> (return 'A') }
155
tEmailType = FIXTag { tName = "EmailType" , tnum = 94 , tparser = toFIXChar , arbitraryValue = FIXChar <$> (return 'A') }
134
false
true
0
10
38
51
29
22
null
null
gspia/reflex-dom-htmlea
lib/src/Reflex/Dom/HTML5/Attrs/Attrs.hs
bsd-3-clause
itNumber = attrSetInputType ITnumber
43
itNumber = attrSetInputType ITnumber
43
itNumber = attrSetInputType ITnumber
43
false
false
1
5
10
12
4
8
null
null
brendanhay/gogol
gogol-translate/gen/Network/Google/Translate/Types/Product.hs
mpl-2.0
bttrgAddtional :: Lens' BatchTranslateTextRequestGlossaries (HashMap Text TranslateTextGlossaryConfig) bttrgAddtional = lens _bttrgAddtional (\ s a -> s{_bttrgAddtional = a}) . _Coerce
198
bttrgAddtional :: Lens' BatchTranslateTextRequestGlossaries (HashMap Text TranslateTextGlossaryConfig) bttrgAddtional = lens _bttrgAddtional (\ s a -> s{_bttrgAddtional = a}) . _Coerce
198
bttrgAddtional = lens _bttrgAddtional (\ s a -> s{_bttrgAddtional = a}) . _Coerce
95
false
true
0
10
33
53
27
26
null
null
romanb/amazonka
amazonka-s3/gen/Network/AWS/S3/ListParts.hs
mpl-2.0
-- | Indicates whether the returned list of parts is truncated. lprIsTruncated :: Lens' ListPartsResponse (Maybe Bool) lprIsTruncated = lens _lprIsTruncated (\s a -> s { _lprIsTruncated = a })
192
lprIsTruncated :: Lens' ListPartsResponse (Maybe Bool) lprIsTruncated = lens _lprIsTruncated (\s a -> s { _lprIsTruncated = a })
128
lprIsTruncated = lens _lprIsTruncated (\s a -> s { _lprIsTruncated = a })
73
true
true
1
9
29
50
25
25
null
null
siddhanathan/ghc
compiler/prelude/THNames.hs
bsd-3-clause
multiIfEName = libFun (fsLit "multiIfE") multiIfEIdKey
60
multiIfEName = libFun (fsLit "multiIfE") multiIfEIdKey
60
multiIfEName = libFun (fsLit "multiIfE") multiIfEIdKey
60
false
false
1
7
11
20
8
12
null
null
romanb/amazonka
amazonka-kms/gen/Network/AWS/KMS/UpdateAlias.hs
mpl-2.0
-- | 'UpdateAliasResponse' constructor. updateAliasResponse :: UpdateAliasResponse updateAliasResponse = UpdateAliasResponse
124
updateAliasResponse :: UpdateAliasResponse updateAliasResponse = UpdateAliasResponse
84
updateAliasResponse = UpdateAliasResponse
41
true
true
0
4
9
12
7
5
null
null
Mokosha/Lambency
lib/Lambency/Shader.hs
mit
blinnPhongLighting (Light params (DirectionalLight {..}) _) diffuseColor specularInfo pos norm = do lightDir <- I.newUniformVar (getLightVarName dirLightDir) I.vector3fTy lColor <- blinnPhongLightColor params ld <- I.setE I.vector3fTy $ I.neg3f (I.mkVarExpr lightDir) nDotL <- I.setE I.floatTy $ ...
837
blinnPhongLighting (Light params (DirectionalLight {..}) _) diffuseColor specularInfo pos norm = do lightDir <- I.newUniformVar (getLightVarName dirLightDir) I.vector3fTy lColor <- blinnPhongLightColor params ld <- I.setE I.vector3fTy $ I.neg3f (I.mkVarExpr lightDir) nDotL <- I.setE I.floatTy $ ...
837
blinnPhongLighting (Light params (DirectionalLight {..}) _) diffuseColor specularInfo pos norm = do lightDir <- I.newUniformVar (getLightVarName dirLightDir) I.vector3fTy lColor <- blinnPhongLightColor params ld <- I.setE I.vector3fTy $ I.neg3f (I.mkVarExpr lightDir) nDotL <- I.setE I.floatTy $ ...
837
false
false
0
17
187
307
141
166
null
null
termite2/tsl
Frontend/StatementOps.hs
bsd-3-clause
statSubprocessRec (SITE _ _ _ t me) = concatMap statSubprocessRec $ t:(maybeToList me)
94
statSubprocessRec (SITE _ _ _ t me) = concatMap statSubprocessRec $ t:(maybeToList me)
94
statSubprocessRec (SITE _ _ _ t me) = concatMap statSubprocessRec $ t:(maybeToList me)
94
false
false
0
7
20
40
19
21
null
null
abakst/symmetry
checker/src/cloud-haskell-tests/Pipe.hs
mit
pipe :: Process () pipe = do self <- getSelfPid n <- getRandInRange 1 100 head <- init_pipe (\x -> x+1) n self send head (0 :: Int) sink
150
pipe :: Process () pipe = do self <- getSelfPid n <- getRandInRange 1 100 head <- init_pipe (\x -> x+1) n self send head (0 :: Int) sink
150
pipe = do self <- getSelfPid n <- getRandInRange 1 100 head <- init_pipe (\x -> x+1) n self send head (0 :: Int) sink
131
false
true
1
11
42
82
37
45
null
null
philopon/abeson
Data/Abeson.hs
mit
toAesonValue _ (B.Int32 b) = A.toJSON b
39
toAesonValue _ (B.Int32 b) = A.toJSON b
39
toAesonValue _ (B.Int32 b) = A.toJSON b
39
false
false
0
8
6
24
11
13
null
null
dragosboca/xmobar
src/Plugins/Locks.hs
bsd-3-clause
locks :: [ ( KeySym, String )] locks = [ ( xK_Caps_Lock, "CAPS" ) , ( xK_Num_Lock, "NUM" ) , ( xK_Scroll_Lock, "SCROLL" ) ]
157
locks :: [ ( KeySym, String )] locks = [ ( xK_Caps_Lock, "CAPS" ) , ( xK_Num_Lock, "NUM" ) , ( xK_Scroll_Lock, "SCROLL" ) ]
157
locks = [ ( xK_Caps_Lock, "CAPS" ) , ( xK_Num_Lock, "NUM" ) , ( xK_Scroll_Lock, "SCROLL" ) ]
126
false
true
0
8
58
54
31
23
null
null
khibino/haskell-debian-build.rebuild
src/Debian/Package/Data/Packages.hs
bsd-3-clause
origVersion' :: DebianVersion -> Version origVersion' = d where d (DebianNative v _) = v d (DebianNonNative v _) = v -- | Is debian-native or not
155
origVersion' :: DebianVersion -> Version origVersion' = d where d (DebianNative v _) = v d (DebianNonNative v _) = v -- | Is debian-native or not
155
origVersion' = d where d (DebianNative v _) = v d (DebianNonNative v _) = v -- | Is debian-native or not
114
false
true
0
7
36
49
26
23
null
null
Fuuzetsu/yi-emacs-colours
src/Yi/Style/EmacsColours.hs
gpl-2.0
-- | Names: @["pink3"]@ -- -- R205 G145 B158, 0xcd919e pink3 :: Color pink3 = RGB 205 145 158
93
pink3 :: Color pink3 = RGB 205 145 158
38
pink3 = RGB 205 145 158
23
true
true
0
6
18
27
13
14
null
null
ezyang/ghc
compiler/main/HscTypes.hs
bsd-3-clause
typeEnvPatSyns env = [ps | AConLike (PatSynCon ps) <- typeEnvElts env]
71
typeEnvPatSyns env = [ps | AConLike (PatSynCon ps) <- typeEnvElts env]
71
typeEnvPatSyns env = [ps | AConLike (PatSynCon ps) <- typeEnvElts env]
71
false
false
0
10
11
32
15
17
null
null
prl-tokyo/bigul-configuration-adaptation
Transformations/src/BiFlux/XPath/HXT/XPathParser.hs
mit
lpar, rpar, lbra, rbra, slash, dslash :: XPathParser () lpar = tokenParser (symbol "(")
92
lpar, rpar, lbra, rbra, slash, dslash :: XPathParser () lpar = tokenParser (symbol "(")
91
lpar = tokenParser (symbol "(")
33
false
true
11
7
18
59
22
37
null
null
spechub/Hets
GUI/GtkUtils.hs
gpl-2.0
listChoice :: String -- ^ Title -> [String] -- ^ Rows to display -> IO (Maybe Int) -- ^ Selected row listChoice title items = do ret <- listChoiceAux title id items return $ maybe Nothing (\ (i, _) -> Just i) ret -- | create a window with title and list of options, return selected option
315
listChoice :: String -- ^ Title -> [String] -- ^ Rows to display -> IO (Maybe Int) listChoice title items = do ret <- listChoiceAux title id items return $ maybe Nothing (\ (i, _) -> Just i) ret -- | create a window with title and list of options, return selected option
297
listChoice title items = do ret <- listChoiceAux title id items return $ maybe Nothing (\ (i, _) -> Just i) ret -- | create a window with title and list of options, return selected option
192
true
true
0
12
83
90
45
45
null
null
ThreeFx/ETH
1semester/diskmat/Mengenlehre.hs
mit
norm :: Eq a => Set a -> Set a norm Empty = Empty
57
norm :: Eq a => Set a -> Set a norm Empty = Empty
56
norm Empty = Empty
25
false
true
0
7
21
31
14
17
null
null
abstools/abs-haskell-formal
benchmarks/5_primes_range/progs/4500.hs
bsd-3-clause
main :: IO () main = printHeap =<< run 9999999999999999 main_ (head the_end)
76
main :: IO () main = printHeap =<< run 9999999999999999 main_ (head the_end)
76
main = printHeap =<< run 9999999999999999 main_ (head the_end)
62
false
true
1
8
12
36
16
20
null
null
eklinkhammer/robot-vision
src/main.hs
mit
printShapeList :: (Show a) => [(a,DIM2)] -> IO () printShapeList [x] = putStrLn $ show $ fst x
94
printShapeList :: (Show a) => [(a,DIM2)] -> IO () printShapeList [x] = putStrLn $ show $ fst x
94
printShapeList [x] = putStrLn $ show $ fst x
44
false
true
0
8
17
59
30
29
null
null
brendanhay/gogol
gogol-cloudidentity/gen/Network/Google/Resource/CloudIdentity/Groups/Get.hs
mpl-2.0
-- | Creates a value of 'GroupsGet' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'ggXgafv' -- -- * 'ggUploadProtocol' -- -- * 'ggAccessToken' -- -- * 'ggUploadType' -- -- * 'ggName' -- -- * 'ggCallback' groupsGet :: Text -- ^ 'g...
556
groupsGet :: Text -- ^ 'ggName' -> GroupsGet groupsGet pGgName_ = GroupsGet' { _ggXgafv = Nothing , _ggUploadProtocol = Nothing , _ggAccessToken = Nothing , _ggUploadType = Nothing , _ggName = pGgName_ , _ggCallback = Nothing }
265
groupsGet pGgName_ = GroupsGet' { _ggXgafv = Nothing , _ggUploadProtocol = Nothing , _ggAccessToken = Nothing , _ggUploadType = Nothing , _ggName = pGgName_ , _ggCallback = Nothing }
212
true
true
0
7
128
81
52
29
null
null
wowofbob/scratch
src/Text/HTML/Parser/Tag.hs
gpl-3.0
isComment _ = False
29
isComment _ = False
29
isComment _ = False
29
false
false
0
5
13
9
4
5
null
null
sdiehl/ghc
compiler/utils/Util.hs
bsd-3-clause
-- same as (&&) (<||>) :: Applicative f => f Bool -> f Bool -> f Bool (<||>) = liftA2 (||)
91
(<||>) :: Applicative f => f Bool -> f Bool -> f Bool (<||>) = liftA2 (||)
74
(<||>) = liftA2 (||)
20
true
true
0
9
21
51
25
26
null
null
Peaker/lamdu
src/Lamdu/Data/Export/JSON/Codec.hs
gpl-3.0
toEither :: AesonTypes.Parser a -> Either String a toEither parser = AesonTypes.parseEither (\() -> parser) ()
110
toEither :: AesonTypes.Parser a -> Either String a toEither parser = AesonTypes.parseEither (\() -> parser) ()
110
toEither parser = AesonTypes.parseEither (\() -> parser) ()
59
false
true
0
8
15
47
23
24
null
null
beni55/hermit
src/HERMIT/Dictionary/Navigation.hs
bsd-2-clause
-- | Find the path to the first matching construct. considerConstructT :: (AddBindings c, ExtendPath c Crumb, ReadPath c Crumb, HasEmptyContext c, LemmaContext c, MonadCatch m) => Considerable -> Transform c m LCore LocalPathH considerConstructT con = oneNonEmptyPathToT (arr $ underConsiderationLCore con)
306
considerConstructT :: (AddBindings c, ExtendPath c Crumb, ReadPath c Crumb, HasEmptyContext c, LemmaContext c, MonadCatch m) => Considerable -> Transform c m LCore LocalPathH considerConstructT con = oneNonEmptyPathToT (arr $ underConsiderationLCore con)
254
considerConstructT con = oneNonEmptyPathToT (arr $ underConsiderationLCore con)
79
true
true
0
8
41
84
42
42
null
null
hvr/text
tests/Tests/Properties.hs
bsd-2-clause
t_utf8 = forAll genUnicode $ (E.decodeUtf8 . E.encodeUtf8) `eq` id
72
t_utf8 = forAll genUnicode $ (E.decodeUtf8 . E.encodeUtf8) `eq` id
72
t_utf8 = forAll genUnicode $ (E.decodeUtf8 . E.encodeUtf8) `eq` id
72
false
false
1
9
15
34
16
18
null
null
vTurbine/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
leftAssociativeDataConKey = mkPreludeDataConUnique 56
67
leftAssociativeDataConKey = mkPreludeDataConUnique 56
67
leftAssociativeDataConKey = mkPreludeDataConUnique 56
67
false
false
0
5
17
9
4
5
null
null
toddmohney/tweeter-bot
lib/Tweet/TweetLogger.hs
mit
getLastLoggedTweet :: FilePath -> IO (Maybe Tweet) getLastLoggedTweet fp = do lastItem <- getLastLogItem fp case parseCSV lastItem of Left _ -> return Nothing Right tweetCSV -> return $ parseTweetFromCSV tweetCSV
242
getLastLoggedTweet :: FilePath -> IO (Maybe Tweet) getLastLoggedTweet fp = do lastItem <- getLastLogItem fp case parseCSV lastItem of Left _ -> return Nothing Right tweetCSV -> return $ parseTweetFromCSV tweetCSV
240
getLastLoggedTweet fp = do lastItem <- getLastLogItem fp case parseCSV lastItem of Left _ -> return Nothing Right tweetCSV -> return $ parseTweetFromCSV tweetCSV
189
false
true
0
12
60
79
34
45
null
null
aktowns/pdfkiths
Cocoa/pdfkit.hs
mit
-- ** Writing Out the PDF Data -- |Writes the document to a file at the specified path. writeToFile :: PDFDocument -> TyNSString Id -> IO NSBool writeToFile doc path = (doc $<<- "writeToFile:") [idVal path] >>= id2bool
222
writeToFile :: PDFDocument -> TyNSString Id -> IO NSBool writeToFile doc path = (doc $<<- "writeToFile:") [idVal path] >>= id2bool
133
writeToFile doc path = (doc $<<- "writeToFile:") [idVal path] >>= id2bool
76
true
true
0
8
41
52
26
26
null
null
magthe/lat
src/Types.hs
gpl-3.0
getAlertDistroName :: Alert -> String getAlertDistroName = distroName . alertDistro
83
getAlertDistroName :: Alert -> String getAlertDistroName = distroName . alertDistro
83
getAlertDistroName = distroName . alertDistro
45
false
true
1
7
9
27
11
16
null
null
christiaanb/clash-compiler
clash-lib/src/CLaSH/Core/Util.hs
bsd-2-clause
-- | Is a term a datatype constructor? isCon :: Term -> Bool isCon (Data _) = True
88
isCon :: Term -> Bool isCon (Data _) = True
49
isCon (Data _) = True
21
true
true
0
7
23
25
13
12
null
null
tranma/falling-turnip
common/World.hs
bsd-3-clause
-- oil isFluid 7 = 2
21
isFluid 7 = 2
14
isFluid 7 = 2
14
true
false
0
5
6
10
5
5
null
null
spechub/Hets
Comorphisms/CASL2HasCASL.hs
gpl-2.0
fromOpType :: CasS.OpType -> Type fromOpType = fromOPTYPE . CasS.toOP_TYPE
74
fromOpType :: CasS.OpType -> Type fromOpType = fromOPTYPE . CasS.toOP_TYPE
74
fromOpType = fromOPTYPE . CasS.toOP_TYPE
40
false
true
0
6
9
23
12
11
null
null
caasi/spj-book-student-1992
src/TiState.hs
bsd-3-clause
runProg :: String -> String runProg = showResults . eval . compile . parse
74
runProg :: String -> String runProg = showResults . eval . compile . parse
74
runProg = showResults . eval . compile . parse
46
false
true
0
7
13
34
15
19
null
null
bravit/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
declared (PData _ _ _ _ _ (PLaterdecl n _ _)) = [n]
51
declared (PData _ _ _ _ _ (PLaterdecl n _ _)) = [n]
51
declared (PData _ _ _ _ _ (PLaterdecl n _ _)) = [n]
51
false
false
0
8
12
39
19
20
null
null
treeowl/GADTSeq
Data/Sequence.hs
bsd-3-clause
addDigits4 m1 (Two a b) c d e f (One g) m2 = appendTree3 m1 (node3 a b c) (node2 d e) (node2 f g) m2
104
addDigits4 m1 (Two a b) c d e f (One g) m2 = appendTree3 m1 (node3 a b c) (node2 d e) (node2 f g) m2
104
addDigits4 m1 (Two a b) c d e f (One g) m2 = appendTree3 m1 (node3 a b c) (node2 d e) (node2 f g) m2
104
false
false
0
7
29
74
36
38
null
null
tomwadeson/cis194
week7/Editor.hs
mit
doCommand :: Buffer b => Command -> Editor b () doCommand View = do cur <- getCurLine let ls = [(cur - 2) .. (cur + 2)] ss <- mapM (\l -> onBuffer $ line l) ls zipWithM_ (showL cur) ls ss where showL _ _ Nothing = return () showL l n (Just s) = io $ putStrLn (m ++ show n ++ ": " ++ s) where m | n == ...
360
doCommand :: Buffer b => Command -> Editor b () doCommand View = do cur <- getCurLine let ls = [(cur - 2) .. (cur + 2)] ss <- mapM (\l -> onBuffer $ line l) ls zipWithM_ (showL cur) ls ss where showL _ _ Nothing = return () showL l n (Just s) = io $ putStrLn (m ++ show n ++ ": " ++ s) where m | n == ...
360
doCommand View = do cur <- getCurLine let ls = [(cur - 2) .. (cur + 2)] ss <- mapM (\l -> onBuffer $ line l) ls zipWithM_ (showL cur) ls ss where showL _ _ Nothing = return () showL l n (Just s) = io $ putStrLn (m ++ show n ++ ": " ++ s) where m | n == l = "*" | otherwise = " "
312
false
true
0
12
114
200
96
104
null
null
Gurmeet-Singh/Zeno
src/Zeno/Utils.hs
mit
clusterBy :: (a -> a -> Bool) -> [a] -> [[a]] clusterBy _ [] = []
66
clusterBy :: (a -> a -> Bool) -> [a] -> [[a]] clusterBy _ [] = []
65
clusterBy _ [] = []
19
false
true
0
8
16
48
26
22
null
null
mikeizbicki/homoiconic
old/Algebra7.hs
bsd-3-clause
z :: Scalar (Expr Space 'Id (Int,Int)) z = Pure 2
49
z :: Scalar (Expr Space 'Id (Int,Int)) z = Pure 2
49
z = Pure 2
10
false
true
0
9
10
40
19
21
null
null
mnick/hsparse
src/Numeric/Sparse/Vector.hs
bsd-3-clause
ins :: (Eq a, Num a, DIM n) => SparseVector n a -> (Index, a) -> SparseVector n a ins v (i, 0) = del (checkDim i v) i
117
ins :: (Eq a, Num a, DIM n) => SparseVector n a -> (Index, a) -> SparseVector n a ins v (i, 0) = del (checkDim i v) i
117
ins v (i, 0) = del (checkDim i v) i
35
false
true
0
8
28
84
42
42
null
null
nikita-volkov/hasql
library/Hasql/Private/Decoders.hs
mit
interval :: Value B.DiffTime interval = Value (Value.decoder (Prelude.bool A.interval_float A.interval_int))
108
interval :: Value B.DiffTime interval = Value (Value.decoder (Prelude.bool A.interval_float A.interval_int))
108
interval = Value (Value.decoder (Prelude.bool A.interval_float A.interval_int))
79
false
true
0
10
10
41
20
21
null
null
dermesser/False
FalseLib/Exec.hs
mit
fget :: Int -> FExecM () fget p = do ref <- fPopRef p v <- fGetVar p ref fPush v
104
fget :: Int -> FExecM () fget p = do ref <- fPopRef p v <- fGetVar p ref fPush v
104
fget p = do ref <- fPopRef p v <- fGetVar p ref fPush v
79
false
true
0
9
44
56
23
33
null
null
RedMoonStudios/cryptd-slave
Cryptd/Slave/CLI.hs
gpl-3.0
run :: IO SlaveSettings run = cmdArgs slave
43
run :: IO SlaveSettings run = cmdArgs slave
43
run = cmdArgs slave
19
false
true
1
5
7
20
8
12
null
null
tom-lpsd/tokyocabinet-haskell
examples/MyApp1/TokyoCabinet.hs
bsd-3-clause
fwmkeys :: (TCDB tc, Storable k1, Storable k2) => k1 -> Int -> TCM tc [k2] fwmkeys key maxn = do tc <- ask liftT $ TC.fwmkeys tc key maxn
159
fwmkeys :: (TCDB tc, Storable k1, Storable k2) => k1 -> Int -> TCM tc [k2] fwmkeys key maxn = do tc <- ask liftT $ TC.fwmkeys tc key maxn
159
fwmkeys key maxn = do tc <- ask liftT $ TC.fwmkeys tc key maxn
84
false
true
0
10
51
81
38
43
null
null
jtdaugherty/vty-ui-builder
src/Graphics/Vty/Widgets/Builder/Handlers/Text.hs
bsd-3-clause
genSrc :: Hs.Name -> [(Either String String, Hs.Exp)] -> GenM WidgetHandlerResult genSrc nam pairs = do let collapse :: [(Either String String, Hs.Exp)] -> [(Either String String, Hs.Exp)] collapse [] = [] collapse [p] = [p] collapse ((Right s1, e1):(Right s2, e2):es) = if e1 == e2 ...
1,349
genSrc :: Hs.Name -> [(Either String String, Hs.Exp)] -> GenM WidgetHandlerResult genSrc nam pairs = do let collapse :: [(Either String String, Hs.Exp)] -> [(Either String String, Hs.Exp)] collapse [] = [] collapse [p] = [p] collapse ((Right s1, e1):(Right s2, e2):es) = if e1 == e2 ...
1,349
genSrc nam pairs = do let collapse :: [(Either String String, Hs.Exp)] -> [(Either String String, Hs.Exp)] collapse [] = [] collapse [p] = [p] collapse ((Right s1, e1):(Right s2, e2):es) = if e1 == e2 then collapse ((Right $ s1 ++ s2, e1) : es) else (Right s1, e1) : col...
1,267
false
true
0
18
430
568
297
271
null
null
nomeata/ghc
compiler/cmm/CmmContFlowOpt.hs
bsd-3-clause
cmmCfgOptsProc _ top = top
26
cmmCfgOptsProc _ top = top
26
cmmCfgOptsProc _ top = top
26
false
false
0
5
4
11
5
6
null
null
s9gf4ult/yesod
yesod-test/Yesod/Test.hs
mit
-- | Assert the last response doesn't have the given text. The check is performed using the response -- body in full text form. -- @since 1.5.3 bodyNotContains :: HasCallStack => String -> YesodExample site () bodyNotContains text = withResponse $ \ res -> liftIO $ HUnit.assertBool ("Expected body not to contain " ++...
369
bodyNotContains :: HasCallStack => String -> YesodExample site () bodyNotContains text = withResponse $ \ res -> liftIO $ HUnit.assertBool ("Expected body not to contain " ++ text) $ not $ contains (simpleBody res) text
225
bodyNotContains text = withResponse $ \ res -> liftIO $ HUnit.assertBool ("Expected body not to contain " ++ text) $ not $ contains (simpleBody res) text
159
true
true
0
12
67
77
39
38
null
null
ocharles/hackage-server
Data/IntTrie.hs
bsd-3-clause
-- As a trie this looks like: -- [ (1, *) ] -- | -- [ (2, 512), (3, 1024), (4, *) ] -- | -- [ (5, 4096) ] -- We use an intermediate trie representation example2 :: Trie Word32 Word32 example2 = Trie [ Node 1 t1 ] where t1 = Tr...
393
example2 :: Trie Word32 Word32 example2 = Trie [ Node 1 t1 ] where t1 = Trie [ Leaf 2 512, Leaf 3 2048, Node 4 t2 ] t2 = Trie [ Leaf 5 4096 ]
155
example2 = Trie [ Node 1 t1 ] where t1 = Trie [ Leaf 2 512, Leaf 3 2048, Node 4 t2 ] t2 = Trie [ Leaf 5 4096 ]
124
true
true
0
7
172
85
45
40
null
null
ennocramer/floskell
src/Floskell/Pretty.hs
bsd-3-clause
skipBlankClassDecl :: ClassDecl NodeInfo -> ClassDecl NodeInfo -> Bool skipBlankClassDecl a _ = case a of (ClsDecl _ decl) -> skipBlankAfterDecl decl ClsTyDef{} -> True ClsDefSig{} -> True _ -> False
215
skipBlankClassDecl :: ClassDecl NodeInfo -> ClassDecl NodeInfo -> Bool skipBlankClassDecl a _ = case a of (ClsDecl _ decl) -> skipBlankAfterDecl decl ClsTyDef{} -> True ClsDefSig{} -> True _ -> False
215
skipBlankClassDecl a _ = case a of (ClsDecl _ decl) -> skipBlankAfterDecl decl ClsTyDef{} -> True ClsDefSig{} -> True _ -> False
144
false
true
3
7
46
68
36
32
null
null
benma/bitd
src/BitD/Util/LevelDB.hs
bsd-3-clause
serializeKey' :: SerializeKey a => a -> BS.ByteString serializeKey' k = SerP.runPut (serializeKey k)
100
serializeKey' :: SerializeKey a => a -> BS.ByteString serializeKey' k = SerP.runPut (serializeKey k)
100
serializeKey' k = SerP.runPut (serializeKey k)
46
false
true
0
7
13
38
18
20
null
null
sgillespie/ghc
compiler/basicTypes/Module.hs
bsd-3-clause
mkModuleName :: String -> ModuleName mkModuleName s = ModuleName (mkFastString s)
81
mkModuleName :: String -> ModuleName mkModuleName s = ModuleName (mkFastString s)
81
mkModuleName s = ModuleName (mkFastString s)
44
false
true
0
7
10
27
13
14
null
null
grnet/snf-ganeti
src/Ganeti/Constants.hs
bsd-2-clause
hvMigrationBandwidth :: String hvMigrationBandwidth = "migration_bandwidth"
75
hvMigrationBandwidth :: String hvMigrationBandwidth = "migration_bandwidth"
75
hvMigrationBandwidth = "migration_bandwidth"
44
false
true
0
6
5
18
7
11
null
null
gscalzo/HaskellTheHardWay
cis194/week3/Golf.hs
mit
trp (x:y:z:xs) = [[x,y,z]] ++ trp (y:z:xs)
42
trp (x:y:z:xs) = [[x,y,z]] ++ trp (y:z:xs)
42
trp (x:y:z:xs) = [[x,y,z]] ++ trp (y:z:xs)
42
false
false
0
9
6
54
29
25
null
null
jamesdarcy/DicomH
src/Data/Dicom/Show.hs
bsd-3-clause
renderDicom :: Int -> DicomObject -> Doc renderDicom level dcm = go $ Map.elems $ contents dcm where go [] = empty go (e:es) = renderElement level e <> go es
171
renderDicom :: Int -> DicomObject -> Doc renderDicom level dcm = go $ Map.elems $ contents dcm where go [] = empty go (e:es) = renderElement level e <> go es
171
renderDicom level dcm = go $ Map.elems $ contents dcm where go [] = empty go (e:es) = renderElement level e <> go es
130
false
true
1
8
44
76
37
39
null
null
magicant/flesh
src/Flesh/Language/Parser/Syntax.hs
gpl-2.0
-- | Parses a redirection operator (@io_redirect@) and returns the raw result. -- Skips trailing whitespaces. redirectBody :: MonadParser m => m (Maybe Natural, Positioned String, Token) redirectBody = liftA3 (,,) (optional ioNumber) redirectOperatorToken (require (setReason MissingRedirectionTarget neut...
330
redirectBody :: MonadParser m => m (Maybe Natural, Positioned String, Token) redirectBody = liftA3 (,,) (optional ioNumber) redirectOperatorToken (require (setReason MissingRedirectionTarget neutralToken))
220
redirectBody = liftA3 (,,) (optional ioNumber) redirectOperatorToken (require (setReason MissingRedirectionTarget neutralToken))
130
true
true
0
9
52
80
38
42
null
null
candidtim/euler
src/Problem7.hs
bsd-3-clause
nthPrime :: Int -> Int nthPrime n = last $ take n (primes 120000)
65
nthPrime :: Int -> Int nthPrime n = last $ take n (primes 120000)
65
nthPrime n = last $ take n (primes 120000)
42
false
true
0
8
13
33
16
17
null
null
m4lvin/robbed
src/Data/ROBDD/Types.hs
bsd-3-clause
(BDD _ v1 _ _ _) `bddCmp` (BDD _ v2 _ _ _) = v1 `compare` v2
60
(BDD _ v1 _ _ _) `bddCmp` (BDD _ v2 _ _ _) = v1 `compare` v2
60
(BDD _ v1 _ _ _) `bddCmp` (BDD _ v2 _ _ _) = v1 `compare` v2
60
false
false
0
7
16
48
25
23
null
null
DATX02-17-26/DATX02-17-26
libsrc/Util/Function.hs
gpl-2.0
-- | Right associative flipped function application of binary function. (|=) :: (a -> b -> c) -> b -> a -> c (|=) = flip
120
(|=) :: (a -> b -> c) -> b -> a -> c (|=) = flip
48
(|=) = flip
11
true
true
0
9
25
46
24
22
null
null
snoyberg/ghc
compiler/codeGen/StgCmmPrim.hs
bsd-3-clause
emitPrimOp dflags res WriteOffAddrOp_Int16 args = doWriteOffAddrOp (Just (mo_WordTo16 dflags)) b16 res args
118
emitPrimOp dflags res WriteOffAddrOp_Int16 args = doWriteOffAddrOp (Just (mo_WordTo16 dflags)) b16 res args
118
emitPrimOp dflags res WriteOffAddrOp_Int16 args = doWriteOffAddrOp (Just (mo_WordTo16 dflags)) b16 res args
118
false
false
0
9
23
36
17
19
null
null
Zolomon/edan40-functional-parsing
Expr.hs
mit
shw prec (Var v) = v
20
shw prec (Var v) = v
20
shw prec (Var v) = v
20
false
false
0
6
5
19
8
11
null
null
ambiata/highlighting-kate
Text/Highlighting/Kate/Syntax/Vhdl.hs
gpl-2.0
-- | Parse an expression using appropriate local context. parseExpression :: Maybe (String,String) -> KateParser Token parseExpression mbcontext = do (lang,cont) <- maybe currentContext return mbcontext result <- parseRules (lang,cont) optional $ do eof updateState $ \st -> st{ syn...
380
parseExpression :: Maybe (String,String) -> KateParser Token parseExpression mbcontext = do (lang,cont) <- maybe currentContext return mbcontext result <- parseRules (lang,cont) optional $ do eof updateState $ \st -> st{ synStPrevChar = '\n' } pEndLine return resu...
322
parseExpression mbcontext = do (lang,cont) <- maybe currentContext return mbcontext result <- parseRules (lang,cont) optional $ do eof updateState $ \st -> st{ synStPrevChar = '\n' } pEndLine return result
245
true
true
0
14
101
111
53
58
null
null
dfordivam/lava
Lava/Vhdl.hs
bsd-3-clause
---------------------------------------------------------------- -- write vhdl writeVhdl :: (Constructive a, Generic b) => String -> (a -> b) -> IO () writeVhdl name circ = do writeVhdlInput name circ (var "inp")
215
writeVhdl :: (Constructive a, Generic b) => String -> (a -> b) -> IO () writeVhdl name circ = do writeVhdlInput name circ (var "inp")
135
writeVhdl name circ = do writeVhdlInput name circ (var "inp")
63
true
true
0
9
31
69
35
34
null
null
athanclark/clark-mining-tech
src/Application/Types.hs
bsd-3-clause
runClarkT :: Env -> ClarkT a -> IO a runClarkT cfg stack = runStderrLoggingT (runReaderT stack cfg)
99
runClarkT :: Env -> ClarkT a -> IO a runClarkT cfg stack = runStderrLoggingT (runReaderT stack cfg)
99
runClarkT cfg stack = runStderrLoggingT (runReaderT stack cfg)
62
false
true
0
8
16
45
20
25
null
null
brendanhay/gogol
gogol-storage/gen/Network/Google/Resource/Storage/Objects/GetIAMPolicy.hs
mpl-2.0
-- | The project to be billed for this request. Required for Requester Pays -- buckets. ogipUserProject :: Lens' ObjectsGetIAMPolicy (Maybe Text) ogipUserProject = lens _ogipUserProject (\ s a -> s{_ogipUserProject = a})
228
ogipUserProject :: Lens' ObjectsGetIAMPolicy (Maybe Text) ogipUserProject = lens _ogipUserProject (\ s a -> s{_ogipUserProject = a})
140
ogipUserProject = lens _ogipUserProject (\ s a -> s{_ogipUserProject = a})
82
true
true
0
9
40
49
26
23
null
null
bjpop/blip
blipcompiler/src/Blip/Compiler/Scope.hs
bsd-3-clause
buildNestedScope (DefComprehension (Comprehension {..})) = do -- we introduce a new local variable called $result when compiling -- comprehensions, when they are desugared into functions let resultVarSet = Set.singleton "$result" usage = mempty { usage_assigned = resultVarSet , usa...
1,596
buildNestedScope (DefComprehension (Comprehension {..})) = do -- we introduce a new local variable called $result when compiling -- comprehensions, when they are desugared into functions let resultVarSet = Set.singleton "$result" usage = mempty { usage_assigned = resultVarSet , usa...
1,596
buildNestedScope (DefComprehension (Comprehension {..})) = do -- we introduce a new local variable called $result when compiling -- comprehensions, when they are desugared into functions let resultVarSet = Set.singleton "$result" usage = mempty { usage_assigned = resultVarSet , usa...
1,596
false
false
0
13
377
136
74
62
null
null
tilltheis/propositional-logic
src/PropositionalLogic.hs
bsd-3-clause
isConjunction _ = False
23
isConjunction _ = False
23
isConjunction _ = False
23
false
false
0
5
3
9
4
5
null
null
mightymoose/liquidhaskell
benchmarks/hmatrix-0.15.0.1/lib/Data/Packed/Foreign.hs
bsd-3-clause
appVector :: Storable a => (Ptr a -> b) -> Vector a -> b appVector f x = unsafeInlinePerformIO (S.unsafeWith x (return . f))
124
appVector :: Storable a => (Ptr a -> b) -> Vector a -> b appVector f x = unsafeInlinePerformIO (S.unsafeWith x (return . f))
124
appVector f x = unsafeInlinePerformIO (S.unsafeWith x (return . f))
67
false
true
0
9
23
64
31
33
null
null
brendanhay/gogol
gogol-compute/gen/Network/Google/Resource/Compute/Instances/AggregatedList.hs
mpl-2.0
-- | Project ID for this request. ialaProject :: Lens' InstancesAggregatedList Text ialaProject = lens _ialaProject (\ s a -> s{_ialaProject = a})
148
ialaProject :: Lens' InstancesAggregatedList Text ialaProject = lens _ialaProject (\ s a -> s{_ialaProject = a})
114
ialaProject = lens _ialaProject (\ s a -> s{_ialaProject = a})
64
true
true
0
9
24
47
23
24
null
null
YellPika/effin
src/Data/Union.hs
bsd-3-clause
conceal :: Member f l => Union (f ':+ l) a -> Union l a conceal (Union i x) = Union (Index.conceal i) x
103
conceal :: Member f l => Union (f ':+ l) a -> Union l a conceal (Union i x) = Union (Index.conceal i) x
103
conceal (Union i x) = Union (Index.conceal i) x
47
false
true
0
9
23
71
33
38
null
null
isomorphism/webgl
src/Graphics/Rendering/WebGL/Constants.hs
mit
gl_BLEND :: GLenum gl_BLEND = 0x0BE2
36
gl_BLEND :: GLenum gl_BLEND = 0x0BE2
36
gl_BLEND = 0x0BE2
17
false
true
0
4
5
11
6
5
null
null
ezyang/ghc
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
{- Note [eqCanRewrite] ~~~~~~~~~~~~~~~~~~~~~~ (eqCanRewrite ct1 ct2) holds if the constraint ct1 (a CTyEqCan of form tv ~ ty) can be used to rewrite ct2. It must satisfy the properties of a can-rewrite relation, see Definition [Can-rewrite relation] in TcSMonad. With the solver handling Coercible constraints like equ...
1,830
eqCanRewrite :: EqRel -> EqRel -> Bool eqCanRewrite NomEq _ = True
72
eqCanRewrite NomEq _ = True
33
true
true
0
8
345
31
14
17
null
null
alexander-at-github/eta
compiler/ETA/BasicTypes/BasicTypes.hs
bsd-3-clause
worstOneShot ProbOneShot NoOneShotInfo = NoOneShotInfo
56
worstOneShot ProbOneShot NoOneShotInfo = NoOneShotInfo
56
worstOneShot ProbOneShot NoOneShotInfo = NoOneShotInfo
56
false
false
0
5
6
13
5
8
null
null
termite2/bv
BV/Canonize.hs
bsd-3-clause
catomSimplifyFinal :: CAtom -> CAtom catomSimplifyFinal (CAtom Lt t1 t2) | t2 == (CTerm [] $ mkConst (-1) (width t2)) = fromRight $ mkCAtom Neq t1 t2 | t1 == (CTerm [] $ zero (width t1)) = fromRight $ mkCAtom Neq t1 t2
262
catomSimplifyFinal :: CAtom -> CAtom catomSimplifyFinal (CAtom Lt t1 t2) | t2 == (CTerm [] $ mkConst (-1) (width t2)) = fromRight $ mkCAtom Neq t1 t2 | t1 == (CTerm [] $ zero (width t1)) = fromRight $ mkCAtom Neq t1 t2
262
catomSimplifyFinal (CAtom Lt t1 t2) | t2 == (CTerm [] $ mkConst (-1) (width t2)) = fromRight $ mkCAtom Neq t1 t2 | t1 == (CTerm [] $ zero (width t1)) = fromRight $ mkCAtom Neq t1 t2
225
false
true
0
13
86
122
58
64
null
null
ricardopenyamari/ir2haskell
clir-parser-haskell-master/lib/sexp-grammar/src/Data/InvertibleGrammar.hs
gpl-2.0
-- | Make a grammar from a total isomorphism on top element of stack iso :: (a -> b) -> (b -> a) -> Grammar g (a :- t) (b :- t) iso f' g' = Iso f g where f (a :- t) = f' a :- t g (b :- t) = g' b :- t -- | Make a grammar from a total isomorphism on top element of stack (flipped)
289
iso :: (a -> b) -> (b -> a) -> Grammar g (a :- t) (b :- t) iso f' g' = Iso f g where f (a :- t) = f' a :- t g (b :- t) = g' b :- t -- | Make a grammar from a total isomorphism on top element of stack (flipped)
220
iso f' g' = Iso f g where f (a :- t) = f' a :- t g (b :- t) = g' b :- t -- | Make a grammar from a total isomorphism on top element of stack (flipped)
161
true
true
4
10
83
126
61
65
null
null
HackerspaceBielefeld/Nextride
nextride.hs
bsd-2-clause
getTime (_:xs) = getTime xs
27
getTime (_:xs) = getTime xs
27
getTime (_:xs) = getTime xs
27
false
false
0
6
4
20
9
11
null
null
sukwon0709/z3-haskell
src/Z3/Monad.hs
bsd-3-clause
-- | Convert the given benchmark into SMT-LIB formatted string. -- -- The output format can be configured via 'setASTPrintMode'. benchmarkToSMTLibString :: MonadZ3 z3 => String -- ^ name -> String -- ^ logic -> String -- ^ stat...
594
benchmarkToSMTLibString :: MonadZ3 z3 => String -- ^ name -> String -- ^ logic -> String -- ^ status -> String -- ^ attributes -> [AST] -- ^ assumptions1 ...
465
benchmarkToSMTLibString = liftFun6 Base.benchmarkToSMTLibString
63
true
true
0
12
275
62
35
27
null
null
tphyahoo/haskoin-wallet
Network/Haskoin/Wallet/Model.hs
unlicense
toJsonCoin :: KeyRingCoin -- ^ The coin -> (Maybe JsonTx) -- ^ The coins transaction -> (Maybe JsonAddr) -- ^ The coins address -> (Maybe JsonTx) -- ^ The coins spending transaction -> JsonCoin toJsonCoin coin txM addrM spendM = JsonCoin { jsonCoinHash = ke...
710
toJsonCoin :: KeyRingCoin -- ^ The coin -> (Maybe JsonTx) -- ^ The coins transaction -> (Maybe JsonAddr) -- ^ The coins address -> (Maybe JsonTx) -- ^ The coins spending transaction -> JsonCoin toJsonCoin coin txM addrM spendM = JsonCoin { jsonCoinHash = ke...
710
toJsonCoin coin txM addrM spendM = JsonCoin { jsonCoinHash = keyRingCoinHash coin , jsonCoinPos = keyRingCoinPos coin , jsonCoinValue = keyRingCoinValue coin , jsonCoinScript = keyRingCoinScript coin , jsonCoinCreated = keyRingCoinCreated coin -- Optional tx , jsonCo...
463
false
true
0
10
225
130
73
57
null
null
mrak/coreutils.hs
src/tr/Args.hs
mit
truncatify :: CLIArgs -> CLIArgs truncatify c = case set2 c of Nothing -> c Just s2 -> truncatify' where truncatify' = if truncate c then c {set1 = take (length s2) (set1 c)} else c
297
truncatify :: CLIArgs -> CLIArgs truncatify c = case set2 c of Nothing -> c Just s2 -> truncatify' where truncatify' = if truncate c then c {set1 = take (length s2) (set1 c)} else c
297
truncatify c = case set2 c of Nothing -> c Just s2 -> truncatify' where truncatify' = if truncate c then c {set1 = take (length s2) (set1 c)} else c
264
false
true
0
15
151
83
42
41
null
null
alucky0707/free-prezen
Graphics/UI/FreePrezen/Runner.hs
bsd-3-clause
calcStep (Free (Text _ _ _ cont)) = calcStep cont
53
calcStep (Free (Text _ _ _ cont)) = calcStep cont
53
calcStep (Free (Text _ _ _ cont)) = calcStep cont
53
false
false
0
9
13
30
14
16
null
null
jtdaugherty/language-mixal
src/Language/MIXAL/PP.hs
bsd-3-clause
ppSymbolRef :: SymbolRef -> Doc ppSymbolRef (RefNormal s) = ppSymbol s
70
ppSymbolRef :: SymbolRef -> Doc ppSymbolRef (RefNormal s) = ppSymbol s
70
ppSymbolRef (RefNormal s) = ppSymbol s
38
false
true
0
6
10
31
14
17
null
null
bflyblue/eventsource
src/Eventstore/PostgreSQL.hs
bsd-3-clause
rehydrate' :: (Typeable (Versioned a), Aggregate (Versioned a), FromJSON (Versioned a), FromJSON (EventT (Versioned a))) => StreamId (Versioned a) -> PgStore a rehydrate' stream = do va <- rehydrate stream case va of Version _ a -> return a Initial -> throwError "Attempt to use uni...
474
rehydrate' :: (Typeable (Versioned a), Aggregate (Versioned a), FromJSON (Versioned a), FromJSON (EventT (Versioned a))) => StreamId (Versioned a) -> PgStore a rehydrate' stream = do va <- rehydrate stream case va of Version _ a -> return a Initial -> throwError "Attempt to use uni...
474
rehydrate' stream = do va <- rehydrate stream case va of Version _ a -> return a Initial -> throwError "Attempt to use uninitialised entity" Deleted _ -> throwError "Attempt to use deleted entity" Invalid _ -> throwError "Attempt to use invalidated entity"
304
false
true
0
11
122
156
71
85
null
null
SavinaRoja/SavinaRoja.github.io
assets/centraldogma.hs
mit
-- Proline geneticCode "CCU" = 'P'
34
geneticCode "CCU" = 'P'
23
geneticCode "CCU" = 'P'
23
true
false
0
5
5
10
5
5
null
null
takayuki/natume
ScmParse.hs
gpl-2.0
fmt1 _ _ (ExprInt i) = [show i]
34
fmt1 _ _ (ExprInt i) = [show i]
34
fmt1 _ _ (ExprInt i) = [show i]
34
false
false
0
7
10
25
12
13
null
null
sopvop/cabal
Cabal/tests/PackageTests/PackageTester.hs
bsd-3-clause
definitelyMakeRelative :: FilePath -> FilePath -> FilePath definitelyMakeRelative base0 path0 = let go [] path = joinPath path go base [] = joinPath (replicate (length base) "..") go (".":xs) ys = go xs ys go xs (".":ys) = go xs ys go (x:xs) (y:ys) | x == y = go xs ys ...
421
definitelyMakeRelative :: FilePath -> FilePath -> FilePath definitelyMakeRelative base0 path0 = let go [] path = joinPath path go base [] = joinPath (replicate (length base) "..") go (".":xs) ys = go xs ys go xs (".":ys) = go xs ys go (x:xs) (y:ys) | x == y = go xs ys ...
421
definitelyMakeRelative base0 path0 = let go [] path = joinPath path go base [] = joinPath (replicate (length base) "..") go (".":xs) ys = go xs ys go xs (".":ys) = go xs ys go (x:xs) (y:ys) | x == y = go xs ys | otherwise = go (x:xs) [] </> go [] (y:ys) ...
362
false
true
0
13
134
215
104
111
null
null
alldne/scheme
src/Language/Scheme/Primitives.hs
bsd-3-clause
makePort :: IOMode -> [LispVal] -> EvalM LispVal makePort mode [String filename] = fmap Port $ liftIO $ openFile filename mode
126
makePort :: IOMode -> [LispVal] -> EvalM LispVal makePort mode [String filename] = fmap Port $ liftIO $ openFile filename mode
126
makePort mode [String filename] = fmap Port $ liftIO $ openFile filename mode
77
false
true
0
7
20
52
25
27
null
null
jrockway/c2hs
src/C2HS/Gen/Bind.hs
gpl-2.0
sizeAlignOfSingle :: CDecl -> GB (BitSize, Int) -- -- * we make use of the assertion that 'extractCompType' can only return a -- 'DefinedET' when the declaration is a pointer declaration -- * for arrays, alignment is the same as for the base type and the size -- is the size of the base type multiplied by the number...
1,010
sizeAlignOfSingle :: CDecl -> GB (BitSize, Int) sizeAlignOf (CDecl dclspec [(Just (CDeclr oide (CArrDeclr _ (CArrSize _ lexpr) _ : derived') _asm _ats n), init', expr)] attr) = do (bitsize, align) <- sizeAlignOf (CDecl dclspec [(Just...
522
sizeAlignOf (CDecl dclspec [(Just (CDeclr oide (CArrDeclr _ (CArrSize _ lexpr) _ : derived') _asm _ats n), init', expr)] attr) = do (bitsize, align) <- sizeAlignOf (CDecl dclspec [(Just (CDeclr oide derived' Nothing [] n), init', exp...
474
true
true
0
17
297
188
101
87
null
null