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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
kovach/ecstatic
|
Development/Ecstatic/Size.hs
|
bsd-2-clause
|
-- TODO replace the big sizeof enumeration with a call to this?
sizeOfTypeName :: GlobalDecls -> TypeName -> CExpr
sizeOfTypeName g t@(TyComp (CompTypeRef ref _ _)) =
case M.lookup ref (gTags g) of
Nothing -> error $ "unknown TypeName: " ++ show t
Just (CompDef (CompType _ _ decls _ _)) ->
sum $ map (sizeOfMemberDecl g) decls
-- TODO add value for this case
Just (EnumDef{}) -> error "union types unsupported"
| 435
|
sizeOfTypeName :: GlobalDecls -> TypeName -> CExpr
sizeOfTypeName g t@(TyComp (CompTypeRef ref _ _)) =
case M.lookup ref (gTags g) of
Nothing -> error $ "unknown TypeName: " ++ show t
Just (CompDef (CompType _ _ decls _ _)) ->
sum $ map (sizeOfMemberDecl g) decls
-- TODO add value for this case
Just (EnumDef{}) -> error "union types unsupported"
| 371
|
sizeOfTypeName g t@(TyComp (CompTypeRef ref _ _)) =
case M.lookup ref (gTags g) of
Nothing -> error $ "unknown TypeName: " ++ show t
Just (CompDef (CompType _ _ decls _ _)) ->
sum $ map (sizeOfMemberDecl g) decls
-- TODO add value for this case
Just (EnumDef{}) -> error "union types unsupported"
| 320
| true
| true
| 6
| 10
| 95
| 140
| 69
| 71
| null | null |
Paow/encore
|
src/front/SystemUtils.hs
|
bsd-3-clause
|
encodeCh :: Char -> EncodedString
encodeCh c | unencodedChar c = [c]
| 68
|
encodeCh :: Char -> EncodedString
encodeCh c | unencodedChar c = [c]
| 68
|
encodeCh c | unencodedChar c = [c]
| 34
| false
| true
| 0
| 8
| 11
| 30
| 14
| 16
| null | null |
bitemyapp/ganeti
|
src/Ganeti/Constants.hs
|
bsd-2-clause
|
-- | Retry interval (in seconds) in master voting, if not enough answers
-- could be gathered.
masterVotingRetryIntervall :: Int
masterVotingRetryIntervall = 10
| 160
|
masterVotingRetryIntervall :: Int
masterVotingRetryIntervall = 10
| 65
|
masterVotingRetryIntervall = 10
| 31
| true
| true
| 0
| 4
| 22
| 13
| 8
| 5
| null | null |
siddhanathan/ghc
|
compiler/prelude/THNames.hs
|
bsd-3-clause
|
unboxedTupleTName = libFun (fsLit "unboxedTupleT") unboxedTupleTIdKey
| 72
|
unboxedTupleTName = libFun (fsLit "unboxedTupleT") unboxedTupleTIdKey
| 72
|
unboxedTupleTName = libFun (fsLit "unboxedTupleT") unboxedTupleTIdKey
| 72
| false
| false
| 0
| 7
| 8
| 17
| 8
| 9
| null | null |
Peaker/keyvaluehash
|
src/Database/KeyValueHash.hs
|
bsd-3-clause
|
decode :: Binary a => SBS.ByteString -> a
decode = runGet get . lazify
| 70
|
decode :: Binary a => SBS.ByteString -> a
decode = runGet get . lazify
| 70
|
decode = runGet get . lazify
| 28
| false
| true
| 1
| 8
| 13
| 39
| 16
| 23
| null | null |
christiaanb/ghc
|
compiler/coreSyn/CoreSyn.hs
|
bsd-3-clause
|
seqGuidance :: UnfoldingGuidance -> ()
seqGuidance (UnfIfGoodArgs ns n b) = n `seq` sum ns `seq` b `seq` ()
| 107
|
seqGuidance :: UnfoldingGuidance -> ()
seqGuidance (UnfIfGoodArgs ns n b) = n `seq` sum ns `seq` b `seq` ()
| 107
|
seqGuidance (UnfIfGoodArgs ns n b) = n `seq` sum ns `seq` b `seq` ()
| 68
| false
| true
| 0
| 9
| 18
| 59
| 30
| 29
| null | null |
vTurbine/ghc
|
compiler/cmm/CLabel.hs
|
bsd-3-clause
|
dynamicLinkerLabelInfo :: CLabel -> Maybe (DynamicLinkerLabelInfo, CLabel)
dynamicLinkerLabelInfo (DynamicLinkerLabel info lbl) = Just (info, lbl)
| 146
|
dynamicLinkerLabelInfo :: CLabel -> Maybe (DynamicLinkerLabelInfo, CLabel)
dynamicLinkerLabelInfo (DynamicLinkerLabel info lbl) = Just (info, lbl)
| 146
|
dynamicLinkerLabelInfo (DynamicLinkerLabel info lbl) = Just (info, lbl)
| 71
| false
| true
| 0
| 7
| 14
| 44
| 23
| 21
| null | null |
snoyberg/ghc
|
compiler/types/Type.hs
|
bsd-3-clause
|
-- | Is this a numeric literal. We also look through type synonyms.
isNumLitTy :: Type -> Maybe Integer
isNumLitTy ty | Just ty1 <- coreView ty = isNumLitTy ty1
| 160
|
isNumLitTy :: Type -> Maybe Integer
isNumLitTy ty | Just ty1 <- coreView ty = isNumLitTy ty1
| 92
|
isNumLitTy ty | Just ty1 <- coreView ty = isNumLitTy ty1
| 56
| true
| true
| 0
| 9
| 29
| 45
| 19
| 26
| null | null |
brendanhay/gogol
|
gogol-books/gen/Network/Google/Books/Types/Product.hs
|
mpl-2.0
|
-- | Creates a value of 'UserSettingsNotesExport' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'usneFolderName'
--
-- * 'usneIsEnabled'
userSettingsNotesExport
:: UserSettingsNotesExport
userSettingsNotesExport =
UserSettingsNotesExport' {_usneFolderName = Nothing, _usneIsEnabled = Nothing}
| 385
|
userSettingsNotesExport
:: UserSettingsNotesExport
userSettingsNotesExport =
UserSettingsNotesExport' {_usneFolderName = Nothing, _usneIsEnabled = Nothing}
| 161
|
userSettingsNotesExport =
UserSettingsNotesExport' {_usneFolderName = Nothing, _usneIsEnabled = Nothing}
| 106
| true
| true
| 1
| 7
| 55
| 36
| 22
| 14
| null | null |
GaloisInc/halvm-ghc
|
compiler/prelude/PrelNames.hs
|
bsd-3-clause
|
readList_RDR, readListDefault_RDR, readListPrec_RDR, readListPrecDefault_RDR,
readPrec_RDR, parens_RDR, choose_RDR, lexP_RDR, expectP_RDR :: RdrName
readList_RDR = varQual_RDR gHC_READ (fsLit "readList")
| 218
|
readList_RDR, readListDefault_RDR, readListPrec_RDR, readListPrecDefault_RDR,
readPrec_RDR, parens_RDR, choose_RDR, lexP_RDR, expectP_RDR :: RdrName
readList_RDR = varQual_RDR gHC_READ (fsLit "readList")
| 218
|
readList_RDR = varQual_RDR gHC_READ (fsLit "readList")
| 65
| false
| true
| 3
| 7
| 31
| 45
| 27
| 18
| null | null |
dmgolubovsky/chordemux
|
src/ChordUtils.hs
|
mit
|
-- Find all inversions of the chord. Compact if needed. Result of the compaction is
-- the root position. Add 12 to the lowest note to get the next inversion. Return
-- as many inversions as many notes the chord has.
findInversions :: IntSet -> [IntSet]
findInversions dch =
let dch' = compactChord dch
invs = take (IS.size dch' - 1) [1..]
nextinv is = IS.insert newmin is' where
oldmin = IS.findMin is
is' = IS.delete oldmin is
newmin = oldmin + 12
doinv _ [] = []
doinv ch (x:xs) = let ch' = nextinv ch in ch' : doinv ch' xs
in dch' : doinv dch' invs
| 607
|
findInversions :: IntSet -> [IntSet]
findInversions dch =
let dch' = compactChord dch
invs = take (IS.size dch' - 1) [1..]
nextinv is = IS.insert newmin is' where
oldmin = IS.findMin is
is' = IS.delete oldmin is
newmin = oldmin + 12
doinv _ [] = []
doinv ch (x:xs) = let ch' = nextinv ch in ch' : doinv ch' xs
in dch' : doinv dch' invs
| 388
|
findInversions dch =
let dch' = compactChord dch
invs = take (IS.size dch' - 1) [1..]
nextinv is = IS.insert newmin is' where
oldmin = IS.findMin is
is' = IS.delete oldmin is
newmin = oldmin + 12
doinv _ [] = []
doinv ch (x:xs) = let ch' = nextinv ch in ch' : doinv ch' xs
in dch' : doinv dch' invs
| 351
| true
| true
| 0
| 13
| 163
| 174
| 87
| 87
| null | null |
tamarin-prover/tamarin-prover
|
lib/term/src/Term/Term.hs
|
gpl-3.0
|
allProtSubterms _ = []
| 58
|
allProtSubterms _ = []
| 58
|
allProtSubterms _ = []
| 58
| false
| false
| 0
| 5
| 39
| 12
| 5
| 7
| null | null |
gregsymons/learn-you-a-haskell
|
chapter-3.hs
|
apache-2.0
|
-- multiple inlined lets should be separated by semicolons:
inlinedLets = (let a = 100; b = 200; c = 300 in a*b*c, let foo = "Hey "; bar = "there!" in foo ++ bar)
| 163
|
inlinedLets = (let a = 100; b = 200; c = 300 in a*b*c, let foo = "Hey "; bar = "there!" in foo ++ bar)
| 102
|
inlinedLets = (let a = 100; b = 200; c = 300 in a*b*c, let foo = "Hey "; bar = "there!" in foo ++ bar)
| 102
| true
| false
| 1
| 10
| 35
| 69
| 36
| 33
| null | null |
triplepointfive/battleship
|
src/Warships/Types.hs
|
bsd-3-clause
|
act :: PlayerAction -> State Repository PlayerResponse
act NewGame = do
(gameID, game) <- startNewGame
return $ GameJoined (Credentials (Player1, gameID)) game
| 163
|
act :: PlayerAction -> State Repository PlayerResponse
act NewGame = do
(gameID, game) <- startNewGame
return $ GameJoined (Credentials (Player1, gameID)) game
| 163
|
act NewGame = do
(gameID, game) <- startNewGame
return $ GameJoined (Credentials (Player1, gameID)) game
| 108
| false
| true
| 0
| 11
| 25
| 64
| 31
| 33
| null | null |
agentm/project-m36
|
test/TutorialD/InterpreterTest.hs
|
unlicense
|
testListConstructedAtom :: Test
testListConstructedAtom = TestCase $ do
(sessionId, dbconn) <- dateExamplesConnection emptyNotificationCallback
executeTutorialD sessionId dbconn "x:=relation{tuple{l Cons 4 (Cons 5 Empty)}}"
let err1 = "ConstructedAtomArgumentCountMismatchError 2 1"
expectTutorialDErr sessionId dbconn (T.isPrefixOf err1) "z:=relation{tuple{l Cons 4}}"
let err2 = "TypeConstructorAtomTypeMismatch \"List\" IntegerAtomType"
expectTutorialDErr sessionId dbconn (T.isPrefixOf err2) "z:=relation{tuple{l Cons 4 5}}"
| 540
|
testListConstructedAtom :: Test
testListConstructedAtom = TestCase $ do
(sessionId, dbconn) <- dateExamplesConnection emptyNotificationCallback
executeTutorialD sessionId dbconn "x:=relation{tuple{l Cons 4 (Cons 5 Empty)}}"
let err1 = "ConstructedAtomArgumentCountMismatchError 2 1"
expectTutorialDErr sessionId dbconn (T.isPrefixOf err1) "z:=relation{tuple{l Cons 4}}"
let err2 = "TypeConstructorAtomTypeMismatch \"List\" IntegerAtomType"
expectTutorialDErr sessionId dbconn (T.isPrefixOf err2) "z:=relation{tuple{l Cons 4 5}}"
| 540
|
testListConstructedAtom = TestCase $ do
(sessionId, dbconn) <- dateExamplesConnection emptyNotificationCallback
executeTutorialD sessionId dbconn "x:=relation{tuple{l Cons 4 (Cons 5 Empty)}}"
let err1 = "ConstructedAtomArgumentCountMismatchError 2 1"
expectTutorialDErr sessionId dbconn (T.isPrefixOf err1) "z:=relation{tuple{l Cons 4}}"
let err2 = "TypeConstructorAtomTypeMismatch \"List\" IntegerAtomType"
expectTutorialDErr sessionId dbconn (T.isPrefixOf err2) "z:=relation{tuple{l Cons 4 5}}"
| 508
| false
| true
| 0
| 11
| 62
| 99
| 46
| 53
| null | null |
a143753/AOJ
|
2944.hs
|
apache-2.0
|
([0,0]:_) = []
| 14
|
([0,0]:_) = []
| 14
|
([0,0]:_) = []
| 14
| false
| false
| 0
| 7
| 2
| 22
| 12
| 10
| null | null |
typelead/epm
|
Cabal/Distribution/PackageDescription/Check.hs
|
bsd-3-clause
|
repoTypeDirname SVN = [".svn"]
| 37
|
repoTypeDirname SVN = [".svn"]
| 37
|
repoTypeDirname SVN = [".svn"]
| 37
| false
| false
| 0
| 5
| 10
| 12
| 6
| 6
| null | null |
sherwoodwang/wxHaskell
|
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
|
lgpl-2.1
|
wxSTC_HBA_COMMENTLINE :: Int
wxSTC_HBA_COMMENTLINE = 82
| 55
|
wxSTC_HBA_COMMENTLINE :: Int
wxSTC_HBA_COMMENTLINE = 82
| 55
|
wxSTC_HBA_COMMENTLINE = 82
| 26
| false
| true
| 0
| 6
| 5
| 18
| 7
| 11
| null | null |
kwrooijen/sdl-game
|
End/Header/Tile.hs
|
gpl-3.0
|
getColl 30 = Rect 8 8 16 16
| 29
|
getColl 30 = Rect 8 8 16 16
| 29
|
getColl 30 = Rect 8 8 16 16
| 29
| false
| false
| 0
| 5
| 9
| 18
| 8
| 10
| null | null |
bergmannf/gitit
|
src/Network/Gitit/ContentTransformer.hs
|
gpl-2.0
|
-- | Responds with highlighted source code in a wiki
-- page template. Uses the cache when possible and
-- caches the rendered page when appropriate.
highlightRawSource :: ContentTransformer Response
highlightRawSource =
cachedHtml `mplus`
(updateLayout (\l -> l { pgTabs = [ViewTab,HistoryTab] }) >>
rawContents >>=
highlightSource >>=
applyWikiTemplate >>=
cacheHtml)
| 396
|
highlightRawSource :: ContentTransformer Response
highlightRawSource =
cachedHtml `mplus`
(updateLayout (\l -> l { pgTabs = [ViewTab,HistoryTab] }) >>
rawContents >>=
highlightSource >>=
applyWikiTemplate >>=
cacheHtml)
| 245
|
highlightRawSource =
cachedHtml `mplus`
(updateLayout (\l -> l { pgTabs = [ViewTab,HistoryTab] }) >>
rawContents >>=
highlightSource >>=
applyWikiTemplate >>=
cacheHtml)
| 195
| true
| true
| 0
| 16
| 77
| 67
| 39
| 28
| null | null |
frantisekfarka/ghc-dsi
|
compiler/codeGen/StgCmmPrim.hs
|
bsd-3-clause
|
emitPrimOp dflags res ReadByteArrayOp_StablePtr args = doIndexByteArrayOp Nothing (bWord dflags) res args
| 114
|
emitPrimOp dflags res ReadByteArrayOp_StablePtr args = doIndexByteArrayOp Nothing (bWord dflags) res args
| 114
|
emitPrimOp dflags res ReadByteArrayOp_StablePtr args = doIndexByteArrayOp Nothing (bWord dflags) res args
| 114
| false
| false
| 0
| 7
| 20
| 34
| 14
| 20
| null | null |
smaccm/capDL-tool
|
CapDL/PrintC.hs
|
bsd-2-clause
|
showCap _ x _ _ _ = assert False $
"UNSUPPORTED CAP TYPE: " ++ show x
| 73
|
showCap _ x _ _ _ = assert False $
"UNSUPPORTED CAP TYPE: " ++ show x
| 73
|
showCap _ x _ _ _ = assert False $
"UNSUPPORTED CAP TYPE: " ++ show x
| 73
| false
| false
| 2
| 7
| 20
| 33
| 13
| 20
| null | null |
nevrenato/Hets_Fork
|
GMP/versioning/coloss-0.0.4/examples.segala.hs
|
gpl-2.0
|
phi2 :: L0; phi2 = dia 'i' (l (9%10) (dia 'o' tt))
| 50
|
phi2 :: L0
phi2 = dia 'i' (l (9%10) (dia 'o' tt))
| 49
|
phi2 = dia 'i' (l (9%10) (dia 'o' tt))
| 38
| false
| true
| 0
| 9
| 11
| 40
| 21
| 19
| null | null |
mcimini/Gradualizer
|
FinalType.hs
|
mit
|
outputsOrInputs :: String -> Rule -> [Term]
outputsOrInputs io (Rule premises conclusion) = concat (map (outputsList_prem io) premises) ++ outputsList_prem (inverse io) conclusion where inverse = \s -> if s == "inputs" then "outputs" else "inputs"
| 247
|
outputsOrInputs :: String -> Rule -> [Term]
outputsOrInputs io (Rule premises conclusion) = concat (map (outputsList_prem io) premises) ++ outputsList_prem (inverse io) conclusion where inverse = \s -> if s == "inputs" then "outputs" else "inputs"
| 247
|
outputsOrInputs io (Rule premises conclusion) = concat (map (outputsList_prem io) premises) ++ outputsList_prem (inverse io) conclusion where inverse = \s -> if s == "inputs" then "outputs" else "inputs"
| 203
| false
| true
| 0
| 10
| 35
| 97
| 48
| 49
| null | null |
Bolt64/wyas
|
src/DataTypes.hs
|
mit
|
showError (NumArgs expected found) = "Expected " ++ (show expected) ++ " args: found values " ++ (showCleanList found)
| 118
|
showError (NumArgs expected found) = "Expected " ++ (show expected) ++ " args: found values " ++ (showCleanList found)
| 118
|
showError (NumArgs expected found) = "Expected " ++ (show expected) ++ " args: found values " ++ (showCleanList found)
| 118
| false
| false
| 0
| 9
| 18
| 42
| 20
| 22
| null | null |
GaloisInc/cryfsm
|
Cryptol/FSM.hs
|
bsd-3-clause
|
getExprBuilderParams :: ModuleM ExprBuilderParams
getExprBuilderParams = do
-- TODO: this is a terrible hack; all we really want is a fresh name and
-- there has to be a better way to get one
(TC.EAbs x _ _, _) <- checkExpr cryptolId
pm <- getPrimMap
let [true, false, cat, neq, and, or] = TC.ePrim pm . packIdent <$> ["True", "False", "#", "!=", "&&", "||"]
return (ExprBuilderParams x true false cat neq and or)
| 437
|
getExprBuilderParams :: ModuleM ExprBuilderParams
getExprBuilderParams = do
-- TODO: this is a terrible hack; all we really want is a fresh name and
-- there has to be a better way to get one
(TC.EAbs x _ _, _) <- checkExpr cryptolId
pm <- getPrimMap
let [true, false, cat, neq, and, or] = TC.ePrim pm . packIdent <$> ["True", "False", "#", "!=", "&&", "||"]
return (ExprBuilderParams x true false cat neq and or)
| 437
|
getExprBuilderParams = do
-- TODO: this is a terrible hack; all we really want is a fresh name and
-- there has to be a better way to get one
(TC.EAbs x _ _, _) <- checkExpr cryptolId
pm <- getPrimMap
let [true, false, cat, neq, and, or] = TC.ePrim pm . packIdent <$> ["True", "False", "#", "!=", "&&", "||"]
return (ExprBuilderParams x true false cat neq and or)
| 387
| false
| true
| 0
| 13
| 96
| 131
| 69
| 62
| null | null |
vTurbine/ghc
|
compiler/basicTypes/DataCon.hs
|
bsd-3-clause
|
-- | Substitute in an 'EqSpec'. Precondition: if the LHS of the EqSpec
-- is mapped in the substitution, it is mapped to a type variable, not
-- a full type.
substEqSpec :: TCvSubst -> EqSpec -> EqSpec
substEqSpec subst (EqSpec tv ty)
= EqSpec tv' (substTy subst ty)
where
tv' = getTyVar "substEqSpec" (substTyVar subst tv)
-- | Filter out any TyBinders mentioned in an EqSpec
| 385
|
substEqSpec :: TCvSubst -> EqSpec -> EqSpec
substEqSpec subst (EqSpec tv ty)
= EqSpec tv' (substTy subst ty)
where
tv' = getTyVar "substEqSpec" (substTyVar subst tv)
-- | Filter out any TyBinders mentioned in an EqSpec
| 227
|
substEqSpec subst (EqSpec tv ty)
= EqSpec tv' (substTy subst ty)
where
tv' = getTyVar "substEqSpec" (substTyVar subst tv)
-- | Filter out any TyBinders mentioned in an EqSpec
| 183
| true
| true
| 0
| 7
| 75
| 70
| 36
| 34
| null | null |
natepisarski/Tables
|
Tables1.hs
|
bsd-3-clause
|
main = do
(file:command:table:_) <- getArgs
lines <- filelines file
let allTables = tables lines
case command of
"create" -> createT file table
"read" -> readT file table
"delete" -> deleteT file table
"list" -> mapM_ putStrLn $ map fst (tables lines)
_ -> mapM_ putStrLn $ map show (tables lines)
--create :: String -> String -> IO ()
| 365
|
main = do
(file:command:table:_) <- getArgs
lines <- filelines file
let allTables = tables lines
case command of
"create" -> createT file table
"read" -> readT file table
"delete" -> deleteT file table
"list" -> mapM_ putStrLn $ map fst (tables lines)
_ -> mapM_ putStrLn $ map show (tables lines)
--create :: String -> String -> IO ()
| 365
|
main = do
(file:command:table:_) <- getArgs
lines <- filelines file
let allTables = tables lines
case command of
"create" -> createT file table
"read" -> readT file table
"delete" -> deleteT file table
"list" -> mapM_ putStrLn $ map fst (tables lines)
_ -> mapM_ putStrLn $ map show (tables lines)
--create :: String -> String -> IO ()
| 365
| false
| false
| 0
| 13
| 88
| 139
| 64
| 75
| null | null |
bredelings/BAli-Phy
|
haskell/Prelude.hs
|
gpl-2.0
|
zip' = zipWith' (,)
| 19
|
zip' = zipWith' (,)
| 19
|
zip' = zipWith' (,)
| 19
| false
| false
| 0
| 6
| 3
| 12
| 6
| 6
| null | null |
tjakway/ghcjvm
|
compiler/cmm/CLabel.hs
|
bsd-3-clause
|
mkTopTickyCtrLabel = CmmLabel rtsUnitId (fsLit "top_ct") CmmData
| 92
|
mkTopTickyCtrLabel = CmmLabel rtsUnitId (fsLit "top_ct") CmmData
| 92
|
mkTopTickyCtrLabel = CmmLabel rtsUnitId (fsLit "top_ct") CmmData
| 92
| false
| false
| 0
| 7
| 34
| 19
| 9
| 10
| null | null |
olsner/ghc
|
compiler/types/CoAxiom.hs
|
bsd-3-clause
|
coAxiomNumPats :: CoAxiom br -> Int
coAxiomNumPats = length . coAxBranchLHS . (flip coAxiomNthBranch 0)
| 103
|
coAxiomNumPats :: CoAxiom br -> Int
coAxiomNumPats = length . coAxBranchLHS . (flip coAxiomNthBranch 0)
| 103
|
coAxiomNumPats = length . coAxBranchLHS . (flip coAxiomNthBranch 0)
| 67
| false
| true
| 2
| 7
| 14
| 43
| 18
| 25
| null | null |
josefs/autosar
|
ARSim/arsim/AUTOSAR/ARSim.hs
|
bsd-3-clause
|
hear conn (DELTA d) (Run b 0.0 act n m s _) = Unchanged
| 69
|
hear conn (DELTA d) (Run b 0.0 act n m s _) = Unchanged
| 69
|
hear conn (DELTA d) (Run b 0.0 act n m s _) = Unchanged
| 69
| false
| false
| 1
| 7
| 27
| 41
| 18
| 23
| null | null |
mattias-lundell/timber-llvm
|
src/Syntax.hs
|
bsd-3-clause
|
isSBind _ = False
| 39
|
isSBind _ = False
| 39
|
isSBind _ = False
| 39
| false
| false
| 0
| 5
| 25
| 9
| 4
| 5
| null | null |
brendanhay/gogol
|
gogol-shopping-content/gen/Network/Google/Resource/Content/LiaSettings/Update.hs
|
mpl-2.0
|
-- | Multipart request metadata.
lsuPayload :: Lens' LiaSettingsUpdate LiaSettings
lsuPayload
= lens _lsuPayload (\ s a -> s{_lsuPayload = a})
| 144
|
lsuPayload :: Lens' LiaSettingsUpdate LiaSettings
lsuPayload
= lens _lsuPayload (\ s a -> s{_lsuPayload = a})
| 111
|
lsuPayload
= lens _lsuPayload (\ s a -> s{_lsuPayload = a})
| 61
| true
| true
| 0
| 9
| 22
| 42
| 22
| 20
| null | null |
rsasse/tamarin-prover
|
lib/theory/src/Theory/Tools/EquationStore.hs
|
gpl-3.0
|
simpAbstractSortedVar :: MonadFresh m
=> [LNSubstVFresh]
-> m (Maybe (Maybe LNSubst, [S.Set LNSubstVFresh]))
simpAbstractSortedVar [] = return Nothing
| 206
|
simpAbstractSortedVar :: MonadFresh m
=> [LNSubstVFresh]
-> m (Maybe (Maybe LNSubst, [S.Set LNSubstVFresh]))
simpAbstractSortedVar [] = return Nothing
| 206
|
simpAbstractSortedVar [] = return Nothing
| 53
| false
| true
| 0
| 13
| 73
| 59
| 29
| 30
| null | null |
MegaShow/college-programming
|
Homework/Haskell Function Programming/MyPicture.hs
|
mit
|
w = ["W W",
"W W W",
"W W W",
"WW WW",
"W W"]
| 69
|
w = ["W W",
"W W W",
"W W W",
"WW WW",
"W W"]
| 69
|
w = ["W W",
"W W W",
"W W W",
"WW WW",
"W W"]
| 69
| false
| false
| 1
| 5
| 37
| 24
| 13
| 11
| null | null |
DavidAlphaFox/darcs
|
harness/Darcs/Test/Patch/V1Model.hs
|
gpl-2.0
|
content2lbs :: Content -> BL.ByteString
content2lbs = BLC.unlines . map bs2lbs
| 78
|
content2lbs :: Content -> BL.ByteString
content2lbs = BLC.unlines . map bs2lbs
| 78
|
content2lbs = BLC.unlines . map bs2lbs
| 38
| false
| true
| 0
| 6
| 10
| 26
| 13
| 13
| null | null |
mrkkrp/parsec
|
Text/Parsec/Char.hs
|
bsd-2-clause
|
-- | Parses an upper case letter (a character between \'A\' and \'Z\').
-- Returns the parsed character.
upper :: (Stream s m Char) => ParsecT s u m Char
upper = satisfy isUpper <?> "uppercase letter"
| 222
|
upper :: (Stream s m Char) => ParsecT s u m Char
upper = satisfy isUpper <?> "uppercase letter"
| 115
|
upper = satisfy isUpper <?> "uppercase letter"
| 66
| true
| true
| 0
| 6
| 58
| 46
| 23
| 23
| null | null |
ctford/Idris-Elba-dev
|
src/Idris/REPL.hs
|
bsd-3-clause
|
ideslaveProcess fn (HNF t) = process stdout fn (HNF t)
| 54
|
ideslaveProcess fn (HNF t) = process stdout fn (HNF t)
| 54
|
ideslaveProcess fn (HNF t) = process stdout fn (HNF t)
| 54
| false
| false
| 0
| 7
| 9
| 30
| 14
| 16
| null | null |
peti/funcmp
|
FMP/Resolve.hs
|
gpl-3.0
|
symNumeric (n, m, s) (NumericVar name)
= insertNumeric (n, m, s) name
| 100
|
symNumeric (n, m, s) (NumericVar name)
= insertNumeric (n, m, s) name
| 100
|
symNumeric (n, m, s) (NumericVar name)
= insertNumeric (n, m, s) name
| 100
| false
| false
| 0
| 7
| 42
| 40
| 22
| 18
| null | null |
Ragnaroek/orwell
|
src/Orwell/Analyse.hs
|
gpl-3.0
|
printBugfixesWithoutTest = printWithoutTestOfType BUGFIX
| 56
|
printBugfixesWithoutTest = printWithoutTestOfType BUGFIX
| 56
|
printBugfixesWithoutTest = printWithoutTestOfType BUGFIX
| 56
| false
| false
| 0
| 5
| 3
| 9
| 4
| 5
| null | null |
fhaust/bitcoin
|
src/Bitcoin/Crypto.hs
|
mit
|
secp256k1BasePoint = ECDSA.Point gx gy
where gx = 0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798
gy = 0x483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8
| 198
|
secp256k1BasePoint = ECDSA.Point gx gy
where gx = 0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798
gy = 0x483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8
| 198
|
secp256k1BasePoint = ECDSA.Point gx gy
where gx = 0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798
gy = 0x483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8
| 198
| false
| false
| 1
| 6
| 21
| 28
| 13
| 15
| null | null |
ml9951/ghc
|
compiler/nativeGen/PPC/Ppr.hs
|
bsd-3-clause
|
pprInstr (UPDATE_SP fmt amount)
= sdocWithPlatform $ \platform ->
let tmp = tmpReg platform in
vcat [
pprInstr (LD fmt r0 (AddrRegImm sp (ImmInt 0))),
pprInstr (ADDIS tmp sp (HA amount)),
pprInstr (ADD tmp tmp (RIImm (LO amount))),
pprInstr (STU fmt r0 (AddrRegReg sp tmp))
]
| 347
|
pprInstr (UPDATE_SP fmt amount)
= sdocWithPlatform $ \platform ->
let tmp = tmpReg platform in
vcat [
pprInstr (LD fmt r0 (AddrRegImm sp (ImmInt 0))),
pprInstr (ADDIS tmp sp (HA amount)),
pprInstr (ADD tmp tmp (RIImm (LO amount))),
pprInstr (STU fmt r0 (AddrRegReg sp tmp))
]
| 347
|
pprInstr (UPDATE_SP fmt amount)
= sdocWithPlatform $ \platform ->
let tmp = tmpReg platform in
vcat [
pprInstr (LD fmt r0 (AddrRegImm sp (ImmInt 0))),
pprInstr (ADDIS tmp sp (HA amount)),
pprInstr (ADD tmp tmp (RIImm (LO amount))),
pprInstr (STU fmt r0 (AddrRegReg sp tmp))
]
| 347
| false
| false
| 0
| 12
| 117
| 148
| 72
| 76
| null | null |
thomasdziedzic/hs-spotify
|
server/Server.hs
|
mit
|
process_action _ (A.Stop session) = do
-- TODO handle errors
_ <- sessionPlayerPlay session False
return ()
| 119
|
process_action _ (A.Stop session) = do
-- TODO handle errors
_ <- sessionPlayerPlay session False
return ()
| 119
|
process_action _ (A.Stop session) = do
-- TODO handle errors
_ <- sessionPlayerPlay session False
return ()
| 119
| false
| false
| 0
| 8
| 28
| 40
| 18
| 22
| null | null |
olsner/ghc
|
ghc/Main.hs
|
bsd-3-clause
|
showGhciUsageMode = mkPreLoadMode ShowGhciUsage
| 47
|
showGhciUsageMode = mkPreLoadMode ShowGhciUsage
| 47
|
showGhciUsageMode = mkPreLoadMode ShowGhciUsage
| 47
| false
| false
| 0
| 5
| 3
| 9
| 4
| 5
| null | null |
ddrake/finite-fields
|
polynomials.hs
|
mit
|
-- All polynomials of degree 2 or lower over Z5
coeff53 :: [[Int]]
coeff53 = [[x,y,z] | x <- [0..4], y <- [0..4], z <- [0..4]]
| 126
|
coeff53 :: [[Int]]
coeff53 = [[x,y,z] | x <- [0..4], y <- [0..4], z <- [0..4]]
| 78
|
coeff53 = [[x,y,z] | x <- [0..4], y <- [0..4], z <- [0..4]]
| 59
| true
| true
| 0
| 8
| 25
| 69
| 40
| 29
| null | null |
Solonarv/TicTacToe
|
TicTacToe.hs
|
mit
|
-- returns either a singleton list or []
joinPlayers :: [Player] -> [Player]
joinPlayers [x, y, z] | x == y && y == z = [x]
| 123
|
joinPlayers :: [Player] -> [Player]
joinPlayers [x, y, z] | x == y && y == z = [x]
| 82
|
joinPlayers [x, y, z] | x == y && y == z = [x]
| 46
| true
| true
| 0
| 10
| 26
| 55
| 30
| 25
| null | null |
romanb/amazonka
|
amazonka-glacier/gen/Network/AWS/Glacier/Types.hs
|
mpl-2.0
|
dataRetrievalPolicy :: DataRetrievalPolicy
dataRetrievalPolicy = DataRetrievalPolicy
{ _drpRules = mempty
}
| 115
|
dataRetrievalPolicy :: DataRetrievalPolicy
dataRetrievalPolicy = DataRetrievalPolicy
{ _drpRules = mempty
}
| 115
|
dataRetrievalPolicy = DataRetrievalPolicy
{ _drpRules = mempty
}
| 72
| false
| true
| 0
| 7
| 18
| 29
| 13
| 16
| null | null |
rueshyna/gogol
|
gogol-sqladmin/gen/Network/Google/SQLAdmin/Types/Product.hs
|
mpl-2.0
|
-- | This is always sql#sslCertsInsert.
scirKind :: Lens' SSLCertsInsertResponse Text
scirKind = lens _scirKind (\ s a -> s{_scirKind = a})
| 139
|
scirKind :: Lens' SSLCertsInsertResponse Text
scirKind = lens _scirKind (\ s a -> s{_scirKind = a})
| 99
|
scirKind = lens _scirKind (\ s a -> s{_scirKind = a})
| 53
| true
| true
| 1
| 9
| 21
| 45
| 22
| 23
| null | null |
ekmett/data-store
|
tests/Test/Data/Store01.hs
|
bsd-3-clause
|
sPersonAge :: Proxy (PersonStoreTag, I.S (I.S I.Z))
sPersonAge = Proxy
| 70
|
sPersonAge :: Proxy (PersonStoreTag, I.S (I.S I.Z))
sPersonAge = Proxy
| 70
|
sPersonAge = Proxy
| 18
| false
| true
| 0
| 10
| 9
| 35
| 18
| 17
| null | null |
themoritz/cabal
|
Cabal/Distribution/Types/Condition.hs
|
bsd-3-clause
|
cOr c (CNot d)
| c == d = Lit True
| 65
|
cOr c (CNot d)
| c == d = Lit True
| 65
|
cOr c (CNot d)
| c == d = Lit True
| 65
| false
| false
| 0
| 8
| 41
| 30
| 13
| 17
| null | null |
forsyde/forsyde-atom
|
src/ForSyDe/Atom/MoC/DE/React/Lib.hs
|
bsd-3-clause
|
b4s3 s1 s2 s3 = syncAndFill3 ([],[],[]) (b4s1 s1) (b4s1 s2) (b4s1 s3)
| 69
|
b4s3 s1 s2 s3 = syncAndFill3 ([],[],[]) (b4s1 s1) (b4s1 s2) (b4s1 s3)
| 69
|
b4s3 s1 s2 s3 = syncAndFill3 ([],[],[]) (b4s1 s1) (b4s1 s2) (b4s1 s3)
| 69
| false
| false
| 0
| 7
| 12
| 55
| 28
| 27
| null | null |
sherwoodwang/wxHaskell
|
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
|
lgpl-2.1
|
wxDB_GRANT_DELETE :: Int
wxDB_GRANT_DELETE = 8
| 46
|
wxDB_GRANT_DELETE :: Int
wxDB_GRANT_DELETE = 8
| 46
|
wxDB_GRANT_DELETE = 8
| 21
| false
| true
| 0
| 6
| 5
| 18
| 7
| 11
| null | null |
dahlia/nirum
|
src/Nirum/Docs/ReStructuredText.hs
|
gpl-3.0
|
indent4 :: ReStructuredText -> ReStructuredText
indent4 = indent " "
| 71
|
indent4 :: ReStructuredText -> ReStructuredText
indent4 = indent " "
| 71
|
indent4 = indent " "
| 23
| false
| true
| 0
| 7
| 12
| 25
| 10
| 15
| null | null |
notogawa/fluent-logger-conduit
|
Network/Fluent/Conduit.hs
|
apache-2.0
|
-- | Stream all incoming pair ( label, data ) to the given Fluent logger.
--
-- Since 0.3.0.0
--
sinkFluentWithLogger :: (MonadResource m, Packable a) => FluentLogger -> Consumer (ByteString, a) m ()
sinkFluentWithLogger logger = awaitForever $ liftIO . uncurry (post logger)
| 275
|
sinkFluentWithLogger :: (MonadResource m, Packable a) => FluentLogger -> Consumer (ByteString, a) m ()
sinkFluentWithLogger logger = awaitForever $ liftIO . uncurry (post logger)
| 178
|
sinkFluentWithLogger logger = awaitForever $ liftIO . uncurry (post logger)
| 75
| true
| true
| 0
| 8
| 43
| 69
| 37
| 32
| null | null |
hvr/ansi-wl-pprint
|
Text/PrettyPrint/ANSI/Leijen.hs
|
bsd-2-clause
|
-- | Displays a document with the dull white backcolor
ondullwhite :: Doc -> Doc
(onblack, ondullblack) = oncolorFunctions Black
| 132
|
ondullwhite :: Doc -> Doc
(onblack, ondullblack) = oncolorFunctions Black
| 77
|
(onblack, ondullblack) = oncolorFunctions Black
| 51
| true
| true
| 0
| 5
| 23
| 26
| 14
| 12
| null | null |
mightymoose/liquidhaskell
|
benchmarks/text-0.11.2.3/Data/Text/Fusion.hs
|
bsd-3-clause
|
-------------------------------------------------------------------------------
-- ** Indexing streams
-- | /O(n)/ stream index (subscript) operator, starting from 0.
index :: Stream Char -> Int -> Char
index = S.indexI
| 220
|
index :: Stream Char -> Int -> Char
index = S.indexI
| 52
|
index = S.indexI
| 16
| true
| true
| 0
| 8
| 26
| 34
| 16
| 18
| null | null |
martine/gat
|
Pager.hs
|
gpl-2.0
|
-- | Run an IO action with its output paged through less.
-- stdout is hosed after this point, so it's best to wrap your entire
-- program with redirectThroughLess.
redirectThroughPager :: CaughtMonadIO m => m () -> m ()
redirectThroughPager action = do
pid <- liftIO $ do
(rd, wr) <- createPipe
pid <- forkProcess $ do
dupTo rd 0
closeFd rd
closeFd wr
executeFile "less" True ["-FRX"] Nothing
closeFd rd
dupTo wr 1
closeFd wr
return pid
action `gcatch` (\e -> liftIO $ print e >> return ())
liftIO $ do
hFlush stdout
closeFd 1
getProcessStatus {- hang -} True {- untraced -} False pid
return ()
| 669
|
redirectThroughPager :: CaughtMonadIO m => m () -> m ()
redirectThroughPager action = do
pid <- liftIO $ do
(rd, wr) <- createPipe
pid <- forkProcess $ do
dupTo rd 0
closeFd rd
closeFd wr
executeFile "less" True ["-FRX"] Nothing
closeFd rd
dupTo wr 1
closeFd wr
return pid
action `gcatch` (\e -> liftIO $ print e >> return ())
liftIO $ do
hFlush stdout
closeFd 1
getProcessStatus {- hang -} True {- untraced -} False pid
return ()
| 504
|
redirectThroughPager action = do
pid <- liftIO $ do
(rd, wr) <- createPipe
pid <- forkProcess $ do
dupTo rd 0
closeFd rd
closeFd wr
executeFile "less" True ["-FRX"] Nothing
closeFd rd
dupTo wr 1
closeFd wr
return pid
action `gcatch` (\e -> liftIO $ print e >> return ())
liftIO $ do
hFlush stdout
closeFd 1
getProcessStatus {- hang -} True {- untraced -} False pid
return ()
| 448
| true
| true
| 0
| 16
| 182
| 211
| 93
| 118
| null | null |
a143753/AOJ
|
0346.hs
|
apache-2.0
|
main = do
l <- getLine
let [i1,i2,i3,i4,i5,i6,i7,i8,i9,i10,i11,i12] = sort $ map read $ words l :: [Int]
j1 = i1 == i2 && i1 == i3 && i1 == i4
j2 = i5 == i6 && i5 == i7 && i5 == i8
j3 = i9 == i10&& i9 == i11&& i9 == i12
re = if j1 && j2 && j3
then "yes"
else "no"
putStrLn re
| 327
|
main = do
l <- getLine
let [i1,i2,i3,i4,i5,i6,i7,i8,i9,i10,i11,i12] = sort $ map read $ words l :: [Int]
j1 = i1 == i2 && i1 == i3 && i1 == i4
j2 = i5 == i6 && i5 == i7 && i5 == i8
j3 = i9 == i10&& i9 == i11&& i9 == i12
re = if j1 && j2 && j3
then "yes"
else "no"
putStrLn re
| 327
|
main = do
l <- getLine
let [i1,i2,i3,i4,i5,i6,i7,i8,i9,i10,i11,i12] = sort $ map read $ words l :: [Int]
j1 = i1 == i2 && i1 == i3 && i1 == i4
j2 = i5 == i6 && i5 == i7 && i5 == i8
j3 = i9 == i10&& i9 == i11&& i9 == i12
re = if j1 && j2 && j3
then "yes"
else "no"
putStrLn re
| 327
| false
| false
| 0
| 14
| 120
| 181
| 97
| 84
| null | null |
swift-nav/plover
|
src/Language/Plover/SemCheck.hs
|
mit
|
reconcileBindings :: DefBinding -> DefBinding -> SemChecker ()
reconcileBindings oldDef newDef | isImported oldDef || isImported newDef = do
semAssert (isImported oldDef && isImported newDef) $
SemError rtag "Cannot redefine imported symbol."
semAssert (imported oldDef == imported newDef) $
SemError rtag "Different modules may not define the same symbol."
let newDef' = oldDef { static = static oldDef && static newDef }
v = binding newDef'
modify $ \state -> state { globalBindings = M.insert v newDef' (globalBindings state) }
where rtag = MergeTags [bindingPos oldDef, bindingPos newDef]
| 616
|
reconcileBindings :: DefBinding -> DefBinding -> SemChecker ()
reconcileBindings oldDef newDef | isImported oldDef || isImported newDef = do
semAssert (isImported oldDef && isImported newDef) $
SemError rtag "Cannot redefine imported symbol."
semAssert (imported oldDef == imported newDef) $
SemError rtag "Different modules may not define the same symbol."
let newDef' = oldDef { static = static oldDef && static newDef }
v = binding newDef'
modify $ \state -> state { globalBindings = M.insert v newDef' (globalBindings state) }
where rtag = MergeTags [bindingPos oldDef, bindingPos newDef]
| 616
|
reconcileBindings oldDef newDef | isImported oldDef || isImported newDef = do
semAssert (isImported oldDef && isImported newDef) $
SemError rtag "Cannot redefine imported symbol."
semAssert (imported oldDef == imported newDef) $
SemError rtag "Different modules may not define the same symbol."
let newDef' = oldDef { static = static oldDef && static newDef }
v = binding newDef'
modify $ \state -> state { globalBindings = M.insert v newDef' (globalBindings state) }
where rtag = MergeTags [bindingPos oldDef, bindingPos newDef]
| 553
| false
| true
| 1
| 14
| 111
| 201
| 91
| 110
| null | null |
Marwes/haskell-compiler
|
Prelude.hs
|
mit
|
map :: (a -> b) -> [a] -> [b]
map f (y:ys) = f y : map f ys
| 59
|
map :: (a -> b) -> [a] -> [b]
map f (y:ys) = f y : map f ys
| 59
|
map f (y:ys) = f y : map f ys
| 29
| false
| true
| 0
| 7
| 18
| 61
| 30
| 31
| null | null |
anttisalonen/economics
|
src/Curve.hs
|
mit
|
curveToPol' (ExponentialFunction a b c) = [(b, a), (c, 0)]
| 58
|
curveToPol' (ExponentialFunction a b c) = [(b, a), (c, 0)]
| 58
|
curveToPol' (ExponentialFunction a b c) = [(b, a), (c, 0)]
| 58
| false
| false
| 0
| 7
| 9
| 37
| 21
| 16
| null | null |
44534/reducerabinpairs
|
src/Reduce.hs
|
gpl-3.0
|
-- | only works for automata where all final sets are singletons
toSDRA :: Show q => DRA q a l -> SingletonDRA q a l
toSDRA dra = dra {accept = toSingletonRabinpair <$> accept dra }
| 182
|
toSDRA :: Show q => DRA q a l -> SingletonDRA q a l
toSDRA dra = dra {accept = toSingletonRabinpair <$> accept dra }
| 117
|
toSDRA dra = dra {accept = toSingletonRabinpair <$> accept dra }
| 65
| true
| true
| 0
| 9
| 37
| 63
| 29
| 34
| null | null |
AaronShiny/Bezier
|
src/Graphics/Bezier.hs
|
gpl-2.0
|
findBezierPoints1d :: [Point1d] -> [Point1d]
findBezierPoints1d ps = map (bezier1d ps) fluxions
| 95
|
findBezierPoints1d :: [Point1d] -> [Point1d]
findBezierPoints1d ps = map (bezier1d ps) fluxions
| 95
|
findBezierPoints1d ps = map (bezier1d ps) fluxions
| 50
| false
| true
| 0
| 7
| 11
| 35
| 18
| 17
| null | null |
mainland/nikola
|
src/Data/Vector/CUDA/Storable.hs
|
bsd-3-clause
|
unsafeTail = G.unsafeTail
| 25
|
unsafeTail = G.unsafeTail
| 25
|
unsafeTail = G.unsafeTail
| 25
| false
| false
| 0
| 5
| 2
| 8
| 4
| 4
| null | null |
sdiehl/ghc
|
compiler/utils/Dominators.hs
|
bsd-3-clause
|
-- dfnM :: Node -> Dom s Int
-- dfnM = fetch dfnE
ndfsM :: Int -> Dom s Node
ndfsM = fetch ndfsE
| 99
|
ndfsM :: Int -> Dom s Node
ndfsM = fetch ndfsE
| 46
|
ndfsM = fetch ndfsE
| 19
| true
| true
| 0
| 7
| 26
| 31
| 14
| 17
| null | null |
daewon/til
|
exercism/haskell/largest-series-product/src/Series.hs
|
mpl-2.0
|
toDigit '5' = Just 5
| 20
|
toDigit '5' = Just 5
| 20
|
toDigit '5' = Just 5
| 20
| false
| false
| 1
| 5
| 4
| 16
| 5
| 11
| null | null |
vTurbine/ghc
|
compiler/typecheck/TcRnTypes.hs
|
bsd-3-clause
|
exprCtOrigin (HsAppType (L _ e1) _) = exprCtOrigin e1
| 53
|
exprCtOrigin (HsAppType (L _ e1) _) = exprCtOrigin e1
| 53
|
exprCtOrigin (HsAppType (L _ e1) _) = exprCtOrigin e1
| 53
| false
| false
| 0
| 8
| 8
| 29
| 13
| 16
| null | null |
ennocramer/hindent
|
src/HIndent/Styles/Cramer.hs
|
bsd-3-clause
|
extType (TyFun _ from to) =
attemptSingleLineType (pretty from >> write " -> " >> pretty to)
(pretty from >> newline >> write "-> " >> pretty to)
| 171
|
extType (TyFun _ from to) =
attemptSingleLineType (pretty from >> write " -> " >> pretty to)
(pretty from >> newline >> write "-> " >> pretty to)
| 171
|
extType (TyFun _ from to) =
attemptSingleLineType (pretty from >> write " -> " >> pretty to)
(pretty from >> newline >> write "-> " >> pretty to)
| 171
| false
| false
| 0
| 10
| 53
| 68
| 31
| 37
| null | null |
joelmccracken/git-stuff
|
src/ShellUtil.hs
|
bsd-3-clause
|
expandGlob :: Text -> Tu.Shell Tu.Line
expandGlob glob =
let
script = "for f in " <> glob <> "; do echo $f; done"
in
Tu.inshell script Tu.empty
| 155
|
expandGlob :: Text -> Tu.Shell Tu.Line
expandGlob glob =
let
script = "for f in " <> glob <> "; do echo $f; done"
in
Tu.inshell script Tu.empty
| 155
|
expandGlob glob =
let
script = "for f in " <> glob <> "; do echo $f; done"
in
Tu.inshell script Tu.empty
| 116
| false
| true
| 0
| 10
| 39
| 53
| 25
| 28
| null | null |
Hodapp87/ivory
|
ivory-opts/src/Ivory/Opts/ConstFold.hs
|
bsd-3-clause
|
constFoldInits copies (I.InitArray i) = I.InitArray $ map (constFoldInits copies) i
| 83
|
constFoldInits copies (I.InitArray i) = I.InitArray $ map (constFoldInits copies) i
| 83
|
constFoldInits copies (I.InitArray i) = I.InitArray $ map (constFoldInits copies) i
| 83
| false
| false
| 0
| 8
| 10
| 36
| 17
| 19
| null | null |
hanshoglund/modulo
|
src/Language/Modulo/Rename.hs
|
gpl-3.0
|
qualify :: Module -> Name -> Name
qualify _ (QName _ _) = error "Name already qualified"
| 88
|
qualify :: Module -> Name -> Name
qualify _ (QName _ _) = error "Name already qualified"
| 88
|
qualify _ (QName _ _) = error "Name already qualified"
| 54
| false
| true
| 0
| 7
| 16
| 35
| 17
| 18
| null | null |
isaiah/cis194
|
src/Ch07.hs
|
mit
|
takeJ :: (Sized b, Monoid b) => Int -> JoinList b a -> JoinList b a
takeJ _ Empty = Empty
| 89
|
takeJ :: (Sized b, Monoid b) => Int -> JoinList b a -> JoinList b a
takeJ _ Empty = Empty
| 89
|
takeJ _ Empty = Empty
| 21
| false
| true
| 0
| 8
| 20
| 49
| 24
| 25
| null | null |
hbrouwer/pdrt-sandbox
|
tutorials/PDRSTutorial.hs
|
apache-2.0
|
examplePDRS7b = Linear examplePDRS4
| 35
|
examplePDRS7b = Linear examplePDRS4
| 35
|
examplePDRS7b = Linear examplePDRS4
| 35
| false
| false
| 0
| 5
| 3
| 9
| 4
| 5
| null | null |
itchyny/vim-haskell-indent
|
test/function/function_break_lines.in.hs
|
mit
|
g = f
| 5
|
g = f
| 5
|
g = f
| 5
| false
| false
| 1
| 5
| 2
| 10
| 3
| 7
| null | null |
micxjo/hs-advent
|
src/Advent/Day11.hs
|
bsd-3-clause
|
hasBadChar :: String -> Bool
hasBadChar str =
"i" `L.isInfixOf` str || "o" `L.isInfixOf` str || "l" `L.isInfixOf` str
| 119
|
hasBadChar :: String -> Bool
hasBadChar str =
"i" `L.isInfixOf` str || "o" `L.isInfixOf` str || "l" `L.isInfixOf` str
| 119
|
hasBadChar str =
"i" `L.isInfixOf` str || "o" `L.isInfixOf` str || "l" `L.isInfixOf` str
| 90
| false
| true
| 0
| 9
| 20
| 59
| 30
| 29
| null | null |
emk/haskell-probability-monads
|
examples/Probability.hs
|
bsd-3-clause
|
uniformAll :: (Dist d,Enum a,Bounded a) => d a
uniformAll = uniform allValues
| 77
|
uniformAll :: (Dist d,Enum a,Bounded a) => d a
uniformAll = uniform allValues
| 77
|
uniformAll = uniform allValues
| 30
| false
| true
| 0
| 6
| 12
| 38
| 19
| 19
| null | null |
vladimir-ipatov/ganeti
|
test/hs/Test/Ganeti/TestCommon.hs
|
gpl-2.0
|
genName :: Gen String
genName = do
n <- choose (1, 16)
dn <- vector n
return (map dnsGetChar dn)
-- | Generates an entire FQDN.
| 134
|
genName :: Gen String
genName = do
n <- choose (1, 16)
dn <- vector n
return (map dnsGetChar dn)
-- | Generates an entire FQDN.
| 134
|
genName = do
n <- choose (1, 16)
dn <- vector n
return (map dnsGetChar dn)
-- | Generates an entire FQDN.
| 112
| false
| true
| 0
| 10
| 32
| 61
| 27
| 34
| null | null |
Stulv/sudoku
|
src/SudokuCore.hs
|
bsd-3-clause
|
squareOf :: Position -> ([Int],[Int])
squareOf pos =
(colIndices,rowIndices)
where
[colIndices] = filter (\el -> elem (fst pos) el) squareIndices
[rowIndices] = filter (\el -> elem (snd pos) el) squareIndices
| 220
|
squareOf :: Position -> ([Int],[Int])
squareOf pos =
(colIndices,rowIndices)
where
[colIndices] = filter (\el -> elem (fst pos) el) squareIndices
[rowIndices] = filter (\el -> elem (snd pos) el) squareIndices
| 220
|
squareOf pos =
(colIndices,rowIndices)
where
[colIndices] = filter (\el -> elem (fst pos) el) squareIndices
[rowIndices] = filter (\el -> elem (snd pos) el) squareIndices
| 182
| false
| true
| 0
| 10
| 41
| 105
| 56
| 49
| null | null |
markus-git/imperative-edsl-vhdl
|
src/Language/Embedded/Hardware/Command/Backend/VHDL.hs
|
bsd-3-clause
|
unpackTerm e = lift e
| 21
|
unpackTerm e = lift e
| 21
|
unpackTerm e = lift e
| 21
| false
| false
| 1
| 5
| 4
| 15
| 5
| 10
| null | null |
verement/etamoo
|
src/MOO/Builtins/Values.hs
|
bsd-3-clause
|
bf_listappend = Builtin "listappend" 2 (Just 3)
[TLst, TAny, TInt] TLst $ \(Lst list : value : optional) ->
let [Int index] = defaults optional [Int $ fromIntegral $ Lst.length list]
in return $ Lst $ Lst.insert list (fromIntegral index) value
| 263
|
bf_listappend = Builtin "listappend" 2 (Just 3)
[TLst, TAny, TInt] TLst $ \(Lst list : value : optional) ->
let [Int index] = defaults optional [Int $ fromIntegral $ Lst.length list]
in return $ Lst $ Lst.insert list (fromIntegral index) value
| 263
|
bf_listappend = Builtin "listappend" 2 (Just 3)
[TLst, TAny, TInt] TLst $ \(Lst list : value : optional) ->
let [Int index] = defaults optional [Int $ fromIntegral $ Lst.length list]
in return $ Lst $ Lst.insert list (fromIntegral index) value
| 263
| false
| false
| 0
| 15
| 60
| 117
| 58
| 59
| null | null |
acharal/wam
|
src/WAM/Runtime.hs
|
gpl-2.0
|
sem (GetVariable, [x,z]) = get_variable x z
| 46
|
sem (GetVariable, [x,z]) = get_variable x z
| 46
|
sem (GetVariable, [x,z]) = get_variable x z
| 46
| false
| false
| 0
| 6
| 9
| 27
| 14
| 13
| null | null |
kairne/repa-lts
|
Data/Array/Repa/Eval.hs
|
bsd-3-clause
|
-- | Parallel computation of array elements.
--
-- * The source array must have a delayed representation like `D`, `C` or `P`,
-- and the result a manifest representation like `U` or `F`.
--
-- * If you want to copy data between manifest representations then use
-- `copyP` instead.
--
-- * If you want to convert a manifest array back to a delayed representation
-- then use `delay` instead.
--
computeP
:: ( Load r1 sh e
, Target r2 e, Source r2 e, Monad m)
=> Array r1 sh e -> m (Array r2 sh e)
computeP arr = now $ suspendedComputeP arr
| 586
|
computeP
:: ( Load r1 sh e
, Target r2 e, Source r2 e, Monad m)
=> Array r1 sh e -> m (Array r2 sh e)
computeP arr = now $ suspendedComputeP arr
| 172
|
computeP arr = now $ suspendedComputeP arr
| 42
| true
| true
| 2
| 10
| 152
| 96
| 51
| 45
| null | null |
bitemyapp/roshask
|
src/Ros/Node.hs
|
bsd-3-clause
|
-- |Advertise a 'Topic' publishing a stream of values produced in
-- the 'IO' monad.
advertise :: (RosBinary a, MsgInfo a, Typeable a) =>
TopicName -> Topic IO a -> Node ()
advertise = advertiseBuffered 1
| 218
|
advertise :: (RosBinary a, MsgInfo a, Typeable a) =>
TopicName -> Topic IO a -> Node ()
advertise = advertiseBuffered 1
| 133
|
advertise = advertiseBuffered 1
| 31
| true
| true
| 0
| 9
| 49
| 55
| 28
| 27
| null | null |
ml9951/ghc
|
compiler/cmm/PprC.hs
|
bsd-3-clause
|
-- if we print via pprAsPtrReg
isPtrReg (CmmGlobal (VanillaReg _ VNonGcPtr)) = False
| 84
|
isPtrReg (CmmGlobal (VanillaReg _ VNonGcPtr)) = False
| 53
|
isPtrReg (CmmGlobal (VanillaReg _ VNonGcPtr)) = False
| 53
| true
| false
| 0
| 9
| 12
| 24
| 12
| 12
| null | null |
jmgimeno/haskell-playground
|
src/hslife.hs
|
unlicense
|
sq_1 = [ Square (nw,ne,sw,se)
| nw <- sq_0, ne <- sq_0, sw <- sq_0, se <- sq_0 ]
| 87
|
sq_1 = [ Square (nw,ne,sw,se)
| nw <- sq_0, ne <- sq_0, sw <- sq_0, se <- sq_0 ]
| 87
|
sq_1 = [ Square (nw,ne,sw,se)
| nw <- sq_0, ne <- sq_0, sw <- sq_0, se <- sq_0 ]
| 87
| false
| false
| 0
| 7
| 25
| 56
| 30
| 26
| null | null |
gspia/reflex-dom-htmlea
|
lib/src/Reflex/Dom/HTML5/Elements/Elements.hs
|
bsd-3-clause
|
-- | A short-hand notion for @ elDynAttr\' \"sup\" ... @
supD' ∷ forall t m a. (DomBuilder t m, PostBuild t m) ⇒ Dynamic t Sup → m a → m (Element EventResult (DomBuilderSpace m) t, a)
supD' bm = elDynAttr' "sup" (A.attrMap <$> bm)
| 231
|
supD' ∷ forall t m a. (DomBuilder t m, PostBuild t m) ⇒ Dynamic t Sup → m a → m (Element EventResult (DomBuilderSpace m) t, a)
supD' bm = elDynAttr' "sup" (A.attrMap <$> bm)
| 174
|
supD' bm = elDynAttr' "sup" (A.attrMap <$> bm)
| 47
| true
| true
| 0
| 14
| 46
| 97
| 49
| 48
| null | null |
bacchanalia/KitchenSink
|
KitchenSink/Control.hs
|
gpl-3.0
|
-- | 'Control.Monad.unless' with a monadic condition
unlessM :: Monad m => m Bool -> m () -> m ()
unlessM b x = ifM b pass x
| 124
|
unlessM :: Monad m => m Bool -> m () -> m ()
unlessM b x = ifM b pass x
| 71
|
unlessM b x = ifM b pass x
| 26
| true
| true
| 0
| 9
| 27
| 56
| 25
| 31
| null | null |
hguenther/nbis
|
MemoryModel/MemoryGraph.hs
|
agpl-3.0
|
addInstruction _ (MICompare p1 p2 res) gr
= gr { comparesByLHS = Map.insert p1 (p2,res) (comparesByLHS gr)
, comparesByRHS = Map.insert p2 (p1,res) (comparesByRHS gr) }
| 177
|
addInstruction _ (MICompare p1 p2 res) gr
= gr { comparesByLHS = Map.insert p1 (p2,res) (comparesByLHS gr)
, comparesByRHS = Map.insert p2 (p1,res) (comparesByRHS gr) }
| 177
|
addInstruction _ (MICompare p1 p2 res) gr
= gr { comparesByLHS = Map.insert p1 (p2,res) (comparesByLHS gr)
, comparesByRHS = Map.insert p2 (p1,res) (comparesByRHS gr) }
| 177
| false
| false
| 2
| 10
| 34
| 88
| 43
| 45
| null | null |
sdiehl/ghc
|
compiler/GHC/StgToCmm/Monad.hs
|
bsd-3-clause
|
emitUnwind :: [(GlobalReg, Maybe CmmExpr)] -> FCode ()
emitUnwind regs = do
dflags <- getDynFlags
when (debugLevel dflags > 0) $ do
emitCgStmt $ CgStmt $ CmmUnwind regs
| 177
|
emitUnwind :: [(GlobalReg, Maybe CmmExpr)] -> FCode ()
emitUnwind regs = do
dflags <- getDynFlags
when (debugLevel dflags > 0) $ do
emitCgStmt $ CgStmt $ CmmUnwind regs
| 177
|
emitUnwind regs = do
dflags <- getDynFlags
when (debugLevel dflags > 0) $ do
emitCgStmt $ CgStmt $ CmmUnwind regs
| 122
| false
| true
| 3
| 12
| 36
| 81
| 36
| 45
| null | null |
bgamari/text
|
src/Data/Text/Lazy.hs
|
bsd-2-clause
|
-- TODO: a better implementation
-- | /O(n+m)/ The 'isInfixOf' function takes two 'Text's and returns
-- 'True' iff the first is contained, wholly and intact, anywhere
-- within the second.
--
-- This function is strict in its first argument, and lazy in its
-- second.
--
-- In (unlikely) bad cases, this function's time complexity degrades
-- towards /O(n*m)/.
isInfixOf :: Text -> Text -> Bool
isInfixOf needle haystack
| null needle = True
| isSingleton needle = S.elem (head needle) . S.stream $ haystack
| otherwise = not . L.null . indices needle $ haystack
| 593
|
isInfixOf :: Text -> Text -> Bool
isInfixOf needle haystack
| null needle = True
| isSingleton needle = S.elem (head needle) . S.stream $ haystack
| otherwise = not . L.null . indices needle $ haystack
| 229
|
isInfixOf needle haystack
| null needle = True
| isSingleton needle = S.elem (head needle) . S.stream $ haystack
| otherwise = not . L.null . indices needle $ haystack
| 195
| true
| true
| 2
| 9
| 126
| 99
| 52
| 47
| null | null |
wolftune/hoogle
|
src/General/Util.hs
|
bsd-3-clause
|
tarballReadFiles :: FilePath -> IO [(FilePath, LBS.ByteString)]
tarballReadFiles file = f . Tar.read . GZip.decompress <$> LBS.readFile file
where
f (Next e rest) | NormalFile body _ <- entryContent e = (entryPath e, body) : f rest
f (Next _ rest) = f rest
f Done = []
f (Fail e) = error $ "tarballReadFiles on " ++ file ++ ", " ++ show e
-- | Take a piece of text and escape all the HTML special bits
| 439
|
tarballReadFiles :: FilePath -> IO [(FilePath, LBS.ByteString)]
tarballReadFiles file = f . Tar.read . GZip.decompress <$> LBS.readFile file
where
f (Next e rest) | NormalFile body _ <- entryContent e = (entryPath e, body) : f rest
f (Next _ rest) = f rest
f Done = []
f (Fail e) = error $ "tarballReadFiles on " ++ file ++ ", " ++ show e
-- | Take a piece of text and escape all the HTML special bits
| 439
|
tarballReadFiles file = f . Tar.read . GZip.decompress <$> LBS.readFile file
where
f (Next e rest) | NormalFile body _ <- entryContent e = (entryPath e, body) : f rest
f (Next _ rest) = f rest
f Done = []
f (Fail e) = error $ "tarballReadFiles on " ++ file ++ ", " ++ show e
-- | Take a piece of text and escape all the HTML special bits
| 375
| false
| true
| 1
| 9
| 116
| 178
| 83
| 95
| null | null |
tpsinnem/Idris-dev
|
src/Idris/AbsSyntaxTree.hs
|
bsd-3-clause
|
strLogCat IErasure = "erasure"
| 31
|
strLogCat IErasure = "erasure"
| 31
|
strLogCat IErasure = "erasure"
| 31
| false
| false
| 0
| 5
| 4
| 9
| 4
| 5
| null | null |
gfontenot/hfold
|
src/Reflow/Parser.hs
|
mit
|
parserError :: Text -> ParseError -> Content
parserError input e = Normal 0
$ input
<> "\n\n\n"
<> "Warning: reflow parser failed\n"
<> (pack $ show e)
| 167
|
parserError :: Text -> ParseError -> Content
parserError input e = Normal 0
$ input
<> "\n\n\n"
<> "Warning: reflow parser failed\n"
<> (pack $ show e)
| 167
|
parserError input e = Normal 0
$ input
<> "\n\n\n"
<> "Warning: reflow parser failed\n"
<> (pack $ show e)
| 122
| false
| true
| 8
| 8
| 42
| 62
| 27
| 35
| null | null |
doismellburning/parcel
|
src/Parcel/Procfile.hs
|
mit
|
parseProcLine :: String -> (String, String) -- TODO Bit redundant
parseProcLine s = parseProcLine' s "" ""
| 106
|
parseProcLine :: String -> (String, String)
parseProcLine s = parseProcLine' s "" ""
| 84
|
parseProcLine s = parseProcLine' s "" ""
| 40
| true
| true
| 0
| 6
| 16
| 32
| 17
| 15
| null | null |
haroldcarr/learn-haskell-coq-ml-etc
|
haskell/topic/existentials/hc-existentials/src/Lib.hs
|
unlicense
|
evalF1 :: Object -> Bool
evalF1 (Object a f1 _) = f1 a
| 55
|
evalF1 :: Object -> Bool
evalF1 (Object a f1 _) = f1 a
| 55
|
evalF1 (Object a f1 _) = f1 a
| 30
| false
| true
| 0
| 9
| 13
| 36
| 16
| 20
| null | null |
kawamuray/ganeti
|
test/hs/Test/Ganeti/Objects.hs
|
gpl-2.0
|
-- | Helper to compute absolute value of an IPv4 address.
ip4AddrValue :: Ip4Address -> Integer
ip4AddrValue (Ip4Address a b c d) =
fromIntegral a * (2^(24::Integer)) +
fromIntegral b * (2^(16::Integer)) +
fromIntegral c * (2^(8::Integer)) + fromIntegral d
| 262
|
ip4AddrValue :: Ip4Address -> Integer
ip4AddrValue (Ip4Address a b c d) =
fromIntegral a * (2^(24::Integer)) +
fromIntegral b * (2^(16::Integer)) +
fromIntegral c * (2^(8::Integer)) + fromIntegral d
| 204
|
ip4AddrValue (Ip4Address a b c d) =
fromIntegral a * (2^(24::Integer)) +
fromIntegral b * (2^(16::Integer)) +
fromIntegral c * (2^(8::Integer)) + fromIntegral d
| 166
| true
| true
| 0
| 13
| 45
| 106
| 56
| 50
| null | null |
athanclark/Idris-dev
|
src/Idris/Core/TT.hs
|
bsd-3-clause
|
implicitable (MN _ x) = not (tnull x) && thead x /= '_'
| 55
|
implicitable (MN _ x) = not (tnull x) && thead x /= '_'
| 55
|
implicitable (MN _ x) = not (tnull x) && thead x /= '_'
| 55
| false
| false
| 0
| 9
| 12
| 38
| 17
| 21
| null | null |
DavidAlphaFox/ghc
|
utils/haddock/haddock-api/src/Haddock/Interface/Rename.hs
|
bsd-3-clause
|
renameLDecl :: LHsDecl Name -> RnM (LHsDecl DocName)
renameLDecl (L loc d) = return . L loc =<< renameDecl d
| 108
|
renameLDecl :: LHsDecl Name -> RnM (LHsDecl DocName)
renameLDecl (L loc d) = return . L loc =<< renameDecl d
| 108
|
renameLDecl (L loc d) = return . L loc =<< renameDecl d
| 55
| false
| true
| 0
| 8
| 19
| 52
| 24
| 28
| null | null |
tjakway/ghcjvm
|
compiler/simplCore/SAT.hs
|
bsd-3-clause
|
satTopLevelExpr :: CoreExpr -> IdSet -> SatM (CoreExpr, IdSATInfo)
satTopLevelExpr expr interesting_ids = do
(expr', sat_info_expr, expr_app) <- satExpr expr interesting_ids
return (expr', finalizeApp expr_app sat_info_expr)
| 232
|
satTopLevelExpr :: CoreExpr -> IdSet -> SatM (CoreExpr, IdSATInfo)
satTopLevelExpr expr interesting_ids = do
(expr', sat_info_expr, expr_app) <- satExpr expr interesting_ids
return (expr', finalizeApp expr_app sat_info_expr)
| 232
|
satTopLevelExpr expr interesting_ids = do
(expr', sat_info_expr, expr_app) <- satExpr expr interesting_ids
return (expr', finalizeApp expr_app sat_info_expr)
| 165
| false
| true
| 0
| 9
| 33
| 71
| 36
| 35
| null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.