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
greole/calendula
Calendula.hs
bsd-3-clause
mergeMarkdown :: (Int -> Markdown -> HTML) -> (Markdown -> Markdown) -> [Int] -> [Markdown] -> Markdown mergeMarkdown p f l x = unlines $ zipWith p l (map f x)
160
mergeMarkdown :: (Int -> Markdown -> HTML) -> (Markdown -> Markdown) -> [Int] -> [Markdown] -> Markdown mergeMarkdown p f l x = unlines $ zipWith p l (map f x)
160
mergeMarkdown p f l x = unlines $ zipWith p l (map f x)
55
false
true
2
10
31
85
42
43
null
null
brendanhay/pagerduty
src/Network/PagerDuty/REST/Incidents.hs
mpl-2.0
-- | A version of 'updateIncidents' which uses HTTP Basic authentication and -- doesn't require a 'RequesterId'. updateIncidentsBasic :: Request UpdateIncidents 'Basic [UpdatedIncidents] updateIncidentsBasic = mk UpdateIncidents { _uiIncidents' = [] } & meth .~ PUT & path .~ incidents
315
updateIncidentsBasic :: Request UpdateIncidents 'Basic [UpdatedIncidents] updateIncidentsBasic = mk UpdateIncidents { _uiIncidents' = [] } & meth .~ PUT & path .~ incidents
202
updateIncidentsBasic = mk UpdateIncidents { _uiIncidents' = [] } & meth .~ PUT & path .~ incidents
128
true
true
0
12
69
54
29
25
null
null
VictorDenisov/cluedo
src/Test/ByFramework.hs
gpl-2.0
main = defaultMain tests
24
main = defaultMain tests
24
main = defaultMain tests
24
false
false
1
5
3
13
4
9
null
null
brendanhay/gogol
gogol-slides/gen/Network/Google/Slides/Types/Product.hs
mpl-2.0
-- | The contrast effect of the image. The value should be in the interval -- [-1.0, 1.0], where 0 means no effect. This property is read-only. ipContrast :: Lens' ImageProperties (Maybe Double) ipContrast = lens _ipContrast (\ s a -> s{_ipContrast = a}) . mapping _Coerce
280
ipContrast :: Lens' ImageProperties (Maybe Double) ipContrast = lens _ipContrast (\ s a -> s{_ipContrast = a}) . mapping _Coerce
136
ipContrast = lens _ipContrast (\ s a -> s{_ipContrast = a}) . mapping _Coerce
85
true
true
0
10
54
56
29
27
null
null
pparkkin/eta
compiler/ETA/SimplCore/FloatIn.hs
bsd-3-clause
floatIsDupable :: DynFlags -> FloatBind -> Bool floatIsDupable dflags (FloatCase scrut _ _ _) = exprIsDupable dflags scrut
122
floatIsDupable :: DynFlags -> FloatBind -> Bool floatIsDupable dflags (FloatCase scrut _ _ _) = exprIsDupable dflags scrut
122
floatIsDupable dflags (FloatCase scrut _ _ _) = exprIsDupable dflags scrut
74
false
true
0
7
17
41
20
21
null
null
sherwoodwang/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxBRUSHSTYLE_HORIZONTAL_HATCH :: Int wxBRUSHSTYLE_HORIZONTAL_HATCH = wxHATCHSTYLE_HORIZONTAL
92
wxBRUSHSTYLE_HORIZONTAL_HATCH :: Int wxBRUSHSTYLE_HORIZONTAL_HATCH = wxHATCHSTYLE_HORIZONTAL
92
wxBRUSHSTYLE_HORIZONTAL_HATCH = wxHATCHSTYLE_HORIZONTAL
55
false
true
0
6
5
18
7
11
null
null
rueshyna/gogol
gogol-books/gen/Network/Google/Books/Types/Product.hs
mpl-2.0
oiiiiDescription :: Lens' OffersItemsItemItemsItem (Maybe Text) oiiiiDescription = lens _oiiiiDescription (\ s a -> s{_oiiiiDescription = a})
149
oiiiiDescription :: Lens' OffersItemsItemItemsItem (Maybe Text) oiiiiDescription = lens _oiiiiDescription (\ s a -> s{_oiiiiDescription = a})
149
oiiiiDescription = lens _oiiiiDescription (\ s a -> s{_oiiiiDescription = a})
85
false
true
1
9
24
50
24
26
null
null
MedeaMelana/custard
Assign.hs
bsd-3-clause
asState (field := value) = putA field value
43
asState (field := value) = putA field value
43
asState (field := value) = putA field value
43
false
false
0
7
7
21
10
11
null
null
massysett/penny
penny/lib/Penny/Clatch/Create.hs
bsd-3-clause
createClatch :: (Totaled l() -> Bool) -- ^ Predicate -> Seq (Sorted l a) -> Seq (Clatch l) createClatch pd = fmap arrange . serialNumbers . Seq.filter pd . addTotals where arrange ((t, (v, (a, (e, (s, (b, _)))))), o) = (t, (v, (a, (e, (s, (b, (o, ()))))))) -- -- # Adding serials --
312
createClatch :: (Totaled l() -> Bool) -- ^ Predicate -> Seq (Sorted l a) -> Seq (Clatch l) createClatch pd = fmap arrange . serialNumbers . Seq.filter pd . addTotals where arrange ((t, (v, (a, (e, (s, (b, _)))))), o) = (t, (v, (a, (e, (s, (b, (o, ()))))))) -- -- # Adding serials --
312
createClatch pd = fmap arrange . serialNumbers . Seq.filter pd . addTotals where arrange ((t, (v, (a, (e, (s, (b, _)))))), o) = (t, (v, (a, (e, (s, (b, (o, ()))))))) -- -- # Adding serials --
212
false
true
3
13
84
184
103
81
null
null
iquiw/wai
warp/Network/Wai/Handler/Warp/HTTP2/Receiver.hs
mit
control _ _ _ _ = -- must not reach here return False
61
control _ _ _ _ = -- must not reach here return False
61
control _ _ _ _ = -- must not reach here return False
61
false
false
1
5
20
19
8
11
null
null
uwap/Idris-dev
src/Idris/Delaborate.hs
bsd-3-clause
-- | Delaborate a term without resugaring delab :: IState -> Term -> PTerm delab i tm = delab' i tm False False
111
delab :: IState -> Term -> PTerm delab i tm = delab' i tm False False
69
delab i tm = delab' i tm False False
36
true
true
0
8
22
43
18
25
null
null
bitc/hs-watchman
src/System/Directory/Watchman/Fields.hs
mit
parseFileField FLnew _ = error "\"new\" field is not a boolean"
63
parseFileField FLnew _ = error "\"new\" field is not a boolean"
63
parseFileField FLnew _ = error "\"new\" field is not a boolean"
63
false
false
0
5
10
14
6
8
null
null
alephcloud/hs-aws-kinesis-client
src/Aws/Kinesis/Client/Consumer/Internal/Kit.hs
apache-2.0
-- | Create a 'ConsumerKit' with default settings (using iterator type -- 'Latest' and a batch size of @200@). -- makeConsumerKit ∷ KinesisKit → StreamName → ConsumerKit makeConsumerKit kinesisKit stream = ConsumerKit { _ckKinesisKit = kinesisKit , _ckStreamName = stream , _ckBatchSize = 200 , _ckIteratorType = Latest , _ckSavedStreamState = Nothing }
371
makeConsumerKit ∷ KinesisKit → StreamName → ConsumerKit makeConsumerKit kinesisKit stream = ConsumerKit { _ckKinesisKit = kinesisKit , _ckStreamName = stream , _ckBatchSize = 200 , _ckIteratorType = Latest , _ckSavedStreamState = Nothing }
257
makeConsumerKit kinesisKit stream = ConsumerKit { _ckKinesisKit = kinesisKit , _ckStreamName = stream , _ckBatchSize = 200 , _ckIteratorType = Latest , _ckSavedStreamState = Nothing }
195
true
true
0
8
70
68
38
30
null
null
mrakgr/futhark
src/Futhark/Pass/ExtractKernels.hs
bsd-3-clause
postKernelBindings :: PostKernels -> [Out.Binding] postKernelBindings (PostKernels kernels) = concatMap unPostKernel kernels
124
postKernelBindings :: PostKernels -> [Out.Binding] postKernelBindings (PostKernels kernels) = concatMap unPostKernel kernels
124
postKernelBindings (PostKernels kernels) = concatMap unPostKernel kernels
73
false
true
0
7
11
34
17
17
null
null
tepf/QuickPlot
src/QuickPlot/IPC/Server.hs
gpl-3.0
serverRunning = unsafePerformIO (newIORef (False, 0))
53
serverRunning = unsafePerformIO (newIORef (False, 0))
53
serverRunning = unsafePerformIO (newIORef (False, 0))
53
false
false
0
8
5
21
11
10
null
null
GaloisInc/saw-script
heapster-saw/src/Verifier/SAW/Heapster/archival/TypedCrucible.hs
bsd-3-clause
emptyPermCheckEnv :: PermCheckEnv ret EmptyCtx emptyPermCheckEnv = PermCheckEnv emptyPermSet []
95
emptyPermCheckEnv :: PermCheckEnv ret EmptyCtx emptyPermCheckEnv = PermCheckEnv emptyPermSet []
95
emptyPermCheckEnv = PermCheckEnv emptyPermSet []
48
false
true
1
6
9
26
11
15
null
null
kmate/HaRe
old/tools/base/lib/Monads/OutputM.hs
bsd-3-clause
outputs = F.outputs F.this
30
outputs = F.outputs F.this
30
outputs = F.outputs F.this
30
false
false
1
6
7
17
6
11
null
null
tjakway/ghcjvm
compiler/utils/OrdList.hs
bsd-3-clause
lastOL None = panic "lastOL"
35
lastOL None = panic "lastOL"
35
lastOL None = panic "lastOL"
35
false
false
0
5
11
12
5
7
null
null
seckcoder/vector
Data/Vector/Primitive/Mutable.hs
bsd-3-clause
unsafeNew = G.unsafeNew
23
unsafeNew = G.unsafeNew
23
unsafeNew = G.unsafeNew
23
false
false
0
5
2
8
4
4
null
null
rethab/tagger
src/Tagger/TagCompleter.hs
bsd-3-clause
capitalize :: String -> String capitalize [] = []
49
capitalize :: String -> String capitalize [] = []
49
capitalize [] = []
18
false
true
0
6
8
22
11
11
null
null
sergei-romanenko/sc-mini
src/Demonstration.hs
unlicense
demo03 = eval prog1 $ read "gEven(fSqr(S(S(Z()))))"
55
demo03 = eval prog1 $ read "gEven(fSqr(S(S(Z()))))"
55
demo03 = eval prog1 $ read "gEven(fSqr(S(S(Z()))))"
55
false
false
0
6
10
16
7
9
null
null
MateVM/harpy
Harpy/X86CodeGen.hs
gpl-2.0
-- POP instruction. x86_pop_reg :: Word8 -> CodeGen e s () x86_pop_reg reg = emit8 (0x58 + reg)
96
x86_pop_reg :: Word8 -> CodeGen e s () x86_pop_reg reg = emit8 (0x58 + reg)
75
x86_pop_reg reg = emit8 (0x58 + reg)
36
true
true
0
7
18
38
19
19
null
null
spatial-ucsb/ConceptsOfSpatialInformation
CoreConceptsHs/Object.hs
apache-2.0
ot1 = bounds poi1
17
ot1 = bounds poi1
17
ot1 = bounds poi1
17
false
false
0
5
3
9
4
5
null
null
sopvop/cabal
Cabal/Distribution/Simple/Program/Builtin.hs
bsd-3-clause
lhcPkgProgram :: Program lhcPkgProgram = (simpleProgram "lhc-pkg") { programFindVersion = findProgramVersion "--version" $ \str -> -- Invoking "lhc-pkg --version" gives a string like -- "LHC package manager version 0.7" case words str of (_:_:_:_:ver:_) -> ver _ -> "" }
324
lhcPkgProgram :: Program lhcPkgProgram = (simpleProgram "lhc-pkg") { programFindVersion = findProgramVersion "--version" $ \str -> -- Invoking "lhc-pkg --version" gives a string like -- "LHC package manager version 0.7" case words str of (_:_:_:_:ver:_) -> ver _ -> "" }
324
lhcPkgProgram = (simpleProgram "lhc-pkg") { programFindVersion = findProgramVersion "--version" $ \str -> -- Invoking "lhc-pkg --version" gives a string like -- "LHC package manager version 0.7" case words str of (_:_:_:_:ver:_) -> ver _ -> "" }
299
false
true
0
17
93
81
43
38
null
null
tolysz/prepare-ghcjs
spec-lts8/aeson/tests/DataFamilies/Encoders.hs
bsd-3-clause
gNullaryToEncoding2ElemArray :: Nullary Int -> Encoding gNullaryToEncoding2ElemArray = genericToEncoding opts2ElemArray
119
gNullaryToEncoding2ElemArray :: Nullary Int -> Encoding gNullaryToEncoding2ElemArray = genericToEncoding opts2ElemArray
119
gNullaryToEncoding2ElemArray = genericToEncoding opts2ElemArray
63
false
true
0
6
9
21
10
11
null
null
vsivsi/gitit
src/Network/Gitit/ContentTransformer.hs
gpl-2.0
-- | Responds with non-highlighted source code. showFile :: Handler showFile = runFileTransformer (rawContents >>= mimeFileResponse)
132
showFile :: Handler showFile = runFileTransformer (rawContents >>= mimeFileResponse)
84
showFile = runFileTransformer (rawContents >>= mimeFileResponse)
64
true
true
0
7
15
22
12
10
null
null
rumblesan/improviz
src/Gfx/OpenGL.hs
bsd-3-clause
valueToGLfloatVec2 _ = Left "Invalid value"
43
valueToGLfloatVec2 _ = Left "Invalid value"
43
valueToGLfloatVec2 _ = Left "Invalid value"
43
false
false
0
5
5
12
5
7
null
null
HJvT/com
System/Win32/Com/Exception.hs
bsd-3-clause
oLE_E_CANT_GETMONIKER :: HRESULT oLE_E_CANT_GETMONIKER = word32ToInt32 (0x80040009 ::Word32)
92
oLE_E_CANT_GETMONIKER :: HRESULT oLE_E_CANT_GETMONIKER = word32ToInt32 (0x80040009 ::Word32)
92
oLE_E_CANT_GETMONIKER = word32ToInt32 (0x80040009 ::Word32)
59
false
true
0
6
7
26
12
14
null
null
jeffreyrosenbluth/NYC-meetup
meetup/Trace.hs
mit
thingyT :: Trail V2 Double thingyT = fromOffsets [ 3 *^ unitX, 3 *^ unitY, 2 *^ unit_X, 1 *^ unit_Y , 1 *^ unitX, 1 *^ unit_Y, 2 *^ unit_X, 1 *^ unit_Y ]
163
thingyT :: Trail V2 Double thingyT = fromOffsets [ 3 *^ unitX, 3 *^ unitY, 2 *^ unit_X, 1 *^ unit_Y , 1 *^ unitX, 1 *^ unit_Y, 2 *^ unit_X, 1 *^ unit_Y ]
163
thingyT = fromOffsets [ 3 *^ unitX, 3 *^ unitY, 2 *^ unit_X, 1 *^ unit_Y , 1 *^ unitX, 1 *^ unit_Y, 2 *^ unit_X, 1 *^ unit_Y ]
136
false
true
1
7
44
79
41
38
null
null
vikraman/ghc
compiler/prelude/THNames.hs
bsd-3-clause
pragSpecInlDName = libFun (fsLit "pragSpecInlD") pragSpecInlDIdKey
75
pragSpecInlDName = libFun (fsLit "pragSpecInlD") pragSpecInlDIdKey
75
pragSpecInlDName = libFun (fsLit "pragSpecInlD") pragSpecInlDIdKey
75
false
false
0
7
14
17
8
9
null
null
tjakway/ghcjvm
testsuite/tests/dependent/should_compile/dynamic-paper.hs
bsd-3-clause
boolTcOld = undefined
21
boolTcOld = undefined
21
boolTcOld = undefined
21
false
false
0
4
2
6
3
3
null
null
8l/barrelfish
hake/ARMv7.hs
mit
ar = Config.arm_ar
27
ar = Config.arm_ar
27
ar = Config.arm_ar
27
false
false
1
6
11
12
4
8
null
null
plietar/super-user-spark
src/Parser.hs
mit
--[ Git ]-- gitRepo :: Parser GitRepo gitRepo = do prot <- gitProtocol case prot of HTTPS -> do host <- manyTill (noneOf "/") (string "/") path <- many (noneOf " :") return $ GitRepo { repo_protocol = HTTPS, repo_host = host, repo_path = path } Git -> do host <- manyTill (noneOf ":") (string ":") path <- manyTill anyToken (string ".git") return $ GitRepo { repo_protocol = Git, repo_host = host, repo_path = path }
587
gitRepo :: Parser GitRepo gitRepo = do prot <- gitProtocol case prot of HTTPS -> do host <- manyTill (noneOf "/") (string "/") path <- many (noneOf " :") return $ GitRepo { repo_protocol = HTTPS, repo_host = host, repo_path = path } Git -> do host <- manyTill (noneOf ":") (string ":") path <- manyTill anyToken (string ".git") return $ GitRepo { repo_protocol = Git, repo_host = host, repo_path = path }
574
gitRepo = do prot <- gitProtocol case prot of HTTPS -> do host <- manyTill (noneOf "/") (string "/") path <- many (noneOf " :") return $ GitRepo { repo_protocol = HTTPS, repo_host = host, repo_path = path } Git -> do host <- manyTill (noneOf ":") (string ":") path <- manyTill anyToken (string ".git") return $ GitRepo { repo_protocol = Git, repo_host = host, repo_path = path }
548
true
true
0
15
246
177
89
88
null
null
abakst/brisk-prelude
src/Control/Distributed/Process/Brisk.hs
bsd-3-clause
getSelfNodeSpec :: Process NodeId getSelfNodeSpec = return top
62
getSelfNodeSpec :: Process NodeId getSelfNodeSpec = return top
62
getSelfNodeSpec = return top
28
false
true
0
5
7
17
8
9
null
null
nushio3/ghc
compiler/iface/BuildTyCl.hs
bsd-3-clause
mkDataTyConRhs :: [DataCon] -> AlgTyConRhs mkDataTyConRhs cons = DataTyCon { data_cons = cons, is_enum = not (null cons) && all is_enum_con cons -- See Note [Enumeration types] in TyCon } where is_enum_con con | (_univ_tvs, ex_tvs, eq_spec, theta, arg_tys, _res) <- dataConFullSig con = null ex_tvs && null eq_spec && null theta && null arg_tys
415
mkDataTyConRhs :: [DataCon] -> AlgTyConRhs mkDataTyConRhs cons = DataTyCon { data_cons = cons, is_enum = not (null cons) && all is_enum_con cons -- See Note [Enumeration types] in TyCon } where is_enum_con con | (_univ_tvs, ex_tvs, eq_spec, theta, arg_tys, _res) <- dataConFullSig con = null ex_tvs && null eq_spec && null theta && null arg_tys
415
mkDataTyConRhs cons = DataTyCon { data_cons = cons, is_enum = not (null cons) && all is_enum_con cons -- See Note [Enumeration types] in TyCon } where is_enum_con con | (_univ_tvs, ex_tvs, eq_spec, theta, arg_tys, _res) <- dataConFullSig con = null ex_tvs && null eq_spec && null theta && null arg_tys
372
false
true
2
10
125
132
64
68
null
null
gwright83/Wheeler
src/Math/Symbolic/Wheeler/TensorUtilities.hs
bsd-3-clause
isKroneckerDelta _ = False
26
isKroneckerDelta _ = False
26
isKroneckerDelta _ = False
26
false
false
0
5
3
9
4
5
null
null
jstolarek/haddock
haddock-api/src/Haddock/Backends/LaTeX.hs
bsd-2-clause
ppInstHead :: Bool -> InstHead DocName -> LaTeX ppInstHead unicode (n, ks, ts, ClassInst ctx) = ppContextNoLocs ctx unicode <+> ppAppNameTypes n ks ts unicode
158
ppInstHead :: Bool -> InstHead DocName -> LaTeX ppInstHead unicode (n, ks, ts, ClassInst ctx) = ppContextNoLocs ctx unicode <+> ppAppNameTypes n ks ts unicode
158
ppInstHead unicode (n, ks, ts, ClassInst ctx) = ppContextNoLocs ctx unicode <+> ppAppNameTypes n ks ts unicode
110
false
true
0
7
24
60
30
30
null
null
haroldcarr/learn-haskell-coq-ml-etc
haskell/topic/general/wiki-haskell-org-99-questions/X99Questions.hs
unlicense
myLast [z] = z
17
myLast [z] = z
17
myLast [z] = z
17
false
false
0
5
6
13
6
7
null
null
ntc2/cryptol
src/Cryptol/TypeCheck/Solver/Numeric/ImportExport.hs
bsd-3-clause
exportType :: Cry.Prop -> Maybe Expr exportType = runExportM . exportTypeM
74
exportType :: Cry.Prop -> Maybe Expr exportType = runExportM . exportTypeM
74
exportType = runExportM . exportTypeM
37
false
true
0
6
10
24
12
12
null
null
expipiplus1/spir-v
Language/SpirV/OpCode.hs
mit
instructionSize OpString = Variadic 2
37
instructionSize OpString = Variadic 2
37
instructionSize OpString = Variadic 2
37
false
false
0
5
4
12
5
7
null
null
LambdaMx/haskelldojo
session_4/tictactoe/domix_agus/web/ui.hs
unlicense
-------------------------------------------------------------------------------- -- Misc -- | Alert using window.alert. alert :: a -> Fay () alert = ffi "window['alert'](%1)"
175
alert :: a -> Fay () alert = ffi "window['alert'](%1)"
54
alert = ffi "window['alert'](%1)"
33
true
true
0
8
18
32
15
17
null
null
urbanslug/ghc
libraries/template-haskell/Language/Haskell/TH/Lib.hs
bsd-3-clause
rationalL :: Rational -> Lit rationalL = RationalL
54
rationalL :: Rational -> Lit rationalL = RationalL
54
rationalL = RationalL
23
false
true
0
5
11
15
8
7
null
null
gahag/FSQL
src/Expr/TypeChecker.hs
bsd-3-clause
parseerror :: String -> String -> TypeCheck a parseerror t l = throwError (ParseError t l)
92
parseerror :: String -> String -> TypeCheck a parseerror t l = throwError (ParseError t l)
90
parseerror t l = throwError (ParseError t l)
44
false
true
0
7
17
38
18
20
null
null
nkartashov/haskell
hw07/cat.hs
gpl-2.0
handledFile path = catch (handleFile path) handler
50
handledFile path = catch (handleFile path) handler
50
handledFile path = catch (handleFile path) handler
50
false
false
1
7
6
23
9
14
null
null
spechub/Hets
TPTP/Prover/Leo2.hs
gpl-2.0
leo2 :: Prover Sign Sentence Morphism Sublogic ProofTree leo2 = mkProver binary_name prover_name sublogics runTheProver
119
leo2 :: Prover Sign Sentence Morphism Sublogic ProofTree leo2 = mkProver binary_name prover_name sublogics runTheProver
119
leo2 = mkProver binary_name prover_name sublogics runTheProver
62
false
true
1
5
14
34
15
19
null
null
haroldcarr/learn-haskell-coq-ml-etc
haskell/topic/ghc-extensions/src/K.hs
unlicense
oneDollarThirtyCents :: Discrete "USD" '(100, 1) oneDollarThirtyCents = Discrete 130
84
oneDollarThirtyCents :: Discrete "USD" '(100, 1) oneDollarThirtyCents = Discrete 130
84
oneDollarThirtyCents = Discrete 130
35
false
true
0
7
9
27
14
13
null
null
hjwylde/werewolf
app/Game/Werewolf/Variant/Standard/Command.hs
bsd-3-clause
callerRescindedVoteText :: Player -> Text callerRescindedVoteText caller = [iFile|variant/standard/command/unvote/player-rescinded-vote.txt|]
141
callerRescindedVoteText :: Player -> Text callerRescindedVoteText caller = [iFile|variant/standard/command/unvote/player-rescinded-vote.txt|]
141
callerRescindedVoteText caller = [iFile|variant/standard/command/unvote/player-rescinded-vote.txt|]
99
false
true
0
7
8
28
14
14
null
null
ezyang/ghc
compiler/nativeGen/PPC/Ppr.hs
bsd-3-clause
-- pprInstr _ = panic "pprInstr (ppc)" pprLogic :: LitString -> Reg -> Reg -> RI -> SDoc pprLogic op reg1 reg2 ri = hcat [ char '\t', ptext op, case ri of RIReg _ -> empty RIImm _ -> char 'i', char '\t', pprReg reg1, text ", ", pprReg reg2, text ", ", pprRI ri ]
364
pprLogic :: LitString -> Reg -> Reg -> RI -> SDoc pprLogic op reg1 reg2 ri = hcat [ char '\t', ptext op, case ri of RIReg _ -> empty RIImm _ -> char 'i', char '\t', pprReg reg1, text ", ", pprReg reg2, text ", ", pprRI ri ]
323
pprLogic op reg1 reg2 ri = hcat [ char '\t', ptext op, case ri of RIReg _ -> empty RIImm _ -> char 'i', char '\t', pprReg reg1, text ", ", pprReg reg2, text ", ", pprRI ri ]
273
true
true
0
10
158
116
57
59
null
null
davmre/matrizer
src/Matrizer/RewriteRules.hs
gpl-2.0
collectTerms :: Rule collectTerms _ (Branch2 MSum (Branch2 MScalarProduct (LiteralScalar n) a) b) | (a==b) = Just (Branch2 MScalarProduct (LiteralScalar (n+1)) a) | otherwise = Nothing
212
collectTerms :: Rule collectTerms _ (Branch2 MSum (Branch2 MScalarProduct (LiteralScalar n) a) b) | (a==b) = Just (Branch2 MScalarProduct (LiteralScalar (n+1)) a) | otherwise = Nothing
212
collectTerms _ (Branch2 MSum (Branch2 MScalarProduct (LiteralScalar n) a) b) | (a==b) = Just (Branch2 MScalarProduct (LiteralScalar (n+1)) a) | otherwise = Nothing
191
false
true
0
12
53
90
44
46
null
null
phischu/fragnix
tests/packages/scotty/Data.Text.hs
bsd-3-clause
-- | /O(n)/ A variant of 'foldl' that has no starting value argument, -- and thus must be applied to a non-empty 'Text'. Subject to fusion. foldl1 :: (Char -> Char -> Char) -> Text -> Char foldl1 f t = S.foldl1 f (stream t)
224
foldl1 :: (Char -> Char -> Char) -> Text -> Char foldl1 f t = S.foldl1 f (stream t)
83
foldl1 f t = S.foldl1 f (stream t)
34
true
true
0
9
45
56
27
29
null
null
cchantep/dhek
Dhek/Engine/Type.hs
gpl-3.0
-------------------------------------------------------------------------------- keyRelease :: KbEnv -> M () keyRelease e = M $ mKeyRelease e
141
keyRelease :: KbEnv -> M () keyRelease e = M $ mKeyRelease e
60
keyRelease e = M $ mKeyRelease e
32
true
true
2
8
13
36
16
20
null
null
d3sformal/bacon-core
test/RecPdr.hs
mit
nD = "d"
9
nD = "d"
9
nD = "d"
9
false
false
1
5
3
10
3
7
null
null
ekmett/ghc
compiler/cmm/CmmSink.hs
bsd-3-clause
exprMem _ _ = NoMem
40
exprMem _ _ = NoMem
40
exprMem _ _ = NoMem
40
false
false
1
5
25
12
5
7
null
null
michaelficarra/purescript
src/Language/PureScript/Constants.hs
mit
disj :: String disj = "disj"
28
disj :: String disj = "disj"
28
disj = "disj"
13
false
true
0
4
5
11
6
5
null
null
f1u77y/xmonad-contrib
XMonad/Actions/CycleWS.hs
bsd-3-clause
findWsIndex :: WindowSpace -> [WindowSpace] -> Maybe Int findWsIndex ws wss = findIndex ((== tag ws) . tag) wss
111
findWsIndex :: WindowSpace -> [WindowSpace] -> Maybe Int findWsIndex ws wss = findIndex ((== tag ws) . tag) wss
111
findWsIndex ws wss = findIndex ((== tag ws) . tag) wss
54
false
true
0
9
18
49
25
24
null
null
thalerjonathan/phd
coding/libraries/chimera/examples/ABS/SIRExamples/FrSIRSNetwork/Init.hs
gpl-3.0
createFrSIRSNetworkDef :: AgentId -> SIRSState -> FrSIRSNetworkAgentBehaviour -> StdGen -> FrSIRSNetworkAgentDef createFrSIRSNetworkDef aid sirsState beh rng = AgentDef { adId = aid, adState = sirsState, adBeh = beh, adInitMessages = NoEvent, adConversation = Nothing, adRng = rng }
482
createFrSIRSNetworkDef :: AgentId -> SIRSState -> FrSIRSNetworkAgentBehaviour -> StdGen -> FrSIRSNetworkAgentDef createFrSIRSNetworkDef aid sirsState beh rng = AgentDef { adId = aid, adState = sirsState, adBeh = beh, adInitMessages = NoEvent, adConversation = Nothing, adRng = rng }
482
createFrSIRSNetworkDef aid sirsState beh rng = AgentDef { adId = aid, adState = sirsState, adBeh = beh, adInitMessages = NoEvent, adConversation = Nothing, adRng = rng }
254
false
true
0
8
237
74
43
31
null
null
timjb/halma
halma-telegram-bot/src/Game/Halma/TelegramBot/Controller/BotM.hs
mit
evalGlobalBotM :: GlobalBotM a -> BotConfig -> IO (Either BotError a) evalGlobalBotM action cfg = evalStateT (runExceptT (runReaderT (unGeneralBotM action) cfg)) initialBotState
179
evalGlobalBotM :: GlobalBotM a -> BotConfig -> IO (Either BotError a) evalGlobalBotM action cfg = evalStateT (runExceptT (runReaderT (unGeneralBotM action) cfg)) initialBotState
179
evalGlobalBotM action cfg = evalStateT (runExceptT (runReaderT (unGeneralBotM action) cfg)) initialBotState
109
false
true
0
11
23
68
31
37
null
null
vTurbine/ghc
compiler/typecheck/TcGenDeriv.hs
bsd-3-clause
leChar_RDR = varQual_RDR gHC_PRIM (fsLit "leChar#")
56
leChar_RDR = varQual_RDR gHC_PRIM (fsLit "leChar#")
56
leChar_RDR = varQual_RDR gHC_PRIM (fsLit "leChar#")
56
false
false
0
7
10
17
8
9
null
null
philderbeast/ghcjs
src/Compiler/JMacro/Base.hs
mit
uOpText PreInc = "++"
23
uOpText PreInc = "++"
23
uOpText PreInc = "++"
23
false
false
1
5
5
13
4
9
null
null
upwawet/vision
src/Location/Model.hs
gpl-3.0
location = _location ?_Location_Model
42
location = _location ?_Location_Model
42
location = _location ?_Location_Model
42
false
false
1
5
8
13
4
9
null
null
ublubu/shapes
shapes/src/Physics/Scenes/FourBoxesTwoStatic.hs
mit
staticBoxD' :: label -> WorldObj label staticBoxD' = makeWorldObj staticBoxD 0.2 0 $ makeRectangleHull 0.4 3
108
staticBoxD' :: label -> WorldObj label staticBoxD' = makeWorldObj staticBoxD 0.2 0 $ makeRectangleHull 0.4 3
108
staticBoxD' = makeWorldObj staticBoxD 0.2 0 $ makeRectangleHull 0.4 3
69
false
true
0
6
15
34
16
18
null
null
sgillespie/ghc
compiler/codeGen/StgCmmEnv.hs
bsd-3-clause
--------------------------------------------------------- -- The binding environment -- -- There are three basic routines, for adding (addBindC), -- modifying(modifyBindC) and looking up (getCgIdInfo) bindings. --------------------------------------------------------- addBindC :: CgIdInfo -> FCode () addBindC stuff_to_bind = do binds <- getBinds setBinds $ extendVarEnv binds (cg_id stuff_to_bind) stuff_to_bind
437
addBindC :: CgIdInfo -> FCode () addBindC stuff_to_bind = do binds <- getBinds setBinds $ extendVarEnv binds (cg_id stuff_to_bind) stuff_to_bind
160
addBindC stuff_to_bind = do binds <- getBinds setBinds $ extendVarEnv binds (cg_id stuff_to_bind) stuff_to_bind
127
true
true
0
11
66
60
30
30
null
null
erikd/hs-tls
core/Network/TLS/State.hs
bsd-3-clause
getClientALPNSuggest :: TLSSt (Maybe [B.ByteString]) getClientALPNSuggest = gets stClientALPNSuggest
100
getClientALPNSuggest :: TLSSt (Maybe [B.ByteString]) getClientALPNSuggest = gets stClientALPNSuggest
100
getClientALPNSuggest = gets stClientALPNSuggest
47
false
true
0
9
8
28
14
14
null
null
tomahawkins/engineering-units
Data/EngineeringUnits.hs
bsd-3-clause
-- | Hours. h = 60 * min'
28
h = 60 * min'
16
h = 60 * min'
16
true
false
0
5
10
11
6
5
null
null
nushio3/formura
src/Formura/Utilities.hs
mit
readYamlDef :: (Y.ToJSON a, Y.FromJSON a) => a -> FilePath -> IO (Maybe a) readYamlDef def fn = do Y.decodeFileEither fn >>= \case Left msg -> do hPutStrLn stderr $ "When reading " ++ fn ++ "\n" ++ Y.prettyPrintParseException msg return Nothing Right v -> do let v2 :: Y.Value v2 = unionValue v (Y.toJSON def) case (Y.decodeEither' $ Y.encode v2) of Left msg -> do hPutStrLn stderr $ "When merging " ++ fn ++ "\n" ++ Y.prettyPrintParseException msg return Nothing Right x -> return $ Just x where unionValue :: Y.Value -> Y.Value -> Y.Value unionValue (Y.Object hm1) (Y.Object hm2) = Y.Object $ HM.unionWith unionValue hm1 hm2 unionValue a _ = a -- Object !Object -- Array !Array -- String !Text -- Number !Scientific -- Bool !Bool -- Null
835
readYamlDef :: (Y.ToJSON a, Y.FromJSON a) => a -> FilePath -> IO (Maybe a) readYamlDef def fn = do Y.decodeFileEither fn >>= \case Left msg -> do hPutStrLn stderr $ "When reading " ++ fn ++ "\n" ++ Y.prettyPrintParseException msg return Nothing Right v -> do let v2 :: Y.Value v2 = unionValue v (Y.toJSON def) case (Y.decodeEither' $ Y.encode v2) of Left msg -> do hPutStrLn stderr $ "When merging " ++ fn ++ "\n" ++ Y.prettyPrintParseException msg return Nothing Right x -> return $ Just x where unionValue :: Y.Value -> Y.Value -> Y.Value unionValue (Y.Object hm1) (Y.Object hm2) = Y.Object $ HM.unionWith unionValue hm1 hm2 unionValue a _ = a -- Object !Object -- Array !Array -- String !Text -- Number !Scientific -- Bool !Bool -- Null
835
readYamlDef def fn = do Y.decodeFileEither fn >>= \case Left msg -> do hPutStrLn stderr $ "When reading " ++ fn ++ "\n" ++ Y.prettyPrintParseException msg return Nothing Right v -> do let v2 :: Y.Value v2 = unionValue v (Y.toJSON def) case (Y.decodeEither' $ Y.encode v2) of Left msg -> do hPutStrLn stderr $ "When merging " ++ fn ++ "\n" ++ Y.prettyPrintParseException msg return Nothing Right x -> return $ Just x where unionValue :: Y.Value -> Y.Value -> Y.Value unionValue (Y.Object hm1) (Y.Object hm2) = Y.Object $ HM.unionWith unionValue hm1 hm2 unionValue a _ = a -- Object !Object -- Array !Array -- String !Text -- Number !Scientific -- Bool !Bool -- Null
760
false
true
4
22
225
304
145
159
null
null
pminten/xhaskell
series/series_test.hs
mit
testCase :: String -> Assertion -> Test testCase label assertion = TestLabel label (TestCase assertion)
103
testCase :: String -> Assertion -> Test testCase label assertion = TestLabel label (TestCase assertion)
103
testCase label assertion = TestLabel label (TestCase assertion)
63
false
true
0
8
14
40
18
22
null
null
simonjohnthompson/Interaction
Interaction.hs
mit
{- We can build a state by the parallel application of a number of Interactions. We have parallelism in the sense that the second (and subsequent) Interactions are performed in the initial state. -} par :: Interact a b -> Interact a c -> Interact a (b,c) par inter1 inter2 (input,st) = (rest2,(st1,st2),out1++out2) where (rest1,st1,out1) = inter1 (input,st) (rest2,st2,out2) = inter2 (rest1,st)
580
par :: Interact a b -> Interact a c -> Interact a (b,c) par inter1 inter2 (input,st) = (rest2,(st1,st2),out1++out2) where (rest1,st1,out1) = inter1 (input,st) (rest2,st2,out2) = inter2 (rest1,st)
213
par inter1 inter2 (input,st) = (rest2,(st1,st2),out1++out2) where (rest1,st1,out1) = inter1 (input,st) (rest2,st2,out2) = inter2 (rest1,st)
157
true
true
0
8
247
129
70
59
null
null
purcell/icfpc2015
src/GamePlay.hs
gpl-3.0
isSamePosition :: Unit -> Unit -> Bool isSamePosition = (==) `on` (sort . unitMembers)
86
isSamePosition :: Unit -> Unit -> Bool isSamePosition = (==) `on` (sort . unitMembers)
86
isSamePosition = (==) `on` (sort . unitMembers)
47
false
true
0
7
13
34
20
14
null
null
keera-studios/hsQt
Qtc/Network/QNetworkInterface.hs
bsd-2-clause
qNetworkInterfaceAllInterfaces :: (()) -> IO ([QNetworkInterface ()]) qNetworkInterfaceAllInterfaces () = withQListObjectRefResult $ \arr -> qtc_QNetworkInterface_allInterfaces arr
186
qNetworkInterfaceAllInterfaces :: (()) -> IO ([QNetworkInterface ()]) qNetworkInterfaceAllInterfaces () = withQListObjectRefResult $ \arr -> qtc_QNetworkInterface_allInterfaces arr
186
qNetworkInterfaceAllInterfaces () = withQListObjectRefResult $ \arr -> qtc_QNetworkInterface_allInterfaces arr
116
false
true
0
10
21
51
26
25
null
null
BerndSchwarzenbacher/cis194-solutions
06-lazy/Lecture.hs
mit
f1 :: Maybe a -> [Maybe a] f1 m = [m,m]
39
f1 :: Maybe a -> [Maybe a] f1 m = [m,m]
39
f1 m = [m,m]
12
false
true
0
7
10
33
17
16
null
null
wxwxwwxxx/ghc
compiler/utils/Outputable.hs
bsd-3-clause
primWordSuffix = text "##"
28
primWordSuffix = text "##"
28
primWordSuffix = text "##"
28
false
false
1
5
5
13
4
9
null
null
aldld/hasp
src/Tokenizer.hs
bsd-3-clause
genTokenSeq True acc token (curChar:nextInput) | curChar == '"' = endString acc token curChar nextInput | otherwise = appendChar True acc token curChar nextInput
174
genTokenSeq True acc token (curChar:nextInput) | curChar == '"' = endString acc token curChar nextInput | otherwise = appendChar True acc token curChar nextInput
174
genTokenSeq True acc token (curChar:nextInput) | curChar == '"' = endString acc token curChar nextInput | otherwise = appendChar True acc token curChar nextInput
174
false
false
0
8
36
61
28
33
null
null
tkasu/haskellbook-adventure
app/Cipher.hs
bsd-3-clause
applyTimes :: Integer -> (a -> a) -> a -> a applyTimes 0 f x = x
64
applyTimes :: Integer -> (a -> a) -> a -> a applyTimes 0 f x = x
64
applyTimes 0 f x = x
20
false
true
0
9
16
43
20
23
null
null
bitc/instantrun
src/Buffer.hs
mit
destroyBufferState :: BufferState -> IO () destroyBufferState buffers = do bufs <- atomically $ do writeTVar (needed buffers) [] m <- readTVar (ready buffers) writeTVar (ready buffers) M.empty return $ concat $ map snd (M.elems m) mapM_ destroy bufs
289
destroyBufferState :: BufferState -> IO () destroyBufferState buffers = do bufs <- atomically $ do writeTVar (needed buffers) [] m <- readTVar (ready buffers) writeTVar (ready buffers) M.empty return $ concat $ map snd (M.elems m) mapM_ destroy bufs
289
destroyBufferState buffers = do bufs <- atomically $ do writeTVar (needed buffers) [] m <- readTVar (ready buffers) writeTVar (ready buffers) M.empty return $ concat $ map snd (M.elems m) mapM_ destroy bufs
246
false
true
0
15
78
114
51
63
null
null
kim/amazonka
amazonka-s3/gen/Network/AWS/S3/CopyObject.hs
mpl-2.0
coRequestPayer :: Lens' CopyObject (Maybe RequestPayer) coRequestPayer = lens _coRequestPayer (\s a -> s { _coRequestPayer = a })
129
coRequestPayer :: Lens' CopyObject (Maybe RequestPayer) coRequestPayer = lens _coRequestPayer (\s a -> s { _coRequestPayer = a })
129
coRequestPayer = lens _coRequestPayer (\s a -> s { _coRequestPayer = a })
73
false
true
0
9
18
45
24
21
null
null
GaloisInc/halvm-ghc
compiler/simplCore/CoreMonad.hs
bsd-3-clause
{- ************************************************************************ * * Counting and logging * * ************************************************************************ -} verboseSimplStats :: Bool verboseSimplStats = opt_PprStyle_Debug
397
verboseSimplStats :: Bool verboseSimplStats = opt_PprStyle_Debug
64
verboseSimplStats = opt_PprStyle_Debug
38
true
true
0
6
168
19
8
11
null
null
UBMLtonGroup/timberc
src/Common.hs
bsd-3-clause
internalError0 mess = throw (Panic mess)
52
internalError0 mess = throw (Panic mess)
52
internalError0 mess = throw (Panic mess)
52
false
false
0
7
17
18
8
10
null
null
seereason/cabal
cabal-install/Distribution/Client/Setup.hs
bsd-3-clause
sdistCommand :: CommandUI (SDistFlags, SDistExFlags) sdistCommand = Cabal.sdistCommand { commandDefaultFlags = (commandDefaultFlags Cabal.sdistCommand, defaultSDistExFlags), commandOptions = \showOrParseArgs -> liftOptions fst setFst (commandOptions Cabal.sdistCommand showOrParseArgs) ++ liftOptions snd setSnd sdistExOptions } where setFst a (_,b) = (a,b) setSnd b (a,_) = (a,b) sdistExOptions = [option [] ["archive-format"] "archive-format" sDistFormat (\v flags -> flags { sDistFormat = v }) (choiceOpt [ (Flag TargzFormat, ([], ["targz"]), "Produce a '.tar.gz' format archive (default and required for uploading to hackage)") , (Flag ZipFormat, ([], ["zip"]), "Produce a '.zip' format archive") ]) ]
852
sdistCommand :: CommandUI (SDistFlags, SDistExFlags) sdistCommand = Cabal.sdistCommand { commandDefaultFlags = (commandDefaultFlags Cabal.sdistCommand, defaultSDistExFlags), commandOptions = \showOrParseArgs -> liftOptions fst setFst (commandOptions Cabal.sdistCommand showOrParseArgs) ++ liftOptions snd setSnd sdistExOptions } where setFst a (_,b) = (a,b) setSnd b (a,_) = (a,b) sdistExOptions = [option [] ["archive-format"] "archive-format" sDistFormat (\v flags -> flags { sDistFormat = v }) (choiceOpt [ (Flag TargzFormat, ([], ["targz"]), "Produce a '.tar.gz' format archive (default and required for uploading to hackage)") , (Flag ZipFormat, ([], ["zip"]), "Produce a '.zip' format archive") ]) ]
852
sdistCommand = Cabal.sdistCommand { commandDefaultFlags = (commandDefaultFlags Cabal.sdistCommand, defaultSDistExFlags), commandOptions = \showOrParseArgs -> liftOptions fst setFst (commandOptions Cabal.sdistCommand showOrParseArgs) ++ liftOptions snd setSnd sdistExOptions } where setFst a (_,b) = (a,b) setSnd b (a,_) = (a,b) sdistExOptions = [option [] ["archive-format"] "archive-format" sDistFormat (\v flags -> flags { sDistFormat = v }) (choiceOpt [ (Flag TargzFormat, ([], ["targz"]), "Produce a '.tar.gz' format archive (default and required for uploading to hackage)") , (Flag ZipFormat, ([], ["zip"]), "Produce a '.zip' format archive") ]) ]
799
false
true
1
13
233
245
132
113
null
null
micxjo/range-set
src/Data/RangeSet.hs
bsd-3-clause
isSingleton _ = False
21
isSingleton _ = False
21
isSingleton _ = False
21
false
false
0
4
3
10
4
6
null
null
beni55/haste-compiler
libraries/haste-lib/src/Haste/JSON.hs
bsd-3-clause
_jsJSONParse :: JSString -> IO JSAny _jsJSONParse = ffi "JSON.parse"
68
_jsJSONParse :: JSString -> IO JSAny _jsJSONParse = ffi "JSON.parse"
68
_jsJSONParse = ffi "JSON.parse"
31
false
true
0
6
9
21
10
11
null
null
flannelhead/ConnectFour
ConnectFour.hs
gpl-3.0
coordsToMask :: BoardSize -> [(Int, Int)] -> Word64 coordsToMask bSize coords = foldl' setBit 0 $ boardIndex bSize <$> coords
125
coordsToMask :: BoardSize -> [(Int, Int)] -> Word64 coordsToMask bSize coords = foldl' setBit 0 $ boardIndex bSize <$> coords
125
coordsToMask bSize coords = foldl' setBit 0 $ boardIndex bSize <$> coords
73
false
true
0
8
19
54
26
28
null
null
GaloisInc/ivory
ivory-examples/examples/AddrOfRegression.hs
bsd-3-clause
test1 :: ModuleDef test1 = do defMemArea param_info_area incl t1 where param_info_area :: MemArea ('Array 512 ('Struct "param_info")) param_info_area = area "g_param_info" Nothing param_info_ref :: Ref 'Global ('Array 512 ('Struct "param_info")) param_info_ref = addrOf param_info_area t1 :: Def ('[] ':-> ()) t1 = proc "t1" $ body $ do arrayMap $ \ix -> store ((param_info_ref ! ix) ~> param_requested) 1
435
test1 :: ModuleDef test1 = do defMemArea param_info_area incl t1 where param_info_area :: MemArea ('Array 512 ('Struct "param_info")) param_info_area = area "g_param_info" Nothing param_info_ref :: Ref 'Global ('Array 512 ('Struct "param_info")) param_info_ref = addrOf param_info_area t1 :: Def ('[] ':-> ()) t1 = proc "t1" $ body $ do arrayMap $ \ix -> store ((param_info_ref ! ix) ~> param_requested) 1
435
test1 = do defMemArea param_info_area incl t1 where param_info_area :: MemArea ('Array 512 ('Struct "param_info")) param_info_area = area "g_param_info" Nothing param_info_ref :: Ref 'Global ('Array 512 ('Struct "param_info")) param_info_ref = addrOf param_info_area t1 :: Def ('[] ':-> ()) t1 = proc "t1" $ body $ do arrayMap $ \ix -> store ((param_info_ref ! ix) ~> param_requested) 1
416
false
true
0
15
89
182
86
96
null
null
f1u77y/xmonad-contrib
XMonad/Config/Xfce.hs
bsd-3-clause
-- $usage -- To use this module, start with the following @~\/.xmonad\/xmonad.hs@: -- -- > import XMonad -- > import XMonad.Config.Xfce -- > -- > main = xmonad xfceConfig -- -- For examples of how to further customize @xfceConfig@ see "XMonad.Config.Desktop". xfceConfig = desktopConfig { terminal = "Terminal" , keys = xfceKeys <+> keys desktopConfig }
366
xfceConfig = desktopConfig { terminal = "Terminal" , keys = xfceKeys <+> keys desktopConfig }
105
xfceConfig = desktopConfig { terminal = "Terminal" , keys = xfceKeys <+> keys desktopConfig }
105
true
false
0
9
68
40
25
15
null
null
nushio3/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
-- Class Read readClassName :: Name readClassName = clsQual gHC_READ (fsLit "Read") readClassKey
103
readClassName :: Name readClassName = clsQual gHC_READ (fsLit "Read") readClassKey
89
readClassName = clsQual gHC_READ (fsLit "Read") readClassKey
67
true
true
0
7
19
31
14
17
null
null
siddhanathan/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
uIntTyConName = tcQual gHC_GENERICS (fsLit "UInt") uIntTyConKey
68
uIntTyConName = tcQual gHC_GENERICS (fsLit "UInt") uIntTyConKey
68
uIntTyConName = tcQual gHC_GENERICS (fsLit "UInt") uIntTyConKey
68
false
false
0
7
11
19
9
10
null
null
fffej/HS-Poker
LookupPatternMatch.hs
bsd-3-clause
getValueFromProduct 152438 = 4914
33
getValueFromProduct 152438 = 4914
33
getValueFromProduct 152438 = 4914
33
false
false
0
5
3
9
4
5
null
null
ambiata/zodiac
zodiac-http-client/src/Zodiac/HttpClient/Error.hs
bsd-3-clause
renderRequestError (HeaderNameInvalidUTF8 bs) = T.unwords [ "header name not valid UTF-8:" , T.pack (show bs) ]
119
renderRequestError (HeaderNameInvalidUTF8 bs) = T.unwords [ "header name not valid UTF-8:" , T.pack (show bs) ]
119
renderRequestError (HeaderNameInvalidUTF8 bs) = T.unwords [ "header name not valid UTF-8:" , T.pack (show bs) ]
119
false
false
0
9
23
38
18
20
null
null
kristoff3r/importify
HLint.hs
mit
warn "Use 'atomicModifyIORef'' from Universum" = Data.IORef.atomicModifyIORef' ==> Universum.atomicModifyIORef'
115
warn "Use 'atomicModifyIORef'' from Universum" = Data.IORef.atomicModifyIORef' ==> Universum.atomicModifyIORef'
115
warn "Use 'atomicModifyIORef'' from Universum" = Data.IORef.atomicModifyIORef' ==> Universum.atomicModifyIORef'
115
false
false
0
6
12
18
9
9
null
null
tamasgal/haskell_exercises
99questions/Problem01.hs
mit
myLast' :: [a] -> a myLast' = foldr1 (const id)
47
myLast' :: [a] -> a myLast' = foldr1 (const id)
47
myLast' = foldr1 (const id)
27
false
true
0
7
9
27
14
13
null
null
kadoban/sgf
Game.hs
agpl-3.0
insertMarks :: (M.Map Point MarkType) -> Property -> (M.Map Point MarkType) insertMarks m (Mark t ps) = foldl' insM m ps where insM = flip (t `ins`) ins = flip M.insert
183
insertMarks :: (M.Map Point MarkType) -> Property -> (M.Map Point MarkType) insertMarks m (Mark t ps) = foldl' insM m ps where insM = flip (t `ins`) ins = flip M.insert
183
insertMarks m (Mark t ps) = foldl' insM m ps where insM = flip (t `ins`) ins = flip M.insert
107
false
true
0
9
45
85
44
41
null
null
UCSD-PL/RefScript
src/Language/Rsc/Errors.hs
bsd-3-clause
bugUnknown l thing x = mkErr l $ text $ printf "BUG: Cannot find '%s' in '%s'" thing (ppshow x)
104
bugUnknown l thing x = mkErr l $ text $ printf "BUG: Cannot find '%s' in '%s'" thing (ppshow x)
104
bugUnknown l thing x = mkErr l $ text $ printf "BUG: Cannot find '%s' in '%s'" thing (ppshow x)
104
false
false
0
8
28
37
17
20
null
null
alios/geojson-types
src/Data/GeoJSON/Intern.hs
bsd-3-clause
toAeson (Bson.JavaScr a) = toJSON . show $ a
44
toAeson (Bson.JavaScr a) = toJSON . show $ a
44
toAeson (Bson.JavaScr a) = toJSON . show $ a
44
false
false
1
7
8
27
12
15
null
null
edsko/cabal
Cabal/src/Distribution/Version.hs
bsd-3-clause
-- | Given a version range, remove the highest upper bound. Example: @(>= 1 && < -- 3) || (>= 4 && < 5)@ is converted to @(>= 1 && < 3) || (>= 4)@. removeUpperBound :: VersionRange -> VersionRange removeUpperBound = fromVersionIntervals . relaxLastInterval . toVersionIntervals where relaxLastInterval (VersionIntervals intervals) = VersionIntervals (relaxLastInterval' intervals) relaxLastInterval' [] = [] relaxLastInterval' [(l,_)] = [(l, NoUpperBound)] relaxLastInterval' (i:is) = i : relaxLastInterval' is -- | Fold over the basic syntactic structure of a 'VersionRange'. -- -- This provides a syntactic view of the expression defining the version range. -- The syntactic sugar @\">= v\"@, @\"<= v\"@ and @\"== v.*\"@ is presented -- in terms of the other basic syntax. -- -- For a semantic view use 'asVersionIntervals'. --
861
removeUpperBound :: VersionRange -> VersionRange removeUpperBound = fromVersionIntervals . relaxLastInterval . toVersionIntervals where relaxLastInterval (VersionIntervals intervals) = VersionIntervals (relaxLastInterval' intervals) relaxLastInterval' [] = [] relaxLastInterval' [(l,_)] = [(l, NoUpperBound)] relaxLastInterval' (i:is) = i : relaxLastInterval' is -- | Fold over the basic syntactic structure of a 'VersionRange'. -- -- This provides a syntactic view of the expression defining the version range. -- The syntactic sugar @\">= v\"@, @\"<= v\"@ and @\"== v.*\"@ is presented -- in terms of the other basic syntax. -- -- For a semantic view use 'asVersionIntervals'. --
713
removeUpperBound = fromVersionIntervals . relaxLastInterval . toVersionIntervals where relaxLastInterval (VersionIntervals intervals) = VersionIntervals (relaxLastInterval' intervals) relaxLastInterval' [] = [] relaxLastInterval' [(l,_)] = [(l, NoUpperBound)] relaxLastInterval' (i:is) = i : relaxLastInterval' is -- | Fold over the basic syntactic structure of a 'VersionRange'. -- -- This provides a syntactic view of the expression defining the version range. -- The syntactic sugar @\">= v\"@, @\"<= v\"@ and @\"== v.*\"@ is presented -- in terms of the other basic syntax. -- -- For a semantic view use 'asVersionIntervals'. --
664
true
true
3
8
157
118
67
51
null
null
orblivion/random-chain
Main.hs
mit
addState' :: StateTree -> [Token] -> Maybe Token -> StateTree addState' (StateLeaf nextTokenCounts) [] mbNextStateToken = StateLeaf (newNextTokenCounts mbNextStateToken) where newNextTokenCounts Nothing = nextTokenCounts newNextTokenCounts (Just nextStateToken) = DataMap.insert nextStateToken (oldCount + 1) nextTokenCounts where oldCount = Maybe.fromMaybe 0 $ DataMap.lookup nextStateToken nextTokenCounts
503
addState' :: StateTree -> [Token] -> Maybe Token -> StateTree addState' (StateLeaf nextTokenCounts) [] mbNextStateToken = StateLeaf (newNextTokenCounts mbNextStateToken) where newNextTokenCounts Nothing = nextTokenCounts newNextTokenCounts (Just nextStateToken) = DataMap.insert nextStateToken (oldCount + 1) nextTokenCounts where oldCount = Maybe.fromMaybe 0 $ DataMap.lookup nextStateToken nextTokenCounts
503
addState' (StateLeaf nextTokenCounts) [] mbNextStateToken = StateLeaf (newNextTokenCounts mbNextStateToken) where newNextTokenCounts Nothing = nextTokenCounts newNextTokenCounts (Just nextStateToken) = DataMap.insert nextStateToken (oldCount + 1) nextTokenCounts where oldCount = Maybe.fromMaybe 0 $ DataMap.lookup nextStateToken nextTokenCounts
441
false
true
0
11
138
116
57
59
null
null
mzini/qlogic
Qlogic/SatSolver.hs
gpl-3.0
fmToClause fm@(A _) = do al <- plit fm return $ Just $ Clause [al]
97
fmToClause fm@(A _) = do al <- plit fm return $ Just $ Clause [al]
97
fmToClause fm@(A _) = do al <- plit fm return $ Just $ Clause [al]
97
false
false
0
9
45
45
21
24
null
null
grandpascorpion/canon
Math/NumberTheory/Internals.hs
gpl-3.0
zeroDivZeroError = "Zero divided by zero is undefined!"
55
zeroDivZeroError = "Zero divided by zero is undefined!"
55
zeroDivZeroError = "Zero divided by zero is undefined!"
55
false
false
1
5
7
10
3
7
null
null
bitemyapp/ghc
compiler/typecheck/TcPluginM.hs
bsd-3-clause
tcLookupGlobal :: Name -> TcPluginM TyThing tcLookupGlobal = unsafeTcPluginTcM . TcEnv.tcLookupGlobal
101
tcLookupGlobal :: Name -> TcPluginM TyThing tcLookupGlobal = unsafeTcPluginTcM . TcEnv.tcLookupGlobal
101
tcLookupGlobal = unsafeTcPluginTcM . TcEnv.tcLookupGlobal
57
false
true
0
7
10
30
13
17
null
null
dmort27/NetSPE
Derivation.hs
bsd-3-clause
errorMessage = "<p class='error'>Error in input!</p>"
53
errorMessage = "<p class='error'>Error in input!</p>"
53
errorMessage = "<p class='error'>Error in input!</p>"
53
false
false
0
4
5
6
3
3
null
null
TOSPIO/yi
src/library/Yi/Buffer/TextUnit.hs
gpl-2.0
enclosingUnit _ = Document
26
enclosingUnit _ = Document
26
enclosingUnit _ = Document
26
false
false
0
5
3
9
4
5
null
null
llelf/acme-lolcat
Acme/LOLCAT.hs
bsd-3-clause
wordEnd = notFollowedBy letter
30
wordEnd = notFollowedBy letter
30
wordEnd = notFollowedBy letter
30
false
false
1
5
3
12
4
8
null
null