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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
monamonamonad/RegexDSL
|
src/Automaton/NFAe.hs
|
bsd-3-clause
|
-- ε閉包 (ε-cl)
-- 状態集合 states 自身と、そこからε遷移により辿り着ける全ての状態を返す。
ecl :: (State state, Alphabet alpha)
=> NFAe state alpha -> S.Set state -> S.Set state
ecl nfae@NFAe{..} states
| states == states' = states
| otherwise = ecl nfae states'
where
states' = S.fold iter states states
-- s からε遷移する状態を付け加える。
iter s states = S.union states $ lookup' (s, Nothing) nfaeTransTable
| 394
|
ecl :: (State state, Alphabet alpha)
=> NFAe state alpha -> S.Set state -> S.Set state
ecl nfae@NFAe{..} states
| states == states' = states
| otherwise = ecl nfae states'
where
states' = S.fold iter states states
-- s からε遷移する状態を付け加える。
iter s states = S.union states $ lookup' (s, Nothing) nfaeTransTable
| 336
|
ecl nfae@NFAe{..} states
| states == states' = states
| otherwise = ecl nfae states'
where
states' = S.fold iter states states
-- s からε遷移する状態を付け加える。
iter s states = S.union states $ lookup' (s, Nothing) nfaeTransTable
| 235
| true
| true
| 2
| 9
| 90
| 138
| 68
| 70
| null | null |
keithodulaigh/Hets
|
Comorphisms/HolLight2Isabelle.hs
|
gpl-2.0
|
mkQuantifier :: Term -> [String] -> IsaSign.Term
mkQuantifier t vs = let name = freeName vs in
IsaSign.Abs
(IsaSign.Free (IsaConsts.mkVName name))
(IsaSign.App (translateTerm t (name : vs))
(IsaSign.Abs
(IsaSign.Free (IsaConsts.mkVName name))
(IsaSign.Free (IsaConsts.mkVName name))
IsaSign.NotCont)
IsaSign.NotCont)
IsaSign.NotCont
| 533
|
mkQuantifier :: Term -> [String] -> IsaSign.Term
mkQuantifier t vs = let name = freeName vs in
IsaSign.Abs
(IsaSign.Free (IsaConsts.mkVName name))
(IsaSign.App (translateTerm t (name : vs))
(IsaSign.Abs
(IsaSign.Free (IsaConsts.mkVName name))
(IsaSign.Free (IsaConsts.mkVName name))
IsaSign.NotCont)
IsaSign.NotCont)
IsaSign.NotCont
| 533
|
mkQuantifier t vs = let name = freeName vs in
IsaSign.Abs
(IsaSign.Free (IsaConsts.mkVName name))
(IsaSign.App (translateTerm t (name : vs))
(IsaSign.Abs
(IsaSign.Free (IsaConsts.mkVName name))
(IsaSign.Free (IsaConsts.mkVName name))
IsaSign.NotCont)
IsaSign.NotCont)
IsaSign.NotCont
| 484
| false
| true
| 0
| 13
| 237
| 153
| 73
| 80
| null | null |
pxqr/intset
|
tests/Fusion.hs
|
bsd-3-clause
|
main :: IO ()
main = do
print $ test []
exitSuccess
| 55
|
main :: IO ()
main = do
print $ test []
exitSuccess
| 55
|
main = do
print $ test []
exitSuccess
| 41
| false
| true
| 0
| 9
| 15
| 31
| 14
| 17
| null | null |
rscprof/kalium
|
src/Kalium/Nucleus/Vector/Sanity.hs
|
bsd-3-clause
|
fnsnu :: W m => Name -> Func -> m ()
fnsnu name fn = do
tell [name]
snu (view funcExpression fn)
| 104
|
fnsnu :: W m => Name -> Func -> m ()
fnsnu name fn = do
tell [name]
snu (view funcExpression fn)
| 104
|
fnsnu name fn = do
tell [name]
snu (view funcExpression fn)
| 67
| false
| true
| 0
| 9
| 29
| 59
| 27
| 32
| null | null |
dmeysman/minesweeper
|
src/Minesweeper/Cell.hs
|
mit
|
-- | Check whether a 'Cell' contains a mine.
mined :: Cell -> Bool
mined (Cell _ Mine _) = True
| 95
|
mined :: Cell -> Bool
mined (Cell _ Mine _) = True
| 50
|
mined (Cell _ Mine _) = True
| 28
| true
| true
| 0
| 9
| 20
| 35
| 16
| 19
| null | null |
hamishmack/haskell-gi
|
lib/Data/GI/CodeGen/Type.hs
|
lgpl-2.1
|
-- | Embed in the `IO` monad.
io :: TypeRep -> TypeRep
io t = "IO" `con` [t]
| 76
|
io :: TypeRep -> TypeRep
io t = "IO" `con` [t]
| 46
|
io t = "IO" `con` [t]
| 21
| true
| true
| 0
| 7
| 17
| 32
| 17
| 15
| null | null |
vivekmallick/bugreport
|
BugStrings.hs
|
gpl-3.0
|
stringToIntError :: String -> (Integer, Bool)
stringToIntError s = if (length s) > 0 && (and (map isDigit s))
then ((read s :: Integer), True)
else (0, False)
| 166
|
stringToIntError :: String -> (Integer, Bool)
stringToIntError s = if (length s) > 0 && (and (map isDigit s))
then ((read s :: Integer), True)
else (0, False)
| 166
|
stringToIntError s = if (length s) > 0 && (and (map isDigit s))
then ((read s :: Integer), True)
else (0, False)
| 120
| false
| true
| 0
| 10
| 35
| 81
| 45
| 36
| null | null |
ghc/packages-filepath
|
System/FilePath/Internal.hs
|
bsd-3-clause
|
-- | Remove last extension, and the \".\" preceding it.
--
-- > dropExtension "/directory/path.ext" == "/directory/path"
-- > dropExtension x == fst (splitExtension x)
dropExtension :: FilePath -> FilePath
dropExtension = fst . splitExtension
| 242
|
dropExtension :: FilePath -> FilePath
dropExtension = fst . splitExtension
| 74
|
dropExtension = fst . splitExtension
| 36
| true
| true
| 0
| 5
| 34
| 23
| 14
| 9
| null | null |
magthe/lat
|
src/AlertDB.hs
|
gpl-3.0
|
addDistro (T.Distro _ name url) = do
conn <- ask
liftIO $ failOnException "Couldn't add distribution, are you sure it isn't added already?" $ run conn "INSERT INTO distro (name, url) VALUES (?, ?)"
[ toSql name
, toSql $ fromJust url
]
return ()
-- | Get a distro from the database based on ID
| 330
|
addDistro (T.Distro _ name url) = do
conn <- ask
liftIO $ failOnException "Couldn't add distribution, are you sure it isn't added already?" $ run conn "INSERT INTO distro (name, url) VALUES (?, ?)"
[ toSql name
, toSql $ fromJust url
]
return ()
-- | Get a distro from the database based on ID
| 330
|
addDistro (T.Distro _ name url) = do
conn <- ask
liftIO $ failOnException "Couldn't add distribution, are you sure it isn't added already?" $ run conn "INSERT INTO distro (name, url) VALUES (?, ?)"
[ toSql name
, toSql $ fromJust url
]
return ()
-- | Get a distro from the database based on ID
| 330
| false
| false
| 0
| 11
| 92
| 75
| 34
| 41
| null | null |
brendanhay/gogol
|
gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Product.hs
|
mpl-2.0
|
-- | URL of this directory site.
dsURL :: Lens' DirectorySite (Maybe Text)
dsURL = lens _dsURL (\ s a -> s{_dsURL = a})
| 119
|
dsURL :: Lens' DirectorySite (Maybe Text)
dsURL = lens _dsURL (\ s a -> s{_dsURL = a})
| 86
|
dsURL = lens _dsURL (\ s a -> s{_dsURL = a})
| 44
| true
| true
| 1
| 9
| 23
| 52
| 25
| 27
| null | null |
d0kt0r0/estuary
|
client/src/Estuary/Help/Natural.hs
|
gpl-3.0
|
about :: MonadWidget t m => m ()
about = do
divClass "about primary-color code-font" $ text "Natural"
divClass "about primary-color code-font" $ text "A mini live coding esolang developed in Manizales, Colombia."
| 216
|
about :: MonadWidget t m => m ()
about = do
divClass "about primary-color code-font" $ text "Natural"
divClass "about primary-color code-font" $ text "A mini live coding esolang developed in Manizales, Colombia."
| 216
|
about = do
divClass "about primary-color code-font" $ text "Natural"
divClass "about primary-color code-font" $ text "A mini live coding esolang developed in Manizales, Colombia."
| 183
| false
| true
| 0
| 9
| 36
| 57
| 23
| 34
| null | null |
FranklinChen/Hugs
|
tests/ffi/FileIO.hs
|
bsd-3-clause
|
write fd s = withCString s $ \s' -> unix "write" $ write' fd s' (length s)
| 75
|
write fd s = withCString s $ \s' -> unix "write" $ write' fd s' (length s)
| 75
|
write fd s = withCString s $ \s' -> unix "write" $ write' fd s' (length s)
| 75
| false
| false
| 0
| 10
| 17
| 43
| 20
| 23
| null | null |
phischu/fragnix
|
builtins/base/GHC.Event.Manager.hs
|
bsd-3-clause
|
registerControlFd :: EventManager -> Fd -> Event -> IO ()
registerControlFd mgr fd evs =
failOnInvalidFile "registerControlFd" fd $
I.modifyFd (emBackend mgr) fd mempty evs
| 176
|
registerControlFd :: EventManager -> Fd -> Event -> IO ()
registerControlFd mgr fd evs =
failOnInvalidFile "registerControlFd" fd $
I.modifyFd (emBackend mgr) fd mempty evs
| 176
|
registerControlFd mgr fd evs =
failOnInvalidFile "registerControlFd" fd $
I.modifyFd (emBackend mgr) fd mempty evs
| 118
| false
| true
| 0
| 9
| 28
| 61
| 29
| 32
| null | null |
scvalex/ltc
|
src/Ltc/Store/Simple.hs
|
gpl-3.0
|
locationVersion :: FilePath -> FilePath
locationVersion base = base </> "version"
| 81
|
locationVersion :: FilePath -> FilePath
locationVersion base = base </> "version"
| 81
|
locationVersion base = base </> "version"
| 41
| false
| true
| 0
| 5
| 10
| 22
| 11
| 11
| null | null |
etu-fkti5301-bgu/alt-exam_automated_theorem_proving
|
src/Skolem.hs
|
bsd-3-clause
|
- print $ pullquants [form| (∀ y. Q(y)) ∧ (∀ x. P(y)) |]
-- Skolemization
specialize :: Formula -> Formula
specialize (All _ p) = specialize p
| 146
|
specialize :: Formula -> Formula
specialize (All _ p) = specialize p
| 68
|
specialize (All _ p) = specialize p
| 35
| true
| true
| 2
| 6
| 30
| 51
| 25
| 26
| null | null |
andorp/hs-bluesnap
|
src/Bluesnap/API/Response.hs
|
gpl-3.0
|
elementSubscription_id :: XMLParser Xs.Long
elementSubscription_id = parseSchemaType "subscription-id"
| 102
|
elementSubscription_id :: XMLParser Xs.Long
elementSubscription_id = parseSchemaType "subscription-id"
| 102
|
elementSubscription_id = parseSchemaType "subscription-id"
| 58
| false
| true
| 0
| 6
| 7
| 19
| 9
| 10
| null | null |
jwiegley/ghc-release
|
utils/hsc2hs/CrossCodegen.hs
|
gpl-3.0
|
runCompiler :: FilePath -> [String] -> Maybe FilePath -> TestMonad Bool
runCompiler prog args mStdoutFile = do
let cmdLine =
#if MIN_VERSION_process(1,1,0)
showCommandForUser prog args
#else
unwords (prog : args)
#endif
testLog ("executing: " ++ cmdLine) $ liftTestIO $ do
mHOut <- case mStdoutFile of
Nothing -> return Nothing
Just stdoutFile -> liftM Just $ openFile stdoutFile WriteMode
process <- runProcess prog args Nothing Nothing Nothing mHOut mHOut
case mHOut of
Just hOut -> hClose hOut
Nothing -> return ()
exitStatus <- waitForProcess process
return $ case exitStatus of
ExitSuccess -> True
ExitFailure _ -> False
-- The main driver for cross-compilation mode
| 814
|
runCompiler :: FilePath -> [String] -> Maybe FilePath -> TestMonad Bool
runCompiler prog args mStdoutFile = do
let cmdLine =
#if MIN_VERSION_process(1,1,0)
showCommandForUser prog args
#else
unwords (prog : args)
#endif
testLog ("executing: " ++ cmdLine) $ liftTestIO $ do
mHOut <- case mStdoutFile of
Nothing -> return Nothing
Just stdoutFile -> liftM Just $ openFile stdoutFile WriteMode
process <- runProcess prog args Nothing Nothing Nothing mHOut mHOut
case mHOut of
Just hOut -> hClose hOut
Nothing -> return ()
exitStatus <- waitForProcess process
return $ case exitStatus of
ExitSuccess -> True
ExitFailure _ -> False
-- The main driver for cross-compilation mode
| 814
|
runCompiler prog args mStdoutFile = do
let cmdLine =
#if MIN_VERSION_process(1,1,0)
showCommandForUser prog args
#else
unwords (prog : args)
#endif
testLog ("executing: " ++ cmdLine) $ liftTestIO $ do
mHOut <- case mStdoutFile of
Nothing -> return Nothing
Just stdoutFile -> liftM Just $ openFile stdoutFile WriteMode
process <- runProcess prog args Nothing Nothing Nothing mHOut mHOut
case mHOut of
Just hOut -> hClose hOut
Nothing -> return ()
exitStatus <- waitForProcess process
return $ case exitStatus of
ExitSuccess -> True
ExitFailure _ -> False
-- The main driver for cross-compilation mode
| 742
| false
| true
| 0
| 15
| 245
| 207
| 96
| 111
| null | null |
keithodulaigh/Hets
|
Common/ProverTools.hs
|
gpl-2.0
|
check4jarFile :: String -- ^ environment Variable
-> String -- ^ jar file name
-> IO (Bool, FilePath)
check4jarFile = check4jarFileWithDefault ""
| 149
|
check4jarFile :: String -- ^ environment Variable
-> String -- ^ jar file name
-> IO (Bool, FilePath)
check4jarFile = check4jarFileWithDefault ""
| 149
|
check4jarFile = check4jarFileWithDefault ""
| 43
| false
| true
| 0
| 9
| 25
| 35
| 18
| 17
| null | null |
ezyang/ghc
|
libraries/template-haskell/Language/Haskell/TH/Lib.hs
|
bsd-3-clause
|
plainTV :: Name -> TyVarBndr
plainTV = PlainTV
| 46
|
plainTV :: Name -> TyVarBndr
plainTV = PlainTV
| 46
|
plainTV = PlainTV
| 17
| false
| true
| 0
| 7
| 7
| 22
| 9
| 13
| null | null |
brendanhay/gogol
|
gogol-speech/gen/Network/Google/Resource/Speech/Projects/Locations/Operations/Get.hs
|
mpl-2.0
|
-- | The name of the operation resource.
plogName :: Lens' ProjectsLocationsOperationsGet Text
plogName = lens _plogName (\ s a -> s{_plogName = a})
| 148
|
plogName :: Lens' ProjectsLocationsOperationsGet Text
plogName = lens _plogName (\ s a -> s{_plogName = a})
| 107
|
plogName = lens _plogName (\ s a -> s{_plogName = a})
| 53
| true
| true
| 0
| 9
| 23
| 40
| 22
| 18
| null | null |
dmjio/bloodhound
|
src/Database/Bloodhound/Types.hs
|
bsd-3-clause
|
commonHighlightPairs (Just (CommonHighlight chScore chForceSource chTag chEncoder
chNoMatchSize chHighlightQuery
chRequireFieldMatch)) =
[ "order" .= chScore
, "force_source" .= chForceSource
, "encoder" .= chEncoder
, "no_match_size" .= chNoMatchSize
, "highlight_query" .= chHighlightQuery
, "require_fieldMatch" .= chRequireFieldMatch]
++ highlightTagToPairs chTag
| 471
|
commonHighlightPairs (Just (CommonHighlight chScore chForceSource chTag chEncoder
chNoMatchSize chHighlightQuery
chRequireFieldMatch)) =
[ "order" .= chScore
, "force_source" .= chForceSource
, "encoder" .= chEncoder
, "no_match_size" .= chNoMatchSize
, "highlight_query" .= chHighlightQuery
, "require_fieldMatch" .= chRequireFieldMatch]
++ highlightTagToPairs chTag
| 471
|
commonHighlightPairs (Just (CommonHighlight chScore chForceSource chTag chEncoder
chNoMatchSize chHighlightQuery
chRequireFieldMatch)) =
[ "order" .= chScore
, "force_source" .= chForceSource
, "encoder" .= chEncoder
, "no_match_size" .= chNoMatchSize
, "highlight_query" .= chHighlightQuery
, "require_fieldMatch" .= chRequireFieldMatch]
++ highlightTagToPairs chTag
| 471
| false
| false
| 2
| 9
| 141
| 83
| 43
| 40
| null | null |
ku-fpg/kansas-amber
|
System/Hardware/Haskino/Data.hs
|
bsd-3-clause
|
getFirmwareReply 0x29 = Right BS_RESP_TYPE
| 42
|
getFirmwareReply 0x29 = Right BS_RESP_TYPE
| 42
|
getFirmwareReply 0x29 = Right BS_RESP_TYPE
| 42
| false
| false
| 0
| 5
| 4
| 12
| 5
| 7
| null | null |
alexbaluta/courseography
|
dependencies/HaXml-1.25.3/src/Text/XML/HaXml/Parse.hs
|
gpl-3.0
|
enumeratedtype :: XParser EnumeratedType
enumeratedtype =
oneOf' [ ("NOTATION", notationtype >>= return . NotationType)
, ("enumerated", enumeration >>= return . Enumeration)
]
`adjustErr` ("looking for an enumerated or NOTATION type,\n"++)
| 274
|
enumeratedtype :: XParser EnumeratedType
enumeratedtype =
oneOf' [ ("NOTATION", notationtype >>= return . NotationType)
, ("enumerated", enumeration >>= return . Enumeration)
]
`adjustErr` ("looking for an enumerated or NOTATION type,\n"++)
| 274
|
enumeratedtype =
oneOf' [ ("NOTATION", notationtype >>= return . NotationType)
, ("enumerated", enumeration >>= return . Enumeration)
]
`adjustErr` ("looking for an enumerated or NOTATION type,\n"++)
| 233
| false
| true
| 0
| 10
| 63
| 61
| 35
| 26
| null | null |
gridaphobe/ghc
|
compiler/typecheck/TcType.hs
|
bsd-3-clause
|
-- | Like 'tcEqType', but returns information about whether the difference
-- is visible in the case of a mismatch. A return of Nothing means the types
-- are 'tcEqType'.
tcEqTypeVis :: TcType -> TcType -> Maybe VisibilityFlag
tcEqTypeVis ty1 ty2
= tc_eq_type coreView ty1 ty2 <!> tc_eq_type coreView ki1 ki2
where
ki1 = typeKind ty1
ki2 = typeKind ty2
| 364
|
tcEqTypeVis :: TcType -> TcType -> Maybe VisibilityFlag
tcEqTypeVis ty1 ty2
= tc_eq_type coreView ty1 ty2 <!> tc_eq_type coreView ki1 ki2
where
ki1 = typeKind ty1
ki2 = typeKind ty2
| 193
|
tcEqTypeVis ty1 ty2
= tc_eq_type coreView ty1 ty2 <!> tc_eq_type coreView ki1 ki2
where
ki1 = typeKind ty1
ki2 = typeKind ty2
| 137
| true
| true
| 2
| 8
| 71
| 80
| 34
| 46
| null | null |
urbanslug/ghc
|
testsuite/tests/rename/should_compile/timing003.hs
|
bsd-3-clause
|
a414 = []
| 9
|
a414 = []
| 9
|
a414 = []
| 9
| false
| false
| 1
| 6
| 2
| 12
| 4
| 8
| null | null |
gnn/Hets
|
Comorphisms/SuleCFOL2SoftFOL.hs
|
gpl-2.0
|
disSPOId :: CKType -- ^ Type of CASl identifier
-> SPIdentifier -- ^ translated CASL Identifier
-> [SPIdentifier] {- ^ translated Sort Symbols of the profile
(maybe empty) -}
-> Set.Set SPIdentifier -- ^ SoftFOL Identifiers already in use
-> SPIdentifier {- ^ fresh Identifier generated from second argument;
if the identifier was not in the set this is just the second argument -}
disSPOId cType sid ty idSet
| checkIdentifier cType (show sid) && not (lkup $ show sid) = sid
| otherwise = let nSid = disSPOId' $ show sid
in assert (checkIdentifier cType nSid) $ mkSimpleId nSid
where disSPOId' sid'
| not (lkup asid) = asid
| otherwise = addType asid 1
where asid = sid' ++ case cType of
CKSort -> ""
CKVar -> ""
x -> '_' : show (length ty - (case x of
CKOp -> 1
_ -> 0))
addType res n =
let nres = asid ++ '_' : fc n
nres' = nres ++ '_' : show n
in if nres == res
then if nres' == res
then error ("SuleCFOL2SoftFOL: "
++ "cannot calculate"
++ " unambiguous id for "
++ show sid ++ " with type "
++ show ty
++ " and nres = " ++ nres
++ "\n with idSet "
++ show idSet)
else if not (lkup nres')
then nres'
else addType nres (n + 1)
else if not (lkup nres)
then nres
else addType nres (n + 1)
lkup x = Set.member (mkSimpleId x) idSet
fc n = concatMap (take n . show) ty
| 2,262
|
disSPOId :: CKType -- ^ Type of CASl identifier
-> SPIdentifier -- ^ translated CASL Identifier
-> [SPIdentifier] {- ^ translated Sort Symbols of the profile
(maybe empty) -}
-> Set.Set SPIdentifier -- ^ SoftFOL Identifiers already in use
-> SPIdentifier
disSPOId cType sid ty idSet
| checkIdentifier cType (show sid) && not (lkup $ show sid) = sid
| otherwise = let nSid = disSPOId' $ show sid
in assert (checkIdentifier cType nSid) $ mkSimpleId nSid
where disSPOId' sid'
| not (lkup asid) = asid
| otherwise = addType asid 1
where asid = sid' ++ case cType of
CKSort -> ""
CKVar -> ""
x -> '_' : show (length ty - (case x of
CKOp -> 1
_ -> 0))
addType res n =
let nres = asid ++ '_' : fc n
nres' = nres ++ '_' : show n
in if nres == res
then if nres' == res
then error ("SuleCFOL2SoftFOL: "
++ "cannot calculate"
++ " unambiguous id for "
++ show sid ++ " with type "
++ show ty
++ " and nres = " ++ nres
++ "\n with idSet "
++ show idSet)
else if not (lkup nres')
then nres'
else addType nres (n + 1)
else if not (lkup nres)
then nres
else addType nres (n + 1)
lkup x = Set.member (mkSimpleId x) idSet
fc n = concatMap (take n . show) ty
| 2,131
|
disSPOId cType sid ty idSet
| checkIdentifier cType (show sid) && not (lkup $ show sid) = sid
| otherwise = let nSid = disSPOId' $ show sid
in assert (checkIdentifier cType nSid) $ mkSimpleId nSid
where disSPOId' sid'
| not (lkup asid) = asid
| otherwise = addType asid 1
where asid = sid' ++ case cType of
CKSort -> ""
CKVar -> ""
x -> '_' : show (length ty - (case x of
CKOp -> 1
_ -> 0))
addType res n =
let nres = asid ++ '_' : fc n
nres' = nres ++ '_' : show n
in if nres == res
then if nres' == res
then error ("SuleCFOL2SoftFOL: "
++ "cannot calculate"
++ " unambiguous id for "
++ show sid ++ " with type "
++ show ty
++ " and nres = " ++ nres
++ "\n with idSet "
++ show idSet)
else if not (lkup nres')
then nres'
else addType nres (n + 1)
else if not (lkup nres)
then nres
else addType nres (n + 1)
lkup x = Set.member (mkSimpleId x) idSet
fc n = concatMap (take n . show) ty
| 1,813
| true
| true
| 8
| 13
| 1,253
| 418
| 220
| 198
| null | null |
keoko/postgresql-simple-examples
|
Main.hs
|
mit
|
parse ["t"] = Todo.main
| 23
|
parse ["t"] = Todo.main
| 23
|
parse ["t"] = Todo.main
| 23
| false
| false
| 0
| 5
| 3
| 15
| 7
| 8
| null | null |
FPtje/GLuaParser
|
src/GLua/Lexer.hs
|
lgpl-2.1
|
parseNumberSuffix :: LParser String
parseNumberSuffix = (\e s d -> e : s ++ d) <$> (pSym 'e' <<|> pSym 'E' <<|> pSym 'p' <<|> pSym 'P')
<*> opt (pToken "+" <<|> pToken "-") ""
<*> pSome pDigit
| 216
|
parseNumberSuffix :: LParser String
parseNumberSuffix = (\e s d -> e : s ++ d) <$> (pSym 'e' <<|> pSym 'E' <<|> pSym 'p' <<|> pSym 'P')
<*> opt (pToken "+" <<|> pToken "-") ""
<*> pSome pDigit
| 216
|
parseNumberSuffix = (\e s d -> e : s ++ d) <$> (pSym 'e' <<|> pSym 'E' <<|> pSym 'p' <<|> pSym 'P')
<*> opt (pToken "+" <<|> pToken "-") ""
<*> pSome pDigit
| 180
| false
| true
| 0
| 12
| 61
| 94
| 45
| 49
| null | null |
balajisivaraman/haskell-book-work
|
src/Ch7.hs
|
mit
|
galapagosPenguin :: Penguin -> Bool
galapagosPenguin (Peng Galapagos) = True
| 76
|
galapagosPenguin :: Penguin -> Bool
galapagosPenguin (Peng Galapagos) = True
| 76
|
galapagosPenguin (Peng Galapagos) = True
| 40
| false
| true
| 0
| 9
| 9
| 30
| 13
| 17
| null | null |
twopoint718/haifa
|
src/Utils.hs
|
gpl-2.0
|
(>@>) :: Monad m => (a -> m b) -> (b -> m c) -> a -> m c
f >@> g = \x -> f x >>= g
| 83
|
(>@>) :: Monad m => (a -> m b) -> (b -> m c) -> a -> m c
f >@> g = \x -> f x >>= g
| 83
|
f >@> g = \x -> f x >>= g
| 26
| false
| true
| 0
| 11
| 29
| 76
| 37
| 39
| null | null |
RossMeikleham/GPC
|
src/GPC/TypeScopeChecker.hs
|
bsd-2-clause
|
checkForLoop :: Ident SrcPos -> Expr SrcPos -> Expr SrcPos
-> Expr SrcPos -> BlockStmt SrcPos
-> BlockState ()
checkForLoop ident@(Ident sp _) startExpr stopExpr stepExpr blockStmt = do
fTable <- use funcDefs
cVars <- use curVars
-- Need to temporarily add loop variable to
-- current variable list, as it's not in scope yet
-- to type check
assign curVars $ M.insert ident (intTypePos notKernel sp) cVars
scopeVars <- M.union <$> use curVars <*> use prevVars
-- Check types of each expression are all integers
-- Then type check the for block
let exprs = [startExpr, stopExpr, stepExpr]
types <- lift $ mapM (getTypeExpr scopeVars fTable) exprs
checkType (types !! 0) $ intType notKernel
checkType (types !! 1) $ boolType notKernel
checkType (types !! 2) $ intType notKernel
assign curVars cVars
checkBlock blockStmt (M.singleton ident (intTypePos notKernel sp))
return ()
-- | Type check inner block, add to current list of inner blocks
| 1,075
|
checkForLoop :: Ident SrcPos -> Expr SrcPos -> Expr SrcPos
-> Expr SrcPos -> BlockStmt SrcPos
-> BlockState ()
checkForLoop ident@(Ident sp _) startExpr stopExpr stepExpr blockStmt = do
fTable <- use funcDefs
cVars <- use curVars
-- Need to temporarily add loop variable to
-- current variable list, as it's not in scope yet
-- to type check
assign curVars $ M.insert ident (intTypePos notKernel sp) cVars
scopeVars <- M.union <$> use curVars <*> use prevVars
-- Check types of each expression are all integers
-- Then type check the for block
let exprs = [startExpr, stopExpr, stepExpr]
types <- lift $ mapM (getTypeExpr scopeVars fTable) exprs
checkType (types !! 0) $ intType notKernel
checkType (types !! 1) $ boolType notKernel
checkType (types !! 2) $ intType notKernel
assign curVars cVars
checkBlock blockStmt (M.singleton ident (intTypePos notKernel sp))
return ()
-- | Type check inner block, add to current list of inner blocks
| 1,075
|
checkForLoop ident@(Ident sp _) startExpr stopExpr stepExpr blockStmt = do
fTable <- use funcDefs
cVars <- use curVars
-- Need to temporarily add loop variable to
-- current variable list, as it's not in scope yet
-- to type check
assign curVars $ M.insert ident (intTypePos notKernel sp) cVars
scopeVars <- M.union <$> use curVars <*> use prevVars
-- Check types of each expression are all integers
-- Then type check the for block
let exprs = [startExpr, stopExpr, stepExpr]
types <- lift $ mapM (getTypeExpr scopeVars fTable) exprs
checkType (types !! 0) $ intType notKernel
checkType (types !! 1) $ boolType notKernel
checkType (types !! 2) $ intType notKernel
assign curVars cVars
checkBlock blockStmt (M.singleton ident (intTypePos notKernel sp))
return ()
-- | Type check inner block, add to current list of inner blocks
| 904
| false
| true
| 0
| 11
| 290
| 293
| 136
| 157
| null | null |
CindyLinz/Haskell.js
|
trans/src/Desugar/Where.hs
|
mit
|
deWhereExp (Paren l exp) = Paren (id l) (deWhereExp exp)
| 56
|
deWhereExp (Paren l exp) = Paren (id l) (deWhereExp exp)
| 56
|
deWhereExp (Paren l exp) = Paren (id l) (deWhereExp exp)
| 56
| false
| false
| 0
| 7
| 9
| 34
| 16
| 18
| null | null |
emwap/feldspar-language
|
src/Feldspar/Core/Middleend/OptimizeUntyped.hs
|
bsd-3-clause
|
go (In (App Add _ [e1, e2]))
| (In (Literal (LInt _ _ 0))) <- e1 = go e2
| (In (Literal (LInt _ _ 0))) <- e2 = go e1
| 118
|
go (In (App Add _ [e1, e2]))
| (In (Literal (LInt _ _ 0))) <- e1 = go e2
| (In (Literal (LInt _ _ 0))) <- e2 = go e1
| 118
|
go (In (App Add _ [e1, e2]))
| (In (Literal (LInt _ _ 0))) <- e1 = go e2
| (In (Literal (LInt _ _ 0))) <- e2 = go e1
| 118
| false
| false
| 0
| 14
| 32
| 107
| 51
| 56
| null | null |
sdiehl/ghc
|
compiler/deSugar/Coverage.hs
|
bsd-3-clause
|
addTickTupArg :: LHsTupArg GhcTc -> TM (LHsTupArg GhcTc)
addTickTupArg (L l (Present x e)) = do { e' <- addTickLHsExpr e
; return (L l (Present x e')) }
| 193
|
addTickTupArg :: LHsTupArg GhcTc -> TM (LHsTupArg GhcTc)
addTickTupArg (L l (Present x e)) = do { e' <- addTickLHsExpr e
; return (L l (Present x e')) }
| 193
|
addTickTupArg (L l (Present x e)) = do { e' <- addTickLHsExpr e
; return (L l (Present x e')) }
| 136
| false
| true
| 0
| 11
| 69
| 81
| 39
| 42
| null | null |
urbanslug/ghc
|
testsuite/tests/stranal/sigs/DmdAnalGADTs.hs
|
bsd-3-clause
|
hasCPR :: Int
hasCPR = 1
| 24
|
hasCPR :: Int
hasCPR = 1
| 24
|
hasCPR = 1
| 10
| false
| true
| 0
| 4
| 5
| 11
| 6
| 5
| null | null |
brendanhay/gogol
|
gogol-shopping-content/gen/Network/Google/Resource/Content/Regions/List.hs
|
mpl-2.0
|
-- | Required. The id of the merchant for which to list region definitions.
regeMerchantId :: Lens' RegionsList Int64
regeMerchantId
= lens _regeMerchantId
(\ s a -> s{_regeMerchantId = a})
. _Coerce
| 213
|
regeMerchantId :: Lens' RegionsList Int64
regeMerchantId
= lens _regeMerchantId
(\ s a -> s{_regeMerchantId = a})
. _Coerce
| 137
|
regeMerchantId
= lens _regeMerchantId
(\ s a -> s{_regeMerchantId = a})
. _Coerce
| 95
| true
| true
| 1
| 8
| 45
| 49
| 24
| 25
| null | null |
corajr/adventofcode2015
|
21/src/RPG/Shop.hs
|
mit
|
rings :: [Ring]
rings =
[ Ring (Item "Damage +1" 25 1 0)
, Ring (Item "Damage +2" 50 2 0)
, Ring (Item "Damage +3" 100 3 0)
, Ring (Item "Defense +1" 20 0 1)
, Ring (Item "Defense +2" 40 0 2)
, Ring (Item "Defense +3" 80 0 3)
]
| 241
|
rings :: [Ring]
rings =
[ Ring (Item "Damage +1" 25 1 0)
, Ring (Item "Damage +2" 50 2 0)
, Ring (Item "Damage +3" 100 3 0)
, Ring (Item "Defense +1" 20 0 1)
, Ring (Item "Defense +2" 40 0 2)
, Ring (Item "Defense +3" 80 0 3)
]
| 241
|
rings =
[ Ring (Item "Damage +1" 25 1 0)
, Ring (Item "Damage +2" 50 2 0)
, Ring (Item "Damage +3" 100 3 0)
, Ring (Item "Defense +1" 20 0 1)
, Ring (Item "Defense +2" 40 0 2)
, Ring (Item "Defense +3" 80 0 3)
]
| 225
| false
| true
| 0
| 8
| 67
| 122
| 62
| 60
| null | null |
dkandalov/katas
|
haskell/p99/src/p9x/p80/P80.hs
|
unlicense
|
edgeWithLabel :: Char -> Parser (Edge Char Int)
edgeWithLabel nodeSeparator = do
n1 <- nodeValue
char nodeSeparator
n2 <- nodeValue
char '/'
label <- many digit
return $ Edge n1 n2 (read label)
| 217
|
edgeWithLabel :: Char -> Parser (Edge Char Int)
edgeWithLabel nodeSeparator = do
n1 <- nodeValue
char nodeSeparator
n2 <- nodeValue
char '/'
label <- many digit
return $ Edge n1 n2 (read label)
| 217
|
edgeWithLabel nodeSeparator = do
n1 <- nodeValue
char nodeSeparator
n2 <- nodeValue
char '/'
label <- many digit
return $ Edge n1 n2 (read label)
| 169
| false
| true
| 0
| 11
| 56
| 90
| 38
| 52
| null | null |
zuzia/haskell_worker
|
src/Jobpack.hs
|
bsd-3-clause
|
writeBins :: Header -> BL.ByteString -> BL.ByteString -> BL.ByteString -> Handle -> IO ()
writeBins header jd je zip_compr handle = do
let bl = B.encode $ (replicate 25 0 :: [Word32]) --TODO
let encoded_header = BL.append (B.encode header) bl
let file_prefix = BL.append encoded_header $ BL.append jd je
let whole_bytestr = BL.append file_prefix (B.encode zip_compr)
putStrLn $ show $ BL.length whole_bytestr
BL.hPut handle whole_bytestr
| 461
|
writeBins :: Header -> BL.ByteString -> BL.ByteString -> BL.ByteString -> Handle -> IO ()
writeBins header jd je zip_compr handle = do
let bl = B.encode $ (replicate 25 0 :: [Word32]) --TODO
let encoded_header = BL.append (B.encode header) bl
let file_prefix = BL.append encoded_header $ BL.append jd je
let whole_bytestr = BL.append file_prefix (B.encode zip_compr)
putStrLn $ show $ BL.length whole_bytestr
BL.hPut handle whole_bytestr
| 461
|
writeBins header jd je zip_compr handle = do
let bl = B.encode $ (replicate 25 0 :: [Word32]) --TODO
let encoded_header = BL.append (B.encode header) bl
let file_prefix = BL.append encoded_header $ BL.append jd je
let whole_bytestr = BL.append file_prefix (B.encode zip_compr)
putStrLn $ show $ BL.length whole_bytestr
BL.hPut handle whole_bytestr
| 371
| false
| true
| 0
| 13
| 88
| 182
| 86
| 96
| null | null |
RaphaelJ/friday
|
src/Vision/Primitive/Shape.hs
|
lgpl-3.0
|
pointToPair :: tail :. head -> (tail, head)
pointToPair (a :. b) = (a,b)
| 72
|
pointToPair :: tail :. head -> (tail, head)
pointToPair (a :. b) = (a,b)
| 72
|
pointToPair (a :. b) = (a,b)
| 28
| false
| true
| 0
| 7
| 13
| 41
| 23
| 18
| null | null |
daleooo/barrelfish
|
build/hake/Config.hs
|
mit
|
-- Enable tracing
trace :: Bool
trace = False
| 45
|
trace :: Bool
trace = False
| 27
|
trace = False
| 13
| true
| true
| 0
| 6
| 8
| 19
| 8
| 11
| null | null |
reflex-frp/reflex
|
src/Reflex/Network.hs
|
bsd-3-clause
|
networkHold :: (Adjustable t m, MonadHold t m) => m a -> Event t (m a) -> m (Dynamic t a)
networkHold child0 newChild = do
(result0, newResult) <- runWithReplace child0 newChild
holdDyn result0 newResult
-- | Render a placeholder network to be shown while another network is not yet
-- done building
| 304
|
networkHold :: (Adjustable t m, MonadHold t m) => m a -> Event t (m a) -> m (Dynamic t a)
networkHold child0 newChild = do
(result0, newResult) <- runWithReplace child0 newChild
holdDyn result0 newResult
-- | Render a placeholder network to be shown while another network is not yet
-- done building
| 304
|
networkHold child0 newChild = do
(result0, newResult) <- runWithReplace child0 newChild
holdDyn result0 newResult
-- | Render a placeholder network to be shown while another network is not yet
-- done building
| 214
| false
| true
| 0
| 10
| 57
| 96
| 47
| 49
| null | null |
michalrus/hstatusbar
|
src/HStatusBar/ModuleParser.hs
|
apache-2.0
|
funs :: [Parser Module]
funs =
[ HStatusBar.Time.local
, HStatusBar.Time.universal
, HStatusBar.Bspwm.bspwm
, HStatusBar.Xtitle.xtitle
, HStatusBar.Memory.memory
, HStatusBar.CPU.cpu
, HStatusBar.Disk.disk
, HStatusBar.Battery.battery
, HStatusBar.Alsa.volume
]
| 281
|
funs :: [Parser Module]
funs =
[ HStatusBar.Time.local
, HStatusBar.Time.universal
, HStatusBar.Bspwm.bspwm
, HStatusBar.Xtitle.xtitle
, HStatusBar.Memory.memory
, HStatusBar.CPU.cpu
, HStatusBar.Disk.disk
, HStatusBar.Battery.battery
, HStatusBar.Alsa.volume
]
| 281
|
funs =
[ HStatusBar.Time.local
, HStatusBar.Time.universal
, HStatusBar.Bspwm.bspwm
, HStatusBar.Xtitle.xtitle
, HStatusBar.Memory.memory
, HStatusBar.CPU.cpu
, HStatusBar.Disk.disk
, HStatusBar.Battery.battery
, HStatusBar.Alsa.volume
]
| 257
| false
| true
| 0
| 8
| 44
| 78
| 46
| 32
| null | null |
PolyglotSymposium/textual-game-hs
|
Board.hs
|
mit
|
displayItem _ = " "
| 19
|
displayItem _ = " "
| 19
|
displayItem _ = " "
| 19
| false
| false
| 0
| 5
| 4
| 9
| 4
| 5
| null | null |
imh/plover
|
test/Main.hs
|
mit
|
-- import Simplify
main :: IO ()
main = defaultMain tests
| 58
|
main :: IO ()
main = defaultMain tests
| 38
|
main = defaultMain tests
| 24
| true
| true
| 0
| 6
| 11
| 20
| 10
| 10
| null | null |
rueshyna/gogol
|
gogol-servicecontrol/gen/Network/Google/ServiceControl/Types/Product.hs
|
mpl-2.0
|
-- | Properties of the object. Contains field \'type with type URL.
leppAddtional :: Lens' LogEntryProtoPayload (HashMap Text JSONValue)
leppAddtional
= lens _leppAddtional
(\ s a -> s{_leppAddtional = a})
. _Coerce
| 229
|
leppAddtional :: Lens' LogEntryProtoPayload (HashMap Text JSONValue)
leppAddtional
= lens _leppAddtional
(\ s a -> s{_leppAddtional = a})
. _Coerce
| 161
|
leppAddtional
= lens _leppAddtional
(\ s a -> s{_leppAddtional = a})
. _Coerce
| 92
| true
| true
| 2
| 8
| 45
| 59
| 28
| 31
| null | null |
emwap/feldspar-language
|
src/Feldspar/Repa.hs
|
bsd-3-clause
|
length :: Vector DIM1 a -> Data Length
length (Vector (Z :. l) _) = l
| 69
|
length :: Vector DIM1 a -> Data Length
length (Vector (Z :. l) _) = l
| 69
|
length (Vector (Z :. l) _) = l
| 30
| false
| true
| 0
| 11
| 15
| 46
| 21
| 25
| null | null |
gridaphobe/liquid-fixpoint
|
src/Language/Fixpoint/Solver/UniqifyKVars.hs
|
bsd-3-clause
|
isValidInRefinements (FFunc _ _) = False
| 40
|
isValidInRefinements (FFunc _ _) = False
| 40
|
isValidInRefinements (FFunc _ _) = False
| 40
| false
| false
| 0
| 7
| 5
| 17
| 8
| 9
| null | null |
ghc-android/ghc
|
testsuite/tests/ghci/should_run/ghcirun004.hs
|
bsd-3-clause
|
1055 = 1054
| 11
|
1055 = 1054
| 11
|
1055 = 1054
| 11
| false
| false
| 1
| 5
| 2
| 10
| 3
| 7
| null | null |
MichielDerhaeg/stack
|
src/Stack/Types/VersionIntervals.hs
|
bsd-3-clause
|
toCabalBound InclusiveBound = C.InclusiveBound
| 46
|
toCabalBound InclusiveBound = C.InclusiveBound
| 46
|
toCabalBound InclusiveBound = C.InclusiveBound
| 46
| false
| false
| 0
| 5
| 3
| 11
| 5
| 6
| null | null |
brendanhay/gogol
|
gogol-blogger/gen/Network/Google/Blogger/Types/Product.hs
|
mpl-2.0
|
-- | RFC 3339 date-time when this blog was last updated.
bUpdated :: Lens' Blog (Maybe Text)
bUpdated = lens _bUpdated (\ s a -> s{_bUpdated = a})
| 146
|
bUpdated :: Lens' Blog (Maybe Text)
bUpdated = lens _bUpdated (\ s a -> s{_bUpdated = a})
| 89
|
bUpdated = lens _bUpdated (\ s a -> s{_bUpdated = a})
| 53
| true
| true
| 2
| 9
| 27
| 55
| 25
| 30
| null | null |
Zoetermeer/latro
|
src/Latro/Interp.hs
|
mit
|
interpE (ILUnit _) = return ValueUnit
| 37
|
interpE (ILUnit _) = return ValueUnit
| 37
|
interpE (ILUnit _) = return ValueUnit
| 37
| false
| false
| 0
| 7
| 5
| 18
| 8
| 10
| null | null |
mb21/qua-kit
|
services/siren/app/Main.hs
|
mit
|
----------------------------------------------------------------------------------------------------
-- | The main program
processMessages :: Conduit Message (LuciProgram ServiceState) ByteString
processMessages = do
-- send a first message to register as a service
genToken >>= yield . headerBytes . registerGetList
genToken >>= yield . headerBytes . registerGetScenario
genToken >>= yield . headerBytes . registerCreateScenario "scenario.geojson.Create"
genToken >>= yield . headerBytes . registerCreateScenario "scenario.Create"
genToken >>= yield . headerBytes . registerUpdateScenario
genToken >>= yield . headerBytes . registerDeleteScenario
genToken >>= yield . headerBytes . registerRecoverScenario
genToken >>= yield . headerBytes . registerSubscribeTo
-- reply to all run requests
awaitForever responseMsgs
-- | Respond to one message at a time
| 880
|
processMessages :: Conduit Message (LuciProgram ServiceState) ByteString
processMessages = do
-- send a first message to register as a service
genToken >>= yield . headerBytes . registerGetList
genToken >>= yield . headerBytes . registerGetScenario
genToken >>= yield . headerBytes . registerCreateScenario "scenario.geojson.Create"
genToken >>= yield . headerBytes . registerCreateScenario "scenario.Create"
genToken >>= yield . headerBytes . registerUpdateScenario
genToken >>= yield . headerBytes . registerDeleteScenario
genToken >>= yield . headerBytes . registerRecoverScenario
genToken >>= yield . headerBytes . registerSubscribeTo
-- reply to all run requests
awaitForever responseMsgs
-- | Respond to one message at a time
| 755
|
processMessages = do
-- send a first message to register as a service
genToken >>= yield . headerBytes . registerGetList
genToken >>= yield . headerBytes . registerGetScenario
genToken >>= yield . headerBytes . registerCreateScenario "scenario.geojson.Create"
genToken >>= yield . headerBytes . registerCreateScenario "scenario.Create"
genToken >>= yield . headerBytes . registerUpdateScenario
genToken >>= yield . headerBytes . registerDeleteScenario
genToken >>= yield . headerBytes . registerRecoverScenario
genToken >>= yield . headerBytes . registerSubscribeTo
-- reply to all run requests
awaitForever responseMsgs
-- | Respond to one message at a time
| 682
| true
| true
| 0
| 9
| 126
| 161
| 77
| 84
| null | null |
Hidowga/Projetos
|
dist/build/autogen/Paths_Test.hs
|
bsd-3-clause
|
getDynLibDir :: IO FilePath
getDynLibDir = getPrefixDirRel "x86_64-windows-ghc-8.0.2"
| 85
|
getDynLibDir :: IO FilePath
getDynLibDir = getPrefixDirRel "x86_64-windows-ghc-8.0.2"
| 85
|
getDynLibDir = getPrefixDirRel "x86_64-windows-ghc-8.0.2"
| 57
| false
| true
| 0
| 5
| 7
| 17
| 8
| 9
| null | null |
dimara/ganeti
|
src/Ganeti/OpParams.hs
|
bsd-2-clause
|
pRemoteNodeUuid :: Field
pRemoteNodeUuid =
withDoc "New secondary node UUID" $
optionalNEStringField "remote_node_uuid"
| 123
|
pRemoteNodeUuid :: Field
pRemoteNodeUuid =
withDoc "New secondary node UUID" $
optionalNEStringField "remote_node_uuid"
| 123
|
pRemoteNodeUuid =
withDoc "New secondary node UUID" $
optionalNEStringField "remote_node_uuid"
| 98
| false
| true
| 0
| 6
| 16
| 21
| 10
| 11
| null | null |
vincenthz/hs-cryptohash
|
Bench/Bench.hs
|
bsd-3-clause
|
benchHash :: a -> (a -> B.ByteString) -> Pure
benchHash bs f = whnf f bs
| 72
|
benchHash :: a -> (a -> B.ByteString) -> Pure
benchHash bs f = whnf f bs
| 72
|
benchHash bs f = whnf f bs
| 26
| false
| true
| 0
| 9
| 15
| 38
| 19
| 19
| null | null |
CulpaBS/wbBach
|
src/Futhark/Representation/SOACS/Simplify.hs
|
bsd-3-clause
|
simplifyFun :: MonadFreshNames m => FunDef -> m FunDef
simplifyFun =
Simplifier.simplifyFunWithRules bindableSimpleOps soacRules Engine.noExtraHoistBlockers
| 158
|
simplifyFun :: MonadFreshNames m => FunDef -> m FunDef
simplifyFun =
Simplifier.simplifyFunWithRules bindableSimpleOps soacRules Engine.noExtraHoistBlockers
| 158
|
simplifyFun =
Simplifier.simplifyFunWithRules bindableSimpleOps soacRules Engine.noExtraHoistBlockers
| 103
| false
| true
| 0
| 7
| 16
| 36
| 17
| 19
| null | null |
anttisalonen/lvm
|
src/stau/TypeCheck.hs
|
gpl-3.0
|
nextTypeVariable :: (Functor m, Monad m) => StateT FunCheckState m TypeVariable
nextTypeVariable = do
tv <- typevariable <$> get
modify $ \f -> f{typevariable = incTypeVariable (typevariable f)}
return tv
| 210
|
nextTypeVariable :: (Functor m, Monad m) => StateT FunCheckState m TypeVariable
nextTypeVariable = do
tv <- typevariable <$> get
modify $ \f -> f{typevariable = incTypeVariable (typevariable f)}
return tv
| 210
|
nextTypeVariable = do
tv <- typevariable <$> get
modify $ \f -> f{typevariable = incTypeVariable (typevariable f)}
return tv
| 130
| false
| true
| 0
| 13
| 35
| 79
| 39
| 40
| null | null |
jean-edouard/manager
|
apptool/Import/Images.hs
|
gpl-2.0
|
untemp :: IDIData -> Import IDIData
untemp (IDIData vhd (Just key)) = IDIData <$> untempFileName vhd <*> (Just <$> untempFileName key)
| 134
|
untemp :: IDIData -> Import IDIData
untemp (IDIData vhd (Just key)) = IDIData <$> untempFileName vhd <*> (Just <$> untempFileName key)
| 134
|
untemp (IDIData vhd (Just key)) = IDIData <$> untempFileName vhd <*> (Just <$> untempFileName key)
| 98
| false
| true
| 0
| 9
| 20
| 56
| 27
| 29
| null | null |
tych0/hquery
|
tests/TransformTests.hs
|
mit
|
mkSpan s = Element (T.pack "span") [] $ [TextNode $ T.pack s]
| 61
|
mkSpan s = Element (T.pack "span") [] $ [TextNode $ T.pack s]
| 61
|
mkSpan s = Element (T.pack "span") [] $ [TextNode $ T.pack s]
| 61
| false
| false
| 0
| 9
| 11
| 40
| 19
| 21
| null | null |
suhailshergill/liboleg
|
Control/CCCxe.hs
|
bsd-3-clause
|
newPrompt :: Typeable w => Int -> Prompt PD m w
newPrompt mark = (inj, prj)
where
inj = PD mark
prj (PD mark' c) | mark' == mark,
Just (NCCT x) <- gcast (NCCT c) = Just x
prj _ = Nothing
-- | It is often helpful, for clarity of error messages, to specify the
-- answer-type associated with the prompt explicitly (rather than relying
-- on the type inference to figure that out). The following function
-- is useful for that purpose.
| 460
|
newPrompt :: Typeable w => Int -> Prompt PD m w
newPrompt mark = (inj, prj)
where
inj = PD mark
prj (PD mark' c) | mark' == mark,
Just (NCCT x) <- gcast (NCCT c) = Just x
prj _ = Nothing
-- | It is often helpful, for clarity of error messages, to specify the
-- answer-type associated with the prompt explicitly (rather than relying
-- on the type inference to figure that out). The following function
-- is useful for that purpose.
| 460
|
newPrompt mark = (inj, prj)
where
inj = PD mark
prj (PD mark' c) | mark' == mark,
Just (NCCT x) <- gcast (NCCT c) = Just x
prj _ = Nothing
-- | It is often helpful, for clarity of error messages, to specify the
-- answer-type associated with the prompt explicitly (rather than relying
-- on the type inference to figure that out). The following function
-- is useful for that purpose.
| 412
| false
| true
| 0
| 11
| 112
| 116
| 57
| 59
| null | null |
GaloisInc/halvm-ghc
|
compiler/typecheck/TcType.hs
|
bsd-3-clause
|
isOverlappableTyVar tv
| isTyVar tv
= ASSERT2( isTcTyVar tv, ppr tv )
case tcTyVarDetails tv of
SkolemTv overlappable -> overlappable
_ -> False
| otherwise = False
| 210
|
isOverlappableTyVar tv
| isTyVar tv
= ASSERT2( isTcTyVar tv, ppr tv )
case tcTyVarDetails tv of
SkolemTv overlappable -> overlappable
_ -> False
| otherwise = False
| 210
|
isOverlappableTyVar tv
| isTyVar tv
= ASSERT2( isTcTyVar tv, ppr tv )
case tcTyVarDetails tv of
SkolemTv overlappable -> overlappable
_ -> False
| otherwise = False
| 210
| false
| false
| 0
| 8
| 72
| 70
| 30
| 40
| null | null |
robdockins/canonical-lf
|
Extrinsic.hs
|
bsd-3-clause
|
eval (NatElimP z _s ZeroP) =
Changed (return z)
| 51
|
eval (NatElimP z _s ZeroP) =
Changed (return z)
| 51
|
eval (NatElimP z _s ZeroP) =
Changed (return z)
| 51
| false
| false
| 0
| 7
| 12
| 29
| 13
| 16
| null | null |
lukexi/ghc
|
ghc/Main.hs
|
bsd-3-clause
|
dumpFastStringStats :: DynFlags -> IO ()
dumpFastStringStats dflags = do
buckets <- getFastStringTable
let (entries, longest, has_z) = countFS 0 0 0 buckets
msg = text "FastString stats:" $$
nest 4 (vcat [text "size: " <+> int (length buckets),
text "entries: " <+> int entries,
text "longest chain: " <+> int longest,
text "has z-encoding: " <+> (has_z `pcntOf` entries)
])
-- we usually get more "has z-encoding" than "z-encoded", because
-- when we z-encode a string it might hash to the exact same string,
-- which will is not counted as "z-encoded". Only strings whose
-- Z-encoding is different from the original string are counted in
-- the "z-encoded" total.
putMsg dflags msg
where
x `pcntOf` y = int ((x * 100) `quot` y) <> char '%'
| 933
|
dumpFastStringStats :: DynFlags -> IO ()
dumpFastStringStats dflags = do
buckets <- getFastStringTable
let (entries, longest, has_z) = countFS 0 0 0 buckets
msg = text "FastString stats:" $$
nest 4 (vcat [text "size: " <+> int (length buckets),
text "entries: " <+> int entries,
text "longest chain: " <+> int longest,
text "has z-encoding: " <+> (has_z `pcntOf` entries)
])
-- we usually get more "has z-encoding" than "z-encoded", because
-- when we z-encode a string it might hash to the exact same string,
-- which will is not counted as "z-encoded". Only strings whose
-- Z-encoding is different from the original string are counted in
-- the "z-encoded" total.
putMsg dflags msg
where
x `pcntOf` y = int ((x * 100) `quot` y) <> char '%'
| 933
|
dumpFastStringStats dflags = do
buckets <- getFastStringTable
let (entries, longest, has_z) = countFS 0 0 0 buckets
msg = text "FastString stats:" $$
nest 4 (vcat [text "size: " <+> int (length buckets),
text "entries: " <+> int entries,
text "longest chain: " <+> int longest,
text "has z-encoding: " <+> (has_z `pcntOf` entries)
])
-- we usually get more "has z-encoding" than "z-encoded", because
-- when we z-encode a string it might hash to the exact same string,
-- which will is not counted as "z-encoded". Only strings whose
-- Z-encoding is different from the original string are counted in
-- the "z-encoded" total.
putMsg dflags msg
where
x `pcntOf` y = int ((x * 100) `quot` y) <> char '%'
| 892
| false
| true
| 1
| 18
| 318
| 201
| 101
| 100
| null | null |
turion/hasched
|
TestLatex.hs
|
gpl-3.0
|
betreuerB= [ BetreuerBelegung (globalB!!0) betreuer, BetreuerBelegung (globalB!!1) betreuer]
| 92
|
betreuerB= [ BetreuerBelegung (globalB!!0) betreuer, BetreuerBelegung (globalB!!1) betreuer]
| 92
|
betreuerB= [ BetreuerBelegung (globalB!!0) betreuer, BetreuerBelegung (globalB!!1) betreuer]
| 92
| false
| false
| 0
| 8
| 7
| 36
| 19
| 17
| null | null |
rahulmutt/ghcvm
|
compiler/Eta/Prelude/PrimOp.hs
|
bsd-3-clause
|
primOpInfo FreezeArrayOp = mkGenPrimOp (fsLit "freezeArray#") [deltaTyVar, alphaTyVar] [mkMutableArrayPrimTy deltaTy alphaTy, intPrimTy, intPrimTy, mkStatePrimTy deltaTy] ((mkTupleTy UnboxedTuple [mkStatePrimTy deltaTy, mkArrayPrimTy alphaTy]))
| 245
|
primOpInfo FreezeArrayOp = mkGenPrimOp (fsLit "freezeArray#") [deltaTyVar, alphaTyVar] [mkMutableArrayPrimTy deltaTy alphaTy, intPrimTy, intPrimTy, mkStatePrimTy deltaTy] ((mkTupleTy UnboxedTuple [mkStatePrimTy deltaTy, mkArrayPrimTy alphaTy]))
| 245
|
primOpInfo FreezeArrayOp = mkGenPrimOp (fsLit "freezeArray#") [deltaTyVar, alphaTyVar] [mkMutableArrayPrimTy deltaTy alphaTy, intPrimTy, intPrimTy, mkStatePrimTy deltaTy] ((mkTupleTy UnboxedTuple [mkStatePrimTy deltaTy, mkArrayPrimTy alphaTy]))
| 245
| false
| false
| 0
| 10
| 21
| 73
| 38
| 35
| null | null |
haslab/SecreC
|
src/Language/SecreC/Prover/Expression.hs
|
gpl-3.0
|
expr2ProverMb e@(BuiltinExpr l n args) = builtin2Prover (unTyped l) n args
| 74
|
expr2ProverMb e@(BuiltinExpr l n args) = builtin2Prover (unTyped l) n args
| 74
|
expr2ProverMb e@(BuiltinExpr l n args) = builtin2Prover (unTyped l) n args
| 74
| false
| false
| 0
| 8
| 10
| 35
| 17
| 18
| null | null |
suhailshergill/liboleg
|
Lambda/CFG1EN.hs
|
bsd-3-clause
|
like = "likes"
| 16
|
like = "likes"
| 16
|
like = "likes"
| 16
| false
| false
| 1
| 5
| 4
| 10
| 3
| 7
| null | null |
eklavya/Idris-dev
|
src/Idris/Package.hs
|
bsd-3-clause
|
-- --------------------------------------------------------- [ Build Packages ]
-- | Run the package through the idris compiler.
buildPkg :: [Opt] -- ^ Command line options
-> Bool -- ^ Provide Warnings
-> (Bool, FilePath) -- ^ (Should we install, Location of iPKG file)
-> IO ()
buildPkg copts warnonly (install, fp) = do
pkgdesc <- parseDesc fp
dir <- getCurrentDirectory
let idx' = pkgIndex $ pkgname pkgdesc
idx = PkgIndex $ case opt getIBCSubDir copts of
(ibcsubdir:_) -> ibcsubdir </> idx'
[] -> idx'
oks <- mapM (testLib warnonly (pkgname pkgdesc)) (libdeps pkgdesc)
when (and oks) $ do
m_ist <- inPkgDir pkgdesc $ do
make (makefile pkgdesc)
case (execout pkgdesc) of
Nothing -> do
case mergeOptions copts (idx : NoREPL : Verbose : idris_opts pkgdesc) of
Left emsg -> do
putStrLn emsg
exitWith (ExitFailure 1)
Right opts -> buildMods opts (modules pkgdesc)
Just o -> do
let exec = dir </> o
case mergeOptions copts (idx : NoREPL : Verbose : Output exec : idris_opts pkgdesc) of
Left emsg -> do
putStrLn emsg
exitWith (ExitFailure 1)
Right opts -> buildMain opts (idris_main pkgdesc)
case m_ist of
Nothing -> exitWith (ExitFailure 1)
Just ist -> do
-- Quit with error code if there was a problem
case errSpan ist of
Just _ -> exitWith (ExitFailure 1)
_ -> return ()
when install $ installPkg (opt getIBCSubDir copts) pkgdesc
where
buildMain opts (Just mod) = buildMods opts [mod]
buildMain _ Nothing = do
putStrLn "Can't build an executable: No main module given"
exitWith (ExitFailure 1)
-- --------------------------------------------------------- [ Check Packages ]
-- | Type check packages only
--
-- This differs from build in that executables are not built, if the
-- package contains an executable.
| 2,065
|
buildPkg :: [Opt] -- ^ Command line options
-> Bool -- ^ Provide Warnings
-> (Bool, FilePath) -- ^ (Should we install, Location of iPKG file)
-> IO ()
buildPkg copts warnonly (install, fp) = do
pkgdesc <- parseDesc fp
dir <- getCurrentDirectory
let idx' = pkgIndex $ pkgname pkgdesc
idx = PkgIndex $ case opt getIBCSubDir copts of
(ibcsubdir:_) -> ibcsubdir </> idx'
[] -> idx'
oks <- mapM (testLib warnonly (pkgname pkgdesc)) (libdeps pkgdesc)
when (and oks) $ do
m_ist <- inPkgDir pkgdesc $ do
make (makefile pkgdesc)
case (execout pkgdesc) of
Nothing -> do
case mergeOptions copts (idx : NoREPL : Verbose : idris_opts pkgdesc) of
Left emsg -> do
putStrLn emsg
exitWith (ExitFailure 1)
Right opts -> buildMods opts (modules pkgdesc)
Just o -> do
let exec = dir </> o
case mergeOptions copts (idx : NoREPL : Verbose : Output exec : idris_opts pkgdesc) of
Left emsg -> do
putStrLn emsg
exitWith (ExitFailure 1)
Right opts -> buildMain opts (idris_main pkgdesc)
case m_ist of
Nothing -> exitWith (ExitFailure 1)
Just ist -> do
-- Quit with error code if there was a problem
case errSpan ist of
Just _ -> exitWith (ExitFailure 1)
_ -> return ()
when install $ installPkg (opt getIBCSubDir copts) pkgdesc
where
buildMain opts (Just mod) = buildMods opts [mod]
buildMain _ Nothing = do
putStrLn "Can't build an executable: No main module given"
exitWith (ExitFailure 1)
-- --------------------------------------------------------- [ Check Packages ]
-- | Type check packages only
--
-- This differs from build in that executables are not built, if the
-- package contains an executable.
| 1,934
|
buildPkg copts warnonly (install, fp) = do
pkgdesc <- parseDesc fp
dir <- getCurrentDirectory
let idx' = pkgIndex $ pkgname pkgdesc
idx = PkgIndex $ case opt getIBCSubDir copts of
(ibcsubdir:_) -> ibcsubdir </> idx'
[] -> idx'
oks <- mapM (testLib warnonly (pkgname pkgdesc)) (libdeps pkgdesc)
when (and oks) $ do
m_ist <- inPkgDir pkgdesc $ do
make (makefile pkgdesc)
case (execout pkgdesc) of
Nothing -> do
case mergeOptions copts (idx : NoREPL : Verbose : idris_opts pkgdesc) of
Left emsg -> do
putStrLn emsg
exitWith (ExitFailure 1)
Right opts -> buildMods opts (modules pkgdesc)
Just o -> do
let exec = dir </> o
case mergeOptions copts (idx : NoREPL : Verbose : Output exec : idris_opts pkgdesc) of
Left emsg -> do
putStrLn emsg
exitWith (ExitFailure 1)
Right opts -> buildMain opts (idris_main pkgdesc)
case m_ist of
Nothing -> exitWith (ExitFailure 1)
Just ist -> do
-- Quit with error code if there was a problem
case errSpan ist of
Just _ -> exitWith (ExitFailure 1)
_ -> return ()
when install $ installPkg (opt getIBCSubDir copts) pkgdesc
where
buildMain opts (Just mod) = buildMods opts [mod]
buildMain _ Nothing = do
putStrLn "Can't build an executable: No main module given"
exitWith (ExitFailure 1)
-- --------------------------------------------------------- [ Check Packages ]
-- | Type check packages only
--
-- This differs from build in that executables are not built, if the
-- package contains an executable.
| 1,733
| true
| true
| 1
| 26
| 635
| 560
| 263
| 297
| null | null |
spechub/Hets
|
Driver/WriteFn.hs
|
gpl-2.0
|
writeFreeCADFile :: HetcatsOpts -> FilePath -> G_theory -> IO ()
writeFreeCADFile opts filePrefix (G_theory lid _ (ExtSign sign _) _ _ _) = do
fcSign <- coercePlainSign lid FreeCAD
"Expecting a FreeCAD signature for writing FreeCAD xml" sign
writeVerbFile opts (filePrefix ++ ".xml") $ exportXMLFC fcSign
| 320
|
writeFreeCADFile :: HetcatsOpts -> FilePath -> G_theory -> IO ()
writeFreeCADFile opts filePrefix (G_theory lid _ (ExtSign sign _) _ _ _) = do
fcSign <- coercePlainSign lid FreeCAD
"Expecting a FreeCAD signature for writing FreeCAD xml" sign
writeVerbFile opts (filePrefix ++ ".xml") $ exportXMLFC fcSign
| 320
|
writeFreeCADFile opts filePrefix (G_theory lid _ (ExtSign sign _) _ _ _) = do
fcSign <- coercePlainSign lid FreeCAD
"Expecting a FreeCAD signature for writing FreeCAD xml" sign
writeVerbFile opts (filePrefix ++ ".xml") $ exportXMLFC fcSign
| 255
| false
| true
| 0
| 10
| 61
| 97
| 46
| 51
| null | null |
Tomoaki-Hashizaki/pesca
|
src/PrelSequent.hs
|
gpl-2.0
|
some :: Parser a b -> Parser a [b]
some p = (p ... many p) *** uncurry (:)
| 74
|
some :: Parser a b -> Parser a [b]
some p = (p ... many p) *** uncurry (:)
| 74
|
some p = (p ... many p) *** uncurry (:)
| 39
| false
| true
| 1
| 8
| 18
| 57
| 28
| 29
| null | null |
nbloomf/st-haskell
|
src/STH/Lib/Text.hs
|
gpl-3.0
|
getGlyphs :: String -> [String]
getGlyphs = unfoldr firstGlyph
where
firstGlyph :: String -> Maybe (String, String)
firstGlyph "" = Nothing
firstGlyph (x:xs) = if isMark x
then Just $ break (not . isMark) (x:xs)
else do
let (as,bs) = break (not . isMark) xs
Just (x:as, bs)
--getGlyphs.E
| 329
|
getGlyphs :: String -> [String]
getGlyphs = unfoldr firstGlyph
where
firstGlyph :: String -> Maybe (String, String)
firstGlyph "" = Nothing
firstGlyph (x:xs) = if isMark x
then Just $ break (not . isMark) (x:xs)
else do
let (as,bs) = break (not . isMark) xs
Just (x:as, bs)
--getGlyphs.E
| 329
|
getGlyphs = unfoldr firstGlyph
where
firstGlyph :: String -> Maybe (String, String)
firstGlyph "" = Nothing
firstGlyph (x:xs) = if isMark x
then Just $ break (not . isMark) (x:xs)
else do
let (as,bs) = break (not . isMark) xs
Just (x:as, bs)
--getGlyphs.E
| 297
| false
| true
| 0
| 13
| 90
| 144
| 75
| 69
| null | null |
supki/ldap-client
|
src/Ldap/Asn1/ToAsn1.hs
|
bsd-2-clause
|
sequence :: Endo [ASN1] -> Endo [ASN1]
sequence = construction Asn1.Sequence
| 76
|
sequence :: Endo [ASN1] -> Endo [ASN1]
sequence = construction Asn1.Sequence
| 76
|
sequence = construction Asn1.Sequence
| 37
| false
| true
| 0
| 8
| 10
| 38
| 17
| 21
| null | null |
spechub/Hets
|
OWL2/Morphism.hs
|
gpl-2.0
|
symMapOf :: OWLMorphism -> Map.Map Entity Entity
symMapOf mor = Map.union (symMap $ mmaps mor) $ setToMap $ symOf $ osource mor
| 127
|
symMapOf :: OWLMorphism -> Map.Map Entity Entity
symMapOf mor = Map.union (symMap $ mmaps mor) $ setToMap $ symOf $ osource mor
| 127
|
symMapOf mor = Map.union (symMap $ mmaps mor) $ setToMap $ symOf $ osource mor
| 78
| false
| true
| 0
| 11
| 21
| 55
| 26
| 29
| null | null |
quickdudley/phaser
|
Codec/Phaser/Core.hs
|
bsd-3-clause
|
starve (a :+++ b) = prune1 (starve a :+++ starve b)
| 51
|
starve (a :+++ b) = prune1 (starve a :+++ starve b)
| 51
|
starve (a :+++ b) = prune1 (starve a :+++ starve b)
| 51
| false
| false
| 0
| 8
| 10
| 33
| 15
| 18
| null | null |
tekul/cryptonite
|
Crypto/PubKey/ECC/Prim.hs
|
bsd-3-clause
|
pointDouble (CurveF2m (CurveBinary fx cc)) (Point xp yp)
| xp == 0 = PointO
| otherwise = fromMaybe PointO $ do
s <- return . addF2m xp =<< divF2m fx yp xp
let xr = mulF2m fx s s `addF2m` s `addF2m` a
yr = mulF2m fx xp xp `addF2m` mulF2m fx xr (s `addF2m` 1)
return $ Point xr yr
where a = ecc_a cc
-- | Elliptic curve point multiplication using the base
--
-- /WARNING:/ Vulnerable to timing attacks.
| 450
|
pointDouble (CurveF2m (CurveBinary fx cc)) (Point xp yp)
| xp == 0 = PointO
| otherwise = fromMaybe PointO $ do
s <- return . addF2m xp =<< divF2m fx yp xp
let xr = mulF2m fx s s `addF2m` s `addF2m` a
yr = mulF2m fx xp xp `addF2m` mulF2m fx xr (s `addF2m` 1)
return $ Point xr yr
where a = ecc_a cc
-- | Elliptic curve point multiplication using the base
--
-- /WARNING:/ Vulnerable to timing attacks.
| 450
|
pointDouble (CurveF2m (CurveBinary fx cc)) (Point xp yp)
| xp == 0 = PointO
| otherwise = fromMaybe PointO $ do
s <- return . addF2m xp =<< divF2m fx yp xp
let xr = mulF2m fx s s `addF2m` s `addF2m` a
yr = mulF2m fx xp xp `addF2m` mulF2m fx xr (s `addF2m` 1)
return $ Point xr yr
where a = ecc_a cc
-- | Elliptic curve point multiplication using the base
--
-- /WARNING:/ Vulnerable to timing attacks.
| 450
| false
| false
| 1
| 14
| 130
| 170
| 85
| 85
| null | null |
shnarazk/satter
|
Satter/PlayerSAT.hs
|
gpl-3.0
|
zones :: [Int]
zones = [1 .. numOfGrid]
| 39
|
zones :: [Int]
zones = [1 .. numOfGrid]
| 39
|
zones = [1 .. numOfGrid]
| 24
| false
| true
| 0
| 5
| 7
| 20
| 12
| 8
| null | null |
pparkkin/eta
|
compiler/ETA/HsSyn/HsExpr.hs
|
bsd-3-clause
|
-- applications don't display anything themselves
isQuietHsCmd (HsCmdApp _ _) = True
| 84
|
isQuietHsCmd (HsCmdApp _ _) = True
| 34
|
isQuietHsCmd (HsCmdApp _ _) = True
| 34
| true
| false
| 0
| 7
| 11
| 18
| 9
| 9
| null | null |
m-alvarez/jhc
|
src/Util/Seq.hs
|
mit
|
fromList :: [a] -> Seq a
fromList xs = Seq (\ts -> xs++ts)
| 58
|
fromList :: [a] -> Seq a
fromList xs = Seq (\ts -> xs++ts)
| 58
|
fromList xs = Seq (\ts -> xs++ts)
| 33
| false
| true
| 0
| 8
| 12
| 39
| 20
| 19
| null | null |
rueshyna/gogol
|
gogol-fitness/gen/Network/Google/Fitness/Types/Product.hs
|
mpl-2.0
|
bbtpValue :: Lens' BucketByTimePeriod (Maybe Int32)
bbtpValue
= lens _bbtpValue (\ s a -> s{_bbtpValue = a}) .
mapping _Coerce
| 134
|
bbtpValue :: Lens' BucketByTimePeriod (Maybe Int32)
bbtpValue
= lens _bbtpValue (\ s a -> s{_bbtpValue = a}) .
mapping _Coerce
| 134
|
bbtpValue
= lens _bbtpValue (\ s a -> s{_bbtpValue = a}) .
mapping _Coerce
| 82
| false
| true
| 0
| 10
| 27
| 54
| 27
| 27
| null | null |
pparkkin/eta
|
compiler/ETA/Core/CoreSyn.hs
|
bsd-3-clause
|
-- | Returns @True@ iff the expression is a 'Type' or 'Coercion'
-- expression at its top level
isTyCoArg :: Expr b -> Bool
isTyCoArg (Type {}) = True
| 154
|
isTyCoArg :: Expr b -> Bool
isTyCoArg (Type {}) = True
| 58
|
isTyCoArg (Type {}) = True
| 30
| true
| true
| 0
| 6
| 32
| 35
| 17
| 18
| null | null |
Zigazou/containers
|
Data/Sequence.hs
|
bsd-3-clause
|
consTree a (Deep s (Three b c d) m sf) =
Deep (size a + s) (Four a b c d) m sf
| 82
|
consTree a (Deep s (Three b c d) m sf) =
Deep (size a + s) (Four a b c d) m sf
| 82
|
consTree a (Deep s (Three b c d) m sf) =
Deep (size a + s) (Four a b c d) m sf
| 82
| false
| false
| 0
| 9
| 26
| 64
| 31
| 33
| null | null |
abuiles/turbinado-blog
|
tmp/compiled/App/Controllers/Posts.hs
|
bsd-3-clause
|
-- Show a form where We can write a new post .
-- View : /App/Views/Posts/New.hs
new :: Controller ()
new = do setViewDataValue "save-url" ("Create") -- setViewDataValue allow the controller to send data to the view .
-- check : http://www.turbinado.org/Architecture/Show/architecture-5-controllers
-- Insert a new post in the db
| 386
|
new :: Controller ()
new = do setViewDataValue "save-url" ("Create") -- setViewDataValue allow the controller to send data to the view .
-- check : http://www.turbinado.org/Architecture/Show/architecture-5-controllers
-- Insert a new post in the db
| 305
|
new = do setViewDataValue "save-url" ("Create") -- setViewDataValue allow the controller to send data to the view .
-- check : http://www.turbinado.org/Architecture/Show/architecture-5-controllers
-- Insert a new post in the db
| 284
| true
| true
| 1
| 9
| 106
| 36
| 18
| 18
| null | null |
filiphrenic/hash
|
Parse.hs
|
apache-2.0
|
pAppendS = pStream ">>"
| 27
|
pAppendS = pStream ">>"
| 27
|
pAppendS = pStream ">>"
| 27
| false
| false
| 0
| 5
| 7
| 9
| 4
| 5
| null | null |
haskell-pkg-janitors/feed
|
Text/Atom/Feed.hs
|
bsd-3-clause
|
nullPerson :: Person
nullPerson = Person
{ personName = ""
, personURI = Nothing
, personEmail = Nothing
, personOther = []
}
| 138
|
nullPerson :: Person
nullPerson = Person
{ personName = ""
, personURI = Nothing
, personEmail = Nothing
, personOther = []
}
| 138
|
nullPerson = Person
{ personName = ""
, personURI = Nothing
, personEmail = Nothing
, personOther = []
}
| 117
| false
| true
| 0
| 8
| 35
| 43
| 25
| 18
| null | null |
brendanhay/gogol
|
gogol-sheets/gen/Network/Google/Sheets/Types/Product.hs
|
mpl-2.0
|
-- | Creates a value of 'DimensionProperties' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'dpDataSourceColumnReference'
--
-- * 'dpHiddenByFilter'
--
-- * 'dpPixelSize'
--
-- * 'dpHiddenByUser'
--
-- * 'dpDeveloperMetadata'
dimensionProperties
:: DimensionProperties
dimensionProperties =
DimensionProperties'
{ _dpDataSourceColumnReference = Nothing
, _dpHiddenByFilter = Nothing
, _dpPixelSize = Nothing
, _dpHiddenByUser = Nothing
, _dpDeveloperMetadata = Nothing
}
| 587
|
dimensionProperties
:: DimensionProperties
dimensionProperties =
DimensionProperties'
{ _dpDataSourceColumnReference = Nothing
, _dpHiddenByFilter = Nothing
, _dpPixelSize = Nothing
, _dpHiddenByUser = Nothing
, _dpDeveloperMetadata = Nothing
}
| 274
|
dimensionProperties =
DimensionProperties'
{ _dpDataSourceColumnReference = Nothing
, _dpHiddenByFilter = Nothing
, _dpPixelSize = Nothing
, _dpHiddenByUser = Nothing
, _dpDeveloperMetadata = Nothing
}
| 227
| true
| true
| 0
| 7
| 106
| 66
| 42
| 24
| null | null |
jdevelop/hslj
|
LiveJournal/GetEvents.hs
|
bsd-3-clause
|
eventObjectUpdater "events" "poster" value obj = Just $ obj { eventPoster = value }
| 83
|
eventObjectUpdater "events" "poster" value obj = Just $ obj { eventPoster = value }
| 83
|
eventObjectUpdater "events" "poster" value obj = Just $ obj { eventPoster = value }
| 83
| false
| false
| 0
| 7
| 13
| 27
| 14
| 13
| null | null |
nevrenato/Hets_Fork
|
Search/Common/ACStandardization.hs
|
gpl-2.0
|
toList :: (Eq c) =>
Formula (Constant c) (ScopeLabel p) -> [Symbol (Constant c) (ScopeLabel p) p]
toList (Binder c vs f) = ((Lambda c (length vs)):(map toList' vs))++(toList f)
where toList' v = (Variable v 0 False)
-- problem: arity of var in binding positioin unknown! Assume arity 0 i.e. FOL.
| 313
|
toList :: (Eq c) =>
Formula (Constant c) (ScopeLabel p) -> [Symbol (Constant c) (ScopeLabel p) p]
toList (Binder c vs f) = ((Lambda c (length vs)):(map toList' vs))++(toList f)
where toList' v = (Variable v 0 False)
-- problem: arity of var in binding positioin unknown! Assume arity 0 i.e. FOL.
| 313
|
toList (Binder c vs f) = ((Lambda c (length vs)):(map toList' vs))++(toList f)
where toList' v = (Variable v 0 False)
-- problem: arity of var in binding positioin unknown! Assume arity 0 i.e. FOL.
| 205
| false
| true
| 1
| 12
| 69
| 145
| 70
| 75
| null | null |
yliu120/K3
|
src/Language/K3/Core/Expression.hs
|
apache-2.0
|
isEAnnotation :: Annotation Expression -> Bool
isEAnnotation (EAnnotation _) = True
| 83
|
isEAnnotation :: Annotation Expression -> Bool
isEAnnotation (EAnnotation _) = True
| 83
|
isEAnnotation (EAnnotation _) = True
| 36
| false
| true
| 0
| 7
| 10
| 27
| 13
| 14
| null | null |
toonn/sciartt
|
RedBlackTree.hs
|
bsd-2-clause
|
-- Surprisingly difficult to find the right formulation
-- (ins in a pattern guard)
ins :: Ord a => a -> Tree c h a -> Either (Treeish R h a) (Treeish B h a)
ins a ET = Left $ RB (RT ET a ET)
| 191
|
ins :: Ord a => a -> Tree c h a -> Either (Treeish R h a) (Treeish B h a)
ins a ET = Left $ RB (RT ET a ET)
| 107
|
ins a ET = Left $ RB (RT ET a ET)
| 33
| true
| true
| 2
| 11
| 45
| 87
| 41
| 46
| null | null |
portnov/xtt
|
XMonad/TimeTracker/Syntax.hs
|
bsd-3-clause
|
pPrint Duration = "$duration"
| 29
|
pPrint Duration = "$duration"
| 29
|
pPrint Duration = "$duration"
| 29
| false
| false
| 0
| 5
| 3
| 9
| 4
| 5
| null | null |
GaloisInc/sk-dev-platform
|
libs/SCD/src/SCD/SELinux/PrettyPrint.hs
|
bsd-3-clause
|
-- prio should reflect the associativity rules in Parser.y.
prio :: Op -> Int
prio Or = 1
| 89
|
prio :: Op -> Int
prio Or = 1
| 29
|
prio Or = 1
| 11
| true
| true
| 0
| 5
| 17
| 23
| 11
| 12
| null | null |
ygale/yesod
|
yesod-form/Yesod/Form/I18n/Dutch.hs
|
mit
|
dutchFormMessage (MsgInvalidHour t) = "Ongeldig uur: " `mappend` t
| 69
|
dutchFormMessage (MsgInvalidHour t) = "Ongeldig uur: " `mappend` t
| 69
|
dutchFormMessage (MsgInvalidHour t) = "Ongeldig uur: " `mappend` t
| 69
| false
| false
| 0
| 7
| 11
| 21
| 11
| 10
| null | null |
DougBurke/swish
|
src/Swish/RDF/Vocabulary/DublinCore.hs
|
lgpl-2.1
|
------------------------------------------------------------
-- Terms
------------------------------------------------------------
toDCT, toDCE, toDCAM, toDCTYPE :: LName -> ScopedName
toDCT = makeNSScopedName namespaceDCTERMS
| 228
|
toDCT, toDCE, toDCAM, toDCTYPE :: LName -> ScopedName
toDCT = makeNSScopedName namespaceDCTERMS
| 95
|
toDCT = makeNSScopedName namespaceDCTERMS
| 41
| true
| true
| 6
| 7
| 17
| 43
| 18
| 25
| null | null |
swift-nav/plover
|
src/Language/Plover/CodeGen.hs
|
mit
|
mulWidth w k = if w == [cexp| 1 |]
then k
else if w == [cexp| -1 |]
then [cexp| -$k |]
else [cexp| $w * $k |]
| 179
|
mulWidth w k = if w == [cexp| 1 |]
then k
else if w == [cexp| -1 |]
then [cexp| -$k |]
else [cexp| $w * $k |]
| 179
|
mulWidth w k = if w == [cexp| 1 |]
then k
else if w == [cexp| -1 |]
then [cexp| -$k |]
else [cexp| $w * $k |]
| 179
| false
| false
| 1
| 7
| 98
| 56
| 35
| 21
| null | null |
reiddraper/cauterize
|
src/Cauterize/Dynamic/Unpack.hs
|
bsd-3-clause
|
unpackTag C.BIu16 = liftM fromIntegral getWord16le
| 50
|
unpackTag C.BIu16 = liftM fromIntegral getWord16le
| 50
|
unpackTag C.BIu16 = liftM fromIntegral getWord16le
| 50
| false
| false
| 0
| 6
| 5
| 16
| 7
| 9
| null | null |
fffej/HS-Poker
|
LookupPatternMatch.hs
|
bsd-3-clause
|
getValueFromProduct 64379963 = 1676
| 35
|
getValueFromProduct 64379963 = 1676
| 35
|
getValueFromProduct 64379963 = 1676
| 35
| false
| false
| 0
| 5
| 3
| 9
| 4
| 5
| null | null |
arekfu/grammar-haskell
|
src/Grammar/Regex.hs
|
bsd-3-clause
|
size (Concat rs) = sum $ map size rs
| 36
|
size (Concat rs) = sum $ map size rs
| 36
|
size (Concat rs) = sum $ map size rs
| 36
| false
| false
| 2
| 6
| 8
| 28
| 11
| 17
| null | null |
m-alvarez/jhc
|
src/Info/Properties.hs
|
mit
|
prop_SCRUTINIZED = PROP_SCRUTINIZED
| 35
|
prop_SCRUTINIZED = PROP_SCRUTINIZED
| 35
|
prop_SCRUTINIZED = PROP_SCRUTINIZED
| 35
| false
| false
| 0
| 4
| 2
| 6
| 3
| 3
| null | null |
mydaum/cabal
|
cabal-install/Distribution/Client/TargetSelector.hs
|
bsd-3-clause
|
matchPackageFile :: [PackageInfo] -> String -> FileStatus -> Match PackageInfo
matchPackageFile ps = \str fstatus -> do
case fstatus of
FileStatusExistsFile canonfile ->
orNoSuchThing "package .cabal file" str (map (snd . fst) files) $
increaseConfidenceFor $
fmap snd $ matchExactly (fst . fst) files canonfile
_ -> mzero
where
files = [ ((fabs,frel),p)
| p@PackageInfo{ pinfoPackageFile = Just (fabs,frel) } <- ps ]
--TODO: test outcome when dir exists but doesn't match any known one
--TODO: perhaps need another distinction, vs no such thing, point is the
-- thing is not known, within the project, but could be outside project
------------------------------
-- Matching component targets
--
| 768
|
matchPackageFile :: [PackageInfo] -> String -> FileStatus -> Match PackageInfo
matchPackageFile ps = \str fstatus -> do
case fstatus of
FileStatusExistsFile canonfile ->
orNoSuchThing "package .cabal file" str (map (snd . fst) files) $
increaseConfidenceFor $
fmap snd $ matchExactly (fst . fst) files canonfile
_ -> mzero
where
files = [ ((fabs,frel),p)
| p@PackageInfo{ pinfoPackageFile = Just (fabs,frel) } <- ps ]
--TODO: test outcome when dir exists but doesn't match any known one
--TODO: perhaps need another distinction, vs no such thing, point is the
-- thing is not known, within the project, but could be outside project
------------------------------
-- Matching component targets
--
| 768
|
matchPackageFile ps = \str fstatus -> do
case fstatus of
FileStatusExistsFile canonfile ->
orNoSuchThing "package .cabal file" str (map (snd . fst) files) $
increaseConfidenceFor $
fmap snd $ matchExactly (fst . fst) files canonfile
_ -> mzero
where
files = [ ((fabs,frel),p)
| p@PackageInfo{ pinfoPackageFile = Just (fabs,frel) } <- ps ]
--TODO: test outcome when dir exists but doesn't match any known one
--TODO: perhaps need another distinction, vs no such thing, point is the
-- thing is not known, within the project, but could be outside project
------------------------------
-- Matching component targets
--
| 689
| false
| true
| 0
| 18
| 178
| 170
| 91
| 79
| null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.