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
cmc-haskell-2016/checkers
src/WorldProcessing.hs
bsd-3-clause
leftDown :: CheckerboardPos -> CheckerboardPos leftDown x | (x == 5) || (x == 13) || (x == 21) = 0 | (x == 29) || (x == 30) || (x == 31) || (x == 32) = 0 | (mod x 8) < 5 && (mod x 8) > 0 = x+4 | otherwise = x+3
246
leftDown :: CheckerboardPos -> CheckerboardPos leftDown x | (x == 5) || (x == 13) || (x == 21) = 0 | (x == 29) || (x == 30) || (x == 31) || (x == 32) = 0 | (mod x 8) < 5 && (mod x 8) > 0 = x+4 | otherwise = x+3
246
leftDown x | (x == 5) || (x == 13) || (x == 21) = 0 | (x == 29) || (x == 30) || (x == 31) || (x == 32) = 0 | (mod x 8) < 5 && (mod x 8) > 0 = x+4 | otherwise = x+3
199
false
true
0
12
92
156
79
77
null
null
brendanhay/gogol
gogol-compute/gen/Network/Google/Resource/Compute/Disks/List.hs
mpl-2.0
-- | The maximum number of results per page that should be returned. If the -- number of available results is larger than \`maxResults\`, Compute -- Engine returns a \`nextPageToken\` that can be used to get the next page -- of results in subsequent list requests. Acceptable values are \`0\` to -- \`500\`, inclusive. (...
460
dlMaxResults :: Lens' DisksList Word32 dlMaxResults = lens _dlMaxResults (\ s a -> s{_dlMaxResults = a}) . _Coerce
122
dlMaxResults = lens _dlMaxResults (\ s a -> s{_dlMaxResults = a}) . _Coerce
83
true
true
2
9
81
54
28
26
null
null
ihc/futhark
src/Futhark/Pass/ExtractKernels.hs
isc
transformStm bnd = runBinder_ $ FOT.transformStmRecursively bnd
65
transformStm bnd = runBinder_ $ FOT.transformStmRecursively bnd
65
transformStm bnd = runBinder_ $ FOT.transformStmRecursively bnd
65
false
false
3
6
8
22
8
14
null
null
aretoky/egison2
hs-src/Language/Egison/Types.hs
mit
showExpr (BoolExpr True) = "#t-expr"
36
showExpr (BoolExpr True) = "#t-expr"
36
showExpr (BoolExpr True) = "#t-expr"
36
false
false
0
6
4
16
7
9
null
null
steshaw/huttons-razor
src/Main.hs
isc
evalExpr :: String -> Either ParseError Integer evalExpr = runParser expr () "<input>"
86
evalExpr :: String -> Either ParseError Integer evalExpr = runParser expr () "<input>"
86
evalExpr = runParser expr () "<input>"
38
false
true
0
6
12
29
14
15
null
null
wuzzeb/hs-webdriver
src/Test/WebDriver/Commands.hs
bsd-3-clause
-- |Refresh the current page refresh :: WebDriver wd => wd () refresh = noReturn $ doSessCommand methodPost "/refresh" Null
123
refresh :: WebDriver wd => wd () refresh = noReturn $ doSessCommand methodPost "/refresh" Null
94
refresh = noReturn $ doSessCommand methodPost "/refresh" Null
61
true
true
0
7
19
35
17
18
null
null
ardfard/bleague
server/BLeague/Models/Fixture.hs
bsd-3-clause
update :: Fixture -> App () update fixture_ = C.docsSave table (id fixture_) fixture_
85
update :: Fixture -> App () update fixture_ = C.docsSave table (id fixture_) fixture_
85
update fixture_ = C.docsSave table (id fixture_) fixture_
57
false
true
0
8
13
42
19
23
null
null
Daniel-Diaz/rachel
Rachel/TH.hs
bsd-3-clause
genEntList :: Q [Dec] genEntList = do t <- runIO $ readFile "Rachel/Primitive.hs" let m = defaultParseMode { extensions = [ EnableExtension TemplateHaskell , EnableExtension MultiParamTypeClasses ] } case parseModuleWithMode m t of ParseFailed _ _ -> fail "Couldn't parse ...
609
genEntList :: Q [Dec] genEntList = do t <- runIO $ readFile "Rachel/Primitive.hs" let m = defaultParseMode { extensions = [ EnableExtension TemplateHaskell , EnableExtension MultiParamTypeClasses ] } case parseModuleWithMode m t of ParseFailed _ _ -> fail "Couldn't parse ...
609
genEntList = do t <- runIO $ readFile "Rachel/Primitive.hs" let m = defaultParseMode { extensions = [ EnableExtension TemplateHaskell , EnableExtension MultiParamTypeClasses ] } case parseModuleWithMode m t of ParseFailed _ _ -> fail "Couldn't parse module of primitives."...
587
false
true
0
18
203
204
98
106
null
null
green-haskell/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
stringTyConName = tcQual gHC_BASE (fsLit "String") stringTyConKey
74
stringTyConName = tcQual gHC_BASE (fsLit "String") stringTyConKey
74
stringTyConName = tcQual gHC_BASE (fsLit "String") stringTyConKey
74
false
false
0
7
15
19
9
10
null
null
ghcjs/jsaddle-dom
src/JSDOM/Generated/Window.hs
mit
-- | <https://developer.mozilla.org/en-US/docs/Web/API/Window.customElements Mozilla Window.customElements documentation> getCustomElements :: (MonadDOM m) => Window -> m CustomElementRegistry getCustomElements self = liftDOM ((self ^. js "customElements") >>= fromJSValUnchecked)
301
getCustomElements :: (MonadDOM m) => Window -> m CustomElementRegistry getCustomElements self = liftDOM ((self ^. js "customElements") >>= fromJSValUnchecked)
178
getCustomElements self = liftDOM ((self ^. js "customElements") >>= fromJSValUnchecked)
89
true
true
0
10
45
51
26
25
null
null
lynchronan/haskoin-crypto
src/Haskoin/Crypto/Point.hs
unlicense
addPoint point InfPoint = point
31
addPoint point InfPoint = point
31
addPoint point InfPoint = point
31
false
false
1
5
4
16
5
11
null
null
gnn/Hets
OWL2/ManchesterPrint.hs
gpl-2.0
printOntologyDocument :: OntologyDocument -> Doc printOntologyDocument OntologyDocument {prefixDeclaration = a, ontology = b} = printPrefixes a $++$ pretty b
161
printOntologyDocument :: OntologyDocument -> Doc printOntologyDocument OntologyDocument {prefixDeclaration = a, ontology = b} = printPrefixes a $++$ pretty b
161
printOntologyDocument OntologyDocument {prefixDeclaration = a, ontology = b} = printPrefixes a $++$ pretty b
112
false
true
2
7
22
48
23
25
null
null
keithodulaigh/Hets
QVTR/Parser.hs
gpl-2.0
pBetParent :: CharParser st a -> CharParser st a pBetParent = between (char '(') (char ')')
91
pBetParent :: CharParser st a -> CharParser st a pBetParent = between (char '(') (char ')')
91
pBetParent = between (char '(') (char ')')
42
false
true
0
7
15
42
20
22
null
null
urbanslug/ghc
compiler/simplStg/UnariseStg.hs
bsd-3-clause
unariseSRT rho (SRTEntries ids) = SRTEntries (concatMapVarSet (unariseId rho) ids)
82
unariseSRT rho (SRTEntries ids) = SRTEntries (concatMapVarSet (unariseId rho) ids)
82
unariseSRT rho (SRTEntries ids) = SRTEntries (concatMapVarSet (unariseId rho) ids)
82
false
false
0
9
9
34
16
18
null
null
wdanilo/container
src/Data/Container/Instances/Vector/Boxed/Immutable.hs
apache-2.0
checkBoundsM2 p idx v = checkBounds2 idx v (const . failT2 p) return
68
checkBoundsM2 p idx v = checkBounds2 idx v (const . failT2 p) return
68
checkBoundsM2 p idx v = checkBounds2 idx v (const . failT2 p) return
68
false
false
0
8
12
32
15
17
null
null
nh2/WashNGo
WASH/HTML/HTMLMonad.hs
bsd-3-clause
caption = mkElement "caption"
33
caption = mkElement "caption"
33
caption = mkElement "caption"
33
false
false
0
5
7
9
4
5
null
null
jwiegley/ghc-release
libraries/Cabal/cabal/Distribution/Simple/Command.hs
gpl-3.0
-- | Create an option taking a single OptDescr. -- No explicit Name is given for the Option, the name is the first LFlag given. option :: SFlags -> LFlags -> Description -> get -> set -> MkOptDescr get set a -> OptionField a option sf lf@(n:_) d get set arg = OptionField n [arg sf lf d get set]
307
option :: SFlags -> LFlags -> Description -> get -> set -> MkOptDescr get set a -> OptionField a option sf lf@(n:_) d get set arg = OptionField n [arg sf lf d get set]
177
option sf lf@(n:_) d get set arg = OptionField n [arg sf lf d get set]
70
true
true
0
11
71
89
45
44
null
null
brendanhay/gogol
gogol-spanner/gen/Network/Google/Spanner/Types/Product.hs
mpl-2.0
-- | Query plan and execution statistics for the SQL statement that produced -- this result set. These can be requested by setting -- ExecuteSqlRequest.query_mode. DML statements always produce stats -- containing the number of rows modified, unless executed using the -- ExecuteSqlRequest.QueryMode.PLAN ExecuteSqlReque...
526
rsStats :: Lens' ResultSet (Maybe ResultSetStats) rsStats = lens _rsStats (\ s a -> s{_rsStats = a})
100
rsStats = lens _rsStats (\ s a -> s{_rsStats = a})
50
true
true
1
9
74
58
31
27
null
null
beni55/hspec
hspec-core/src/Test/Hspec/Options.hs
mit
formatters :: [(String, Formatter)] formatters = [ ("specdoc", specdoc) , ("progress", progress) , ("failed-examples", failed_examples) , ("silent", silent) ]
170
formatters :: [(String, Formatter)] formatters = [ ("specdoc", specdoc) , ("progress", progress) , ("failed-examples", failed_examples) , ("silent", silent) ]
170
formatters = [ ("specdoc", specdoc) , ("progress", progress) , ("failed-examples", failed_examples) , ("silent", silent) ]
134
false
true
0
8
30
63
37
26
null
null
ajscholl/primitive-simd
bench/Bench.hs
bsd-3-clause
distanceDiff4Helper :: (VG.Vector v a, Num a) => (a -> r) -> v a -> v a -> r distanceDiff4Helper f v1 v2 = f $ go 0 (VG.length v1-1) where go acc (-1) = acc go acc i = go acc' (i-4) where acc' = acc+diff1*diff1 +diff2*diff2 ...
578
distanceDiff4Helper :: (VG.Vector v a, Num a) => (a -> r) -> v a -> v a -> r distanceDiff4Helper f v1 v2 = f $ go 0 (VG.length v1-1) where go acc (-1) = acc go acc i = go acc' (i-4) where acc' = acc+diff1*diff1 +diff2*diff2 ...
578
distanceDiff4Helper f v1 v2 = f $ go 0 (VG.length v1-1) where go acc (-1) = acc go acc i = go acc' (i-4) where acc' = acc+diff1*diff1 +diff2*diff2 +diff3*diff3 +diff4*diff4 diff1...
501
false
true
1
14
281
235
121
114
null
null
cartazio/haver-raft
src/Network/Consensus/Verified/Raft.hs
bsd-2-clause
handleInput :: forall stateMachineData output input proxy k m . (Reifies k (Set Name), Monad m) => proxy k -> Name -> RaftInput input -> RaftData stateMachineData input output -> m (Res (RaftOutput output) (RaftD...
546
handleInput :: forall stateMachineData output input proxy k m . (Reifies k (Set Name), Monad m) => proxy k -> Name -> RaftInput input -> RaftData stateMachineData input output -> m (Res (RaftOutput output) (RaftD...
546
handleInput pk me inp state = case inp of ClientRequest client id' c -> handleClientRequest me state client id' c Timeout -> handleTimeout pk me state
160
false
true
0
16
201
162
80
82
null
null
noteed/mojito
Language/Mojito/Inference/SystemCT1999/SystemCT1999Html.hs
bsd-3-clause
htmlConstrained :: Constrained -> Html htmlConstrained = stringToHtml . showConstrained
87
htmlConstrained :: Constrained -> Html htmlConstrained = stringToHtml . showConstrained
87
htmlConstrained = stringToHtml . showConstrained
48
false
true
0
5
9
19
10
9
null
null
uduki/hsQt
Qtc/ClassTypes/Gui.hs
bsd-2-clause
qCastList_QUndoGroup x = qcl_QUndoGroup [] x
44
qCastList_QUndoGroup x = qcl_QUndoGroup [] x
44
qCastList_QUndoGroup x = qcl_QUndoGroup [] x
44
false
false
0
6
5
16
7
9
null
null
ml9951/ghc
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
topSpliceStage = Splice False
29
topSpliceStage = Splice False
29
topSpliceStage = Splice False
29
false
false
0
5
3
9
4
5
null
null
kazu-yamamoto/network-uri
tests/uri001.hs
bsd-3-clause
testURIRef058 = testURIRef RelRf "/../g"
40
testURIRef058 = testURIRef RelRf "/../g"
40
testURIRef058 = testURIRef RelRf "/../g"
40
false
false
0
5
4
11
5
6
null
null
deech/stack
src/Stack/Ghci.hs
bsd-3-clause
renderScriptIntero :: [GhciPkgInfo] -> Maybe (Path Abs File) -> GhciScript renderScriptIntero pkgs mainFile = let addPhase = mconcat $ fmap renderPkg pkgs mainPhase = case mainFile of Just path -> case findOwningPackageForMain pkgs path of ...
954
renderScriptIntero :: [GhciPkgInfo] -> Maybe (Path Abs File) -> GhciScript renderScriptIntero pkgs mainFile = let addPhase = mconcat $ fmap renderPkg pkgs mainPhase = case mainFile of Just path -> case findOwningPackageForMain pkgs path of ...
954
renderScriptIntero pkgs mainFile = let addPhase = mconcat $ fmap renderPkg pkgs mainPhase = case mainFile of Just path -> case findOwningPackageForMain pkgs path of Just mainPkg -> cmdCdGhc (ghciPkgDir mainPkg) <> cmdAddFile path ...
879
false
true
1
18
308
228
108
120
null
null
k0001/gtk2hs
tools/c2hs/gen/GenBind.hs
gpl-3.0
applyUnary cpos CPlusOp arg = return arg
55
applyUnary cpos CPlusOp arg = return arg
55
applyUnary cpos CPlusOp arg = return arg
55
false
false
0
5
21
16
7
9
null
null
michaelgwelch/bacnet
src/BACnet/Reader.hs
mit
readOpen :: TagNumber -> Reader () readOpen = void . readOpenTag
64
readOpen :: TagNumber -> Reader () readOpen = void . readOpenTag
64
readOpen = void . readOpenTag
29
false
true
1
8
10
31
13
18
null
null
arybczak/happstack-server
attic/Examples/MultimasterTest1.hs
bsd-3-clause
rootState :: Proxy MyState rootState = Proxy
44
rootState :: Proxy MyState rootState = Proxy
44
rootState = Proxy
17
false
true
1
5
6
18
7
11
null
null
ezyang/hoopl
src/Compiler/Hoopl/MkGraph.hs
bsd-3-clause
-- | Take a graph and make it abstract. aGraphOfGraph :: Graph n e x -> AGraph n e x aGraphOfGraph g = A (return g)
115
aGraphOfGraph :: Graph n e x -> AGraph n e x aGraphOfGraph g = A (return g)
75
aGraphOfGraph g = A (return g)
30
true
true
0
7
25
46
21
25
null
null
jahaynes/waveletto
src/Data/Wavelet/Matrix.hs
lgpl-3.0
rnk1Fast :: WaveletMatrix -> Int -> Int rnk1Fast wm i | i > (G.getInputLength . getGeometry $ wm) = error "Sanity check failed (i > w64sPerLayer)" | otherwise = let (RankBlocks _ rbvec) = getRankBlocks wm (fullBlocks,remainBits) = i `quotRem` (64 * R.blockSize) bl...
1,050
rnk1Fast :: WaveletMatrix -> Int -> Int rnk1Fast wm i | i > (G.getInputLength . getGeometry $ wm) = error "Sanity check failed (i > w64sPerLayer)" | otherwise = let (RankBlocks _ rbvec) = getRankBlocks wm (fullBlocks,remainBits) = i `quotRem` (64 * R.blockSize) bl...
1,050
rnk1Fast wm i | i > (G.getInputLength . getGeometry $ wm) = error "Sanity check failed (i > w64sPerLayer)" | otherwise = let (RankBlocks _ rbvec) = getRankBlocks wm (fullBlocks,remainBits) = i `quotRem` (64 * R.blockSize) blockLookup = fullBlocks - 1 p...
1,010
false
true
0
17
425
332
168
164
null
null
frantisekfarka/ghc-dsi
compiler/codeGen/StgCmmMonad.hs
bsd-3-clause
mkCmmIfThenElse :: CmmExpr -> CmmAGraph -> CmmAGraph -> FCode CmmAGraph mkCmmIfThenElse e tbranch fbranch = do endif <- newLabelC tid <- newLabelC fid <- newLabelC return $ mkCbranch e tid fid <*> mkLabel tid <*> tbranch <*> mkBranch endif <*> mkLabel fid <*> fbranch <*> mkLabel endi...
321
mkCmmIfThenElse :: CmmExpr -> CmmAGraph -> CmmAGraph -> FCode CmmAGraph mkCmmIfThenElse e tbranch fbranch = do endif <- newLabelC tid <- newLabelC fid <- newLabelC return $ mkCbranch e tid fid <*> mkLabel tid <*> tbranch <*> mkBranch endif <*> mkLabel fid <*> fbranch <*> mkLabel endi...
321
mkCmmIfThenElse e tbranch fbranch = do endif <- newLabelC tid <- newLabelC fid <- newLabelC return $ mkCbranch e tid fid <*> mkLabel tid <*> tbranch <*> mkBranch endif <*> mkLabel fid <*> fbranch <*> mkLabel endif
249
false
true
0
14
82
104
47
57
null
null
zeyuanxy/haskell-playground
write-yourself-a-scheme/chap5/main.hs
mit
parseDottedList :: Parser LispVal parseDottedList = do head <- endBy parseExpr spaces tail <- char '.' >> spaces >> parseExpr return $ DottedList head tail
167
parseDottedList :: Parser LispVal parseDottedList = do head <- endBy parseExpr spaces tail <- char '.' >> spaces >> parseExpr return $ DottedList head tail
167
parseDottedList = do head <- endBy parseExpr spaces tail <- char '.' >> spaces >> parseExpr return $ DottedList head tail
133
false
true
0
11
36
62
26
36
null
null
jasonzoladz/persistent
persistent-postgresql/Database/Persist/Postgresql.hs
mit
open' :: (PG.Connection -> IO ()) -> ConnectionString -> LogFunc -> IO SqlBackend open' modConn cstr logFunc = do conn <- PG.connectPostgreSQL cstr modConn conn openSimpleConn logFunc conn -- | Generate a 'Connection' from a 'PG.Connection'
260
open' :: (PG.Connection -> IO ()) -> ConnectionString -> LogFunc -> IO SqlBackend open' modConn cstr logFunc = do conn <- PG.connectPostgreSQL cstr modConn conn openSimpleConn logFunc conn -- | Generate a 'Connection' from a 'PG.Connection'
260
open' modConn cstr logFunc = do conn <- PG.connectPostgreSQL cstr modConn conn openSimpleConn logFunc conn -- | Generate a 'Connection' from a 'PG.Connection'
172
false
true
0
10
55
79
35
44
null
null
haskellbr/missingh
missingh-all/src/Data/Compression/Inflate.hs
mit
make_tree :: Word32 -> [(Length, Code)] -> (Tree, [(Length, Code)]) make_tree _ [] = (Null, [])
95
make_tree :: Word32 -> [(Length, Code)] -> (Tree, [(Length, Code)]) make_tree _ [] = (Null, [])
95
make_tree _ [] = (Null, [])
27
false
true
0
11
15
64
35
29
null
null
dstarcev/stepic-haskell
src/Module4/Task5.hs
bsd-3-clause
doSomeWork :: SomeData -> (Result, Int) doSomeWork ValidData = (Success, 0)
76
doSomeWork :: SomeData -> (Result, Int) doSomeWork ValidData = (Success, 0)
75
doSomeWork ValidData = (Success, 0)
35
false
true
0
6
11
34
18
16
null
null
unisonweb/platform
parser-typechecker/src/Unison/Codebase/Path.hs
mit
absoluteEmpty :: Absolute absoluteEmpty = Absolute empty
56
absoluteEmpty :: Absolute absoluteEmpty = Absolute empty
56
absoluteEmpty = Absolute empty
30
false
true
0
5
6
14
7
7
null
null
romanofski/codesnippets
haskellCIS194/homework6/HW06.hs
unlicense
-- | Exercise 2 - returns either an error or a Value -- >>> parseData (B.pack "") -- Left "not enough input" -- >>> parseData (B.pack "{\"credit\":\"Y\"}") -- Right (Object (fromList [("credit",Bool True)])) parseData :: B.ByteString -> Either String Value parseData xs = fmap ynToBool $ eitherDecode xs
303
parseData :: B.ByteString -> Either String Value parseData xs = fmap ynToBool $ eitherDecode xs
95
parseData xs = fmap ynToBool $ eitherDecode xs
46
true
true
2
7
47
45
22
23
null
null
brendanhay/gogol
gogol-qpxexpress/gen/Network/Google/QPXExpress/Types/Product.hs
mpl-2.0
-- | An identifier that uniquely identifies this leg in the solution. liId :: Lens' LegInfo (Maybe Text) liId = lens _liId (\ s a -> s{_liId = a})
146
liId :: Lens' LegInfo (Maybe Text) liId = lens _liId (\ s a -> s{_liId = a})
76
liId = lens _liId (\ s a -> s{_liId = a})
41
true
true
0
9
28
46
25
21
null
null
brendanhay/gogol
gogol-apps-calendar/gen/Network/Google/AppsCalendar/Types/Product.hs
mpl-2.0
-- | The conference solution type. If a client encounters an unfamiliar or -- empty type, it should still be able to display the entry points. -- However, it should disallow modifications. The possible values are: - -- \"eventHangout\" for Hangouts for consumers -- (http:\/\/hangouts.google.com) - \"eventNamedHangout\"...
625
cskType :: Lens' ConferenceSolutionKey (Maybe Text) cskType = lens _cskType (\ s a -> s{_cskType = a})
102
cskType = lens _cskType (\ s a -> s{_cskType = a})
50
true
true
1
9
87
58
32
26
null
null
thomie/cabal
cabal-install/Distribution/Client/Setup.hs
bsd-3-clause
configureExOptions :: ShowOrParseArgs -> ConstraintSource -> [OptionField ConfigExFlags] configureExOptions _showOrParseArgs src = [ option [] ["cabal-lib-version"] ("Select which version of the Cabal lib to use to build packages " ++ "(useful for testing).") co...
1,293
configureExOptions :: ShowOrParseArgs -> ConstraintSource -> [OptionField ConfigExFlags] configureExOptions _showOrParseArgs src = [ option [] ["cabal-lib-version"] ("Select which version of the Cabal lib to use to build packages " ++ "(useful for testing).") co...
1,293
configureExOptions _showOrParseArgs src = [ option [] ["cabal-lib-version"] ("Select which version of the Cabal lib to use to build packages " ++ "(useful for testing).") configCabalVersion (\v flags -> flags { configCabalVersion = v }) (reqArg "VERSION" (readP_to_E ("Cannot parse cabal lib ve...
1,166
false
true
0
15
397
319
176
143
null
null
tjakway/ghcjvm
compiler/llvmGen/Llvm/PpLlvm.hs
bsd-3-clause
ppAlloca :: LlvmType -> Int -> SDoc ppAlloca tp amount = let amount' = LMLitVar $ LMIntLit (toInteger amount) i32 in text "alloca" <+> ppr tp <> comma <+> ppr amount'
170
ppAlloca :: LlvmType -> Int -> SDoc ppAlloca tp amount = let amount' = LMLitVar $ LMIntLit (toInteger amount) i32 in text "alloca" <+> ppr tp <> comma <+> ppr amount'
170
ppAlloca tp amount = let amount' = LMLitVar $ LMIntLit (toInteger amount) i32 in text "alloca" <+> ppr tp <> comma <+> ppr amount'
134
false
true
0
12
34
71
33
38
null
null
abhin4v/haskell-classes
2016-02-29/DataTypes.hs
cc0-1.0
find n@(Node l v r) x | x == v = True | x > v = find r x | otherwise = find l x
92
find n@(Node l v r) x | x == v = True | x > v = find r x | otherwise = find l x
92
find n@(Node l v r) x | x == v = True | x > v = find r x | otherwise = find l x
92
false
false
2
8
38
64
30
34
null
null
mattgreen/hython
src/Language/Python/Lexer.hs
gpl-3.0
newline :: Lexer Tokens newline = do try (string "\r\n") <|> string "\r" <|> string "\n" return [Newline]
113
newline :: Lexer Tokens newline = do try (string "\r\n") <|> string "\r" <|> string "\n" return [Newline]
113
newline = do try (string "\r\n") <|> string "\r" <|> string "\n" return [Newline]
89
false
true
1
12
25
53
22
31
null
null
ivanmoore/seedy
lib/Pelias.hs
gpl-3.0
countStrBalance' x ('}' : rest) = (-x) + countStrBalance' x rest
72
countStrBalance' x ('}' : rest) = (-x) + countStrBalance' x rest
72
countStrBalance' x ('}' : rest) = (-x) + countStrBalance' x rest
72
false
false
0
7
18
34
16
18
null
null
pparkkin/eta
compiler/ETA/Utils/FastString.hs
bsd-3-clause
uniqueOfFS :: FastString -> Int uniqueOfFS (FastString u _ _ _) = u
67
uniqueOfFS :: FastString -> Int uniqueOfFS (FastString u _ _ _) = u
67
uniqueOfFS (FastString u _ _ _) = u
35
false
true
0
7
12
30
15
15
null
null
icyfork/shellcheck
ShellCheck/Analytics.hs
gpl-3.0
prop_checkUnassignedReferences9 = verifyNotTree checkUnassignedReferences "echo ${foo-bar}"
91
prop_checkUnassignedReferences9 = verifyNotTree checkUnassignedReferences "echo ${foo-bar}"
91
prop_checkUnassignedReferences9 = verifyNotTree checkUnassignedReferences "echo ${foo-bar}"
91
false
false
0
5
5
11
5
6
null
null
ml9951/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
foldrIdKey = mkPreludeMiscIdUnique 6
56
foldrIdKey = mkPreludeMiscIdUnique 6
56
foldrIdKey = mkPreludeMiscIdUnique 6
56
false
false
0
5
23
9
4
5
null
null
vinnymac/glot-www
Yesod/Auth/Simple.hs
mit
dispatch "POST" ["confirm", token] = postConfirmR token >>= sendResponse
72
dispatch "POST" ["confirm", token] = postConfirmR token >>= sendResponse
72
dispatch "POST" ["confirm", token] = postConfirmR token >>= sendResponse
72
false
false
0
6
8
26
12
14
null
null
michaelficarra/purescript
src/Language/PureScript/Types.hs
mit
rowFromList ((name, t):ts, r) = RCons name t (rowFromList (ts, r))
66
rowFromList ((name, t):ts, r) = RCons name t (rowFromList (ts, r))
66
rowFromList ((name, t):ts, r) = RCons name t (rowFromList (ts, r))
66
false
false
0
8
10
45
24
21
null
null
denibertovic/haskell
kubernetes/lib/Kubernetes/OpenAPI/ModelLens.hs
bsd-3-clause
-- | 'v1NodeConditionLastTransitionTime' Lens v1NodeConditionLastTransitionTimeL :: Lens_' V1NodeCondition (Maybe DateTime) v1NodeConditionLastTransitionTimeL f V1NodeCondition{..} = (\v1NodeConditionLastTransitionTime -> V1NodeCondition { v1NodeConditionLastTransitionTime, ..} ) <$> f v1NodeConditionLastTransitionTime
320
v1NodeConditionLastTransitionTimeL :: Lens_' V1NodeCondition (Maybe DateTime) v1NodeConditionLastTransitionTimeL f V1NodeCondition{..} = (\v1NodeConditionLastTransitionTime -> V1NodeCondition { v1NodeConditionLastTransitionTime, ..} ) <$> f v1NodeConditionLastTransitionTime
274
v1NodeConditionLastTransitionTimeL f V1NodeCondition{..} = (\v1NodeConditionLastTransitionTime -> V1NodeCondition { v1NodeConditionLastTransitionTime, ..} ) <$> f v1NodeConditionLastTransitionTime
196
true
true
0
8
23
57
30
27
null
null
juhp/stack
src/Stack/Build.hs
bsd-3-clause
-- | Build. -- -- If a buildLock is passed there is an important contract here. That lock must -- protect the snapshot, and it must be safe to unlock it if there are no further -- modifications to the snapshot to be performed by this build. build :: HasEnvConfig env => Maybe (Set (Path Abs File) -> IO ()) ...
2,639
build :: HasEnvConfig env => Maybe (Set (Path Abs File) -> IO ()) -- ^ callback after discovering all local files -> RIO env () build msetLocalFiles = do mcp <- view $ configL.to configModifyCodePage ghcVersion <- view $ actualCompilerVersionL.to getGhcVersion fixCodePage mcp ghcVersion $ do bopts...
2,391
build msetLocalFiles = do mcp <- view $ configL.to configModifyCodePage ghcVersion <- view $ actualCompilerVersionL.to getGhcVersion fixCodePage mcp ghcVersion $ do bopts <- view buildOptsL sourceMap <- view $ envConfigL.to envConfigSourceMap locals <- projectLocalPackages depsLocals <- localDepen...
2,251
true
true
0
25
735
599
273
326
null
null
caryoscelus/graphics
src/Game/Graphics/Triangles.hs
mit
attributeBytes :: Triangles -> Int attributeBytes = vectorBytes . triAttributes
79
attributeBytes :: Triangles -> Int attributeBytes = vectorBytes . triAttributes
79
attributeBytes = vectorBytes . triAttributes
44
false
true
0
7
9
26
11
15
null
null
seereason/cabal
cabal-install/Distribution/Client/Setup.hs
bsd-3-clause
benchmarkCommand :: CommandUI (BenchmarkFlags, BuildFlags, BuildExFlags) benchmarkCommand = parent { commandDefaultFlags = (commandDefaultFlags parent, Cabal.defaultBuildFlags, mempty), commandOptions = \showOrParseArgs -> liftOptions get1 set1 (commandOptio...
978
benchmarkCommand :: CommandUI (BenchmarkFlags, BuildFlags, BuildExFlags) benchmarkCommand = parent { commandDefaultFlags = (commandDefaultFlags parent, Cabal.defaultBuildFlags, mempty), commandOptions = \showOrParseArgs -> liftOptions get1 set1 (commandOptio...
978
benchmarkCommand = parent { commandDefaultFlags = (commandDefaultFlags parent, Cabal.defaultBuildFlags, mempty), commandOptions = \showOrParseArgs -> liftOptions get1 set1 (commandOptions parent showOrParseArgs) ++ ...
905
false
true
5
13
291
295
155
140
null
null
niexshao/AlgorithmEx
src/Course/PA1.hs
bsd-3-clause
-- Assignments change :: Integer -> Integer change n = let coins = [10, 5, 1] change1 [] _ = 0 change1 (x : xs) m = div m x + change1 xs (mod m x) in change1 coins n
181
change :: Integer -> Integer change n = let coins = [10, 5, 1] change1 [] _ = 0 change1 (x : xs) m = div m x + change1 xs (mod m x) in change1 coins n
166
change n = let coins = [10, 5, 1] change1 [] _ = 0 change1 (x : xs) m = div m x + change1 xs (mod m x) in change1 coins n
137
true
true
0
12
55
100
49
51
null
null
Chatanga/codingame-hs
src/Codingame/SourcePackager.hs
mit
processInternalModule :: ParseMode -> ModuleSourceMap -> FilePath -> IO ModuleSourceMap processInternalModule parseMode moduleSourceMap sourceFile = do let selectDoesNotExistError e = if isDoesNotExistError e then Just e else Nothing result <- tryJust selectDoesNotExistError (processModule parseMode moduleSourc...
454
processInternalModule :: ParseMode -> ModuleSourceMap -> FilePath -> IO ModuleSourceMap processInternalModule parseMode moduleSourceMap sourceFile = do let selectDoesNotExistError e = if isDoesNotExistError e then Just e else Nothing result <- tryJust selectDoesNotExistError (processModule parseMode moduleSourc...
454
processInternalModule parseMode moduleSourceMap sourceFile = do let selectDoesNotExistError e = if isDoesNotExistError e then Just e else Nothing result <- tryJust selectDoesNotExistError (processModule parseMode moduleSourceMap sourceFile) case result of Left _ -> return moduleSourceMap Rig...
366
false
true
0
11
76
112
51
61
null
null
GaloisInc/saw-script
src/SAWScript/Builtins.hs
bsd-3-clause
cryptol_load :: (FilePath -> IO StrictBS.ByteString) -> FilePath -> TopLevel CryptolModule cryptol_load fileReader path = do sc <- getSharedContext rw <- getTopLevelRW let ce = rwCryptol rw let ?fileReader = fileReader (m, ce') <- io $ CEnv.loadCryptolModule sc CEnv.defaultPrimitiveOptions ce path putTopLev...
360
cryptol_load :: (FilePath -> IO StrictBS.ByteString) -> FilePath -> TopLevel CryptolModule cryptol_load fileReader path = do sc <- getSharedContext rw <- getTopLevelRW let ce = rwCryptol rw let ?fileReader = fileReader (m, ce') <- io $ CEnv.loadCryptolModule sc CEnv.defaultPrimitiveOptions ce path putTopLev...
360
cryptol_load fileReader path = do sc <- getSharedContext rw <- getTopLevelRW let ce = rwCryptol rw let ?fileReader = fileReader (m, ce') <- io $ CEnv.loadCryptolModule sc CEnv.defaultPrimitiveOptions ce path putTopLevelRW $ rw { rwCryptol = ce' } return m
269
false
true
0
10
64
125
59
66
null
null
ian-ross/c2hs-macos-test
c2hs-0.26.1/src/C2HS/Gen/Bind.hs
mit
ptrExpectedErr :: Position -> GB a ptrExpectedErr pos = raiseErrorCTExc pos ["Expected a pointer object!", "Attempt to dereference a non-pointer object or to use it in a " ++ "`pointer' hook."]
214
ptrExpectedErr :: Position -> GB a ptrExpectedErr pos = raiseErrorCTExc pos ["Expected a pointer object!", "Attempt to dereference a non-pointer object or to use it in a " ++ "`pointer' hook."]
214
ptrExpectedErr pos = raiseErrorCTExc pos ["Expected a pointer object!", "Attempt to dereference a non-pointer object or to use it in a " ++ "`pointer' hook."]
175
false
true
0
6
51
37
18
19
null
null
plumlife/cabal
Cabal/Distribution/PackageDescription/PrettyPrint.hs
bsd-3-clause
ppCondition :: Condition ConfVar -> Doc ppCondition (Var x) = ppConfVar x
94
ppCondition :: Condition ConfVar -> Doc ppCondition (Var x) = ppConfVar x
94
ppCondition (Var x) = ppConfVar x
54
false
true
0
7
32
30
14
16
null
null
haskell-opengl/OpenGLRaw
src/Graphics/GL/Functions/F19.hs
bsd-3-clause
-- glNormalStream3sATI --------------------------------------------------------- glNormalStream3sATI :: MonadIO m => GLenum -- ^ @stream@ of type [VertexStreamATI](Graphics-GL-Groups.html#VertexStreamATI). -> GLshort -- ^ @nx@. -> GLshort -- ^ @ny@. -> GLshort -- ^ @nz@. -> m () glNormalStream3sATI v1 v2 v...
378
glNormalStream3sATI :: MonadIO m => GLenum -- ^ @stream@ of type [VertexStreamATI](Graphics-GL-Groups.html#VertexStreamATI). -> GLshort -- ^ @nx@. -> GLshort -- ^ @ny@. -> GLshort -- ^ @nz@. -> m () glNormalStream3sATI v1 v2 v3 v4 = liftIO $ dyn583 ptr_glNormalStream3sATI v1 v2 v3 v4
296
glNormalStream3sATI v1 v2 v3 v4 = liftIO $ dyn583 ptr_glNormalStream3sATI v1 v2 v3 v4
85
true
true
0
12
59
72
36
36
null
null
fros1y/umbral
src/Color.hs
bsd-3-clause
byName "lime" = fromTuple (0,255,0)
35
byName "lime" = fromTuple (0,255,0)
35
byName "lime" = fromTuple (0,255,0)
35
false
false
1
6
4
24
11
13
null
null
nevrenato/HetsAlloy
CSMOF/StatAna.hs
gpl-2.0
createLinksFromLinks :: Link -> Set.Set LinkT -> Set.Set LinkT createLinksFromLinks li linkk = let nam = namedElementName (typedElementSuper (propertySuper (linkType li))) ty = typedElementType (propertySuper (linkType li)) cla = propertyClass (linkType li) opp = opposite (linkType li) in Set.i...
421
createLinksFromLinks :: Link -> Set.Set LinkT -> Set.Set LinkT createLinksFromLinks li linkk = let nam = namedElementName (typedElementSuper (propertySuper (linkType li))) ty = typedElementType (propertySuper (linkType li)) cla = propertyClass (linkType li) opp = opposite (linkType li) in Set.i...
421
createLinksFromLinks li linkk = let nam = namedElementName (typedElementSuper (propertySuper (linkType li))) ty = typedElementType (propertySuper (linkType li)) cla = propertyClass (linkType li) opp = opposite (linkType li) in Set.insert (LinkT (objectName (source li)) (objectName (target li)) ...
358
false
true
0
15
76
167
81
86
null
null
ekmett/kevin
Kevin/IRC/Protocol.hs
gpl-3.0
getAuthInfo :: Handle -> Bool -> KevinState () getAuthInfo handle = fix (\f authRetry -> do pkt <- io $ parsePacket <$> T.hGetLine handle io $ klogNow Yellow $ "client <- " ++ T.unpack (readable pkt) case command pkt of "PASS" -> do password .= head (params pkt) passed .= True ...
745
getAuthInfo :: Handle -> Bool -> KevinState () getAuthInfo handle = fix (\f authRetry -> do pkt <- io $ parsePacket <$> T.hGetLine handle io $ klogNow Yellow $ "client <- " ++ T.unpack (readable pkt) case command pkt of "PASS" -> do password .= head (params pkt) passed .= True ...
745
getAuthInfo handle = fix (\f authRetry -> do pkt <- io $ parsePacket <$> T.hGetLine handle io $ klogNow Yellow $ "client <- " ++ T.unpack (readable pkt) case command pkt of "PASS" -> do password .= head (params pkt) passed .= True "NICK" -> do name .= head (p...
698
false
true
0
18
303
260
119
141
null
null
darthdeus/ghc-mod-ng
Language/Haskell/GhcMod/GhcPkg.hs
bsd-3-clause
getPackageDbStack cdir = (getSandboxDb cdir >>= \db -> return [GlobalDb, PackageDb db]) `E.catch` \(_ :: E.SomeException) -> return [GlobalDb, UserDb]
160
getPackageDbStack cdir = (getSandboxDb cdir >>= \db -> return [GlobalDb, PackageDb db]) `E.catch` \(_ :: E.SomeException) -> return [GlobalDb, UserDb]
160
getPackageDbStack cdir = (getSandboxDb cdir >>= \db -> return [GlobalDb, PackageDb db]) `E.catch` \(_ :: E.SomeException) -> return [GlobalDb, UserDb]
160
false
false
0
11
29
67
36
31
null
null
choener/bimaps
lib/Data/Bijection/Class.hs
bsd-3-clause
size :: DomCod l => Bimap l r -> Int size (Bimap l r) = sizeDC l
64
size :: DomCod l => Bimap l r -> Int size (Bimap l r) = sizeDC l
64
size (Bimap l r) = sizeDC l
27
false
true
0
7
16
41
19
22
null
null
hackern/halfs
Halfs/Inode.hs
bsd-3-clause
setChangeTime :: (Ord t, Serialize t) => t -> Inode t -> Inode t setChangeTime t nd = nd{ inoChangeTime = t }
109
setChangeTime :: (Ord t, Serialize t) => t -> Inode t -> Inode t setChangeTime t nd = nd{ inoChangeTime = t }
109
setChangeTime t nd = nd{ inoChangeTime = t }
44
false
true
0
9
22
58
28
30
null
null
AlexeyRaga/eta
compiler/ETA/CodeGen/Rts.hs
bsd-3-clause
stgIndStatic = thunk "StgIndStatic"
36
stgIndStatic = thunk "StgIndStatic"
36
stgIndStatic = thunk "StgIndStatic"
36
false
false
0
5
4
9
4
5
null
null
gcampax/ghc
compiler/coreSyn/CoreArity.hs
bsd-3-clause
typeArity :: Type -> [OneShotInfo] -- How many value arrows are visible in the type? -- We look through foralls, and newtypes -- See Note [exprArity invariant] typeArity ty = go initRecTc ty where go rec_nts ty | Just (_, ty') <- splitForAllTy_maybe ty = go rec_nts ty' | Just (arg,res) <- sp...
1,233
typeArity :: Type -> [OneShotInfo] typeArity ty = go initRecTc ty where go rec_nts ty | Just (_, ty') <- splitForAllTy_maybe ty = go rec_nts ty' | Just (arg,res) <- splitFunTy_maybe ty = typeOneShot arg : go rec_nts res | Just (tc,tys) <- splitTyConApp_maybe ty , Just (ty',...
1,108
typeArity ty = go initRecTc ty where go rec_nts ty | Just (_, ty') <- splitForAllTy_maybe ty = go rec_nts ty' | Just (arg,res) <- splitFunTy_maybe ty = typeOneShot arg : go rec_nts res | Just (tc,tys) <- splitTyConApp_maybe ty , Just (ty', _) <- instNewTyCon_maybe tc tys ...
1,073
true
true
2
10
423
215
104
111
null
null
ingemaradahl/bilder
src/TypeChecker/Renamer.hs
lgpl-3.0
renameStm (SDoWhile tkdo s tkwh e) = SDoWhile tkdo <$> renameStm s <*> pure tkwh <*> renameExp e
98
renameStm (SDoWhile tkdo s tkwh e) = SDoWhile tkdo <$> renameStm s <*> pure tkwh <*> renameExp e
98
renameStm (SDoWhile tkdo s tkwh e) = SDoWhile tkdo <$> renameStm s <*> pure tkwh <*> renameExp e
98
false
false
0
7
19
45
20
25
null
null
sbditto85/parsedsltest
src/Lib.hs
apache-2.0
string :: Parser [Char] -- TODO: escapedString cant end with '\\' string = ABC.char '"' *> escapedString <* ABC.char '"'
120
string :: Parser [Char] string = ABC.char '"' *> escapedString <* ABC.char '"'
78
string = ABC.char '"' *> escapedString <* ABC.char '"'
54
true
true
0
8
19
36
18
18
null
null
crogers1/manager
xenmgr/XenMgr/Expose/VmObject.hs
gpl-2.0
_delete_firewall_rule :: Uuid -> Int32 -> Rpc () _delete_firewall_rule uuid ruleid = do unlessM (policyQueryModifyVmSettings uuid) failCannotEditPropertiesDueToPolicy dbRm (firerulePath uuid ruleid)
202
_delete_firewall_rule :: Uuid -> Int32 -> Rpc () _delete_firewall_rule uuid ruleid = do unlessM (policyQueryModifyVmSettings uuid) failCannotEditPropertiesDueToPolicy dbRm (firerulePath uuid ruleid)
202
_delete_firewall_rule uuid ruleid = do unlessM (policyQueryModifyVmSettings uuid) failCannotEditPropertiesDueToPolicy dbRm (firerulePath uuid ruleid)
153
false
true
0
9
24
57
26
31
null
null
sgillespie/ghc
compiler/typecheck/TcPatSyn.hs
bsd-3-clause
tcCheckPatSynPat :: LPat Name -> TcM () tcCheckPatSynPat = go where go :: LPat Name -> TcM () go = addLocM go1 go1 :: Pat Name -> TcM () go1 (ConPatIn _ info) = mapM_ go (hsConPatArgs info) go1 VarPat{} = return () go1 WildPat{} = return () go1 p@(AsPat _ _) ...
1,115
tcCheckPatSynPat :: LPat Name -> TcM () tcCheckPatSynPat = go where go :: LPat Name -> TcM () go = addLocM go1 go1 :: Pat Name -> TcM () go1 (ConPatIn _ info) = mapM_ go (hsConPatArgs info) go1 VarPat{} = return () go1 WildPat{} = return () go1 p@(AsPat _ _) ...
1,115
tcCheckPatSynPat = go where go :: LPat Name -> TcM () go = addLocM go1 go1 :: Pat Name -> TcM () go1 (ConPatIn _ info) = mapM_ go (hsConPatArgs info) go1 VarPat{} = return () go1 WildPat{} = return () go1 p@(AsPat _ _) = asPatInPatSynErr p go1 (L...
1,075
false
true
0
8
426
447
213
234
null
null
urbanslug/ghc
compiler/codeGen/StgCmmClosure.hs
bsd-3-clause
-- Strictly speaking, the above two don't need Node to point -- to it if the arity = 0. But this is a *really* unlikely -- situation. If we know it's nil (say) and we are entering -- it. Eg: let x = [] in x then we will certainly have inlined -- x, since nil is a simple atom. So we ga...
675
nodeMustPointToIt _ (LFUnknown _) = True
42
nodeMustPointToIt _ (LFUnknown _) = True
42
true
false
1
6
197
30
18
12
null
null
lamdu/lamdu
src/Revision/Deltum/Transaction.hs
gpl-3.0
liftInner :: Monad m => m a -> T m a liftInner = Transaction . lift . lift
74
liftInner :: Monad m => m a -> T m a liftInner = Transaction . lift . lift
74
liftInner = Transaction . lift . lift
37
false
true
1
8
17
44
19
25
null
null
adinapoli/xmonad-contrib
XMonad/Layout/Master.hs
bsd-3-clause
-- | Modifier which converts given layout to a mastered one multimastered :: (LayoutClass l a) => Int -- ^ @k@, number of master windows -> Rational -- ^ @delta@, the ratio of the screen to resize by -> Rational -- ^ @frac@, what portion of the screen to use for the master window -> l a -- ^ the...
447
multimastered :: (LayoutClass l a) => Int -- ^ @k@, number of master windows -> Rational -- ^ @delta@, the ratio of the screen to resize by -> Rational -- ^ @frac@, what portion of the screen to use for the master window -> l a -- ^ the layout to be modified -> ModifiedLayout AddMaster l a m...
387
multimastered k delta frac = ModifiedLayout $ AddMaster k delta frac
68
true
true
0
11
107
72
37
35
null
null
christiaanb/ghc
compiler/nativeGen/X86/CodeGen.hs
bsd-3-clause
memConstant :: Int -> CmmLit -> NatM Amode memConstant align lit = do lbl <- getNewLabelNat dflags <- getDynFlags (addr, addr_code) <- if target32Bit (targetPlatform dflags) then do dynRef <- cmmMakeDynamicReference dflags ...
730
memConstant :: Int -> CmmLit -> NatM Amode memConstant align lit = do lbl <- getNewLabelNat dflags <- getDynFlags (addr, addr_code) <- if target32Bit (targetPlatform dflags) then do dynRef <- cmmMakeDynamicReference dflags ...
730
memConstant align lit = do lbl <- getNewLabelNat dflags <- getDynFlags (addr, addr_code) <- if target32Bit (targetPlatform dflags) then do dynRef <- cmmMakeDynamicReference dflags DataReference ...
687
false
true
0
16
333
186
88
98
null
null
energyflowanalysis/efa-2.1
src/EFA/IO/Parser.hs
bsd-3-clause
sepByMatch :: (Sequence f) => f void -> Parser a -> Parser sep -> Parser (f a) sepByMatch n p sep = sequenceA $ NonEmpty.init $ NonEmpty.Cons p $ (sep>>p) <$ n
168
sepByMatch :: (Sequence f) => f void -> Parser a -> Parser sep -> Parser (f a) sepByMatch n p sep = sequenceA $ NonEmpty.init $ NonEmpty.Cons p $ (sep>>p) <$ n
168
sepByMatch n p sep = sequenceA $ NonEmpty.init $ NonEmpty.Cons p $ (sep>>p) <$ n
83
false
true
2
12
40
93
43
50
null
null
gokhankici/131-web
site.hs
mit
postCtx :: Context String postCtx = dateField "date" "%B %e, %Y" `mappend` -- constField "headerImg" "Eiffel.jpg" `mappend` siteCtx
152
postCtx :: Context String postCtx = dateField "date" "%B %e, %Y" `mappend` -- constField "headerImg" "Eiffel.jpg" `mappend` siteCtx
152
postCtx = dateField "date" "%B %e, %Y" `mappend` -- constField "headerImg" "Eiffel.jpg" `mappend` siteCtx
126
false
true
0
6
38
26
14
12
null
null
JeanJoskin/ObjectiveJLib
src/Language/ObjectiveJLib/Parser/Parser.hs
bsd-3-clause
pJVarArgParam = True <$ pReserved "," <* pReserved "." <* pReserved "." <* pReserved "."
88
pJVarArgParam = True <$ pReserved "," <* pReserved "." <* pReserved "." <* pReserved "."
88
pJVarArgParam = True <$ pReserved "," <* pReserved "." <* pReserved "." <* pReserved "."
88
false
false
1
9
14
37
15
22
null
null
cyruscousins/HarmLang
src/HarmLang/Utility.hs
mit
--http://stackoverflow.com/questions/9270478/efficiently-find-indices-of-maxima-of-a-list indexOfMaximum :: (Ord n, Num n) => [n] -> Int indexOfMaximum list = let indexOfMaximum' :: (Ord n, Num n) => [n] -> Int -> n -> Int -> Int indexOfMaximum' list' currIndex highestVal highestIndex | null list' ...
630
indexOfMaximum :: (Ord n, Num n) => [n] -> Int indexOfMaximum list = let indexOfMaximum' :: (Ord n, Num n) => [n] -> Int -> n -> Int -> Int indexOfMaximum' list' currIndex highestVal highestIndex | null list' = highestIndex | (head list') > highestVal = index...
540
indexOfMaximum list = let indexOfMaximum' :: (Ord n, Num n) => [n] -> Int -> n -> Int -> Int indexOfMaximum' list' currIndex highestVal highestIndex | null list' = highestIndex | (head list') > highestVal = indexOfMaximum' (tail list') (1 + currIndex) (head l...
493
true
true
0
14
178
192
95
97
null
null
siddhanathan/yi
yi-keymap-vim/src/Yi/Keymap/Vim/Common.hs
gpl-2.0
matchesString :: EventString -> EventString -> MatchResult () matchesString (Ev got) (Ev expected) | expected == got = WholeMatch () | got `T.isPrefixOf` expected = PartialMatch | otherwise = NoMatch
205
matchesString :: EventString -> EventString -> MatchResult () matchesString (Ev got) (Ev expected) | expected == got = WholeMatch () | got `T.isPrefixOf` expected = PartialMatch | otherwise = NoMatch
205
matchesString (Ev got) (Ev expected) | expected == got = WholeMatch () | got `T.isPrefixOf` expected = PartialMatch | otherwise = NoMatch
143
false
true
1
8
35
83
40
43
null
null
rahulmutt/ghcvm
compiler/Eta/HsSyn/HsPat.hs
bsd-3-clause
isUnliftedLPat _ = False
51
isUnliftedLPat _ = False
51
isUnliftedLPat _ = False
51
false
false
0
5
30
9
4
5
null
null
keera-studios/hsQt
demos/dem_01.hs
bsd-2-clause
zmOut :: GCv -> MdiGC -> IO () zmOut gcv cm = scaleImage gcv 0.8
66
zmOut :: GCv -> MdiGC -> IO () zmOut gcv cm = scaleImage gcv 0.8
66
zmOut gcv cm = scaleImage gcv 0.8
35
false
true
0
8
16
38
17
21
null
null
markus-git/imperative-edsl-vhdl
src/Language/Embedded/VHDL/Monad.hs
bsd-3-clause
setBlockIds x _ = x
36
setBlockIds x _ = x
36
setBlockIds x _ = x
36
false
false
0
4
21
13
5
8
null
null
romanb/amazonka
amazonka-ses/gen/Network/AWS/SES/Types.hs
mpl-2.0
-- | Time of the data point. sdpTimestamp :: Lens' SendDataPoint (Maybe UTCTime) sdpTimestamp = lens _sdpTimestamp (\s a -> s { _sdpTimestamp = a }) . mapping _Time
164
sdpTimestamp :: Lens' SendDataPoint (Maybe UTCTime) sdpTimestamp = lens _sdpTimestamp (\s a -> s { _sdpTimestamp = a }) . mapping _Time
135
sdpTimestamp = lens _sdpTimestamp (\s a -> s { _sdpTimestamp = a }) . mapping _Time
83
true
true
1
10
28
58
28
30
null
null
Hamcha/dvx
Dvx/Interpreter.hs
mit
executeExpr c (DvxDecl name value) = setVar c name value
59
executeExpr c (DvxDecl name value) = setVar c name value
59
executeExpr c (DvxDecl name value) = setVar c name value
59
false
false
0
7
12
26
12
14
null
null
nh2/shake
Development/Make/Rules.hs
bsd-3-clause
defaultRuleFile_ :: Rules () defaultRuleFile_ = defaultRule $ \(File_Q x) -> Just $ liftIO $ fmap (File_A . Just) $ getModTimeError "Error, file does not exist and no rule available:" x
189
defaultRuleFile_ :: Rules () defaultRuleFile_ = defaultRule $ \(File_Q x) -> Just $ liftIO $ fmap (File_A . Just) $ getModTimeError "Error, file does not exist and no rule available:" x
189
defaultRuleFile_ = defaultRule $ \(File_Q x) -> Just $ liftIO $ fmap (File_A . Just) $ getModTimeError "Error, file does not exist and no rule available:" x
160
false
true
0
11
34
58
29
29
null
null
joelburget/interplanetary-computation
src/Planetary/Library/FrankExamples.hs
bsd-3-clause
inch :: Handler inch st | Just [] <- lookupArgs st = do c <- liftIO getChar -- Taken from Shonky/Semantics let c' = if c == '\DEL' then '\b' else c c'' <- writeForeign c' pure $ st & evalFocus .~ ForeignValue charId [] c''
244
inch :: Handler inch st | Just [] <- lookupArgs st = do c <- liftIO getChar -- Taken from Shonky/Semantics let c' = if c == '\DEL' then '\b' else c c'' <- writeForeign c' pure $ st & evalFocus .~ ForeignValue charId [] c''
244
inch st | Just [] <- lookupArgs st = do c <- liftIO getChar -- Taken from Shonky/Semantics let c' = if c == '\DEL' then '\b' else c c'' <- writeForeign c' pure $ st & evalFocus .~ ForeignValue charId [] c''
228
false
true
0
13
67
104
46
58
null
null
chadbrewbaker/shellcheck
ShellCheck/Analytics.hs
gpl-3.0
checkInteractiveSu params = checkCommand "su" f where f cmd l = when (length l <= 1) $ when (all undirected $ getPath (parentMap params) cmd) $ info (getId cmd) 2117 "To run commands as another user, use su -c or sudo." undirected (T_Pipeline _ _ l) = length l <= 1 -- ...
454
checkInteractiveSu params = checkCommand "su" f where f cmd l = when (length l <= 1) $ when (all undirected $ getPath (parentMap params) cmd) $ info (getId cmd) 2117 "To run commands as another user, use su -c or sudo." undirected (T_Pipeline _ _ l) = length l <= 1 -- ...
454
checkInteractiveSu params = checkCommand "su" f where f cmd l = when (length l <= 1) $ when (all undirected $ getPath (parentMap params) cmd) $ info (getId cmd) 2117 "To run commands as another user, use su -c or sudo." undirected (T_Pipeline _ _ l) = length l <= 1 -- ...
454
false
false
3
13
132
138
66
72
null
null
uduki/hsQt
Qtc/Core/Attributes.hs
bsd-2-clause
on_sltConf_nt :: Qsig (IO ()) -> SltConf (QObject b) (QObject b -> IO ()) on_sltConf_nt sig = sltConf sltcon where sltcon w sltslt f _ = connectSlot_nt w (sigString sig) w (slotString sltslt) (f w)
207
on_sltConf_nt :: Qsig (IO ()) -> SltConf (QObject b) (QObject b -> IO ()) on_sltConf_nt sig = sltConf sltcon where sltcon w sltslt f _ = connectSlot_nt w (sigString sig) w (slotString sltslt) (f w)
207
on_sltConf_nt sig = sltConf sltcon where sltcon w sltslt f _ = connectSlot_nt w (sigString sig) w (slotString sltslt) (f w)
133
false
true
0
10
44
103
49
54
null
null
qpliu/esolang
featured/candidates/eodermdrome.hs
gpl-3.0
eodermdrome :: String -> IO () eodermdrome prog = interact (run prog)
69
eodermdrome :: String -> IO () eodermdrome prog = interact (run prog)
69
eodermdrome prog = interact (run prog)
38
false
true
0
8
11
37
16
21
null
null
daewon/til
exercism/haskell/simple-linked-list/src/LinkedList.hs
mpl-2.0
next :: LinkedList a -> LinkedList a next (Cons _ rest) = rest
62
next :: LinkedList a -> LinkedList a next (Cons _ rest) = rest
62
next (Cons _ rest) = rest
25
false
true
0
6
12
36
16
20
null
null
ghcjs/jsaddle-dom
src/JSDOM/Generated/GlobalEventHandlers.hs
mit
-- | <https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers.onwebkitwillrevealright Mozilla GlobalEventHandlers.onwebkitwillrevealright documentation> webKitWillRevealRight :: (IsGlobalEventHandlers self, IsEventTarget self) => EventName self Event webKitWil...
389
webKitWillRevealRight :: (IsGlobalEventHandlers self, IsEventTarget self) => EventName self Event webKitWillRevealRight = unsafeEventName (toJSString "webkitwillrevealright")
222
webKitWillRevealRight = unsafeEventName (toJSString "webkitwillrevealright")
78
true
true
0
7
69
47
22
25
null
null
cpettitt/tamien
Tamien/GM/Eval.hs
mit
showSC :: GmState -> Name -> Addr -> Doc showSC state n a = text "Code for" <+> doubleQuotes (text n) $+$ nest 4 (showInstructions code) where (NGlobal _ code) = H.lookup a (gmHeap state)
215
showSC :: GmState -> Name -> Addr -> Doc showSC state n a = text "Code for" <+> doubleQuotes (text n) $+$ nest 4 (showInstructions code) where (NGlobal _ code) = H.lookup a (gmHeap state)
215
showSC state n a = text "Code for" <+> doubleQuotes (text n) $+$ nest 4 (showInstructions code) where (NGlobal _ code) = H.lookup a (gmHeap state)
174
false
true
0
9
62
90
43
47
null
null
lukemaurer/sequent-core
src/Language/SequentCore/Arity.hs
bsd-3-clause
arityApp (ABot n) _ = ABot (n-1)
41
arityApp (ABot n) _ = ABot (n-1)
41
arityApp (ABot n) _ = ABot (n-1)
41
false
false
0
7
15
27
13
14
null
null
jfranklin9000/urbit
pkg/hs/terminal-progress-bar/src/System/ProgressBar.hs
mit
updateWidth :: Style s -> RIO e (Style s) updateWidth style = case styleWidth style of ConstantWidth {} -> pure style TerminalWidth {} -> do mbWindow <- liftIO TS.size pure $ case mbWindow of Nothing -> style Just window -> style{ styleWidth = TerminalWidth (TS.width ...
569
updateWidth :: Style s -> RIO e (Style s) updateWidth style = case styleWidth style of ConstantWidth {} -> pure style TerminalWidth {} -> do mbWindow <- liftIO TS.size pure $ case mbWindow of Nothing -> style Just window -> style{ styleWidth = TerminalWidth (TS.width ...
569
updateWidth style = case styleWidth style of ConstantWidth {} -> pure style TerminalWidth {} -> do mbWindow <- liftIO TS.size pure $ case mbWindow of Nothing -> style Just window -> style{ styleWidth = TerminalWidth (TS.width window) } -- | Change the progress of a p...
527
false
true
0
19
145
125
62
63
null
null
ekmett/data-store
tests/Test/Data/Store01.hs
bsd-3-clause
prop_update4 = delete1XX && delete11X && deleteX12 where delete1XX :: Bool delete1XX = I.size res == 2 where res = I.update (const Nothing) (sPersonName .== "1") store delete11X :: Bool delete11X = (I.size res == 2) && (resLookup == [ Person "2" 1 2 ]) where ...
1,021
prop_update4 = delete1XX && delete11X && deleteX12 where delete1XX :: Bool delete1XX = I.size res == 2 where res = I.update (const Nothing) (sPersonName .== "1") store delete11X :: Bool delete11X = (I.size res == 2) && (resLookup == [ Person "2" 1 2 ]) where ...
1,021
prop_update4 = delete1XX && delete11X && deleteX12 where delete1XX :: Bool delete1XX = I.size res == 2 where res = I.update (const Nothing) (sPersonName .== "1") store delete11X :: Bool delete11X = (I.size res == 2) && (resLookup == [ Person "2" 1 2 ]) where ...
1,021
false
false
5
12
319
406
202
204
null
null
cje/hilbert
test/THilbert.hs
bsd-3-clause
test_Stage1tPrecision :: Assertion test_Stage1tPrecision = 2 @=? precision ( transform (np 0 2) (np 0 2) (np 3 2))
116
test_Stage1tPrecision :: Assertion test_Stage1tPrecision = 2 @=? precision ( transform (np 0 2) (np 0 2) (np 3 2))
116
test_Stage1tPrecision = 2 @=? precision ( transform (np 0 2) (np 0 2) (np 3 2))
81
false
true
0
10
20
52
26
26
null
null
rbonifacio/funsat
src/Funsat/Circuit.hs
bsd-3-clause
naryNode ty l r = Graph $ do (lNode, lNodes, lEdges) <- unGraph l (rNode, rNodes, rEdges) <- unGraph r n <- newNode return (n, (n, ty) : lNodes ++ rNodes, (lNode, n, EVoid) : (rNode, n, EVoid) : lEdges ++ rEdges)
265
binaryNode ty l r = Graph $ do (lNode, lNodes, lEdges) <- unGraph l (rNode, rNodes, rEdges) <- unGraph r n <- newNode return (n, (n, ty) : lNodes ++ rNodes, (lNode, n, EVoid) : (rNode, n, EVoid) : lEdges ++ rEdges)
265
binaryNode ty l r = Graph $ do (lNode, lNodes, lEdges) <- unGraph l (rNode, rNodes, rEdges) <- unGraph r n <- newNode return (n, (n, ty) : lNodes ++ rNodes, (lNode, n, EVoid) : (rNode, n, EVoid) : lEdges ++ rEdges)
265
false
false
0
13
94
121
65
56
null
null
kazu-yamamoto/http2
test2/ServerSpec.hs
bsd-3-clause
response404 :: Response response404 = responseNoBody notFound404 []
67
response404 :: Response response404 = responseNoBody notFound404 []
67
response404 = responseNoBody notFound404 []
43
false
true
0
6
7
18
9
9
null
null