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
HJvT/hdirect
src/Parser.hs
bsd-3-clause
action_174 (124#) = happyShift action_177
41
action_174 (124#) = happyShift action_177
41
action_174 (124#) = happyShift action_177
41
false
false
0
6
4
15
7
8
null
null
rahulmutt/ghcvm
libraries/base/GHC/IO/Encoding.hs
bsd-3-clause
-- | Look up the named Unicode encoding. May fail with -- -- * 'isDoesNotExistError' if the encoding is unknown -- -- The set of known encodings is system-dependent, but includes at least: -- -- * @UTF-8@ -- -- * @UTF-16@, @UTF-16BE@, @UTF-16LE@ -- -- * @UTF-32@, @UTF-32BE@, @UTF-32LE@ -- -- There is additional no...
2,633
mkTextEncoding :: String -> IO TextEncoding mkTextEncoding e = case mb_coding_failure_mode of Nothing -> unknownEncodingErr e Just cfm -> mkTextEncoding' cfm enc where (enc, suffix) = span (/= '/') e mb_coding_failure_mode = case suffix of "" -> Just ErrorOnCodingFailure "//...
495
mkTextEncoding e = case mb_coding_failure_mode of Nothing -> unknownEncodingErr e Just cfm -> mkTextEncoding' cfm enc where (enc, suffix) = span (/= '/') e mb_coding_failure_mode = case suffix of "" -> Just ErrorOnCodingFailure "//IGNORE" -> Just IgnoreCodingFailure ...
451
true
true
1
9
597
172
107
65
null
null
goldfirere/singletons
singletons-base/tests/compile-and-dump/Singletons/T29.hs
bsd-3-clause
foo1a :: Proxy (Foo True) foo1a = Proxy
39
foo1a :: Proxy (Foo True) foo1a = Proxy
39
foo1a = Proxy
13
false
true
0
7
7
20
10
10
null
null
hvr/vector
Data/Vector/Storable/Mutable.hs
bsd-3-clause
copy = G.copy
13
copy = G.copy
13
copy = G.copy
13
false
false
1
6
2
12
4
8
null
null
graydon/metrics
tests/CounterTest.hs
mit
smallCount :: Gen Int smallCount = choose (0, 10000)
52
smallCount :: Gen Int smallCount = choose (0, 10000)
52
smallCount = choose (0, 10000)
30
false
true
0
6
8
23
12
11
null
null
m-alvarez/jhc
drift_processed/Ho/Type.hs
mit
hoKinds_s v = hoKinds_u (const v)
35
hoKinds_s v = hoKinds_u (const v)
35
hoKinds_s v = hoKinds_u (const v)
35
false
false
0
7
7
18
8
10
null
null
IreneKnapp/Faction
libfaction/Distribution/PackageDescription/Parse.hs
bsd-3-clause
storeXFieldsTest :: UnrecFieldParser TestSuiteStanza storeXFieldsTest (f@('x':'-':_), val) t@(TestSuiteStanza { testStanzaBuildInfo = bi }) = Just $ t {testStanzaBuildInfo = bi{ customFieldsBI = (f,val):(customFieldsBI bi)}}
228
storeXFieldsTest :: UnrecFieldParser TestSuiteStanza storeXFieldsTest (f@('x':'-':_), val) t@(TestSuiteStanza { testStanzaBuildInfo = bi }) = Just $ t {testStanzaBuildInfo = bi{ customFieldsBI = (f,val):(customFieldsBI bi)}}
228
storeXFieldsTest (f@('x':'-':_), val) t@(TestSuiteStanza { testStanzaBuildInfo = bi }) = Just $ t {testStanzaBuildInfo = bi{ customFieldsBI = (f,val):(customFieldsBI bi)}}
175
false
true
0
12
27
90
51
39
null
null
dkensinger/haskell
haskell-primes/BayerPrimes.hs
gpl-3.0
mergeB xs (B ys) zs = mergeC xs ys zs
37
mergeB xs (B ys) zs = mergeC xs ys zs
37
mergeB xs (B ys) zs = mergeC xs ys zs
37
false
false
0
7
9
27
12
15
null
null
edahlgren/protocol-buffers
hprotoc/Text/ProtocolBuffers/ProtoCompile/Parser.hs
apache-2.0
makeUninterpetedOption :: [(Utf8,Bool)] -> D.UninterpretedOption makeUninterpetedOption nameParts = defaultValue { D.UninterpretedOption.name = Seq.fromList . map makeNamePart $ nameParts } where makeNamePart (name_part,is_extension) = defaultValue { D.NamePart.name_part = name_part ...
390
makeUninterpetedOption :: [(Utf8,Bool)] -> D.UninterpretedOption makeUninterpetedOption nameParts = defaultValue { D.UninterpretedOption.name = Seq.fromList . map makeNamePart $ nameParts } where makeNamePart (name_part,is_extension) = defaultValue { D.NamePart.name_part = name_part ...
390
makeUninterpetedOption nameParts = defaultValue { D.UninterpretedOption.name = Seq.fromList . map makeNamePart $ nameParts } where makeNamePart (name_part,is_extension) = defaultValue { D.NamePart.name_part = name_part , D.NamePart.is_extension = is_extens...
325
false
true
0
9
96
89
51
38
null
null
aedanlombardo/HaskellPS
DSP-PBE/Tests/TestUtils.hs
bsd-3-clause
makePairs :: [a] -> [(a,a)] makePairs (x:y:ys) = (x,y): makePairs ys
68
makePairs :: [a] -> [(a,a)] makePairs (x:y:ys) = (x,y): makePairs ys
68
makePairs (x:y:ys) = (x,y): makePairs ys
40
false
true
0
7
10
58
31
27
null
null
Spheniscida/cHaTTP
webapp/Chattp/Webapp/FastCGI.hs
mit
-- This function will be run by runFastCGIConcurrent fcgiMain :: ChanInfo -> CGI CGIResult fcgiMain channels = do Just doc_uri <- getVar "DOCUMENT_URI" -- document uri is /always/ there. Kill me if not ;) let rq_type = getOpType . BS.pack $ doc_uri setHeader "Content-Type" "application/json" case rq_ty...
1,003
fcgiMain :: ChanInfo -> CGI CGIResult fcgiMain channels = do Just doc_uri <- getVar "DOCUMENT_URI" -- document uri is /always/ there. Kill me if not ;) let rq_type = getOpType . BS.pack $ doc_uri setHeader "Content-Type" "application/json" case rq_type of WebLogin -> handleLogin channels ...
949
fcgiMain channels = do Just doc_uri <- getVar "DOCUMENT_URI" -- document uri is /always/ there. Kill me if not ;) let rq_type = getOpType . BS.pack $ doc_uri setHeader "Content-Type" "application/json" case rq_type of WebLogin -> handleLogin channels WebLogout -> handleLogout channels ...
911
true
true
10
13
213
176
85
91
null
null
atsukotakahashi/wi
sketches/IncrementalParser.hs
gpl-2.0
delete at len (Bin l x p _ rl rr) = Bin (l-len) x p True (delete at ll rl) (delete (at - getLength rl) lr rr) where ll = min (getLength rl) len lr = max (len - getLength rl) 0
189
delete at len (Bin l x p _ rl rr) = Bin (l-len) x p True (delete at ll rl) (delete (at - getLength rl) lr rr) where ll = min (getLength rl) len lr = max (len - getLength rl) 0
189
delete at len (Bin l x p _ rl rr) = Bin (l-len) x p True (delete at ll rl) (delete (at - getLength rl) lr rr) where ll = min (getLength rl) len lr = max (len - getLength rl) 0
189
false
false
2
10
55
129
58
71
null
null
kseo/untyped
src/Language/LambdaCalculus/Parser/Common.hs
bsd-3-clause
lcDef :: LanguageDef st lcDef = emptyDef { P.identStart = letter , P.identLetter = letter <|> char '\'' }
120
lcDef :: LanguageDef st lcDef = emptyDef { P.identStart = letter , P.identLetter = letter <|> char '\'' }
120
lcDef = emptyDef { P.identStart = letter , P.identLetter = letter <|> char '\'' }
96
false
true
0
9
33
43
22
21
null
null
testexplode/testexplode
doc/examples/Te52.hs
lgpl-3.0
-- Difference of the Speed measurement makeDifferenceCode :: Te52Cnf -> Te52Locals -> L.Text makeDifferenceCode cfg locals = [qc| # states of the variables: {locals} wisirSpeed({wisirNo cfg}, { fromIntegral (speed cfg)* (1-(fromIntegral (percentageOfFailure cfg)/100.0))} ); wait({durationOfFailur...
331
makeDifferenceCode :: Te52Cnf -> Te52Locals -> L.Text makeDifferenceCode cfg locals = [qc| # states of the variables: {locals} wisirSpeed({wisirNo cfg}, { fromIntegral (speed cfg)* (1-(fromIntegral (percentageOfFailure cfg)/100.0))} ); wait({durationOfFailure cfg}); |]
278
makeDifferenceCode cfg locals = [qc| # states of the variables: {locals} wisirSpeed({wisirNo cfg}, { fromIntegral (speed cfg)* (1-(fromIntegral (percentageOfFailure cfg)/100.0))} ); wait({durationOfFailure cfg}); |]
224
true
true
0
7
59
31
18
13
null
null
ellis/OnTopOfThings
old-20150308/src/OnTopOfThings/Actions/Utils.hs
gpl-3.0
pathStringToPathInfo :: Env -> String -> SqlPersistT (NoLoggingT (ResourceT IO)) (Validation PathInfo) pathStringToPathInfo env path_s = do -- Split path string into a path chain let chainRel = splitDirectories path_s let chainAbs = pathStringToAbsPathChain (envCwdChain env) path_s -- Get the root item root_ ...
1,155
pathStringToPathInfo :: Env -> String -> SqlPersistT (NoLoggingT (ResourceT IO)) (Validation PathInfo) pathStringToPathInfo env path_s = do -- Split path string into a path chain let chainRel = splitDirectories path_s let chainAbs = pathStringToAbsPathChain (envCwdChain env) path_s -- Get the root item root_ ...
1,155
pathStringToPathInfo env path_s = do -- Split path string into a path chain let chainRel = splitDirectories path_s let chainAbs = pathStringToAbsPathChain (envCwdChain env) path_s -- Get the root item root_ <- getroot case root_ of Left msgs -> return (Left ["couldn't find root item"]) Right root ->...
1,052
false
true
5
17
283
408
195
213
null
null
alexander-at-github/eta
compiler/ETA/Rename/RnBinds.hs
bsd-3-clause
renameSig ctxt sig@(PatSynSig v (flag, qtvs) prov req ty) = do { v' <- lookupSigOccRn ctxt sig v ; let doc = TypeSigCtx $ quotes (ppr v) ; loc <- getSrcSpanM ; let (tv_kvs, mentioned) = extractHsTysRdrTyVars (ty:unLoc prov ++ unLoc req) ; tv_bndrs <- case flag of Implicit...
1,057
renameSig ctxt sig@(PatSynSig v (flag, qtvs) prov req ty) = do { v' <- lookupSigOccRn ctxt sig v ; let doc = TypeSigCtx $ quotes (ppr v) ; loc <- getSrcSpanM ; let (tv_kvs, mentioned) = extractHsTysRdrTyVars (ty:unLoc prov ++ unLoc req) ; tv_bndrs <- case flag of Implicit...
1,057
renameSig ctxt sig@(PatSynSig v (flag, qtvs) prov req ty) = do { v' <- lookupSigOccRn ctxt sig v ; let doc = TypeSigCtx $ quotes (ppr v) ; loc <- getSrcSpanM ; let (tv_kvs, mentioned) = extractHsTysRdrTyVars (ty:unLoc prov ++ unLoc req) ; tv_bndrs <- case flag of Implicit...
1,057
false
false
0
19
371
359
181
178
null
null
AlexeyRaga/eta
compiler/ETA/Prelude/PrelNames.hs
bsd-3-clause
unliftedConKey = mkPreludeTyConUnique 67
65
unliftedConKey = mkPreludeTyConUnique 67
65
unliftedConKey = mkPreludeTyConUnique 67
65
false
false
0
5
28
9
4
5
null
null
GaloisInc/linux-ptrace
System/Linux/Ptrace/Syscall.hs
mit
-- | Send the traced process a SIGKILL. ptrace_kill :: CPid -> IO () ptrace_kill pid = ptrace2 8 pid
100
ptrace_kill :: CPid -> IO () ptrace_kill pid = ptrace2 8 pid
60
ptrace_kill pid = ptrace2 8 pid
31
true
true
0
8
19
35
15
20
null
null
fmapfmapfmap/amazonka
amazonka-storagegateway/gen/Network/AWS/StorageGateway/ShutdownGateway.hs
mpl-2.0
-- | Creates a value of 'ShutdownGatewayResponse' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'srsGatewayARN' -- -- * 'srsResponseStatus' shutdownGatewayResponse :: Int -- ^ 'srsResponseStatus' -> ShutdownGatewayResponse sh...
470
shutdownGatewayResponse :: Int -- ^ 'srsResponseStatus' -> ShutdownGatewayResponse shutdownGatewayResponse pResponseStatus_ = ShutdownGatewayResponse' { _srsGatewayARN = Nothing , _srsResponseStatus = pResponseStatus_ }
243
shutdownGatewayResponse pResponseStatus_ = ShutdownGatewayResponse' { _srsGatewayARN = Nothing , _srsResponseStatus = pResponseStatus_ }
152
true
true
0
7
82
49
28
21
null
null
ggkitsas/HaLVM
examples/IVC/Logger/Server.hs
bsd-3-clause
accept :: XenStore -> IO (OutChannel Event) (_, accept) = peerConnection "logger" 1
83
accept :: XenStore -> IO (OutChannel Event) (_, accept) = peerConnection "logger" 1
83
(_, accept) = peerConnection "logger" 1
39
false
true
0
8
12
36
18
18
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/enumFromThen_3.hs
mit
primEqInt vv vw = MyFalse
25
primEqInt vv vw = MyFalse
25
primEqInt vv vw = MyFalse
25
false
false
0
5
4
11
5
6
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/specialise/Rules.hs
bsd-3-clause
match renv subst (Type ty1) (Type ty2) = match_ty renv subst ty1 ty2
70
match renv subst (Type ty1) (Type ty2) = match_ty renv subst ty1 ty2
70
match renv subst (Type ty1) (Type ty2) = match_ty renv subst ty1 ty2
70
false
false
0
6
14
43
17
26
null
null
mightymoose/liquidhaskell
benchmarks/vector-algorithms-0.5.4.2/Data/Vector/Algorithms/Intro.hs
bsd-3-clause
-- | Sorts an entire array using the default ordering. {-@ sort :: (PrimMonad m, MVector v e, Ord e) => {v: (v (PrimState m) e) | 0 < (vsize v)} -> m () @-} sort :: (PrimMonad m, MVector v e, Ord e) => v (PrimState m) e -> m () sort = sortBy compare
249
sort :: (PrimMonad m, MVector v e, Ord e) => v (PrimState m) e -> m () sort = sortBy compare
92
sort = sortBy compare
21
true
true
0
10
55
65
31
34
null
null
psibi/yesod
yesod-bin/Devel.hs
mit
getAvailableFlags :: D.GenericPackageDescription -> Set.Set String getAvailableFlags = Set.fromList . map (unFlagName . D.flagName) . D.genPackageFlags where #if MIN_VERSION_Cabal(2, 0, 0) unFlagName = D.unFlagName #else unFlagName (D.FlagName fn) = fn #endif -- | This is the main entry point. Run the de...
331
getAvailableFlags :: D.GenericPackageDescription -> Set.Set String getAvailableFlags = Set.fromList . map (unFlagName . D.flagName) . D.genPackageFlags where #if MIN_VERSION_Cabal(2, 0, 0) unFlagName = D.unFlagName #else unFlagName (D.FlagName fn) = fn #endif -- | This is the main entry point. Run the de...
331
getAvailableFlags = Set.fromList . map (unFlagName . D.flagName) . D.genPackageFlags where #if MIN_VERSION_Cabal(2, 0, 0) unFlagName = D.unFlagName #else unFlagName (D.FlagName fn) = fn #endif -- | This is the main entry point. Run the devel server.
264
false
true
2
8
57
70
33
37
null
null
adamse/haddock
haddock-api/src/Haddock/Backends/LaTeX.hs
bsd-2-clause
decltt :: LaTeX -> LaTeX decltt ltx = text "\\haddockdecltt" <> braces ltx
74
decltt :: LaTeX -> LaTeX decltt ltx = text "\\haddockdecltt" <> braces ltx
74
decltt ltx = text "\\haddockdecltt" <> braces ltx
49
false
true
0
7
12
33
14
19
null
null
hguenther/smtlib2
Language/SMTLib2/Internals/Evaluate.hs
gpl-3.0
evaluateFun _ _ (Logic op n) args = return $ ValueResult $ BoolValue $ eval op $ fmap (\(ValueResult (BoolValue v)) -> v) (allEqToList n args :: [EvalResult fun BoolType]) where eval And = and eval Or = or eval XOr = foldl1 (\x y -> if x then not y else y) eval Implies = impl eval (AtLea...
582
evaluateFun _ _ (Logic op n) args = return $ ValueResult $ BoolValue $ eval op $ fmap (\(ValueResult (BoolValue v)) -> v) (allEqToList n args :: [EvalResult fun BoolType]) where eval And = and eval Or = or eval XOr = foldl1 (\x y -> if x then not y else y) eval Implies = impl eval (AtLea...
582
evaluateFun _ _ (Logic op n) args = return $ ValueResult $ BoolValue $ eval op $ fmap (\(ValueResult (BoolValue v)) -> v) (allEqToList n args :: [EvalResult fun BoolType]) where eval And = and eval Or = or eval XOr = foldl1 (\x y -> if x then not y else y) eval Implies = impl eval (AtLea...
582
false
false
0
12
223
281
147
134
null
null
urbanslug/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
spechub/Hets
CommonLogic/Print_KIF.hs
gpl-2.0
printPhrase :: AS.PHRASE -> Doc printPhrase s = case s of AS.Module _ -> error "printPhrase: \"module\" found" AS.Sentence x -> printSentence Set.empty x AS.Importation _ -> error "printPhrase: \"import\" found" AS.Comment_text _ t _ -> printText t
256
printPhrase :: AS.PHRASE -> Doc printPhrase s = case s of AS.Module _ -> error "printPhrase: \"module\" found" AS.Sentence x -> printSentence Set.empty x AS.Importation _ -> error "printPhrase: \"import\" found" AS.Comment_text _ t _ -> printText t
256
printPhrase s = case s of AS.Module _ -> error "printPhrase: \"module\" found" AS.Sentence x -> printSentence Set.empty x AS.Importation _ -> error "printPhrase: \"import\" found" AS.Comment_text _ t _ -> printText t
224
false
true
0
9
45
88
40
48
null
null
ayberkt/TAPL
src/FullSimple/Main.hs
bsd-3-clause
exprToString _ TmUnit = "unit"
30
exprToString _ TmUnit = "unit"
30
exprToString _ TmUnit = "unit"
30
false
false
0
5
4
11
5
6
null
null
elieux/ghc
compiler/typecheck/TcEvidence.hs
bsd-3-clause
isTcReflCo_maybe :: TcCoercion -> Maybe TcType isTcReflCo_maybe (TcRefl _ ty) = Just ty
89
isTcReflCo_maybe :: TcCoercion -> Maybe TcType isTcReflCo_maybe (TcRefl _ ty) = Just ty
89
isTcReflCo_maybe (TcRefl _ ty) = Just ty
42
false
true
0
7
14
32
15
17
null
null
enolan/Idris-dev
src/Idris/Core/TT.hs
bsd-3-clause
constIsType (B64 _) = False
27
constIsType (B64 _) = False
27
constIsType (B64 _) = False
27
false
false
0
7
4
15
7
8
null
null
Numberartificial/workflow
haskell-first-principles/haskell-programming-from-first-principles-master/src/Chapter15.hs
mit
firstMappend :: Monoid a => First' a -> First' a -> First' a firstMappend = mappend
83
firstMappend :: Monoid a => First' a -> First' a -> First' a firstMappend = mappend
83
firstMappend = mappend
22
false
true
0
9
15
41
17
24
null
null
randen/cabal
Cabal/Distribution/Simple/Setup.hs
bsd-3-clause
haddockCommand :: CommandUI HaddockFlags haddockCommand = CommandUI { commandName = "haddock" , commandSynopsis = "Generate Haddock HTML documentation." , commandDescription = Just $ \_ -> "Requires the program haddock, version 2.x.\n" , commandNotes = Nothing , commandUsage =...
1,058
haddockCommand :: CommandUI HaddockFlags haddockCommand = CommandUI { commandName = "haddock" , commandSynopsis = "Generate Haddock HTML documentation." , commandDescription = Just $ \_ -> "Requires the program haddock, version 2.x.\n" , commandNotes = Nothing , commandUsage =...
1,058
haddockCommand = CommandUI { commandName = "haddock" , commandSynopsis = "Generate Haddock HTML documentation." , commandDescription = Just $ \_ -> "Requires the program haddock, version 2.x.\n" , commandNotes = Nothing , commandUsage = \pname -> "Usage: " ++ pname ++ " ...
1,017
false
true
0
15
271
207
114
93
null
null
rueshyna/gogol
gogol-admin-directory/gen/Network/Google/Directory/Types/Product.hs
mpl-2.0
-- | Symbol of the organization. uoSymbol :: Lens' UserOrganization (Maybe Text) uoSymbol = lens _uoSymbol (\ s a -> s{_uoSymbol = a})
134
uoSymbol :: Lens' UserOrganization (Maybe Text) uoSymbol = lens _uoSymbol (\ s a -> s{_uoSymbol = a})
101
uoSymbol = lens _uoSymbol (\ s a -> s{_uoSymbol = a})
53
true
true
0
9
22
46
25
21
null
null
thomasathorne/h-chu
src/Player.hs
bsd-3-clause
unplay :: ReaderT Player STM () unplay = do pl <- ask emp <- lift $ isEmptyTChan $ playChan pl if emp then return () else do p <- getCS playChan putInHand $ cards p unplay
188
unplay :: ReaderT Player STM () unplay = do pl <- ask emp <- lift $ isEmptyTChan $ playChan pl if emp then return () else do p <- getCS playChan putInHand $ cards p unplay
188
unplay = do pl <- ask emp <- lift $ isEmptyTChan $ playChan pl if emp then return () else do p <- getCS playChan putInHand $ cards p unplay
156
false
true
1
11
52
90
38
52
null
null
diminishedprime/.org
programmey_stuff/write_yourself_a_scheme/ch_08/wyas/app/Eval.hs
mit
eqv [(DottedList xs x), (DottedList ys y)] = eqv [List $ xs ++ [x], List $ ys ++ [y]]
85
eqv [(DottedList xs x), (DottedList ys y)] = eqv [List $ xs ++ [x], List $ ys ++ [y]]
85
eqv [(DottedList xs x), (DottedList ys y)] = eqv [List $ xs ++ [x], List $ ys ++ [y]]
85
false
false
0
8
18
63
33
30
null
null
mpickering/ghc-exactprint
tests/examples/ghc8/T10638.hs
bsd-3-clause
{- the prim and javascript calling conventions do not support headers and the static keyword. -} -- check that quasiquoting roundtrips succesfully and that the declaration -- does not include the static keyword test1 :: String test1 = $(do (ds@[ForeignD (ImportF _ _ p _ _)]) <- [d| foreign import ...
540
test1 :: String test1 = $(do (ds@[ForeignD (ImportF _ _ p _ _)]) <- [d| foreign import prim "test1" cmm_test1 :: Int# -> Int# |] addTopDecls ds case p of "test1" -> return (LitE . stringL $ p) _ -> error $ "unexpected value: " ++ show p ...
322
test1 = $(do (ds@[ForeignD (ImportF _ _ p _ _)]) <- [d| foreign import prim "test1" cmm_test1 :: Int# -> Int# |] addTopDecls ds case p of "test1" -> return (LitE . stringL $ p) _ -> error $ "unexpected value: " ++ show p )
306
true
true
0
15
172
105
55
50
null
null
keera-studios/hsQt
Qtc/Gui/QStyle.hs
bsd-2-clause
qStyleVisualPos :: ((LayoutDirection, Rect, Point)) -> IO (Point) qStyleVisualPos (x1, x2, x3) = withPointResult $ \cpoint_ret_x cpoint_ret_y -> withCRect x2 $ \crect_x2_x crect_x2_y crect_x2_w crect_x2_h -> withCPoint x3 $ \cpoint_x3_x cpoint_x3_y -> qtc_QStyle_visualPos_qth (toCLong $ qEnum_toInt x1) c...
414
qStyleVisualPos :: ((LayoutDirection, Rect, Point)) -> IO (Point) qStyleVisualPos (x1, x2, x3) = withPointResult $ \cpoint_ret_x cpoint_ret_y -> withCRect x2 $ \crect_x2_x crect_x2_y crect_x2_w crect_x2_h -> withCPoint x3 $ \cpoint_x3_x cpoint_x3_y -> qtc_QStyle_visualPos_qth (toCLong $ qEnum_toInt x1) c...
414
qStyleVisualPos (x1, x2, x3) = withPointResult $ \cpoint_ret_x cpoint_ret_y -> withCRect x2 $ \crect_x2_x crect_x2_y crect_x2_w crect_x2_h -> withCPoint x3 $ \cpoint_x3_x cpoint_x3_y -> qtc_QStyle_visualPos_qth (toCLong $ qEnum_toInt x1) crect_x2_x crect_x2_y crect_x2_w crect_x2_h cpoint_x3_x cpoint_x3_...
348
false
true
0
14
61
117
62
55
null
null
cirquit/Personal-Repository
Haskell/Playground/UTFTConverter/src/Converter.hs
mit
fromDynamicImage (ImageRGBA8 img) = img
39
fromDynamicImage (ImageRGBA8 img) = img
39
fromDynamicImage (ImageRGBA8 img) = img
39
false
false
0
7
4
15
7
8
null
null
kosmoskatten/hats
test/NatsTests.hs
mit
-- Subscribe on a topic and receive one message through a queue. Expect -- the received 'Msg' to echo the published payload. recSingleMessage, recSingleMessage' :: Assertion recSingleMessage = withGnatsd recSingleMessage'
221
recSingleMessage, recSingleMessage' :: Assertion recSingleMessage = withGnatsd recSingleMessage'
96
recSingleMessage = withGnatsd recSingleMessage'
47
true
true
0
5
29
18
11
7
null
null
hanshoglund/comb
combIO.hs
bsd-3-clause
splitPart (o,d) = ((o,d*2), (d,d*2))
36
splitPart (o,d) = ((o,d*2), (d,d*2))
36
splitPart (o,d) = ((o,d*2), (d,d*2))
36
false
false
0
7
4
41
24
17
null
null
ghc-android/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
mkTyConName = varQual tYPEABLE_INTERNAL (fsLit "mkTyCon") mkTyConKey
85
mkTyConName = varQual tYPEABLE_INTERNAL (fsLit "mkTyCon") mkTyConKey
85
mkTyConName = varQual tYPEABLE_INTERNAL (fsLit "mkTyCon") mkTyConKey
85
false
false
0
7
23
19
9
10
null
null
cartazio/permutations-perrry
tests/STPermute.hs
bsd-3-clause
setIdentity_S p = ((), permute (size p))
40
setIdentity_S p = ((), permute (size p))
40
setIdentity_S p = ((), permute (size p))
40
false
false
1
9
6
30
13
17
null
null
Cahu/krpc-hs
src/KRPCHS/Drawing.hs
gpl-3.0
{- - Reference frame for the positions of the object. -} getPolygonReferenceFrame :: KRPCHS.Drawing.Polygon -> RPCContext (KRPCHS.SpaceCenter.ReferenceFrame) getPolygonReferenceFrame thisArg = do let r = makeRequest "Drawing" "Polygon_get_ReferenceFrame" [makeArgument 0 thisArg] res <- sendRequest r proce...
334
getPolygonReferenceFrame :: KRPCHS.Drawing.Polygon -> RPCContext (KRPCHS.SpaceCenter.ReferenceFrame) getPolygonReferenceFrame thisArg = do let r = makeRequest "Drawing" "Polygon_get_ReferenceFrame" [makeArgument 0 thisArg] res <- sendRequest r processResponse res
275
getPolygonReferenceFrame thisArg = do let r = makeRequest "Drawing" "Polygon_get_ReferenceFrame" [makeArgument 0 thisArg] res <- sendRequest r processResponse res
174
true
true
0
13
49
75
35
40
null
null
dylanmc/cryptol
sbv/Data/SBV/SMT/SMT.hs
bsd-3-clause
genParse _ _ = Nothing
63
genParse _ _ = Nothing
63
genParse _ _ = Nothing
63
false
false
0
5
45
11
5
6
null
null
cameronbwhite/ComputationalStructures
Haskell/NFAe.hs
bsd-3-clause
paths :: Ord q => NFAe q s -> [s] -> [[q]] paths nfa ss = paths' nfa (start nfa) ss
83
paths :: Ord q => NFAe q s -> [s] -> [[q]] paths nfa ss = paths' nfa (start nfa) ss
83
paths nfa ss = paths' nfa (start nfa) ss
40
false
true
0
11
20
66
30
36
null
null
ulricha/dsh
src/Database/DSH/Translate/CL2NKL.hs
bsd-3-clause
desugarQualsRec env baseSrc [] = return (env, baseSrc)
73
desugarQualsRec env baseSrc [] = return (env, baseSrc)
73
desugarQualsRec env baseSrc [] = return (env, baseSrc)
73
false
false
0
6
26
27
12
15
null
null
DaMSL/K3
src/Language/K3/Parser/DataTypes.hs
apache-2.0
bindEmbedding :: EmbeddingParser Binder bindEmbedding = choice [try (Left <$> identParts), Right <$> choice [bindInd, bindTup, bindRec]]
136
bindEmbedding :: EmbeddingParser Binder bindEmbedding = choice [try (Left <$> identParts), Right <$> choice [bindInd, bindTup, bindRec]]
136
bindEmbedding = choice [try (Left <$> identParts), Right <$> choice [bindInd, bindTup, bindRec]]
96
false
true
1
9
16
53
26
27
null
null
TrevorBender/caves
src/Generation.hs
gpl-3.0
createPlayer :: Creature createPlayer = creatureDefaults { _cKind = Player , _cGlyph = '@' , _cStyle = PlayerStyle , _cId = 0 , _name = "You" , _attackPower = 10 , _defense = 1 , _hp = 40 , _maxHp = 40 , _maxInv = 20 , _maxFood = 1000 , _food = div 1000 3 * 2 , _mana ...
410
createPlayer :: Creature createPlayer = creatureDefaults { _cKind = Player , _cGlyph = '@' , _cStyle = PlayerStyle , _cId = 0 , _name = "You" , _attackPower = 10 , _defense = 1 , _hp = 40 , _maxHp = 40 , _maxInv = 20 , _maxFood = 1000 , _food = div 1000 3 * 2 , _mana ...
410
createPlayer = creatureDefaults { _cKind = Player , _cGlyph = '@' , _cStyle = PlayerStyle , _cId = 0 , _name = "You" , _attackPower = 10 , _defense = 1 , _hp = 40 , _maxHp = 40 , _maxInv = 20 , _maxFood = 1000 , _food = div 1000 3 * 2 , _mana = 10 , _maxMana = 20 ...
385
false
true
0
9
142
128
77
51
null
null
elieux/ghc
compiler/utils/Platform.hs
bsd-3-clause
sElfTarget OSDragonFly = True
30
osElfTarget OSDragonFly = True
30
osElfTarget OSDragonFly = True
30
false
false
1
4
4
12
4
8
null
null
HJvT/hdirect
src/Parser.hs
bsd-3-clause
action_515 (60#) = happyGoto action_25
38
action_515 (60#) = happyGoto action_25
38
action_515 (60#) = happyGoto action_25
38
false
false
0
6
4
15
7
8
null
null
nlv/genexpr
src/Generate.hs
gpl-2.0
-- | Таблица численных кодов бинарных операций op2 :: Int -> (Int -> Int -> Int) op2 1 = (*)
92
op2 :: Int -> (Int -> Int -> Int) op2 1 = (*)
45
op2 1 = (*)
11
true
true
0
10
19
38
19
19
null
null
Happstack/happstack-server
src/Happstack/Server/FileServe/GenMimeTypes.hs
bsd-3-clause
pExt :: Parser String pExt = many1 (letter <|> digit <|> oneOf "_-")
71
pExt :: Parser String pExt = many1 (letter <|> digit <|> oneOf "_-")
71
pExt = many1 (letter <|> digit <|> oneOf "_-")
48
false
true
0
8
15
33
15
18
null
null
ExpHP/haskell-memory-halp
app/Attempt4.hs
bsd-3-clause
bracketStream, bracketDocument :: ParserCont bracketStream = Parser.between streamStart streamEnd
99
bracketStream, bracketDocument :: ParserCont bracketStream = Parser.between streamStart streamEnd
99
bracketStream = Parser.between streamStart streamEnd
54
false
true
2
6
10
31
12
19
null
null
ezyang/ghc
compiler/basicTypes/VarEnv.hs
bsd-3-clause
varSetInScope :: VarSet -> InScopeSet -> Bool varSetInScope vars (InScope s1 _) = vars `subVarSet` s1
101
varSetInScope :: VarSet -> InScopeSet -> Bool varSetInScope vars (InScope s1 _) = vars `subVarSet` s1
101
varSetInScope vars (InScope s1 _) = vars `subVarSet` s1
55
false
true
0
7
15
38
20
18
null
null
jaseemabid/lisper
test/Test.hs
mit
expandBind :: TestTree expandBind = testCase "Expand (bind a => f)" $ expand bindM (lisp "(bind 1 => inc)") @?= lisp "(if 1 (inc 1) #f)"
140
expandBind :: TestTree expandBind = testCase "Expand (bind a => f)" $ expand bindM (lisp "(bind 1 => inc)") @?= lisp "(if 1 (inc 1) #f)"
140
expandBind = testCase "Expand (bind a => f)" $ expand bindM (lisp "(bind 1 => inc)") @?= lisp "(if 1 (inc 1) #f)"
117
false
true
0
7
29
43
18
25
null
null
pdownen/sequent-core
src/Language/SequentCore/Pretty.hs
bsd-3-clause
ppr_end :: OutputableBndr b => End b -> SDoc ppr_end Return = text "ret"
74
ppr_end :: OutputableBndr b => End b -> SDoc ppr_end Return = text "ret"
74
ppr_end Return = text "ret"
29
false
true
0
7
15
31
14
17
null
null
nevrenato/Hets_Fork
OWL2/OWL22CommonLogic.hs
gpl-2.0
mapAxioms :: Sign -> Axiom -> Result ([TEXT], Sign) mapAxioms cSig (PlainAxiom ex fb) = case fb of ListFrameBit rel lfb -> mapListFrameBit cSig ex rel lfb AnnFrameBit _ afb -> mapAnnFrameBit cSig ex afb -- helper function
231
mapAxioms :: Sign -> Axiom -> Result ([TEXT], Sign) mapAxioms cSig (PlainAxiom ex fb) = case fb of ListFrameBit rel lfb -> mapListFrameBit cSig ex rel lfb AnnFrameBit _ afb -> mapAnnFrameBit cSig ex afb -- helper function
231
mapAxioms cSig (PlainAxiom ex fb) = case fb of ListFrameBit rel lfb -> mapListFrameBit cSig ex rel lfb AnnFrameBit _ afb -> mapAnnFrameBit cSig ex afb -- helper function
179
false
true
3
9
47
84
43
41
null
null
nsmryan/CADH
src/CADH/Utils.hs
bsd-3-clause
getBitsEnum bitsNeeded n = (toEnum . fromIntegral . mask n) <$> BiGet.getWord8 bitsNeeded
89
getBitsEnum bitsNeeded n = (toEnum . fromIntegral . mask n) <$> BiGet.getWord8 bitsNeeded
89
getBitsEnum bitsNeeded n = (toEnum . fromIntegral . mask n) <$> BiGet.getWord8 bitsNeeded
89
false
false
1
8
12
38
16
22
null
null
lennart/tidal-midi
Sound/Tidal/Tetra.hs
gpl-3.0
dfbgain = doublePattern 47
26
dfbgain = doublePattern 47
26
dfbgain = doublePattern 47
26
false
false
0
5
3
9
4
5
null
null
gokhankici/symmetry
checker/src/Symmetry/Verify.hs
mit
flattenStmt s = [s]
38
flattenStmt s = [s]
38
flattenStmt s = [s]
38
false
false
0
5
22
12
6
6
null
null
utwente-fmt/scoop
src/Regularise.hs
bsd-3-clause
getInstance :: [ProcessBinding] -> ProcessTerm -> Int -> ProcessName getInstance [] r i = "X" ++ show (i+1)
139
getInstance :: [ProcessBinding] -> ProcessTerm -> Int -> ProcessName getInstance [] r i = "X" ++ show (i+1)
139
getInstance [] r i = "X" ++ show (i+1)
70
false
true
0
8
49
49
25
24
null
null
Helkafen/cabal
cabal-install/Distribution/Client/PackageIndex.hs
bsd-3-clause
-- | Does a case-insensitive substring search by package name. -- -- That is, all packages that contain the given string in their name. -- searchByNameSubstring :: PackageIndex pkg -> String -> [(PackageName, [pkg])] searchByNameSubstring (PackageIndex m) searchterm = [ pkgs | pkgs@(Packag...
444
searchByNameSubstring :: PackageIndex pkg -> String -> [(PackageName, [pkg])] searchByNameSubstring (PackageIndex m) searchterm = [ pkgs | pkgs@(PackageName name, _) <- Map.toList m , lsearchterm `isInfixOf` lowercase name ] where lsearchterm = lowercase searchterm
305
searchByNameSubstring (PackageIndex m) searchterm = [ pkgs | pkgs@(PackageName name, _) <- Map.toList m , lsearchterm `isInfixOf` lowercase name ] where lsearchterm = lowercase searchterm
205
true
true
0
10
98
101
55
46
null
null
brendanhay/gogol
gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Product.hs
mpl-2.0
-- | Identifies what kind of resource this is. Value: the fixed string -- \"dfareporting#dynamicTargetingKeysListResponse\". dtklrKind :: Lens' DynamicTargetingKeysListResponse (Maybe Text) dtklrKind = lens _dtklrKind (\ s a -> s{_dtklrKind = a})
248
dtklrKind :: Lens' DynamicTargetingKeysListResponse (Maybe Text) dtklrKind = lens _dtklrKind (\ s a -> s{_dtklrKind = a})
123
dtklrKind = lens _dtklrKind (\ s a -> s{_dtklrKind = a})
58
true
true
1
9
33
53
26
27
null
null
hth313/hthforth
src/Language/Forth/Target/MSP430.hs
bsd-2-clause
sp = RegOp SP
16
sp = RegOp SP
16
sp = RegOp SP
16
false
false
0
5
6
9
4
5
null
null
acharal/wam
src/WAM/Compile.hs
gpl-2.0
newVar r n v = do pe <- asks perms' p <- if v `elem` pe then newPerm else newTemp r n tbl <- gets symbolTbl let tbl' = (v,p):tbl modify (\st -> st { symbolTbl = tbl' }) return p
248
newVar r n v = do pe <- asks perms' p <- if v `elem` pe then newPerm else newTemp r n tbl <- gets symbolTbl let tbl' = (v,p):tbl modify (\st -> st { symbolTbl = tbl' }) return p
248
newVar r n v = do pe <- asks perms' p <- if v `elem` pe then newPerm else newTemp r n tbl <- gets symbolTbl let tbl' = (v,p):tbl modify (\st -> st { symbolTbl = tbl' }) return p
248
false
false
1
12
111
112
52
60
null
null
acowley/ghc
compiler/main/DynFlags.hs
bsd-3-clause
-- Adds a newline defaultLogActionHPutStrDoc :: DynFlags -> Handle -> SDoc -> PprStyle -> IO () defaultLogActionHPutStrDoc dflags h d sty = Pretty.printDoc_ Pretty.PageMode (pprCols dflags) h doc where -- Don't add a newline at the end, so that successive -- calls to this log-action can output all on t...
381
defaultLogActionHPutStrDoc :: DynFlags -> Handle -> SDoc -> PprStyle -> IO () defaultLogActionHPutStrDoc dflags h d sty = Pretty.printDoc_ Pretty.PageMode (pprCols dflags) h doc where -- Don't add a newline at the end, so that successive -- calls to this log-action can output all on the same line do...
362
defaultLogActionHPutStrDoc dflags h d sty = Pretty.printDoc_ Pretty.PageMode (pprCols dflags) h doc where -- Don't add a newline at the end, so that successive -- calls to this log-action can output all on the same line doc = runSDoc d (initSDocContext dflags sty)
284
true
true
1
10
79
87
42
45
null
null
mettekou/ghc
compiler/basicTypes/BasicTypes.hs
bsd-3-clause
isFunLike :: RuleMatchInfo -> Bool isFunLike FunLike = True
59
isFunLike :: RuleMatchInfo -> Bool isFunLike FunLike = True
59
isFunLike FunLike = True
24
false
true
0
5
8
18
9
9
null
null
Crazycolorz5/AlgebraicPrelude
Numbers.hs
mit
i = Complex 0 1
15
i = Complex 0 1
15
i = Complex 0 1
15
false
false
1
5
4
14
5
9
null
null
Mic92/eidolon
Handler/Commons.hs
agpl-3.0
mediumCheck :: IsString t => MediumId -> Handler (Either (t, Route App) Medium) mediumCheck mediumId = do tempMedium <- runDB $ get mediumId case tempMedium of Just medium -> do ownerId <- return $ mediumOwner medium msu <- lookupSession "userId" case msu of Just tempUserId -> do ...
940
mediumCheck :: IsString t => MediumId -> Handler (Either (t, Route App) Medium) mediumCheck mediumId = do tempMedium <- runDB $ get mediumId case tempMedium of Just medium -> do ownerId <- return $ mediumOwner medium msu <- lookupSession "userId" case msu of Just tempUserId -> do ...
940
mediumCheck mediumId = do tempMedium <- runDB $ get mediumId case tempMedium of Just medium -> do ownerId <- return $ mediumOwner medium msu <- lookupSession "userId" case msu of Just tempUserId -> do userId <- return $ getUserIdFromText tempUserId album <- runDB $ ...
860
false
true
0
24
289
276
128
148
null
null
mattias-lundell/timber-llvm
src/Kindle.hs
bsd-3-clause
closure2 [] t te c | a <= maxSmallCLOS = ENew (prim (smallCLOS a)) (t:rng te) [(prim Code, Fun [] t te c)] where a = length te
178
closure2 [] t te c | a <= maxSmallCLOS = ENew (prim (smallCLOS a)) (t:rng te) [(prim Code, Fun [] t te c)] where a = length te
178
closure2 [] t te c | a <= maxSmallCLOS = ENew (prim (smallCLOS a)) (t:rng te) [(prim Code, Fun [] t te c)] where a = length te
178
false
false
0
10
79
90
43
47
null
null
bos/criterion
Criterion/Internal.hs
bsd-2-clause
runFixedIters :: Int64 -- ^ Number of loop iterations to run. -> (String -> Bool) -- ^ A predicate that chooses -- whether to run a benchmark by its -- name. -> Benchmark -> Criterion () runFixedIter...
487
runFixedIters :: Int64 -- ^ Number of loop iterations to run. -> (String -> Bool) -- ^ A predicate that chooses -- whether to run a benchmark by its -- name. -> Benchmark -> Criterion () runFixedIter...
487
runFixedIters iters select bs = for select bs $ \_idx desc bm -> do _ <- note "benchmarking %s\n" desc liftIO $ runBenchmarkable_ bm iters -- | Iterate over benchmarks.
179
false
true
0
10
197
89
45
44
null
null
DavidAlphaFox/darcs
src/Darcs/Patch/Witnesses/WZipper.hs
gpl-2.0
right :: FZipper p wX wY -> FZipper p wX wY right (FZipper l (b:>:r)) = FZipper (b :<: l) r
91
right :: FZipper p wX wY -> FZipper p wX wY right (FZipper l (b:>:r)) = FZipper (b :<: l) r
91
right (FZipper l (b:>:r)) = FZipper (b :<: l) r
47
false
true
0
11
20
64
30
34
null
null
tismith/tlisp
write-yourself-a-scheme/listings/listing9.hs
mit
car badArgList = throwError $ NumArgs 1 badArgList
50
car badArgList = throwError $ NumArgs 1 badArgList
50
car badArgList = throwError $ NumArgs 1 badArgList
50
false
false
0
6
7
18
8
10
null
null
spanners/dissertation
dissertation/code/elm-lang.org/server/Server.hs
mit
serveHtml :: MonadSnap m => H.Html -> m () serveHtml html = do setContentType "text/html" <$> getResponse writeLBS (BlazeBS.renderHtml html)
151
serveHtml :: MonadSnap m => H.Html -> m () serveHtml html = do setContentType "text/html" <$> getResponse writeLBS (BlazeBS.renderHtml html)
151
serveHtml html = do setContentType "text/html" <$> getResponse writeLBS (BlazeBS.renderHtml html)
108
false
true
0
11
30
61
26
35
null
null
grnet/snf-ganeti
src/Ganeti/Constants.hs
bsd-2-clause
enableMetad :: Bool enableMetad = AutoConf.enableMetad
54
enableMetad :: Bool enableMetad = AutoConf.enableMetad
54
enableMetad = AutoConf.enableMetad
34
false
true
0
6
5
20
8
12
null
null
alexander-at-github/eta
compiler/ETA/Prelude/PrimOp.hs
bsd-3-clause
tagOf_PrimOp ReadOffAddrOp_Int64 = _ILIT(299)
45
tagOf_PrimOp ReadOffAddrOp_Int64 = _ILIT(299)
45
tagOf_PrimOp ReadOffAddrOp_Int64 = _ILIT(299)
45
false
false
0
6
3
15
7
8
null
null
forste/haReFork
refactorer/PwPf/GlobalPW.hs
bsd-3-clause
global2core F' = In boolT (Inr Unit)
45
global2core F' = In boolT (Inr Unit)
45
global2core F' = In boolT (Inr Unit)
45
false
false
0
7
15
21
9
12
null
null
kawu/polysoup
src/Text/XML/PolySoup/Combine.hs
bsd-2-clause
-- | Similar to '/>' combinator but runs the XML parser for all -- descendant XML elements, not only for its children. (//>) :: Q (Tag s) a -> Q (XmlTree s) b -> Q (XmlTree s) [b] (//>) (Q p) q = Q $ \(Node t ts) -> case p t of Just _ -> Just $ concatMap g ts Nothing -> Nothing where g t = case runQ q t ...
393
(//>) :: Q (Tag s) a -> Q (XmlTree s) b -> Q (XmlTree s) [b] (//>) (Q p) q = Q $ \(Node t ts) -> case p t of Just _ -> Just $ concatMap g ts Nothing -> Nothing where g t = case runQ q t of Nothing -> unJust $ runQ (true //> q) t Just w -> [w]
274
(//>) (Q p) q = Q $ \(Node t ts) -> case p t of Just _ -> Just $ concatMap g ts Nothing -> Nothing where g t = case runQ q t of Nothing -> unJust $ runQ (true //> q) t Just w -> [w]
213
true
true
0
11
117
173
87
86
null
null
GallagherCommaJack/scheming-machine
ParserEvaluator.hs
gpl-3.0
liftThrows (Right val) = return val
35
liftThrows (Right val) = return val
35
liftThrows (Right val) = return val
35
false
false
0
6
5
19
8
11
null
null
seereason/ghcjs
src/Compiler/GhcMake.hs
mit
summaryNodeSummary :: SummaryNode -> ModSummary summaryNodeSummary (s, _, _) = s
80
summaryNodeSummary :: SummaryNode -> ModSummary summaryNodeSummary (s, _, _) = s
80
summaryNodeSummary (s, _, _) = s
32
false
true
0
6
10
27
15
12
null
null
gaoyuan/CodeThief
src/Git.hs
bsd-3-clause
gitCommit :: String -> String gitCommit msg = "git commit -m '" ++ msg ++ "'"
77
gitCommit :: String -> String gitCommit msg = "git commit -m '" ++ msg ++ "'"
77
gitCommit msg = "git commit -m '" ++ msg ++ "'"
47
false
true
0
6
15
30
14
16
null
null
diku-dk/futhark
src/Futhark/CLI/Literate.hs
isc
processDirective env (DirectiveRes e) = do result <- newFileContents env "eval.txt" $ \resultf -> do v <- either nope pure =<< evalExpToGround literateBuiltin (envServer env) e liftIO $ T.writeFile resultf $ prettyText v pure $ T.unlines [ "", "```", result, "```", ...
426
processDirective env (DirectiveRes e) = do result <- newFileContents env "eval.txt" $ \resultf -> do v <- either nope pure =<< evalExpToGround literateBuiltin (envServer env) e liftIO $ T.writeFile resultf $ prettyText v pure $ T.unlines [ "", "```", result, "```", ...
426
processDirective env (DirectiveRes e) = do result <- newFileContents env "eval.txt" $ \resultf -> do v <- either nope pure =<< evalExpToGround literateBuiltin (envServer env) e liftIO $ T.writeFile resultf $ prettyText v pure $ T.unlines [ "", "```", result, "```", ...
426
false
false
0
16
138
136
65
71
null
null
luzhuomi/xhaskell
Language/XHaskell/LocalTypeInference.hs
bsd-3-clause
collapseConstrs :: [SubtypeConstr] -> TH.Q SubtypeConstr collapseConstrs [] = fail "the collapseConstrs is given an empty list"
127
collapseConstrs :: [SubtypeConstr] -> TH.Q SubtypeConstr collapseConstrs [] = fail "the collapseConstrs is given an empty list"
127
collapseConstrs [] = fail "the collapseConstrs is given an empty list"
70
false
true
0
7
16
31
15
16
null
null
adamschoenemann/simple-frp
test/FRP/ParserSpec.hs
mit
txt_frp_nats = [text| \n us -> let cons(u, delay(us')) = us in let stable(x) = promote(n) in cons(x, delay (u, const us' (x + 1))) |]
151
txt_frp_nats = [text| \n us -> let cons(u, delay(us')) = us in let stable(x) = promote(n) in cons(x, delay (u, const us' (x + 1))) |]
151
txt_frp_nats = [text| \n us -> let cons(u, delay(us')) = us in let stable(x) = promote(n) in cons(x, delay (u, const us' (x + 1))) |]
151
false
false
1
5
43
14
7
7
null
null
yav/haskell-lexer
generator/src/RegExp.hs
mit
fix r = if selfIn r then Fix r else r
37
fix r = if selfIn r then Fix r else r
37
fix r = if selfIn r then Fix r else r
37
false
false
1
6
10
27
11
16
null
null
ekmett/ghc
compiler/codeGen/StgCmmPrim.hs
bsd-3-clause
emitPrimOp dflags res ReadOffAddrOp_Word8 args = doIndexOffAddrOp (Just (mo_u_8ToWord dflags)) b8 res args
120
emitPrimOp dflags res ReadOffAddrOp_Word8 args = doIndexOffAddrOp (Just (mo_u_8ToWord dflags)) b8 res args
120
emitPrimOp dflags res ReadOffAddrOp_Word8 args = doIndexOffAddrOp (Just (mo_u_8ToWord dflags)) b8 res args
120
false
false
0
9
26
36
17
19
null
null
timtylin/scholdoc
src/Text/Pandoc/Readers/Markdown.hs
gpl-2.0
noteMarker :: MarkdownParser String noteMarker = string "[^" >> many1Till (satisfy $ not . isBlank) (char ']')
110
noteMarker :: MarkdownParser String noteMarker = string "[^" >> many1Till (satisfy $ not . isBlank) (char ']')
110
noteMarker = string "[^" >> many1Till (satisfy $ not . isBlank) (char ']')
74
false
true
0
9
16
43
21
22
null
null
shlevy/ghc
compiler/hsSyn/HsPat.hs
bsd-3-clause
-- Note [Punning] -- ~~~~~~~~~~~~~~ -- If you write T { x, y = v+1 }, the HsRecFields will be -- HsRecField x x True ... -- HsRecField y (v+1) False ... -- That is, for "punned" field x is expanded (in the renamer) -- to x=x; but with a punning flag so we can detect it later -- (e.g. when pretty printing) -- ...
2,137
hsRecFields :: HsRecFields p arg -> [PostRn p (IdP p)] hsRecFields rbinds = map (unLoc . hsRecFieldSel . unLoc) (rec_flds rbinds)
129
hsRecFields rbinds = map (unLoc . hsRecFieldSel . unLoc) (rec_flds rbinds)
74
true
true
0
9
411
109
79
30
null
null
dmbarbour/Sirea
src/Sirea/Internal/SigType.hs
bsd-3-clause
- left signal done and transparent seqMerge _ Nothing xs Done = xs
67
seqMerge _ Nothing xs Done = xs
31
seqMerge _ Nothing xs Done = xs
31
true
false
1
5
13
29
11
18
null
null
facebookincubator/duckling
Duckling/Time/ZH/Rules.hs
bsd-3-clause
ruleTomorrow :: Rule ruleTomorrow = Rule { name = "tomorrow" , pattern = [ regex "明天|明日|\x807d日" ] , prod = \_ -> tt $ cycleNth TG.Day 1 }
154
ruleTomorrow :: Rule ruleTomorrow = Rule { name = "tomorrow" , pattern = [ regex "明天|明日|\x807d日" ] , prod = \_ -> tt $ cycleNth TG.Day 1 }
154
ruleTomorrow = Rule { name = "tomorrow" , pattern = [ regex "明天|明日|\x807d日" ] , prod = \_ -> tt $ cycleNth TG.Day 1 }
133
false
true
0
11
43
57
31
26
null
null
madmann91/Ape
src/Ape/Parse.hs
lgpl-3.0
vector :: Parser a -> Parser [a] vector p = (angles (sepBy1 p $ symbol ",")) <|> do { x <- p ; return [x] }
117
vector :: Parser a -> Parser [a] vector p = (angles (sepBy1 p $ symbol ",")) <|> do { x <- p ; return [x] }
117
vector p = (angles (sepBy1 p $ symbol ",")) <|> do { x <- p ; return [x] }
84
false
true
0
10
35
73
35
38
null
null
google/codeworld
codeworld-base/src/Extras/Colors.hs
apache-2.0
byName ("blueviolet") = colorNamed' ("#8a2be2")
47
byName ("blueviolet") = colorNamed' ("#8a2be2")
47
byName ("blueviolet") = colorNamed' ("#8a2be2")
47
false
false
0
6
4
18
9
9
null
null
joelburget/graphreduction
tests/Tests.hs
bsd-3-clause
tests :: [Test] tests = [ testGroup "gc" gcTests , testGroup "exec" execTests ]
85
tests :: [Test] tests = [ testGroup "gc" gcTests , testGroup "exec" execTests ]
85
tests = [ testGroup "gc" gcTests , testGroup "exec" execTests ]
69
false
true
0
7
19
37
17
20
null
null
spechub/Hets
CSL/Parse_AS_Basic.hs
gpl-2.0
signNumCompatChars :: String signNumCompatChars = "!#$&*+-/:<=>?@\\^|~" ++ "\161\162\163\167\169\172\176\177\178\179\181\182\183\185\191\215\247"
149
signNumCompatChars :: String signNumCompatChars = "!#$&*+-/:<=>?@\\^|~" ++ "\161\162\163\167\169\172\176\177\178\179\181\182\183\185\191\215\247"
149
signNumCompatChars = "!#$&*+-/:<=>?@\\^|~" ++ "\161\162\163\167\169\172\176\177\178\179\181\182\183\185\191\215\247"
120
false
true
0
5
11
15
8
7
null
null
andregrigon/game
src/Waterfall/Prelude.hs
mit
put :: String -> IO () put s = putStrLn s >> hFlush stdout
58
put :: String -> IO () put s = putStrLn s >> hFlush stdout
58
put s = putStrLn s >> hFlush stdout
35
false
true
2
8
13
38
16
22
null
null
robdockins/edison
edison-core/src/Data/Edison/Coll/MinHeap.hs
mit
lookupM x (M y ys) | x > y = C.lookupM x ys | x == y = return y
68
lookupM x (M y ys) | x > y = C.lookupM x ys | x == y = return y
68
lookupM x (M y ys) | x > y = C.lookupM x ys | x == y = return y
68
false
false
1
8
24
52
23
29
null
null
OS2World/DEV-UTIL-HUGS
libraries/Graphics/Rendering/OpenGL/GL/PerFragment.hs
bsd-3-clause
-------------------------------------------------------------------------------- blendEquation :: StateVar (Maybe BlendEquationMode) blendEquation = makeStateVarMaybe (return CapBlend) (getEnum1 unmarshalBlendEquationMode GetBlendEquation) (glBlendEquationEXT . marshalBlendEquationMode)
309
blendEquation :: StateVar (Maybe BlendEquationMode) blendEquation = makeStateVarMaybe (return CapBlend) (getEnum1 unmarshalBlendEquationMode GetBlendEquation) (glBlendEquationEXT . marshalBlendEquationMode)
227
blendEquation = makeStateVarMaybe (return CapBlend) (getEnum1 unmarshalBlendEquationMode GetBlendEquation) (glBlendEquationEXT . marshalBlendEquationMode)
175
true
true
0
7
38
49
25
24
null
null
bitemyapp/strive
library/Strive/Actions/Gear.hs
mit
-- | <http://strava.github.io/api/v3/gear/#show> getGear :: Client -> GearId -> IO (Result GearDetailed) getGear client gearId = get client resource query where resource = "api/v3/gear/" ++ gearId query = [] :: Query
221
getGear :: Client -> GearId -> IO (Result GearDetailed) getGear client gearId = get client resource query where resource = "api/v3/gear/" ++ gearId query = [] :: Query
172
getGear client gearId = get client resource query where resource = "api/v3/gear/" ++ gearId query = [] :: Query
116
true
true
0
9
35
63
32
31
null
null
CindyLinz/Haskell-Perl
src/Perl/Internal/MonadGlue.hs
mit
newStrSV :: (MonadCatch m, MonadIO m) => Ptr CChar -> StrLen -> PerlT s m SV newStrSV str len = PerlT $ \perl _ -> do sv <- liftIO $ perl_newSVpvn_flags perl str len 0 return ([sv], sv)
189
newStrSV :: (MonadCatch m, MonadIO m) => Ptr CChar -> StrLen -> PerlT s m SV newStrSV str len = PerlT $ \perl _ -> do sv <- liftIO $ perl_newSVpvn_flags perl str len 0 return ([sv], sv)
189
newStrSV str len = PerlT $ \perl _ -> do sv <- liftIO $ perl_newSVpvn_flags perl str len 0 return ([sv], sv)
112
false
true
2
11
41
101
48
53
null
null