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
hvr/jhc
src/Cmm/Op.hs
mit
commuteBinOp FGte = return FLte
31
commuteBinOp FGte = return FLte
31
commuteBinOp FGte = return FLte
31
false
false
0
5
4
12
5
7
null
null
CarloMicieli/fun-with-haskell
src/lyah/starting-out.hs
apache-2.0
doubleUs :: (Num a) => a -> a -> a doubleUs m n = doubleMe m + doubleMe n
73
doubleUs :: (Num a) => a -> a -> a doubleUs m n = doubleMe m + doubleMe n
73
doubleUs m n = doubleMe m + doubleMe n
38
false
true
0
7
18
43
21
22
null
null
dawedawe/kripkeweb
src/Model.hs
bsd-3-clause
termAsLamType _ BdySoundex _ t = return ((T.pack . soundexNARA . T.unpack) t)
81
termAsLamType _ BdySoundex _ t = return ((T.pack . soundexNARA . T.unpack) t)
81
termAsLamType _ BdySoundex _ t = return ((T.pack . soundexNARA . T.unpack) t)
81
false
false
1
11
16
37
18
19
null
null
mydaum/cabal
cabal-install/tests/UnitTests/Distribution/Solver/Modular/Solver.hs
bsd-3-clause
dbStanzaPreferences1 :: ExampleDb dbStanzaPreferences1 = [ Right $ exAv "pkg" 1 [] `withTest` ExTest "test" [ExAny "test-dep"] , Right $ exAv "test-dep" 1 [] ]
167
dbStanzaPreferences1 :: ExampleDb dbStanzaPreferences1 = [ Right $ exAv "pkg" 1 [] `withTest` ExTest "test" [ExAny "test-dep"] , Right $ exAv "test-dep" 1 [] ]
167
dbStanzaPreferences1 = [ Right $ exAv "pkg" 1 [] `withTest` ExTest "test" [ExAny "test-dep"] , Right $ exAv "test-dep" 1 [] ]
133
false
true
0
9
32
60
31
29
null
null
TakeLab/gpkex
kex.hs
bsd-3-clause
takeTuple :: [String] -> [[String]] takeTuple [] = []
53
takeTuple :: [String] -> [[String]] takeTuple [] = []
53
takeTuple [] = []
17
false
true
0
7
8
31
17
14
null
null
tmiw/4peas
Handler/Recipe.hs
bsd-2-clause
insertAllTags :: PersistQuery backend m => Key backend (RecipeGeneric backend) -> [Text] -> backend m [a] insertAllTags _ [] = return []
136
insertAllTags :: PersistQuery backend m => Key backend (RecipeGeneric backend) -> [Text] -> backend m [a] insertAllTags _ [] = return []
136
insertAllTags _ [] = return []
30
false
true
0
10
21
67
31
36
null
null
yangjueji/hblas
src/Numerical/HBLAS/BLAS/Level1.hs
bsd-3-clause
zscal :: PrimMonad m => ScalFun (Complex Double) (Complex Double) (PrimState m) m zscal = scalAbstraction "zscal" cblas_zscal_safe cblas_zscal_unsafe withRStorable_
164
zscal :: PrimMonad m => ScalFun (Complex Double) (Complex Double) (PrimState m) m zscal = scalAbstraction "zscal" cblas_zscal_safe cblas_zscal_unsafe withRStorable_
164
zscal = scalAbstraction "zscal" cblas_zscal_safe cblas_zscal_unsafe withRStorable_
82
false
true
0
8
19
54
26
28
null
null
brendanhay/gogol
gogol-admin-directory/gen/Network/Google/Resource/Directory/OrgUnits/Insert.hs
mpl-2.0
-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). ouiUploadProtocol :: Lens' OrgUnitsInsert (Maybe Text) ouiUploadProtocol = lens _ouiUploadProtocol (\ s a -> s{_ouiUploadProtocol = a})
205
ouiUploadProtocol :: Lens' OrgUnitsInsert (Maybe Text) ouiUploadProtocol = lens _ouiUploadProtocol (\ s a -> s{_ouiUploadProtocol = a})
143
ouiUploadProtocol = lens _ouiUploadProtocol (\ s a -> s{_ouiUploadProtocol = a})
88
true
true
0
8
33
49
25
24
null
null
sdiehl/ghc
compiler/GHC/HsToCore/PmCheck/Types.hs
bsd-3-clause
-- | Undecidable equality for values represented by 'ConLike's. -- See Note [Undecidable Equality for PmAltCons]. -- 'PatSynCon's aren't enforced to be generative, so two syntactically different -- 'PatSynCon's might match the exact same values. Without looking into and -- reasoning about the pattern synonym's definiti...
657
eqConLike :: ConLike -> ConLike -> PmEquality eqConLike (RealDataCon dc1) (RealDataCon dc2) = decEquality (dc1 == dc2)
118
eqConLike (RealDataCon dc1) (RealDataCon dc2) = decEquality (dc1 == dc2)
72
true
true
0
10
98
61
34
27
null
null
hvr/text
Data/Text/Read.hs
bsd-2-clause
hex txt | T.null h = Left "input does not start with a hexadecimal digit" | otherwise = Right (T.foldl' go 0 h, t) where (# h,t #) = span_ isHexDigit txt go n d = (n * 16 + fromIntegral (hexDigitToInt d)) -- | Read an optional leading sign character (@\'-\'@ or @\'+\'@) and -- apply it to the resul...
351
hex txt | T.null h = Left "input does not start with a hexadecimal digit" | otherwise = Right (T.foldl' go 0 h, t) where (# h,t #) = span_ isHexDigit txt go n d = (n * 16 + fromIntegral (hexDigitToInt d)) -- | Read an optional leading sign character (@\'-\'@ or @\'+\'@) and -- apply it to the resul...
351
hex txt | T.null h = Left "input does not start with a hexadecimal digit" | otherwise = Right (T.foldl' go 0 h, t) where (# h,t #) = span_ isHexDigit txt go n d = (n * 16 + fromIntegral (hexDigitToInt d)) -- | Read an optional leading sign character (@\'-\'@ or @\'+\'@) and -- apply it to the resul...
351
false
false
2
10
86
101
49
52
null
null
tomahawkins/afv
src/Error.hs
bsd-3-clause
err :: (Pretty a, Pos a) => a -> String -> b err a m = error $ position a ++ ": " ++ m ++ ": " ++ show (pretty a)
113
err :: (Pretty a, Pos a) => a -> String -> b err a m = error $ position a ++ ": " ++ m ++ ": " ++ show (pretty a)
113
err a m = error $ position a ++ ": " ++ m ++ ": " ++ show (pretty a)
68
false
true
4
9
31
78
36
42
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/enumFrom_6.hs
mit
takeWhile2 p (Cons x xs) = takeWhile1 p x xs (p x)
50
takeWhile2 p (Cons x xs) = takeWhile1 p x xs (p x)
50
takeWhile2 p (Cons x xs) = takeWhile1 p x xs (p x)
50
false
false
0
7
11
36
16
20
null
null
antalsz/hs-to-coq
examples/ghc/gen-files/Lexer.hs
mit
isALRopen ITif = True
32
isALRopen ITif = True
32
isALRopen ITif = True
32
false
false
0
5
14
9
4
5
null
null
ezyang/ghc
ghc/Main.hs
bsd-3-clause
doMakeMode = mkPostLoadMode DoMake
34
doMakeMode = mkPostLoadMode DoMake
34
doMakeMode = mkPostLoadMode DoMake
34
false
false
0
5
3
9
4
5
null
null
Danten/lejf
src/Evaluate.hs
bsd-3-clause
evaluate (LeftTerm t) args = evaluateL t $ \x v t' -> do bindVal' x v $ evaluate t' args
90
evaluate (LeftTerm t) args = evaluateL t $ \x v t' -> do bindVal' x v $ evaluate t' args
90
evaluate (LeftTerm t) args = evaluateL t $ \x v t' -> do bindVal' x v $ evaluate t' args
90
false
false
0
10
21
50
23
27
null
null
nushio3/ghc
compiler/main/ErrUtils.hs
bsd-3-clause
beautifyDumpName flag = let str = show flag suff = case stripPrefix "Opt_D_" str of Just x -> x Nothing -> panic ("Bad flag name: " ++ str) dash = map (\c -> if c == '_' then '-' else c) suff in dash
245
beautifyDumpName flag = let str = show flag suff = case stripPrefix "Opt_D_" str of Just x -> x Nothing -> panic ("Bad flag name: " ++ str) dash = map (\c -> if c == '_' then '-' else c) suff in dash
245
beautifyDumpName flag = let str = show flag suff = case stripPrefix "Opt_D_" str of Just x -> x Nothing -> panic ("Bad flag name: " ++ str) dash = map (\c -> if c == '_' then '-' else c) suff in dash
245
false
false
1
14
89
96
46
50
null
null
mrakgr/futhark
src/Futhark/Internalise.hs
bsd-3-clause
internaliseExp desc (E.UnOp E.Negate e _) = do e' <- internaliseExp1 "negate_arg" e et <- subExpType e' case et of I.Prim (I.IntType t) -> letTupExp' desc $ I.PrimOp $ I.BinOp (I.Sub t) (I.intConst t 0) e' I.Prim (I.FloatType t) -> letTupExp' desc $ I.PrimOp $ I.BinOp (I...
438
internaliseExp desc (E.UnOp E.Negate e _) = do e' <- internaliseExp1 "negate_arg" e et <- subExpType e' case et of I.Prim (I.IntType t) -> letTupExp' desc $ I.PrimOp $ I.BinOp (I.Sub t) (I.intConst t 0) e' I.Prim (I.FloatType t) -> letTupExp' desc $ I.PrimOp $ I.BinOp (I...
438
internaliseExp desc (E.UnOp E.Negate e _) = do e' <- internaliseExp1 "negate_arg" e et <- subExpType e' case et of I.Prim (I.IntType t) -> letTupExp' desc $ I.PrimOp $ I.BinOp (I.Sub t) (I.intConst t 0) e' I.Prim (I.FloatType t) -> letTupExp' desc $ I.PrimOp $ I.BinOp (I...
438
false
false
0
14
121
181
84
97
null
null
geophf/1HaskellADay
exercises/HAD/Y2018/M06/D20/Exercise.hs
mit
art2vect :: SymbolTable -> Article -> WordVect art2vect syms article = undefined
80
art2vect :: SymbolTable -> Article -> WordVect art2vect syms article = undefined
80
art2vect syms article = undefined
33
false
true
0
6
11
29
13
16
null
null
Ralith/hhue
src/Main.hs
mit
main :: IO () main = do args <- getArgs configDir <- (</> ".config/hhue") <$> getHomeDirectory createDirectoryIfMissing True configDir let keyFile = configDir </> "key" key <- catchIOError (decodeUtf8 <$> BS.readFile keyFile) $ \err -> case isDoesNotExistError err of False -> ioError err True ...
4,794
main :: IO () main = do args <- getArgs configDir <- (</> ".config/hhue") <$> getHomeDirectory createDirectoryIfMissing True configDir let keyFile = configDir </> "key" key <- catchIOError (decodeUtf8 <$> BS.readFile keyFile) $ \err -> case isDoesNotExistError err of False -> ioError err True ...
4,794
main = do args <- getArgs configDir <- (</> ".config/hhue") <$> getHomeDirectory createDirectoryIfMissing True configDir let keyFile = configDir </> "key" key <- catchIOError (decodeUtf8 <$> BS.readFile keyFile) $ \err -> case isDoesNotExistError err of False -> ioError err True -> do ...
4,780
false
true
0
24
1,474
1,661
832
829
null
null
mdsteele/pylos
src/Pylos/Event.hs
gpl-3.0
fromSDLKey SDL.SDLK_RIGHT = KeyRightArrow
41
fromSDLKey SDL.SDLK_RIGHT = KeyRightArrow
41
fromSDLKey SDL.SDLK_RIGHT = KeyRightArrow
41
false
false
0
6
3
11
5
6
null
null
oldmanmike/ghc
compiler/vectorise/Vectorise/Type/Classify.hs
bsd-3-clause
-- Compute mutually recursive groups of tycons in topological order. -- tyConGroups :: [TyCon] -> [TyConGroup] tyConGroups tcs = map mk_grp (stronglyConnCompFromEdgedVertices edges) where edges = [((tc, ds), tc, uniqSetToList ds) | tc <- tcs , let ds = tyConsOfTyCon tc] mk_grp...
542
tyConGroups :: [TyCon] -> [TyConGroup] tyConGroups tcs = map mk_grp (stronglyConnCompFromEdgedVertices edges) where edges = [((tc, ds), tc, uniqSetToList ds) | tc <- tcs , let ds = tyConsOfTyCon tc] mk_grp (AcyclicSCC (tc, ds)) = ([tc], ds) mk_grp (CyclicSCC els) = (...
470
tyConGroups tcs = map mk_grp (stronglyConnCompFromEdgedVertices edges) where edges = [((tc, ds), tc, uniqSetToList ds) | tc <- tcs , let ds = tyConsOfTyCon tc] mk_grp (AcyclicSCC (tc, ds)) = ([tc], ds) mk_grp (CyclicSCC els) = (tcs, unionManyUniqSets dss) where...
431
true
true
0
10
143
158
87
71
null
null
parsonsmatt/cis194
hw4/Hw4.hs
apache-2.0
-- Exercise 3: xor :: [Bool] -> Bool xor = foldl1' (/=)
56
xor :: [Bool] -> Bool xor = foldl1' (/=)
40
xor = foldl1' (/=)
18
true
true
0
6
12
24
14
10
null
null
geophf/1HaskellADay
exercises/HAD/Y2021/M04/D28/Exercise.hs
mit
xyz = [Trend (Just 10) (Just 20) (Just 27), Trend (Just 11) Nothing (Just 12)]
78
xyz = [Trend (Just 10) (Just 20) (Just 27), Trend (Just 11) Nothing (Just 12)]
78
xyz = [Trend (Just 10) (Just 20) (Just 27), Trend (Just 11) Nothing (Just 12)]
78
false
false
1
8
14
59
28
31
null
null
jwiegley/hackports
Digest.hs
bsd-3-clause
sha1sum :: B.ByteString -> String sha1sum p = unsafePerformIO $ B.useAsCStringLen p $ \(ptr,n) -> do allocaBytes sha1_digest_length $ \digest_ptr -> do digest <- c_sha1 ptr (fromIntegral n) digest_ptr go digest 0 [] where -- print it in 0-padded hex format go :: Ptr Word8 -> Int -> [Stri...
663
sha1sum :: B.ByteString -> String sha1sum p = unsafePerformIO $ B.useAsCStringLen p $ \(ptr,n) -> do allocaBytes sha1_digest_length $ \digest_ptr -> do digest <- c_sha1 ptr (fromIntegral n) digest_ptr go digest 0 [] where -- print it in 0-padded hex format go :: Ptr Word8 -> Int -> [Stri...
663
sha1sum p = unsafePerformIO $ B.useAsCStringLen p $ \(ptr,n) -> do allocaBytes sha1_digest_length $ \digest_ptr -> do digest <- c_sha1 ptr (fromIntegral n) digest_ptr go digest 0 [] where -- print it in 0-padded hex format go :: Ptr Word8 -> Int -> [String] -> IO String #ifndef __HADDOCK...
629
false
true
2
16
233
273
134
139
null
null
SFML-haskell/SFML
src/SFML/Graphics/Shape.hs
mit
-- | Create a new shape. createShape :: Ptr a -- ^ Callback that provides the point count of the shape -> Ptr b -- ^ Callback that provides the points of the shape -> Ptr c -- ^ Data to pass to the callback functions -> IO Shape createShape = sfShape_create
274
createShape :: Ptr a -- ^ Callback that provides the point count of the shape -> Ptr b -- ^ Callback that provides the points of the shape -> Ptr c -- ^ Data to pass to the callback functions -> IO Shape createShape = sfShape_create
248
createShape = sfShape_create
28
true
true
0
8
68
39
20
19
null
null
forste/haReFork
StrategyLib-4.0-beta/examples/joos-rule02/Instance.hs
bsd-3-clause
-- Introduction of a method declaration introduceJoos :: MethodDecl -> TrafoJoos introduceJoos = introduce declaredJoos referencedJoos unwrapMethods
149
introduceJoos :: MethodDecl -> TrafoJoos introduceJoos = introduce declaredJoos referencedJoos unwrapMethods
109
introduceJoos = introduce declaredJoos referencedJoos unwrapMethods
68
true
true
0
7
17
29
13
16
null
null
pdmurray/haskell-book-ex
src/ch5/AddStuff.hs
bsd-3-clause
addStuff :: Integer -> Integer -> Integer addStuff a b = a + b + 5
66
addStuff :: Integer -> Integer -> Integer addStuff a b = a + b + 5
66
addStuff a b = a + b + 5
24
false
true
0
6
15
32
16
16
null
null
olsner/ghc
compiler/deSugar/DsBinds.hs
bsd-3-clause
{-********************************************************************** * * Desugaring a MonoBinds * * *******************************************************************...
580
dsTopLHsBinds :: LHsBinds Id -> DsM (OrdList (Id,CoreExpr)) dsTopLHsBinds binds = fmap (toOL . snd) (ds_lhs_binds binds)
120
dsTopLHsBinds binds = fmap (toOL . snd) (ds_lhs_binds binds)
60
true
true
0
9
200
57
30
27
null
null
jaspertron/16pieces
Handler/Chess.hs
mit
corruptGame :: Handler a corruptGame = do content <- selectRep $ do provideRep $ return $ toJSON ("Game is corrupt" :: Text) provideRep $ defaultLayout $ toWidget [shamlet|<h1>Game is corrupt|] sendResponseStatus status500 content
242
corruptGame :: Handler a corruptGame = do content <- selectRep $ do provideRep $ return $ toJSON ("Game is corrupt" :: Text) provideRep $ defaultLayout $ toWidget [shamlet|<h1>Game is corrupt|] sendResponseStatus status500 content
242
corruptGame = do content <- selectRep $ do provideRep $ return $ toJSON ("Game is corrupt" :: Text) provideRep $ defaultLayout $ toWidget [shamlet|<h1>Game is corrupt|] sendResponseStatus status500 content
217
false
true
0
13
44
71
35
36
null
null
denibertovic/haskell
kubernetes/lib/Kubernetes/OpenAPI/ModelLens.hs
bsd-3-clause
-- * V1QuobyteVolumeSource -- | 'v1QuobyteVolumeSourceGroup' Lens v1QuobyteVolumeSourceGroupL :: Lens_' V1QuobyteVolumeSource (Maybe Text) v1QuobyteVolumeSourceGroupL f V1QuobyteVolumeSource{..} = (\v1QuobyteVolumeSourceGroup -> V1QuobyteVolumeSource { v1QuobyteVolumeSourceGroup, ..} ) <$> f v1QuobyteVolumeSourceGroup
320
v1QuobyteVolumeSourceGroupL :: Lens_' V1QuobyteVolumeSource (Maybe Text) v1QuobyteVolumeSourceGroupL f V1QuobyteVolumeSource{..} = (\v1QuobyteVolumeSourceGroup -> V1QuobyteVolumeSource { v1QuobyteVolumeSourceGroup, ..} ) <$> f v1QuobyteVolumeSourceGroup
253
v1QuobyteVolumeSourceGroupL f V1QuobyteVolumeSource{..} = (\v1QuobyteVolumeSourceGroup -> V1QuobyteVolumeSource { v1QuobyteVolumeSourceGroup, ..} ) <$> f v1QuobyteVolumeSourceGroup
180
true
true
0
8
27
58
31
27
null
null
keithduncan/chatterbox
src/web/Action/Topics.hs
mit
decodeContentType _ _ = Nothing
31
decodeContentType _ _ = Nothing
31
decodeContentType _ _ = Nothing
31
false
false
0
5
4
11
5
6
null
null
pparkkin/eta
compiler/ETA/TypeCheck/TcGenDeriv.hs
bsd-3-clause
ordOpTbl :: [(Type, (RdrName, RdrName, RdrName, RdrName, RdrName))] ordOpTbl = [(charPrimTy , (ltChar_RDR , leChar_RDR , eqChar_RDR , geChar_RDR , gtChar_RDR )) ,(intPrimTy , (ltInt_RDR , leInt_RDR , eqInt_RDR , geInt_RDR , gtInt_RDR )) ,(wordPrimTy , (ltWord_RDR , leWord_RDR , eqWord_RDR...
630
ordOpTbl :: [(Type, (RdrName, RdrName, RdrName, RdrName, RdrName))] ordOpTbl = [(charPrimTy , (ltChar_RDR , leChar_RDR , eqChar_RDR , geChar_RDR , gtChar_RDR )) ,(intPrimTy , (ltInt_RDR , leInt_RDR , eqInt_RDR , geInt_RDR , gtInt_RDR )) ,(wordPrimTy , (ltWord_RDR , leWord_RDR , eqWord_RDR...
630
ordOpTbl = [(charPrimTy , (ltChar_RDR , leChar_RDR , eqChar_RDR , geChar_RDR , gtChar_RDR )) ,(intPrimTy , (ltInt_RDR , leInt_RDR , eqInt_RDR , geInt_RDR , gtInt_RDR )) ,(wordPrimTy , (ltWord_RDR , leWord_RDR , eqWord_RDR , geWord_RDR , gtWord_RDR )) ,(addrPrimTy , (ltAddr_RDR , ...
562
false
true
0
9
128
182
118
64
null
null
jagg/search
src/Search.hs
apache-2.0
runProximityQuery n (Free (Or e1 e2)) imi = PS.union (runProximityQuery n e1 imi) (runProximityQuery n e2 imi)
163
runProximityQuery n (Free (Or e1 e2)) imi = PS.union (runProximityQuery n e1 imi) (runProximityQuery n e2 imi)
163
runProximityQuery n (Free (Or e1 e2)) imi = PS.union (runProximityQuery n e1 imi) (runProximityQuery n e2 imi)
163
false
false
1
9
69
57
26
31
null
null
urbanslug/ghc
testsuite/tests/module/mod64.hs
bsd-3-clause
x = let ['a'] = "a" in 'a'
26
x = let ['a'] = "a" in 'a'
26
x = let ['a'] = "a" in 'a'
26
false
false
1
9
7
25
10
15
null
null
brendanhay/gogol
gogol-ml/gen/Network/Google/Resource/Ml/Projects/Jobs/SetIAMPolicy.hs
mpl-2.0
-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). pjsipUploadType :: Lens' ProjectsJobsSetIAMPolicy (Maybe Text) pjsipUploadType = lens _pjsipUploadType (\ s a -> s{_pjsipUploadType = a})
216
pjsipUploadType :: Lens' ProjectsJobsSetIAMPolicy (Maybe Text) pjsipUploadType = lens _pjsipUploadType (\ s a -> s{_pjsipUploadType = a})
145
pjsipUploadType = lens _pjsipUploadType (\ s a -> s{_pjsipUploadType = a})
82
true
true
0
9
34
48
25
23
null
null
albertov/hs-mapnik
bindings/src/Mapnik/Bindings/Symbolizer.hs
bsd-3-clause
keyIndex VerticalAlignment = [C.pure|keys{keys::vertical_alignment}|]
69
keyIndex VerticalAlignment = [C.pure|keys{keys::vertical_alignment}|]
69
keyIndex VerticalAlignment = [C.pure|keys{keys::vertical_alignment}|]
69
false
false
0
5
3
16
9
7
null
null
urbanslug/ghc
testsuite/tests/indexed-types/should_compile/red-black-delete.hs
bsd-3-clause
bubbleL :: SColor c -> DT n a -> a -> CT n c1 a -> DT (Incr c n) a -- don't want to prove generally that -- (Incr (Blacker c) 'Z ~ Incr c ('S 'Z)) so expand by cases. -- (Note: Do we need all three of these cases?) bubbleL B DEE x r = dbalanceR BB E x (redden r)
264
bubbleL :: SColor c -> DT n a -> a -> CT n c1 a -> DT (Incr c n) a bubbleL B DEE x r = dbalanceR BB E x (redden r)
116
bubbleL B DEE x r = dbalanceR BB E x (redden r)
49
true
true
0
11
65
88
41
47
null
null
plilja/h99
p48.hs
apache-2.0
table predicate numValues = do let picks' = picks [False, True] numValues let values = [(pick, predicate pick) | pick <- picks'] mapM_ (\(x, v) -> putStrLn $ show x ++ " " ++ show v) values
251
table predicate numValues = do let picks' = picks [False, True] numValues let values = [(pick, predicate pick) | pick <- picks'] mapM_ (\(x, v) -> putStrLn $ show x ++ " " ++ show v) values
251
table predicate numValues = do let picks' = picks [False, True] numValues let values = [(pick, predicate pick) | pick <- picks'] mapM_ (\(x, v) -> putStrLn $ show x ++ " " ++ show v) values
251
false
false
0
13
98
100
50
50
null
null
mydaum/cabal
cabal-install/Distribution/Client/ProjectConfig.hs
bsd-3-clause
readSourcePackage verbosity (ProjectPackageLocalDirectory dir cabalFile) = do monitorFiles [monitorFileHashed cabalFile] root <- askRoot pkgdesc <- liftIO $ readGenericPackageDescription verbosity (root </> cabalFile) return SourcePackage { packageInfoId = packageId pkgdesc, packageDe...
451
readSourcePackage verbosity (ProjectPackageLocalDirectory dir cabalFile) = do monitorFiles [monitorFileHashed cabalFile] root <- askRoot pkgdesc <- liftIO $ readGenericPackageDescription verbosity (root </> cabalFile) return SourcePackage { packageInfoId = packageId pkgdesc, packageDe...
451
readSourcePackage verbosity (ProjectPackageLocalDirectory dir cabalFile) = do monitorFiles [monitorFileHashed cabalFile] root <- askRoot pkgdesc <- liftIO $ readGenericPackageDescription verbosity (root </> cabalFile) return SourcePackage { packageInfoId = packageId pkgdesc, packageDe...
451
false
false
0
12
101
106
53
53
null
null
Gabriel439/Haskell-Pipes-ByteString-Library
src/Pipes/ByteString.hs
bsd-3-clause
{-| Check if the underlying 'Producer' has no more bytes Note that this will skip over empty 'ByteString' chunks, unlike 'Pipes.Parse.isEndOfInput' from @pipes-parse@. > isEndOfBytes = liftM isNothing peekByte -} isEndOfBytes :: Monad m => Parser ByteString m Bool isEndOfBytes = do x <- peekByte retur...
384
isEndOfBytes :: Monad m => Parser ByteString m Bool isEndOfBytes = do x <- peekByte return (case x of Nothing -> True Just _ -> False )
161
isEndOfBytes = do x <- peekByte return (case x of Nothing -> True Just _ -> False )
109
true
true
0
12
92
66
30
36
null
null
TomMD/cryptol
sbv/Data/SBV/Bridge/Boolector.hs
bsd-3-clause
prove :: Provable a => a -- ^ Property to check -> IO ThmResult -- ^ Response from the SMT solver, containing the counter-example if found prove = proveWith sbvCurrentSolver
200
prove :: Provable a => a -- ^ Property to check -> IO ThmResult prove = proveWith sbvCurrentSolver
123
prove = proveWith sbvCurrentSolver
34
true
true
0
8
56
36
16
20
null
null
wereHamster/nauva
pkg/hs/nauva-css/src/Nauva/CSS/Helpers.hs
mit
lastChild :: Writer [Statement] () -> Writer [Statement] () lastChild style = tell [SSuffix ":last-child" style]
112
lastChild :: Writer [Statement] () -> Writer [Statement] () lastChild style = tell [SSuffix ":last-child" style]
112
lastChild style = tell [SSuffix ":last-child" style]
52
false
true
0
7
15
52
25
27
null
null
Daniel-Diaz/processing
examples/pacman.hs
bsd-3-clause
cellWidth :: Proc_Float cellWidth = 17
38
cellWidth :: Proc_Float cellWidth = 17
38
cellWidth = 17
14
false
true
0
4
5
11
6
5
null
null
pjones/xmonad-test
vendor/xmonad-contrib/XMonad/Actions/OnScreen.hs
bsd-2-clause
setFocus (FocusTagVisible i) old new = if i `elem` map (tag . workspace) (visible old) then setFocus (FocusTag i) old new else setFocus FocusCurrent old new
174
setFocus (FocusTagVisible i) old new = if i `elem` map (tag . workspace) (visible old) then setFocus (FocusTag i) old new else setFocus FocusCurrent old new
174
setFocus (FocusTagVisible i) old new = if i `elem` map (tag . workspace) (visible old) then setFocus (FocusTag i) old new else setFocus FocusCurrent old new
174
false
false
0
9
43
71
36
35
null
null
eklavya/Idris-dev
src/Idris/Reflection.hs
bsd-3-clause
reflectBinderQuotePattern :: ([Name] -> a -> ElabD ()) -> Raw -> [Name] -> Binder a -> ElabD () reflectBinderQuotePattern q ty unq (Lam t) = do t' <- claimTy (sMN 0 "ty") ty; movelast t' fill $ reflCall "Lam" [ty, Var t'] solve focus t'; q unq t
272
reflectBinderQuotePattern :: ([Name] -> a -> ElabD ()) -> Raw -> [Name] -> Binder a -> ElabD () reflectBinderQuotePattern q ty unq (Lam t) = do t' <- claimTy (sMN 0 "ty") ty; movelast t' fill $ reflCall "Lam" [ty, Var t'] solve focus t'; q unq t
272
reflectBinderQuotePattern q ty unq (Lam t) = do t' <- claimTy (sMN 0 "ty") ty; movelast t' fill $ reflCall "Lam" [ty, Var t'] solve focus t'; q unq t
176
false
true
0
10
74
138
65
73
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/enumFromThenTo_3.hs
mit
not MyFalse = MyTrue
20
not MyFalse = MyTrue
20
not MyFalse = MyTrue
20
false
false
0
5
3
9
4
5
null
null
snoyberg/photosorter
fay/Language/Fay/JQuery.hs
bsd-2-clause
closest :: JQuery -> JQuery -> Fay JQuery closest = ffi "%2['closest'](%1)"
75
closest :: JQuery -> JQuery -> Fay JQuery closest = ffi "%2['closest'](%1)"
75
closest = ffi "%2['closest'](%1)"
33
false
true
0
7
11
25
12
13
null
null
dmpots/fibon
tools/fibon-run/Fibon/Run/BenchmarkBundle.hs
bsd-3-clause
bundleProcessSpec :: BenchmarkBundle -> IO CreateProcess bundleProcessSpec bb = do stdIn <- case (stdinInput.benchDetails $ bb) of Nothing -> do return CreatePipe Just f -> do h <- openFile (pathToStdinFile bb f) ReadMode return (UseHandle h) out <- openFile (pathToStdoutFile b...
590
bundleProcessSpec :: BenchmarkBundle -> IO CreateProcess bundleProcessSpec bb = do stdIn <- case (stdinInput.benchDetails $ bb) of Nothing -> do return CreatePipe Just f -> do h <- openFile (pathToStdinFile bb f) ReadMode return (UseHandle h) out <- openFile (pathToStdoutFile b...
590
bundleProcessSpec bb = do stdIn <- case (stdinInput.benchDetails $ bb) of Nothing -> do return CreatePipe Just f -> do h <- openFile (pathToStdinFile bb f) ReadMode return (UseHandle h) out <- openFile (pathToStdoutFile bb) WriteMode err <- openFile (pathToStderrFile bb) Writ...
533
false
true
0
16
162
204
98
106
null
null
mightymoose/liquidhaskell
tests/neg/RG.hs
bsd-3-clause
--proves_nothing x y {- TODO: e2 is a hack to sidestep the inference of false for r, it forces r to be inhabited. -} {-@ newRGRef :: forall <p :: a -> Prop, r :: a -> a -> Prop >. e:a<p> -> e2:a<r e> -> f:(x:a<p> -> y:a<r x> -> {v:a<p> | (v = y)}) -> ...
560
newRGRef :: a -> a -> (a -> a -> a) -> IO (RGRef a) newRGRef e e2 stabilityPf = do { r <- newIORef e; return (Wrap r) }
200
newRGRef e e2 stabilityPf = do { r <- newIORef e; return (Wrap r) }
148
true
true
0
10
258
78
40
38
null
null
dimara/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
-- * Timeout table -- -- Various time constants for the timeout table rpcTmoUrgent :: Int rpcTmoUrgent = Types.rpcTimeoutToRaw Urgent
134
rpcTmoUrgent :: Int rpcTmoUrgent = Types.rpcTimeoutToRaw Urgent
63
rpcTmoUrgent = Types.rpcTimeoutToRaw Urgent
43
true
true
0
6
20
25
12
13
null
null
mcschroeder/ghc
compiler/hsSyn/HsExpr.hs
bsd-3-clause
isListCompExpr (TransStmtCtxt c) = isListCompExpr c
51
isListCompExpr (TransStmtCtxt c) = isListCompExpr c
51
isListCompExpr (TransStmtCtxt c) = isListCompExpr c
51
false
false
0
6
5
19
8
11
null
null
vincenthz/hs-foundation
basement/Basement/Sized/Block.hs
bsd-3-clause
foldl' :: PrimType ty => (a -> ty -> a) -> a -> BlockN n ty -> a foldl' f acc b = B.foldl' f acc (unBlock b)
108
foldl' :: PrimType ty => (a -> ty -> a) -> a -> BlockN n ty -> a foldl' f acc b = B.foldl' f acc (unBlock b)
108
foldl' f acc b = B.foldl' f acc (unBlock b)
43
false
true
0
9
27
68
33
35
null
null
llllllllll/strp
Strp.hs
gpl-2.0
-- | Parses the command line args. handleFlags :: [StrpModule] -> ([Flag],[String],[String]) -> IO () handleFlags _ ([],[],_) = putStrLn "Usage: strp h|v|c|STRING"
169
handleFlags :: [StrpModule] -> ([Flag],[String],[String]) -> IO () handleFlags _ ([],[],_) = putStrLn "Usage: strp h|v|c|STRING"
134
handleFlags _ ([],[],_) = putStrLn "Usage: strp h|v|c|STRING"
67
true
true
0
8
28
67
38
29
null
null
rueshyna/gogol
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Installs/Delete.hs
mpl-2.0
-- | Creates a value of 'InstallsDelete' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'idEnterpriseId' -- -- * 'idUserId' -- -- * 'idInstallId' -- -- * 'idDeviceId' installsDelete :: Text -- ^ 'idEnterpriseId' -> Text -- ^ '...
648
installsDelete :: Text -- ^ 'idEnterpriseId' -> Text -- ^ 'idUserId' -> Text -- ^ 'idInstallId' -> Text -- ^ 'idDeviceId' -> InstallsDelete installsDelete pIdEnterpriseId_ pIdUserId_ pIdInstallId_ pIdDeviceId_ = InstallsDelete' { _idEnterpriseId = pIdEnterpriseId_ , _idUserId = pIdUserId...
395
installsDelete pIdEnterpriseId_ pIdUserId_ pIdInstallId_ pIdDeviceId_ = InstallsDelete' { _idEnterpriseId = pIdEnterpriseId_ , _idUserId = pIdUserId_ , _idInstallId = pIdInstallId_ , _idDeviceId = pIdDeviceId_ }
235
true
true
0
10
136
86
52
34
null
null
facebookincubator/duckling
Duckling/Distance/PT/Rules.hs
bsd-3-clause
rules :: [Rule] rules = [ ruleDistCentimeters , ruleDistMeters , ruleDistMiles , ruleLatentDistKm ]
109
rules :: [Rule] rules = [ ruleDistCentimeters , ruleDistMeters , ruleDistMiles , ruleLatentDistKm ]
109
rules = [ ruleDistCentimeters , ruleDistMeters , ruleDistMiles , ruleLatentDistKm ]
93
false
true
0
7
23
33
17
16
null
null
enolan/Idris-dev
src/Idris/Reflection.hs
bsd-3-clause
reflectRawQuote unq (RBind n b r) = reflCall "RBind" [reflectName n, reflectBinderQuote reflectRawQuote (reflm "Raw") unq b, reflectRawQuote unq r]
149
reflectRawQuote unq (RBind n b r) = reflCall "RBind" [reflectName n, reflectBinderQuote reflectRawQuote (reflm "Raw") unq b, reflectRawQuote unq r]
149
reflectRawQuote unq (RBind n b r) = reflCall "RBind" [reflectName n, reflectBinderQuote reflectRawQuote (reflm "Raw") unq b, reflectRawQuote unq r]
149
false
false
0
9
21
60
28
32
null
null
tadeuzagallo/verve-lang
src/Util/Scope.hs
mit
insertInterface :: Insertion InterfaceType insertInterface key = insertScope types (\st types -> st { types }) key . Intf
121
insertInterface :: Insertion InterfaceType insertInterface key = insertScope types (\st types -> st { types }) key . Intf
121
insertInterface key = insertScope types (\st types -> st { types }) key . Intf
78
false
true
1
9
18
46
22
24
null
null
kishoredbn/barrelfish
tools/flounder/GCBackend.hs
mit
msg_handler :: String -> MessageDef -> [TypeDef] -> C.Unit msg_handler ifname msg@(Message _ mn args _) types = C.FunctionDef C.Static (C.TypeName "void") name [C.Param (C.Ptr C.Void) "arg"] [ localvar (C.Ptr $ C.Struct $ intf_bind_type ifname) intf_bind_var (Just $ C.Variable "arg"), localvar (C.TypeNa...
838
msg_handler :: String -> MessageDef -> [TypeDef] -> C.Unit msg_handler ifname msg@(Message _ mn args _) types = C.FunctionDef C.Static (C.TypeName "void") name [C.Param (C.Ptr C.Void) "arg"] [ localvar (C.Ptr $ C.Struct $ intf_bind_type ifname) intf_bind_var (Just $ C.Variable "arg"), localvar (C.TypeNa...
838
msg_handler ifname msg@(Message _ mn args _) types = C.FunctionDef C.Static (C.TypeName "void") name [C.Param (C.Ptr C.Void) "arg"] [ localvar (C.Ptr $ C.Struct $ intf_bind_type ifname) intf_bind_var (Just $ C.Variable "arg"), localvar (C.TypeName "errval_t") "err" Nothing, if null args then C.SBlan...
779
false
true
5
13
160
324
165
159
null
null
phlip9/scheme-interpreter
HSchemer.hs
mit
printExpr :: String -> IO () printExpr input = print $ readExpr input
69
printExpr :: String -> IO () printExpr input = print $ readExpr input
69
printExpr input = print $ readExpr input
40
false
true
0
7
12
30
14
16
null
null
nuttycom/haskoin
Network/Haskoin/Crypto/Base58.hs
unlicense
decodeBase58Check :: BS.ByteString -> Maybe BS.ByteString decodeBase58Check bs = do rs <- decodeBase58 bs let (res,chk) = BS.splitAt ((BS.length rs) - 4) rs guard $ chk == (encode' $ chksum32 res) return res -- |Data type representing a Bitcoin address
269
decodeBase58Check :: BS.ByteString -> Maybe BS.ByteString decodeBase58Check bs = do rs <- decodeBase58 bs let (res,chk) = BS.splitAt ((BS.length rs) - 4) rs guard $ chk == (encode' $ chksum32 res) return res -- |Data type representing a Bitcoin address
269
decodeBase58Check bs = do rs <- decodeBase58 bs let (res,chk) = BS.splitAt ((BS.length rs) - 4) rs guard $ chk == (encode' $ chksum32 res) return res -- |Data type representing a Bitcoin address
211
false
true
0
15
56
101
48
53
null
null
haskell-opengl/OpenGLRaw
src/Graphics/GL/Functions/F12.hs
bsd-3-clause
-- glGetTexParameterIuiv ------------------------------------------------------- -- | Manual pages for <https://www.opengl.org/sdk/docs/man3/xhtml/glGetTexParameter.xml OpenGL 3.x> or <https://www.opengl.org/sdk/docs/man4/html/glGetTexParameter.xhtml OpenGL 4.x>. glGetTexParameterIuiv :: MonadIO m => GLenum -- ^ @...
673
glGetTexParameterIuiv :: MonadIO m => GLenum -- ^ @target@ of type [TextureTarget](Graphics-GL-Groups.html#TextureTarget). -> GLenum -- ^ @pname@ of type [GetTextureParameter](Graphics-GL-Groups.html#GetTextureParameter). -> Ptr GLuint -- ^ @params@ pointing to @COMPSIZE(pname)@ elements of type @GLuint@. -> ...
408
glGetTexParameterIuiv v1 v2 v3 = liftIO $ dyn432 ptr_glGetTexParameterIuiv v1 v2 v3
83
true
true
0
11
73
67
33
34
null
null
kmilner/tamarin-prover
src/Main/TheoryLoader.hs
gpl-3.0
-- | Load an open theory from a file. loadOpenThy :: Arguments -> FilePath -> IO OpenTranslatedTheory loadOpenThy as inFile = do thy <- parseOpenTheory (diff as ++ defines as ++ quitOnWarning as) inFile thy' <- Sapic.translate thy return thy' -- | Load a closed theory.
284
loadOpenThy :: Arguments -> FilePath -> IO OpenTranslatedTheory loadOpenThy as inFile = do thy <- parseOpenTheory (diff as ++ defines as ++ quitOnWarning as) inFile thy' <- Sapic.translate thy return thy' -- | Load a closed theory.
246
loadOpenThy as inFile = do thy <- parseOpenTheory (diff as ++ defines as ++ quitOnWarning as) inFile thy' <- Sapic.translate thy return thy' -- | Load a closed theory.
182
true
true
0
12
60
79
36
43
null
null
emhoracek/smooch
app/tests/ParseKCFSpec.hs
gpl-3.0
-- | New style with invalid bits-per-pixel. invalidNewPal2 :: ByteString invalidNewPal2 = let header = makeHeader 0x10 0xFF 0x01 0x01 palData = BS.pack [0xF0, 0xF8, 0xFF] in BS.concat [header, palData]
211
invalidNewPal2 :: ByteString invalidNewPal2 = let header = makeHeader 0x10 0xFF 0x01 0x01 palData = BS.pack [0xF0, 0xF8, 0xFF] in BS.concat [header, palData]
167
invalidNewPal2 = let header = makeHeader 0x10 0xFF 0x01 0x01 palData = BS.pack [0xF0, 0xF8, 0xFF] in BS.concat [header, palData]
138
true
true
0
10
39
68
34
34
null
null
mpickering/hackage-server
Distribution/Server/Features/UserDetails.hs
bsd-3-clause
userDetailsToCSV :: BackupType -> UserDetailsTable -> CSV userDetailsToCSV backuptype (UserDetailsTable tbl) = ([showVersion userCSVVer]:) $ (userdetailsCSVKey:) $ flip map (IntMap.toList tbl) $ \(uid, udetails) -> [ display (UserId uid) , T.unpack (accountName udetails) --FIXME: apparentl...
1,106
userDetailsToCSV :: BackupType -> UserDetailsTable -> CSV userDetailsToCSV backuptype (UserDetailsTable tbl) = ([showVersion userCSVVer]:) $ (userdetailsCSVKey:) $ flip map (IntMap.toList tbl) $ \(uid, udetails) -> [ display (UserId uid) , T.unpack (accountName udetails) --FIXME: apparentl...
1,106
userDetailsToCSV backuptype (UserDetailsTable tbl) = ([showVersion userCSVVer]:) $ (userdetailsCSVKey:) $ flip map (IntMap.toList tbl) $ \(uid, udetails) -> [ display (UserId uid) , T.unpack (accountName udetails) --FIXME: apparently the csv lib doesn't do unicode properly , if backu...
1,048
false
true
0
11
288
246
132
114
null
null
andorp/bead
src/Bead/Controller/UserStories.hs
bsd-3-clause
nonAdministratedGroup = msg_UserStoryError_NonAdministratedGroup "This group is not administrated by you."
107
nonAdministratedGroup = msg_UserStoryError_NonAdministratedGroup "This group is not administrated by you."
107
nonAdministratedGroup = msg_UserStoryError_NonAdministratedGroup "This group is not administrated by you."
107
false
false
0
5
10
9
4
5
null
null
florianpilz/autotool
src/Rest/Top.hs
gpl-2.0
main = simpleHTTP ( Conf { port = 9876, validator = Nothing } ) $ msum [ dir "GetServerInfo" $ do return $ toResponse "I am your server." , dir "GetTaskTypes" $ do return $ toResponse $ unlines $ do m <- IC.makers return $ show m , dir "GetTaskCoonfi...
1,030
main = simpleHTTP ( Conf { port = 9876, validator = Nothing } ) $ msum [ dir "GetServerInfo" $ do return $ toResponse "I am your server." , dir "GetTaskTypes" $ do return $ toResponse $ unlines $ do m <- IC.makers return $ show m , dir "GetTaskCoonfi...
1,030
main = simpleHTTP ( Conf { port = 9876, validator = Nothing } ) $ msum [ dir "GetServerInfo" $ do return $ toResponse "I am your server." , dir "GetTaskTypes" $ do return $ toResponse $ unlines $ do m <- IC.makers return $ show m , dir "GetTaskCoonfi...
1,030
false
false
3
14
403
317
161
156
null
null
hvr/vector
Data/Vector.hs
bsd-3-clause
(!?) = (G.!?)
13
(!?) = (G.!?)
13
(!?) = (G.!?)
13
false
false
1
6
2
16
8
8
null
null
machine-intelligence/Botworld
Botworld/Display.hs
bsd-3-clause
itemDetail :: Item -> TextBlock itemDetail DestroyShield = ["[†]"]
66
itemDetail :: Item -> TextBlock itemDetail DestroyShield = ["[†]"]
66
itemDetail DestroyShield = ["[†]"]
34
false
true
0
5
8
21
11
10
null
null
arjantop/gifter
src/Gifter/Giveaway.hs
bsd-3-clause
handleResponse :: IO (Either DataError a) -> IO (Either GiveawayError a) handleResponse r = liftM (join . handleLeft . handleRight) (try r) where handleLeft = left HttpError handleRight = right (toEither ResponseParseError) toEither ec (Left e) = Left $ ec e toEither _ (Right x) = Right x
311
handleResponse :: IO (Either DataError a) -> IO (Either GiveawayError a) handleResponse r = liftM (join . handleLeft . handleRight) (try r) where handleLeft = left HttpError handleRight = right (toEither ResponseParseError) toEither ec (Left e) = Left $ ec e toEither _ (Right x) = Right x
311
handleResponse r = liftM (join . handleLeft . handleRight) (try r) where handleLeft = left HttpError handleRight = right (toEither ResponseParseError) toEither ec (Left e) = Left $ ec e toEither _ (Right x) = Right x
238
false
true
7
8
69
128
58
70
null
null
DavidAlphaFox/darcs
src/Darcs/UI/Commands/ShowContents.hs
gpl-2.0
showContentsBasicOpts :: DarcsOption a ([O.MatchFlag] -> Maybe String -> a) showContentsBasicOpts = O.matchOne ^ O.workingRepoDir
129
showContentsBasicOpts :: DarcsOption a ([O.MatchFlag] -> Maybe String -> a) showContentsBasicOpts = O.matchOne ^ O.workingRepoDir
129
showContentsBasicOpts = O.matchOne ^ O.workingRepoDir
53
false
true
0
9
14
43
22
21
null
null
msakai/ptq
src/Parser.hs
lgpl-2.1
fvs (F24 x y) = IS.union (fvs x) (fvs y)
42
fvs (F24 x y) = IS.union (fvs x) (fvs y)
42
fvs (F24 x y) = IS.union (fvs x) (fvs y)
42
false
false
0
7
11
37
17
20
null
null
event/spim
MIMEDir.hs
agpl-3.0
addContentWParams :: PropName -> Parameters -> PropValue -> MIMEDirContents -> MIMEDirContents addContentWParams name params value content = case Map.lookup name content of Just (Left oldVal) -> Map.insert name (Left ((params, value):oldVal)) content Nothing -> Map...
365
addContentWParams :: PropName -> Parameters -> PropValue -> MIMEDirContents -> MIMEDirContents addContentWParams name params value content = case Map.lookup name content of Just (Left oldVal) -> Map.insert name (Left ((params, value):oldVal)) content Nothing -> Map...
365
addContentWParams name params value content = case Map.lookup name content of Just (Left oldVal) -> Map.insert name (Left ((params, value):oldVal)) content Nothing -> Map.insert name (Left [(params, value)]) content
269
false
true
0
13
94
125
62
63
null
null
fredmorcos/attic
snippets/haskell/Bowling.hs
isc
roundsScore :: Int -> [Int] -> [Int] roundsScore rounds scores = trace ("rounds = " ++ show rounds) $ let roundScores = score rounds scores in cumulativeScore 0 roundScores
176
roundsScore :: Int -> [Int] -> [Int] roundsScore rounds scores = trace ("rounds = " ++ show rounds) $ let roundScores = score rounds scores in cumulativeScore 0 roundScores
176
roundsScore rounds scores = trace ("rounds = " ++ show rounds) $ let roundScores = score rounds scores in cumulativeScore 0 roundScores
139
false
true
0
10
32
68
33
35
null
null
tonymorris/xsd
src/Text/XML/XSD/DateTime.hs
bsd-3-clause
-- | Parses the string into a @dateTime@ or may fail with a parse error. dateTime' :: Text -> Either String DateTime dateTime' = parseOnly (parseDateTime <|> fail "bad date time")
185
dateTime' :: Text -> Either String DateTime dateTime' = parseOnly (parseDateTime <|> fail "bad date time")
112
dateTime' = parseOnly (parseDateTime <|> fail "bad date time")
64
true
true
0
8
36
40
18
22
null
null
gittywithexcitement/hindent
src/HIndent/Pretty.hs
bsd-3-clause
-- | Maybe render an overlap definition. maybeOverlap :: MonadState (PrintState s) m => Maybe (Overlap NodeInfo) -> m () maybeOverlap = maybe (return ()) (\p -> pretty p >> space)
211
maybeOverlap :: MonadState (PrintState s) m => Maybe (Overlap NodeInfo) -> m () maybeOverlap = maybe (return ()) (\p -> pretty p >> space)
170
maybeOverlap = maybe (return ()) (\p -> pretty p >> space)
90
true
true
0
9
62
73
36
37
null
null
mookerji/libsbp
haskell/src/SwiftNav/SBP/Navigation.hs
lgpl-3.0
msgVelNed :: Word16 msgVelNed = 0x0205
38
msgVelNed :: Word16 msgVelNed = 0x0205
38
msgVelNed = 0x0205
18
false
true
0
6
5
18
7
11
null
null
gridaphobe/ghc
compiler/main/DynFlags.hs
bsd-3-clause
-- | Define a new flag with an effect. flagSpec' :: String -> flag -> (TurnOnFlag -> DynP ()) -> FlagSpec flag flagSpec' name flag act = FlagSpec name flag act AllModes
168
flagSpec' :: String -> flag -> (TurnOnFlag -> DynP ()) -> FlagSpec flag flagSpec' name flag act = FlagSpec name flag act AllModes
129
flagSpec' name flag act = FlagSpec name flag act AllModes
57
true
true
0
11
31
59
28
31
null
null
li-zhirui/EoplLangs
test/InferredLang/EvaluatorSuite.hs
bsd-3-clause
testError :: String -> String -> Test testError msg input = TestCase $ assertBool msg evalRes where evalRes = case run input of Left (ParseError _) -> False Right _ -> False _ -> True
239
testError :: String -> String -> Test testError msg input = TestCase $ assertBool msg evalRes where evalRes = case run input of Left (ParseError _) -> False Right _ -> False _ -> True
239
testError msg input = TestCase $ assertBool msg evalRes where evalRes = case run input of Left (ParseError _) -> False Right _ -> False _ -> True
201
false
true
0
10
90
78
37
41
null
null
jsbali/xmonad_conf
xmonad.hs
mit
-- color of window title myTitleLength = 80
46
myTitleLength = 80
21
myTitleLength = 80
21
true
false
1
5
10
11
4
7
null
null
ezyang/ghc
compiler/basicTypes/OccName.hs
bsd-3-clause
isTvOcc _ = False
34
isTvOcc _ = False
34
isTvOcc _ = False
34
false
false
0
5
20
9
4
5
null
null
notae/cpfd
src/Control/CPFD.hs
bsd-3-clause
sub :: (FDValue v, Num v) => v -> Var s v -> Var s v -> FD s () sub c = arcConstraint "sub" (subConstraint c)
109
sub :: (FDValue v, Num v) => v -> Var s v -> Var s v -> FD s () sub c = arcConstraint "sub" (subConstraint c)
109
sub c = arcConstraint "sub" (subConstraint c)
45
false
true
0
11
26
73
34
39
null
null
mvr/cf
src/Math/ContinuedFraction/Simple.hs
mit
bihomEmit :: Bihom -> Integer -> Bihom bihomEmit (n0, n1, n2, n3, d0, d1, d2, d3) x = (d0, d1, d2, d3, n0 - d0*x, n1 - d1*x, n2 - d2*x, n3 - d3*x)
210
bihomEmit :: Bihom -> Integer -> Bihom bihomEmit (n0, n1, n2, n3, d0, d1, d2, d3) x = (d0, d1, d2, d3, n0 - d0*x, n1 - d1*x, n2 - d2*x, n3 - d3*x)
210
bihomEmit (n0, n1, n2, n3, d0, d1, d2, d3) x = (d0, d1, d2, d3, n0 - d0*x, n1 - d1*x, n2 - d2*x, n3 - d3*x)
171
false
true
0
9
97
110
61
49
null
null
apyrgio/ganeti
src/Ganeti/Query/Filter.hs
bsd-2-clause
qffField QffHostname v = Ok v
30
qffField QffHostname v = Ok v
30
qffField QffHostname v = Ok v
30
false
false
1
5
6
19
6
13
null
null
prt2121/haskell-practice
cis194-s13/src/LogAnalysis.hs
apache-2.0
-- Exercise 1 -- parseMessage "E 2 562 help help" == LogMessage (Error 2) 562 "help help" -- parseMessage "I 29 la la la" == LogMessage Info 29 "la la la" parseMessage :: String -> LogMessage parseMessage = p . words where p ("I" : t : str) = LogMessage Info (read t) $ unwords str ...
559
parseMessage :: String -> LogMessage parseMessage = p . words where p ("I" : t : str) = LogMessage Info (read t) $ unwords str p ("W" : t : str) = LogMessage Warning (read t) $ unwords str p ("E" : n : t : str) = LogMessage (Error (read n)) (r...
404
parseMessage = p . words where p ("I" : t : str) = LogMessage Info (read t) $ unwords str p ("W" : t : str) = LogMessage Warning (read t) $ unwords str p ("E" : n : t : str) = LogMessage (Error (read n)) (read t) $ unwords str ...
367
true
true
1
10
205
177
84
93
null
null
mettekou/ghc
compiler/hsSyn/HsExpr.hs
bsd-3-clause
pp_rhs :: Outputable body => HsMatchContext idL -> body -> SDoc pp_rhs ctxt rhs = matchSeparator ctxt <+> pprDeeper (ppr rhs)
125
pp_rhs :: Outputable body => HsMatchContext idL -> body -> SDoc pp_rhs ctxt rhs = matchSeparator ctxt <+> pprDeeper (ppr rhs)
125
pp_rhs ctxt rhs = matchSeparator ctxt <+> pprDeeper (ppr rhs)
61
false
true
0
9
20
55
24
31
null
null
jacekszymanski/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcTypes.hs
lgpl-2.1
withVectorDoubleResult :: (Ptr CDouble -> Ptr CDouble -> IO ()) -> IO (Vector2 Double) withVectorDoubleResult f = alloca $ \px -> alloca $ \py -> do f px py x <- peek px y <- peek py return (fromCVectorDouble x y)
244
withVectorDoubleResult :: (Ptr CDouble -> Ptr CDouble -> IO ()) -> IO (Vector2 Double) withVectorDoubleResult f = alloca $ \px -> alloca $ \py -> do f px py x <- peek px y <- peek py return (fromCVectorDouble x y)
244
withVectorDoubleResult f = alloca $ \px -> alloca $ \py -> do f px py x <- peek px y <- peek py return (fromCVectorDouble x y)
157
false
true
0
13
71
109
50
59
null
null
zeekay/lambdabot
Plugin/Free/Theorem.hs
mit
applySimplifierTheorem s p@(ThEqual _ _) = p
49
applySimplifierTheorem s p@(ThEqual _ _) = p
49
applySimplifierTheorem s p@(ThEqual _ _) = p
49
false
false
0
8
11
22
11
11
null
null
markuspf/Idris-dev
src/IRTS/Simplified.hs
bsd-3-clause
ldefs :: State (DDefs, Int) DDefs ldefs = do (l, h) <- get return l -- | Simplify an expression by let-binding argument expressions that -- are not variables -- The boolean parameter indicates whether the expression is at tail -- call position.
256
ldefs :: State (DDefs, Int) DDefs ldefs = do (l, h) <- get return l -- | Simplify an expression by let-binding argument expressions that -- are not variables -- The boolean parameter indicates whether the expression is at tail -- call position.
256
ldefs = do (l, h) <- get return l -- | Simplify an expression by let-binding argument expressions that -- are not variables -- The boolean parameter indicates whether the expression is at tail -- call position.
222
false
true
0
8
54
45
25
20
null
null
Bodigrim/arithmoi
benchmark/Math/NumberTheory/SmoothNumbersBench.hs
mit
benchSuite :: Benchmark benchSuite = bgroup "SmoothNumbers" [ bench "100" $ nf doBench 100 , bench "1000" $ nf doBench 1000 , bench "10000" $ nf doBench 10000 ]
183
benchSuite :: Benchmark benchSuite = bgroup "SmoothNumbers" [ bench "100" $ nf doBench 100 , bench "1000" $ nf doBench 1000 , bench "10000" $ nf doBench 10000 ]
183
benchSuite = bgroup "SmoothNumbers" [ bench "100" $ nf doBench 100 , bench "1000" $ nf doBench 1000 , bench "10000" $ nf doBench 10000 ]
159
false
true
0
8
51
69
30
39
null
null
siddhanathan/yi
yi-core/src/Yi/Buffer/Implementation.hs
gpl-2.0
touchSyntax :: Point -> BufferImpl syntax -> BufferImpl syntax touchSyntax touchedIndex fb = fb { dirtyOffset = min touchedIndex (dirtyOffset fb)}
147
touchSyntax :: Point -> BufferImpl syntax -> BufferImpl syntax touchSyntax touchedIndex fb = fb { dirtyOffset = min touchedIndex (dirtyOffset fb)}
147
touchSyntax touchedIndex fb = fb { dirtyOffset = min touchedIndex (dirtyOffset fb)}
83
false
true
0
10
21
54
25
29
null
null
freizl/freizl.github.com-old
tests/Hakyll/Core/Rules/Tests.hs
bsd-3-clause
-------------------------------------------------------------------------------- tests :: Test tests = testGroup "Hakyll.Core.Rules.Tests" $ fromAssertions "runRules" [case01]
179
tests :: Test tests = testGroup "Hakyll.Core.Rules.Tests" $ fromAssertions "runRules" [case01]
98
tests = testGroup "Hakyll.Core.Rules.Tests" $ fromAssertions "runRules" [case01]
84
true
true
0
6
15
28
14
14
null
null
da-x/hakyll-site
src/Site/Pandoc.hs
bsd-3-clause
pandocCompiler :: Streams -> Compiler (Item String) pandocCompiler streams = do alignment <- fromMaybe "right" <$> ((flip getMetadataField) "toc" =<< getUnderlying) abbrs <- abbreviationCollector <$> getResourceBody let transformer = return . abbreviations abbrs >=> return . codeBreak >=>...
487
pandocCompiler :: Streams -> Compiler (Item String) pandocCompiler streams = do alignment <- fromMaybe "right" <$> ((flip getMetadataField) "toc" =<< getUnderlying) abbrs <- abbreviationCollector <$> getResourceBody let transformer = return . abbreviations abbrs >=> return . codeBreak >=>...
487
pandocCompiler streams = do alignment <- fromMaybe "right" <$> ((flip getMetadataField) "toc" =<< getUnderlying) abbrs <- abbreviationCollector <$> getResourceBody let transformer = return . abbreviations abbrs >=> return . codeBreak >=> return . crossRefs >=> pygments streams ...
435
false
true
0
19
102
132
60
72
null
null
olorin/amazonka
amazonka-iam/gen/Network/AWS/IAM/CreateInstanceProfile.hs
mpl-2.0
-- | The response status code. ciprsResponseStatus :: Lens' CreateInstanceProfileResponse Int ciprsResponseStatus = lens _ciprsResponseStatus (\ s a -> s{_ciprsResponseStatus = a})
180
ciprsResponseStatus :: Lens' CreateInstanceProfileResponse Int ciprsResponseStatus = lens _ciprsResponseStatus (\ s a -> s{_ciprsResponseStatus = a})
149
ciprsResponseStatus = lens _ciprsResponseStatus (\ s a -> s{_ciprsResponseStatus = a})
86
true
true
0
9
21
40
22
18
null
null
OS2World/DEV-UTIL-HUGS
oldlib/TestOrdSet.hs
bsd-3-clause
prop_delete :: Int -> Set Int -> Bool prop_delete x xs = tol (delete x xs) == List.delete x (tol xs)
104
prop_delete :: Int -> Set Int -> Bool prop_delete x xs = tol (delete x xs) == List.delete x (tol xs)
104
prop_delete x xs = tol (delete x xs) == List.delete x (tol xs)
66
false
true
0
8
24
59
27
32
null
null
haskell-distributed/distributed-process-platform
tests/SafeCounter.hs
bsd-3-clause
halt :: forall s r . Serializable r => RestrictedProcess s (Result r) halt = haltNoReply (ExitOther "Count > 10")
113
halt :: forall s r . Serializable r => RestrictedProcess s (Result r) halt = haltNoReply (ExitOther "Count > 10")
113
halt = haltNoReply (ExitOther "Count > 10")
43
false
true
0
10
19
49
23
26
null
null
brendanhay/gogol
gogol-remotebuildexecution/gen/Network/Google/RemoteBuildExecution/Types/Product.hs
mpl-2.0
-- | Resource name of the project. Format: \`projects\/[PROJECT_ID]\`. gdravlirParent :: Lens' GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesRequest (Maybe Text) gdravlirParent = lens _gdravlirParent (\ s a -> s{_gdravlirParent = a})
254
gdravlirParent :: Lens' GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesRequest (Maybe Text) gdravlirParent = lens _gdravlirParent (\ s a -> s{_gdravlirParent = a})
183
gdravlirParent = lens _gdravlirParent (\ s a -> s{_gdravlirParent = a})
79
true
true
0
9
33
48
25
23
null
null
thoughtpolice/hs-leveldb
src/Database/LevelDB/IO.hs
bsd-3-clause
-- | Approximate the size of a range of values in the database. approxSizes :: DB -> [Range] -> IO [Word64] approxSizes _ _ = return []
135
approxSizes :: DB -> [Range] -> IO [Word64] approxSizes _ _ = return []
71
approxSizes _ _ = return []
27
true
true
0
8
26
39
20
19
null
null
ChrisPenner/rasa
rasa-ext-vim/src/Rasa/Ext/Vim.hs
gpl-3.0
anyMode :: [Keypress] -> BufAction () anyMode [Keypress 'c' [Ctrl]] = runApp exit
81
anyMode :: [Keypress] -> BufAction () anyMode [Keypress 'c' [Ctrl]] = runApp exit
81
anyMode [Keypress 'c' [Ctrl]] = runApp exit
43
false
true
0
8
12
40
20
20
null
null
nushio3/Paraiso
Test/Paraiso/ClarisSimple.hs
bsd-3-clause
testQuiz :: AdderQuiz -> Bool testQuiz (AdderQuiz ans prog _) = ans == evaluate prog
84
testQuiz :: AdderQuiz -> Bool testQuiz (AdderQuiz ans prog _) = ans == evaluate prog
84
testQuiz (AdderQuiz ans prog _) = ans == evaluate prog
54
false
true
0
7
14
35
17
18
null
null
brendanhay/amazonka-limited
src/Network/AWS/Internal/Instances.hs
mpl-2.0
parseBool e = Left $ "unable to parse Bool from: " ++ show e
66
parseBool e = Left $ "unable to parse Bool from: " ++ show e
66
parseBool e = Left $ "unable to parse Bool from: " ++ show e
66
false
false
0
6
19
20
9
11
null
null