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
ancientlanguage/haskell-analysis
grammar/src/Grammar/Common/Decompose.hs
mit
decomposeChar '\x2F94F' = "\x788C"
34
decomposeChar '\x2F94F' = "\x788C"
34
decomposeChar '\x2F94F' = "\x788C"
34
false
false
0
5
3
9
4
5
null
null
ghc-android/ghc
testsuite/tests/ghci/should_run/ghcirun004.hs
bsd-3-clause
1053 = 1052
11
1053 = 1052
11
1053 = 1052
11
false
false
1
5
2
10
3
7
null
null
TeofilC/Turing
Gen.hs
mit
prependChild :: (MonadIO m, IsNode self, IsNode node) => self -> node -> m Node prependChild parent child = getFirstChild parent >>= insertBefore parent child
158
prependChild :: (MonadIO m, IsNode self, IsNode node) => self -> node -> m Node prependChild parent child = getFirstChild parent >>= insertBefore parent child
158
prependChild parent child = getFirstChild parent >>= insertBefore parent child
78
false
true
0
8
24
60
29
31
null
null
Deewiant/haschoo
Haschoo/Evaluator/Standard/Symbols.hs
bsd-3-clause
scmIsSymbol [] = tooFewArgs "symbol?"
53
scmIsSymbol [] = tooFewArgs "symbol?"
53
scmIsSymbol [] = tooFewArgs "symbol?"
53
false
false
0
6
20
14
6
8
null
null
jstolarek/lattice-structure-hs
bench/Signal/Wavelet/List1Bench.hs
bsd-3-clause
benchDwt :: ([Double], [Double]) -> [Double] benchDwt (ls, sig) = dwt ls sig
76
benchDwt :: ([Double], [Double]) -> [Double] benchDwt (ls, sig) = dwt ls sig
76
benchDwt (ls, sig) = dwt ls sig
31
false
true
0
7
12
44
25
19
null
null
fffej/HS-Poker
LookupPatternMatch.hs
bsd-3-clause
getValueFromProduct 122525 = 3186
33
getValueFromProduct 122525 = 3186
33
getValueFromProduct 122525 = 3186
33
false
false
0
5
3
9
4
5
null
null
phischu/fragnix
tests/packages/scotty/Data.Word8.hs
bsd-3-clause
_underscore = 0x5f
20
_underscore = 0x5f
20
_underscore = 0x5f
20
false
false
1
5
4
10
3
7
null
null
Teaspot-Studio/Urho3D-Haskell
src/Graphics/Urho3D/Graphics/AnimationState.hs
mit
animationStateGetStartBone :: (Parent AnimationState a, Pointer p a, MonadIO m) => p -- ^ Pointer to AnimationState or ascentor -> m (Ptr Bone) animationStateGetStartBone p = liftIO $ do let ptr = parentPointer p [C.exp| Bone* { $(AnimationState* ptr)->GetStartBone() } |]
282
animationStateGetStartBone :: (Parent AnimationState a, Pointer p a, MonadIO m) => p -- ^ Pointer to AnimationState or ascentor -> m (Ptr Bone) animationStateGetStartBone p = liftIO $ do let ptr = parentPointer p [C.exp| Bone* { $(AnimationState* ptr)->GetStartBone() } |]
282
animationStateGetStartBone p = liftIO $ do let ptr = parentPointer p [C.exp| Bone* { $(AnimationState* ptr)->GetStartBone() } |]
134
false
true
0
11
50
79
40
39
null
null
timjb/lens
src/System/IO/Error/Lens.hs
bsd-3-clause
-- | Error type specific information. description :: Lens' IOException String description f s = f (ioe_description s) <&> \e -> s { ioe_description = e }
153
description :: Lens' IOException String description f s = f (ioe_description s) <&> \e -> s { ioe_description = e }
115
description f s = f (ioe_description s) <&> \e -> s { ioe_description = e }
75
true
true
0
8
26
48
25
23
null
null
haskell-opengl/OpenGLRaw
src/Graphics/GL/ExtensionPredicates.hs
bsd-3-clause
-- | Is the <https://www.opengl.org/registry/specs/ARB/compute_shader.txt ARB_compute_shader> extension supported? -- Note that in the presence of multiple contexts with different capabilities, -- this might be wrong. Use 'glGetARBComputeShader' in those cases instead. gl_ARB_compute_shader :: Bool gl_ARB_compute_shade...
365
gl_ARB_compute_shader :: Bool gl_ARB_compute_shader = member "GL_ARB_compute_shader" extensions
95
gl_ARB_compute_shader = member "GL_ARB_compute_shader" extensions
65
true
true
0
5
38
19
11
8
null
null
jmitchell/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
declared (POpenInterfaces _ _ ds) = concatMap declared ds
57
declared (POpenInterfaces _ _ ds) = concatMap declared ds
57
declared (POpenInterfaces _ _ ds) = concatMap declared ds
57
false
false
0
7
8
24
11
13
null
null
athanclark/Idris-dev
src/Idris/IdrisDoc.hs
bsd-3-clause
extractPTermNames (PLet _ n _ p1 p2 p3) = n : concatMap extract [p1, p2, p3]
76
extractPTermNames (PLet _ n _ p1 p2 p3) = n : concatMap extract [p1, p2, p3]
76
extractPTermNames (PLet _ n _ p1 p2 p3) = n : concatMap extract [p1, p2, p3]
76
false
false
0
7
15
43
22
21
null
null
dysinger/amazonka
amazonka-elastictranscoder/gen/Network/AWS/ElasticTranscoder/Types.hs
mpl-2.0
-- | 'Encryption' constructor. -- -- The fields accessible through corresponding lenses are: -- -- * 'eInitializationVector' @::@ 'Maybe' 'Text' -- -- * 'eKey' @::@ 'Maybe' 'Text' -- -- * 'eKeyMd5' @::@ 'Maybe' 'Text' -- -- * 'eMode' @::@ 'Maybe' 'Text' -- encryption :: Encryption encryption = Encryption { _eMode ...
467
encryption :: Encryption encryption = Encryption { _eMode = Nothing , _eKey = Nothing , _eKeyMd5 = Nothing , _eInitializationVector = Nothing }
210
encryption = Encryption { _eMode = Nothing , _eKey = Nothing , _eKeyMd5 = Nothing , _eInitializationVector = Nothing }
185
true
true
0
7
131
53
36
17
null
null
nickng/gong
GoTypes.hs
apache-2.0
-- Reconstructs the appropriate GoType from calls -- to openBNames closeBNames :: M [([Maybe (Int, ChName)],GoType)] -> M GoType closeBNames m = do l <- m let (names,ts) = unzip l let names' = concat names return $ L.foldr (\mc end -> case mc of Just(i,c) -> New i (bi...
442
closeBNames :: M [([Maybe (Int, ChName)],GoType)] -> M GoType closeBNames m = do l <- m let (names,ts) = unzip l let names' = concat names return $ L.foldr (\mc end -> case mc of Just(i,c) -> New i (bind c end) Nothing -> end) (Par ts) names' --...
375
closeBNames m = do l <- m let (names,ts) = unzip l let names' = concat names return $ L.foldr (\mc end -> case mc of Just(i,c) -> New i (bind c end) Nothing -> end) (Par ts) names' -- Composes open/close and escapes the freshness monad --
312
true
true
0
16
141
161
80
81
null
null
meteogrid/mime-mail-parser
Network/Mail/Mime/Parser/Internal/Rfc2045.hs
bsd-3-clause
type_ :: Parser ByteString type_ = discrete_type <|> composite_type
67
type_ :: Parser ByteString type_ = discrete_type <|> composite_type
67
type_ = discrete_type <|> composite_type
40
false
true
0
5
8
18
9
9
null
null
luzhuomi/cpp-obs
Language/C/Obfuscate/ASTUtils.hs
apache-2.0
(.==.) :: AST.CExpression N.NodeInfo -> AST.CExpression N.NodeInfo -> AST.CExpression N.NodeInfo (.==.) lhs rhs = AST.CBinary AST.CEqOp lhs rhs N.undefNode
155
(.==.) :: AST.CExpression N.NodeInfo -> AST.CExpression N.NodeInfo -> AST.CExpression N.NodeInfo (.==.) lhs rhs = AST.CBinary AST.CEqOp lhs rhs N.undefNode
155
(.==.) lhs rhs = AST.CBinary AST.CEqOp lhs rhs N.undefNode
58
false
true
0
8
18
64
32
32
null
null
jochem88/btjchm
Main.hs
mit
runAct _ _ = return ()
35
runAct _ _ = return ()
35
runAct _ _ = return ()
35
false
false
0
6
18
16
7
9
null
null
brendanhay/gogol
gogol-admin-directory/gen/Network/Google/Resource/Directory/OrgUnits/Insert.hs
mpl-2.0
-- | OAuth access token. ouiAccessToken :: Lens' OrgUnitsInsert (Maybe Text) ouiAccessToken = lens _ouiAccessToken (\ s a -> s{_ouiAccessToken = a})
156
ouiAccessToken :: Lens' OrgUnitsInsert (Maybe Text) ouiAccessToken = lens _ouiAccessToken (\ s a -> s{_ouiAccessToken = a})
131
ouiAccessToken = lens _ouiAccessToken (\ s a -> s{_ouiAccessToken = a})
79
true
true
0
8
29
49
25
24
null
null
tomjaguarpaw/postgresql-simple
src/Database/PostgreSQL/Simple/Time/Implementation.hs
bsd-3-clause
getDay :: A.Parser Day getDay = TP.day
38
getDay :: A.Parser Day getDay = TP.day
38
getDay = TP.day
15
false
true
1
6
6
22
9
13
null
null
kawamuray/ganeti
src/Ganeti/Query/Instance.hs
gpl-2.0
getConsoleInfo :: [(String, ERpcError RpcResultInstanceConsoleInfo)] -> Instance -> Maybe InstanceConsoleInfo getConsoleInfo uuidList inst = let allValidResults = concatMap rpcResInstConsInfoInstancesInfo . rights . map snd $ uuidList in snd <$> pickPairUnique (...
350
getConsoleInfo :: [(String, ERpcError RpcResultInstanceConsoleInfo)] -> Instance -> Maybe InstanceConsoleInfo getConsoleInfo uuidList inst = let allValidResults = concatMap rpcResInstConsInfoInstancesInfo . rights . map snd $ uuidList in snd <$> pickPairUnique (...
350
getConsoleInfo uuidList inst = let allValidResults = concatMap rpcResInstConsInfoInstancesInfo . rights . map snd $ uuidList in snd <$> pickPairUnique (instName inst) allValidResults
210
false
true
0
12
90
83
40
43
null
null
kajigor/uKanren_transformations
src/TaglessFinal/Unify.hs
bsd-3-clause
unifyG f st@(Just subst) u v = -- trace (printf "Subst length: %d" (Subst.size subst)) $ unify' (walk subst u) (walk subst v) where unify' (Var u') (Var v') | u' == v' = Just subst unify' (Var u') (Var v') = Just $ Subst.insert (min u' v') (Var $ max u' v') subst unify' (Var u') t = if f sub...
660
unifyG f st@(Just subst) u v = -- trace (printf "Subst length: %d" (Subst.size subst)) $ unify' (walk subst u) (walk subst v) where unify' (Var u') (Var v') | u' == v' = Just subst unify' (Var u') (Var v') = Just $ Subst.insert (min u' v') (Var $ max u' v') subst unify' (Var u') t = if f sub...
660
unifyG f st@(Just subst) u v = -- trace (printf "Subst length: %d" (Subst.size subst)) $ unify' (walk subst u) (walk subst v) where unify' (Var u') (Var v') | u' == v' = Just subst unify' (Var u') (Var v') = Just $ Subst.insert (min u' v') (Var $ max u' v') subst unify' (Var u') t = if f sub...
660
false
false
7
10
206
350
159
191
null
null
martin-kolinek/stack
src/Stack/Types/VersionIntervals.hs
bsd-3-clause
intersectVersionIntervals :: VersionIntervals -> VersionIntervals -> VersionIntervals intersectVersionIntervals x y = fromCabal $ C.intersectVersionIntervals (toCabal x) (toCabal y)
189
intersectVersionIntervals :: VersionIntervals -> VersionIntervals -> VersionIntervals intersectVersionIntervals x y = fromCabal $ C.intersectVersionIntervals (toCabal x) (toCabal y)
189
intersectVersionIntervals x y = fromCabal $ C.intersectVersionIntervals (toCabal x) (toCabal y)
103
false
true
0
6
25
48
23
25
null
null
aisamanra/matterhorn
src/State/PostListOverlay.hs
bsd-3-clause
postListSelectUp :: MH () postListSelectUp = do msgId <- use (csPostListOverlay.postListSelected) posts <- use (csPostListOverlay.postListPosts) let nextId = (getNextPostId msgId posts) case nextId of Nothing -> return () Just _ -> csPostListOverlay.postListSelected .= nextId -- | Move the select...
417
postListSelectUp :: MH () postListSelectUp = do msgId <- use (csPostListOverlay.postListSelected) posts <- use (csPostListOverlay.postListPosts) let nextId = (getNextPostId msgId posts) case nextId of Nothing -> return () Just _ -> csPostListOverlay.postListSelected .= nextId -- | Move the select...
417
postListSelectUp = do msgId <- use (csPostListOverlay.postListSelected) posts <- use (csPostListOverlay.postListPosts) let nextId = (getNextPostId msgId posts) case nextId of Nothing -> return () Just _ -> csPostListOverlay.postListSelected .= nextId -- | Move the selection down in the PostListOv...
391
false
true
0
11
74
98
47
51
null
null
ghcjs/jsaddle-dom
src/JSDOM/Generated/Enums.hs
mit
js_RequestRedirectManual = "manual"
35
js_RequestRedirectManual = "manual"
35
js_RequestRedirectManual = "manual"
35
false
false
0
4
2
6
3
3
null
null
ktvoelker/argon
src/Declare/Common.hs
gpl-3.0
mkStatusRef :: SpaceRef -> String -> StatusRef mkStatusRef = Ref.StatusRef
74
mkStatusRef :: SpaceRef -> String -> StatusRef mkStatusRef = Ref.StatusRef
74
mkStatusRef = Ref.StatusRef
27
false
true
0
6
9
21
11
10
null
null
UU-ComputerScience/uu-cco
uu-cco/src/CCO/Tree/Parser/Validation.hs
bsd-3-clause
schemeOf (Float _) = FloatTerm
35
schemeOf (Float _) = FloatTerm
35
schemeOf (Float _) = FloatTerm
35
false
false
0
7
9
15
7
8
null
null
frosch03/kerbal
src/System/KSP/OrbitalMechanics.hs
cc0-1.0
hohmann :: Orbit Body -> Orbit Body -> (Double, Double) hohmann o1 o2 | centerBody o1 /= centerBody o2 || o1 == o2 = (0,0)
138
hohmann :: Orbit Body -> Orbit Body -> (Double, Double) hohmann o1 o2 | centerBody o1 /= centerBody o2 || o1 == o2 = (0,0)
138
hohmann o1 o2 | centerBody o1 /= centerBody o2 || o1 == o2 = (0,0)
82
false
true
0
11
40
66
32
34
null
null
mcschroeder/ghc
compiler/iface/IfaceType.hs
bsd-3-clause
pprPromotionQuote :: IfaceTyCon -> SDoc pprPromotionQuote tc = pprPromotionQuoteI (ifaceTyConInfo tc)
101
pprPromotionQuote :: IfaceTyCon -> SDoc pprPromotionQuote tc = pprPromotionQuoteI (ifaceTyConInfo tc)
101
pprPromotionQuote tc = pprPromotionQuoteI (ifaceTyConInfo tc)
61
false
true
0
7
10
27
13
14
null
null
tmishima/Hinecraft
Hinecraft/Rendering/WorldView.hs
apache-2.0
deleteVAO :: WorldViewVHdl -> [ChunkIdx] -> IO () deleteVAO wvhdl cidxs = do !vaos <- getBlockVAOList wvhdl setBlockVAOList wvhdl $ foldl fn vaos cidxs where fn vaos ij = M.delete ij vaos
198
deleteVAO :: WorldViewVHdl -> [ChunkIdx] -> IO () deleteVAO wvhdl cidxs = do !vaos <- getBlockVAOList wvhdl setBlockVAOList wvhdl $ foldl fn vaos cidxs where fn vaos ij = M.delete ij vaos
198
deleteVAO wvhdl cidxs = do !vaos <- getBlockVAOList wvhdl setBlockVAOList wvhdl $ foldl fn vaos cidxs where fn vaos ij = M.delete ij vaos
148
false
true
1
8
42
88
37
51
null
null
ddssff/pandoc
src/Text/Pandoc/Writers/Docx.hs
gpl-2.0
setFirstPara :: WS () setFirstPara = modify $ \s -> s { stFirstPara = True }
77
setFirstPara :: WS () setFirstPara = modify $ \s -> s { stFirstPara = True }
77
setFirstPara = modify $ \s -> s { stFirstPara = True }
55
false
true
0
8
16
33
18
15
null
null
alexander-at-github/eta
compiler/ETA/TypeCheck/TcType.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
6
16
19
8
11
null
null
dat2/haskell-scheme
src/Eval.hs
mit
unpackString notString = throwError $ TypeMismatch "string" notString
69
unpackString notString = throwError $ TypeMismatch "string" notString
69
unpackString notString = throwError $ TypeMismatch "string" notString
69
false
false
0
6
7
18
8
10
null
null
linusyang/barrelfish
tools/mackerel/CAbsSyntax.hs
mit
pp_enumitem :: EnumItem -> String pp_enumitem (EnumItem s (Just e)) = s ++ " = " ++( pp_expr e)
95
pp_enumitem :: EnumItem -> String pp_enumitem (EnumItem s (Just e)) = s ++ " = " ++( pp_expr e)
95
pp_enumitem (EnumItem s (Just e)) = s ++ " = " ++( pp_expr e)
61
false
true
0
9
18
46
23
23
null
null
zwxxx/Tiger_Haskell
src/chap1/Slp.hs
bsd-3-clause
interp_exp (OpExp e1 op e2) t1 = do (v1, t2) <- interp_exp e1 t1 (v2, t3) <- interp_exp e2 t2 return (math_op op v1 v2, t2)
198
interp_exp (OpExp e1 op e2) t1 = do (v1, t2) <- interp_exp e1 t1 (v2, t3) <- interp_exp e2 t2 return (math_op op v1 v2, t2)
198
interp_exp (OpExp e1 op e2) t1 = do (v1, t2) <- interp_exp e1 t1 (v2, t3) <- interp_exp e2 t2 return (math_op op v1 v2, t2)
198
false
false
1
10
100
81
37
44
null
null
mdorman/emacs2nix
elpa2nix.hs
gpl-3.0
parser :: Parser (IO ()) parser = elpa2nix <$> (threads <|> pure 0) <*> output <*> server <*> indexOnly where threads = option auto (long "threads" <> short 't' <> metavar "N" <> help "use N threads; default is number of CPUs") output = strOption ...
684
parser :: Parser (IO ()) parser = elpa2nix <$> (threads <|> pure 0) <*> output <*> server <*> indexOnly where threads = option auto (long "threads" <> short 't' <> metavar "N" <> help "use N threads; default is number of CPUs") output = strOption ...
684
parser = elpa2nix <$> (threads <|> pure 0) <*> output <*> server <*> indexOnly where threads = option auto (long "threads" <> short 't' <> metavar "N" <> help "use N threads; default is number of CPUs") output = strOption (long "output" <> sho...
659
false
true
14
10
261
179
86
93
null
null
DavidAlphaFox/darcs
containers-0.5.2.1/Darcs/Data/Map/Base.hs
gpl-2.0
map f (Bin sx kx x l r) = Bin sx kx (f x) (map f l) (map f r)
61
map f (Bin sx kx x l r) = Bin sx kx (f x) (map f l) (map f r)
61
map f (Bin sx kx x l r) = Bin sx kx (f x) (map f l) (map f r)
61
false
false
0
7
19
64
28
36
null
null
ocharles/hackage-server
Distribution/Client/Mirror/Session.hs
bsd-3-clause
requestPUT :: URI -> String -> ByteString -> HttpSession (Maybe ErrorResponse) requestPUT uri mimetype body = do (_, rsp) <- request (Request uri PUT headers body) case rspCode rsp of (2,_,_) -> return Nothing _ -> return (Just (mkErrorResponse uri rsp)) where headers = [ Header HdrConte...
614
requestPUT :: URI -> String -> ByteString -> HttpSession (Maybe ErrorResponse) requestPUT uri mimetype body = do (_, rsp) <- request (Request uri PUT headers body) case rspCode rsp of (2,_,_) -> return Nothing _ -> return (Just (mkErrorResponse uri rsp)) where headers = [ Header HdrConte...
614
requestPUT uri mimetype body = do (_, rsp) <- request (Request uri PUT headers body) case rspCode rsp of (2,_,_) -> return Nothing _ -> return (Just (mkErrorResponse uri rsp)) where headers = [ Header HdrContentLength (show (BS.length body)) , Header HdrContentType mimetype...
535
false
true
1
14
111
165
79
86
null
null
forste/haReFork
tools/base/TI/TiEnvFM.hs
bsd-3-clause
range (Env env) = elemsM env
28
range (Env env) = elemsM env
28
range (Env env) = elemsM env
28
false
false
0
7
5
18
8
10
null
null
brendanhay/gogol
gogol-datafusion/gen/Network/Google/Resource/DataFusion/Projects/Locations/Instances/Delete.hs
mpl-2.0
-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). plidUploadProtocol :: Lens' ProjectsLocationsInstancesDelete (Maybe Text) plidUploadProtocol = lens _plidUploadProtocol (\ s a -> s{_plidUploadProtocol = a})
227
plidUploadProtocol :: Lens' ProjectsLocationsInstancesDelete (Maybe Text) plidUploadProtocol = lens _plidUploadProtocol (\ s a -> s{_plidUploadProtocol = a})
165
plidUploadProtocol = lens _plidUploadProtocol (\ s a -> s{_plidUploadProtocol = a})
91
true
true
0
8
33
49
25
24
null
null
OS2World/DEV-UTIL-HUGS
oldlib/SkewHeap.hs
bsd-3-clause
size :: Ord a => Heap a -> Int size h = sz h 0 where sz E i = i sz (T _ a b) i = sz a (sz b (i + 1))
110
size :: Ord a => Heap a -> Int size h = sz h 0 where sz E i = i sz (T _ a b) i = sz a (sz b (i + 1))
110
size h = sz h 0 where sz E i = i sz (T _ a b) i = sz a (sz b (i + 1))
79
false
true
1
9
44
85
41
44
null
null
tphyahoo/haskoin
haskoin-core/Network/Haskoin/Crypto/Keys.hs
unlicense
-- | Derives a public key from a private key. This function will preserve -- information on key compression ('PrvKey' becomes 'PubKey' and 'PrvKeyU' -- becomes 'PubKeyU') derivePubKey :: PrvKeyI c -> PubKeyI c derivePubKey (PrvKeyI d c) = PubKeyI (EC.derivePubKey d) c
268
derivePubKey :: PrvKeyI c -> PubKeyI c derivePubKey (PrvKeyI d c) = PubKeyI (EC.derivePubKey d) c
97
derivePubKey (PrvKeyI d c) = PubKeyI (EC.derivePubKey d) c
58
true
true
0
8
42
52
25
27
null
null
jmitchell/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
isHoleName _ = False
25
isHoleName _ = False
25
isHoleName _ = False
25
false
false
0
5
8
9
4
5
null
null
imalsogreg/reffit
src/Reffit/Search.hs
gpl-3.0
searchDocs :: Int -> Map.Map DocumentId Document -> T.Text -> [Document] searchDocs n docs queryText = let nQueryText = norm queryText in take n . sortBy (\a b -> dScore queryText a `Prelude.compare` dScore queryText b) . filter ((>0) . dScore nQueryText) $ Map.elems docs
278
searchDocs :: Int -> Map.Map DocumentId Document -> T.Text -> [Document] searchDocs n docs queryText = let nQueryText = norm queryText in take n . sortBy (\a b -> dScore queryText a `Prelude.compare` dScore queryText b) . filter ((>0) . dScore nQueryText) $ Map.elems docs
278
searchDocs n docs queryText = let nQueryText = norm queryText in take n . sortBy (\a b -> dScore queryText a `Prelude.compare` dScore queryText b) . filter ((>0) . dScore nQueryText) $ Map.elems docs
205
false
true
1
10
50
131
62
69
null
null
rolph-recto/liquid-fixpoint
src/Language/Fixpoint/Types/Refinements.hs
bsd-3-clause
falseReft = Reft (vv_, PFalse)
30
falseReft = Reft (vv_, PFalse)
30
falseReft = Reft (vv_, PFalse)
30
false
false
0
6
4
15
8
7
null
null
MgaMPKAy/language-sh
Language/Sh/Arithmetic.hs
bsd-3-clause
table1 = [ [postfix "++" $ postinc (+1), postfix "--" $ postinc (+(-1))] , [prefix "+" $ e1 id, prefix "-" $ e1 negate] , [prefix "++" $ preinc (+1), prefix "--" $ preinc (+(-1))] #else table1 = [ [prefix "+" $ e1 id, prefix "-" $ e1 negate] #endif , [prefix "~" $ e1 complement,prefix "!" $ ...
1,796
table1 = [ [postfix "++" $ postinc (+1), postfix "--" $ postinc (+(-1))] , [prefix "+" $ e1 id, prefix "-" $ e1 negate] , [prefix "++" $ preinc (+1), prefix "--" $ preinc (+(-1))] #else table1 = [ [prefix "+" $ e1 id, prefix "-" $ e1 negate] #endif , [prefix "~" $ e1 complement,prefix "!" $ ...
1,796
table1 = [ [postfix "++" $ postinc (+1), postfix "--" $ postinc (+(-1))] , [prefix "+" $ e1 id, prefix "-" $ e1 negate] , [prefix "++" $ preinc (+1), prefix "--" $ preinc (+(-1))] #else table1 = [ [prefix "+" $ e1 id, prefix "-" $ e1 negate] #endif , [prefix "~" $ e1 complement,prefix "!" $ ...
1,796
false
false
0
13
651
856
445
411
null
null
bos/statistics
Statistics/Function.hs
bsd-2-clause
-- | Efficiently compute the next highest power of two for a -- non-negative integer. If the given value is already a power of -- two, it is returned unchanged. If negative, zero is returned. nextHighestPowerOfTwo :: Int -> Int nextHighestPowerOfTwo n #if WORD_SIZE_IN_BITS == 64 = 1 + _i32 #else = 1 + i16 #endif ...
899
nextHighestPowerOfTwo :: Int -> Int nextHighestPowerOfTwo n #if WORD_SIZE_IN_BITS == 64 = 1 + _i32 #else = 1 + i16 #endif where i0 = n - 1 i1 = i0 .|. i0 `shiftR` 1 i2 = i1 .|. i1 `shiftR` 2 i4 = i2 .|. i2 `shiftR` 4 i8 = i4 .|. i4 `shiftR` 8 i16 = i8 .|. i8 `shiftR` 1...
705
nextHighestPowerOfTwo n #if WORD_SIZE_IN_BITS == 64 = 1 + _i32 #else = 1 + i16 #endif where i0 = n - 1 i1 = i0 .|. i0 `shiftR` 1 i2 = i1 .|. i1 `shiftR` 2 i4 = i2 .|. i2 `shiftR` 4 i8 = i4 .|. i4 `shiftR` 8 i16 = i8 .|. i8 `shiftR` 16 _i32 = i16 .|. i16 `shiftR` 32...
669
true
true
6
18
235
151
86
65
null
null
headprogrammingczar/cabal
Cabal/Distribution/Simple/Utils.hs
bsd-3-clause
-- | Detailed internal debugging information -- -- We display these messages when the verbosity level is 'deafening' -- debug :: Verbosity -> String -> IO () debug verbosity msg = when (verbosity >= deafening) $ do putStr (wrapText msg) hFlush stdout -- | A variant of 'debug' that doesn't perform the automat...
378
debug :: Verbosity -> String -> IO () debug verbosity msg = when (verbosity >= deafening) $ do putStr (wrapText msg) hFlush stdout -- | A variant of 'debug' that doesn't perform the automatic line -- wrapping. Produces better output in some cases.
258
debug verbosity msg = when (verbosity >= deafening) $ do putStr (wrapText msg) hFlush stdout -- | A variant of 'debug' that doesn't perform the automatic line -- wrapping. Produces better output in some cases.
220
true
true
0
11
72
72
35
37
null
null
gergoerdi/tecs
src/Language/TECS/Jack/jackc.hs
bsd-3-clause
compileFile filename = do putStr $ unwords ["Compiling", filename, "... "] bs <- BS.readFile filename case parseJack bs filename of Left err -> do putStrLn "" hPutStrLn stderr err Right jack -> do -- Use withFile/hPutStrLn to ensure terminating n...
547
compileFile filename = do putStr $ unwords ["Compiling", filename, "... "] bs <- BS.readFile filename case parseJack bs filename of Left err -> do putStrLn "" hPutStrLn stderr err Right jack -> do -- Use withFile/hPutStrLn to ensure terminating n...
547
compileFile filename = do putStr $ unwords ["Compiling", filename, "... "] bs <- BS.readFile filename case parseJack bs filename of Left err -> do putStrLn "" hPutStrLn stderr err Right jack -> do -- Use withFile/hPutStrLn to ensure terminating n...
547
false
false
0
21
181
158
72
86
null
null
vikraman/ghc
compiler/prelude/THNames.hs
bsd-3-clause
injAnnTyConKey = mkPreludeTyConUnique 231
50
injAnnTyConKey = mkPreludeTyConUnique 231
50
injAnnTyConKey = mkPreludeTyConUnique 231
50
false
false
0
5
12
9
4
5
null
null
thomasbrus/imperia
src/Language/Imperia/Lexer.hs
mit
integer = IndentToken.integer lexer
39
integer = IndentToken.integer lexer
39
integer = IndentToken.integer lexer
39
false
false
0
6
7
11
5
6
null
null
thoughtpolice/cabal
cabal-install/Distribution/Client/Setup.hs
bsd-3-clause
relevantConfigValuesText :: [String] -> String relevantConfigValuesText vs = "Relevant global configuration keys:\n" ++ concat [" " ++ v ++ "\n" |v <- vs]
162
relevantConfigValuesText :: [String] -> String relevantConfigValuesText vs = "Relevant global configuration keys:\n" ++ concat [" " ++ v ++ "\n" |v <- vs]
162
relevantConfigValuesText vs = "Relevant global configuration keys:\n" ++ concat [" " ++ v ++ "\n" |v <- vs]
115
false
true
2
8
30
48
24
24
null
null
martin-kolinek/some-board-game
src/Settings/Style.hs
mit
settingsPopupCloseInternal :: CssClass settingsPopupCloseInternal = CssClass "settings-popup-close"
99
settingsPopupCloseInternal :: CssClass settingsPopupCloseInternal = CssClass "settings-popup-close"
99
settingsPopupCloseInternal = CssClass "settings-popup-close"
60
false
true
0
6
6
20
8
12
null
null
unisonweb/platform
parser-typechecker/src/Unison/PrettyTerminal.hs
mit
putPrettyLn :: P.Pretty CT.ColorText -> IO () putPrettyLn p | p == mempty = pure ()
83
putPrettyLn :: P.Pretty CT.ColorText -> IO () putPrettyLn p | p == mempty = pure ()
83
putPrettyLn p | p == mempty = pure ()
37
false
true
0
8
15
45
20
25
null
null
clarissalittler/pi-calculus
ParserAux.hs
mit
many1 p = do v <- p vs <- many p return $ v : vs
54
many1 p = do v <- p vs <- many p return $ v : vs
54
many1 p = do v <- p vs <- many p return $ v : vs
54
false
false
0
8
21
37
16
21
null
null
tpsinnem/Idris-dev
src/Idris/Parser/Helpers.hs
bsd-3-clause
collect (d : ds) = d : collect ds
33
collect (d : ds) = d : collect ds
33
collect (d : ds) = d : collect ds
33
false
false
0
6
8
24
11
13
null
null
carlosavieira/self-study
programming/Haskell/99 problems/solutions/02.hs
gpl-3.0
myButLast [x] = error "Singleton list"
38
myButLast [x] = error "Singleton list"
38
myButLast [x] = error "Singleton list"
38
false
false
0
6
5
15
7
8
null
null
apyrgio/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
ssEnabledUserShutdown :: String ssEnabledUserShutdown = "enabled_user_shutdown"
79
ssEnabledUserShutdown :: String ssEnabledUserShutdown = "enabled_user_shutdown"
79
ssEnabledUserShutdown = "enabled_user_shutdown"
47
false
true
0
4
5
11
6
5
null
null
hermish/courseography
app/Scripts.hs
gpl-3.0
reactScripts :: [T.Text] reactScripts = if enableCdn then ["https://cdnjs.cloudflare.com/ajax/libs/react/0.14.3/react.js", "https://cdnjs.cloudflare.com/ajax/libs/react/0.14.3/react-dom.js", "https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.34/browser.min.js...
502
reactScripts :: [T.Text] reactScripts = if enableCdn then ["https://cdnjs.cloudflare.com/ajax/libs/react/0.14.3/react.js", "https://cdnjs.cloudflare.com/ajax/libs/react/0.14.3/react-dom.js", "https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.34/browser.min.js...
502
reactScripts = if enableCdn then ["https://cdnjs.cloudflare.com/ajax/libs/react/0.14.3/react.js", "https://cdnjs.cloudflare.com/ajax/libs/react/0.14.3/react-dom.js", "https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.34/browser.min.js"] else ["...
477
false
true
0
6
128
42
26
16
null
null
forste/haReFork
refactorer/RefacLetWhere.hs
bsd-3-clause
addLetInWhere _ _ _ = error "Please highlight a let expression!"
64
addLetInWhere _ _ _ = error "Please highlight a let expression!"
64
addLetInWhere _ _ _ = error "Please highlight a let expression!"
64
false
false
0
5
10
16
7
9
null
null
sheyll/b9-vm-image-builder
src/lib/System/IO/B9Extras.hs
mit
getDirectoryFiles :: MonadIO m => FilePath -> m [FilePath] getDirectoryFiles dir = do entries <- liftIO (getDirectoryContents dir) fileEntries <- mapM (liftIO . doesFileExist . (dir </>)) entries return (snd <$> filter fst (fileEntries `zip` entries)) -- | Create all missing parent directories of a file path. --...
336
getDirectoryFiles :: MonadIO m => FilePath -> m [FilePath] getDirectoryFiles dir = do entries <- liftIO (getDirectoryContents dir) fileEntries <- mapM (liftIO . doesFileExist . (dir </>)) entries return (snd <$> filter fst (fileEntries `zip` entries)) -- | Create all missing parent directories of a file path. --...
336
getDirectoryFiles dir = do entries <- liftIO (getDirectoryContents dir) fileEntries <- mapM (liftIO . doesFileExist . (dir </>)) entries return (snd <$> filter fst (fileEntries `zip` entries)) -- | Create all missing parent directories of a file path. -- -- @since 1.1.0
277
false
true
0
12
57
104
53
51
null
null
rjregenold/morse
src/Morse/Commands/Server.hs
mit
formatResponse :: (ResponseFormat -> ActionM ()) -> ActionM () formatResponse f = do mAccept <- header "Accept" let mAccepts = (parseHttpAccept . TE.encodeUtf8 . TL.toStrict) <$> mAccept case mAccepts of Just xs | "text/html" `elem` xs -> f RFHtml | "application/json" `elem` xs -> f RFJson _ -...
330
formatResponse :: (ResponseFormat -> ActionM ()) -> ActionM () formatResponse f = do mAccept <- header "Accept" let mAccepts = (parseHttpAccept . TE.encodeUtf8 . TL.toStrict) <$> mAccept case mAccepts of Just xs | "text/html" `elem` xs -> f RFHtml | "application/json" `elem` xs -> f RFJson _ -...
330
formatResponse f = do mAccept <- header "Accept" let mAccepts = (parseHttpAccept . TE.encodeUtf8 . TL.toStrict) <$> mAccept case mAccepts of Just xs | "text/html" `elem` xs -> f RFHtml | "application/json" `elem` xs -> f RFJson _ -> f RFHtml
267
false
true
0
14
75
131
62
69
null
null
M42/mikrokosmos
source/Lambda.hs
gpl-3.0
usestypecons (App a b) = usestypecons a || usestypecons b
57
usestypecons (App a b) = usestypecons a || usestypecons b
57
usestypecons (App a b) = usestypecons a || usestypecons b
57
false
false
0
7
9
27
12
15
null
null
valderman/himitsu
src/Himitsu/PasswordFile.hs
bsd-3-clause
liftEither (Left e) = fail $ "liftEither got a Left: " ++ show e
65
liftEither (Left e) = fail $ "liftEither got a Left: " ++ show e
65
liftEither (Left e) = fail $ "liftEither got a Left: " ++ show e
65
false
false
0
7
14
26
12
14
null
null
devonhollowood/adventofcode
2015/day5/day5.hs
mit
isNice :: Classification -> Bool isNice c = c == Nice
53
isNice :: Classification -> Bool isNice c = c == Nice
53
isNice c = c == Nice
20
false
true
1
7
10
29
13
16
null
null
xnning/fcore
lib/simplify/SimplifyImpl.hs
bsd-2-clause
transType i (FI.And a1 a2) = Product . map (transType i) $ [a1, a2]
75
transType i (FI.And a1 a2) = Product . map (transType i) $ [a1, a2]
75
transType i (FI.And a1 a2) = Product . map (transType i) $ [a1, a2]
75
false
false
0
9
21
44
22
22
null
null
DavidAlphaFox/darcs
harness/Darcs/Test/Patch/Arbitrary/PrimV3.hs
gpl-2.0
aTextHunk :: forall wX wY . (UUID, Object Fail) -> Gen (Prim wX wY) aTextHunk (uuid, (Blob text _)) = do hunk <- aHunk (unFail text) return $ TextHunk uuid hunk
167
aTextHunk :: forall wX wY . (UUID, Object Fail) -> Gen (Prim wX wY) aTextHunk (uuid, (Blob text _)) = do hunk <- aHunk (unFail text) return $ TextHunk uuid hunk
167
aTextHunk (uuid, (Blob text _)) = do hunk <- aHunk (unFail text) return $ TextHunk uuid hunk
99
false
true
0
10
37
86
43
43
null
null
michaelficarra/purescript
src/Language/PureScript/Docs/Types.hs
mit
parseAssociativity :: String -> Maybe P.Associativity parseAssociativity str = case str of "infix" -> Just P.Infix "infixl" -> Just P.Infixl "infixr" -> Just P.Infixr _ -> Nothing
195
parseAssociativity :: String -> Maybe P.Associativity parseAssociativity str = case str of "infix" -> Just P.Infix "infixl" -> Just P.Infixl "infixr" -> Just P.Infixr _ -> Nothing
195
parseAssociativity str = case str of "infix" -> Just P.Infix "infixl" -> Just P.Infixl "infixr" -> Just P.Infixr _ -> Nothing
141
false
true
2
7
42
40
24
16
null
null
yuga/ghc-mod
Language/Haskell/GhcMod/Debug.hs
bsd-3-clause
---------------------------------------------------------------- -- | Obtaining debug information. debugInfo :: Options -> Cradle -> FilePath -- ^ A target file. -> IO String debugInfo opt cradle fileName = unlines <$> withGHC fileName (debug opt cradle fileName)
296
debugInfo :: Options -> Cradle -> FilePath -- ^ A target file. -> IO String debugInfo opt cradle fileName = unlines <$> withGHC fileName (debug opt cradle fileName)
196
debugInfo opt cradle fileName = unlines <$> withGHC fileName (debug opt cradle fileName)
88
true
true
0
9
66
59
29
30
null
null
hspec/sensei
src/Session.hs
mit
close :: Session -> IO () close = GhciWrapper.close . sessionInterpreter
72
close :: Session -> IO () close = GhciWrapper.close . sessionInterpreter
72
close = GhciWrapper.close . sessionInterpreter
46
false
true
1
8
10
33
14
19
null
null
rpglover64/lens
src/Control/Lens/Setter.hs
bsd-3-clause
-- | Build an index-preserving 'Setter' from a map-like function. -- -- Your supplied function @f@ is required to satisfy: -- -- @ -- f 'id' ≡ 'id' -- f g '.' f h ≡ f (g '.' h) -- @ -- -- Equational reasoning: -- -- @ -- 'setting' '.' 'over' ≡ 'id' -- 'over' '.' 'setting' ≡ 'id' -- @ -- -- Another way to view 'sets' is...
642
setting :: ((a -> b) -> s -> t) -> IndexPreservingSetter s t a b setting l pafb = cotabulate $ \ws -> pure $ l (\a -> untainted (cosieve pafb (a <$ ws))) (extract ws)
166
setting l pafb = cotabulate $ \ws -> pure $ l (\a -> untainted (cosieve pafb (a <$ ws))) (extract ws)
101
true
true
0
15
140
123
73
50
null
null
plow-technologies/ghcjs-dom
src/GHCJS/DOM/EventM.hs
mit
event :: EventM t e e event = ask
33
event :: EventM t e e event = ask
33
event = ask
11
false
true
0
5
8
18
9
9
null
null
crufter/hakit
src/hakit/db.hs
bsd-3-clause
idOf :: DTyped -> T.Text idOf x = getString "id" $ unpackDbRef x
64
idOf :: DTyped -> T.Text idOf x = getString "id" $ unpackDbRef x
64
idOf x = getString "id" $ unpackDbRef x
39
false
true
2
8
12
36
15
21
null
null
odr/xml-enumerator
Text/XML/Enumerator/Parse.hs
bsd-2-clause
-- | Keep parsing elements as long as the parser returns 'Just'. many :: Monad m => Iteratee SEvent m (Maybe a) -> Iteratee SEvent m [a] many i = go id where go front = do x <- i case x of Nothing -> return $ front [] Just y -> go $ front . (:) y {- -- There is some po...
1,077
many :: Monad m => Iteratee SEvent m (Maybe a) -> Iteratee SEvent m [a] many i = go id where go front = do x <- i case x of Nothing -> return $ front [] Just y -> go $ front . (:) y {- -- There is some possible realisations using higher interface -- ignoreSiblings' is ...
1,012
many i = go id where go front = do x <- i case x of Nothing -> return $ front [] Just y -> go $ front . (:) y {- -- There is some possible realisations using higher interface -- ignoreSiblings' is about 30 percent slowly than ignoreSiblings -- if ignoreSiblings' uses i...
940
true
true
0
12
240
116
56
60
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/cmm/CmmUtils.hs
bsd-3-clause
mkDataLits :: Section -> CLabel -> [CmmLit] -> GenCmmDecl CmmStatics info stmt -- Build a data-segment data block mkDataLits section lbl lits = CmmData section (Statics lbl $ map CmmStaticLit lits)
199
mkDataLits :: Section -> CLabel -> [CmmLit] -> GenCmmDecl CmmStatics info stmt mkDataLits section lbl lits = CmmData section (Statics lbl $ map CmmStaticLit lits)
164
mkDataLits section lbl lits = CmmData section (Statics lbl $ map CmmStaticLit lits)
85
true
true
0
8
32
61
30
31
null
null
noughtmare/yi
yi-core/src/Yi/File.hs
gpl-2.0
-- | Is there a proper file associated with the buffer? -- In other words, does it make sense to offer to save it? isFileBuffer :: FBuffer -> YiM Bool isFileBuffer b = case b ^. identA of MemBuffer _ -> return False FileBuffer fn -> not <$> liftBase (doesDirectoryExist fn)
277
isFileBuffer :: FBuffer -> YiM Bool isFileBuffer b = case b ^. identA of MemBuffer _ -> return False FileBuffer fn -> not <$> liftBase (doesDirectoryExist fn)
162
isFileBuffer b = case b ^. identA of MemBuffer _ -> return False FileBuffer fn -> not <$> liftBase (doesDirectoryExist fn)
126
true
true
0
11
54
69
32
37
null
null
namakemono/tapl
arith/Parser.hs
mit
term = m_parens exprParser <|> do { -- if t1 then t2 else t3 m_reserved "if"; t1 <- exprParser; m_reserved "then"; t2 <- exprParser; m_reserved "else"; t3 <- exprParser; return (TmIf t1 t2 t3) } <|> do { -- succ t1 m_reserved "succ"; t1...
728
term = m_parens exprParser <|> do { -- if t1 then t2 else t3 m_reserved "if"; t1 <- exprParser; m_reserved "then"; t2 <- exprParser; m_reserved "else"; t3 <- exprParser; return (TmIf t1 t2 t3) } <|> do { -- succ t1 m_reserved "succ"; t1...
728
term = m_parens exprParser <|> do { -- if t1 then t2 else t3 m_reserved "if"; t1 <- exprParser; m_reserved "then"; t2 <- exprParser; m_reserved "else"; t3 <- exprParser; return (TmIf t1 t2 t3) } <|> do { -- succ t1 m_reserved "succ"; t1...
728
false
false
21
9
269
252
126
126
null
null
bredelings/BAli-Phy
haskell/Data/List.hs
gpl-2.0
head [] = error "Data.List.head: empty list"
47
head [] = error "Data.List.head: empty list"
47
head [] = error "Data.List.head: empty list"
47
false
false
0
6
9
14
6
8
null
null
mapinguari/SC_HS_Proxy
src/Proxy/Query/Unit.hs
mit
isSpellCaster SpecialCerebrateDaggoth = False
45
isSpellCaster SpecialCerebrateDaggoth = False
45
isSpellCaster SpecialCerebrateDaggoth = False
45
false
false
0
5
3
9
4
5
null
null
oshyshko/adventofcode
src/Util.hs
bsd-3-clause
trace :: String -> a -> a trace = Trace.trace
45
trace :: String -> a -> a trace = Trace.trace
45
trace = Trace.trace
19
false
true
0
6
9
21
11
10
null
null
nobsun/oi
src/Data/OI/Internal.hs
bsd-3-clause
iooi :: IO a -> OI a -> a iooi io (OI var val) = put io var `pseq` val
70
iooi :: IO a -> OI a -> a iooi io (OI var val) = put io var `pseq` val
70
iooi io (OI var val) = put io var `pseq` val
44
false
true
0
10
19
55
25
30
null
null
pranjaltale16/codeworld
codeworld-compiler/src/CodeWorld/Compile.hs
apache-2.0
compileCode :: MonadCompile m => m () compileCode = ifSucceeding $ withSystemTempDirectory "build" $ \tmpdir -> do ghcjsArgs <- prepareCompile tmpdir timeout <- gets compileTimeout verbose <- gets compileVerbose (exitCode, output) <- liftIO $ runCompiler tmpdir timeout ghcjsArgs verbose when (exitC...
570
compileCode :: MonadCompile m => m () compileCode = ifSucceeding $ withSystemTempDirectory "build" $ \tmpdir -> do ghcjsArgs <- prepareCompile tmpdir timeout <- gets compileTimeout verbose <- gets compileVerbose (exitCode, output) <- liftIO $ runCompiler tmpdir timeout ghcjsArgs verbose when (exitC...
570
compileCode = ifSucceeding $ withSystemTempDirectory "build" $ \tmpdir -> do ghcjsArgs <- prepareCompile tmpdir timeout <- gets compileTimeout verbose <- gets compileVerbose (exitCode, output) <- liftIO $ runCompiler tmpdir timeout ghcjsArgs verbose when (exitCode /= ExitSuccess) failCompile m...
532
false
true
0
12
115
164
76
88
null
null
romac/mental
src/Mental/Tree.hs
bsd-3-clause
unAnnotateTree :: AnnTree a -> Tree unAnnotateTree = unCofree
61
unAnnotateTree :: AnnTree a -> Tree unAnnotateTree = unCofree
61
unAnnotateTree = unCofree
25
false
true
0
6
8
18
9
9
null
null
crooney/cinder
src/Cinder/SVG.hs
bsd-3-clause
dS :: [Seg] -> Primitive dS = A.d . showD
41
dS :: [Seg] -> Primitive dS = A.d . showD
41
dS = A.d . showD
16
false
true
1
7
9
32
14
18
null
null
HJvT/hdirect
src/Parser.hs
bsd-3-clause
action_422 (181#) = happyShift action_150
41
action_422 (181#) = happyShift action_150
41
action_422 (181#) = happyShift action_150
41
false
false
0
6
4
15
7
8
null
null
nevrenato/Hets_Fork
HasCASL/MixAna.hs
gpl-2.0
addType :: Term -> Term -> Term addType (MixTypeTerm q ty ps) t = TypedTerm t q ty ps
85
addType :: Term -> Term -> Term addType (MixTypeTerm q ty ps) t = TypedTerm t q ty ps
85
addType (MixTypeTerm q ty ps) t = TypedTerm t q ty ps
53
false
true
0
10
18
48
22
26
null
null
markwright/antlrc-examples
src/tapl/fulluntyped/Semantic.hs
bsd-3-clause
eval1 ctx (TmIsZero fi t1) = maybe Nothing f t1' where t1' = eval1 ctx t1 f :: TermInfo -> Maybe TermInfo f t1'' = Just (TmIsZero fi t1'')
148
eval1 ctx (TmIsZero fi t1) = maybe Nothing f t1' where t1' = eval1 ctx t1 f :: TermInfo -> Maybe TermInfo f t1'' = Just (TmIsZero fi t1'')
148
eval1 ctx (TmIsZero fi t1) = maybe Nothing f t1' where t1' = eval1 ctx t1 f :: TermInfo -> Maybe TermInfo f t1'' = Just (TmIsZero fi t1'')
148
false
false
0
7
38
70
33
37
null
null
haroldcarr/learn-haskell-coq-ml-etc
haskell/book/2009-Real_World_Haskell/Prettify.hs
unlicense
softline :: Doc softline = group line
37
softline :: Doc softline = group line
37
softline = group line
21
false
true
0
5
6
14
7
7
null
null
jmikkola/Athena
src/Inference.hs
mit
-- TODO: check kinds in varBind mguList :: Substitution -> [(Type, Type)] -> Result Substitution mguList sub [] = return sub
125
mguList :: Substitution -> [(Type, Type)] -> Result Substitution mguList sub [] = return sub
92
mguList sub [] = return sub
27
true
true
0
8
21
42
22
20
null
null
y-kamiya/parallel-concurrent-haskell
src/Stm/TChan.hs
gpl-2.0
isEmptyTChan :: TChan a -> STM Bool isEmptyTChan (TChan read _) = do listHead <- readTVar read head <- readTVar listHead case head of TNil -> return True _ -> return False
185
isEmptyTChan :: TChan a -> STM Bool isEmptyTChan (TChan read _) = do listHead <- readTVar read head <- readTVar listHead case head of TNil -> return True _ -> return False
185
isEmptyTChan (TChan read _) = do listHead <- readTVar read head <- readTVar listHead case head of TNil -> return True _ -> return False
149
false
true
0
10
45
77
34
43
null
null
pparkkin/eta
compiler/ETA/Main/SysTools.hs
bsd-3-clause
-- Grab linker info and cache it in DynFlags. getLinkerInfo :: DynFlags -> IO LinkerInfo getLinkerInfo dflags = do info <- readIORef (rtldInfo dflags) case info of Just v -> return v Nothing -> do v <- getLinkerInfo' dflags writeIORef (rtldInfo dflags) (Just v) return v -- See Note [Run-...
338
getLinkerInfo :: DynFlags -> IO LinkerInfo getLinkerInfo dflags = do info <- readIORef (rtldInfo dflags) case info of Just v -> return v Nothing -> do v <- getLinkerInfo' dflags writeIORef (rtldInfo dflags) (Just v) return v -- See Note [Run-time linker info].
292
getLinkerInfo dflags = do info <- readIORef (rtldInfo dflags) case info of Just v -> return v Nothing -> do v <- getLinkerInfo' dflags writeIORef (rtldInfo dflags) (Just v) return v -- See Note [Run-time linker info].
249
true
true
0
14
83
100
45
55
null
null
8l/NetASM-haskell
Apps/StatefulMACLearner/Run.hs
gpl-3.0
h3 = genHdr([("inport", 2) ,("outport", 0) ,("srcmac", 5432) ,("dstmac", 6543) ,("i", 0)])
162
h3 = genHdr([("inport", 2) ,("outport", 0) ,("srcmac", 5432) ,("dstmac", 6543) ,("i", 0)])
162
h3 = genHdr([("inport", 2) ,("outport", 0) ,("srcmac", 5432) ,("dstmac", 6543) ,("i", 0)])
162
false
false
1
7
83
60
36
24
null
null
OpenXT/manager
xenmgr/Vm/Queries.hs
gpl-2.0
getVmNicMacActual :: Uuid -> NicID -> Rpc String getVmNicMacActual uuid nicid = from_nic =<< getNic uuid nicid where from_nic Nothing = failNoSuchNic from_nic (Just nic) = return $ fromMaybe (generatedVmNicMac uuid nicid) $ nicdefMac nic
252
getVmNicMacActual :: Uuid -> NicID -> Rpc String getVmNicMacActual uuid nicid = from_nic =<< getNic uuid nicid where from_nic Nothing = failNoSuchNic from_nic (Just nic) = return $ fromMaybe (generatedVmNicMac uuid nicid) $ nicdefMac nic
252
getVmNicMacActual uuid nicid = from_nic =<< getNic uuid nicid where from_nic Nothing = failNoSuchNic from_nic (Just nic) = return $ fromMaybe (generatedVmNicMac uuid nicid) $ nicdefMac nic
203
false
true
0
9
49
83
39
44
null
null
DougBurke/swish
tests/N3ParserTest.hs
lgpl-2.1
tx321 = arc s2 p1 o1
20
tx321 = arc s2 p1 o1
20
tx321 = arc s2 p1 o1
20
false
false
1
5
5
19
6
13
null
null
google/codeworld
codeworld-base/src/Internal/Color.hs
apache-2.0
-- | Decreases the luminosity of a color by the given amount. -- -- The amount should be between -1 and 1, where: -- -- * @darker(c, 1)@ is always black, regardless of @c@. -- * @darker(c, 0)@ is the same as @c@. -- * @darker(c, -1)@ is always white, regardless of @c@. darker :: (Color, Number) -> Color darker (c, d) =...
365
darker :: (Color, Number) -> Color darker (c, d) = Color (CW.darker (toDouble d) (toCWColor c))
95
darker (c, d) = Color (CW.darker (toDouble d) (toCWColor c))
60
true
true
0
9
68
62
36
26
null
null
brendanhay/gogol
gogol-androiddeviceprovisioning/gen/Network/Google/Resource/AndroidDeviceProvisioning/Partners/Devices/UpdateMetadataAsync.hs
mpl-2.0
-- | Multipart request metadata. pdumaPayload :: Lens' PartnersDevicesUpdateMetadataAsync UpdateDeviceMetadataInBatchRequest pdumaPayload = lens _pdumaPayload (\ s a -> s{_pdumaPayload = a})
192
pdumaPayload :: Lens' PartnersDevicesUpdateMetadataAsync UpdateDeviceMetadataInBatchRequest pdumaPayload = lens _pdumaPayload (\ s a -> s{_pdumaPayload = a})
159
pdumaPayload = lens _pdumaPayload (\ s a -> s{_pdumaPayload = a})
67
true
true
0
9
22
42
22
20
null
null
tranma/shitty-statistics
src/Statistics/Shitty/Regression.hs
bsd-3-clause
rSquared :: [Double] -- ^ data set y1..yn -> [Double] -- ^ model f1..fn -> Double -- ^ r squared rSquared ys fs = let yBar = sum ys / fromIntegral (length ys) ssTot = sum (fmap (square . subtract yBar) ys) ssRes = sum (fmap square (zipWith (-) ys fs)) in 1 - (ssRes / ssTot)
302
rSquared :: [Double] -- ^ data set y1..yn -> [Double] -- ^ model f1..fn -> Double rSquared ys fs = let yBar = sum ys / fromIntegral (length ys) ssTot = sum (fmap (square . subtract yBar) ys) ssRes = sum (fmap square (zipWith (-) ys fs)) in 1 - (ssRes / ssTot)
285
rSquared ys fs = let yBar = sum ys / fromIntegral (length ys) ssTot = sum (fmap (square . subtract yBar) ys) ssRes = sum (fmap square (zipWith (-) ys fs)) in 1 - (ssRes / ssTot)
197
true
true
0
14
84
131
66
65
null
null
jsl/osm2gmap
src/GenPrintableMap.hs
mit
opts :: ShakeOptions opts = shakeOptions { shakeFiles = dataDir , shakeVerbosity = Diagnostic }
119
opts :: ShakeOptions opts = shakeOptions { shakeFiles = dataDir , shakeVerbosity = Diagnostic }
119
opts = shakeOptions { shakeFiles = dataDir , shakeVerbosity = Diagnostic }
98
false
true
0
7
38
35
17
18
null
null
farrellm/advent-2016
src/Day23.hs
mit
runOpt :: State BunnyState () runOpt = go where go = do i <- instr <<%= succ os <- drop i <$> use ops case os of Inc a:Dec b:Jnz (Reg b') (Con (-2)):_ | b == b' -> add a b >> go Dec b:Inc a:Jnz (Reg b') (Con (-2)):_ | b == b' -> add a b >> go -- Cpy (C...
874
runOpt :: State BunnyState () runOpt = go where go = do i <- instr <<%= succ os <- drop i <$> use ops case os of Inc a:Dec b:Jnz (Reg b') (Con (-2)):_ | b == b' -> add a b >> go Dec b:Inc a:Jnz (Reg b') (Con (-2)):_ | b == b' -> add a b >> go -- Cpy (C...
874
runOpt = go where go = do i <- instr <<%= succ os <- drop i <$> use ops case os of Inc a:Dec b:Jnz (Reg b') (Con (-2)):_ | b == b' -> add a b >> go Dec b:Inc a:Jnz (Reg b') (Con (-2)):_ | b == b' -> add a b >> go -- Cpy (Con 0) a:Cpy (Reg b) c: ...
844
false
true
0
17
388
371
174
197
null
null
orclev/octarine-sapient-walnut
src/Docs.hs
bsd-3-clause
server :: Server DocsAPI server = serveDocs where serveDocs _ respond = respond $ responseLBS ok200 [html] Docs.docsBS html = ("Content-Type", "text/html")
165
server :: Server DocsAPI server = serveDocs where serveDocs _ respond = respond $ responseLBS ok200 [html] Docs.docsBS html = ("Content-Type", "text/html")
165
server = serveDocs where serveDocs _ respond = respond $ responseLBS ok200 [html] Docs.docsBS html = ("Content-Type", "text/html")
140
false
true
2
7
31
62
29
33
null
null
AlexanderPankiv/ghc
compiler/specialise/Rules.hs
bsd-3-clause
ruleCheck _ (Type _) = emptyBag
38
ruleCheck _ (Type _) = emptyBag
38
ruleCheck _ (Type _) = emptyBag
38
false
false
1
6
12
20
8
12
null
null