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
dawedawe/kripkeweb
src/DB.hs
bsd-3-clause
-- |Worlds whose lambda intersected with the given world's lambda isn't empty. worldsWithIntersectingLambda :: Connection -> LambdaType -> [T.Text] -> T.Text -> IO [T.Text] worldsWithIntersectingLambda c lamType v w = let q = "SELECT DISTINCT world FROM ? \ \WHERE wor...
498
worldsWithIntersectingLambda :: Connection -> LambdaType -> [T.Text] -> T.Text -> IO [T.Text] worldsWithIntersectingLambda c lamType v w = let q = "SELECT DISTINCT world FROM ? \ \WHERE world NOT IN ? AND formula IN \ \(SELECT formula FROM ? WHERE world = ?)...
419
worldsWithIntersectingLambda c lamType v w = let q = "SELECT DISTINCT world FROM ? \ \WHERE world NOT IN ? AND formula IN \ \(SELECT formula FROM ? WHERE world = ?)" t = chooseLambdaTable lamType in liftM (map fromOnly) (query c q (t, In v, t, w))
293
true
true
0
11
149
107
55
52
null
null
GaloisInc/tower
tower-aadl/src/Tower/AADL/Render/Common.hs
bsd-3-clause
renderSrcLoc :: L.SrcLoc -> Doc renderSrcLoc s = case s of L.NoLoc -> text "No source location" L.SrcLoc rng msrc -> case msrc of Nothing -> renderRng rng Just src -> text src <> colon <> renderRng rng -- Ignore the column.
249
renderSrcLoc :: L.SrcLoc -> Doc renderSrcLoc s = case s of L.NoLoc -> text "No source location" L.SrcLoc rng msrc -> case msrc of Nothing -> renderRng rng Just src -> text src <> colon <> renderRng rng -- Ignore the column.
249
renderSrcLoc s = case s of L.NoLoc -> text "No source location" L.SrcLoc rng msrc -> case msrc of Nothing -> renderRng rng Just src -> text src <> colon <> renderRng rng -- Ignore the column.
217
false
true
2
10
67
86
40
46
null
null
alexandrelucchesi/pfec
jwt-min/src/JWS.hs
apache-2.0
getEncodedJWSHeader :: Alg -> B.ByteString getEncodedJWSHeader alg = B64.encode . C.pack $ "{\"alg\":\"" ++ show alg ++ "\"}"
125
getEncodedJWSHeader :: Alg -> B.ByteString getEncodedJWSHeader alg = B64.encode . C.pack $ "{\"alg\":\"" ++ show alg ++ "\"}"
125
getEncodedJWSHeader alg = B64.encode . C.pack $ "{\"alg\":\"" ++ show alg ++ "\"}"
82
false
true
0
9
17
43
21
22
null
null
brendanhay/gogol
gogol-resourcemanager/gen/Network/Google/ResourceManager/Types/Product.hs
mpl-2.0
-- | The TagValue of the TagBinding. Must be of the form \`tagValues\/456\`. tbTagValue :: Lens' TagBinding (Maybe Text) tbTagValue = lens _tbTagValue (\ s a -> s{_tbTagValue = a})
182
tbTagValue :: Lens' TagBinding (Maybe Text) tbTagValue = lens _tbTagValue (\ s a -> s{_tbTagValue = a})
105
tbTagValue = lens _tbTagValue (\ s a -> s{_tbTagValue = a})
61
true
true
0
9
31
48
25
23
null
null
haroldcarr/learn-haskell-coq-ml-etc
haskell/course/2013-11-nicta/src/Course/FileIO.hs
unlicense
{- HC printFiles xs = mapM (uncurry printFile) xs >>= \_ -> pure () -} printFile :: FilePath -> Chars -> IO () printFile fp c = putStrLn fp >> putStrLn c >> pure ()
193
printFile :: FilePath -> Chars -> IO () printFile fp c = putStrLn fp >> putStrLn c >> pure ()
106
printFile fp c = putStrLn fp >> putStrLn c >> pure ()
60
true
true
0
9
63
50
23
27
null
null
vedgar/mlr
Haskell/2017K1rj/Z3rj.hs
unlicense
slobodan t x (Atomic _) = True
30
slobodan t x (Atomic _) = True
30
slobodan t x (Atomic _) = True
30
false
false
0
7
6
19
9
10
null
null
GaloisInc/saw-script
saw-core/src/Verifier/SAW/Simulator/TermModel.hs
bsd-3-clause
bvUnOp :: SharedContext -> (SharedContext -> Term -> Term -> IO Term) -> (BitVector -> BitVector) -> VWord TermModel -> IO (VWord TermModel) bvUnOp sc termOp valOp = \case Right bv -> pure . Right $! valOp bv Left (n,tm) -> do n' <- scNat sc n tm' <- termOp sc n' tm pure (Left (n,tm'))
316
bvUnOp :: SharedContext -> (SharedContext -> Term -> Term -> IO Term) -> (BitVector -> BitVector) -> VWord TermModel -> IO (VWord TermModel) bvUnOp sc termOp valOp = \case Right bv -> pure . Right $! valOp bv Left (n,tm) -> do n' <- scNat sc n tm' <- termOp sc n' tm pure (Left (n,tm'))
316
bvUnOp sc termOp valOp = \case Right bv -> pure . Right $! valOp bv Left (n,tm) -> do n' <- scNat sc n tm' <- termOp sc n' tm pure (Left (n,tm'))
167
false
true
0
13
85
152
73
79
null
null
ml9951/ghc
compiler/prelude/THNames.hs
bsd-3-clause
tyVarSigName = libFun (fsLit "tyVarSig") tyVarSigIdKey
61
tyVarSigName = libFun (fsLit "tyVarSig") tyVarSigIdKey
61
tyVarSigName = libFun (fsLit "tyVarSig") tyVarSigIdKey
61
false
false
0
7
12
17
8
9
null
null
vcanadi/prelude-custom
src/PreludeCustom.hs
bsd-3-clause
(?---) = ifVVV
14
(?---) = ifVVV
14
(?---) = ifVVV
14
false
false
0
4
2
8
5
3
null
null
diminishedprime/.org
programmey_stuff/write_yourself_a_scheme/ch_06/wyas/app/Main.hs
mit
readPrompt :: String -> IO String readPrompt prompt = flushStr prompt >> getLine
80
readPrompt :: String -> IO String readPrompt prompt = flushStr prompt >> getLine
80
readPrompt prompt = flushStr prompt >> getLine
46
false
true
2
7
12
34
14
20
null
null
adamschoenemann/asa-analysis
src/Utils.hs
bsd-3-clause
capitalize :: String -> String capitalize s = maybe "" id $ (\(x,xs) -> toUpper x : xs) <$> uncons s
100
capitalize :: String -> String capitalize s = maybe "" id $ (\(x,xs) -> toUpper x : xs) <$> uncons s
100
capitalize s = maybe "" id $ (\(x,xs) -> toUpper x : xs) <$> uncons s
69
false
true
0
10
20
55
28
27
null
null
jwiegley/hnix
src/Nix/Eval.hs
bsd-3-clause
eval (NBinary NApp fun arg) = do scope <- currentScopes :: m (Scopes m v) fun >>= (`evalApp` withScopes scope arg)
118
eval (NBinary NApp fun arg) = do scope <- currentScopes :: m (Scopes m v) fun >>= (`evalApp` withScopes scope arg)
118
eval (NBinary NApp fun arg) = do scope <- currentScopes :: m (Scopes m v) fun >>= (`evalApp` withScopes scope arg)
118
false
false
0
10
24
59
29
30
null
null
rahulmutt/ghcvm
compiler/Eta/Core/CoreFVs.hs
bsd-3-clause
varTypeTyVars :: Var -> TyVarSet -- Find the type/kind variables free in the type of the id/tyvar varTypeTyVars var = fvVarSet $ varTypeTyFVs var
145
varTypeTyVars :: Var -> TyVarSet varTypeTyVars var = fvVarSet $ varTypeTyFVs var
80
varTypeTyVars var = fvVarSet $ varTypeTyFVs var
47
true
true
0
6
23
26
13
13
null
null
brendanhay/gogol
gogol-bigtableadmin/gen/Network/Google/Resource/BigtableAdmin/Projects/Instances/Tables/List.hs
mpl-2.0
-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). pitlUploadProtocol :: Lens' ProjectsInstancesTablesList (Maybe Text) pitlUploadProtocol = lens _pitlUploadProtocol (\ s a -> s{_pitlUploadProtocol = a})
222
pitlUploadProtocol :: Lens' ProjectsInstancesTablesList (Maybe Text) pitlUploadProtocol = lens _pitlUploadProtocol (\ s a -> s{_pitlUploadProtocol = a})
160
pitlUploadProtocol = lens _pitlUploadProtocol (\ s a -> s{_pitlUploadProtocol = a})
91
true
true
0
9
33
48
25
23
null
null
zinfra/khan
khan/src/Khan/Model/Key.hs
mpl-2.0
path :: Naming a => RKeysBucket -> a -> LKeysDir -> AWS FilePath path (RKeysBucket b) (names -> n@Names{..}) (LKeysDir dir) = do f <- filePath n dir let key = Text.pack . Path.encodeString $ Path.filename f void $ Object.download b key f False False setFileMode f (ownerReadMode .|. ownerWriteMode) ...
328
path :: Naming a => RKeysBucket -> a -> LKeysDir -> AWS FilePath path (RKeysBucket b) (names -> n@Names{..}) (LKeysDir dir) = do f <- filePath n dir let key = Text.pack . Path.encodeString $ Path.filename f void $ Object.download b key f False False setFileMode f (ownerReadMode .|. ownerWriteMode) ...
328
path (RKeysBucket b) (names -> n@Names{..}) (LKeysDir dir) = do f <- filePath n dir let key = Text.pack . Path.encodeString $ Path.filename f void $ Object.download b key f False False setFileMode f (ownerReadMode .|. ownerWriteMode) return f
263
false
true
1
13
72
149
70
79
null
null
CarloMicieli/fun-with-haskell
src/craft3e/Chapter04.hs
apache-2.0
allEqual_prop1 :: Integer -> Bool allEqual_prop1 m = allEqual m m m
67
allEqual_prop1 :: Integer -> Bool allEqual_prop1 m = allEqual m m m
67
allEqual_prop1 m = allEqual m m m
33
false
true
0
7
11
30
13
17
null
null
charlesrosenbauer/Bzo-Compiler
src/BzoChecker.hs
gpl-3.0
makeType dt ft th (BzS_Cmpd p [x]) = makeType dt ft th x
57
makeType dt ft th (BzS_Cmpd p [x]) = makeType dt ft th x
57
makeType dt ft th (BzS_Cmpd p [x]) = makeType dt ft th x
57
false
false
0
8
13
35
17
18
null
null
dreixel/instant-generics
src/Generics/Instant/TH.hs
bsd-3-clause
fromCon wrap ns (dt, vs) m i (InfixC t1 cn t2) = fromCon wrap ns (dt, vs) m i (NormalC cn [t1,t2])
100
fromCon wrap ns (dt, vs) m i (InfixC t1 cn t2) = fromCon wrap ns (dt, vs) m i (NormalC cn [t1,t2])
100
fromCon wrap ns (dt, vs) m i (InfixC t1 cn t2) = fromCon wrap ns (dt, vs) m i (NormalC cn [t1,t2])
100
false
false
0
8
23
68
36
32
null
null
mightymoose/wolunch.com
server/dist/build/autogen/Paths_wolunch.hs
bsd-3-clause
getDataFileName :: FilePath -> IO FilePath getDataFileName name = do dir <- getDataDir return (dir ++ "/" ++ name)
118
getDataFileName :: FilePath -> IO FilePath getDataFileName name = do dir <- getDataDir return (dir ++ "/" ++ name)
118
getDataFileName name = do dir <- getDataDir return (dir ++ "/" ++ name)
75
false
true
0
10
22
45
21
24
null
null
MichielDerhaeg/stack
src/Stack/Types/Image.hs
bsd-3-clause
imgDockerAddArgName :: Text imgDockerAddArgName = "add"
55
imgDockerAddArgName :: Text imgDockerAddArgName = "add"
55
imgDockerAddArgName = "add"
27
false
true
0
4
5
11
6
5
null
null
DanielWaterworth/Idris-dev
src/Idris/Docstrings.hs
bsd-3-clause
-- | Does a string occur in the docstring? containsText :: T.Text -> Docstring -> Bool containsText str (CT.Doc _ blocks) = F.any (blockContains (T.toLower str)) blocks -- blockContains and inlineContains should always be called with a lower-case search string where blockContains :: T.Text -> CT.Block -> Bool ...
1,612
containsText :: T.Text -> Docstring -> Bool containsText str (CT.Doc _ blocks) = F.any (blockContains (T.toLower str)) blocks -- blockContains and inlineContains should always be called with a lower-case search string where blockContains :: T.Text -> CT.Block -> Bool blockContains str (CT.Para inlines) = F...
1,569
containsText str (CT.Doc _ blocks) = F.any (blockContains (T.toLower str)) blocks -- blockContains and inlineContains should always be called with a lower-case search string where blockContains :: T.Text -> CT.Block -> Bool blockContains str (CT.Para inlines) = F.any (inlineContains str) inlines blo...
1,524
true
true
0
10
360
572
282
290
null
null
aesadde/AccObsBenchmarks
Reduce/haskell/src/ReduceCriterion.hs
bsd-3-clause
-- |benchmarks: Uses criterion to measure the performance of Accelerate, -- Obsidian and a sequential version directly written in Haskell benchmarks inputAcc tdsPerBlock size inputV result kern ctx = defaultMainWith benchConfig [ bgroup ("Elems " ++ show size) [ bench "Accel...
541
benchmarks inputAcc tdsPerBlock size inputV result kern ctx = defaultMainWith benchConfig [ bgroup ("Elems " ++ show size) [ bench "Accelerate" $ whnf accReduce (A.use inputAcc), bench "Obsidian" $ whnfIO (performObsidian ctx kern tdsPerBlock size inputV resu...
403
benchmarks inputAcc tdsPerBlock size inputV result kern ctx = defaultMainWith benchConfig [ bgroup ("Elems " ++ show size) [ bench "Accelerate" $ whnf accReduce (A.use inputAcc), bench "Obsidian" $ whnfIO (performObsidian ctx kern tdsPerBlock size inputV resu...
403
true
false
0
13
161
115
56
59
null
null
TomMD/ghc
compiler/codeGen/StgCmmPrim.hs
bsd-3-clause
translateOp _ FloatGeOp = Just (MO_F_Ge W32)
53
translateOp _ FloatGeOp = Just (MO_F_Ge W32)
53
translateOp _ FloatGeOp = Just (MO_F_Ge W32)
53
false
false
1
7
15
21
9
12
null
null
sdiehl/ghc
compiler/main/UpdateCafInfos.hs
bsd-3-clause
updateRuleCafInfos type_env Rule{ .. } = Rule { ru_rhs = updateGlobalIds type_env ru_rhs, .. }
94
updateRuleCafInfos type_env Rule{ .. } = Rule { ru_rhs = updateGlobalIds type_env ru_rhs, .. }
94
updateRuleCafInfos type_env Rule{ .. } = Rule { ru_rhs = updateGlobalIds type_env ru_rhs, .. }
94
false
false
0
7
14
33
17
16
null
null
VictorDenisov/openjdb
Main.hs
gpl-2.0
getVimHost :: [Flag] -> String getVimHost opts = fromMaybe "localhost" $ find isVimHost opts >>= return . vimHost
113
getVimHost :: [Flag] -> String getVimHost opts = fromMaybe "localhost" $ find isVimHost opts >>= return . vimHost
113
getVimHost opts = fromMaybe "localhost" $ find isVimHost opts >>= return . vimHost
82
false
true
0
8
17
41
20
21
null
null
Helkafen/cabal
Cabal/Distribution/Simple/Setup.hs
bsd-3-clause
flagToList :: Flag a -> [a] flagToList (Flag x) = [x]
53
flagToList :: Flag a -> [a] flagToList (Flag x) = [x]
53
flagToList (Flag x) = [x]
25
false
true
0
7
10
33
17
16
null
null
ulricha/dsh-sql
src/Database/DSH/Backend/Sql/Opt/Properties/FD.hs
bsd-3-clause
cols :: BottomUpProps -> S.Set Attr cols p = fst <$> pCols p
60
cols :: BottomUpProps -> S.Set Attr cols p = fst <$> pCols p
60
cols p = fst <$> pCols p
24
false
true
0
7
12
30
14
16
null
null
HarvestGame/logic-prototype
src/Logic/Simulation.hs
mit
toMovement DirS = Position 0 1
30
toMovement DirS = Position 0 1
30
toMovement DirS = Position 0 1
30
false
false
1
5
5
17
6
11
null
null
bacchanalia/KitchenSink
KitchenSink/Qualified.hs
gpl-3.0
-- |'IntMapL.mapKeysMonotonic' iml_mapKeysMonotonic = IntMapL.mapKeysMonotonic
78
iml_mapKeysMonotonic = IntMapL.mapKeysMonotonic
47
iml_mapKeysMonotonic = IntMapL.mapKeysMonotonic
47
true
false
0
5
4
9
5
4
null
null
gregwebs/haskell-sphinx-client
Text/Search/Sphinx/Get.hs
bsd-3-clause
-- Utility functions getNum :: Get Int getNum = getWord32be >>= return . fromEnum
81
getNum :: Get Int getNum = getWord32be >>= return . fromEnum
60
getNum = getWord32be >>= return . fromEnum
42
true
true
0
6
13
23
12
11
null
null
brendanhay/gogol
gogol-slides/gen/Network/Google/Slides/Types/Product.hs
mpl-2.0
-- | The object ID of the created video. cvrObjectId :: Lens' CreateVideoResponse (Maybe Text) cvrObjectId = lens _cvrObjectId (\ s a -> s{_cvrObjectId = a})
159
cvrObjectId :: Lens' CreateVideoResponse (Maybe Text) cvrObjectId = lens _cvrObjectId (\ s a -> s{_cvrObjectId = a})
118
cvrObjectId = lens _cvrObjectId (\ s a -> s{_cvrObjectId = a})
64
true
true
0
9
27
48
25
23
null
null
Axure/elm-compiler
src/Validate.hs
bsd-3-clause
-- VALIDATE DECLARATIONS declarations :: Bool -> [D.SourceDecl] -> Result.Result wrn Error.Error [D.ValidDecl] declarations isRoot sourceDecls = do validDecls <- validateDecls Nothing sourceDecls (\_ _ -> validDecls) <$> declDuplicates validDecls <*> T.traverse (checkDecl isRoot) v...
329
declarations :: Bool -> [D.SourceDecl] -> Result.Result wrn Error.Error [D.ValidDecl] declarations isRoot sourceDecls = do validDecls <- validateDecls Nothing sourceDecls (\_ _ -> validDecls) <$> declDuplicates validDecls <*> T.traverse (checkDecl isRoot) validDecls
303
declarations isRoot sourceDecls = do validDecls <- validateDecls Nothing sourceDecls (\_ _ -> validDecls) <$> declDuplicates validDecls <*> T.traverse (checkDecl isRoot) validDecls
205
true
true
0
11
72
100
48
52
null
null
jfdm/hUML
src/ClassDiagram/Keywords.hs
bsd-3-clause
hUmlOperatorAggregation = "o--"
34
hUmlOperatorAggregation = "o--"
34
hUmlOperatorAggregation = "o--"
34
false
false
0
4
5
6
3
3
null
null
PuZZleDucK/Hls
GOptions.hs
gpl-3.0
getTargets :: Options -> [String] --oh no, what have I done getTargets opts = case (getFlag "--" opts) of (Just targets) -> case value targets of (ListOpt targetList) -> targetList _ -> [] _ -> []
302
getTargets :: Options -> [String] getTargets opts = case (getFlag "--" opts) of (Just targets) -> case value targets of (ListOpt targetList) -> targetList _ -> [] _ -> []
276
getTargets opts = case (getFlag "--" opts) of (Just targets) -> case value targets of (ListOpt targetList) -> targetList _ -> [] _ -> []
242
true
true
0
12
141
81
41
40
null
null
josefs/autosar
oldARSim/ARSim.hs
bsd-3-clause
source vs = do a <- newName addProc (Src a (relative 0.0 [(t,toVal v)|(t,v)<-vs])) return (PE a) where relative t0 [] = [] relative t0 ((t,v):pts) = (t-t0,v) : relative t pts
286
source vs = do a <- newName addProc (Src a (relative 0.0 [(t,toVal v)|(t,v)<-vs])) return (PE a) where relative t0 [] = [] relative t0 ((t,v):pts) = (t-t0,v) : relative t pts
286
source vs = do a <- newName addProc (Src a (relative 0.0 [(t,toVal v)|(t,v)<-vs])) return (PE a) where relative t0 [] = [] relative t0 ((t,v):pts) = (t-t0,v) : relative t pts
286
false
false
2
15
143
144
68
76
null
null
robdockins/edison
edison-core/src/Data/Edison/Seq/BinaryRandList.hs
mit
adjust f i xs | i < 0 = xs | otherwise = adj f i xs where adj :: (a -> a) -> Int -> Seq a -> Seq a adj _ _ E = E adj f i (Even ps) | even i = Even (adj (mapFst f) (half i) ps) | otherwise = Even (adj (mapSnd f) (half i) ps) adj f i (Odd x ps) | odd i = Odd...
469
adjust f i xs | i < 0 = xs | otherwise = adj f i xs where adj :: (a -> a) -> Int -> Seq a -> Seq a adj _ _ E = E adj f i (Even ps) | even i = Even (adj (mapFst f) (half i) ps) | otherwise = Even (adj (mapSnd f) (half i) ps) adj f i (Odd x ps) | odd i = Odd...
469
adjust f i xs | i < 0 = xs | otherwise = adj f i xs where adj :: (a -> a) -> Int -> Seq a -> Seq a adj _ _ E = E adj f i (Even ps) | even i = Even (adj (mapFst f) (half i) ps) | otherwise = Even (adj (mapSnd f) (half i) ps) adj f i (Odd x ps) | odd i = Odd...
469
false
false
0
12
188
327
148
179
null
null
brodyberg/Notes
ProjectRosalind.hsproj/LearnHaskell/lib/ProjectRosalind/FindingAProteinMotif.hs
mit
-- http://blog.sigfpe.com/2007/11/io-monad-for-people-who-simply-dont.html mainREGEX :: IO () mainREGEX = do ids <- filepathToIds filePath contents <- urlsToContent' $ idsToFastaUrl ids putStr $ toString $ resultsWithHits contents ids -- putStr $ toString $ resultsWithHits contents ids where ...
790
mainREGEX :: IO () mainREGEX = do ids <- filepathToIds filePath contents <- urlsToContent' $ idsToFastaUrl ids putStr $ toString $ resultsWithHits contents ids -- putStr $ toString $ resultsWithHits contents ids where resultsWithHits :: [String] -> [String] -> [Fasta] resultsWithH...
715
mainREGEX = do ids <- filepathToIds filePath contents <- urlsToContent' $ idsToFastaUrl ids putStr $ toString $ resultsWithHits contents ids -- putStr $ toString $ resultsWithHits contents ids where resultsWithHits :: [String] -> [String] -> [Fasta] resultsWithHits contents givenI...
696
true
true
3
11
204
183
96
87
null
null
BlairArchibald/bones
apps/tsp/src/Main.hs
bsd-3-clause
printDistanceMatrixErrors :: DistanceMatrix -> IO () printDistanceMatrixErrors dm = let ((!m,_),(!n,_)) = bounds dm coords = [(x,y) | x <- [m .. n], y <- [m .. n]] in forM_ coords $ \(x,y) -> when (x /= y && dm ! (x,y) == 0) $ putStrLn $ "0 distance detected between: " ++ show x ++ " and " ...
329
printDistanceMatrixErrors :: DistanceMatrix -> IO () printDistanceMatrixErrors dm = let ((!m,_),(!n,_)) = bounds dm coords = [(x,y) | x <- [m .. n], y <- [m .. n]] in forM_ coords $ \(x,y) -> when (x /= y && dm ! (x,y) == 0) $ putStrLn $ "0 distance detected between: " ++ show x ++ " and " ...
329
printDistanceMatrixErrors dm = let ((!m,_),(!n,_)) = bounds dm coords = [(x,y) | x <- [m .. n], y <- [m .. n]] in forM_ coords $ \(x,y) -> when (x /= y && dm ! (x,y) == 0) $ putStrLn $ "0 distance detected between: " ++ show x ++ " and " ++ show y
276
false
true
0
19
90
172
91
81
null
null
tpsinnem/Idris-dev
src/Idris/Core/TT.hs
bsd-3-clause
pprintRaw bound RType = text "RType"
36
pprintRaw bound RType = text "RType"
36
pprintRaw bound RType = text "RType"
36
false
false
0
5
5
16
6
10
null
null
Philonous/xml-picklers
src/Data/XML/Pickle/Tuples.hs
bsd-3-clause
tErr :: Text -> UnpickleResult t a -> UnpickleResult t a tErr tr = mapUnpickleError (("tuple", tr) <++>)
104
tErr :: Text -> UnpickleResult t a -> UnpickleResult t a tErr tr = mapUnpickleError (("tuple", tr) <++>)
104
tErr tr = mapUnpickleError (("tuple", tr) <++>)
47
false
true
0
7
17
45
23
22
null
null
bitemyapp/ghc
compiler/nativeGen/Dwarf/Types.hs
bsd-3-clause
pprDwarfInfoOpen _ (DwarfSubprogram _ name label) = sdocWithDynFlags $ \df -> pprAbbrev DwAbbrSubprogram $$ pprString name $$ pprString (renderWithStyle df (ppr label) (mkCodeStyle CStyle)) $$ pprFlag (externallyVisibleCLabel label) $$ pprWord (ppr label) $$ pprWord (ppr $ mkAsmTempEndLabel label) $$ pprB...
359
pprDwarfInfoOpen _ (DwarfSubprogram _ name label) = sdocWithDynFlags $ \df -> pprAbbrev DwAbbrSubprogram $$ pprString name $$ pprString (renderWithStyle df (ppr label) (mkCodeStyle CStyle)) $$ pprFlag (externallyVisibleCLabel label) $$ pprWord (ppr label) $$ pprWord (ppr $ mkAsmTempEndLabel label) $$ pprB...
359
pprDwarfInfoOpen _ (DwarfSubprogram _ name label) = sdocWithDynFlags $ \df -> pprAbbrev DwAbbrSubprogram $$ pprString name $$ pprString (renderWithStyle df (ppr label) (mkCodeStyle CStyle)) $$ pprFlag (externallyVisibleCLabel label) $$ pprWord (ppr label) $$ pprWord (ppr $ mkAsmTempEndLabel label) $$ pprB...
359
false
false
15
8
59
136
59
77
null
null
ghc-android/ghc
testsuite/tests/ghci/should_run/ghcirun004.hs
bsd-3-clause
410 = 409
9
410 = 409
9
410 = 409
9
false
false
1
5
2
10
3
7
null
null
koba-e964/hayashii-mcc
zekamashi/RegAlloc.hs
bsd-3-clause
storeVar :: Typed VId -> Int -> Inst storeVar (vid :-: ty) loc = Inst Nothing $ scall (LId "@store" :-: TFun [ty, TInt] TUnit) [OpVar (vid :-: ty), ci32 loc]
157
storeVar :: Typed VId -> Int -> Inst storeVar (vid :-: ty) loc = Inst Nothing $ scall (LId "@store" :-: TFun [ty, TInt] TUnit) [OpVar (vid :-: ty), ci32 loc]
157
storeVar (vid :-: ty) loc = Inst Nothing $ scall (LId "@store" :-: TFun [ty, TInt] TUnit) [OpVar (vid :-: ty), ci32 loc]
120
false
true
0
10
30
86
43
43
null
null
mdsteele/fallback
src/Fallback/Scenario/Script/Attack.hs
gpl-3.0
------------------------------------------------------------------------------- -- | Return the character's total agility as relevant to attacks, taking -- skills, item bonuses, and status effects into account. chrAttackAgility :: Character -> Int chrAttackAgility char = chrGetStat Agility char + seAttackAgilityMo...
585
chrAttackAgility :: Character -> Int chrAttackAgility char = chrGetStat Agility char + seAttackAgilityModifier (chrStatus char) + case wdRange $ chrEquippedWeaponData char of Melee -> 0 Ranged _ -> if chrAbilityRank EagleEye char >= Just Rank1 then 20 else 0 -- | Get the monster's total agility as releva...
373
chrAttackAgility char = chrGetStat Agility char + seAttackAgilityModifier (chrStatus char) + case wdRange $ chrEquippedWeaponData char of Melee -> 0 Ranged _ -> if chrAbilityRank EagleEye char >= Just Rank1 then 20 else 0 -- | Get the monster's total agility as relevant to attacks, taking into -- account...
336
true
true
0
11
93
91
46
45
null
null
afronski/playground-fp
books/learn-you-a-haskell-for-great-good/recursion/recursion.hs
mit
maximum' (x : xs) | x > maximumFromTail = x | otherwise = maximumFromTail where maximumFromTail = maximum' xs
121
maximum' (x : xs) | x > maximumFromTail = x | otherwise = maximumFromTail where maximumFromTail = maximum' xs
121
maximum' (x : xs) | x > maximumFromTail = x | otherwise = maximumFromTail where maximumFromTail = maximum' xs
121
false
false
0
8
30
49
22
27
null
null
ocharles/hackage-server
Distribution/Server/Pages/Recent.hs
bsd-3-clause
recentFeed :: Users -> URI -> UTCTime -> [PkgInfo] -> RSS recentFeed users hostURI now pkgs = RSS "Recent additions" (hostURI { uriPath = recentAdditionsURL}) desc (channel now) (map (releaseItem users hostURI) pkgList) where desc = "The 20 most recent additions to Hackage (or last 48 hours worth, which...
587
recentFeed :: Users -> URI -> UTCTime -> [PkgInfo] -> RSS recentFeed users hostURI now pkgs = RSS "Recent additions" (hostURI { uriPath = recentAdditionsURL}) desc (channel now) (map (releaseItem users hostURI) pkgList) where desc = "The 20 most recent additions to Hackage (or last 48 hours worth, which...
587
recentFeed users hostURI now pkgs = RSS "Recent additions" (hostURI { uriPath = recentAdditionsURL}) desc (channel now) (map (releaseItem users hostURI) pkgList) where desc = "The 20 most recent additions to Hackage (or last 48 hours worth, whichever is greater), the Haskell package database." twoDa...
529
false
true
4
10
116
192
89
103
null
null
utwente-fmt/scoop
src/DeadVariable.hs
bsd-3-clause
transformSummands dataspec lppe rules belongsTo initial dps cfps relevant destinations [] i = []
96
transformSummands dataspec lppe rules belongsTo initial dps cfps relevant destinations [] i = []
96
transformSummands dataspec lppe rules belongsTo initial dps cfps relevant destinations [] i = []
96
false
false
0
6
13
33
16
17
null
null
purebred-mua/purebred
src/Purebred/Types.hs
agpl-3.0
mbParagraph :: Traversal' MailBody Paragraph mbParagraph f (MailBody s xs) = fmap (\xs' -> MailBody s xs') (traverse f xs)
122
mbParagraph :: Traversal' MailBody Paragraph mbParagraph f (MailBody s xs) = fmap (\xs' -> MailBody s xs') (traverse f xs)
122
mbParagraph f (MailBody s xs) = fmap (\xs' -> MailBody s xs') (traverse f xs)
77
false
true
0
8
19
55
27
28
null
null
haskell-streaming/streaming
benchmarks/old/Stream/Prelude.hs
bsd-3-clause
concats :: Monad m => Stream (Stream (Of a) m) m r -> Stream (Of a) m r concats = buildStream . F.concats . (\(Folding phi) -> Folding (\c w d -> phi (c . foldStream) w d)) . foldStream
261
concats :: Monad m => Stream (Stream (Of a) m) m r -> Stream (Of a) m r concats = buildStream . F.concats . (\(Folding phi) -> Folding (\c w d -> phi (c . foldStream) w d)) . foldStream
261
concats = buildStream . F.concats . (\(Folding phi) -> Folding (\c w d -> phi (c . foldStream) w d)) . foldStream
188
false
true
3
12
115
122
58
64
null
null
spechub/Hets
Adl/Parse.hs
gpl-2.0
pFactor :: Bool -> CharParser st Rule pFactor = pPrec Fd . pTermD
65
pFactor :: Bool -> CharParser st Rule pFactor = pPrec Fd . pTermD
65
pFactor = pPrec Fd . pTermD
27
false
true
0
6
12
27
13
14
null
null
Jugendhackt/paketmagie
src/Paketmagie/GenGraph.hs
gpl-3.0
-- | Returns a random Graph of length n randomGraph :: Int -> IO TickingGraph randomGraph n = do g <- newStdGen let nodeList = genNodes g n edgeList = genEdges g nodeList return . TickingGraph (checkTriples edgeList) $ 0 -- | Generates a random string from a given RandomGen and an Int
306
randomGraph :: Int -> IO TickingGraph randomGraph n = do g <- newStdGen let nodeList = genNodes g n edgeList = genEdges g nodeList return . TickingGraph (checkTriples edgeList) $ 0 -- | Generates a random string from a given RandomGen and an Int
266
randomGraph n = do g <- newStdGen let nodeList = genNodes g n edgeList = genEdges g nodeList return . TickingGraph (checkTriples edgeList) $ 0 -- | Generates a random string from a given RandomGen and an Int
228
true
true
0
11
73
74
35
39
null
null
GaloisInc/halvm-ghc
libraries/template-haskell/Language/Haskell/TH/Ppr.hs
bsd-3-clause
ppr_newtype :: Doc -> Cxt -> Name -> Doc -> Maybe Kind -> Con -> Cxt -> Doc ppr_newtype maybeInst ctxt t argsDoc ksig c decs = sep [text "newtype" <+> maybeInst <+> pprCxt ctxt <+> ppr t <+> argsDoc <+> ksigDoc, nest 2 (char '=' <+> ppr c), if null decs then empty ...
520
ppr_newtype :: Doc -> Cxt -> Name -> Doc -> Maybe Kind -> Con -> Cxt -> Doc ppr_newtype maybeInst ctxt t argsDoc ksig c decs = sep [text "newtype" <+> maybeInst <+> pprCxt ctxt <+> ppr t <+> argsDoc <+> ksigDoc, nest 2 (char '=' <+> ppr c), if null decs then empty ...
520
ppr_newtype maybeInst ctxt t argsDoc ksig c decs = sep [text "newtype" <+> maybeInst <+> pprCxt ctxt <+> ppr t <+> argsDoc <+> ksigDoc, nest 2 (char '=' <+> ppr c), if null decs then empty else nest nestDepth $ text "deriving" <+> ppr_cxt...
444
false
true
1
13
199
186
86
100
null
null
janschulz/pandoc
src/Text/Pandoc/Readers/Markdown.hs
gpl-2.0
citation :: MarkdownParser (F Citation) citation = try $ do pref <- prefix (suppress_author, key) <- citeKey suff <- suffix return $ do x <- pref y <- suff return $ Citation{ citationId = key , citationPrefix = B.toList x , citationSuffix = B.toList y...
617
citation :: MarkdownParser (F Citation) citation = try $ do pref <- prefix (suppress_author, key) <- citeKey suff <- suffix return $ do x <- pref y <- suff return $ Citation{ citationId = key , citationPrefix = B.toList x , citationSuffix = B.toList y...
617
citation = try $ do pref <- prefix (suppress_author, key) <- citeKey suff <- suffix return $ do x <- pref y <- suff return $ Citation{ citationId = key , citationPrefix = B.toList x , citationSuffix = B.toList y , citationMode ...
577
false
true
0
15
309
135
71
64
null
null
orblivion/feedGetter
rss.hs
mit
findChild' = unqualifyfy findChild
34
findChild' = unqualifyfy findChild
34
findChild' = unqualifyfy findChild
34
false
false
0
5
3
9
4
5
null
null
Melvar/Idris-dev
src/Idris/Core/ProofState.hs
bsd-3-clause
intro n ctxt env _ = fail "Can't introduce here."
49
intro n ctxt env _ = fail "Can't introduce here."
49
intro n ctxt env _ = fail "Can't introduce here."
49
false
false
0
4
9
22
8
14
null
null
mightymoose/liquidhaskell
benchmarks/ghc-7.4.1/IO/Encoding/UTF8.hs
bsd-3-clause
bom2 = 0xbf
11
bom2 = 0xbf
11
bom2 = 0xbf
11
false
false
1
5
2
10
3
7
null
null
iblumenfeld/saw-core
src/Verifier/SAW/Simulator/Concrete.hs
bsd-3-clause
bvNatOp :: CValue bvNatOp = Prims.natFun'' "bvNatOp1" $ \w -> return $ Prims.natFun'' "bvNatOp2" $ \x -> return $ VWord (Prim.bv (fromIntegral w) (toInteger x))
167
bvNatOp :: CValue bvNatOp = Prims.natFun'' "bvNatOp1" $ \w -> return $ Prims.natFun'' "bvNatOp2" $ \x -> return $ VWord (Prim.bv (fromIntegral w) (toInteger x))
167
bvNatOp = Prims.natFun'' "bvNatOp1" $ \w -> return $ Prims.natFun'' "bvNatOp2" $ \x -> return $ VWord (Prim.bv (fromIntegral w) (toInteger x))
149
false
true
0
9
31
79
37
42
null
null
petester42/haskell-hockey
src/Hockey/Formatting.hs
mit
playoffMonths :: Year -> [Year] playoffMonths year = [((snd year), 4), ((snd year), 5), ((snd year), 6)]
104
playoffMonths :: Year -> [Year] playoffMonths year = [((snd year), 4), ((snd year), 5), ((snd year), 6)]
104
playoffMonths year = [((snd year), 4), ((snd year), 5), ((snd year), 6)]
72
false
true
0
8
16
66
38
28
null
null
tjakway/ghcjvm
compiler/types/Coercion.hs
bsd-3-clause
ppr_co p (NthCo n co) = pprPrefixApp p (text "Nth:" <> int n) [pprParendCo co]
85
ppr_co p (NthCo n co) = pprPrefixApp p (text "Nth:" <> int n) [pprParendCo co]
85
ppr_co p (NthCo n co) = pprPrefixApp p (text "Nth:" <> int n) [pprParendCo co]
85
false
false
0
8
21
47
21
26
null
null
kubkon/gnuplot
src/Graphics/Gnuplot/Private/FrameOptionSet.hs
bsd-3-clause
{- | Add (set) an option with arguments as plain strings. This is very flexible, but not very safe. Use it only as fall-back, if there is no specific setter function in "Graphics.Gnuplot.Frame.OptionSet". -} add :: Option.T -> [String] -> T graph -> T graph add opt args (Cons m) = Cons (Map.insert opt args m)
314
add :: Option.T -> [String] -> T graph -> T graph add opt args (Cons m) = Cons (Map.insert opt args m)
105
add opt args (Cons m) = Cons (Map.insert opt args m)
55
true
true
0
11
59
68
32
36
null
null
bergmark/time
test/Test/TestTime.hs
bsd-3-clause
testTime :: Test testTime = pureTest "testTime" $ diff testTimeRef $ unlines [testCal, testUTC, testUT1, testTimeOfDayToDayFraction]
136
testTime :: Test testTime = pureTest "testTime" $ diff testTimeRef $ unlines [testCal, testUTC, testUT1, testTimeOfDayToDayFraction]
136
testTime = pureTest "testTime" $ diff testTimeRef $ unlines [testCal, testUTC, testUT1, testTimeOfDayToDayFraction]
119
false
true
4
6
19
48
22
26
null
null
iu-parfunc/containers
tests/deprecated-properties.hs
bsd-3-clause
prop_intmapInsertWithKey'Undefined :: [(Int, Int)] -> Bool prop_intmapInsertWithKey'Undefined xs = let m = IM.fromList xs f k _ x = (k + x) * 33 insertList ins = foldr (\(kx, _) -> ins f kx undefined) m xs in insertList IM.insertWithKey' == insertList IM.insertWithKey
284
prop_intmapInsertWithKey'Undefined :: [(Int, Int)] -> Bool prop_intmapInsertWithKey'Undefined xs = let m = IM.fromList xs f k _ x = (k + x) * 33 insertList ins = foldr (\(kx, _) -> ins f kx undefined) m xs in insertList IM.insertWithKey' == insertList IM.insertWithKey
284
prop_intmapInsertWithKey'Undefined xs = let m = IM.fromList xs f k _ x = (k + x) * 33 insertList ins = foldr (\(kx, _) -> ins f kx undefined) m xs in insertList IM.insertWithKey' == insertList IM.insertWithKey
225
false
true
0
12
58
116
59
57
null
null
aburnett88/HSat
tests-src/Test/Make/Common.hs
mit
genMinimum :: (Ord a, Bounded a, Arbitrary a) => Int -> Gen (Bounds a,a) genMinimum _ = (\a -> (mkMinimum a, a)) <$> arbitrary
130
genMinimum :: (Ord a, Bounded a, Arbitrary a) => Int -> Gen (Bounds a,a) genMinimum _ = (\a -> (mkMinimum a, a)) <$> arbitrary
130
genMinimum _ = (\a -> (mkMinimum a, a)) <$> arbitrary
55
false
true
0
9
27
76
39
37
null
null
aslatter/hmumps
HMumps/Parsers.hs
gpl-3.0
parseDoArg :: Parser DoArg parseDoArg = (do char_ '@'; expr <- parseExpAtom; return $ DoArgIndirect expr) <|> (do loc <- parseEntryRef args <- arglist parseFunArg cond <- postCondition return $ DoArg cond loc args)
274
parseDoArg :: Parser DoArg parseDoArg = (do char_ '@'; expr <- parseExpAtom; return $ DoArgIndirect expr) <|> (do loc <- parseEntryRef args <- arglist parseFunArg cond <- postCondition return $ DoArg cond loc args)
274
parseDoArg = (do char_ '@'; expr <- parseExpAtom; return $ DoArgIndirect expr) <|> (do loc <- parseEntryRef args <- arglist parseFunArg cond <- postCondition return $ DoArg cond loc args)
247
false
true
4
10
93
94
42
52
null
null
ekmett/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/Image.hs
lgpl-2.1
-- | Do something with the pixels of an image withImageData :: Image a -> (Ptr () -> IO b) -> IO b withImageData image f = do pixels <- imageGetData image x <- f pixels image `seq` return x -- about this seq: -- it's not that we're trying to force evaluation order; -- we merely want to prevent image...
426
withImageData :: Image a -> (Ptr () -> IO b) -> IO b withImageData image f = do pixels <- imageGetData image x <- f pixels image `seq` return x -- about this seq: -- it's not that we're trying to force evaluation order; -- we merely want to prevent image from being garbage -- collected before we...
380
withImageData image f = do pixels <- imageGetData image x <- f pixels image `seq` return x -- about this seq: -- it's not that we're trying to force evaluation order; -- we merely want to prevent image from being garbage -- collected before we've managed to use the array that -- is being poi...
327
true
true
0
10
106
83
41
42
null
null
steveshogren/haskell-katas
src/BankOCR.hs
bsd-3-clause
fib 0 = 0
9
fib 0 = 0
9
fib 0 = 0
9
false
false
1
5
3
13
4
9
null
null
spatial-reasoning/zeno
src/SpatioTemporalStructure/OrientedMatroid.hs
bsd-2-clause
--import Interface.Clp --import Debug.Trace --type Assignment = Map.Map [Int] Int --data Chirotope = Chirotope (Map.Map [Int] Int) -- Assume that the simpler conditions are already satisfied (e.g. because of -- preprocessing). Only check whether Grassmann-Pluecker can be satisfied. -- Requires that the number of no...
3,073
satisfiesGrassmannPluecker :: Map.Map [Int] Int -> Bool satisfiesGrassmannPluecker m | null keys = True | otherwise = satisfiesGrassmannPluecker_worker missingPermutsWithParities m where keys = Map.keys m rank = length $ head keys sizeOfDomain = length $ nub $ concat keys ...
2,726
satisfiesGrassmannPluecker m | null keys = True | otherwise = satisfiesGrassmannPluecker_worker missingPermutsWithParities m where keys = Map.keys m rank = length $ head keys sizeOfDomain = length $ nub $ concat keys domain = [0..sizeOfDomain - 1] missingPer...
2,670
true
true
13
19
1,243
825
436
389
null
null
ksaveljev/hake-2
src/Game/Monsters/MBoss31.hs
bsd-3-clause
frameAttack208 :: Int frameAttack208 = 25
41
frameAttack208 :: Int frameAttack208 = 25
41
frameAttack208 = 25
19
false
true
0
4
5
11
6
5
null
null
brendanhay/gogol
gogol-container/gen/Network/Google/Resource/Container/Projects/Zones/Clusters/Addons.hs
mpl-2.0
-- | Multipart request metadata. pzcaPayload :: Lens' ProjectsZonesClustersAddons SetAddonsConfigRequest pzcaPayload = lens _pzcaPayload (\ s a -> s{_pzcaPayload = a})
169
pzcaPayload :: Lens' ProjectsZonesClustersAddons SetAddonsConfigRequest pzcaPayload = lens _pzcaPayload (\ s a -> s{_pzcaPayload = a})
136
pzcaPayload = lens _pzcaPayload (\ s a -> s{_pzcaPayload = a})
64
true
true
0
9
22
42
22
20
null
null
tidalcycles/tidal-midi
Sound/Tidal/MIDI/Tetra.hs
gpl-3.0
(_, release_p) = pF "release" (Just 0.01)
41
(_, release_p) = pF "release" (Just 0.01)
41
(_, release_p) = pF "release" (Just 0.01)
41
false
false
0
7
6
24
12
12
null
null
fredcy/elm-format
src/ElmFormat/Render/Box.hs
bsd-3-clause
formatModule :: AST.Module.Module -> Box formatModule modu = let isComment d = case d of AST.Declaration.BodyComment _ -> True _ -> False spacer first second = case (isDeclaration first, isComment first,...
1,089
formatModule :: AST.Module.Module -> Box formatModule modu = let isComment d = case d of AST.Declaration.BodyComment _ -> True _ -> False spacer first second = case (isDeclaration first, isComment first,...
1,089
formatModule modu = let isComment d = case d of AST.Declaration.BodyComment _ -> True _ -> False spacer first second = case (isDeclaration first, isComment first, isComment second) of (_,...
1,048
false
true
6
14
519
266
134
132
null
null
sol/pwsafe
src/Action.hs
mit
runAction :: Env -> ActionM a -> IO a runAction env (ActionM a) = runReaderT a env
82
runAction :: Env -> ActionM a -> IO a runAction env (ActionM a) = runReaderT a env
82
runAction env (ActionM a) = runReaderT a env
44
false
true
0
7
16
41
19
22
null
null
rzil/honours
LeavittPathAlgebras/GraphMonoid.hs
mit
hamil2 = randomHamiltonianGraph 2 5 0.7
39
hamil2 = randomHamiltonianGraph 2 5 0.7
39
hamil2 = randomHamiltonianGraph 2 5 0.7
39
false
false
1
5
5
16
6
10
null
null
AaronFriel/hyhac
test/Test/HyperDex/Pool.hs
bsd-3-clause
testAtomicList :: Pool ClientConnection -> ByteString -> Test testAtomicList clientPool space = testGroup "list" [ testGroup "int" $ fmap (\f -> f clientPool space) [ generateTestPropAtomicOp "lpush" listLPush (prepend :: Op2 [Int64] Int64) id , generateTestPropAtomicOp "rpush" listRPush (append...
972
testAtomicList :: Pool ClientConnection -> ByteString -> Test testAtomicList clientPool space = testGroup "list" [ testGroup "int" $ fmap (\f -> f clientPool space) [ generateTestPropAtomicOp "lpush" listLPush (prepend :: Op2 [Int64] Int64) id , generateTestPropAtomicOp "rpush" listRPush (append...
972
testAtomicList clientPool space = testGroup "list" [ testGroup "int" $ fmap (\f -> f clientPool space) [ generateTestPropAtomicOp "lpush" listLPush (prepend :: Op2 [Int64] Int64) id , generateTestPropAtomicOp "rpush" listRPush (append :: Op2 [Int64] Int64) id ] , testGroup "float" ...
910
false
true
4
12
244
328
169
159
null
null
nfjinjing/objective-c-ffi
src/Foreign/ObjectiveC.hs
bsd-3-clause
objcMarshallSignedInteger :: Ptr a -> IO Integer objcMarshallSignedInteger ptr = return $ toInteger $ ptrToIntPtr ptr
117
objcMarshallSignedInteger :: Ptr a -> IO Integer objcMarshallSignedInteger ptr = return $ toInteger $ ptrToIntPtr ptr
117
objcMarshallSignedInteger ptr = return $ toInteger $ ptrToIntPtr ptr
68
false
true
0
6
15
35
16
19
null
null
ekmett/wl-pprint-terminfo
src/System/Console/Terminfo/PrettyPrint.hs
bsd-2-clause
eval (Push Reverse) = modify (Reverse:) *> lift reverseOn
64
eval (Push Reverse) = modify (Reverse:) *> lift reverseOn
64
eval (Push Reverse) = modify (Reverse:) *> lift reverseOn
64
false
false
0
7
15
30
14
16
null
null
meiersi/bytestring
Data/ByteString.hs
bsd-3-clause
hGetLine h = System.IO.hGetLine h >>= return . pack . P.map c2w
63
hGetLine h = System.IO.hGetLine h >>= return . pack . P.map c2w
63
hGetLine h = System.IO.hGetLine h >>= return . pack . P.map c2w
63
false
false
1
9
11
35
15
20
null
null
shlevy/ghc
libraries/base/GHC/Event/Internal.hs
bsd-3-clause
evtCombine :: Event -> Event -> Event evtCombine (Event a) (Event b) = Event (a .|. b)
86
evtCombine :: Event -> Event -> Event evtCombine (Event a) (Event b) = Event (a .|. b)
86
evtCombine (Event a) (Event b) = Event (a .|. b)
48
false
true
0
7
16
46
23
23
null
null
c0deaddict/project-euler
src/Part1/Problem17.hs
bsd-3-clause
numberLetters 30 = "thirty"
27
numberLetters 30 = "thirty"
27
numberLetters 30 = "thirty"
27
false
false
0
5
3
9
4
5
null
null
florianpilz/autotool
src/Baum/Draw.hs
gpl-2.0
link_above bs = aboves $ do ( k, b ) <- zip [ 1 .. ] bs return $ handle_left ( k == length bs ) b -- | Data.Tree.drawTree behaviour, uses only
152
link_above bs = aboves $ do ( k, b ) <- zip [ 1 .. ] bs return $ handle_left ( k == length bs ) b -- | Data.Tree.drawTree behaviour, uses only
152
link_above bs = aboves $ do ( k, b ) <- zip [ 1 .. ] bs return $ handle_left ( k == length bs ) b -- | Data.Tree.drawTree behaviour, uses only
152
false
false
0
12
42
58
29
29
null
null
serokell/time-warp
src/Control/TimeWarp/Timed/MonadTimed.hs
mit
-- | Creates a thread, which works for specified amount of time, and then gets -- `killThread`ed. -- Use `for` to specify relative virtual time (counting from now), -- and `till` for absolute one. work :: MonadTimed m => RelativeToNow -> m () -> m () work rel act = fork act >>= schedule rel . killThread
304
work :: MonadTimed m => RelativeToNow -> m () -> m () work rel act = fork act >>= schedule rel . killThread
107
work rel act = fork act >>= schedule rel . killThread
53
true
true
0
9
56
59
29
30
null
null
vikraman/ghc
libraries/base/GHC/List.hs
bsd-3-clause
unzip3 = foldr (\(a,b,c) ~(as,bs,cs) -> (a:as,b:bs,c:cs)) ([],[],[])
89
unzip3 = foldr (\(a,b,c) ~(as,bs,cs) -> (a:as,b:bs,c:cs)) ([],[],[])
89
unzip3 = foldr (\(a,b,c) ~(as,bs,cs) -> (a:as,b:bs,c:cs)) ([],[],[])
89
false
false
1
8
28
80
44
36
null
null
hferreiro/replay
compiler/cmm/PprC.hs
bsd-3-clause
isFixedPtrGlobalReg HpLim = True
32
isFixedPtrGlobalReg HpLim = True
32
isFixedPtrGlobalReg HpLim = True
32
false
false
1
5
3
13
4
9
null
null
mpitid/scheme48
src/Scheme48/Interpreter.hs
mit
isBoolean :: LispVal -> Bool isBoolean (Bool _) = True
54
isBoolean :: LispVal -> Bool isBoolean (Bool _) = True
54
isBoolean (Bool _) = True
25
false
true
0
7
9
24
12
12
null
null
onponomarev/ganeti
src/Ganeti/Utils.hs
bsd-2-clause
exitIfEmpty s [] = exitErr s
31
exitIfEmpty s [] = exitErr s
31
exitIfEmpty s [] = exitErr s
31
false
false
1
5
8
21
7
14
null
null
rahulmutt/ghcvm
compiler/Eta/Prelude/PrimOp.hs
bsd-3-clause
tagOf_PrimOp NewJDoubleArrayOp = _ILIT(1134)
44
tagOf_PrimOp NewJDoubleArrayOp = _ILIT(1134)
44
tagOf_PrimOp NewJDoubleArrayOp = _ILIT(1134)
44
false
false
0
6
3
15
7
8
null
null
jtwool/haskell-sandbox
splitlines.hs
gpl-3.0
square [] = []
14
square [] = []
14
square [] = []
14
false
false
1
6
3
17
6
11
null
null
snoyberg/hackage-server
MirrorClient.hs
bsd-3-clause
isHackageURI :: URI -> Bool isHackageURI uri | Just auth <- uriAuthority uri = uriRegName auth == "hackage.haskell.org" | otherwise = False
163
isHackageURI :: URI -> Bool isHackageURI uri | Just auth <- uriAuthority uri = uriRegName auth == "hackage.haskell.org" | otherwise = False
163
isHackageURI uri | Just auth <- uriAuthority uri = uriRegName auth == "hackage.haskell.org" | otherwise = False
135
false
true
1
9
45
54
23
31
null
null
mtlstats/mtlstats
src/Mtlstats/Types.hs
gpl-3.0
playerSearchWith :: (Player -> Bool) -- ^ The search criteria -> String -- ^ The search string -> [Player] -- ^ The list of players to search -> [(Int, Player)] -- ^ The matching players with their index numbers playerSearchWith criteria sStr = filter match . zip [0..] where match (_, p) =...
434
playerSearchWith :: (Player -> Bool) -- ^ The search criteria -> String -- ^ The search string -> [Player] -- ^ The list of players to search -> [(Int, Player)] playerSearchWith criteria sStr = filter match . zip [0..] where match (_, p) = map toUpper sStr `isInfixOf` map toUpper (p^.pName)...
381
playerSearchWith criteria sStr = filter match . zip [0..] where match (_, p) = map toUpper sStr `isInfixOf` map toUpper (p^.pName) && criteria p -- | Searches through a list of players
206
true
true
0
11
108
116
62
54
null
null
ambiata/zodiac
zodiac-tsrp/bench/Bench/Zodiac/TSRP/Symmetric.hs
bsd-3-clause
benchmarks = [ env (generate' macRequestEnv) $ \ ~(kid, rt, re, cr, sk) -> bgroup "Symmetric" $ [ bench "macRequest" $ nf (macRequest TSRPv1 kid rt re cr) sk , bench "authenticationString" $ nf (authenticationString TSRPv1 kid rt re) cr ] ]
278
benchmarks = [ env (generate' macRequestEnv) $ \ ~(kid, rt, re, cr, sk) -> bgroup "Symmetric" $ [ bench "macRequest" $ nf (macRequest TSRPv1 kid rt re cr) sk , bench "authenticationString" $ nf (authenticationString TSRPv1 kid rt re) cr ] ]
278
benchmarks = [ env (generate' macRequestEnv) $ \ ~(kid, rt, re, cr, sk) -> bgroup "Symmetric" $ [ bench "macRequest" $ nf (macRequest TSRPv1 kid rt re cr) sk , bench "authenticationString" $ nf (authenticationString TSRPv1 kid rt re) cr ] ]
278
false
false
1
14
79
110
54
56
null
null
haskell-opengl/OpenGLRaw
src/Graphics/GL/Functions/F07.hs
bsd-3-clause
-- glEvalCoord1xOES ------------------------------------------------------------ glEvalCoord1xOES :: MonadIO m => GLfixed -- ^ @u@. -> m () glEvalCoord1xOES v1 = liftIO $ dyn87 ptr_glEvalCoord1xOES v1
207
glEvalCoord1xOES :: MonadIO m => GLfixed -- ^ @u@. -> m () glEvalCoord1xOES v1 = liftIO $ dyn87 ptr_glEvalCoord1xOES v1
125
glEvalCoord1xOES v1 = liftIO $ dyn87 ptr_glEvalCoord1xOES v1
60
true
true
0
9
29
45
21
24
null
null
abakst/Zoepis
Zoepis/ZVector.hs
gpl-3.0
rotateTo :: (Floating a, Ord a) => Vector3D a -> Vector3D a -> Maybe (Vector3D a) -> Quaternion a rotateTo v d u = case u of Nothing -> q Just up -> rotation phi d `mulq` q where norm =...
559
rotateTo :: (Floating a, Ord a) => Vector3D a -> Vector3D a -> Maybe (Vector3D a) -> Quaternion a rotateTo v d u = case u of Nothing -> q Just up -> rotation phi d `mulq` q where norm =...
559
rotateTo v d u = case u of Nothing -> q Just up -> rotation phi d `mulq` q where norm = d `cross` up dp = rotateVector q up `dotProduct` norm phi = acos dp - pi/2 where ...
413
false
true
0
12
291
183
94
89
null
null
acowley/ghc
compiler/typecheck/TcGenDeriv.hs
bsd-3-clause
kind1, kind2 :: Kind kind1 = liftedTypeKind `mkArrowKind` liftedTypeKind
72
kind1, kind2 :: Kind kind1 = liftedTypeKind `mkArrowKind` liftedTypeKind
72
kind1 = liftedTypeKind `mkArrowKind` liftedTypeKind
51
false
true
2
6
8
27
12
15
null
null
luispedro/NGH
Data/NGH/Formats/Tests/Gff.hs
mit
case_all = (length annotations) @?= ((length $ L8.lines test_file) - 2)
71
case_all = (length annotations) @?= ((length $ L8.lines test_file) - 2)
71
case_all = (length annotations) @?= ((length $ L8.lines test_file) - 2)
71
false
false
0
11
10
35
18
17
null
null
DaMSL/K3
src/Language/K3/Metaprogram/DataTypes.hs
apache-2.0
liftParser :: (Show a) => String -> K3Parser a -> GeneratorM a liftParser s p = either throwG return $! stringifyError $ runK3Parser Nothing p s
144
liftParser :: (Show a) => String -> K3Parser a -> GeneratorM a liftParser s p = either throwG return $! stringifyError $ runK3Parser Nothing p s
144
liftParser s p = either throwG return $! stringifyError $ runK3Parser Nothing p s
81
false
true
0
9
25
63
29
34
null
null
thorlucas/Sandpiles
src/Main.hs
bsd-3-clause
main :: IO () main = simulateIO window black 60 (Game (Map.fromList [((0, 0), 10)])) render update
98
main :: IO () main = simulateIO window black 60 (Game (Map.fromList [((0, 0), 10)])) render update
98
main = simulateIO window black 60 (Game (Map.fromList [((0, 0), 10)])) render update
84
false
true
0
12
16
58
31
27
null
null
gspindles/mj-score-eval
src/Game/Mahjong/Score.hs
mit
------------------------------------------------------------------------------- -- Scoring functions ------------------------------------------------------------------------------- -- | Calculates the scoring results of the hand scoreHand :: Maybe Hand -> ScoreResults scoreHand Nothing = score &&& pure $ illegalCall
319
scoreHand :: Maybe Hand -> ScoreResults scoreHand Nothing = score &&& pure $ illegalCall
89
scoreHand Nothing = score &&& pure $ illegalCall
49
true
true
0
6
29
33
18
15
null
null
jgoerzen/dtmconv
HaXml-1.12/src/Text/PrettyPrint/HughesPJ.hs
gpl-2.0
p <+> q = Beside p True q
26
p <+> q = Beside p True q
26
p <+> q = Beside p True q
26
false
false
3
5
8
21
8
13
null
null
ekr/tamarin-prover
src/Web/Handler.hs
gpl-3.0
getAutoProverR :: TheoryIdx -> SolutionExtractor -> Int -- autoprover bound to use -> TheoryPath -> Handler RepJson getAutoProverR idx extractor bound = getProverR (fullName, runAutoProver . adapt) idx where adapt autoProver = autoProver...
966
getAutoProverR :: TheoryIdx -> SolutionExtractor -> Int -- autoprover bound to use -> TheoryPath -> Handler RepJson getAutoProverR idx extractor bound = getProverR (fullName, runAutoProver . adapt) idx where adapt autoProver = autoProver...
966
getAutoProverR idx extractor bound = getProverR (fullName, runAutoProver . adapt) idx where adapt autoProver = autoProver { apBound = actualBound, apCut = extractor } withCommas = intersperse ", " fullName = mconcat $ proverName : " (" : withCommas qualifiers ++ [")"] qualifiers = extractorQual...
777
false
true
0
11
313
249
134
115
null
null
diku-dk/futhark
src/Futhark/Analysis/Rephrase.hs
isc
-- | Rephrase a pattern. rephrasePat :: Monad m => (from -> m to) -> Pat from -> m (Pat to) rephrasePat = traverse
122
rephrasePat :: Monad m => (from -> m to) -> Pat from -> m (Pat to) rephrasePat = traverse
97
rephrasePat = traverse
22
true
true
0
9
31
49
24
25
null
null