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
petercrona/spring-clean
src/DependencyGraph.hs
mit
noInEdges :: (Graph, Vertex -> Node) -> [Node] noInEdges (graph, vmap) = getNodesWithoutIn nodesWithInDegree where getNodesWithoutIn = map getNode . filter indegreeIsZero . resolveNode vmap nodesWithInDegree = withIndegree graph indegreeIsZero = (==0) . snd
275
noInEdges :: (Graph, Vertex -> Node) -> [Node] noInEdges (graph, vmap) = getNodesWithoutIn nodesWithInDegree where getNodesWithoutIn = map getNode . filter indegreeIsZero . resolveNode vmap nodesWithInDegree = withIndegree graph indegreeIsZero = (==0) . snd
275
noInEdges (graph, vmap) = getNodesWithoutIn nodesWithInDegree where getNodesWithoutIn = map getNode . filter indegreeIsZero . resolveNode vmap nodesWithInDegree = withIndegree graph indegreeIsZero = (==0) . snd
228
false
true
3
7
51
97
46
51
null
null
CindyLinz/Haskell.js
trans/src/Desugar/List.hs
mit
deListDecl (DataInsDecl l dataOrNew type0 qualConDecl deriving0) = DataInsDecl (id l) (deListDataOrNew dataOrNew) (deListType type0) (fmap (deListQualConDecl) qualConDecl) (fmap (deListDeriving) deriving0)
205
deListDecl (DataInsDecl l dataOrNew type0 qualConDecl deriving0) = DataInsDecl (id l) (deListDataOrNew dataOrNew) (deListType type0) (fmap (deListQualConDecl) qualConDecl) (fmap (deListDeriving) deriving0)
205
deListDecl (DataInsDecl l dataOrNew type0 qualConDecl deriving0) = DataInsDecl (id l) (deListDataOrNew dataOrNew) (deListType type0) (fmap (deListQualConDecl) qualConDecl) (fmap (deListDeriving) deriving0)
205
false
false
0
8
20
74
37
37
null
null
kmilner/tamarin-prover
lib/term/src/Term/Builtin/Convenience.hs
gpl-3.0
y7 = var "y" 7
14
y7 = var "y" 7
14
y7 = var "y" 7
14
false
false
1
5
4
14
5
9
null
null
Lupino/dispatch-article
src/Article/Router/Handler.hs
bsd-3-clause
removeArticleTagHandler :: (HasMySQL u, HasOtherEnv Cache u) => Tag -> Article -> ActionH u w () removeArticleTagHandler Tag{tagID = tid} Article{artID = aid} = do void . lift $ removeArticleTag aid tid resultOK
215
removeArticleTagHandler :: (HasMySQL u, HasOtherEnv Cache u) => Tag -> Article -> ActionH u w () removeArticleTagHandler Tag{tagID = tid} Article{artID = aid} = do void . lift $ removeArticleTag aid tid resultOK
215
removeArticleTagHandler Tag{tagID = tid} Article{artID = aid} = do void . lift $ removeArticleTag aid tid resultOK
118
false
true
0
9
36
87
43
44
null
null
wavewave/madgraph-auto-dataset
src/HEP/Automation/MadGraph/Dataset/Set20110630set1.hs
gpl-3.0
zphParamSet :: [ModelParam ZpH] zphParamSet = [ ZpHParam { massZp = 800.0, gRZp = 3.4 } ]
118
zphParamSet :: [ModelParam ZpH] zphParamSet = [ ZpHParam { massZp = 800.0, gRZp = 3.4 } ]
118
zphParamSet = [ ZpHParam { massZp = 800.0, gRZp = 3.4 } ]
86
false
true
0
7
45
34
20
14
null
null
ocramz/petsc-hs
examples/Test2.hs
gpl-3.0
-- -- NB : bracket_ ignores the return type of the allocation action -- * error codes -- -- PETSC_EXTERN PetscErrorCode PetscErrorMessage(int,const char*[],char **); petscErrorMessage n = do p <- withPtr ( pem n ) >>= handleErrTup peekCString p where pem nn mp = [C.exp|int{PetscErrorMessage($(int nn), $...
652
petscErrorMessage n = do p <- withPtr ( pem n ) >>= handleErrTup peekCString p where pem nn mp = [C.exp|int{PetscErrorMessage($(int nn), $(char** mp), NULL)} |] -- PETSC_EXTERN PetscErrorCode PetscMemoryShowUsage(PetscViewer,const char[]); -- pmsu v c = [C.exp|int{PetscMemoryShowUsage($())}|] -- petscMemor...
480
petscErrorMessage n = do p <- withPtr ( pem n ) >>= handleErrTup peekCString p where pem nn mp = [C.exp|int{PetscErrorMessage($(int nn), $(char** mp), NULL)} |] -- PETSC_EXTERN PetscErrorCode PetscMemoryShowUsage(PetscViewer,const char[]); -- pmsu v c = [C.exp|int{PetscMemoryShowUsage($())}|] -- petscMemor...
480
true
false
0
11
132
65
38
27
null
null
josiah14/lambdaline
LambdaLine/XTerm/Colors.hs
gpl-3.0
defaultDarkYellow :: Color defaultDarkYellow = "3"
50
defaultDarkYellow :: Color defaultDarkYellow = "3"
50
defaultDarkYellow = "3"
23
false
true
0
6
5
18
7
11
null
null
markuspf/Idris-dev
src/IRTS/CodegenC.hs
bsd-3-clause
irts_c (FArith (ATInt (ITFixed ity))) x = "(" ++ x ++ "->info.bits" ++ show (nativeTyWidth ity) ++ ")"
106
irts_c (FArith (ATInt (ITFixed ity))) x = "(" ++ x ++ "->info.bits" ++ show (nativeTyWidth ity) ++ ")"
106
irts_c (FArith (ATInt (ITFixed ity))) x = "(" ++ x ++ "->info.bits" ++ show (nativeTyWidth ity) ++ ")"
106
false
false
5
11
21
61
26
35
null
null
esengie/fpl-exploration-tool
src/specLang/AST.hs
bsd-3-clause
deStabSpec :: LangSpec -> LangSpec deStabSpec (LangSpec v2 v3 v4 v5 axes reds) = LangSpec v2 v3 v4 v5 axes' reds where axes' = (\ax -> ax{Ax.stab = deStab (Ax.stab ax)}) <$> axes -- reds' = (\r -> r{Red.stab = deStab (Red.stab r)}) <$> reds
251
deStabSpec :: LangSpec -> LangSpec deStabSpec (LangSpec v2 v3 v4 v5 axes reds) = LangSpec v2 v3 v4 v5 axes' reds where axes' = (\ax -> ax{Ax.stab = deStab (Ax.stab ax)}) <$> axes -- reds' = (\r -> r{Red.stab = deStab (Red.stab r)}) <$> reds
251
deStabSpec (LangSpec v2 v3 v4 v5 axes reds) = LangSpec v2 v3 v4 v5 axes' reds where axes' = (\ax -> ax{Ax.stab = deStab (Ax.stab ax)}) <$> axes -- reds' = (\r -> r{Red.stab = deStab (Red.stab r)}) <$> reds
216
false
true
0
13
55
89
46
43
null
null
kinnison/haskell-conway
Flarn/Conway.hs
mit
blinkerV :: [Cell] blinkerV = [((0, 0), True), ((0, 1), True), ((0, 2), True)]
102
blinkerV :: [Cell] blinkerV = [((0, 0), True), ((0, 1), True), ((0, 2), True)]
102
blinkerV = [((0, 0), True), ((0, 1), True), ((0, 2), True)]
83
false
true
0
8
37
66
39
27
null
null
vincenthz/hs-xyz-test
Core/Vector/Boxed.hs
bsd-3-clause
vCompare :: Ord a => Vector a -> Vector a -> Ordering vCompare a b = loop 0 where !la = length a !lb = length b loop n | n == la = if la == lb then EQ else LT | n == lb = GT | otherwise = case unsafeIndex a n `compare` unsafeIndex b n of EQ -> loop (...
348
vCompare :: Ord a => Vector a -> Vector a -> Ordering vCompare a b = loop 0 where !la = length a !lb = length b loop n | n == la = if la == lb then EQ else LT | n == lb = GT | otherwise = case unsafeIndex a n `compare` unsafeIndex b n of EQ -> loop (...
348
vCompare a b = loop 0 where !la = length a !lb = length b loop n | n == la = if la == lb then EQ else LT | n == lb = GT | otherwise = case unsafeIndex a n `compare` unsafeIndex b n of EQ -> loop (n+1) r -> r
294
false
true
0
11
153
170
77
93
null
null
mikusp/accelerate-cuda
Data/Array/Accelerate/CUDA/Array/Prim.hs
bsd-3-clause
devicePtrsOfArrayData :: (ArrayElt e, DevicePtrs e ~ CUDA.DevicePtr b, Typeable e, Typeable b) => Context -> MemoryTable -> ArrayData e -> IO (DevicePtrs e) devicePtrsOfArrayData !ctx !mt !ad = do mv <- lookup ctx mt ad case mv of Just v -> return v Nothing -> do sn <- makeStableN...
486
devicePtrsOfArrayData :: (ArrayElt e, DevicePtrs e ~ CUDA.DevicePtr b, Typeable e, Typeable b) => Context -> MemoryTable -> ArrayData e -> IO (DevicePtrs e) devicePtrsOfArrayData !ctx !mt !ad = do mv <- lookup ctx mt ad case mv of Just v -> return v Nothing -> do sn <- makeStableN...
486
devicePtrsOfArrayData !ctx !mt !ad = do mv <- lookup ctx mt ad case mv of Just v -> return v Nothing -> do sn <- makeStableName ad $internalError "devicePtrsOfArrayData" $ "lost device memory #" ++ show (hashStableName sn) -- Advance device pointers by a given number of elements --
309
false
true
0
17
119
166
75
91
null
null
tibbe/ghc
compiler/cmm/PprC.hs
bsd-3-clause
-- --------------------------------------------------------------------- -- a local table branch -- -- we find the fall-through cases -- -- N.B. we remove Nothing's from the list of branches, as they are -- 'undefined'. However, they may be defined one day, so we better -- document this behaviour. -- pprSwitch :: DynFl...
1,620
pprSwitch :: DynFlags -> CmmExpr -> [ Maybe BlockId ] -> SDoc pprSwitch dflags e maybe_ids = let pairs = [ (ix, ident) | (ix,Just ident) <- zip [0..] maybe_ids ] pairs2 = [ (map fst as, snd (head as)) | as <- groupBy sndEq pairs ] in (hang (ptext (sLit "switch") <+> parens ( pprExpr e ) <+> lbrac...
1,318
pprSwitch dflags e maybe_ids = let pairs = [ (ix, ident) | (ix,Just ident) <- zip [0..] maybe_ids ] pairs2 = [ (map fst as, snd (head as)) | as <- groupBy sndEq pairs ] in (hang (ptext (sLit "switch") <+> parens ( pprExpr e ) <+> lbrace) 4 (vcat ( map caseify pairs2 ))) $$...
1,256
true
true
0
15
439
404
216
188
null
null
cchalmers/pgf-system
examples/Mandelbrot.hs
bsd-3-clause
pgfM d = pgfR "latex.pdf" latexSurface d >> pgfR "plain.pdf" plaintexSurface d >> pgfR "context.pdf" contextSurface d
133
pgfM d = pgfR "latex.pdf" latexSurface d >> pgfR "plain.pdf" plaintexSurface d >> pgfR "context.pdf" contextSurface d
133
pgfM d = pgfR "latex.pdf" latexSurface d >> pgfR "plain.pdf" plaintexSurface d >> pgfR "context.pdf" contextSurface d
133
false
false
0
7
32
38
17
21
null
null
I3ck/H2D
src/Path2D.hs
lgpl-3.0
removeBelow :: Path2D -> Vec2D -> Path2D removeBelow [] _ = []
65
removeBelow :: Path2D -> Vec2D -> Path2D removeBelow [] _ = []
65
removeBelow [] _ = []
24
false
true
0
6
14
28
14
14
null
null
brendanhay/gogol
gogol-slides/gen/Network/Google/Slides/Types/Product.hs
mpl-2.0
-- | Groups objects, such as page elements. reqGroupObjects :: Lens' Request' (Maybe GroupObjectsRequest) reqGroupObjects = lens _reqGroupObjects (\ s a -> s{_reqGroupObjects = a})
188
reqGroupObjects :: Lens' Request' (Maybe GroupObjectsRequest) reqGroupObjects = lens _reqGroupObjects (\ s a -> s{_reqGroupObjects = a})
144
reqGroupObjects = lens _reqGroupObjects (\ s a -> s{_reqGroupObjects = a})
82
true
true
0
9
32
48
25
23
null
null
ku-fpg/kansas-amber
tests/TransTests/TransIfTest.hs
bsd-3-clause
test2 :: Bool test2 = (show testTransProg2) == (show testTransProg2E)
69
test2 :: Bool test2 = (show testTransProg2) == (show testTransProg2E)
69
test2 = (show testTransProg2) == (show testTransProg2E)
55
false
true
0
7
9
27
14
13
null
null
lhuang7/mysql
Database/MySQL/Base.hs
bsd-3-clause
fetchRow :: Result -> IO [Maybe ByteString] fetchRow res@Result{..} = withRes "fetchRow" res $ \ptr -> do rowPtr <- resFetchRow ptr if rowPtr == nullPtr then return [] else do lenPtr <- resFetchLengths ptr checkNull "fetchRow" resConnection lenPtr let go len = withPtr $ \colPtr -> ...
551
fetchRow :: Result -> IO [Maybe ByteString] fetchRow res@Result{..} = withRes "fetchRow" res $ \ptr -> do rowPtr <- resFetchRow ptr if rowPtr == nullPtr then return [] else do lenPtr <- resFetchLengths ptr checkNull "fetchRow" resConnection lenPtr let go len = withPtr $ \colPtr -> ...
551
fetchRow res@Result{..} = withRes "fetchRow" res $ \ptr -> do rowPtr <- resFetchRow ptr if rowPtr == nullPtr then return [] else do lenPtr <- resFetchLengths ptr checkNull "fetchRow" resConnection lenPtr let go len = withPtr $ \colPtr -> create (fromIntegral len) $ \d -...
507
false
true
0
21
174
186
87
99
null
null
tjakway/ghcjvm
compiler/prelude/PrelNames.hs
bsd-3-clause
srcLocDataConKey :: Unique srcLocDataConKey = mkPreludeDataConUnique 37
94
srcLocDataConKey :: Unique srcLocDataConKey = mkPreludeDataConUnique 37
94
srcLocDataConKey = mkPreludeDataConUnique 37
67
false
true
0
5
29
14
7
7
null
null
unisonweb/platform
parser-typechecker/src/Unison/Runtime/Builtin.hs
mit
numberedTermLookup :: Var v => EnumMap Word64 (SuperNormal v) numberedTermLookup = mapFromList . zip [1..] . Map.elems $ builtinLookup
136
numberedTermLookup :: Var v => EnumMap Word64 (SuperNormal v) numberedTermLookup = mapFromList . zip [1..] . Map.elems $ builtinLookup
136
numberedTermLookup = mapFromList . zip [1..] . Map.elems $ builtinLookup
74
false
true
0
9
20
51
24
27
null
null
michalkonecny/aern
aern-mpfr/demos/SpringMassV.hs
bsd-3-clause
mkConstPoly :: [String] -> MI -> Poly mkConstPoly [xName] c = G xName [c]
73
mkConstPoly :: [String] -> MI -> Poly mkConstPoly [xName] c = G xName [c]
73
mkConstPoly [xName] c = G xName [c]
35
false
true
0
6
13
38
20
18
null
null
sol/pandoc
src/Tests/Readers/LaTeX.hs
gpl-2.0
biblatexCitations :: Test biblatexCitations = testGroup "biblatex" [ "textcite" =: "\\textcite{item1}" =?> para (cite [baseCitation] mempty) , "suffix" =: "\\textcite[p.~30]{item1}" =?> para (cite [baseCitation{ citationSuffix = toList $ text "p.\160\&30" }] mempty) , "suffix long" =: "\\textcite[...
3,024
biblatexCitations :: Test biblatexCitations = testGroup "biblatex" [ "textcite" =: "\\textcite{item1}" =?> para (cite [baseCitation] mempty) , "suffix" =: "\\textcite[p.~30]{item1}" =?> para (cite [baseCitation{ citationSuffix = toList $ text "p.\160\&30" }] mempty) , "suffix long" =: "\\textcite[...
3,024
biblatexCitations = testGroup "biblatex" [ "textcite" =: "\\textcite{item1}" =?> para (cite [baseCitation] mempty) , "suffix" =: "\\textcite[p.~30]{item1}" =?> para (cite [baseCitation{ citationSuffix = toList $ text "p.\160\&30" }] mempty) , "suffix long" =: "\\textcite[p.~30, with suffix]{item1}...
2,998
false
true
0
16
1,021
669
370
299
null
null
gridaphobe/cabal2nix
distribution-nixpkgs/src/Distribution/Nixpkgs/Haskell/BuildInfo.hs
bsd-3-clause
pPrintBuildInfo :: String -> BuildInfo -> Doc pPrintBuildInfo prefix bi = vcat [ setattr (prefix++"HaskellDepends") empty (setOf (haskell.folded.localName.ident) bi) , setattr (prefix++"SystemDepends") empty (setOf (system.folded.localName.ident) bi) , setattr (prefix++"PkgconfigDepends") empty (setOf (pkgconfig...
435
pPrintBuildInfo :: String -> BuildInfo -> Doc pPrintBuildInfo prefix bi = vcat [ setattr (prefix++"HaskellDepends") empty (setOf (haskell.folded.localName.ident) bi) , setattr (prefix++"SystemDepends") empty (setOf (system.folded.localName.ident) bi) , setattr (prefix++"PkgconfigDepends") empty (setOf (pkgconfig...
435
pPrintBuildInfo prefix bi = vcat [ setattr (prefix++"HaskellDepends") empty (setOf (haskell.folded.localName.ident) bi) , setattr (prefix++"SystemDepends") empty (setOf (system.folded.localName.ident) bi) , setattr (prefix++"PkgconfigDepends") empty (setOf (pkgconfig.folded.localName.ident) bi) , setattr (pref...
389
false
true
0
12
51
163
85
78
null
null
raduom/tapl
src/Arithmetic/Parser.hs
mit
succesor :: Parser Term succesor = TmSucc <$> token (string "succ" >> expression)
81
succesor :: Parser Term succesor = TmSucc <$> token (string "succ" >> expression)
81
succesor = TmSucc <$> token (string "succ" >> expression)
57
false
true
0
9
12
31
15
16
null
null
MaxDaten/netwire-examples
netwire-flying-words.hs
mit
control whenInhibited whenProduced wire = loop wire (deltaClockSession 10000) where loop w' session' = do (mx, w, session) <- stepSession w' session' () case mx of Left ex -> whenInhibited ex Right x -> whenProduced x loop w session `catch` ((\_ -> ansiFinishUI)...
347
control whenInhibited whenProduced wire = loop wire (deltaClockSession 10000) where loop w' session' = do (mx, w, session) <- stepSession w' session' () case mx of Left ex -> whenInhibited ex Right x -> whenProduced x loop w session `catch` ((\_ -> ansiFinishUI)...
347
control whenInhibited whenProduced wire = loop wire (deltaClockSession 10000) where loop w' session' = do (mx, w, session) <- stepSession w' session' () case mx of Left ex -> whenInhibited ex Right x -> whenProduced x loop w session `catch` ((\_ -> ansiFinishUI)...
347
false
false
1
12
105
137
63
74
null
null
mightybyte/cabal
Cabal/Distribution/Simple/GHC.hs
bsd-3-clause
getObjectFileName :: FilePath -> GhcOptions -> FilePath getObjectFileName filename opts = oname where odir = fromFlag (ghcOptObjDir opts) oext = fromFlagOrDefault "o" (ghcOptObjSuffix opts) oname = odir </> replaceExtension filename oext -- | Calculate the RPATHs for the component we are buil...
385
getObjectFileName :: FilePath -> GhcOptions -> FilePath getObjectFileName filename opts = oname where odir = fromFlag (ghcOptObjDir opts) oext = fromFlagOrDefault "o" (ghcOptObjSuffix opts) oname = odir </> replaceExtension filename oext -- | Calculate the RPATHs for the component we are buil...
385
getObjectFileName filename opts = oname where odir = fromFlag (ghcOptObjDir opts) oext = fromFlagOrDefault "o" (ghcOptObjSuffix opts) oname = odir </> replaceExtension filename oext -- | Calculate the RPATHs for the component we are building. -- -- Calculates relative RPATHs when 'relocatable...
329
false
true
3
7
77
87
39
48
null
null
cdxr/reactive-banana-glfw
Reactive/Banana/GLFW/Button.hs
bsd-3-clause
repeating :: ButtonEvent b KeyState -> Bool repeating be = case buttonState be of KeyState'Repeating -> True _ -> False
144
repeating :: ButtonEvent b KeyState -> Bool repeating be = case buttonState be of KeyState'Repeating -> True _ -> False
144
repeating be = case buttonState be of KeyState'Repeating -> True _ -> False
100
false
true
0
8
44
46
21
25
null
null
HIPERFIT/futhark
src/Futhark/IR/Primitive.hs
isc
cmpOpType (CmpSlt t) = IntType t
32
cmpOpType (CmpSlt t) = IntType t
32
cmpOpType (CmpSlt t) = IntType t
32
false
false
0
6
5
19
8
11
null
null
olsner/m3
CodeGen.hs
bsd-3-clause
-- | Encode a formal parameter as a LLVM type (e.g. "i32") or type + name (as "i32 %param") encodeFormal :: Bool -- ^ Include variable name for parameter lists? -> FormalParam -- ^ Formal parameter -> String encodeFormal True (FormalParam typ (Just name)) = encodeType typ++" %"++encodeN...
328
encodeFormal :: Bool -- ^ Include variable name for parameter lists? -> FormalParam -- ^ Formal parameter -> String encodeFormal True (FormalParam typ (Just name)) = encodeType typ++" %"++encodeName name
236
encodeFormal True (FormalParam typ (Just name)) = encodeType typ++" %"++encodeName name
87
true
true
0
12
81
60
29
31
null
null
DaMSL/K3
src/Language/K3/Runtime/Engine.hs
apache-2.0
incAwakeWorkers :: EngineM a () incAwakeWorkers = do engine <- ask mv <- return $ awakeWorkersV $ control engine liftIO $ modifyMVar_ mv $ return . succ -- Wait on the MSampleVar associated with the given worker
222
incAwakeWorkers :: EngineM a () incAwakeWorkers = do engine <- ask mv <- return $ awakeWorkersV $ control engine liftIO $ modifyMVar_ mv $ return . succ -- Wait on the MSampleVar associated with the given worker
222
incAwakeWorkers = do engine <- ask mv <- return $ awakeWorkersV $ control engine liftIO $ modifyMVar_ mv $ return . succ -- Wait on the MSampleVar associated with the given worker
190
false
true
0
10
47
62
29
33
null
null
jamessanders/twine
src/Text/Twine/Interpreter.hs
bsd-2-clause
putCX :: (Monad m) => TwineElement m -> Stack m () putCX cx = do s <- get put $ s { getContextState = cx }
120
putCX :: (Monad m) => TwineElement m -> Stack m () putCX cx = do s <- get put $ s { getContextState = cx }
120
putCX cx = do s <- get put $ s { getContextState = cx }
69
false
true
0
10
39
64
30
34
null
null
mikeplus64/hasql-postgres
Setup.hs
mit
testDeps :: ComponentLocalBuildInfo -> ComponentLocalBuildInfo -> [(InstalledPackageId, PackageId)] testDeps xs ys = nub $ componentPackageDeps xs ++ componentPackageDeps ys
173
testDeps :: ComponentLocalBuildInfo -> ComponentLocalBuildInfo -> [(InstalledPackageId, PackageId)] testDeps xs ys = nub $ componentPackageDeps xs ++ componentPackageDeps ys
173
testDeps xs ys = nub $ componentPackageDeps xs ++ componentPackageDeps ys
73
false
true
2
10
18
53
25
28
null
null
supki/liblastfm
src/Lastfm/Geo.hs
mit
-- | Get a chart of tracks for a metro -- -- Optional: 'start', 'end', 'page', 'limit' -- -- <http://www.last.fm/api/show/geo.getMetroHypeTrackChart> getMetroHypeTrackChart :: Request f (Metro -> Country -> APIKey -> Ready) getMetroHypeTrackChart = api "geo.getMetroHypeTrackChart"
281
getMetroHypeTrackChart :: Request f (Metro -> Country -> APIKey -> Ready) getMetroHypeTrackChart = api "geo.getMetroHypeTrackChart"
131
getMetroHypeTrackChart = api "geo.getMetroHypeTrackChart"
57
true
true
0
9
34
39
22
17
null
null
brendanhay/gogol
gogol-vision/gen/Network/Google/Vision/Types/Product.hs
mpl-2.0
-- | If the file was a PDF or TIFF, this field gives the page number within -- the file used to produce the image. gPageNumber :: Lens' GoogleCloudVisionV1p1beta1ImageAnnotationContext (Maybe Int32) gPageNumber = lens _gPageNumber (\ s a -> s{_gPageNumber = a}) . mapping _Coerce
287
gPageNumber :: Lens' GoogleCloudVisionV1p1beta1ImageAnnotationContext (Maybe Int32) gPageNumber = lens _gPageNumber (\ s a -> s{_gPageNumber = a}) . mapping _Coerce
172
gPageNumber = lens _gPageNumber (\ s a -> s{_gPageNumber = a}) . mapping _Coerce
88
true
true
1
10
52
60
29
31
null
null
brendanhay/gogol
gogol-run/gen/Network/Google/Resource/Run/Projects/Locations/List.hs
mpl-2.0
-- | The maximum number of results to return. If not set, the service selects -- a default. pllPageSize :: Lens' ProjectsLocationsList (Maybe Int32) pllPageSize = lens _pllPageSize (\ s a -> s{_pllPageSize = a}) . mapping _Coerce
237
pllPageSize :: Lens' ProjectsLocationsList (Maybe Int32) pllPageSize = lens _pllPageSize (\ s a -> s{_pllPageSize = a}) . mapping _Coerce
145
pllPageSize = lens _pllPageSize (\ s a -> s{_pllPageSize = a}) . mapping _Coerce
88
true
true
0
10
45
56
29
27
null
null
lukexi/cabal
Cabal/Distribution/Simple/GHC.hs
bsd-3-clause
getLibDir :: Verbosity -> LocalBuildInfo -> IO FilePath getLibDir verbosity lbi = dropWhileEndLE isSpace `fmap` rawSystemProgramStdoutConf verbosity ghcProgram (withPrograms lbi) ["--print-libdir"]
211
getLibDir :: Verbosity -> LocalBuildInfo -> IO FilePath getLibDir verbosity lbi = dropWhileEndLE isSpace `fmap` rawSystemProgramStdoutConf verbosity ghcProgram (withPrograms lbi) ["--print-libdir"]
211
getLibDir verbosity lbi = dropWhileEndLE isSpace `fmap` rawSystemProgramStdoutConf verbosity ghcProgram (withPrograms lbi) ["--print-libdir"]
155
false
true
0
8
34
54
27
27
null
null
fhaust/aer
src/Data/AER/DVS128.hs
mit
qview :: Event Address -> (Polarity, Word7, Word7, NominalDiffTime) qview (Event (Address p x y) t) = (p,x,y,t)
111
qview :: Event Address -> (Polarity, Word7, Word7, NominalDiffTime) qview (Event (Address p x y) t) = (p,x,y,t)
111
qview (Event (Address p x y) t) = (p,x,y,t)
43
false
true
0
9
17
63
35
28
null
null
mightymoose/liquidhaskell
docs/slides/BOS14/hs/start/02_AbstractRefinements.hs
bsd-3-clause
{-@ diffs :: DiffList Integer @-} diffs = 100 `C` 1000 `C` 10 `C` 1 `C` N
78
diffs = 100 `C` 1000 `C` 10 `C` 1 `C` N
44
diffs = 100 `C` 1000 `C` 10 `C` 1 `C` N
44
true
false
1
8
21
38
21
17
null
null
eklavya/Idris-dev
src/Idris/Docs.hs
bsd-3-clause
docInterface :: Name -> InterfaceInfo -> Idris Docs docInterface n ci = do i <- getIState let docStrings = listToMaybe $ lookupCtxt n $ idris_docstrings i docstr = maybe emptyDocstring fst docStrings params = map (\pn -> (pn, docStrings >>= (lookup pn . snd))) (int...
1,971
docInterface :: Name -> InterfaceInfo -> Idris Docs docInterface n ci = do i <- getIState let docStrings = listToMaybe $ lookupCtxt n $ idris_docstrings i docstr = maybe emptyDocstring fst docStrings params = map (\pn -> (pn, docStrings >>= (lookup pn . snd))) (int...
1,971
docInterface n ci = do i <- getIState let docStrings = listToMaybe $ lookupCtxt n $ idris_docstrings i docstr = maybe emptyDocstring fst docStrings params = map (\pn -> (pn, docStrings >>= (lookup pn . snd))) (interface_params ci) docsForImplementation i...
1,919
false
true
3
17
745
653
318
335
null
null
nushio3/ghc
compiler/main/DriverPipeline.hs
bsd-3-clause
runPhase (RealPhase LlvmOpt) input_fn dflags = do let opt_lvl = max 0 (min 2 $ optLevel dflags) -- don't specify anything if user has specified commands. We do this -- for opt but not llc since opt is very specifically for optimisation -- passes only, so if the user is passing us extra op...
1,423
runPhase (RealPhase LlvmOpt) input_fn dflags = do let opt_lvl = max 0 (min 2 $ optLevel dflags) -- don't specify anything if user has specified commands. We do this -- for opt but not llc since opt is very specifically for optimisation -- passes only, so if the user is passing us extra op...
1,423
runPhase (RealPhase LlvmOpt) input_fn dflags = do let opt_lvl = max 0 (min 2 $ optLevel dflags) -- don't specify anything if user has specified commands. We do this -- for opt but not llc since opt is very specifically for optimisation -- passes only, so if the user is passing us extra op...
1,423
false
false
0
14
485
227
114
113
null
null
rahulmutt/ghcvm
compiler/Eta/Types/TyCon.hs
bsd-3-clause
isFunTyCon :: TyCon -> Bool isFunTyCon (FunTyCon {}) = True
59
isFunTyCon :: TyCon -> Bool isFunTyCon (FunTyCon {}) = True
59
isFunTyCon (FunTyCon {}) = True
31
false
true
1
8
9
30
14
16
null
null
Changaco/haskell-plugins
src/System/Plugins/Env.hs
lgpl-2.1
------------------------------------------------------------------------ -- do we have a Module name for this merge? -- isMerged :: FilePath -> FilePath -> IO Bool isMerged a b = withMerged $ \e -> return $ isJust (M.lookup (a,b) e)
232
isMerged :: FilePath -> FilePath -> IO Bool isMerged a b = withMerged $ \e -> return $ isJust (M.lookup (a,b) e)
112
isMerged a b = withMerged $ \e -> return $ isJust (M.lookup (a,b) e)
68
true
true
4
8
33
68
34
34
null
null
koengit/induction-examples
Sort_BubbleSort.hs
mit
count x (y:xs) | x == y = 1 + count x xs | otherwise = count x xs
83
count x (y:xs) | x == y = 1 + count x xs | otherwise = count x xs
83
count x (y:xs) | x == y = 1 + count x xs | otherwise = count x xs
83
false
false
0
8
36
51
23
28
null
null
mettekou/ghc
compiler/hsSyn/HsPat.hs
bsd-3-clause
hsConPatArgs (RecCon fs) = map (hsRecFieldArg . unLoc) (rec_flds fs)
73
hsConPatArgs (RecCon fs) = map (hsRecFieldArg . unLoc) (rec_flds fs)
73
hsConPatArgs (RecCon fs) = map (hsRecFieldArg . unLoc) (rec_flds fs)
73
false
false
0
7
14
33
16
17
null
null
sgillespie/ghc
compiler/coreSyn/MkCore.hs
bsd-3-clause
nonExhaustiveGuardsErrorName = err_nm "nonExhaustiveGuardsError" nonExhaustiveGuardsErrorIdKey nON_EXHAUSTIVE_GUARDS_ERROR_ID
159
nonExhaustiveGuardsErrorName = err_nm "nonExhaustiveGuardsError" nonExhaustiveGuardsErrorIdKey nON_EXHAUSTIVE_GUARDS_ERROR_ID
159
nonExhaustiveGuardsErrorName = err_nm "nonExhaustiveGuardsError" nonExhaustiveGuardsErrorIdKey nON_EXHAUSTIVE_GUARDS_ERROR_ID
159
false
false
0
5
39
13
6
7
null
null
joshuaclayton/j-archive-parser
src/JArchiveParser/Arrow/Util.hs
bsd-3-clause
allText :: ArrowXml a => a (NTree XNode) String allText = allTextNodes >>^ extractTextFromNodes >>> arr concat where allTextNodes = listA $ deep isText extractTextFromNodes = fmap f' f' (NTree (XText v) _) = v
227
allText :: ArrowXml a => a (NTree XNode) String allText = allTextNodes >>^ extractTextFromNodes >>> arr concat where allTextNodes = listA $ deep isText extractTextFromNodes = fmap f' f' (NTree (XText v) _) = v
227
allText = allTextNodes >>^ extractTextFromNodes >>> arr concat where allTextNodes = listA $ deep isText extractTextFromNodes = fmap f' f' (NTree (XText v) _) = v
179
false
true
0
9
52
85
41
44
null
null
andorp/hs-bluesnap
src/Bluesnap/API/Response.hs
gpl-3.0
elementToXMLPaypal_info :: Paypal_info -> [Content ()] elementToXMLPaypal_info = schemaTypeToXML "paypal-info"
110
elementToXMLPaypal_info :: Paypal_info -> [Content ()] elementToXMLPaypal_info = schemaTypeToXML "paypal-info"
110
elementToXMLPaypal_info = schemaTypeToXML "paypal-info"
55
false
true
0
8
9
26
13
13
null
null
kumasento/accelerate
Data/Array/Accelerate/Trafo/Sharing.hs
bsd-3-clause
-- | Convert a closed function over array computations, while incorporating -- sharing information. -- convertAfun :: Afunction f => Bool -> Bool -> Bool -> f -> AST.Afun (AfunctionR f) convertAfun shareAcc shareExp floatAcc = let config = Config shareAcc shareExp (shareAcc && floatAcc) in aconvert config EmptyLay...
323
convertAfun :: Afunction f => Bool -> Bool -> Bool -> f -> AST.Afun (AfunctionR f) convertAfun shareAcc shareExp floatAcc = let config = Config shareAcc shareExp (shareAcc && floatAcc) in aconvert config EmptyLayout
220
convertAfun shareAcc shareExp floatAcc = let config = Config shareAcc shareExp (shareAcc && floatAcc) in aconvert config EmptyLayout
137
true
true
0
12
53
85
42
43
null
null
diku-dk/futhark
src/Futhark/IR/SOACS/Simplify.hs
isc
simplifyClosedFormReduce _ _ _ _ = Skip
39
simplifyClosedFormReduce _ _ _ _ = Skip
39
simplifyClosedFormReduce _ _ _ _ = Skip
39
false
false
0
5
6
15
7
8
null
null
adamflott/scotty
Web/Scotty/Action.hs
bsd-3-clause
-- | Set the body of the response to the JSON encoding of the given value. Also sets \"Content-Type\" -- header to \"application/json; charset=utf-8\" if it has not already been set. json :: (A.ToJSON a, ScottyError e, Monad m) => a -> ActionT e m () json v = do changeHeader addIfNotPresent "Content-Type" "applicat...
522
json :: (A.ToJSON a, ScottyError e, Monad m) => a -> ActionT e m () json v = do changeHeader addIfNotPresent "Content-Type" "application/json; charset=utf-8" raw $ A.encode v -- | Set the body of the response to a Source. Doesn't set the -- \"Content-Type\" header, so you probably want to do that on your -- ow...
339
json v = do changeHeader addIfNotPresent "Content-Type" "application/json; charset=utf-8" raw $ A.encode v -- | Set the body of the response to a Source. Doesn't set the -- \"Content-Type\" header, so you probably want to do that on your -- own with 'setHeader'.
271
true
true
0
9
97
77
39
38
null
null
alexliew/learn_you_a_haskell
3_syntax_in_functions.hs
unlicense
charName 'b' = "Broseph"
24
charName 'b' = "Broseph"
24
charName 'b' = "Broseph"
24
false
false
0
5
3
9
4
5
null
null
tjakway/ghcjvm
compiler/basicTypes/OccName.hs
bsd-3-clause
mkOccNameFS :: NameSpace -> FastString -> OccName mkOccNameFS occ_sp fs = OccName occ_sp fs
91
mkOccNameFS :: NameSpace -> FastString -> OccName mkOccNameFS occ_sp fs = OccName occ_sp fs
91
mkOccNameFS occ_sp fs = OccName occ_sp fs
41
false
true
0
6
13
29
14
15
null
null
Soares/tagwiki
src/Control/DateTime/Relative.hs
mit
colin = string Y.minSep *> return ()
36
colin = string Y.minSep *> return ()
36
colin = string Y.minSep *> return ()
36
false
false
1
7
6
23
9
14
null
null
unclechu/xmonadrc
xmonad/src/Main.hs
gpl-3.0
main :: IO () main = do customConfig <- getCustomConfig ipc <- initIPC let conf = myConfig customConfig keys = myKeys ipc myWorkspaces customConfig ezKeys = myEZKeys ipc myWorkspaces customConfig xmproc <- spawnPipe "xmobar ~/.xmonad/xmobar.generated.hs" xmonad $ ewmh $ conf { log...
1,655
main :: IO () main = do customConfig <- getCustomConfig ipc <- initIPC let conf = myConfig customConfig keys = myKeys ipc myWorkspaces customConfig ezKeys = myEZKeys ipc myWorkspaces customConfig xmproc <- spawnPipe "xmobar ~/.xmonad/xmobar.generated.hs" xmonad $ ewmh $ conf { log...
1,655
main = do customConfig <- getCustomConfig ipc <- initIPC let conf = myConfig customConfig keys = myKeys ipc myWorkspaces customConfig ezKeys = myEZKeys ipc myWorkspaces customConfig xmproc <- spawnPipe "xmobar ~/.xmonad/xmobar.generated.hs" xmonad $ ewmh $ conf { logHook = xmobarL...
1,641
false
true
3
14
717
365
182
183
null
null
wavewave/gnuplot
src/Graphics/Gnuplot/ColorSpecification.hs
bsd-3-clause
springGreen = makeColor "spring-green" 0x00ff7f 0 255 127
71
springGreen = makeColor "spring-green" 0x00ff7f 0 255 127
71
springGreen = makeColor "spring-green" 0x00ff7f 0 255 127
71
false
false
0
5
21
17
8
9
null
null
vikraman/ghc
compiler/prelude/TysWiredIn.hs
bsd-3-clause
mkConstraintTupleStr 1 = "Unit%"
33
mkConstraintTupleStr 1 = "Unit%"
33
mkConstraintTupleStr 1 = "Unit%"
33
false
false
0
5
4
9
4
5
null
null
zmthy/incidental-detail
src/Graphics/DetailGen/Monad.hs
mit
mk :: DetailBranch (Free DetailBranch a) -> DetailGen a mk = DetailGen . Free
77
mk :: DetailBranch (Free DetailBranch a) -> DetailGen a mk = DetailGen . Free
77
mk = DetailGen . Free
21
false
true
0
8
13
33
16
17
null
null
bitemyapp/Haskmon
src/Haskmon/Types/Move.hs
mit
movePp :: Move -> Word movePp = I.movePp
40
movePp :: Move -> Word movePp = I.movePp
40
movePp = I.movePp
17
false
true
0
5
7
17
9
8
null
null
iblumenfeld/cryptol
src/Cryptol/Parser/Names.hs
bsd-3-clause
tnamesM (MatchLet b) = tnamesB b
32
tnamesM (MatchLet b) = tnamesB b
32
tnamesM (MatchLet b) = tnamesB b
32
false
false
0
6
5
19
8
11
null
null
purebred-mua/purebred
src/Purebred/Storage/Notmuch.hs
agpl-3.0
hasTag :: (ManageTags a) => Tag -> a -> Bool hasTag t x = t `elem` view tags x
78
hasTag :: (ManageTags a) => Tag -> a -> Bool hasTag t x = t `elem` view tags x
78
hasTag t x = t `elem` view tags x
33
false
true
0
7
18
44
23
21
null
null
trygvis/hledger
hledger-lib/Hledger/Data/Matching.hs
gpl-3.0
matcherStartDate True (MatchEDate True (DateSpan (Just d) _)) = Just d
70
matcherStartDate True (MatchEDate True (DateSpan (Just d) _)) = Just d
70
matcherStartDate True (MatchEDate True (DateSpan (Just d) _)) = Just d
70
false
false
0
10
10
38
17
21
null
null
OpenXT/network
nws/Main.hs
gpl-2.0
getIcavmNetwork :: App String getIcavmNetwork = do appState <- getAppState liftIO $ readMVar (anyNetwork appState)
122
getIcavmNetwork :: App String getIcavmNetwork = do appState <- getAppState liftIO $ readMVar (anyNetwork appState)
122
getIcavmNetwork = do appState <- getAppState liftIO $ readMVar (anyNetwork appState)
92
false
true
0
10
22
37
17
20
null
null
josefs/sbv
SBVTestSuite/SBVHLint.hs
bsd-3-clause
main :: IO () main = do (testEnv, testPercentage) <- getTestEnvironment putStrLn $ "SBVHLint: Test platform: " ++ show testEnv case testEnv of TestEnvLocal -> runHLint TestEnvCI{} -> if testPercentage < 50 then do putStrLn $ "Test percentage below tresheold, ski...
730
main :: IO () main = do (testEnv, testPercentage) <- getTestEnvironment putStrLn $ "SBVHLint: Test platform: " ++ show testEnv case testEnv of TestEnvLocal -> runHLint TestEnvCI{} -> if testPercentage < 50 then do putStrLn $ "Test percentage below tresheold, ski...
730
main = do (testEnv, testPercentage) <- getTestEnvironment putStrLn $ "SBVHLint: Test platform: " ++ show testEnv case testEnv of TestEnvLocal -> runHLint TestEnvCI{} -> if testPercentage < 50 then do putStrLn $ "Test percentage below tresheold, skipping hlint: "...
716
false
true
0
14
297
142
67
75
null
null
DavidAlphaFox/darcs
src/Darcs/Patch/TouchesFiles.hs
gpl-2.0
labelNotTouchingFM :: (PatchInspect p, Patchy p, ApplyState p ~ Tree) => [FilePath] -> PatchChoices p wX wY -> [Label] labelNotTouchingFM files pc = case getChoices pc of fc :> mc :> _ -> labelTouching False (map fix files) (fc +>+ mc)
256
labelNotTouchingFM :: (PatchInspect p, Patchy p, ApplyState p ~ Tree) => [FilePath] -> PatchChoices p wX wY -> [Label] labelNotTouchingFM files pc = case getChoices pc of fc :> mc :> _ -> labelTouching False (map fix files) (fc +>+ mc)
256
labelNotTouchingFM files pc = case getChoices pc of fc :> mc :> _ -> labelTouching False (map fix files) (fc +>+ mc)
120
false
true
0
10
61
106
53
53
null
null
np/lens
tests/properties.hs
bsd-3-clause
prop_simple = isIso (simple :: Iso' Int Int)
69
prop_simple = isIso (simple :: Iso' Int Int)
69
prop_simple = isIso (simple :: Iso' Int Int)
69
false
false
0
7
32
20
10
10
null
null
Heather/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
mapPTermFC f g (PCase fc t cases) = PCase (f fc) (mapPTermFC f g t) (map (\(l,r) -> (mapPTermFC f g l, mapPTermFC f g r)) cases)
140
mapPTermFC f g (PCase fc t cases) = PCase (f fc) (mapPTermFC f g t) (map (\(l,r) -> (mapPTermFC f g l, mapPTermFC f g r)) cases)
140
mapPTermFC f g (PCase fc t cases) = PCase (f fc) (mapPTermFC f g t) (map (\(l,r) -> (mapPTermFC f g l, mapPTermFC f g r)) cases)
140
false
false
0
11
38
88
45
43
null
null
keera-studios/pngload
Codec/Image/PNG/Internal/Parser.hs
bsd-2-clause
word32 :: (Stream LB.ByteString m Word8) => Word32 -> ParsecT LB.ByteString u m Word32 word32 w = (word16 hi >> word16 lo >> return w) <?> "0x" ++ showHex w "" where hi = fromIntegral (w `shiftR` 16) lo = fromIntegral w
226
word32 :: (Stream LB.ByteString m Word8) => Word32 -> ParsecT LB.ByteString u m Word32 word32 w = (word16 hi >> word16 lo >> return w) <?> "0x" ++ showHex w "" where hi = fromIntegral (w `shiftR` 16) lo = fromIntegral w
226
word32 w = (word16 hi >> word16 lo >> return w) <?> "0x" ++ showHex w "" where hi = fromIntegral (w `shiftR` 16) lo = fromIntegral w
139
false
true
2
10
48
111
52
59
null
null
spechub/Hets
Static/GTheory.hs
gpl-2.0
-- | create theory without sentences noSensGTheory :: Logic lid sublogics basic_spec sentence symb_items symb_map_items sign morphism symbol raw_symbol proof_tree => lid -> ExtSign sign symbol -> SigId -> G_theory noSensGTheory lid sig si = G_theory lid Nothing sig si noSens startThId
293
noSensGTheory :: Logic lid sublogics basic_spec sentence symb_items symb_map_items sign morphism symbol raw_symbol proof_tree => lid -> ExtSign sign symbol -> SigId -> G_theory noSensGTheory lid sig si = G_theory lid Nothing sig si noSens startThId
256
noSensGTheory lid sig si = G_theory lid Nothing sig si noSens startThId
71
true
true
0
8
49
76
37
39
null
null
gcampax/ghc
compiler/typecheck/TcSimplify.hs
bsd-3-clause
neededEvVars :: EvBindMap -> VarSet -> VarSet -- Find all the evidence variables that are "needed", -- and then delete all those bound by the evidence bindings -- A variable is "needed" if -- a) it is free in the RHS of a Wanted EvBind (add_wanted) -- b) it is free in the RHS of an EvBind whose LHS is needed (tran...
6,890
neededEvVars :: EvBindMap -> VarSet -> VarSet neededEvVars ev_binds initial_seeds = needed `minusVarSet` bndrs where seeds = foldEvBindMap add_wanted initial_seeds ev_binds needed = transCloVarSet also_needs seeds bndrs = foldEvBindMap add_bndr emptyVarSet ev_binds add_wanted :: EvBind -> VarSet -> Var...
6,503
neededEvVars ev_binds initial_seeds = needed `minusVarSet` bndrs where seeds = foldEvBindMap add_wanted initial_seeds ev_binds needed = transCloVarSet also_needs seeds bndrs = foldEvBindMap add_bndr emptyVarSet ev_binds add_wanted :: EvBind -> VarSet -> VarSet add_wanted (EvBind { eb_is_given = is_g...
6,457
true
true
11
11
1,585
313
151
162
null
null
shayan-najd/Haskell-Desugar-Generic
Language/Haskell/Exts/Desugar/Generic/Others.hs
bsd-3-clause
desugarIAbs = noDesugaring
26
desugarIAbs = noDesugaring
26
desugarIAbs = noDesugaring
26
false
false
0
4
2
6
3
3
null
null
GregorySchwartz/dotfiles
.xmonad/xmonad.hs
gpl-2.0
colors "darkred" = "#cc241d"
32
colors "darkred" = "#cc241d"
32
colors "darkred" = "#cc241d"
32
false
false
0
5
7
9
4
5
null
null
mudphone/HaskellBook
src/Seventeen.hs
mit
append :: List a -> List a -> List a append Nil ys = ys
55
append :: List a -> List a -> List a append Nil ys = ys
55
append Nil ys = ys
18
false
true
0
7
14
38
16
22
null
null
apoikos/pkg-xmobar
src/Plugins/Monitors/Disk.hs
bsd-3-clause
diskData :: IO [(DevName, [Float])] diskData = do s <- B.readFile "/proc/diskstats" let extract ws = (head ws, map read (tail ws)) return $ map (extract . map B.unpack . drop 2 . B.words) (B.lines s)
205
diskData :: IO [(DevName, [Float])] diskData = do s <- B.readFile "/proc/diskstats" let extract ws = (head ws, map read (tail ws)) return $ map (extract . map B.unpack . drop 2 . B.words) (B.lines s)
205
diskData = do s <- B.readFile "/proc/diskstats" let extract ws = (head ws, map read (tail ws)) return $ map (extract . map B.unpack . drop 2 . B.words) (B.lines s)
169
false
true
0
14
41
115
56
59
null
null
paulolieuthier/criterion
Criterion/Internal.hs
bsd-2-clause
runAndAnalyseOne :: Int -> String -> Benchmarkable -> Criterion Report runAndAnalyseOne i desc bm = do meas <- runOne bm Config{..} <- ask _ <- prolix "analysing with %d resamples\n" resamples erp <- runExceptT $ analyseSample i desc meas case erp of Left err -> printError "*** Error: %s\n" err Right ...
2,150
runAndAnalyseOne :: Int -> String -> Benchmarkable -> Criterion Report runAndAnalyseOne i desc bm = do meas <- runOne bm Config{..} <- ask _ <- prolix "analysing with %d resamples\n" resamples erp <- runExceptT $ analyseSample i desc meas case erp of Left err -> printError "*** Error: %s\n" err Right ...
2,150
runAndAnalyseOne i desc bm = do meas <- runOne bm Config{..} <- ask _ <- prolix "analysing with %d resamples\n" resamples erp <- runExceptT $ analyseSample i desc meas case erp of Left err -> printError "*** Error: %s\n" err Right rpt@Report{..} -> do let SampleAnalysis{..} = reportAnalysis ...
2,079
false
true
0
21
695
666
316
350
null
null
asakamirai/kazura-queue
test/Test/Expectations.hs
bsd-3-clause
shouldStillBlock :: AS.Async x -> Int -> IO () shouldStillBlock async time = M.void $ AS.wait async `shouldBlock` time
118
shouldStillBlock :: AS.Async x -> Int -> IO () shouldStillBlock async time = M.void $ AS.wait async `shouldBlock` time
118
shouldStillBlock async time = M.void $ AS.wait async `shouldBlock` time
71
false
true
0
8
18
51
25
26
null
null
emilaxelsson/feldspar-synch
examples/ALSA.hs
bsd-3-clause
-- Note: this constant is hard coded in the C code above newPCM_ :: Run PCM newPCM_ = fmap PCM $ newNamedObject "pcm" "snd_pcm_t" True
135
newPCM_ :: Run PCM newPCM_ = fmap PCM $ newNamedObject "pcm" "snd_pcm_t" True
77
newPCM_ = fmap PCM $ newNamedObject "pcm" "snd_pcm_t" True
58
true
true
0
6
25
29
14
15
null
null
haBuu/tfs-website
Handler/Pages.hs
mit
getPagesR :: Handler Html getPagesR = do ((_, formWidget), formEnctype) <- runFormPost newPageForm pages <- runDB $ selectList [] [] let toplevelPages = filter (topLevelFilter . entityVal) pages let otherPages = filter (otherFilter . entityVal) pages let obsoletePages = filter (obsoleteFilter . entityVal) pag...
392
getPagesR :: Handler Html getPagesR = do ((_, formWidget), formEnctype) <- runFormPost newPageForm pages <- runDB $ selectList [] [] let toplevelPages = filter (topLevelFilter . entityVal) pages let otherPages = filter (otherFilter . entityVal) pages let obsoletePages = filter (obsoleteFilter . entityVal) pag...
392
getPagesR = do ((_, formWidget), formEnctype) <- runFormPost newPageForm pages <- runDB $ selectList [] [] let toplevelPages = filter (topLevelFilter . entityVal) pages let otherPages = filter (otherFilter . entityVal) pages let obsoletePages = filter (obsoleteFilter . entityVal) pages defaultLayout $ do ...
366
false
true
0
12
70
142
67
75
null
null
dan-t/Gamgine
Gamgine/Gfx.hs
bsd-3-clause
floatToFloat :: (RealFloat a, RealFloat b) => a -> b floatToFloat = (uncurry encodeFloat) . decodeFloat
103
floatToFloat :: (RealFloat a, RealFloat b) => a -> b floatToFloat = (uncurry encodeFloat) . decodeFloat
103
floatToFloat = (uncurry encodeFloat) . decodeFloat
50
false
true
0
7
15
40
21
19
null
null
yav/allegro
src/Allegro/Timer.hs
bsd-3-clause
setTimerCount :: Timer -> Int64 -> IO () setTimerCount t x = withTimer t $ \p -> al_set_timer_count p x
103
setTimerCount :: Timer -> Int64 -> IO () setTimerCount t x = withTimer t $ \p -> al_set_timer_count p x
103
setTimerCount t x = withTimer t $ \p -> al_set_timer_count p x
62
false
true
0
9
19
50
23
27
null
null
nickbart1980/pandoc
src/Text/Pandoc/Writers/Custom.hs
gpl-2.0
inlineToCustom lua (Strong lst) = callfunc lua "Strong" lst
59
inlineToCustom lua (Strong lst) = callfunc lua "Strong" lst
59
inlineToCustom lua (Strong lst) = callfunc lua "Strong" lst
59
false
false
0
6
8
28
11
17
null
null
kindohm/Tidal
Sound/Tidal/Pattern.hs
gpl-3.0
every n f p = when ((== 0) . (`mod` n)) f p
43
every n f p = when ((== 0) . (`mod` n)) f p
43
every n f p = when ((== 0) . (`mod` n)) f p
43
false
false
0
8
12
37
21
16
null
null
snoyberg/ghc
compiler/codeGen/StgCmmForeign.hs
bsd-3-clause
sp, spLim, hp, hpLim, currentTSO, currentNursery, hpAlloc :: CmmReg sp = CmmGlobal Sp
100
sp, spLim, hp, hpLim, currentTSO, currentNursery, hpAlloc :: CmmReg sp = CmmGlobal Sp
100
sp = CmmGlobal Sp
32
false
true
2
5
27
30
19
11
null
null
amtal/soyuz
DCPU16/Assembly/Parser.hs
mit
labelChars = alphaNum <|> char '_' <|> char '.'
47
labelChars = alphaNum <|> char '_' <|> char '.'
47
labelChars = alphaNum <|> char '_' <|> char '.'
47
false
false
7
5
8
29
13
16
null
null
GaloisInc/ghc-srcspan-plugin
src/GHC/Plugins/SrcSpan.hs
bsd-3-clause
tickSpan hpc _ (HpcTick _ i) = IntMap.findWithDefault noSrcSpan i hpc
74
tickSpan hpc _ (HpcTick _ i) = IntMap.findWithDefault noSrcSpan i hpc
74
tickSpan hpc _ (HpcTick _ i) = IntMap.findWithDefault noSrcSpan i hpc
74
false
false
1
6
15
33
14
19
null
null
keithodulaigh/Hets
CASL_DL/PredefinedCASLAxioms.hs
gpl-2.0
dataPred :: PredType dataPred = PredType [dataS, dataS]
55
dataPred :: PredType dataPred = PredType [dataS, dataS]
55
dataPred = PredType [dataS, dataS]
34
false
true
0
6
7
20
11
9
null
null
mightymoose/liquidhaskell
src/Language/Haskell/Liquid/Errors.hs
bsd-3-clause
ppError' _ dSp (ErrRClass pos cls insts) = dSp <+> text "Refined classes cannot have refined instances" $+$ (nest 4 $ sepVcat blankLine $ describeCls : map describeInst insts) where describeCls = text "Refined class definition for:" <+> cls $+$ text "Defined at:" <+> pprint pos describeIns...
419
ppError' _ dSp (ErrRClass pos cls insts) = dSp <+> text "Refined classes cannot have refined instances" $+$ (nest 4 $ sepVcat blankLine $ describeCls : map describeInst insts) where describeCls = text "Refined class definition for:" <+> cls $+$ text "Defined at:" <+> pprint pos describeIns...
419
ppError' _ dSp (ErrRClass pos cls insts) = dSp <+> text "Refined classes cannot have refined instances" $+$ (nest 4 $ sepVcat blankLine $ describeCls : map describeInst insts) where describeCls = text "Refined class definition for:" <+> cls $+$ text "Defined at:" <+> pprint pos describeIns...
419
false
false
10
9
106
135
58
77
null
null
kadircet/CENG
242/HW2.hs
gpl-3.0
getpath _ [] = Nothing
22
getpath _ [] = Nothing
22
getpath _ [] = Nothing
22
false
false
0
6
4
13
6
7
null
null
alexander-at-github/eta
compiler/ETA/Prelude/PrimOp.hs
bsd-3-clause
tagOf_PrimOp ReadByteArrayOp_Int = _ILIT(199)
45
tagOf_PrimOp ReadByteArrayOp_Int = _ILIT(199)
45
tagOf_PrimOp ReadByteArrayOp_Int = _ILIT(199)
45
false
false
0
6
3
15
7
8
null
null
johnpmayer/data-annotated
src/Data/Annotated/LengthIndexedVectors.hs
bsd-3-clause
replace _ _ Nil = forbidden
42
replace _ _ Nil = forbidden
42
replace _ _ Nil = forbidden
42
false
false
0
5
20
13
6
7
null
null
alphalambda/codeworld
codeworld-compiler/src/CodeWorld/Compile/Stages.hs
apache-2.0
isLikelyNumberExp _ = False
27
isLikelyNumberExp _ = False
27
isLikelyNumberExp _ = False
27
false
false
0
5
3
9
4
5
null
null
MikePors/FizzBuzzWarz
test/GameIOTest.hs
bsd-3-clause
printBoardTests :: IO() printBoardTests = hspec $ describe "createPrintableBoard" $ do it "returns a string representation of the game board" $ createPrintableBoard 3 show [0..2] `shouldBe` ["[0,1,2]"] it "returns blank when the board is empty" $ createPrintableBoard 3 show ([]::[...
679
printBoardTests :: IO() printBoardTests = hspec $ describe "createPrintableBoard" $ do it "returns a string representation of the game board" $ createPrintableBoard 3 show [0..2] `shouldBe` ["[0,1,2]"] it "returns blank when the board is empty" $ createPrintableBoard 3 show ([]::[...
679
printBoardTests = hspec $ describe "createPrintableBoard" $ do it "returns a string representation of the game board" $ createPrintableBoard 3 show [0..2] `shouldBe` ["[0,1,2]"] it "returns blank when the board is empty" $ createPrintableBoard 3 show ([]::[Int]) `shouldBe` [] ...
655
false
true
0
14
153
180
94
86
null
null
JacquesCarette/literate-scientific-software
code/drasil-data/Data/Drasil/SI_Units.hs
bsd-2-clause
kilogram = fund "kilogram" "mass" "kg"
54
kilogram = fund "kilogram" "mass" "kg"
54
kilogram = fund "kilogram" "mass" "kg"
54
false
false
1
5
21
17
6
11
null
null
fehu/h-agents
test/Agent/PingPong/Simple/Send.hs
mit
-------------------------------------------------------------------------------- -- | First sends 'Ping' message to _pong_ agent. -- Then sends 'Ping' to _pong_ only in response to 'Pong' message. -- Total number of 'Ping' messages sent is _nPings_. pingDescriptor nPings pongRef = GenericAgentDescriptor{ agName ...
1,044
pingDescriptor nPings pongRef = GenericAgentDescriptor{ agName = "Ping" , agDebug = _debug , initialState = do nPingsRef <- newIORef nPings firstTime <- newIORef True return (nPingsRef, pongRef, firstTime) , messageHandling = MessageHandling{ msgHandle ...
793
pingDescriptor nPings pongRef = GenericAgentDescriptor{ agName = "Ping" , agDebug = _debug , initialState = do nPingsRef <- newIORef nPings firstTime <- newIORef True return (nPingsRef, pongRef, firstTime) , messageHandling = MessageHandling{ msgHandle ...
793
true
false
0
14
348
201
106
95
null
null
lambdatree/hWifi
Network/StandardPolicy.hs
gpl-2.0
createNewWifiConnectionAndConnect :: Command -> SSID -> Psk -> IO () createNewWifiConnectionAndConnect cmd ssid psk = do (_, msg0) <- createWifiWithLogs cmd ssid psk output msg0 -- | Returns available network wifis. It discards any logged message.
252
createNewWifiConnectionAndConnect :: Command -> SSID -> Psk -> IO () createNewWifiConnectionAndConnect cmd ssid psk = do (_, msg0) <- createWifiWithLogs cmd ssid psk output msg0 -- | Returns available network wifis. It discards any logged message.
252
createNewWifiConnectionAndConnect cmd ssid psk = do (_, msg0) <- createWifiWithLogs cmd ssid psk output msg0 -- | Returns available network wifis. It discards any logged message.
183
false
true
0
9
40
62
30
32
null
null
michalkonecny/aern
aern-poly-plot-gtk/demos/Quickstart.hs
bsd-3-clause
{----- basic arithmetic -----} example10 :: PI example10 = x <+> c1
68
example10 :: PI example10 = x <+> c1
36
example10 = x <+> c1
20
true
true
0
5
12
16
9
7
null
null
Noeda/caramia-extras
lib/Caramia/Extras/LoadImage.hs
mit
-- | Same as `loadImageFromMemory` but reads the image from the filesystem. -- -- May throw an `IOError` for failed file operations. loadImage :: FilePath -> HowToLoad -> IO Texture loadImage fpath howto = do bs <- B.readFile fpath loadImageFromMemory bs howto -- | Same as `loadImage` but always returns a new ...
336
loadImage :: FilePath -> HowToLoad -> IO Texture loadImage fpath howto = do bs <- B.readFile fpath loadImageFromMemory bs howto -- | Same as `loadImage` but always returns a new `Tex2D` texture.
203
loadImage fpath howto = do bs <- B.readFile fpath loadImageFromMemory bs howto -- | Same as `loadImage` but always returns a new `Tex2D` texture.
154
true
true
0
9
62
51
25
26
null
null
brendanhay/gogol
gogol-shopping-content/gen/Network/Google/ShoppingContent/Types/Product.hs
mpl-2.0
-- | The ID of the data feed to get. dDatafeedId :: Lens' DatafeedstatusesCustomBatchRequestEntry (Maybe Word64) dDatafeedId = lens _dDatafeedId (\ s a -> s{_dDatafeedId = a}) . mapping _Coerce
201
dDatafeedId :: Lens' DatafeedstatusesCustomBatchRequestEntry (Maybe Word64) dDatafeedId = lens _dDatafeedId (\ s a -> s{_dDatafeedId = a}) . mapping _Coerce
164
dDatafeedId = lens _dDatafeedId (\ s a -> s{_dDatafeedId = a}) . mapping _Coerce
88
true
true
0
10
37
55
28
27
null
null
keithodulaigh/Hets
Taxonomy/MMiSSOntology.hs
gpl-2.0
{- | inserts a new Relation into the Ontology. It throws an error if the relation name already exists. -} insertBaseRelation :: MMiSSOntology -> RelName -> DefaultText -> Maybe SuperRel -> Maybe Cardinality -> WithError MMiSSOntology insertBaseRelation onto relName defText superR...
1,388
insertBaseRelation :: MMiSSOntology -> RelName -> DefaultText -> Maybe SuperRel -> Maybe Cardinality -> WithError MMiSSOntology insertBaseRelation onto relName defText superRel card = case Map.lookup relName (relations onto) of Nothing -> myInsertRel relName defText superRel ...
1,280
insertBaseRelation onto relName defText superRel card = case Map.lookup relName (relations onto) of Nothing -> myInsertRel relName defText superRel card Just (RelationDecl _ _ _ _ _ auto) -> case mode onto of AutoInsert -> if auto then myInsertRel relName defText superRel c...
1,114
true
true
1
22
541
344
167
177
null
null
harrisi/on-being-better
list-expansion/Haskell/course/src/Course/JsonParser.hs
cc0-1.0
fromSpecialCharacter Tab = '\t'
33
fromSpecialCharacter Tab = '\t'
33
fromSpecialCharacter Tab = '\t'
33
false
false
1
5
5
13
4
9
null
null
flocc-net/flocc
v0.1/Compiler/Tests/Casts/Run.hs
apache-2.0
-- Tries to fix a program with broken constraints -- by inserting type casts/redistribution function -- applications main2 :: IdxMonad IO () main2 = do -- get dir from command line args args <- lift $ getArgs let subDir = (if (length args < 1) then "" else head args) -- init dir lift $ putStrE $ "Automati...
1,288
main2 :: IdxMonad IO () main2 = do -- get dir from command line args args <- lift $ getArgs let subDir = (if (length args < 1) then "" else head args) -- init dir lift $ putStrE $ "Automatic cast insertion test " ++ subDir ++ "\n" let relDir = "/Compiler/Tests/Casts/" ++ subDir curDir <- lift $ getCurr...
1,170
main2 = do -- get dir from command line args args <- lift $ getArgs let subDir = (if (length args < 1) then "" else head args) -- init dir lift $ putStrE $ "Automatic cast insertion test " ++ subDir ++ "\n" let relDir = "/Compiler/Tests/Casts/" ++ subDir curDir <- lift $ getCurrentDirectory let dir =...
1,146
true
true
25
12
278
360
184
176
null
null