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
kim/amazonka
amazonka-redshift/gen/Network/AWS/Redshift/Types.hs
mpl-2.0
-- | The list of tags for the HSM client certificate. hccTags :: Lens' HsmClientCertificate [Tag] hccTags = lens _hccTags (\s a -> s { _hccTags = a }) . _List
158
hccTags :: Lens' HsmClientCertificate [Tag] hccTags = lens _hccTags (\s a -> s { _hccTags = a }) . _List
104
hccTags = lens _hccTags (\s a -> s { _hccTags = a }) . _List
60
true
true
0
10
30
47
26
21
null
null
urbanslug/ghc
compiler/typecheck/TcEvidence.hs
bsd-3-clause
ppr_co _ (TcCoVarCo cv) = parenSymOcc (getOccName cv) (ppr cv)
71
ppr_co _ (TcCoVarCo cv) = parenSymOcc (getOccName cv) (ppr cv)
71
ppr_co _ (TcCoVarCo cv) = parenSymOcc (getOccName cv) (ppr cv)
71
false
false
0
7
18
34
16
18
null
null
beni55/text
tests/Tests/Properties.hs
bsd-2-clause
tb_decimal_integer_big (Big a) = tb_decimal a
45
tb_decimal_integer_big (Big a) = tb_decimal a
45
tb_decimal_integer_big (Big a) = tb_decimal a
45
false
false
0
7
5
18
8
10
null
null
bixuanzju/fcore
lib/BaseTransCFJava.hs
bsd-2-clause
-- needed getTupleClassName :: [a] -> String getTupleClassName tuple = if lengthOfTuple > 50 then panic "The length of tuple is too long (>50)!" else namespace ++ "tuples.Tuple" ++ show lengthOfTuple where lengthOfTuple = length tuple
248
getTupleClassName :: [a] -> String getTupleClassName tuple = if lengthOfTuple > 50 then panic "The length of tuple is too long (>50)!" else namespace ++ "tuples.Tuple" ++ show lengthOfTuple where lengthOfTuple = length tuple
238
getTupleClassName tuple = if lengthOfTuple > 50 then panic "The length of tuple is too long (>50)!" else namespace ++ "tuples.Tuple" ++ show lengthOfTuple where lengthOfTuple = length tuple
203
true
true
0
7
49
59
30
29
null
null
psibi/persistent
persistent-sqlite/Database/Sqlite.hs
mit
changes :: Connection -> IO Int64 changes (Connection _ c) = fmap fromIntegral $ changesC c
91
changes :: Connection -> IO Int64 changes (Connection _ c) = fmap fromIntegral $ changesC c
91
changes (Connection _ c) = fmap fromIntegral $ changesC c
57
false
true
2
9
15
44
19
25
null
null
green-haskell/ghc
compiler/typecheck/TcType.hs
bsd-3-clause
pprTcTyVarDetails (SkolemTv False) = ptext (sLit "sk")
54
pprTcTyVarDetails (SkolemTv False) = ptext (sLit "sk")
54
pprTcTyVarDetails (SkolemTv False) = ptext (sLit "sk")
54
false
false
0
7
6
24
11
13
null
null
sapek/pandoc
src/Text/Pandoc/Writers/Custom.hs
gpl-2.0
inlineToCustom lua (SmallCaps lst) = callfunc lua "SmallCaps" lst
65
inlineToCustom lua (SmallCaps lst) = callfunc lua "SmallCaps" lst
65
inlineToCustom lua (SmallCaps lst) = callfunc lua "SmallCaps" lst
65
false
false
0
6
8
26
11
15
null
null
tcsc/ffs
src/Ffs.hs
mit
wreqConfig :: Credentials -> FfsOptions -> Wreq.Options wreqConfig (username, password) args = let insecureTlsSettings = TLSSettingsSimple True False False managerSettings = mkManagerSettings insecureTlsSettings Nothing uid = encodeUtf8 username pwd = encodeUtf8 password opts = defaults & auth...
435
wreqConfig :: Credentials -> FfsOptions -> Wreq.Options wreqConfig (username, password) args = let insecureTlsSettings = TLSSettingsSimple True False False managerSettings = mkManagerSettings insecureTlsSettings Nothing uid = encodeUtf8 username pwd = encodeUtf8 password opts = defaults & auth...
435
wreqConfig (username, password) args = let insecureTlsSettings = TLSSettingsSimple True False False managerSettings = mkManagerSettings insecureTlsSettings Nothing uid = encodeUtf8 username pwd = encodeUtf8 password opts = defaults & auth ?~ basicAuth uid pwd in if args^.optUseInsecureTLS ...
379
false
true
0
10
88
123
60
63
null
null
gridaphobe/ghc
compiler/basicTypes/VarEnv.hs
bsd-3-clause
zipVarEnv tyvars tys = mkVarEnv (zipEqual "zipVarEnv" tyvars tys)
67
zipVarEnv tyvars tys = mkVarEnv (zipEqual "zipVarEnv" tyvars tys)
67
zipVarEnv tyvars tys = mkVarEnv (zipEqual "zipVarEnv" tyvars tys)
67
false
false
0
7
10
24
11
13
null
null
tolysz/prepare-ghcjs
spec-lts8/base/GHC/IO/Handle.hs
bsd-3-clause
hShow h@(DuplexHandle path _ _) = showHandle' path True h
57
hShow h@(DuplexHandle path _ _) = showHandle' path True h
57
hShow h@(DuplexHandle path _ _) = showHandle' path True h
57
false
false
1
8
9
33
14
19
null
null
sighingnow/sighingnow.github.io
resource/notes_on_combinatory_logic/ski.hs
mit
eval :: SKI -> Either String SKI eval S = return S
51
eval :: SKI -> Either String SKI eval S = return S
50
eval S = return S
17
false
true
0
6
12
26
12
14
null
null
osa1/Idris-dev
src/IRTS/CodegenC.hs
bsd-3-clause
carith t = error "Can't happen: Not an exportable arithmetic type"
66
carith t = error "Can't happen: Not an exportable arithmetic type"
66
carith t = error "Can't happen: Not an exportable arithmetic type"
66
false
false
0
5
10
12
5
7
null
null
edsko/hackage-server
Distribution/Server/Framework/Resource.hs
bsd-3-clause
serverTreeEmpty :: ServerTree a serverTreeEmpty = ServerTree Nothing Map.empty
78
serverTreeEmpty :: ServerTree a serverTreeEmpty = ServerTree Nothing Map.empty
78
serverTreeEmpty = ServerTree Nothing Map.empty
46
false
true
0
6
8
21
10
11
null
null
Slava/6.035-decaf-compiler
src/LLIR.hs
mit
opCount (VArrayStore _ _ _ _) = 3
33
opCount (VArrayStore _ _ _ _) = 3
33
opCount (VArrayStore _ _ _ _) = 3
33
false
false
0
6
7
22
10
12
null
null
ganeti/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
nvGlusterStoragePath :: String nvGlusterStoragePath = "gluster-storage-path"
76
nvGlusterStoragePath :: String nvGlusterStoragePath = "gluster-storage-path"
76
nvGlusterStoragePath = "gluster-storage-path"
45
false
true
0
4
5
11
6
5
null
null
iljakuklic/eel-proto
src/Parser/Core.hs
bsd-3-clause
-- string token pstok = ptok . string
37
pstok = ptok . string
21
pstok = ptok . string
21
true
false
2
5
7
16
6
10
null
null
lamdu/lamdu
src/Lamdu/Data/Tag.hs
gpl-3.0
getTagName :: (Has LangId env, Has Dir.Layout env) => env -> Tag -> (IsOperator, TextsInLang) getTagName env tag = case tag ^. tagSymbol of NoSymbol -> (NotAnOperator, n) UniversalSymbol x -> (IsAnOperator, TextsInLang x Nothing Nothing) DirectionalSymbol (DirOp l r) -> case env ^. has o...
783
getTagName :: (Has LangId env, Has Dir.Layout env) => env -> Tag -> (IsOperator, TextsInLang) getTagName env tag = case tag ^. tagSymbol of NoSymbol -> (NotAnOperator, n) UniversalSymbol x -> (IsAnOperator, TextsInLang x Nothing Nothing) DirectionalSymbol (DirOp l r) -> case env ^. has o...
783
getTagName env tag = case tag ^. tagSymbol of NoSymbol -> (NotAnOperator, n) UniversalSymbol x -> (IsAnOperator, TextsInLang x Nothing Nothing) DirectionalSymbol (DirOp l r) -> case env ^. has of LeftToRight -> l RightToLeft -> r & opOrName where opOrName x ...
681
false
true
8
11
249
268
132
136
null
null
jstolarek/slicer
lib/Language/Slicer/Parser.hs
gpl-3.0
equals :: CharParser st () equals = reservedOp token_ "="
57
equals :: CharParser st () equals = reservedOp token_ "="
57
equals = reservedOp token_ "="
30
false
true
0
7
9
30
12
18
null
null
termite2/synthesis
Synthesis/BddUtil.hs
bsd-3-clause
orDeref :: Ops s u -> DDNode s u -> DDNode s u -> ST s (DDNode s u) orDeref Ops{..} x y = do res <- x .| y mapM deref [x, y] return res
147
orDeref :: Ops s u -> DDNode s u -> DDNode s u -> ST s (DDNode s u) orDeref Ops{..} x y = do res <- x .| y mapM deref [x, y] return res
147
orDeref Ops{..} x y = do res <- x .| y mapM deref [x, y] return res
79
false
true
0
10
47
95
44
51
null
null
banacorn/mini-pascal
test/Helper.hs
mit
(=@) :: Assertion -> Framework.TestName -> Framework.Test s =@ m = testCase m s
79
(=@) :: Assertion -> Framework.TestName -> Framework.Test s =@ m = testCase m s
79
s =@ m = testCase m s
21
false
true
0
10
13
37
18
19
null
null
bgamari/text
tests/Tests/Properties.hs
bsd-2-clause
tb_hexadecimal_int8 (a::Int8) = tb_hex a
40
tb_hexadecimal_int8 (a::Int8) = tb_hex a
40
tb_hexadecimal_int8 (a::Int8) = tb_hex a
40
false
false
0
7
4
19
9
10
null
null
ekmett/sig-tool
src/Sig/Sign.hs
bsd-3-clause
signPackage :: PackageIdentifier -> FilePath -> IO () signPackage pkg filePath = do sig@(Signature signature) <- GPG.sign filePath let (PackageName name) = pkgName pkg version = showVersion (pkgVersion pkg) fingerprint <- GPG.fingerprintFromVerify sig filePath req <- parseUrl ("h...
822
signPackage :: PackageIdentifier -> FilePath -> IO () signPackage pkg filePath = do sig@(Signature signature) <- GPG.sign filePath let (PackageName name) = pkgName pkg version = showVersion (pkgVersion pkg) fingerprint <- GPG.fingerprintFromVerify sig filePath req <- parseUrl ("h...
822
signPackage pkg filePath = do sig@(Signature signature) <- GPG.sign filePath let (PackageName name) = pkgName pkg version = showVersion (pkgVersion pkg) fingerprint <- GPG.fingerprintFromVerify sig filePath req <- parseUrl ("http://sig-service-elb-vpc-e1757b84-1712462868.us-east-...
768
false
true
0
14
231
215
102
113
null
null
wavewave/lhc-analysis-collection
exe/2013-07-03-XQLD.hs
gpl-3.0
p_2sq_no_2l2j2x :: DCross p_2sq_no_2l2j2x = x (t proton, t proton, [p_sdownR, p_othersq])
90
p_2sq_no_2l2j2x :: DCross p_2sq_no_2l2j2x = x (t proton, t proton, [p_sdownR, p_othersq])
89
p_2sq_no_2l2j2x = x (t proton, t proton, [p_sdownR, p_othersq])
63
false
true
0
7
12
35
19
16
null
null
ImsungChoi/haskell-test
src/HW03.hs
bsd-3-clause
evalE _ (Val x) = x
25
evalE _ (Val x) = x
25
evalE _ (Val x) = x
25
false
false
1
6
11
20
8
12
null
null
josefs/autosar
oldARSim/ARXML.hs
bsd-3-clause
toBindingTime "CODE-GENERATION-TIME" = CodeGenerationTime
57
toBindingTime "CODE-GENERATION-TIME" = CodeGenerationTime
57
toBindingTime "CODE-GENERATION-TIME" = CodeGenerationTime
57
false
false
0
5
3
9
4
5
null
null
mcschroeder/ghc
compiler/main/DynFlags.hs
bsd-3-clause
addImportPath p = upd (\s -> s{importPaths = importPaths s ++ splitPathList p})
80
addImportPath p = upd (\s -> s{importPaths = importPaths s ++ splitPathList p})
80
addImportPath p = upd (\s -> s{importPaths = importPaths s ++ splitPathList p})
80
false
false
0
11
13
38
19
19
null
null
timjb/protocol-buffers
hprotoc/Text/ProtocolBuffers/ProtoCompile/Resolve.hs
apache-2.0
getTLS (Global tl tls) = (tl, tls)
34
getTLS (Global tl tls) = (tl, tls)
34
getTLS (Global tl tls) = (tl, tls)
34
false
false
0
7
6
23
12
11
null
null
ganeti/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
luxiKeySuccess :: String luxiKeySuccess = "success"
51
luxiKeySuccess :: String luxiKeySuccess = "success"
51
luxiKeySuccess = "success"
26
false
true
0
4
5
11
6
5
null
null
Paow/encore
src/ir/AST/Desugarer.hs
bsd-3-clause
desugar FunctionCall{emeta, qname = QName{qnlocal = Name "print"} ,args = [arg]} = Print emeta Stdout [StringLiteral emeta "{}", arg]
157
desugar FunctionCall{emeta, qname = QName{qnlocal = Name "print"} ,args = [arg]} = Print emeta Stdout [StringLiteral emeta "{}", arg]
157
desugar FunctionCall{emeta, qname = QName{qnlocal = Name "print"} ,args = [arg]} = Print emeta Stdout [StringLiteral emeta "{}", arg]
157
false
false
0
12
42
60
32
28
null
null
flipstone/kioku
src/Database/Kioku/Internal/TrieIndex.hs
mit
trieLookupMany :: [BS.ByteString] -> TrieIndex -> [Int] trieLookupMany [] _ = []
80
trieLookupMany :: [BS.ByteString] -> TrieIndex -> [Int] trieLookupMany [] _ = []
80
trieLookupMany [] _ = []
24
false
true
0
7
11
36
19
17
null
null
vivekmallick/bugreport
buggy.hs
gpl-3.0
updateLongDescIO :: BugList -> Integer -> String -> IO BugList updateLongDescIO b n s = do decodeIntoFile (searchLDescStr b n) tempfile callCommand ((setEditor s) ++ " " ++ tempfile) updatedContents <- readFile tempfile removeFile tempfile return (updateLongDescInfo b n (encodeString updatedContents...
322
updateLongDescIO :: BugList -> Integer -> String -> IO BugList updateLongDescIO b n s = do decodeIntoFile (searchLDescStr b n) tempfile callCommand ((setEditor s) ++ " " ++ tempfile) updatedContents <- readFile tempfile removeFile tempfile return (updateLongDescInfo b n (encodeString updatedContents...
322
updateLongDescIO b n s = do decodeIntoFile (searchLDescStr b n) tempfile callCommand ((setEditor s) ++ " " ++ tempfile) updatedContents <- readFile tempfile removeFile tempfile return (updateLongDescInfo b n (encodeString updatedContents))
259
false
true
0
12
60
110
50
60
null
null
andorp/grin
grin/src/Grin/Syntax.hs
bsd-3-clause
_AltCPat _ other = pure other
33
_AltCPat _ other = pure other
33
_AltCPat _ other = pure other
33
false
false
0
5
9
14
6
8
null
null
Helkafen/haddock
haddock-api/src/Haddock/Backends/Hyperlinker/Renderer.hs
bsd-2-clause
internalHyperlink :: GHC.Name -> Html -> Html internalHyperlink name content = Html.anchor content ! [ Html.href $ "#" ++ internalAnchorIdent name ]
152
internalHyperlink :: GHC.Name -> Html -> Html internalHyperlink name content = Html.anchor content ! [ Html.href $ "#" ++ internalAnchorIdent name ]
152
internalHyperlink name content = Html.anchor content ! [ Html.href $ "#" ++ internalAnchorIdent name ]
106
false
true
0
9
25
51
25
26
null
null
rueshyna/gogol
gogol-genomics/gen/Network/Google/Resource/Genomics/VariantSets/Patch.hs
mpl-2.0
-- | Creates a value of 'VariantSetsPatch' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'vspXgafv' -- -- * 'vspUploadProtocol' -- -- * 'vspUpdateMask' -- -- * 'vspPp' -- -- * 'vspVariantSetId' -- -- * 'vspAccessToken' -- -- * 'vspUp...
899
variantSetsPatch :: Text -- ^ 'vspVariantSetId' -> VariantSet -- ^ 'vspPayload' -> VariantSetsPatch variantSetsPatch pVspVariantSetId_ pVspPayload_ = VariantSetsPatch' { _vspXgafv = Nothing , _vspUploadProtocol = Nothing , _vspUpdateMask = Nothing , _vspPp = True , _vspVariantSetId =...
501
variantSetsPatch pVspVariantSetId_ pVspPayload_ = VariantSetsPatch' { _vspXgafv = Nothing , _vspUploadProtocol = Nothing , _vspUpdateMask = Nothing , _vspPp = True , _vspVariantSetId = pVspVariantSetId_ , _vspAccessToken = Nothing , _vspUploadType = Nothing , _vspPayload = pVspPayloa...
389
true
true
0
8
188
120
80
40
null
null
ianthehenry/tales
Main.hs
mit
dispatch _ ("steal", _) = (SameBook, "No; I took stealing out because it was unnecessarily complicated.")
112
dispatch _ ("steal", _) = (SameBook, "No; I took stealing out because it was unnecessarily complicated.")
112
dispatch _ ("steal", _) = (SameBook, "No; I took stealing out because it was unnecessarily complicated.")
112
false
false
0
6
22
23
13
10
null
null
FranklinChen/hugs98-plus-Sep2006
packages/HaXml/src/Text/XML/HaXml/Html/Parse.hs
bsd-3-clause
posn :: HParser Posn posn = do { x@(p,_) <- next ; reparse [x] ; return p } `onFail` return noPos
127
posn :: HParser Posn posn = do { x@(p,_) <- next ; reparse [x] ; return p } `onFail` return noPos
127
posn = do { x@(p,_) <- next ; reparse [x] ; return p } `onFail` return noPos
106
false
true
1
10
50
61
31
30
null
null
epsilonhalbe/rendezvous
src/Data.hs
mit
editModal :: Html editModal = div ! id "myModal" ! class_ "modal fade" {-! A.style "display: block;"-} {-! class_ "modal fade in"-} ! tabindex "-1" ! ariaLabelledBy "myModalLabel" $ div ! class_ "modal-dialog" $ ...
1,289
editModal :: Html editModal = div ! id "myModal" ! class_ "modal fade" {-! A.style "display: block;"-} {-! class_ "modal fade in"-} ! tabindex "-1" ! ariaLabelledBy "myModalLabel" $ div ! class_ "modal-dialog" $ ...
1,289
editModal = div ! id "myModal" ! class_ "modal fade" {-! A.style "display: block;"-} {-! class_ "modal fade in"-} ! tabindex "-1" ! ariaLabelledBy "myModalLabel" $ div ! class_ "modal-dialog" $ div ! class_...
1,270
false
true
0
18
710
225
99
126
null
null
danr/dotfiles
xmonad/xmonad.hs
unlicense
myNormalBorderColor = base02
29
myNormalBorderColor = base02
29
myNormalBorderColor = base02
29
false
false
0
4
3
6
3
3
null
null
hvr/tar
Codec/Archive/Tar/Index/IntTrie.hs
bsd-3-clause
word32ToEnum :: Enum n => Word32 -> n word32ToEnum = toEnum . fromIntegral
74
word32ToEnum :: Enum n => Word32 -> n word32ToEnum = toEnum . fromIntegral
74
word32ToEnum = toEnum . fromIntegral
36
false
true
0
6
12
26
13
13
null
null
Numberartificial/workflow
haskell-first-principles/src/RW/ch03/BookStore.hs
mit
myLength [] = 0
15
myLength [] = 0
15
myLength [] = 0
15
false
false
1
5
3
15
5
10
null
null
patperry/hs-linear-algebra
tests-old/Matrix.hs
bsd-3-clause
prop_times (MatrixPair (a :: M) b) = colElems (a * b) ~== zipWith (*) (colElems a) (colElems b)
99
prop_times (MatrixPair (a :: M) b) = colElems (a * b) ~== zipWith (*) (colElems a) (colElems b)
99
prop_times (MatrixPair (a :: M) b) = colElems (a * b) ~== zipWith (*) (colElems a) (colElems b)
99
false
false
0
8
21
60
30
30
null
null
benkolera/haskell-ldap-classy
LDAP/Classy.hs
mit
modifyEntry :: (CanLdap m c e, AsLdapError e,ToLdapEntry a) => a -> m () modifyEntry a = modify (toLdapDn a) . L.list2ldm LdapModReplace . toLdapAttrs $ a
156
modifyEntry :: (CanLdap m c e, AsLdapError e,ToLdapEntry a) => a -> m () modifyEntry a = modify (toLdapDn a) . L.list2ldm LdapModReplace . toLdapAttrs $ a
156
modifyEntry a = modify (toLdapDn a) . L.list2ldm LdapModReplace . toLdapAttrs $ a
83
false
true
0
9
28
79
37
42
null
null
laurencer/confluence-sync
test/Spec.hs
bsd-3-clause
titleCaseTests :: (ApiCall Page -> IO Page) -> String -> String -> IO () titleCaseTests call spaceKey syncRoot = hspec $ do describe "Case Preservation" $ do it "a page should be created called My CASE Sensitive Page N...
495
titleCaseTests :: (ApiCall Page -> IO Page) -> String -> String -> IO () titleCaseTests call spaceKey syncRoot = hspec $ do describe "Case Preservation" $ do it "a page should be created called My CASE Sensitive Page N...
495
titleCaseTests call spaceKey syncRoot = hspec $ do describe "Case Preservation" $ do it "a page should be created called My CASE Sensitive Page Name" $ do let expectedTitle = "My CASE Sensitive Page Name" page <- call $ Api.getPageByName spaceKey expectedTitle (pageTitle page) `shouldBe` expecte...
326
false
true
0
17
179
120
54
66
null
null
ygale/wai
warp/Network/Wai/Handler/Warp/MultiMap.hs
mit
top :: Some a -> a top (One x) = x
36
top :: Some a -> a top (One x) = x
36
top (One x) = x
17
false
true
0
9
12
33
14
19
null
null
mstksg/hledger
hledger-lib/Hledger/Read.hs
gpl-3.0
newJournalContent :: IO String newJournalContent = do d <- getCurrentDay return $ printf "; journal created %s by hledger\n" (show d) -- | Read a Journal from the given text trying all readers in turn, or throw an error.
225
newJournalContent :: IO String newJournalContent = do d <- getCurrentDay return $ printf "; journal created %s by hledger\n" (show d) -- | Read a Journal from the given text trying all readers in turn, or throw an error.
225
newJournalContent = do d <- getCurrentDay return $ printf "; journal created %s by hledger\n" (show d) -- | Read a Journal from the given text trying all readers in turn, or throw an error.
194
false
true
0
10
43
40
19
21
null
null
termite2/tsl
Frontend/Grammar.hs
bsd-3-clause
-- exports: all exported parsers must start with removeTabs to get correct position markers litParser = removeTabs *> ((\(ELit _ w s r v) -> (w,s,r,v)) <$> elit True)
174
litParser = removeTabs *> ((\(ELit _ w s r v) -> (w,s,r,v)) <$> elit True)
82
litParser = removeTabs *> ((\(ELit _ w s r v) -> (w,s,r,v)) <$> elit True)
82
true
false
0
11
36
55
31
24
null
null
ku-fpg/kansas-amber
tests/ExprTests/ExprInt8.hs
bsd-3-clause
prop_while :: ArduinoConnection -> Int8 -> Property prop_while c x = monadicIO $ do let local = x remote <- run $ send c $ do v <- whileE (lit (-128::Int8)) (\z -> z <* lit x) (\z -> return $ z + 1) return v assert (local == litEval8 remote)
269
prop_while :: ArduinoConnection -> Int8 -> Property prop_while c x = monadicIO $ do let local = x remote <- run $ send c $ do v <- whileE (lit (-128::Int8)) (\z -> z <* lit x) (\z -> return $ z + 1) return v assert (local == litEval8 remote)
269
prop_while c x = monadicIO $ do let local = x remote <- run $ send c $ do v <- whileE (lit (-128::Int8)) (\z -> z <* lit x) (\z -> return $ z + 1) return v assert (local == litEval8 remote)
217
false
true
0
17
78
136
66
70
null
null
keithodulaigh/Hets
Omega/Export.hs
gpl-2.0
exportSen :: Named Le.Sentence -> Maybe TCElement exportSen SenAttr { senAttr = name , isAxiom = isAx , sentence = (Le.Formula t) } = Just $ TCAxiomOrTheorem (not isAx) name $ toTerm t
194
exportSen :: Named Le.Sentence -> Maybe TCElement exportSen SenAttr { senAttr = name , isAxiom = isAx , sentence = (Le.Formula t) } = Just $ TCAxiomOrTheorem (not isAx) name $ toTerm t
194
exportSen SenAttr { senAttr = name , isAxiom = isAx , sentence = (Le.Formula t) } = Just $ TCAxiomOrTheorem (not isAx) name $ toTerm t
144
false
true
11
11
42
83
39
44
null
null
brendanhay/gamekeeper
src/GameKeeper/Options.hs
mpl-2.0
memoryFlag :: String -> Flag Options memoryFlag = healthFlag "memory" upd where upd o w c = o { optMemory = Health w c }
126
memoryFlag :: String -> Flag Options memoryFlag = healthFlag "memory" upd where upd o w c = o { optMemory = Health w c }
126
memoryFlag = healthFlag "memory" upd where upd o w c = o { optMemory = Health w c }
89
false
true
1
8
30
65
27
38
null
null
jamshidh/ethereum-merkle-patricia-db
src/Blockchain/Database/MerklePatricia/Internal.hs
bsd-3-clause
deleteKey_NodeData _ key1 nd@(ShortcutNodeData key2 (Right _)) = return $ if key1 == key2 then EmptyNodeData else nd
130
deleteKey_NodeData _ key1 nd@(ShortcutNodeData key2 (Right _)) = return $ if key1 == key2 then EmptyNodeData else nd
130
deleteKey_NodeData _ key1 nd@(ShortcutNodeData key2 (Right _)) = return $ if key1 == key2 then EmptyNodeData else nd
130
false
false
0
10
31
46
24
22
null
null
0gajun/mal
haskell/step7_quote.hs
mpl-2.0
eval_ast ast@(MalHashMap lst m) env = do new_hm <- DT.mapM (\x -> (eval x env)) lst return $ MalHashMap new_hm m
120
eval_ast ast@(MalHashMap lst m) env = do new_hm <- DT.mapM (\x -> (eval x env)) lst return $ MalHashMap new_hm m
120
eval_ast ast@(MalHashMap lst m) env = do new_hm <- DT.mapM (\x -> (eval x env)) lst return $ MalHashMap new_hm m
120
false
false
1
13
28
65
31
34
null
null
keera-studios/hsQt
Qtc/Gui/QColor.hs
bsd-2-clause
greenF :: QColor a -> (()) -> IO (Double) greenF x0 () = withDoubleResult $ withObjectPtr x0 $ \cobj_x0 -> qtc_QColor_greenF cobj_x0
142
greenF :: QColor a -> (()) -> IO (Double) greenF x0 () = withDoubleResult $ withObjectPtr x0 $ \cobj_x0 -> qtc_QColor_greenF cobj_x0
142
greenF x0 () = withDoubleResult $ withObjectPtr x0 $ \cobj_x0 -> qtc_QColor_greenF cobj_x0
100
false
true
4
9
31
66
30
36
null
null
urbanslug/ghc
testsuite/tests/module/T414.hs
bsd-3-clause
main = return ()
16
main = return ()
16
main = return ()
16
false
false
1
6
3
15
5
10
null
null
rfranek/duckling
Duckling/Time/NB/Rules.hs
bsd-3-clause
ruleQuarterAfterpastIntegerHourofday :: Rule ruleQuarterAfterpastIntegerHourofday = Rule { name = "quarter after|past <integer> (hour-of-day)" , pattern = [ regex "(et)? ?(kvart)(er)? *over" , Predicate isAnHourOfDay ] , prod = \tokens -> case tokens of (_: Token Time TimeData {TTime.form...
428
ruleQuarterAfterpastIntegerHourofday :: Rule ruleQuarterAfterpastIntegerHourofday = Rule { name = "quarter after|past <integer> (hour-of-day)" , pattern = [ regex "(et)? ?(kvart)(er)? *over" , Predicate isAnHourOfDay ] , prod = \tokens -> case tokens of (_: Token Time TimeData {TTime.form...
428
ruleQuarterAfterpastIntegerHourofday = Rule { name = "quarter after|past <integer> (hour-of-day)" , pattern = [ regex "(et)? ?(kvart)(er)? *over" , Predicate isAnHourOfDay ] , prod = \tokens -> case tokens of (_: Token Time TimeData {TTime.form = Just (TTime.TimeOfDay (Just hours) _)}: ...
383
false
true
0
23
101
125
65
60
null
null
gcampax/ghc
compiler/stranal/DmdAnal.hs
bsd-3-clause
dmdAnalRhs :: TopLevelFlag -> Maybe [Id] -- Just bs <=> recursive, Nothing <=> non-recursive -> AnalEnv -> Id -> CoreExpr -> (StrictSig, DmdEnv, Id, CoreExpr) -- Process the RHS of the binding, add the strictness signature -- to the Id, and augment the environment with the signature ...
2,728
dmdAnalRhs :: TopLevelFlag -> Maybe [Id] -- Just bs <=> recursive, Nothing <=> non-recursive -> AnalEnv -> Id -> CoreExpr -> (StrictSig, DmdEnv, Id, CoreExpr) dmdAnalRhs top_lvl rec_flag env id rhs | Just fn <- unpackTrivial rhs -- See Note [Demand analysis for trivial right-hand...
2,594
dmdAnalRhs top_lvl rec_flag env id rhs | Just fn <- unpackTrivial rhs -- See Note [Demand analysis for trivial right-hand sides] , let fn_str = getStrictness env fn fn_fv | isLocalId fn = unitVarEnv fn topDmd | otherwise = emptyDmdEnv -- Note [Remember to demand the function itsel...
2,399
true
true
2
14
758
516
268
248
null
null
cies/htoml
test/BurntSushi.hs
bsd-3-clause
invalidTomlFiles :: [(FilePath, B.ByteString)] invalidTomlFiles = filter (\(f, _) -> "invalid" `isPrefixOf` f) allFiles
119
invalidTomlFiles :: [(FilePath, B.ByteString)] invalidTomlFiles = filter (\(f, _) -> "invalid" `isPrefixOf` f) allFiles
119
invalidTomlFiles = filter (\(f, _) -> "invalid" `isPrefixOf` f) allFiles
72
false
true
0
8
13
47
28
19
null
null
jameseggers/distSysAssignment3
src/Main.hs
bsd-3-clause
numberOfActiveSockets (sock:socks) runningSockets = do isSockWritable <- isWritable sock if isSockWritable == True then numberOfActiveSockets socks (runningSockets + 1) else numberOfActiveSockets socks runningSockets
228
numberOfActiveSockets (sock:socks) runningSockets = do isSockWritable <- isWritable sock if isSockWritable == True then numberOfActiveSockets socks (runningSockets + 1) else numberOfActiveSockets socks runningSockets
228
numberOfActiveSockets (sock:socks) runningSockets = do isSockWritable <- isWritable sock if isSockWritable == True then numberOfActiveSockets socks (runningSockets + 1) else numberOfActiveSockets socks runningSockets
228
false
false
0
10
34
60
29
31
null
null
fmthoma/ghc
compiler/coreSyn/CoreUtils.hs
bsd-3-clause
stripTicksTopT :: (Tickish Id -> Bool) -> Expr b -> [Tickish Id] stripTicksTopT p = go [] where go ts (Tick t e) | p t = go (t:ts) e go ts _ = ts -- | Completely strip ticks satisfying a predicate from an -- expression. Note this is O(n) in the size of the expression!
294
stripTicksTopT :: (Tickish Id -> Bool) -> Expr b -> [Tickish Id] stripTicksTopT p = go [] where go ts (Tick t e) | p t = go (t:ts) e go ts _ = ts -- | Completely strip ticks satisfying a predicate from an -- expression. Note this is O(n) in the size of the expression!
294
stripTicksTopT p = go [] where go ts (Tick t e) | p t = go (t:ts) e go ts _ = ts -- | Completely strip ticks satisfying a predicate from an -- expression. Note this is O(n) in the size of the expression!
229
false
true
0
10
82
110
49
61
null
null
f1u77y/xmonad-contrib
XMonad/Actions/TreeSelect.hs
bsd-3-clause
drawWinBox :: Window -> Display -> Visual -> Colormap -> GC -> XMonadFont -> (Pixel, Pixel) -> String -> Pixel -> String -> Int -> Int -> Int -> Int -> IO () drawWinBox win display visual colormap gc font (fg, bg) text fg2 text2 x y w h = do -- draw box setForeground display gc bg fillRectangle display win ...
806
drawWinBox :: Window -> Display -> Visual -> Colormap -> GC -> XMonadFont -> (Pixel, Pixel) -> String -> Pixel -> String -> Int -> Int -> Int -> Int -> IO () drawWinBox win display visual colormap gc font (fg, bg) text fg2 text2 x y w h = do -- draw box setForeground display gc bg fillRectangle display win ...
806
drawWinBox win display visual colormap gc font (fg, bg) text fg2 text2 x y w h = do -- draw box setForeground display gc bg fillRectangle display win gc (fromIntegral x) (fromIntegral y) (fromIntegral w) (fromIntegral h) -- dreaw text drawStringXMF display win visual colormap gc font fg (fr...
648
false
true
0
20
211
273
138
135
null
null
PaulGustafson/stringnet
LocalMoves.hs
mit
eplacePlus :: SimpleColoring -> Morphism -> Tree Edge -> Tree Edge -> Tree Edge -> (Tree Edge, Morphism) replacePlus sn m oldSubTree newSubTree bigTree = let (eTree, mTree) = replacePlusH sn m oldSubTree newSubTree bigTree in (eTree, tensorMTree mTree)
259
replacePlus :: SimpleColoring -> Morphism -> Tree Edge -> Tree Edge -> Tree Edge -> (Tree Edge, Morphism) replacePlus sn m oldSubTree newSubTree bigTree = let (eTree, mTree) = replacePlusH sn m oldSubTree newSubTree bigTree in (eTree, tensorMTree mTree)
259
replacePlus sn m oldSubTree newSubTree bigTree = let (eTree, mTree) = replacePlusH sn m oldSubTree newSubTree bigTree in (eTree, tensorMTree mTree)
153
false
true
0
11
45
98
48
50
null
null
mzini/tct-homepage
src/Main.hs
bsd-3-clause
getArgs :: Item SomeSD -> Compiler [Item TcT.SomeArgument] getArgs i = return [ Item (i </+> argName a) a | a <- as ] where as = case itemBody i of {SomeSD (TcT.SD decl) -> TcT.toArgList (TcT.declArgs decl)} -- return . toItem . argsInfo . itemBody where -- argsInfo (SomeSD (TcT.SD decl)) = (TcT.declName decl, ) ...
440
getArgs :: Item SomeSD -> Compiler [Item TcT.SomeArgument] getArgs i = return [ Item (i </+> argName a) a | a <- as ] where as = case itemBody i of {SomeSD (TcT.SD decl) -> TcT.toArgList (TcT.declArgs decl)} -- return . toItem . argsInfo . itemBody where -- argsInfo (SomeSD (TcT.SD decl)) = (TcT.declName decl, ) ...
440
getArgs i = return [ Item (i </+> argName a) a | a <- as ] where as = case itemBody i of {SomeSD (TcT.SD decl) -> TcT.toArgList (TcT.declArgs decl)} -- return . toItem . argsInfo . itemBody where -- argsInfo (SomeSD (TcT.SD decl)) = (TcT.declName decl, ) -- toItem (declName,as) = [Item (fromFilePath (toFilePath...
381
false
true
0
11
84
111
55
56
null
null
FranklinChen/music-score
src/Music/Time/Reactive.hs
bsd-3-clause
trimR :: Monoid a => Span -> Reactive a -> Reactive a trimR (view onsetAndOffset -> (t, u)) x = switchR t mempty (switchR u x mempty)
133
trimR :: Monoid a => Span -> Reactive a -> Reactive a trimR (view onsetAndOffset -> (t, u)) x = switchR t mempty (switchR u x mempty)
133
trimR (view onsetAndOffset -> (t, u)) x = switchR t mempty (switchR u x mempty)
79
false
true
0
8
26
70
34
36
null
null
christiaanb/ghc
compiler/typecheck/TcEvidence.hs
bsd-3-clause
isTcReflCo :: TcCoercion -> Bool isTcReflCo (TcRefl {}) = True
66
isTcReflCo :: TcCoercion -> Bool isTcReflCo (TcRefl {}) = True
66
isTcReflCo (TcRefl {}) = True
33
false
true
0
7
13
25
13
12
null
null
harendra-kumar/asyncly
benchmark/Array.hs
bsd-3-clause
benchIO' :: NFData b => String -> (Int -> IO a) -> (a -> IO b) -> Benchmark benchIO' name src f = bench name $ nfIO $ randomRIO (1,1) >>= src >>= f
151
benchIO' :: NFData b => String -> (Int -> IO a) -> (a -> IO b) -> Benchmark benchIO' name src f = bench name $ nfIO $ randomRIO (1,1) >>= src >>= f
151
benchIO' name src f = bench name $ nfIO $ randomRIO (1,1) >>= src >>= f
75
false
true
0
11
37
85
42
43
null
null
silkapp/migrate
src/Text/JSON/Versioned.hs
bsd-3-clause
showJSONVersioned :: forall a o. (a ~ Versioned o, JSON o, VersionNumber (PrevVersion a)) => a -> JSValue showJSONVersioned a = let v = version (Proxy :: Proxy a) x = L.get versioned a in showJSON (toJSObject [("version", showJSON v), ("data", showJSON x)])
268
showJSONVersioned :: forall a o. (a ~ Versioned o, JSON o, VersionNumber (PrevVersion a)) => a -> JSValue showJSONVersioned a = let v = version (Proxy :: Proxy a) x = L.get versioned a in showJSON (toJSObject [("version", showJSON v), ("data", showJSON x)])
268
showJSONVersioned a = let v = version (Proxy :: Proxy a) x = L.get versioned a in showJSON (toJSObject [("version", showJSON v), ("data", showJSON x)])
162
false
true
0
12
53
124
64
60
null
null
dmuneras/LambdaMethods
src/GramaticaConcreta.hs
gpl-2.0
kwotxt = ["|", "+", "-", "*", "/", "^", "."]
44
kwotxt = ["|", "+", "-", "*", "/", "^", "."]
44
kwotxt = ["|", "+", "-", "*", "/", "^", "."]
44
false
false
1
5
8
30
17
13
null
null
three/codeworld
funblocks-client/src/Blocks/Types.hs
apache-2.0
numQuot = standardFunction "numQuot" "quotient" Nothing [typeNumber, typeNumber, typeNumber] ["LEFT", "RIGHT"] colorNumber "The integer part when dividing two numbers"
181
numQuot = standardFunction "numQuot" "quotient" Nothing [typeNumber, typeNumber, typeNumber] ["LEFT", "RIGHT"] colorNumber "The integer part when dividing two numbers"
181
numQuot = standardFunction "numQuot" "quotient" Nothing [typeNumber, typeNumber, typeNumber] ["LEFT", "RIGHT"] colorNumber "The integer part when dividing two numbers"
181
false
false
0
6
32
36
20
16
null
null
scslab/hails
Hails/Web/Responses.hs
mit
serverError :: Response serverError= mkHtmlResponse status500 [] html where html = L8.concat [L8.pack "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n\ \<HTML><HEAD>\n\ \<TITLE>500 Internal Server Error</TITLE>\n\ \</HEAD><BODY>\n\ ...
392
serverError :: Response serverError= mkHtmlResponse status500 [] html where html = L8.concat [L8.pack "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n\ \<HTML><HEAD>\n\ \<TITLE>500 Internal Server Error</TITLE>\n\ \</HEAD><BODY>\n\ ...
392
serverError= mkHtmlResponse status500 [] html where html = L8.concat [L8.pack "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n\ \<HTML><HEAD>\n\ \<TITLE>500 Internal Server Error</TITLE>\n\ \</HEAD><BODY>\n\ \<H1>Internal Server...
368
false
true
0
8
127
41
20
21
null
null
lally/libmet
src/Ppt/Generate/CpConfig.hs
bsd-3-clause
-- -- Module Configuration -- x64Layout = TargetInfo 8 4 4 16 8 4 3
67
x64Layout = TargetInfo 8 4 4 16 8 4 3
37
x64Layout = TargetInfo 8 4 4 16 8 4 3
37
true
false
1
5
14
27
13
14
null
null
nick8325/kbc
src/Data/ChurchList.hs
bsd-3-clause
cons :: a -> ChurchList a -> ChurchList a cons x xs = ChurchList (\c n -> c x (foldr c n xs))
93
cons :: a -> ChurchList a -> ChurchList a cons x xs = ChurchList (\c n -> c x (foldr c n xs))
93
cons x xs = ChurchList (\c n -> c x (foldr c n xs))
51
false
true
0
10
22
58
28
30
null
null
zlizta/PiSigma
src/Language/PiSigma/Pretty.hs
bsd-3-clause
prettyTerm c (Q _ Sigma (t1, (n, t2))) = contextParens c 1 $ binding 2 n t1 <+> text "*" <+> prettyTerm 1 t2
122
prettyTerm c (Q _ Sigma (t1, (n, t2))) = contextParens c 1 $ binding 2 n t1 <+> text "*" <+> prettyTerm 1 t2
122
prettyTerm c (Q _ Sigma (t1, (n, t2))) = contextParens c 1 $ binding 2 n t1 <+> text "*" <+> prettyTerm 1 t2
122
false
false
6
8
37
75
32
43
null
null
seereason/ansi-wl-pprint
Text/PrettyPrint/ANSI/Leijen.hs
bsd-2-clause
-- | The document @(text s)@ contains the literal string @s@. The -- string shouldn't contain any newline (@'\n'@) characters. If the -- string contains newline characters, the function 'string' should be -- used. text :: String -> Doc text "" = Empty
259
text :: String -> Doc text "" = Empty
45
text "" = Empty
23
true
true
0
5
50
22
13
9
null
null
vikraman/ghc
compiler/basicTypes/Literal.hs
bsd-3-clause
litTag :: Literal -> Int litTag (MachChar _) = 1
55
litTag :: Literal -> Int litTag (MachChar _) = 1
55
litTag (MachChar _) = 1
30
false
true
0
9
16
30
13
17
null
null
ktvoelker/state-record
examples/new/Foo.hs
gpl-3.0
-- | Set a inside x to 1. one :: State Bar () one = putf (x // a) 1
67
one :: State Bar () one = putf (x // a) 1
41
one = putf (x // a) 1
21
true
true
1
7
19
34
16
18
null
null
rhofour/rlglue-haskell-codec
src/RL_Glue/Network.hs
apache-2.0
getRewardObservation :: Socket -> MaybeT IO (Reward, Observation) getRewardObservation sock = do reward <- getDouble sock obs <- getObservation sock return (reward, obs)
175
getRewardObservation :: Socket -> MaybeT IO (Reward, Observation) getRewardObservation sock = do reward <- getDouble sock obs <- getObservation sock return (reward, obs)
175
getRewardObservation sock = do reward <- getDouble sock obs <- getObservation sock return (reward, obs)
109
false
true
0
8
28
61
29
32
null
null
Javran/hakyll
src/Hakyll/Web/Template/Context.hs
bsd-3-clause
dateFieldWith :: TimeLocale -- ^ Output time locale -> String -- ^ Destination key -> String -- ^ Format to use on the date -> Context a -- ^ Resulting context dateFieldWith locale key format = field key $ \i -> do time <- getItemUTC locale $ itemIdentifier i ...
617
dateFieldWith :: TimeLocale -- ^ Output time locale -> String -- ^ Destination key -> String -- ^ Format to use on the date -> Context a dateFieldWith locale key format = field key $ \i -> do time <- getItemUTC locale $ itemIdentifier i return $ formatTime lo...
592
dateFieldWith locale key format = field key $ \i -> do time <- getItemUTC locale $ itemIdentifier i return $ formatTime locale format time -------------------------------------------------------------------------------- -- | Parser to try to extract and parse the time from the @published@ -- field or from the...
402
true
true
0
11
150
84
43
41
null
null
jberryman/Befunge93
Tests.hs
bsd-3-clause
goodTest1 = unlines $ ["WARNING: source was truncated to 80x25; use --allow-oversize for source code of arbitrary dimensions.", "0 1 2 3 4 5 6 7 ", "GOOD: , works", "GOOD: : duplicates", "GOOD: empty stack pops zero", "GOOD: 2-2 = 0", "GOOD: | works", "GOOD: 0! = 1", "GOOD: 7! = 0", ...
671
goodTest1 = unlines $ ["WARNING: source was truncated to 80x25; use --allow-oversize for source code of arbitrary dimensions.", "0 1 2 3 4 5 6 7 ", "GOOD: , works", "GOOD: : duplicates", "GOOD: empty stack pops zero", "GOOD: 2-2 = 0", "GOOD: | works", "GOOD: 0! = 1", "GOOD: 7! = 0", ...
671
goodTest1 = unlines $ ["WARNING: source was truncated to 80x25; use --allow-oversize for source code of arbitrary dimensions.", "0 1 2 3 4 5 6 7 ", "GOOD: , works", "GOOD: : duplicates", "GOOD: empty stack pops zero", "GOOD: 2-2 = 0", "GOOD: | works", "GOOD: 0! = 1", "GOOD: 7! = 0", ...
671
false
false
3
5
188
77
47
30
null
null
spechub/Hets
Common/Lib/MapSet.hs
gpl-2.0
-- | update an element set under the given key setUpdate :: (Ord k, Ord a) => (Set.Set a -> Set.Set a) -> k -> Map.Map k (Set.Set a) -> Map.Map k (Set.Set a) setUpdate f k m = let s = f $ setLookup k m in if Set.null s then Map.delete k m else Map.insert k s m
264
setUpdate :: (Ord k, Ord a) => (Set.Set a -> Set.Set a) -> k -> Map.Map k (Set.Set a) -> Map.Map k (Set.Set a) setUpdate f k m = let s = f $ setLookup k m in if Set.null s then Map.delete k m else Map.insert k s m
217
setUpdate f k m = let s = f $ setLookup k m in if Set.null s then Map.delete k m else Map.insert k s m
104
true
true
0
13
63
143
69
74
null
null
romanb/amazonka
amazonka-ec2/gen/Network/AWS/EC2/DetachNetworkInterface.hs
mpl-2.0
-- | Specifies whether to force a detachment. dniForce :: Lens' DetachNetworkInterface (Maybe Bool) dniForce = lens _dniForce (\s a -> s { _dniForce = a })
155
dniForce :: Lens' DetachNetworkInterface (Maybe Bool) dniForce = lens _dniForce (\s a -> s { _dniForce = a })
109
dniForce = lens _dniForce (\s a -> s { _dniForce = a })
55
true
true
1
9
26
52
25
27
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/hsSyn/HsUtils.hs
bsd-3-clause
mkHsCmdCast :: TcCoercion -> HsCmd id -> HsCmd id mkHsCmdCast co cmd | isTcReflCo co = cmd | otherwise = HsCmdCast co cmd
144
mkHsCmdCast :: TcCoercion -> HsCmd id -> HsCmd id mkHsCmdCast co cmd | isTcReflCo co = cmd | otherwise = HsCmdCast co cmd
144
mkHsCmdCast co cmd | isTcReflCo co = cmd | otherwise = HsCmdCast co cmd
94
false
true
0
8
45
53
23
30
null
null
brendanhay/gogol
gogol-servicenetworking/gen/Network/Google/ServiceNetworking/Types/Product.hs
mpl-2.0
-- | The custom pattern is used for specifying an HTTP method that is not -- included in the \`pattern\` field, such as HEAD, or \"*\" to leave the -- HTTP method unspecified for this rule. The wild-card rule is useful for -- services that provide content to Web (HTML) clients. httprCustom :: Lens' HTTPRule (Maybe Cust...
399
httprCustom :: Lens' HTTPRule (Maybe CustomHTTPPattern) httprCustom = lens _httprCustom (\ s a -> s{_httprCustom = a})
120
httprCustom = lens _httprCustom (\ s a -> s{_httprCustom = a})
64
true
true
0
9
69
51
28
23
null
null
alphalambda/k12math
contrib/MHills/GeometryLessons/code/student/lesson4a.hs
mit
main = drawPicture myPicture
28
main = drawPicture myPicture
28
main = drawPicture myPicture
28
false
false
0
5
3
9
4
5
null
null
mgsloan/ghcjs-jquery
JavaScript/JQuery.hs
mit
prev :: JQuery -> IO JQuery prev = jq_prev jsNull
49
prev :: JQuery -> IO JQuery prev = jq_prev jsNull
49
prev = jq_prev jsNull
21
false
true
0
6
9
21
10
11
null
null
brendanhay/gogol
gogol-admin-directory/gen/Network/Google/Resource/Directory/Resources/Buildings/Patch.hs
mpl-2.0
-- | The unique ID for the customer\'s Google Workspace account. As an -- account administrator, you can also use the \`my_customer\` alias to -- represent your account\'s customer ID. rbpCustomer :: Lens' ResourcesBuildingsPatch Text rbpCustomer = lens _rbpCustomer (\ s a -> s{_rbpCustomer = a})
299
rbpCustomer :: Lens' ResourcesBuildingsPatch Text rbpCustomer = lens _rbpCustomer (\ s a -> s{_rbpCustomer = a})
114
rbpCustomer = lens _rbpCustomer (\ s a -> s{_rbpCustomer = a})
64
true
true
0
9
47
44
24
20
null
null
ekmett/ghc
compiler/cmm/CmmNode.hs
bsd-3-clause
mapExp f (CmmSwitch e tbl) = CmmSwitch (f e) tbl
70
mapExp f (CmmSwitch e tbl) = CmmSwitch (f e) tbl
70
mapExp f (CmmSwitch e tbl) = CmmSwitch (f e) tbl
70
false
false
0
7
31
30
14
16
null
null
rueshyna/gogol
gogol-apps-calendar/gen/Network/Google/AppsCalendar/Types/Product.hs
mpl-2.0
-- | Title of the calendar. Read-only. cleSummary :: Lens' CalendarListEntry (Maybe Text) cleSummary = lens _cleSummary (\ s a -> s{_cleSummary = a})
151
cleSummary :: Lens' CalendarListEntry (Maybe Text) cleSummary = lens _cleSummary (\ s a -> s{_cleSummary = a})
112
cleSummary = lens _cleSummary (\ s a -> s{_cleSummary = a})
61
true
true
0
9
25
48
25
23
null
null
HJvT/hdirect
src/Parser.hs
bsd-3-clause
action_385 (49#) = happyGoto action_192
39
action_385 (49#) = happyGoto action_192
39
action_385 (49#) = happyGoto action_192
39
false
false
0
6
4
15
7
8
null
null
choener/GrammarProducts
old/BioInf/GrammarProducts.hs
gpl-3.0
-- | ruleProduct :: [VSym] -> [VSym] -> [VSym] ruleProduct [] ys = error $ "ruleProduct applied to empty production: " ++ show ("empty",ys)
140
ruleProduct :: [VSym] -> [VSym] -> [VSym] ruleProduct [] ys = error $ "ruleProduct applied to empty production: " ++ show ("empty",ys)
134
ruleProduct [] ys = error $ "ruleProduct applied to empty production: " ++ show ("empty",ys)
92
true
true
0
9
24
58
30
28
null
null
SAdams601/ParRegexSearch
test/HaRe/src/Language/Haskell/Refact/Utils/MonadFunctions.hs
mit
putParsedModule :: [Comment] -> GHC.TypecheckedModule -> RefactGhc () putParsedModule cppComments tm = do st <- get put $ st { rsModule = initRefactModule cppComments tm }
175
putParsedModule :: [Comment] -> GHC.TypecheckedModule -> RefactGhc () putParsedModule cppComments tm = do st <- get put $ st { rsModule = initRefactModule cppComments tm }
175
putParsedModule cppComments tm = do st <- get put $ st { rsModule = initRefactModule cppComments tm }
105
false
true
0
11
29
66
31
35
null
null
ip1981/mywatch
src/Application.hs
mit
apiGetProcessList :: Pools -> ActionM () apiGetProcessList ps = do server <- param "server" case HM.lookup server ps of Nothing -> status notFound404 >> text server Just p -> do res <- withDB p $ \c -> query_ c "SELECT \ \id, user, host, db, comm...
597
apiGetProcessList :: Pools -> ActionM () apiGetProcessList ps = do server <- param "server" case HM.lookup server ps of Nothing -> status notFound404 >> text server Just p -> do res <- withDB p $ \c -> query_ c "SELECT \ \id, user, host, db, comm...
597
apiGetProcessList ps = do server <- param "server" case HM.lookup server ps of Nothing -> status notFound404 >> text server Just p -> do res <- withDB p $ \c -> query_ c "SELECT \ \id, user, host, db, command, time, state, info \ \F...
556
false
true
0
16
229
145
72
73
null
null
fibsifan/pandoc
src/Text/Pandoc/Readers/MediaWiki.hs
gpl-2.0
tableStart :: MWParser () tableStart = try $ guardColumnOne *> skipSpaces *> sym "{|"
85
tableStart :: MWParser () tableStart = try $ guardColumnOne *> skipSpaces *> sym "{|"
85
tableStart = try $ guardColumnOne *> skipSpaces *> sym "{|"
59
false
true
0
7
13
31
15
16
null
null
fmapfmapfmap/amazonka
amazonka-iam/gen/Network/AWS/IAM/CreateVirtualMFADevice.hs
mpl-2.0
-- | A newly created virtual MFA device. cvmdrsVirtualMFADevice :: Lens' CreateVirtualMFADeviceResponse VirtualMFADevice cvmdrsVirtualMFADevice = lens _cvmdrsVirtualMFADevice (\ s a -> s{_cvmdrsVirtualMFADevice = a})
216
cvmdrsVirtualMFADevice :: Lens' CreateVirtualMFADeviceResponse VirtualMFADevice cvmdrsVirtualMFADevice = lens _cvmdrsVirtualMFADevice (\ s a -> s{_cvmdrsVirtualMFADevice = a})
175
cvmdrsVirtualMFADevice = lens _cvmdrsVirtualMFADevice (\ s a -> s{_cvmdrsVirtualMFADevice = a})
95
true
true
0
9
23
40
22
18
null
null
tomberek/rulestesting
Control/Arrow/CCA.hs
bsd-3-clause
rr :: PKleisli a b -> a -> IO b rr = runKleisli . runPKleisli
61
rr :: PKleisli a b -> a -> IO b rr = runKleisli . runPKleisli
61
rr = runKleisli . runPKleisli
29
false
true
1
8
14
38
16
22
null
null
acowley/ghc
libraries/template-haskell/Language/Haskell/TH/Syntax.hs
bsd-3-clause
modString :: ModName -> String modString (ModName m) = m
56
modString :: ModName -> String modString (ModName m) = m
56
modString (ModName m) = m
25
false
true
0
6
9
28
13
15
null
null
cfredric/arithmoi
test-suite/Math/NumberTheory/Powers/FourthTests.hs
mit
-- | Check that 'integerFourthRoot'' returns the largest integer @m@ with @m^4 <= n@. integerFourthRoot'Property :: Integral a => NonNegative a -> Bool integerFourthRoot'Property (NonNegative n) = m >= 0 && m ^ 4 <= n && (m + 1) ^ 4 /= n && (m + 1) ^ 3 >= n `div` (m + 1) where m = integerFourthRoot' n -- | Check...
390
integerFourthRoot'Property :: Integral a => NonNegative a -> Bool integerFourthRoot'Property (NonNegative n) = m >= 0 && m ^ 4 <= n && (m + 1) ^ 4 /= n && (m + 1) ^ 3 >= n `div` (m + 1) where m = integerFourthRoot' n -- | Check that the number 'isFourthPower' iff its 'integerFourthRoot' is exact.
304
integerFourthRoot'Property (NonNegative n) = m >= 0 && m ^ 4 <= n && (m + 1) ^ 4 /= n && (m + 1) ^ 3 >= n `div` (m + 1) where m = integerFourthRoot' n -- | Check that the number 'isFourthPower' iff its 'integerFourthRoot' is exact.
238
true
true
1
15
79
122
60
62
null
null
jbapple/three-finger-trees
Spinal.hs
agpl-3.0
lcons x xs@(LConc d r) = LConc x (lconsRspine (RSpine S.empty,d) r)
71
lcons x xs@(LConc d r) = LConc x (lconsRspine (RSpine S.empty,d) r)
71
lcons x xs@(LConc d r) = LConc x (lconsRspine (RSpine S.empty,d) r)
71
false
false
1
10
15
54
23
31
null
null
delta4d/codewars
kata/odd-plus-even-equals-odd-prove-it/OddsAndEvens.hs
mit
-- -- | Proves odd * odd = odd oddTimesOdd :: Odd n -> Odd m -> Odd (Mult n m) oddTimesOdd OneOdd m = m
103
oddTimesOdd :: Odd n -> Odd m -> Odd (Mult n m) oddTimesOdd OneOdd m = m
72
oddTimesOdd OneOdd m = m
24
true
true
0
9
25
42
20
22
null
null
abbradar/brainfuck
Language/Brainfuck.hs
gpl-2.0
-- decode ',' = return InputByte decode '[' = do n <- get put (n+1) return $ JmpForward n
121
decode '[' = do n <- get put (n+1) return $ JmpForward n
88
decode '[' = do n <- get put (n+1) return $ JmpForward n
88
true
false
0
9
50
40
18
22
null
null
rueshyna/gogol
gogol-storage/gen/Network/Google/Resource/Storage/Buckets/Delete.hs
mpl-2.0
-- | If set, only deletes the bucket if its metageneration does not match -- this value. bdIfMetagenerationNotMatch :: Lens' BucketsDelete (Maybe Int64) bdIfMetagenerationNotMatch = lens _bdIfMetagenerationNotMatch (\ s a -> s{_bdIfMetagenerationNotMatch = a}) . mapping _Coerce
292
bdIfMetagenerationNotMatch :: Lens' BucketsDelete (Maybe Int64) bdIfMetagenerationNotMatch = lens _bdIfMetagenerationNotMatch (\ s a -> s{_bdIfMetagenerationNotMatch = a}) . mapping _Coerce
203
bdIfMetagenerationNotMatch = lens _bdIfMetagenerationNotMatch (\ s a -> s{_bdIfMetagenerationNotMatch = a}) . mapping _Coerce
139
true
true
1
8
50
59
29
30
null
null
noughtmare/yi
yi-keymap-vim/src/Yi/Keymap/Vim/NormalMap.hs
gpl-2.0
recordMacroBinding :: VimBinding recordMacroBinding = VimBindingE (f . T.unpack . _unEv) where f "q" (VimState { vsMode = Normal , vsCurrentMacroRecording = Nothing }) = PartialMatch f ['q', c] (VimState { vsMode = Normal }) = WholeMatch $ do ...
486
recordMacroBinding :: VimBinding recordMacroBinding = VimBindingE (f . T.unpack . _unEv) where f "q" (VimState { vsMode = Normal , vsCurrentMacroRecording = Nothing }) = PartialMatch f ['q', c] (VimState { vsMode = Normal }) = WholeMatch $ do ...
486
recordMacroBinding = VimBindingE (f . T.unpack . _unEv) where f "q" (VimState { vsMode = Normal , vsCurrentMacroRecording = Nothing }) = PartialMatch f ['q', c] (VimState { vsMode = Normal }) = WholeMatch $ do modifyStateE $ \s ->...
453
false
true
2
14
201
135
72
63
null
null