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
leonardi-tutorials/tutorial-haskell
Main.hs
apache-2.0
juntaDuasListas :: Eq a => [a] -> [a] -> [a] juntaDuasListas lista1 [] = lista1
79
juntaDuasListas :: Eq a => [a] -> [a] -> [a] juntaDuasListas lista1 [] = lista1
79
juntaDuasListas lista1 [] = lista1
34
false
true
0
8
14
42
22
20
null
null
micxjo/hs-ipfs-client
test/test.hs
bsd-3-clause
runApiary :: IPFS a -> IO (Either IPFSError a) runApiary = runIPFS' (BaseUrl Http "private-7fa49-micxjo.apiary-mock.com" 80 "")
127
runApiary :: IPFS a -> IO (Either IPFSError a) runApiary = runIPFS' (BaseUrl Http "private-7fa49-micxjo.apiary-mock.com" 80 "")
127
runApiary = runIPFS' (BaseUrl Http "private-7fa49-micxjo.apiary-mock.com" 80 "")
80
false
true
0
8
16
44
21
23
null
null
rueshyna/gogol
gogol-dataflow/gen/Network/Google/Resource/Dataflow/Projects/Jobs/WorkItems/ReportStatus.hs
mpl-2.0
-- | OAuth access token. pjwirsAccessToken :: Lens' ProjectsJobsWorkItemsReportStatus (Maybe Text) pjwirsAccessToken = lens _pjwirsAccessToken (\ s a -> s{_pjwirsAccessToken = a})
187
pjwirsAccessToken :: Lens' ProjectsJobsWorkItemsReportStatus (Maybe Text) pjwirsAccessToken = lens _pjwirsAccessToken (\ s a -> s{_pjwirsAccessToken = a})
162
pjwirsAccessToken = lens _pjwirsAccessToken (\ s a -> s{_pjwirsAccessToken = a})
88
true
true
0
8
29
49
25
24
null
null
matthieu/witty
haskell/src/types.hs
apache-2.0
localM:: (WyEnv -> Eval WyEnv) -> Eval a -> Eval a localM f a = do env <- ask newEnv <- f env local (const newEnv) a -- -- Helpers for primitives definition
164
localM:: (WyEnv -> Eval WyEnv) -> Eval a -> Eval a localM f a = do env <- ask newEnv <- f env local (const newEnv) a -- -- Helpers for primitives definition
164
localM f a = do env <- ask newEnv <- f env local (const newEnv) a -- -- Helpers for primitives definition
113
false
true
0
10
40
79
35
44
null
null
brendanhay/gogol
gogol-logging/gen/Network/Google/Resource/Logging/Projects/Metrics/Delete.hs
mpl-2.0
-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). pmdUploadProtocol :: Lens' ProjectsMetricsDelete (Maybe Text) pmdUploadProtocol = lens _pmdUploadProtocol (\ s a -> s{_pmdUploadProtocol = a})
212
pmdUploadProtocol :: Lens' ProjectsMetricsDelete (Maybe Text) pmdUploadProtocol = lens _pmdUploadProtocol (\ s a -> s{_pmdUploadProtocol = a})
150
pmdUploadProtocol = lens _pmdUploadProtocol (\ s a -> s{_pmdUploadProtocol = a})
88
true
true
0
9
33
48
25
23
null
null
ndmitchell/tagsoup
src/Text/HTML/TagSoup/Type.hs
bsd-3-clause
isTagCloseName _ _ = False
26
isTagCloseName _ _ = False
26
isTagCloseName _ _ = False
26
false
false
0
5
4
11
5
6
null
null
ababkin/railoscopy
src/Haste/Perch/Client.hs
mit
progress cont = nelem "progress" `child` cont
46
progress cont = nelem "progress" `child` cont
46
progress cont = nelem "progress" `child` cont
46
false
false
1
5
7
21
9
12
null
null
SKA-ScienceDataProcessor/RC
MS4/dna-programs/Kernel/GPU/ScatterGrid.hs
apache-2.0
-- | Does the (rather involved) preparation step for the scatter -- gridder. This arranges things so that we: -- -- 1. Have all GCFs in device memory -- 2. Rotate and transform visibilities to minimise the work -- the actual gridder has to do. This means that we determine -- grid coordinates and pre-selec...
776
prepare :: GridPar -> Vis -> GCFSet -> IO (Vis, GCFSet) prepare gridp vis gcfSet = do -- Free old data, if any freeVector (castVector $ visPregridded vis :: Vector Word8) -- Prepare GCFS (gcfSet', gcfMap) <- prepareGCFs gcfSet -- Pregridding vis' <- pregrid gridp vis gcfSet' gcfMap -- Free map freeV...
438
prepare gridp vis gcfSet = do -- Free old data, if any freeVector (castVector $ visPregridded vis :: Vector Word8) -- Prepare GCFS (gcfSet', gcfMap) <- prepareGCFs gcfSet -- Pregridding vis' <- pregrid gridp vis gcfSet' gcfMap -- Free map freeVector (fst gcfMap) freeVector (snd gcfMap) return (v...
382
true
true
0
11
165
147
74
73
null
null
noughtmare/yi
yi-core/src/Yi/Editor.hs
gpl-2.0
jumpForwardE :: EditorM () jumpForwardE = modifyJumpListE jumpForward
69
jumpForwardE :: EditorM () jumpForwardE = modifyJumpListE jumpForward
69
jumpForwardE = modifyJumpListE jumpForward
42
false
true
0
6
7
19
9
10
null
null
achirkin/mooc-images
to-static/main.hs
mit
contentTypeToExt "application/msword" = ".doc"
48
contentTypeToExt "application/msword" = ".doc"
48
contentTypeToExt "application/msword" = ".doc"
48
false
false
1
5
5
13
4
9
null
null
qpliu/esolang
gbagbo/hs/TestResolve.hs
gpl-3.0
testBinop4 :: Assertion testBinop4 = testResolve "testBinop4" "f a b=a∩b." checkResult where checkResult [(_,Def (Identifier _ "f") 2 (ExprIntersect _ (ExprBound _ "a" 0) (ExprBound _ "b" 1)))] = True checkResult _ = False
297
testBinop4 :: Assertion testBinop4 = testResolve "testBinop4" "f a b=a∩b." checkResult where checkResult [(_,Def (Identifier _ "f") 2 (ExprIntersect _ (ExprBound _ "a" 0) (ExprBound _ "b" 1)))] = True checkResult _ = False
297
testBinop4 = testResolve "testBinop4" "f a b=a∩b." checkResult where checkResult [(_,Def (Identifier _ "f") 2 (ExprIntersect _ (ExprBound _ "a" 0) (ExprBound _ "b" 1)))] = True checkResult _ = False
273
false
true
0
12
108
91
46
45
null
null
YellPika/effin
src/Data/Index.hs
bsd-3-clause
trivial :: Index (e ':+ 'Nil) f -> f :~: e trivial (Index i) | i == 0 = unsafeCoerce Refl | otherwise = error "non-trivial Index"
140
trivial :: Index (e ':+ 'Nil) f -> f :~: e trivial (Index i) | i == 0 = unsafeCoerce Refl | otherwise = error "non-trivial Index"
139
trivial (Index i) | i == 0 = unsafeCoerce Refl | otherwise = error "non-trivial Index"
96
false
true
0
9
37
69
32
37
null
null
copton/ocram
ocram/src/Ocram/Backend.hs
gpl-2.0
setBreakpoints :: CExtDecl -> CExtDecl' -- {{{2 setBreakpoints = everywhere (mkT tStat `extT` tInitDecl) . fmap EnWrapper where tStat :: CStat' -> CStat' tStat o@(CCompound _ _ _) = o tStat o@(CExpr Nothing _) = o tStat o@(CLabel _ _ _ _) = o tStat s = amap node_start s tInitDecl :: CDecl' -...
487
setBreakpoints :: CExtDecl -> CExtDecl' setBreakpoints = everywhere (mkT tStat `extT` tInitDecl) . fmap EnWrapper where tStat :: CStat' -> CStat' tStat o@(CCompound _ _ _) = o tStat o@(CExpr Nothing _) = o tStat o@(CLabel _ _ _ _) = o tStat s = amap node_start s tInitDecl :: CDecl' -> CDecl'...
479
setBreakpoints = everywhere (mkT tStat `extT` tInitDecl) . fmap EnWrapper where tStat :: CStat' -> CStat' tStat o@(CCompound _ _ _) = o tStat o@(CExpr Nothing _) = o tStat o@(CLabel _ _ _ _) = o tStat s = amap node_start s tInitDecl :: CDecl' -> CDecl' tInitDecl (CDecl x1 decls x2) = CDec...
438
true
true
13
9
137
230
115
115
null
null
jwiegley/ghc-release
libraries/Cabal/cabal/Distribution/Simple/NHC.hs
gpl-3.0
installExe :: Verbosity -- ^verbosity -> FilePath -- ^install location -> FilePath -- ^Build location -> (FilePath, FilePath) -- ^Executable (prefix,suffix) -> Executable -> IO () installExe verbosity pref buildPref (progprefix,progsuffix) exe = do createDir...
724
installExe :: Verbosity -- ^verbosity -> FilePath -- ^install location -> FilePath -- ^Build location -> (FilePath, FilePath) -- ^Executable (prefix,suffix) -> Executable -> IO () installExe verbosity pref buildPref (progprefix,progsuffix) exe = do createDir...
724
installExe verbosity pref buildPref (progprefix,progsuffix) exe = do createDirectoryIfMissingVerbose verbosity True pref let exeBaseName = exeName exe exeFileName = exeBaseName <.> exeExtension fixedExeFileName = (progprefix ++ exeBaseName ++ progsuffix) <.> exeExtension ...
486
false
true
0
14
203
148
76
72
null
null
scott-fleischman/greek-grammar
haskell/greek-grammar/src/Text/Greek/Phonology/ShowText.hs
mit
parsePhoneme :: Text -> Maybe Phoneme parsePhoneme t = lookup t textToPhoneme
77
parsePhoneme :: Text -> Maybe Phoneme parsePhoneme t = lookup t textToPhoneme
77
parsePhoneme t = lookup t textToPhoneme
39
false
true
0
6
11
26
12
14
null
null
brianshourd/haskell-Calypso
Calypso/Core.hs
bsd-3-clause
center :: (PsoVect a) => Swarm a b -> a center (Swarm ps _ _ _ _) = avg sumPoints where avg = pScale (1 / (fromIntegral $ length ps)) sumPoints = foldr pAdd pZero $ map pos ps {- Each point has a personal best, what is the average? -} {- avgScore :: (PsoVect a) => Swarm a -> Double avgScore (Swarm ps _ f _ _...
614
center :: (PsoVect a) => Swarm a b -> a center (Swarm ps _ _ _ _) = avg sumPoints where avg = pScale (1 / (fromIntegral $ length ps)) sumPoints = foldr pAdd pZero $ map pos ps {- Each point has a personal best, what is the average? -} {- avgScore :: (PsoVect a) => Swarm a -> Double avgScore (Swarm ps _ f _ _...
614
center (Swarm ps _ _ _ _) = avg sumPoints where avg = pScale (1 / (fromIntegral $ length ps)) sumPoints = foldr pAdd pZero $ map pos ps {- Each point has a personal best, what is the average? -} {- avgScore :: (PsoVect a) => Swarm a -> Double avgScore (Swarm ps _ f _ _) = avg $ map (val . pGuide) ps where ...
574
false
true
0
10
145
99
50
49
null
null
capn-freako/Haskell_Misc
PhantomTypes/test.hs
bsd-3-clause
bitsToInt :: [Bit] -> Int bitsToInt = bitsToInt' 1
50
bitsToInt :: [Bit] -> Int bitsToInt = bitsToInt' 1
50
bitsToInt = bitsToInt' 1
24
false
true
0
6
8
21
11
10
null
null
DavidAlphaFox/darcs
src/Darcs/UI/Commands/ShowFiles.hs
gpl-2.0
showFilesOpts :: DarcsOption a (Bool -> Bool -> Bool -> Bool -> [O.MatchFlag] -> Maybe String -> Maybe O.StdCmdAction -> Bool -> Bool -> O.Ve...
582
showFilesOpts :: DarcsOption a (Bool -> Bool -> Bool -> Bool -> [O.MatchFlag] -> Maybe String -> Maybe O.StdCmdAction -> Bool -> Bool -> O.Ve...
582
showFilesOpts = showFilesBasicOpts `withStdOpts` oid
52
false
true
2
21
350
118
57
61
null
null
michalkonecny/aern2
aern2-real/attic/EffortConcept1.hs
bsd-3-clause
myexpCF :: FnC ((Integer, Precision), MPBall) MPBall myexpCF = FnC (f [1]) where f precompFactorials ((acGuide,p), x) = (res, FnC (f $ take (length terms) factorials)) -- (res, FnC (f [1])) -- switch-off caching of factorials where xP = setPrecision p x pf = precompFactorials factorials = p...
821
myexpCF :: FnC ((Integer, Precision), MPBall) MPBall myexpCF = FnC (f [1]) where f precompFactorials ((acGuide,p), x) = (res, FnC (f $ take (length terms) factorials)) -- (res, FnC (f [1])) -- switch-off caching of factorials where xP = setPrecision p x pf = precompFactorials factorials = p...
821
myexpCF = FnC (f [1]) where f precompFactorials ((acGuide,p), x) = (res, FnC (f $ take (length terms) factorials)) -- (res, FnC (f [1])) -- switch-off caching of factorials where xP = setPrecision p x pf = precompFactorials factorials = pf ++ (continueFactorials (integer $ length pf) (last ...
768
false
true
13
11
213
357
168
189
null
null
brendanhay/gogol
gogol-adexchangebuyer2/gen/Network/Google/Resource/AdExchangeBuyer2/Bidders/FilterSets/List.hs
mpl-2.0
-- | JSONP bfslCallback :: Lens' BiddersFilterSetsList (Maybe Text) bfslCallback = lens _bfslCallback (\ s a -> s{_bfslCallback = a})
135
bfslCallback :: Lens' BiddersFilterSetsList (Maybe Text) bfslCallback = lens _bfslCallback (\ s a -> s{_bfslCallback = a})
124
bfslCallback = lens _bfslCallback (\ s a -> s{_bfslCallback = a})
67
true
true
0
9
21
49
25
24
null
null
spacekitteh/smcghc
compiler/nativeGen/NCGMonad.hs
bsd-3-clause
getBlockIdNat :: NatM BlockId getBlockIdNat = do u <- getUniqueNat return (mkBlockId u)
98
getBlockIdNat :: NatM BlockId getBlockIdNat = do u <- getUniqueNat return (mkBlockId u)
98
getBlockIdNat = do u <- getUniqueNat return (mkBlockId u)
68
false
true
0
9
23
35
15
20
null
null
uwap/Idris-dev
src/Idris/IdrisDoc.hs
bsd-3-clause
extractPTermNames (PAppBind _ p pas) = let names = concatMap extractPArg pas in (extract p) ++ names
140
extractPTermNames (PAppBind _ p pas) = let names = concatMap extractPArg pas in (extract p) ++ names
140
extractPTermNames (PAppBind _ p pas) = let names = concatMap extractPArg pas in (extract p) ++ names
140
false
false
0
9
56
45
21
24
null
null
mwlow/raft-haskell
src/Raft/Protocol.hs
gpl-3.0
recvCommandMsg :: Command a -> Process (RpcMessage a) recvCommandMsg a = return $ RpcCommandMsg a
97
recvCommandMsg :: Command a -> Process (RpcMessage a) recvCommandMsg a = return $ RpcCommandMsg a
97
recvCommandMsg a = return $ RpcCommandMsg a
43
false
true
0
8
14
37
17
20
null
null
hansroland/hexif
src/Graphics/Hexif/PrettyPrint.hs
bsd-3-clause
ppIfdValue tag (ValueUdf len strVal) = ppUndefinedValue tag len strVal
70
ppIfdValue tag (ValueUdf len strVal) = ppUndefinedValue tag len strVal
70
ppIfdValue tag (ValueUdf len strVal) = ppUndefinedValue tag len strVal
70
false
false
0
7
9
26
12
14
null
null
brendanhay/gogol
gogol-gmail/gen/Network/Google/Gmail/Types/Product.hs
mpl-2.0
-- | Filtering behavior of labelIds list specified. wrLabelFilterAction :: Lens' WatchRequest (Maybe WatchRequestLabelFilterAction) wrLabelFilterAction = lens _wrLabelFilterAction (\ s a -> s{_wrLabelFilterAction = a})
226
wrLabelFilterAction :: Lens' WatchRequest (Maybe WatchRequestLabelFilterAction) wrLabelFilterAction = lens _wrLabelFilterAction (\ s a -> s{_wrLabelFilterAction = a})
174
wrLabelFilterAction = lens _wrLabelFilterAction (\ s a -> s{_wrLabelFilterAction = a})
94
true
true
2
9
32
55
25
30
null
null
RayRacine/aws
Aws/SimpleDb/Core.hs
bsd-3-clause
expectedAttributeQuery (ExpectedExists exists) = [("Exists", awsBool exists)]
77
expectedAttributeQuery (ExpectedExists exists) = [("Exists", awsBool exists)]
77
expectedAttributeQuery (ExpectedExists exists) = [("Exists", awsBool exists)]
77
false
false
0
7
6
28
14
14
null
null
dmjio/aeson
src/Data/Aeson/Encoding/Internal.hs
bsd-3-clause
scientificText :: Scientific -> Encoding' a scientificText = Encoding . EB.quote . EB.scientific
96
scientificText :: Scientific -> Encoding' a scientificText = Encoding . EB.quote . EB.scientific
96
scientificText = Encoding . EB.quote . EB.scientific
52
false
true
0
7
12
36
16
20
null
null
ghc/packages-haskeline
System/Console/Haskeline/Completion.hs
bsd-3-clause
completeQuotedWord :: Monad m => Maybe Char -- ^ An optional escape character -> [Char] -- ^ Characters which set off quotes -> (String -> m [Completion]) -- ^ Function to produce a list of possible completions -> CompletionFunc m -- ^ ...
761
completeQuotedWord :: Monad m => Maybe Char -- ^ An optional escape character -> [Char] -- ^ Characters which set off quotes -> (String -> m [Completion]) -- ^ Function to produce a list of possible completions -> CompletionFunc m -- ^ ...
761
completeQuotedWord esc qs completer alterative line@(left,_) = case splitAtQuote esc qs left of Just (w,rest) | isUnquoted esc qs rest -> do cs <- completer (reverse w) return (rest, map (addQuotes . escapeReplacement esc qs) cs) _ -> alterative line
276
false
true
0
16
280
177
88
89
null
null
coolhacks/scripts-hacks
examples/shellcheck-master/ShellCheck/Parser.hs
mit
readDoubleQuoted = called "double quoted string" $ do id <- getNextId startPos <- getPosition doubleQuote x <- many doubleQuotedPart endPos <- getPosition doubleQuote <|> fail "Expected end of double quoted string" optional $ do try . lookAhead $ suspectCharAfterQuotes <|> oneOf "$\"...
677
readDoubleQuoted = called "double quoted string" $ do id <- getNextId startPos <- getPosition doubleQuote x <- many doubleQuotedPart endPos <- getPosition doubleQuote <|> fail "Expected end of double quoted string" optional $ do try . lookAhead $ suspectCharAfterQuotes <|> oneOf "$\"...
677
readDoubleQuoted = called "double quoted string" $ do id <- getNextId startPos <- getPosition doubleQuote x <- many doubleQuotedPart endPos <- getPosition doubleQuote <|> fail "Expected end of double quoted string" optional $ do try . lookAhead $ suspectCharAfterQuotes <|> oneOf "$\"...
677
false
false
4
17
164
205
94
111
null
null
GaloisInc/halvm-ghc
compiler/prelude/TysWiredIn.hs
bsd-3-clause
word8Ty :: Type word8Ty = mkTyConTy word8TyCon
46
word8Ty :: Type word8Ty = mkTyConTy word8TyCon
46
word8Ty = mkTyConTy word8TyCon
30
false
true
0
5
6
14
7
7
null
null
inflector/atomspace
opencog/haskell/OpenCog/AtomSpace/Utils.hs
agpl-3.0
atomElem n@(Link _ _ _) a@(Link _ _ _) = atomFold (\ b a -> a == n || b) False a
84
atomElem n@(Link _ _ _) a@(Link _ _ _) = atomFold (\ b a -> a == n || b) False a
84
atomElem n@(Link _ _ _) a@(Link _ _ _) = atomFold (\ b a -> a == n || b) False a
84
false
false
1
9
25
71
32
39
null
null
TorosFanny/kaleidoscope
src/chapter7/Codegen.hs
mit
emptyBlock :: Int -> BlockState emptyBlock i = BlockState i [] Nothing
70
emptyBlock :: Int -> BlockState emptyBlock i = BlockState i [] Nothing
70
emptyBlock i = BlockState i [] Nothing
38
false
true
0
7
11
32
14
18
null
null
alfpark/bond
compiler/src/Language/Bond/Codegen/TypeMapping.hs
mit
cppType BT_UInt8 = pure "uint8_t"
33
cppType BT_UInt8 = pure "uint8_t"
33
cppType BT_UInt8 = pure "uint8_t"
33
false
false
0
5
4
12
5
7
null
null
bredelings/BAli-Phy
haskell/Bio/Alignment.hs
gpl-2.0
uncompress_alignment (a, counts, mapping) = builtin_uncompress_alignment a mapping
82
uncompress_alignment (a, counts, mapping) = builtin_uncompress_alignment a mapping
82
uncompress_alignment (a, counts, mapping) = builtin_uncompress_alignment a mapping
82
false
false
0
6
7
23
12
11
null
null
astro/haskell-torrent
src/Data/ByteString/Parser.hs
bsd-2-clause
-- | Split a ByteString. If the first result is consumed before the -- -- second, this runs in constant heap space. -- -- You must force the returned tuple for that to work, e.g. -- -- > case splitAtST n xs of -- > (ys,zs) -> consume ys ... consume zs -- splitAtST :: Int64 -> L.ByteString -> (L.ByteString, L.ByteSt...
365
splitAtST :: Int64 -> L.ByteString -> (L.ByteString, L.ByteString) splitAtST i ps | i <= 0 = (L.empty, ps)
106
splitAtST i ps | i <= 0 = (L.empty, ps)
39
true
true
0
8
74
62
36
26
null
null
erikd-ambiata/test-https-client-resource-vanished
main/https-client-two.hs
mit
tryIO :: IO a -> IO (Either SomeException a) tryIO action = withAsync action waitCatch
86
tryIO :: IO a -> IO (Either SomeException a) tryIO action = withAsync action waitCatch
86
tryIO action = withAsync action waitCatch
41
false
true
0
8
14
37
17
20
null
null
shlevy/ghc
libraries/template-haskell/Language/Haskell/TH/Lib/Internal.hs
bsd-3-clause
appK :: Kind -> Kind -> Kind appK = AppT
40
appK :: Kind -> Kind -> Kind appK = AppT
40
appK = AppT
11
false
true
0
8
9
26
11
15
null
null
ssaavedra/liquidhaskell
benchmarks/hmatrix-0.15.0.1/lib/Numeric/LinearAlgebra/LAPACK.hs
bsd-3-clause
tt x@Matrix{order = RowMajor} = trans x
39
tt x@Matrix{order = RowMajor} = trans x
39
tt x@Matrix{order = RowMajor} = trans x
39
false
false
1
7
6
31
13
18
null
null
tomahawkins/sls
SLS/Netlist.hs
bsd-3-clause
nDrains :: Netlist -> [Net] nDrains (Netlist _ instances ) = [ a | NMOS _ _ a <- instances ]
92
nDrains :: Netlist -> [Net] nDrains (Netlist _ instances ) = [ a | NMOS _ _ a <- instances ]
92
nDrains (Netlist _ instances ) = [ a | NMOS _ _ a <- instances ]
64
false
true
0
8
20
47
24
23
null
null
google-research/dex-lang
src/lib/Parser.hs
bsd-3-clause
symbol :: String -> Parser () symbol s = void $ L.symbol sc s
61
symbol :: String -> Parser () symbol s = void $ L.symbol sc s
61
symbol s = void $ L.symbol sc s
31
false
true
0
7
13
34
16
18
null
null
josuf107/Adverb
Adverb/Common.hs
gpl-3.0
oilily = id
11
oilily = id
11
oilily = id
11
false
false
0
4
2
6
3
3
null
null
lialan/TigerCompiler
app/Codegen/TigerInstruction.hs
bsd-3-clause
int1 :: Integer -> A.Operand int1 val = A.ConstantOperand $ C.Int 1 val
71
int1 :: Integer -> A.Operand int1 val = A.ConstantOperand $ C.Int 1 val
71
int1 val = A.ConstantOperand $ C.Int 1 val
42
false
true
0
7
12
33
16
17
null
null
dmp1ce/Haskell-Programming-Exercises
Chapter 9/PoemLines.hs
unlicense
firstSen = "Tyger Tyger, burning bright\n"
42
firstSen = "Tyger Tyger, burning bright\n"
42
firstSen = "Tyger Tyger, burning bright\n"
42
false
false
1
5
5
10
3
7
null
null
agentm/project-m36
src/lib/ProjectM36/DataTypes/Primitive.hs
unlicense
atomTypeForAtom (RelationAtom (Relation attrs _)) = RelationAtomType attrs
74
atomTypeForAtom (RelationAtom (Relation attrs _)) = RelationAtomType attrs
74
atomTypeForAtom (RelationAtom (Relation attrs _)) = RelationAtomType attrs
74
false
false
0
9
7
26
12
14
null
null
MetaMemoryT/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
{-! deriving instance NFData SyntaxInfo deriving instance Binary SyntaxInfo !-} defaultSyntax = Syn [] [] [] [] [] id False False Nothing 0 initDSL 0
150
defaultSyntax = Syn [] [] [] [] [] id False False Nothing 0 initDSL 0
69
defaultSyntax = Syn [] [] [] [] [] id False False Nothing 0 initDSL 0
69
true
false
0
6
25
42
21
21
null
null
ogeagla/diffusion
Diffusion.hs
mit
strToBC ('L':'B':'C':' ':number) = LeftBoundaryConstant (read number)
69
strToBC ('L':'B':'C':' ':number) = LeftBoundaryConstant (read number)
69
strToBC ('L':'B':'C':' ':number) = LeftBoundaryConstant (read number)
69
false
false
0
10
6
37
18
19
null
null
adinapoli/api-tools
src/Data/API/Changes.hs
bsd-3-clause
compatibleDefaultValue _ (TyBasic bt) defval = compatibleBasicDefaultValue bt defval
94
compatibleDefaultValue _ (TyBasic bt) defval = compatibleBasicDefaultValue bt defval
94
compatibleDefaultValue _ (TyBasic bt) defval = compatibleBasicDefaultValue bt defval
94
false
false
2
7
18
31
11
20
null
null
micknelso/language-c
src/Language/CFamily/C/Analysis/Export.hs
bsd-3-clause
exportSUERef (NamedRef ident) = Just ident
42
exportSUERef (NamedRef ident) = Just ident
42
exportSUERef (NamedRef ident) = Just ident
42
false
false
0
7
5
18
8
10
null
null
brianshourd/adventOfCode2015
test/Day9Spec.hs
mit
main :: IO () main = hspec spec
31
main :: IO () main = hspec spec
31
main = hspec spec
17
false
true
0
6
7
19
9
10
null
null
martinra/algebraic-structures
src/Math/Structure/Tasty/Additive.hs
gpl-3.0
isAdditiveGroup' :: forall a . ( Testable a, AdditiveGroup a ) => Proxy a -> TestR TestTree isAdditiveGroup' p = withTestProperty $ \testProperty -> testGroup "Additive Group" $ [ testProperty "negate" $ \a -> (a::a) + (negate a) == (zero::a) && (negate a) + a == (zero::a) , testPropert...
532
isAdditiveGroup' :: forall a . ( Testable a, AdditiveGroup a ) => Proxy a -> TestR TestTree isAdditiveGroup' p = withTestProperty $ \testProperty -> testGroup "Additive Group" $ [ testProperty "negate" $ \a -> (a::a) + (negate a) == (zero::a) && (negate a) + a == (zero::a) , testPropert...
532
isAdditiveGroup' p = withTestProperty $ \testProperty -> testGroup "Additive Group" $ [ testProperty "negate" $ \a -> (a::a) + (negate a) == (zero::a) && (negate a) + a == (zero::a) , testProperty "(-)" $ \a -> (a::a) - a == (zero::a) , testProperty "subtract" $ \a b -> subtract (a::a) (b::a) ...
419
false
true
0
17
144
245
132
113
null
null
haslab/SecreC
src/Language/SecreC/TypeChecker/Conversion.hs
gpl-3.0
baseType2DatatypeSpecifier l b@(TApp n ts d) = do ts' <- fmapFstM (type2TemplateTypeArgument l) ts return $ TemplateSpecifier (Typed l $ BaseT b) (fmap (const $ Typed l $ DecT d) $ TypeName () n) ts'
207
baseType2DatatypeSpecifier l b@(TApp n ts d) = do ts' <- fmapFstM (type2TemplateTypeArgument l) ts return $ TemplateSpecifier (Typed l $ BaseT b) (fmap (const $ Typed l $ DecT d) $ TypeName () n) ts'
207
baseType2DatatypeSpecifier l b@(TApp n ts d) = do ts' <- fmapFstM (type2TemplateTypeArgument l) ts return $ TemplateSpecifier (Typed l $ BaseT b) (fmap (const $ Typed l $ DecT d) $ TypeName () n) ts'
207
false
false
0
15
42
103
48
55
null
null
ezyang/ghc
compiler/deSugar/DsUtils.hs
bsd-3-clause
mkEvalMatchResult :: Id -> Type -> MatchResult -> MatchResult mkEvalMatchResult var ty = adjustMatchResult (\e -> Case (Var var) var ty [(DEFAULT, [], e)])
157
mkEvalMatchResult :: Id -> Type -> MatchResult -> MatchResult mkEvalMatchResult var ty = adjustMatchResult (\e -> Case (Var var) var ty [(DEFAULT, [], e)])
157
mkEvalMatchResult var ty = adjustMatchResult (\e -> Case (Var var) var ty [(DEFAULT, [], e)])
95
false
true
0
11
25
68
36
32
null
null
dsorokin/aivika-experiment-chart
examples/InventorySystem/Experiment.hs
bsd-3-clause
tbLostSales = resultByName "tbLostSales"
40
tbLostSales = resultByName "tbLostSales"
40
tbLostSales = resultByName "tbLostSales"
40
false
false
0
5
3
9
4
5
null
null
Yuras/mongodb
Database/MongoDB/Connection.hs
apache-2.0
primary :: ReplicaSet -> IO Pipe -- ^ Return connection to current primary of replica set. Fail if no primary available. primary rs@(ReplicaSet rsName _ _) = do mHost <- statedPrimary <$> updateMembers rs case mHost of Just host' -> connection rs Nothing host' Nothing -> throwError $ userError $...
375
primary :: ReplicaSet -> IO Pipe primary rs@(ReplicaSet rsName _ _) = do mHost <- statedPrimary <$> updateMembers rs case mHost of Just host' -> connection rs Nothing host' Nothing -> throwError $ userError $ "replica set " ++ T.unpack rsName ++ " has no primary"
287
primary rs@(ReplicaSet rsName _ _) = do mHost <- statedPrimary <$> updateMembers rs case mHost of Just host' -> connection rs Nothing host' Nothing -> throwError $ userError $ "replica set " ++ T.unpack rsName ++ " has no primary"
254
true
true
16
7
84
93
47
46
null
null
wz1000/haskell-lsp
lsp-test/src/Language/LSP/Test.hs
mit
formatRange :: TextDocumentIdentifier -> FormattingOptions -> Range -> Session () formatRange doc opts range = do let params = DocumentRangeFormattingParams Nothing doc range opts edits <- getResponseResult <$> request STextDocumentRangeFormatting params applyTextEdits doc edits
285
formatRange :: TextDocumentIdentifier -> FormattingOptions -> Range -> Session () formatRange doc opts range = do let params = DocumentRangeFormattingParams Nothing doc range opts edits <- getResponseResult <$> request STextDocumentRangeFormatting params applyTextEdits doc edits
285
formatRange doc opts range = do let params = DocumentRangeFormattingParams Nothing doc range opts edits <- getResponseResult <$> request STextDocumentRangeFormatting params applyTextEdits doc edits
203
false
true
0
10
39
77
35
42
null
null
brendanhay/gogol
gogol-dataflow/gen/Network/Google/Resource/Dataflow/Projects/Jobs/Debug/GetConfig.hs
mpl-2.0
-- | V1 error format. pjdgcXgafv :: Lens' ProjectsJobsDebugGetConfig (Maybe Xgafv) pjdgcXgafv = lens _pjdgcXgafv (\ s a -> s{_pjdgcXgafv = a})
144
pjdgcXgafv :: Lens' ProjectsJobsDebugGetConfig (Maybe Xgafv) pjdgcXgafv = lens _pjdgcXgafv (\ s a -> s{_pjdgcXgafv = a})
122
pjdgcXgafv = lens _pjdgcXgafv (\ s a -> s{_pjdgcXgafv = a})
61
true
true
0
9
23
48
25
23
null
null
mzini/qlogic
Qlogic/NatSat.hs
gpl-3.0
natAtomM :: (PropAtom a, Eq l, Solver s l) => Size -> a -> NatMonad s l (NatFormula l) natAtomM sz a = do let v = nBitVar (bits sz) a varRestrict <- natToFormula (bound sz) `mGeq` v enforce [varRestrict] return v
269
natAtomM :: (PropAtom a, Eq l, Solver s l) => Size -> a -> NatMonad s l (NatFormula l) natAtomM sz a = do let v = nBitVar (bits sz) a varRestrict <- natToFormula (bound sz) `mGeq` v enforce [varRestrict] return v
269
natAtomM sz a = do let v = nBitVar (bits sz) a varRestrict <- natToFormula (bound sz) `mGeq` v enforce [varRestrict] return v
182
false
true
0
13
98
122
57
65
null
null
input-output-hk/cardano-sl
wallet/src/Cardano/Wallet/Kernel/DB/AcidState.hs
apache-2.0
createHdAddress :: HdAddress -> Update DB (Either HD.CreateHdAddressError ()) createHdAddress hdAddress = runUpdateDiscardSnapshot . zoom dbHdWallets $ HD.createHdAddress hdAddress
184
createHdAddress :: HdAddress -> Update DB (Either HD.CreateHdAddressError ()) createHdAddress hdAddress = runUpdateDiscardSnapshot . zoom dbHdWallets $ HD.createHdAddress hdAddress
184
createHdAddress hdAddress = runUpdateDiscardSnapshot . zoom dbHdWallets $ HD.createHdAddress hdAddress
106
false
true
0
9
22
51
24
27
null
null
olsner/ghc
compiler/coreSyn/CoreStats.hs
bsd-3-clause
altSize :: CoreAlt -> Int altSize (c,bs,e) = c `seq` bndrsSize bs + exprSize e
78
altSize :: CoreAlt -> Int altSize (c,bs,e) = c `seq` bndrsSize bs + exprSize e
78
altSize (c,bs,e) = c `seq` bndrsSize bs + exprSize e
52
false
true
0
7
14
43
23
20
null
null
icemorph/icemorph
bin/FM/oldnorse/BuildON.hs
cc0-1.0
d1tunga :: DictForm -> Entry d1tunga = feminine . decl1tunga
60
d1tunga :: DictForm -> Entry d1tunga = feminine . decl1tunga
60
d1tunga = feminine . decl1tunga
31
false
true
0
5
9
19
10
9
null
null
sumeetchhetri/FrameworkBenchmarks
frameworks/Haskell/warp/warp-shared/src/Lib.hs
bsd-3-clause
respondText :: Status.Status -> LBS.ByteString -> Wai.Response respondText code = Wai.responseLBS code contentText
114
respondText :: Status.Status -> LBS.ByteString -> Wai.Response respondText code = Wai.responseLBS code contentText
114
respondText code = Wai.responseLBS code contentText
51
false
true
0
7
12
35
17
18
null
null
neurogeek/photo-classifier
PhotoClassifier.hs
mit
cleanExifDate :: Maybe String -> DateStuff --cleanExifDate Nothing = sTART_DATE cleanExifDate (Just d) = toDateStuff $ head $ split " " d where toDateStuff :: String -> DateStuff toDateStuff s = let s' = split ":" s in DateStuff (exYear s', exMonth s', exDay s') -- end cleanExifDate ...
509
cleanExifDate :: Maybe String -> DateStuff cleanExifDate (Just d) = toDateStuff $ head $ split " " d where toDateStuff :: String -> DateStuff toDateStuff s = let s' = split ":" s in DateStuff (exYear s', exMonth s', exDay s') -- end cleanExifDate -- classifyPhoto: Takes a PictureS...
472
cleanExifDate (Just d) = toDateStuff $ head $ split " " d where toDateStuff :: String -> DateStuff toDateStuff s = let s' = split ":" s in DateStuff (exYear s', exMonth s', exDay s') -- end cleanExifDate -- classifyPhoto: Takes a PictureStuff, DateStuff, Week (String) and Output d...
429
true
true
0
9
115
111
52
59
null
null
FranklinChen/Idris-dev
src/Idris/Core/TT.hs
bsd-3-clause
-- | Get the largest span containing the two FCs spanFC :: FC -> FC -> FC spanFC (FC f start end) (FC f' start' end') | f == f' = FC f (minLocation start start') (maxLocation end end') | otherwise = NoFC where minLocation (l, c) (l', c') = case compare l l' of LT -> (l, c) EQ...
517
spanFC :: FC -> FC -> FC spanFC (FC f start end) (FC f' start' end') | f == f' = FC f (minLocation start start') (maxLocation end end') | otherwise = NoFC where minLocation (l, c) (l', c') = case compare l l' of LT -> (l, c) EQ -> (l, min c c') GT -> (l', c') ...
468
spanFC (FC f start end) (FC f' start' end') | f == f' = FC f (minLocation start start') (maxLocation end end') | otherwise = NoFC where minLocation (l, c) (l', c') = case compare l l' of LT -> (l, c) EQ -> (l, min c c') GT -> (l', c') maxLocation (l, c) (l...
443
true
true
1
11
203
237
124
113
null
null
jameshsmith/HRL
Server/Abyss/Game.hs
mit
parseDir4 :: MonadPlus m => Text -> m Dir4 parseDir4 "N" = pure N4
66
parseDir4 :: MonadPlus m => Text -> m Dir4 parseDir4 "N" = pure N4
66
parseDir4 "N" = pure N4
23
false
true
0
8
13
35
15
20
null
null
gcampax/ghc
compiler/nativeGen/PPC/CodeGen.hs
bsd-3-clause
genCCall' _ _ (PrimTarget MO_Touch) _ _ = return $ nilOL
57
genCCall' _ _ (PrimTarget MO_Touch) _ _ = return $ nilOL
57
genCCall' _ _ (PrimTarget MO_Touch) _ _ = return $ nilOL
57
false
false
0
7
11
27
13
14
null
null
jgm/blaze-html
Util/GenerateHtmlCombinators.hs
bsd-3-clause
makeDocTypeHtml :: [String] -- ^ The doctype. -> String -- ^ Resulting combinator function. makeDocTypeHtml lines' = unlines [ DO_NOT_EDIT , "-- | Combinator for the @\\<html>@ element. This combinator will also" , "-- insert the correct doctype." , "--" , "-- Example:" , "--...
687
makeDocTypeHtml :: [String] -- ^ The doctype. -> String makeDocTypeHtml lines' = unlines [ DO_NOT_EDIT , "-- | Combinator for the @\\<html>@ element. This combinator will also" , "-- insert the correct doctype." , "--" , "-- Example:" , "--" , "-- > docTypeHtml $ span $ text...
648
makeDocTypeHtml lines' = unlines [ DO_NOT_EDIT , "-- | Combinator for the @\\<html>@ element. This combinator will also" , "-- insert the correct doctype." , "--" , "-- Example:" , "--" , "-- > docTypeHtml $ span $ text \"foo\"" , "--" , "-- Result:" , "--" , unlines (map ("-...
575
true
true
0
11
205
93
56
37
null
null
jyrimatti/alava
src-lib/Equal.hs
mit
whnf' env (EApp term f arg etype) = let whnf_f = whnf' env f whnf_arg = whnf' env arg in case whnf_f of ELam (Lam name _ _) _ body _ -> whnf' env $ subst (Just name) arg body EVar (Var name) _ -> case lookupDef env name of Just vardef -> ...
524
whnf' env (EApp term f arg etype) = let whnf_f = whnf' env f whnf_arg = whnf' env arg in case whnf_f of ELam (Lam name _ _) _ body _ -> whnf' env $ subst (Just name) arg body EVar (Var name) _ -> case lookupDef env name of Just vardef -> ...
524
whnf' env (EApp term f arg etype) = let whnf_f = whnf' env f whnf_arg = whnf' env arg in case whnf_f of ELam (Lam name _ _) _ body _ -> whnf' env $ subst (Just name) arg body EVar (Var name) _ -> case lookupDef env name of Just vardef -> ...
524
false
false
0
14
243
179
83
96
null
null
krakrjak/ImplicitCAD
tests/ParserSpec/Util.hs
agpl-3.0
negate = oapp "negate"
22
negate = oapp "negate"
22
negate = oapp "negate"
22
false
false
0
5
3
9
4
5
null
null
ion1/shell-dsl
src/System/ShellDSL.hs
mit
verbatim :: ByteString -> Shell verbatim = Shell . Bui.lazyByteString
69
verbatim :: ByteString -> Shell verbatim = Shell . Bui.lazyByteString
69
verbatim = Shell . Bui.lazyByteString
37
false
true
0
7
9
28
12
16
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/utils/Pretty.hs
bsd-3-clause
quote p = char '\'' <> p
32
quote p = char '\'' <> p
32
quote p = char '\'' <> p
32
false
false
0
6
14
16
7
9
null
null
Teaspot-Studio/Urho3D-Haskell
src/Graphics/Urho3D/Graphics/AnimatedModel.hs
mit
animatedModelSetAnimationLodBias :: (Parent AnimatedModel a, Pointer p a, MonadIO m) => p -- ^ Pointer to AnimatedModel or ascentor -> Float -- ^ bias -> m () animatedModelSetAnimationLodBias p bias = liftIO $ do let ptr = parentPointer p bias' = realToFrac bias [C.exp| void { $(AnimatedModel* ptr)->Set...
504
animatedModelSetAnimationLodBias :: (Parent AnimatedModel a, Pointer p a, MonadIO m) => p -- ^ Pointer to AnimatedModel or ascentor -> Float -- ^ bias -> m () animatedModelSetAnimationLodBias p bias = liftIO $ do let ptr = parentPointer p bias' = realToFrac bias [C.exp| void { $(AnimatedModel* ptr)->Set...
504
animatedModelSetAnimationLodBias p bias = liftIO $ do let ptr = parentPointer p bias' = realToFrac bias [C.exp| void { $(AnimatedModel* ptr)->SetAnimationLodBias($(float bias')) } |] -- | Set whether to update animation and the bounding box when not visible. Recommended to enable for physically controlled mo...
339
false
true
0
11
90
91
47
44
null
null
ajhc/drift
src/GetOpt.hs
mit
usageInfo :: String -- header -> [OptDescr a] -- option descriptors -> String -- nicely formatted decription of options usageInfo header optDescr = unlines (header:table) where (ss,ls,ds) = (unzip3 . map fmtOpt) optDescr table ...
572
usageInfo :: String -- header -> [OptDescr a] -- option descriptors -> String usageInfo header optDescr = unlines (header:table) where (ss,ls,ds) = (unzip3 . map fmtOpt) optDescr table = zipWith3 paste (sameLen ss) (sameLen ls) (sameLen ds) ...
511
usageInfo header optDescr = unlines (header:table) where (ss,ls,ds) = (unzip3 . map fmtOpt) optDescr table = zipWith3 paste (sameLen ss) (sameLen ls) (sameLen ds) paste x y z = " " ++ x ++ " " ++ y ++ " " ++ z sameLen xs = flushLeft ((maximum . map length) xs) xs ...
381
true
true
0
10
221
212
104
108
null
null
ion1/combine-tiles
CombineTiles.hs
isc
genMSL :: String -> [Place] -> Xml Doc genMSL outfile places = doc defaultDocInfo $ xelem "group" $ xelems . concat $ [ map placeImage placesIds , [ xelem "image" $ xattr "size" (show width ++ "x" ++ show height) <> xattr "background" "transparent" ...
1,193
genMSL :: String -> [Place] -> Xml Doc genMSL outfile places = doc defaultDocInfo $ xelem "group" $ xelems . concat $ [ map placeImage placesIds , [ xelem "image" $ xattr "size" (show width ++ "x" ++ show height) <> xattr "background" "transparent" ...
1,193
genMSL outfile places = doc defaultDocInfo $ xelem "group" $ xelems . concat $ [ map placeImage placesIds , [ xelem "image" $ xattr "size" (show width ++ "x" ++ show height) <> xattr "background" "transparent" <> xattr "color" "transpar...
1,154
false
true
0
16
403
480
244
236
null
null
kosmikus/cabal
Cabal/Distribution/Simple/PreProcess.hs
bsd-3-clause
ppCpphs :: [String] -> BuildInfo -> LocalBuildInfo -> PreProcessor ppCpphs extraArgs _bi lbi = PreProcessor { platformIndependent = False, runPreProcessor = mkSimplePreProcessor $ \inFile outFile verbosity -> do (cpphsProg, cpphsVersion, _) <- requireProgramVersion verbosity ...
660
ppCpphs :: [String] -> BuildInfo -> LocalBuildInfo -> PreProcessor ppCpphs extraArgs _bi lbi = PreProcessor { platformIndependent = False, runPreProcessor = mkSimplePreProcessor $ \inFile outFile verbosity -> do (cpphsProg, cpphsVersion, _) <- requireProgramVersion verbosity ...
660
ppCpphs extraArgs _bi lbi = PreProcessor { platformIndependent = False, runPreProcessor = mkSimplePreProcessor $ \inFile outFile verbosity -> do (cpphsProg, cpphsVersion, _) <- requireProgramVersion verbosity cpphsProgram anyVersion (withPrograms lbi) rawSys...
593
false
true
0
19
192
177
94
83
null
null
muspellsson/hiccup
TclLib/StringCmds.hs
lgpl-2.1
mapReplaceTests = TestList [ ([("a","1"),("b","2")], "aabbca", False) `should_be` "1122c1" ,([("a","1"),("b","2")], "bca", False) `should_be` "2c1" ,([("a","1"),("b","2")], "BCA", True) `should_be` "2C1" ,([("A","1"),("B","2")], "bca", True) `should_be` "2c1" ] where should_be (ml,s,nocase) b = b ~=? map...
339
mapReplaceTests = TestList [ ([("a","1"),("b","2")], "aabbca", False) `should_be` "1122c1" ,([("a","1"),("b","2")], "bca", False) `should_be` "2c1" ,([("a","1"),("b","2")], "BCA", True) `should_be` "2C1" ,([("A","1"),("B","2")], "bca", True) `should_be` "2c1" ] where should_be (ml,s,nocase) b = b ~=? map...
339
mapReplaceTests = TestList [ ([("a","1"),("b","2")], "aabbca", False) `should_be` "1122c1" ,([("a","1"),("b","2")], "bca", False) `should_be` "2c1" ,([("a","1"),("b","2")], "BCA", True) `should_be` "2C1" ,([("A","1"),("B","2")], "bca", True) `should_be` "2c1" ] where should_be (ml,s,nocase) b = b ~=? map...
339
false
false
0
10
50
185
117
68
null
null
wavewave/xournal-builder
src/Text/Xournal/Builder.hs
bsd-2-clause
fromBackground :: Background -> Builder fromBackground bkg = case bkg of Background typ col sty -> fromByteString "<background type=\"" <> fromByteString typ <> fromByteString "\" color=\"" <> fromByteString col <> fromByteString "\" style=\"" <> fromByteString sty <...
922
fromBackground :: Background -> Builder fromBackground bkg = case bkg of Background typ col sty -> fromByteString "<background type=\"" <> fromByteString typ <> fromByteString "\" color=\"" <> fromByteString col <> fromByteString "\" style=\"" <> fromByteString sty <>...
921
fromBackground bkg = case bkg of Background typ col sty -> fromByteString "<background type=\"" <> fromByteString typ <> fromByteString "\" color=\"" <> fromByteString col <> fromByteString "\" style=\"" <> fromByteString sty <> fromByteString "\"/>\n" BackgroundP...
881
false
true
0
17
303
209
94
115
null
null
spoj/mwtools
app/sbl.hs
mit
sortOn :: Ord b => (a -> b) -> [a] -> [a] sortOn op = sortBy (compare `on` op)
78
sortOn :: Ord b => (a -> b) -> [a] -> [a] sortOn op = sortBy (compare `on` op)
78
sortOn op = sortBy (compare `on` op)
36
false
true
0
8
18
54
29
25
null
null
facebookincubator/duckling
Duckling/Rules/SW.hs
bsd-3-clause
langRules (Seal Duration) = []
30
langRules (Seal Duration) = []
30
langRules (Seal Duration) = []
30
false
false
0
7
4
17
8
9
null
null
GaloisInc/halvm-ghc
compiler/basicTypes/RdrName.hs
bsd-3-clause
shadowNames :: GlobalRdrEnv -> [Name] -> GlobalRdrEnv shadowNames = foldl shadowName
84
shadowNames :: GlobalRdrEnv -> [Name] -> GlobalRdrEnv shadowNames = foldl shadowName
84
shadowNames = foldl shadowName
30
false
true
0
8
10
32
14
18
null
null
brendanhay/gogol
gogol-dlp/gen/Network/Google/Resource/DLP/Projects/StoredInfoTypes/Patch.hs
mpl-2.0
-- | Multipart request metadata. psitpPayload :: Lens' ProjectsStoredInfoTypesPatch GooglePrivacyDlpV2UpdateStoredInfoTypeRequest psitpPayload = lens _psitpPayload (\ s a -> s{_psitpPayload = a})
197
psitpPayload :: Lens' ProjectsStoredInfoTypesPatch GooglePrivacyDlpV2UpdateStoredInfoTypeRequest psitpPayload = lens _psitpPayload (\ s a -> s{_psitpPayload = a})
164
psitpPayload = lens _psitpPayload (\ s a -> s{_psitpPayload = a})
67
true
true
0
9
22
42
22
20
null
null
amccausl/Swish
Swish/HaskellRDF/RDFDatatypeXsdIntegerTest.hs
lgpl-2.1
sum02fwd = [ "_:a rdf:_2 \"31\"^^xsd:integer . " ]
55
sum02fwd = [ "_:a rdf:_2 \"31\"^^xsd:integer . " ]
55
sum02fwd = [ "_:a rdf:_2 \"31\"^^xsd:integer . " ]
55
false
false
0
5
13
9
5
4
null
null
spacekitteh/compdata
src/Data/Comp/Derive/Show.hs
bsd-3-clause
showCon' :: String -> [String] -> String showCon' con args = unwords $ con : filter (not.null) args
99
showCon' :: String -> [String] -> String showCon' con args = unwords $ con : filter (not.null) args
99
showCon' con args = unwords $ con : filter (not.null) args
58
false
true
0
8
17
45
23
22
null
null
brendanhay/gogol
gogol-tagmanager/gen/Network/Google/TagManager/Types/Product.hs
mpl-2.0
-- | The name of the repository for the community gallery template. grRepository :: Lens' GalleryReference (Maybe Text) grRepository = lens _grRepository (\ s a -> s{_grRepository = a})
187
grRepository :: Lens' GalleryReference (Maybe Text) grRepository = lens _grRepository (\ s a -> s{_grRepository = a})
119
grRepository = lens _grRepository (\ s a -> s{_grRepository = a})
67
true
true
1
9
30
50
25
25
null
null
coghex/abridgefaraway
src/GLUtil/Font.hs
bsd-3-clause
findLetter DCFONT '3' = (69, 8)
33
findLetter DCFONT '3' = (69, 8)
33
findLetter DCFONT '3' = (69, 8)
33
false
false
0
5
7
19
9
10
null
null
ktvoelker/FLang
src/Annotation.hs
gpl-3.0
mkRunLensMatch' :: Name -> Int -> Q Match mkRunLensMatch' name n = do oldAnnName <- newName "oldAnn" newAnnName <- newName "newAnn" otherNames <- mapM (const $ newName "other") [1 .. n] let { updater = LamE [VarP newAnnName] $ foldl AppE (ConE name) $ map VarE $ newAnnName : otherNames...
512
mkRunLensMatch' :: Name -> Int -> Q Match mkRunLensMatch' name n = do oldAnnName <- newName "oldAnn" newAnnName <- newName "newAnn" otherNames <- mapM (const $ newName "other") [1 .. n] let { updater = LamE [VarP newAnnName] $ foldl AppE (ConE name) $ map VarE $ newAnnName : otherNames...
512
mkRunLensMatch' name n = do oldAnnName <- newName "oldAnn" newAnnName <- newName "newAnn" otherNames <- mapM (const $ newName "other") [1 .. n] let { updater = LamE [VarP newAnnName] $ foldl AppE (ConE name) $ map VarE $ newAnnName : otherNames } return $ Match (ConP name $ map...
470
false
true
0
19
144
214
101
113
null
null
fgaray/shakespeare
Text/Shakespeare/I18N.hs
mit
toCon :: String -> SDef -> Con toCon dt (SDef c vs _) = RecC (mkName $ "Msg" ++ c) $ map go vs where go (n, t) = (varName dt n, NotStrict, ConT $ mkName t)
165
toCon :: String -> SDef -> Con toCon dt (SDef c vs _) = RecC (mkName $ "Msg" ++ c) $ map go vs where go (n, t) = (varName dt n, NotStrict, ConT $ mkName t)
165
toCon dt (SDef c vs _) = RecC (mkName $ "Msg" ++ c) $ map go vs where go (n, t) = (varName dt n, NotStrict, ConT $ mkName t)
134
false
true
2
10
46
104
49
55
null
null
ezyang/ghc
compiler/simplCore/CoreMonad.hs
bsd-3-clause
doSimplTick _ _ (VerySimplCount n) = VerySimplCount (n+1)
57
doSimplTick _ _ (VerySimplCount n) = VerySimplCount (n+1)
57
doSimplTick _ _ (VerySimplCount n) = VerySimplCount (n+1)
57
false
false
1
7
7
29
13
16
null
null
MerelyAPseudonym/cmdtheline
test/Arith.hs
mit
bin :: Parser Bin bin = choice [ pow, mul, div, add, sub ] where pow = tok $ Pow <$ char '^' mul = tok $ Mul <$ char '*' div = tok $ Div <$ char '/' add = tok $ Add <$ char '+' sub = tok $ Sub <$ char '-'
216
bin :: Parser Bin bin = choice [ pow, mul, div, add, sub ] where pow = tok $ Pow <$ char '^' mul = tok $ Mul <$ char '*' div = tok $ Div <$ char '/' add = tok $ Add <$ char '+' sub = tok $ Sub <$ char '-'
216
bin = choice [ pow, mul, div, add, sub ] where pow = tok $ Pow <$ char '^' mul = tok $ Mul <$ char '*' div = tok $ Div <$ char '/' add = tok $ Add <$ char '+' sub = tok $ Sub <$ char '-'
198
false
true
0
6
66
115
59
56
null
null
OS2World/DEV-UTIL-HUGS
oldlib/MyersStack.hs
bsd-3-clause
foldl1 f E = error "MyersStack.foldl1: empty sequence"
54
foldl1 f E = error "MyersStack.foldl1: empty sequence"
54
foldl1 f E = error "MyersStack.foldl1: empty sequence"
54
false
false
0
5
7
15
6
9
null
null
stackbuilders/keyword-args
src/Main.hs
mit
runCheck :: IO () runCheck = do f <- getContents case parseConfig f of Left e -> ioError $ userError $ "Parse error: " ++ show e Right config -> putStr $ unpack $ encode $ configToList config
211
runCheck :: IO () runCheck = do f <- getContents case parseConfig f of Left e -> ioError $ userError $ "Parse error: " ++ show e Right config -> putStr $ unpack $ encode $ configToList config
211
runCheck = do f <- getContents case parseConfig f of Left e -> ioError $ userError $ "Parse error: " ++ show e Right config -> putStr $ unpack $ encode $ configToList config
193
false
true
0
13
57
87
38
49
null
null
hsyl20/ViperVM
haskus-system/src/lib/Haskus/Arch/X86_64/ISA/Encoding.hs
bsd-3-clause
legacyPrefixGroup :: LegacyPrefix -> Int legacyPrefixGroup = \case LegacyPrefix66 -> 1 LegacyPrefix67 -> 2 LegacyPrefix2E -> 3 LegacyPrefix3E -> 3 LegacyPrefix26 -> 3 LegacyPrefix64 -> 3 LegacyPrefix65 -> 3 LegacyPrefix36 -> 3 LegacyPrefixF0 -> 4 LegacyPrefixF3 -> 5 LegacyPref...
498
legacyPrefixGroup :: LegacyPrefix -> Int legacyPrefixGroup = \case LegacyPrefix66 -> 1 LegacyPrefix67 -> 2 LegacyPrefix2E -> 3 LegacyPrefix3E -> 3 LegacyPrefix26 -> 3 LegacyPrefix64 -> 3 LegacyPrefix65 -> 3 LegacyPrefix36 -> 3 LegacyPrefixF0 -> 4 LegacyPrefixF3 -> 5 LegacyPref...
498
legacyPrefixGroup = \case LegacyPrefix66 -> 1 LegacyPrefix67 -> 2 LegacyPrefix2E -> 3 LegacyPrefix3E -> 3 LegacyPrefix26 -> 3 LegacyPrefix64 -> 3 LegacyPrefix65 -> 3 LegacyPrefix36 -> 3 LegacyPrefixF0 -> 4 LegacyPrefixF3 -> 5 LegacyPrefixF2 -> 5 -----------------------------...
457
false
true
11
5
95
108
46
62
null
null
Lena-P/clasterer
src/clasterer/Counter.hs
mit
calculateBelongsMatrix :: Table Double -> Table Double -> ComLineArgs -> Table Double calculateBelongsMatrix prevMatrix parsedData args = do let centers = findNewCenters parsedData prevMatrix newMatrix = calculateNewMatrix (metric args) parsedData centers if resultCalculated prevMatrix newMatrix (ac...
417
calculateBelongsMatrix :: Table Double -> Table Double -> ComLineArgs -> Table Double calculateBelongsMatrix prevMatrix parsedData args = do let centers = findNewCenters parsedData prevMatrix newMatrix = calculateNewMatrix (metric args) parsedData centers if resultCalculated prevMatrix newMatrix (ac...
417
calculateBelongsMatrix prevMatrix parsedData args = do let centers = findNewCenters parsedData prevMatrix newMatrix = calculateNewMatrix (metric args) parsedData centers if resultCalculated prevMatrix newMatrix (accuracy args) then newMatrix else calculateBelongsMatrix newMatrix pars...
331
false
true
0
12
79
102
48
54
null
null
ekmett/ghc
compiler/cmm/PprC.hs
bsd-3-clause
isStrangeTypeGlobal CurrentNursery = True
46
isStrangeTypeGlobal CurrentNursery = True
46
isStrangeTypeGlobal CurrentNursery = True
46
false
false
0
4
8
10
4
6
null
null
ezyang/ghc
testsuite/tests/quasiquotation/qq006/Expr.hs
bsd-3-clause
addop = do{ symbol "+"; return $ BinopExpr AddOp } <|> do{ symbol "-"; return $ BinopExpr SubOp }
109
addop = do{ symbol "+"; return $ BinopExpr AddOp } <|> do{ symbol "-"; return $ BinopExpr SubOp }
109
addop = do{ symbol "+"; return $ BinopExpr AddOp } <|> do{ symbol "-"; return $ BinopExpr SubOp }
109
false
false
0
9
30
48
23
25
null
null
olsner/ghc
compiler/prelude/THNames.hs
bsd-3-clause
conTName = libFun (fsLit "conT") conTIdKey
63
conTName = libFun (fsLit "conT") conTIdKey
63
conTName = libFun (fsLit "conT") conTIdKey
63
false
false
0
7
26
17
8
9
null
null
stschiff/rarecoal
src/RarecoalLib/Core/Test.hs
gpl-3.0
prop_fullSplitIsJoinForA :: Property prop_fullSplitIsJoinForA = forAll (suchThat gen (\(_, k, l) -> k /= l)) go where gen = (,,) <$> genAVec <*> genPopIndex <*> genPopIndex go :: (V.Vector Double, Int, Int) -> Bool go (aVec, k, l) = aVec1 == aVec2 where [aVec1, aVec2] = runST $ mapM makeVec ...
602
prop_fullSplitIsJoinForA :: Property prop_fullSplitIsJoinForA = forAll (suchThat gen (\(_, k, l) -> k /= l)) go where gen = (,,) <$> genAVec <*> genPopIndex <*> genPopIndex go :: (V.Vector Double, Int, Int) -> Bool go (aVec, k, l) = aVec1 == aVec2 where [aVec1, aVec2] = runST $ mapM makeVec ...
602
prop_fullSplitIsJoinForA = forAll (suchThat gen (\(_, k, l) -> k /= l)) go where gen = (,,) <$> genAVec <*> genPopIndex <*> genPopIndex go :: (V.Vector Double, Int, Int) -> Bool go (aVec, k, l) = aVec1 == aVec2 where [aVec1, aVec2] = runST $ mapM makeVec twoFuncs makeVec :: (VM.MVect...
565
false
true
4
12
182
275
136
139
null
null
ddssff/process-listlike-old
Tests/Main.hs
mit
testCharInstances :: (forall a c. (Show a, ListLikePlus a c) => a -> Test) -> Test testCharInstances mkTest = mappend (testLazyCharInstances mkTest) (testStrictCharInstances mkTest)
181
testCharInstances :: (forall a c. (Show a, ListLikePlus a c) => a -> Test) -> Test testCharInstances mkTest = mappend (testLazyCharInstances mkTest) (testStrictCharInstances mkTest)
181
testCharInstances mkTest = mappend (testLazyCharInstances mkTest) (testStrictCharInstances mkTest)
98
false
true
0
9
23
65
34
31
null
null
brendanhay/gogol
gogol-compute/gen/Network/Google/Resource/Compute/Disks/TestIAMPermissions.hs
mpl-2.0
-- | Creates a value of 'DisksTestIAMPermissions' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'dtipProject' -- -- * 'dtipZone' -- -- * 'dtipPayload' -- -- * 'dtipResource' disksTestIAMPermissions :: Text -- ^ 'dtipProject' ...
704
disksTestIAMPermissions :: Text -- ^ 'dtipProject' -> Text -- ^ 'dtipZone' -> TestPermissionsRequest -- ^ 'dtipPayload' -> Text -- ^ 'dtipResource' -> DisksTestIAMPermissions disksTestIAMPermissions pDtipProject_ pDtipZone_ pDtipPayload_ pDtipResource_ = DisksTestIAMPermissions' { _dtipProject...
443
disksTestIAMPermissions pDtipProject_ pDtipZone_ pDtipPayload_ pDtipResource_ = DisksTestIAMPermissions' { _dtipProject = pDtipProject_ , _dtipZone = pDtipZone_ , _dtipPayload = pDtipPayload_ , _dtipResource = pDtipResource_ }
248
true
true
0
8
134
77
50
27
null
null
uduki/hsQt
Qtc/Gui/QGraphicsSceneMouseEvent.hs
bsd-2-clause
qbuttonDownScreenPos :: QGraphicsSceneMouseEvent a -> ((MouseButton)) -> IO (QPoint ()) qbuttonDownScreenPos x0 (x1) = withQPointResult $ withObjectPtr x0 $ \cobj_x0 -> qtc_QGraphicsSceneMouseEvent_buttonDownScreenPos cobj_x0 (toCLong $ qEnum_toInt x1)
262
qbuttonDownScreenPos :: QGraphicsSceneMouseEvent a -> ((MouseButton)) -> IO (QPoint ()) qbuttonDownScreenPos x0 (x1) = withQPointResult $ withObjectPtr x0 $ \cobj_x0 -> qtc_QGraphicsSceneMouseEvent_buttonDownScreenPos cobj_x0 (toCLong $ qEnum_toInt x1)
262
qbuttonDownScreenPos x0 (x1) = withQPointResult $ withObjectPtr x0 $ \cobj_x0 -> qtc_QGraphicsSceneMouseEvent_buttonDownScreenPos cobj_x0 (toCLong $ qEnum_toInt x1)
174
false
true
4
10
36
85
40
45
null
null
chrisdone/css
src/Language/CSS/Properties.hs
bsd-3-clause
-- Generated from http://www.w3.org/TR/CSS21/propidx.html -- | CSS property: azimuth azimuth :: Text -> CSS (Either Property Rule) azimuth = prop "azimuth"
156
azimuth :: Text -> CSS (Either Property Rule) azimuth = prop "azimuth"
70
azimuth = prop "azimuth"
24
true
true
0
8
21
31
16
15
null
null