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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ptitfred/slidecoding
|
src/Slidecoding/Template.hs
|
gpl-3.0
|
deckjsDependencies :: Asset
deckjsDependencies = jquery <> modernizr
where jquery = JS "deckjs/jquery.min.js"
modernizr = JS "deckjs/modernizr.custom.js"
| 168 |
deckjsDependencies :: Asset
deckjsDependencies = jquery <> modernizr
where jquery = JS "deckjs/jquery.min.js"
modernizr = JS "deckjs/modernizr.custom.js"
| 168 |
deckjsDependencies = jquery <> modernizr
where jquery = JS "deckjs/jquery.min.js"
modernizr = JS "deckjs/modernizr.custom.js"
| 140 | false | true | 4 | 6 | 31 | 48 | 18 | 30 | null | null |
DanielWaterworth/Idris-dev
|
src/Idris/AbsSyntaxTree.hs
|
bsd-3-clause
|
consoleDecorate ist AnnKeyword = colouriseKeyword (idris_colourTheme ist)
| 73 |
consoleDecorate ist AnnKeyword = colouriseKeyword (idris_colourTheme ist)
| 73 |
consoleDecorate ist AnnKeyword = colouriseKeyword (idris_colourTheme ist)
| 73 | false | false | 0 | 7 | 6 | 22 | 9 | 13 | null | null |
atom-haskell/language-haskell
|
spec/fixture/multilineSignatures.hs
|
mit
|
-- ^^^^^^^^^ identifier support.function.prelude.undefined
-- <- identifier
function :: String -> Maybe Int = Just . read
| 129 |
function :: String -> Maybe Int = Just . read
| 45 |
function :: String -> Maybe Int = Just . read
| 45 | true | false | 0 | 7 | 24 | 28 | 13 | 15 | null | null |
tomjefferys/fuligite
|
src/Scripting/Fuligite/PropertyList.hs
|
mit
|
toList :: PropList k v -> [Item k v]
toList (PropList items) = Foldable.toList items
| 84 |
toList :: PropList k v -> [Item k v]
toList (PropList items) = Foldable.toList items
| 84 |
toList (PropList items) = Foldable.toList items
| 47 | false | true | 0 | 7 | 14 | 46 | 21 | 25 | null | null |
fredmorcos/attic
|
snippets/haskell/anniversary.hs
|
isc
|
showDate :: Date -> String
showDate (Date y m d) = show y ++ "-" ++ show m ++ "-" ++ show d
| 91 |
showDate :: Date -> String
showDate (Date y m d) = show y ++ "-" ++ show m ++ "-" ++ show d
| 91 |
showDate (Date y m d) = show y ++ "-" ++ show m ++ "-" ++ show d
| 64 | false | true | 0 | 9 | 22 | 53 | 25 | 28 | null | null |
termite2/tsl
|
Frontend/StatementOps.hs
|
bsd-3-clause
|
statCallees s (SInvoke p _ mref mas) = (p,getMethod s mref):(concatMap (exprCallees s) $ catMaybes mas)
| 108 |
statCallees s (SInvoke p _ mref mas) = (p,getMethod s mref):(concatMap (exprCallees s) $ catMaybes mas)
| 108 |
statCallees s (SInvoke p _ mref mas) = (p,getMethod s mref):(concatMap (exprCallees s) $ catMaybes mas)
| 108 | false | false | 0 | 10 | 20 | 57 | 28 | 29 | null | null |
co-dan/NPNTool
|
src/NPNTool/ModelChecker.hs
|
bsd-3-clause
|
verify (NCTLAtom (n,_)) ss (Right _) = error ""
| 47 |
verify (NCTLAtom (n,_)) ss (Right _) = error ""
| 47 |
verify (NCTLAtom (n,_)) ss (Right _) = error ""
| 47 | false | false | 0 | 8 | 8 | 34 | 17 | 17 | null | null |
d0kt0r0/estuary
|
client/src/Estuary/Widgets/Text.hs
|
gpl-3.0
|
holdUniq :: (MonadWidget t m, Eq a) => a -> Event t a -> m (Event t a)
holdUniq i e = holdDyn i e >>= holdUniqDyn >>= return . updated
| 134 |
holdUniq :: (MonadWidget t m, Eq a) => a -> Event t a -> m (Event t a)
holdUniq i e = holdDyn i e >>= holdUniqDyn >>= return . updated
| 134 |
holdUniq i e = holdDyn i e >>= holdUniqDyn >>= return . updated
| 63 | false | true | 0 | 10 | 30 | 74 | 36 | 38 | null | null |
brendanhay/gogol
|
gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Product.hs
|
mpl-2.0
|
-- | Subaccount ID of this remarketing list. This is a read-only,
-- auto-generated field that is only returned in GET requests.
rlSubAccountId :: Lens' RemarketingList (Maybe Int64)
rlSubAccountId
= lens _rlSubAccountId
(\ s a -> s{_rlSubAccountId = a})
. mapping _Coerce
| 286 |
rlSubAccountId :: Lens' RemarketingList (Maybe Int64)
rlSubAccountId
= lens _rlSubAccountId
(\ s a -> s{_rlSubAccountId = a})
. mapping _Coerce
| 157 |
rlSubAccountId
= lens _rlSubAccountId
(\ s a -> s{_rlSubAccountId = a})
. mapping _Coerce
| 103 | true | true | 2 | 8 | 55 | 61 | 29 | 32 | null | null |
rueshyna/gogol
|
gogol-storage/gen/Network/Google/Storage/Types/Product.hs
|
mpl-2.0
|
-- | The modification time of the bucket in RFC 3339 format.
bucUpdated :: Lens' Bucket (Maybe UTCTime)
bucUpdated
= lens _bucUpdated (\ s a -> s{_bucUpdated = a}) .
mapping _DateTime
| 191 |
bucUpdated :: Lens' Bucket (Maybe UTCTime)
bucUpdated
= lens _bucUpdated (\ s a -> s{_bucUpdated = a}) .
mapping _DateTime
| 130 |
bucUpdated
= lens _bucUpdated (\ s a -> s{_bucUpdated = a}) .
mapping _DateTime
| 87 | true | true | 0 | 10 | 39 | 55 | 28 | 27 | null | null |
corajr/scalar-convert
|
test/Examples.hs
|
bsd-3-clause
|
examples :: [(FilePath, BS.ByteString)]
examples = $(embedDir "test/examples")
| 78 |
examples :: [(FilePath, BS.ByteString)]
examples = $(embedDir "test/examples")
| 78 |
examples = $(embedDir "test/examples")
| 38 | false | true | 0 | 7 | 7 | 29 | 16 | 13 | null | null |
nevrenato/Hets_Fork
|
Propositional/AS_BASIC_Propositional.hs
|
gpl-2.0
|
printBasicItems :: BASIC_ITEMS -> Doc
printBasicItems (Axiom_items xs) = vcat $ map pretty xs
| 93 |
printBasicItems :: BASIC_ITEMS -> Doc
printBasicItems (Axiom_items xs) = vcat $ map pretty xs
| 93 |
printBasicItems (Axiom_items xs) = vcat $ map pretty xs
| 55 | false | true | 0 | 6 | 13 | 37 | 17 | 20 | null | null |
ganeti/htools
|
Ganeti/HTools/Text.hs
|
gpl-2.0
|
-- | Serialize a single node
serializeNode :: Group.List -> Node.Node -> String
serializeNode gl node =
printf "%s|%.0f|%d|%d|%.0f|%d|%.0f|%c|%s" (Node.name node)
(Node.tMem node) (Node.nMem node) (Node.fMem node)
(Node.tDsk node) (Node.fDsk node) (Node.tCpu node)
(if Node.offline node then 'Y' else 'N')
(Group.uuid grp)
where grp = Container.find (Node.group node) gl
-- | Generate node file data from node objects
| 486 |
serializeNode :: Group.List -> Node.Node -> String
serializeNode gl node =
printf "%s|%.0f|%d|%d|%.0f|%d|%.0f|%c|%s" (Node.name node)
(Node.tMem node) (Node.nMem node) (Node.fMem node)
(Node.tDsk node) (Node.fDsk node) (Node.tCpu node)
(if Node.offline node then 'Y' else 'N')
(Group.uuid grp)
where grp = Container.find (Node.group node) gl
-- | Generate node file data from node objects
| 457 |
serializeNode gl node =
printf "%s|%.0f|%d|%d|%.0f|%d|%.0f|%c|%s" (Node.name node)
(Node.tMem node) (Node.nMem node) (Node.fMem node)
(Node.tDsk node) (Node.fDsk node) (Node.tCpu node)
(if Node.offline node then 'Y' else 'N')
(Group.uuid grp)
where grp = Container.find (Node.group node) gl
-- | Generate node file data from node objects
| 406 | true | true | 1 | 8 | 126 | 169 | 79 | 90 | null | null |
nevrenato/Hets_Fork
|
GMP/versioning/gmp-coloss-0.0.3/GMP/Logics/SysS.hs
|
gpl-2.0
|
-- add pairs to a relation until it is transitive, linear and has greatest element 0. if that's not
-- possible, return []
closeRel :: [Int] -> (Int,Int) -> [(Int,Int)] -> [[(Int,Int)]]
closeRel worlds pair@(x,y) rel = -- trace ("closing: " ++ show worlds ++ show pair ++ show rel) $
if pair `elem` rel then
if (okRel worlds rel) then [rel] else []
else
case transBreakers worlds (pair:rel) of
w:ws -> closeRel worlds w (pair:rel)
[] -> case linearBreakers worlds (pair:rel) of
(v,w):ws -> (closeRel worlds v (pair:rel)) ++
(closeRel worlds w (pair:rel))
[] -> case great0Breakers worlds (pair:rel) of
w:ws -> closeRel worlds w (pair:rel)
[] -> [(pair:rel)]
-- return the diagonal relation over worlds
| 1,190 |
closeRel :: [Int] -> (Int,Int) -> [(Int,Int)] -> [[(Int,Int)]]
closeRel worlds pair@(x,y) rel = -- trace ("closing: " ++ show worlds ++ show pair ++ show rel) $
if pair `elem` rel then
if (okRel worlds rel) then [rel] else []
else
case transBreakers worlds (pair:rel) of
w:ws -> closeRel worlds w (pair:rel)
[] -> case linearBreakers worlds (pair:rel) of
(v,w):ws -> (closeRel worlds v (pair:rel)) ++
(closeRel worlds w (pair:rel))
[] -> case great0Breakers worlds (pair:rel) of
w:ws -> closeRel worlds w (pair:rel)
[] -> [(pair:rel)]
-- return the diagonal relation over worlds
| 1,067 |
closeRel worlds pair@(x,y) rel = -- trace ("closing: " ++ show worlds ++ show pair ++ show rel) $
if pair `elem` rel then
if (okRel worlds rel) then [rel] else []
else
case transBreakers worlds (pair:rel) of
w:ws -> closeRel worlds w (pair:rel)
[] -> case linearBreakers worlds (pair:rel) of
(v,w):ws -> (closeRel worlds v (pair:rel)) ++
(closeRel worlds w (pair:rel))
[] -> case great0Breakers worlds (pair:rel) of
w:ws -> closeRel worlds w (pair:rel)
[] -> [(pair:rel)]
-- return the diagonal relation over worlds
| 1,004 | true | true | 0 | 17 | 605 | 292 | 161 | 131 | null | null |
nbrk/datmap2html
|
MapTacops.hs
|
unlicense
|
getMapTacops :: FilePath -> IO MapTacops
getMapTacops fp = do
fbody <- BL.readFile fp
return $ runGet deserialiseMap fbody
| 126 |
getMapTacops :: FilePath -> IO MapTacops
getMapTacops fp = do
fbody <- BL.readFile fp
return $ runGet deserialiseMap fbody
| 126 |
getMapTacops fp = do
fbody <- BL.readFile fp
return $ runGet deserialiseMap fbody
| 85 | false | true | 0 | 9 | 22 | 45 | 20 | 25 | null | null |
juhp/network-uri
|
tests/uri001.hs
|
bsd-3-clause
|
testRFC41 = testRelJoin "testRFC41" rfcbase "./g/." "http://a/b/c/g/"
| 69 |
testRFC41 = testRelJoin "testRFC41" rfcbase "./g/." "http://a/b/c/g/"
| 69 |
testRFC41 = testRelJoin "testRFC41" rfcbase "./g/." "http://a/b/c/g/"
| 69 | false | false | 0 | 5 | 6 | 15 | 7 | 8 | null | null |
brendanhay/gogol
|
gogol-bigtableadmin/gen/Network/Google/Resource/BigtableAdmin/Projects/Locations/Get.hs
|
mpl-2.0
|
-- | V1 error format.
plgXgafv :: Lens' ProjectsLocationsGet (Maybe Xgafv)
plgXgafv = lens _plgXgafv (\ s a -> s{_plgXgafv = a})
| 128 |
plgXgafv :: Lens' ProjectsLocationsGet (Maybe Xgafv)
plgXgafv = lens _plgXgafv (\ s a -> s{_plgXgafv = a})
| 106 |
plgXgafv = lens _plgXgafv (\ s a -> s{_plgXgafv = a})
| 53 | true | true | 0 | 9 | 21 | 46 | 25 | 21 | null | null |
sgraf812/lowgl
|
Graphics/GL/Low/VAO.hs
|
bsd-2-clause
|
deleteVAO :: (MonadIO m) => VAO -> m ()
deleteVAO (VAO n) = liftIO $ withArray [n] (\ptr -> glDeleteVertexArrays 1 ptr)
| 119 |
deleteVAO :: (MonadIO m) => VAO -> m ()
deleteVAO (VAO n) = liftIO $ withArray [n] (\ptr -> glDeleteVertexArrays 1 ptr)
| 119 |
deleteVAO (VAO n) = liftIO $ withArray [n] (\ptr -> glDeleteVertexArrays 1 ptr)
| 79 | false | true | 0 | 9 | 21 | 63 | 32 | 31 | null | null |
fffej/HS-Poker
|
LookupPatternMatch.hs
|
bsd-3-clause
|
getValueFromProduct 1952194 = 3617
| 34 |
getValueFromProduct 1952194 = 3617
| 34 |
getValueFromProduct 1952194 = 3617
| 34 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
li-zhirui/EoplLangs
|
src/CallByNeed/Data.hs
|
bsd-3-clause
|
throwError :: String -> StatedTry a
throwError msg = StateT (\s -> Left msg)
| 76 |
throwError :: String -> StatedTry a
throwError msg = StateT (\s -> Left msg)
| 76 |
throwError msg = StateT (\s -> Left msg)
| 40 | false | true | 0 | 8 | 13 | 35 | 17 | 18 | null | null |
afwlehmann/rhm-io-iter
|
src/RHM/IterateeT.hs
|
bsd-3-clause
|
_done :: Monad m => a -> Input e -> IterateeT e m a
_done x = IterateeT . return . DoneM x
| 90 |
_done :: Monad m => a -> Input e -> IterateeT e m a
_done x = IterateeT . return . DoneM x
| 90 |
_done x = IterateeT . return . DoneM x
| 38 | false | true | 0 | 8 | 22 | 50 | 23 | 27 | null | null |
rahulmutt/ghcvm
|
compiler/Eta/SimplCore/OccurAnal.hs
|
bsd-3-clause
|
tagBinder :: UsageDetails -- Of scope
-> Id -- Binders
-> (UsageDetails, -- Details with binders removed
IdWithOccInfo) -- Tagged binders
tagBinder usage binder
= let
usage' = usage `delVarEnv` binder
binder' = setBinderOcc usage binder
in
usage' `seq` (usage', binder')
| 368 |
tagBinder :: UsageDetails -- Of scope
-> Id -- Binders
-> (UsageDetails, -- Details with binders removed
IdWithOccInfo)
tagBinder usage binder
= let
usage' = usage `delVarEnv` binder
binder' = setBinderOcc usage binder
in
usage' `seq` (usage', binder')
| 342 |
tagBinder usage binder
= let
usage' = usage `delVarEnv` binder
binder' = setBinderOcc usage binder
in
usage' `seq` (usage', binder')
| 150 | true | true | 0 | 9 | 138 | 73 | 42 | 31 | null | null |
GaloisInc/halvm-ghc
|
compiler/typecheck/TcType.hs
|
bsd-3-clause
|
evVarPred :: EvVar -> PredType
evVarPred var
| debugIsOn
= case evVarPred_maybe var of
Just pred -> pred
Nothing -> pprPanic "tcEvVarPred" (ppr var <+> ppr (varType var))
| otherwise
= varType var
| 216 |
evVarPred :: EvVar -> PredType
evVarPred var
| debugIsOn
= case evVarPred_maybe var of
Just pred -> pred
Nothing -> pprPanic "tcEvVarPred" (ppr var <+> ppr (varType var))
| otherwise
= varType var
| 216 |
evVarPred var
| debugIsOn
= case evVarPred_maybe var of
Just pred -> pred
Nothing -> pprPanic "tcEvVarPred" (ppr var <+> ppr (varType var))
| otherwise
= varType var
| 185 | false | true | 0 | 14 | 52 | 90 | 39 | 51 | null | null |
berdario/jira2sheet
|
src/Jira2Sheet/Auth.hs
|
bsd-3-clause
|
getJiraCredentials :: (MonadInput m) => m (JiraUsername, JiraPassword)
getJiraCredentials = do
user <- getInputLine "Jira username>"
password <- getPassword' "Jira password>"
return (user, password)
| 210 |
getJiraCredentials :: (MonadInput m) => m (JiraUsername, JiraPassword)
getJiraCredentials = do
user <- getInputLine "Jira username>"
password <- getPassword' "Jira password>"
return (user, password)
| 210 |
getJiraCredentials = do
user <- getInputLine "Jira username>"
password <- getPassword' "Jira password>"
return (user, password)
| 139 | false | true | 0 | 8 | 35 | 61 | 30 | 31 | null | null |
phischu/fragnix
|
tests/packages/scotty/Data.Attoparsec.ByteString.Buffer.hs
|
bsd-3-clause
|
substring :: Int -> Int -> Buffer -> ByteString
substring s l (Buf fp off len _ _) =
assert (s >= 0 && s <= len) .
assert (l >= 0 && l <= len-s) $
PS fp (off+s) l
| 168 |
substring :: Int -> Int -> Buffer -> ByteString
substring s l (Buf fp off len _ _) =
assert (s >= 0 && s <= len) .
assert (l >= 0 && l <= len-s) $
PS fp (off+s) l
| 168 |
substring s l (Buf fp off len _ _) =
assert (s >= 0 && s <= len) .
assert (l >= 0 && l <= len-s) $
PS fp (off+s) l
| 120 | false | true | 0 | 12 | 46 | 106 | 53 | 53 | null | null |
IreneKnapp/Faction
|
libfaction/Distribution/Simple/Command.hs
|
bsd-3-clause
|
getChoiceByLongFlag :: OptDescr b -> String -> Maybe (b->b)
getChoiceByLongFlag (ChoiceOpt alts) val = listToMaybe [ set | (_,(_sf,lf:_), set, _) <- alts
, lf == val]
| 227 |
getChoiceByLongFlag :: OptDescr b -> String -> Maybe (b->b)
getChoiceByLongFlag (ChoiceOpt alts) val = listToMaybe [ set | (_,(_sf,lf:_), set, _) <- alts
, lf == val]
| 227 |
getChoiceByLongFlag (ChoiceOpt alts) val = listToMaybe [ set | (_,(_sf,lf:_), set, _) <- alts
, lf == val]
| 167 | false | true | 0 | 11 | 87 | 87 | 46 | 41 | null | null |
gleachkr/Carnap
|
Carnap/src/Carnap/Languages/PurePropositional/Util.hs
|
gpl-3.0
|
isBoolean x = isBooleanUnary x || isBooleanBinary x
| 51 |
isBoolean x = isBooleanUnary x || isBooleanBinary x
| 51 |
isBoolean x = isBooleanUnary x || isBooleanBinary x
| 51 | false | false | 1 | 6 | 7 | 22 | 8 | 14 | null | null |
k-bx/par
|
src/Main.hs
|
mit
|
main :: IO ()
main = do
hSetBuffering stderr LineBuffering
hSetBuffering stdout NoBuffering
execParser opts >>= tryStdin >>= work
where
opts = info (helper <*> parser) (fullDesc <> progDesc desc)
desc = "Run several commands in parallel"
| 253 |
main :: IO ()
main = do
hSetBuffering stderr LineBuffering
hSetBuffering stdout NoBuffering
execParser opts >>= tryStdin >>= work
where
opts = info (helper <*> parser) (fullDesc <> progDesc desc)
desc = "Run several commands in parallel"
| 253 |
main = do
hSetBuffering stderr LineBuffering
hSetBuffering stdout NoBuffering
execParser opts >>= tryStdin >>= work
where
opts = info (helper <*> parser) (fullDesc <> progDesc desc)
desc = "Run several commands in parallel"
| 239 | false | true | 1 | 9 | 52 | 82 | 38 | 44 | null | null |
nomeata/ghc
|
ghc/GhciMonad.hs
|
bsd-3-clause
|
recordBreak :: BreakLocation -> GHCi (Bool{- was already present -}, Int)
recordBreak brkLoc = do
st <- getGHCiState
let oldActiveBreaks = breaks st
-- don't store the same break point twice
case [ nm | (nm, loc) <- oldActiveBreaks, loc == brkLoc ] of
(nm:_) -> return (True, nm)
[] -> do
let oldCounter = break_ctr st
newCounter = oldCounter + 1
setGHCiState $ st { break_ctr = newCounter,
breaks = (oldCounter, brkLoc) : oldActiveBreaks
}
return (False, oldCounter)
| 567 |
recordBreak :: BreakLocation -> GHCi (Bool{- was already present -}, Int)
recordBreak brkLoc = do
st <- getGHCiState
let oldActiveBreaks = breaks st
-- don't store the same break point twice
case [ nm | (nm, loc) <- oldActiveBreaks, loc == brkLoc ] of
(nm:_) -> return (True, nm)
[] -> do
let oldCounter = break_ctr st
newCounter = oldCounter + 1
setGHCiState $ st { break_ctr = newCounter,
breaks = (oldCounter, brkLoc) : oldActiveBreaks
}
return (False, oldCounter)
| 567 |
recordBreak brkLoc = do
st <- getGHCiState
let oldActiveBreaks = breaks st
-- don't store the same break point twice
case [ nm | (nm, loc) <- oldActiveBreaks, loc == brkLoc ] of
(nm:_) -> return (True, nm)
[] -> do
let oldCounter = break_ctr st
newCounter = oldCounter + 1
setGHCiState $ st { break_ctr = newCounter,
breaks = (oldCounter, brkLoc) : oldActiveBreaks
}
return (False, oldCounter)
| 493 | false | true | 0 | 16 | 178 | 174 | 91 | 83 | null | null |
brendanhay/gogol
|
gogol-clouderrorreporting/gen/Network/Google/Resource/CloudErrorReporting/Projects/Groups/Update.hs
|
mpl-2.0
|
-- | Multipart request metadata.
pguPayload :: Lens' ProjectsGroupsUpdate ErrorGroup
pguPayload
= lens _pguPayload (\ s a -> s{_pguPayload = a})
| 146 |
pguPayload :: Lens' ProjectsGroupsUpdate ErrorGroup
pguPayload
= lens _pguPayload (\ s a -> s{_pguPayload = a})
| 113 |
pguPayload
= lens _pguPayload (\ s a -> s{_pguPayload = a})
| 61 | true | true | 0 | 9 | 22 | 42 | 22 | 20 | null | null |
Gurmeet-Singh/Zeno
|
src/Zeno/HaskellParser.hs
|
mit
|
simplifyCases expr = expr
| 25 |
simplifyCases expr = expr
| 25 |
simplifyCases expr = expr
| 25 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
mrkkrp/stack
|
src/Data/Store/VersionTagged.hs
|
bsd-3-clause
|
versionedDecodeOrLoad :: Data a => VersionConfig a -> Q Exp
versionedDecodeOrLoad vc = [| versionedDecodeOrLoadImpl $(encodeWithVersionQ vc) $(decodeWithVersionQ vc) |]
| 168 |
versionedDecodeOrLoad :: Data a => VersionConfig a -> Q Exp
versionedDecodeOrLoad vc = [| versionedDecodeOrLoadImpl $(encodeWithVersionQ vc) $(decodeWithVersionQ vc) |]
| 168 |
versionedDecodeOrLoad vc = [| versionedDecodeOrLoadImpl $(encodeWithVersionQ vc) $(decodeWithVersionQ vc) |]
| 108 | false | true | 0 | 7 | 19 | 34 | 17 | 17 | null | null |
hguenther/nbis
|
MemoryModel/Snow/Object.hs
|
agpl-3.0
|
ptrCompare f NullPointer NullPointer = constant True
| 52 |
ptrCompare f NullPointer NullPointer = constant True
| 52 |
ptrCompare f NullPointer NullPointer = constant True
| 52 | false | false | 0 | 5 | 6 | 16 | 7 | 9 | null | null |
vladimir-ipatov/ganeti
|
test/hs/Test/Ganeti/Storage/Drbd/Parser.hs
|
gpl-2.0
|
-- | Test a DRBD 8.0 file with a missing device.
case_drbd8 :: Assertion
case_drbd8 = testParser (drbdStatusParser []) "proc_drbd8.txt" $
DRBDStatus
( VersionInfo (Just "8.0.12") (Just "86") (Just "86") Nothing
(Just "5c9f89594553e32adb87d9638dce591782f947e3")
(Just "XXX")
)
[ DeviceInfo 0 Connected (LocalRemote Primary Secondary)
(LocalRemote UpToDate UpToDate) 'C' "r---"
(PerfIndicators 4375577 0 4446279 674 1067 69 0 0 0 0 Nothing
Nothing Nothing)
Nothing
(Just $ AdditionalInfo 0 61 0 0 0 0 0)
(Just $ AdditionalInfo 0 257 793749 1067 0 0 1067)
Nothing,
DeviceInfo 1 Connected (LocalRemote Secondary Primary)
(LocalRemote UpToDate UpToDate) 'C' "r---"
(PerfIndicators 738320 0 738320 554400 67 0 0 0 0 0 Nothing
Nothing Nothing)
Nothing
(Just $ AdditionalInfo 0 61 0 0 0 0 0)
(Just $ AdditionalInfo 0 257 92464 67 0 0 67)
Nothing,
UnconfiguredDevice 2,
DeviceInfo 4 WFConnection (LocalRemote Primary Unknown)
(LocalRemote UpToDate DUnknown) 'C' "r---"
(PerfIndicators 738320 0 738320 554400 67 0 0 0 0 0 Nothing
Nothing Nothing)
Nothing
(Just $ AdditionalInfo 0 61 0 0 0 0 0)
(Just $ AdditionalInfo 0 257 92464 67 0 0 67)
Nothing,
DeviceInfo 5 Connected (LocalRemote Primary Secondary)
(LocalRemote UpToDate Diskless) 'C' "r---"
(PerfIndicators 4375581 0 4446283 674 1069 69 0 0 0 0 Nothing
Nothing Nothing)
Nothing
(Just $ AdditionalInfo 0 61 0 0 0 0 0)
(Just $ AdditionalInfo 0 257 793750 1069 0 0 1069)
Nothing,
DeviceInfo 6 Connected (LocalRemote Secondary Primary)
(LocalRemote Diskless UpToDate) 'C' "r---"
(PerfIndicators 0 4375581 5186925 327 75 214 0 0 0 0 Nothing
Nothing Nothing)
Nothing
Nothing
Nothing
Nothing,
DeviceInfo 7 WFConnection (LocalRemote Secondary Unknown)
(LocalRemote UpToDate DUnknown) 'C' "r---"
(PerfIndicators 0 0 0 0 0 0 0 0 0 0 Nothing Nothing Nothing)
Nothing
(Just $ AdditionalInfo 0 61 0 0 0 0 0)
(Just $ AdditionalInfo 0 257 0 0 0 0 0)
Nothing,
DeviceInfo 8 StandAlone (LocalRemote Secondary Unknown)
(LocalRemote UpToDate DUnknown) ' ' "r---"
(PerfIndicators 0 0 0 0 0 0 0 0 0 0 Nothing Nothing Nothing)
Nothing
(Just $ AdditionalInfo 0 61 0 0 0 0 0)
(Just $ AdditionalInfo 0 257 0 0 0 0 0)
Nothing
]
| 2,609 |
case_drbd8 :: Assertion
case_drbd8 = testParser (drbdStatusParser []) "proc_drbd8.txt" $
DRBDStatus
( VersionInfo (Just "8.0.12") (Just "86") (Just "86") Nothing
(Just "5c9f89594553e32adb87d9638dce591782f947e3")
(Just "XXX")
)
[ DeviceInfo 0 Connected (LocalRemote Primary Secondary)
(LocalRemote UpToDate UpToDate) 'C' "r---"
(PerfIndicators 4375577 0 4446279 674 1067 69 0 0 0 0 Nothing
Nothing Nothing)
Nothing
(Just $ AdditionalInfo 0 61 0 0 0 0 0)
(Just $ AdditionalInfo 0 257 793749 1067 0 0 1067)
Nothing,
DeviceInfo 1 Connected (LocalRemote Secondary Primary)
(LocalRemote UpToDate UpToDate) 'C' "r---"
(PerfIndicators 738320 0 738320 554400 67 0 0 0 0 0 Nothing
Nothing Nothing)
Nothing
(Just $ AdditionalInfo 0 61 0 0 0 0 0)
(Just $ AdditionalInfo 0 257 92464 67 0 0 67)
Nothing,
UnconfiguredDevice 2,
DeviceInfo 4 WFConnection (LocalRemote Primary Unknown)
(LocalRemote UpToDate DUnknown) 'C' "r---"
(PerfIndicators 738320 0 738320 554400 67 0 0 0 0 0 Nothing
Nothing Nothing)
Nothing
(Just $ AdditionalInfo 0 61 0 0 0 0 0)
(Just $ AdditionalInfo 0 257 92464 67 0 0 67)
Nothing,
DeviceInfo 5 Connected (LocalRemote Primary Secondary)
(LocalRemote UpToDate Diskless) 'C' "r---"
(PerfIndicators 4375581 0 4446283 674 1069 69 0 0 0 0 Nothing
Nothing Nothing)
Nothing
(Just $ AdditionalInfo 0 61 0 0 0 0 0)
(Just $ AdditionalInfo 0 257 793750 1069 0 0 1069)
Nothing,
DeviceInfo 6 Connected (LocalRemote Secondary Primary)
(LocalRemote Diskless UpToDate) 'C' "r---"
(PerfIndicators 0 4375581 5186925 327 75 214 0 0 0 0 Nothing
Nothing Nothing)
Nothing
Nothing
Nothing
Nothing,
DeviceInfo 7 WFConnection (LocalRemote Secondary Unknown)
(LocalRemote UpToDate DUnknown) 'C' "r---"
(PerfIndicators 0 0 0 0 0 0 0 0 0 0 Nothing Nothing Nothing)
Nothing
(Just $ AdditionalInfo 0 61 0 0 0 0 0)
(Just $ AdditionalInfo 0 257 0 0 0 0 0)
Nothing,
DeviceInfo 8 StandAlone (LocalRemote Secondary Unknown)
(LocalRemote UpToDate DUnknown) ' ' "r---"
(PerfIndicators 0 0 0 0 0 0 0 0 0 0 Nothing Nothing Nothing)
Nothing
(Just $ AdditionalInfo 0 61 0 0 0 0 0)
(Just $ AdditionalInfo 0 257 0 0 0 0 0)
Nothing
]
| 2,560 |
case_drbd8 = testParser (drbdStatusParser []) "proc_drbd8.txt" $
DRBDStatus
( VersionInfo (Just "8.0.12") (Just "86") (Just "86") Nothing
(Just "5c9f89594553e32adb87d9638dce591782f947e3")
(Just "XXX")
)
[ DeviceInfo 0 Connected (LocalRemote Primary Secondary)
(LocalRemote UpToDate UpToDate) 'C' "r---"
(PerfIndicators 4375577 0 4446279 674 1067 69 0 0 0 0 Nothing
Nothing Nothing)
Nothing
(Just $ AdditionalInfo 0 61 0 0 0 0 0)
(Just $ AdditionalInfo 0 257 793749 1067 0 0 1067)
Nothing,
DeviceInfo 1 Connected (LocalRemote Secondary Primary)
(LocalRemote UpToDate UpToDate) 'C' "r---"
(PerfIndicators 738320 0 738320 554400 67 0 0 0 0 0 Nothing
Nothing Nothing)
Nothing
(Just $ AdditionalInfo 0 61 0 0 0 0 0)
(Just $ AdditionalInfo 0 257 92464 67 0 0 67)
Nothing,
UnconfiguredDevice 2,
DeviceInfo 4 WFConnection (LocalRemote Primary Unknown)
(LocalRemote UpToDate DUnknown) 'C' "r---"
(PerfIndicators 738320 0 738320 554400 67 0 0 0 0 0 Nothing
Nothing Nothing)
Nothing
(Just $ AdditionalInfo 0 61 0 0 0 0 0)
(Just $ AdditionalInfo 0 257 92464 67 0 0 67)
Nothing,
DeviceInfo 5 Connected (LocalRemote Primary Secondary)
(LocalRemote UpToDate Diskless) 'C' "r---"
(PerfIndicators 4375581 0 4446283 674 1069 69 0 0 0 0 Nothing
Nothing Nothing)
Nothing
(Just $ AdditionalInfo 0 61 0 0 0 0 0)
(Just $ AdditionalInfo 0 257 793750 1069 0 0 1069)
Nothing,
DeviceInfo 6 Connected (LocalRemote Secondary Primary)
(LocalRemote Diskless UpToDate) 'C' "r---"
(PerfIndicators 0 4375581 5186925 327 75 214 0 0 0 0 Nothing
Nothing Nothing)
Nothing
Nothing
Nothing
Nothing,
DeviceInfo 7 WFConnection (LocalRemote Secondary Unknown)
(LocalRemote UpToDate DUnknown) 'C' "r---"
(PerfIndicators 0 0 0 0 0 0 0 0 0 0 Nothing Nothing Nothing)
Nothing
(Just $ AdditionalInfo 0 61 0 0 0 0 0)
(Just $ AdditionalInfo 0 257 0 0 0 0 0)
Nothing,
DeviceInfo 8 StandAlone (LocalRemote Secondary Unknown)
(LocalRemote UpToDate DUnknown) ' ' "r---"
(PerfIndicators 0 0 0 0 0 0 0 0 0 0 Nothing Nothing Nothing)
Nothing
(Just $ AdditionalInfo 0 61 0 0 0 0 0)
(Just $ AdditionalInfo 0 257 0 0 0 0 0)
Nothing
]
| 2,536 | true | true | 0 | 9 | 814 | 855 | 427 | 428 | null | null |
plow-technologies/ghcjs-servant-client
|
test-server/src/Server.hs
|
mit
|
serverApi :: Proxy Api
serverApi = Proxy
| 40 |
serverApi :: Proxy Api
serverApi = Proxy
| 40 |
serverApi = Proxy
| 17 | false | true | 0 | 5 | 6 | 14 | 7 | 7 | null | null |
pgj/bead
|
src/Bead/Persistence/SQL/Class.hs
|
bsd-3-clause
|
-- | Converts an entity key to a domain key
fromEntityKey :: (PersistEntity record, DomainKey k, record ~ EntityForKey k) => Key record -> k
fromEntityKey = toDomainKey
| 168 |
fromEntityKey :: (PersistEntity record, DomainKey k, record ~ EntityForKey k) => Key record -> k
fromEntityKey = toDomainKey
| 124 |
fromEntityKey = toDomainKey
| 27 | true | true | 0 | 8 | 27 | 45 | 23 | 22 | null | null |
rueshyna/gogol
|
gogol-adexchange-buyer/gen/Network/Google/AdExchangeBuyer/Types/Product.hs
|
mpl-2.0
|
-- | Creates a value of 'PricePerBuyer' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ppbPrice'
--
-- * 'ppbAuctionTier'
--
-- * 'ppbBuyer'
pricePerBuyer
:: PricePerBuyer
pricePerBuyer =
PricePerBuyer'
{ _ppbPrice = Nothing
, _ppbAuctionTier = Nothing
, _ppbBuyer = Nothing
}
| 387 |
pricePerBuyer
:: PricePerBuyer
pricePerBuyer =
PricePerBuyer'
{ _ppbPrice = Nothing
, _ppbAuctionTier = Nothing
, _ppbBuyer = Nothing
}
| 159 |
pricePerBuyer =
PricePerBuyer'
{ _ppbPrice = Nothing
, _ppbAuctionTier = Nothing
, _ppbBuyer = Nothing
}
| 124 | true | true | 0 | 7 | 84 | 50 | 30 | 20 | null | null |
corajr/cataskell
|
src/Cataskell/GameData/Basics.hs
|
bsd-3-clause
|
allDevelopmentCards :: [DevelopmentCard]
allDevelopmentCards = knights ++ vps ++ roadBuilds ++ inventions ++ monopolies
where knights = replicate 14 Knight
vps = replicate 5 VictoryPoint
roadBuilds = replicate 2 RoadBuilding
inventions = replicate 2 Invention
monopolies = replicate 2 Monopoly
| 327 |
allDevelopmentCards :: [DevelopmentCard]
allDevelopmentCards = knights ++ vps ++ roadBuilds ++ inventions ++ monopolies
where knights = replicate 14 Knight
vps = replicate 5 VictoryPoint
roadBuilds = replicate 2 RoadBuilding
inventions = replicate 2 Invention
monopolies = replicate 2 Monopoly
| 327 |
allDevelopmentCards = knights ++ vps ++ roadBuilds ++ inventions ++ monopolies
where knights = replicate 14 Knight
vps = replicate 5 VictoryPoint
roadBuilds = replicate 2 RoadBuilding
inventions = replicate 2 Invention
monopolies = replicate 2 Monopoly
| 286 | false | true | 4 | 8 | 73 | 83 | 42 | 41 | null | null |
shapr/adventofcode2016
|
src/TwentyThree/Main.hs
|
bsd-3-clause
|
jnz :: Parser Expr
jnz = do
string "jnz"
space
z <- val
space
j <- val
return $ Jnz z j
| 99 |
jnz :: Parser Expr
jnz = do
string "jnz"
space
z <- val
space
j <- val
return $ Jnz z j
| 99 |
jnz = do
string "jnz"
space
z <- val
space
j <- val
return $ Jnz z j
| 80 | false | true | 0 | 8 | 33 | 52 | 22 | 30 | null | null |
kojiromike/Idris-dev
|
src/Idris/Primitives.hs
|
bsd-3-clause
|
bsrem ITChar [Ch x, Ch y] = Just $ Ch (chr $ (ord x) `rem` (ord y))
| 67 |
bsrem ITChar [Ch x, Ch y] = Just $ Ch (chr $ (ord x) `rem` (ord y))
| 67 |
bsrem ITChar [Ch x, Ch y] = Just $ Ch (chr $ (ord x) `rem` (ord y))
| 67 | false | false | 0 | 11 | 16 | 55 | 28 | 27 | null | null |
luisgepeto/HaskellLearning
|
09 Input and Output/04_randomness.hs
|
mit
|
demo6 = threeCoins $ mkStdGen 22
| 32 |
demo6 = threeCoins $ mkStdGen 22
| 32 |
demo6 = threeCoins $ mkStdGen 22
| 32 | false | false | 0 | 6 | 5 | 13 | 6 | 7 | null | null |
kaoskorobase/mescaline
|
resources/hugs/packages/hugsbase/Hugs/GenericPrint.hs
|
gpl-3.0
|
----------------------------------------------------------------
printBadRedex err = do
putChar '{'
print' False err
putChar '}'
| 137 |
printBadRedex err = do
putChar '{'
print' False err
putChar '}'
| 71 |
printBadRedex err = do
putChar '{'
print' False err
putChar '}'
| 71 | true | false | 1 | 8 | 20 | 34 | 12 | 22 | null | null |
Peaker/lamdu
|
test/Test/Lamdu/SugarStubs.hs
|
gpl-3.0
|
mul :: Infix2
mul = arithmeticInfix2 "*"
| 40 |
mul :: Infix2
mul = arithmeticInfix2 "*"
| 40 |
mul = arithmeticInfix2 "*"
| 26 | false | true | 0 | 5 | 6 | 14 | 7 | 7 | null | null |
parapluu/encore
|
src/ir/AST/Desugarer.hs
|
bsd-3-clause
|
-- | Let an expression remember its sugared form.
selfSugar :: Expr -> Expr
selfSugar e = setSugared e e
| 104 |
selfSugar :: Expr -> Expr
selfSugar e = setSugared e e
| 54 |
selfSugar e = setSugared e e
| 28 | true | true | 0 | 7 | 19 | 30 | 13 | 17 | null | null |
svenssonjoel/GCDObsidian
|
Obsidian/GCDObsidian/Exp.hs
|
bsd-3-clause
|
binOpToCBinOp And = CAnd
| 24 |
binOpToCBinOp And = CAnd
| 24 |
binOpToCBinOp And = CAnd
| 24 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
CulpaBS/wbBach
|
src/Language/Futhark/Attributes.hs
|
bsd-3-clause
|
subtypeOf (Prim bt1) (Prim bt2) = bt1 == bt2
| 44 |
subtypeOf (Prim bt1) (Prim bt2) = bt1 == bt2
| 44 |
subtypeOf (Prim bt1) (Prim bt2) = bt1 == bt2
| 44 | false | false | 0 | 7 | 8 | 27 | 13 | 14 | null | null |
slpopejoy/fadno-xml
|
src/Fadno/MusicXml/MusicXml20.hs
|
bsd-2-clause
|
parseGroupSymbolValue :: String -> P.XParse GroupSymbolValue
parseGroupSymbolValue s
| s == "none" = return $ GroupSymbolValueNone
| s == "brace" = return $ GroupSymbolValueBrace
| s == "line" = return $ GroupSymbolValueLine
| s == "bracket" = return $ GroupSymbolValueBracket
| otherwise = P.xfail $ "GroupSymbolValue: " ++ s
| 366 |
parseGroupSymbolValue :: String -> P.XParse GroupSymbolValue
parseGroupSymbolValue s
| s == "none" = return $ GroupSymbolValueNone
| s == "brace" = return $ GroupSymbolValueBrace
| s == "line" = return $ GroupSymbolValueLine
| s == "bracket" = return $ GroupSymbolValueBracket
| otherwise = P.xfail $ "GroupSymbolValue: " ++ s
| 366 |
parseGroupSymbolValue s
| s == "none" = return $ GroupSymbolValueNone
| s == "brace" = return $ GroupSymbolValueBrace
| s == "line" = return $ GroupSymbolValueLine
| s == "bracket" = return $ GroupSymbolValueBracket
| otherwise = P.xfail $ "GroupSymbolValue: " ++ s
| 305 | false | true | 6 | 8 | 88 | 122 | 55 | 67 | null | null |
schell/hdevtools
|
src/Server.hs
|
mit
|
createListenSocket :: FilePath -> IO Socket
createListenSocket socketPath = do
r <- tryJust (guard . isAlreadyInUseError) $ listenOn (UnixSocket socketPath)
case r of
Right socket -> return socket
Left _ -> do
removeFile socketPath
listenOn (UnixSocket socketPath)
| 312 |
createListenSocket :: FilePath -> IO Socket
createListenSocket socketPath = do
r <- tryJust (guard . isAlreadyInUseError) $ listenOn (UnixSocket socketPath)
case r of
Right socket -> return socket
Left _ -> do
removeFile socketPath
listenOn (UnixSocket socketPath)
| 312 |
createListenSocket socketPath = do
r <- tryJust (guard . isAlreadyInUseError) $ listenOn (UnixSocket socketPath)
case r of
Right socket -> return socket
Left _ -> do
removeFile socketPath
listenOn (UnixSocket socketPath)
| 268 | false | true | 0 | 14 | 84 | 97 | 43 | 54 | null | null |
andreasfrom/truths
|
Semtab.hs
|
mit
|
rank _ = 4
| 10 |
rank _ = 4
| 10 |
rank _ = 4
| 10 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
x-y-z/cabal
|
Cabal/Distribution/Simple/Utils.hs
|
bsd-3-clause
|
isInfixOf :: String -> String -> Bool
isInfixOf needle haystack = any (isPrefixOf needle) (tails haystack)
| 106 |
isInfixOf :: String -> String -> Bool
isInfixOf needle haystack = any (isPrefixOf needle) (tails haystack)
| 106 |
isInfixOf needle haystack = any (isPrefixOf needle) (tails haystack)
| 68 | false | true | 0 | 7 | 15 | 41 | 20 | 21 | null | null |
snoyberg/ghc
|
compiler/utils/UniqSet.hs
|
bsd-3-clause
|
unionUniqSets = plusUFM
| 23 |
unionUniqSets = plusUFM
| 23 |
unionUniqSets = plusUFM
| 23 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
audreyt/stringtable-atom
|
src/StringTable/AtomMap.hs
|
bsd-3-clause
|
insert :: Atom -> a -> AtomMap a -> AtomMap a
insert l v = MkAtomMap . IM.insert (fromAtom l) v . fromAtomMap
| 109 |
insert :: Atom -> a -> AtomMap a -> AtomMap a
insert l v = MkAtomMap . IM.insert (fromAtom l) v . fromAtomMap
| 109 |
insert l v = MkAtomMap . IM.insert (fromAtom l) v . fromAtomMap
| 63 | false | true | 0 | 9 | 22 | 55 | 26 | 29 | null | null |
NHALX/BeaEngine-Haskell
|
BeaEngine/BeaEngine.hs
|
lgpl-3.0
|
mc_id :: MachineCode -> Word32
mc_id X86_32{} = 0
| 49 |
mc_id :: MachineCode -> Word32
mc_id X86_32{} = 0
| 49 |
mc_id X86_32{} = 0
| 18 | false | true | 0 | 5 | 8 | 27 | 12 | 15 | null | null |
brentonashworth/sitecheck
|
src/Network/SiteCheck/Filter.hs
|
bsd-3-clause
|
- | Create a mapping which will add the path from the parent page to any
-- URL string which begins with ?.
addPathToQueries :: URL -> Mapping String
addPathToQueries parent x =
let path = (url_path parent) in
if "?" `isPrefixOf` x
then Just ("/" ++ path ++ x)
else Just x
| 282 |
addPathToQueries :: URL -> Mapping String
addPathToQueries parent x =
let path = (url_path parent) in
if "?" `isPrefixOf` x
then Just ("/" ++ path ++ x)
else Just x
| 173 |
addPathToQueries parent x =
let path = (url_path parent) in
if "?" `isPrefixOf` x
then Just ("/" ++ path ++ x)
else Just x
| 131 | true | true | 1 | 12 | 62 | 107 | 53 | 54 | null | null |
bus000/Dikunt
|
plugins/Asked/Main.hs
|
bsd-3-clause
|
handleRequest :: P.Pipe Request T.Text Asked ()
handleRequest = forever $ do
req <- P.await
case req of
HelpRequest -> giveHelp
ChangeProbabilityRequest newProb -> updateProb newProb
OtherMessage -> handleOther
| 242 |
handleRequest :: P.Pipe Request T.Text Asked ()
handleRequest = forever $ do
req <- P.await
case req of
HelpRequest -> giveHelp
ChangeProbabilityRequest newProb -> updateProb newProb
OtherMessage -> handleOther
| 242 |
handleRequest = forever $ do
req <- P.await
case req of
HelpRequest -> giveHelp
ChangeProbabilityRequest newProb -> updateProb newProb
OtherMessage -> handleOther
| 194 | false | true | 1 | 12 | 60 | 75 | 33 | 42 | null | null |
ghc-android/ghc
|
testsuite/tests/ghci/should_run/ghcirun004.hs
|
bsd-3-clause
|
1581 = 1580
| 11 |
1581 = 1580
| 11 |
1581 = 1580
| 11 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
ezyang/ghc
|
testsuite/tests/partial-sigs/should_compile/T10403.hs
|
bsd-3-clause
|
app2 :: H (B t)
app2 = h2 (H . I) (B ())
| 40 |
app2 :: H (B t)
app2 = h2 (H . I) (B ())
| 40 |
app2 = h2 (H . I) (B ())
| 24 | false | true | 0 | 8 | 12 | 40 | 20 | 20 | null | null |
GaloisInc/halvm-ghc
|
compiler/stranal/DmdAnal.hs
|
bsd-3-clause
|
annotateLamBndrs :: AnalEnv -> DFunFlag -> DmdType -> [Var] -> (DmdType, [Var])
annotateLamBndrs env args_of_dfun ty bndrs = mapAccumR annotate ty bndrs
where
annotate dmd_ty bndr
| isId bndr = annotateLamIdBndr env args_of_dfun dmd_ty Many bndr
| otherwise = (dmd_ty, bndr)
| 292 |
annotateLamBndrs :: AnalEnv -> DFunFlag -> DmdType -> [Var] -> (DmdType, [Var])
annotateLamBndrs env args_of_dfun ty bndrs = mapAccumR annotate ty bndrs
where
annotate dmd_ty bndr
| isId bndr = annotateLamIdBndr env args_of_dfun dmd_ty Many bndr
| otherwise = (dmd_ty, bndr)
| 292 |
annotateLamBndrs env args_of_dfun ty bndrs = mapAccumR annotate ty bndrs
where
annotate dmd_ty bndr
| isId bndr = annotateLamIdBndr env args_of_dfun dmd_ty Many bndr
| otherwise = (dmd_ty, bndr)
| 212 | false | true | 1 | 10 | 58 | 102 | 51 | 51 | null | null |
juliagoda/givenfind
|
src/GivenFind/Chemistry.hs
|
bsd-3-clause
|
physConstants :: [String]
physConstants = ["L-atm/mol-deg", "gas constant", "gas constants"]
| 92 |
physConstants :: [String]
physConstants = ["L-atm/mol-deg", "gas constant", "gas constants"]
| 92 |
physConstants = ["L-atm/mol-deg", "gas constant", "gas constants"]
| 66 | false | true | 0 | 5 | 9 | 23 | 14 | 9 | null | null |
rodrigogribeiro/mptc
|
src/Iface/ClassInstCollector.hs
|
bsd-3-clause
|
isInst :: Decl -> Bool
isInst InstDecl{} = True
| 47 |
isInst :: Decl -> Bool
isInst InstDecl{} = True
| 47 |
isInst InstDecl{} = True
| 24 | false | true | 0 | 5 | 8 | 27 | 12 | 15 | null | null |
agocorona/Workflow
|
Control/Workflow.hs
|
bsd-3-clause
|
getWFStat :: Monad m => Workflow m (DBRef Stat)
getWFStat= WF $ \s -> return (s,self s)
| 87 |
getWFStat :: Monad m => Workflow m (DBRef Stat)
getWFStat= WF $ \s -> return (s,self s)
| 87 |
getWFStat= WF $ \s -> return (s,self s)
| 39 | false | true | 0 | 9 | 16 | 50 | 25 | 25 | null | null |
dimara/ganeti
|
src/Ganeti/Types.hs
|
bsd-2-clause
|
roleDescription NRCandidate = "master candidate"
| 48 |
roleDescription NRCandidate = "master candidate"
| 48 |
roleDescription NRCandidate = "master candidate"
| 48 | false | false | 1 | 5 | 4 | 13 | 4 | 9 | null | null |
peteg/ADHOC
|
Tests/08_Kesterel/002_nothing_nothing_parenv.hs
|
gpl-2.0
|
-- e :: ArrowComb (~>) => E (~>) ((), ()) ((), ())
e = nothingE *** nothingE
| 76 |
e = nothingE *** nothingE
| 25 |
e = nothingE *** nothingE
| 25 | true | false | 1 | 5 | 16 | 14 | 6 | 8 | null | null |
bus000/Dikunt
|
src/IRCWriter/Impl.hs
|
bsd-3-clause
|
writeUser (BT.IRCUser nick (Just user) (Just host)) =
getNickname nick ++ "!" ++ getUsername user ++ "@" ++ getHostname host
| 128 |
writeUser (BT.IRCUser nick (Just user) (Just host)) =
getNickname nick ++ "!" ++ getUsername user ++ "@" ++ getHostname host
| 128 |
writeUser (BT.IRCUser nick (Just user) (Just host)) =
getNickname nick ++ "!" ++ getUsername user ++ "@" ++ getHostname host
| 128 | false | false | 4 | 8 | 23 | 61 | 27 | 34 | null | null |
olsner/ghc
|
testsuite/tests/programs/maessen-hashtab/HashTest.hs
|
bsd-3-clause
|
te :: (Testable a) => String -> a -> IO ()
-- te name prop = putStrLn name >> verboseCheck prop
te name prop = do
putStr name
quickCheckWith stdArgs { maxSuccess = 500, maxSize = 10000 } prop
| 195 |
te :: (Testable a) => String -> a -> IO ()
te name prop = do
putStr name
quickCheckWith stdArgs { maxSuccess = 500, maxSize = 10000 } prop
| 142 |
te name prop = do
putStr name
quickCheckWith stdArgs { maxSuccess = 500, maxSize = 10000 } prop
| 99 | true | true | 0 | 10 | 42 | 72 | 35 | 37 | null | null |
haskell-opengl/OpenGLRaw
|
src/Graphics/GL/Functions/F14.hs
|
bsd-3-clause
|
-- glGetnUniformui64vARB -------------------------------------------------------
glGetnUniformui64vARB
:: MonadIO m
=> GLuint -- ^ @program@.
-> GLint -- ^ @location@.
-> GLsizei -- ^ @bufSize@.
-> Ptr GLuint64 -- ^ @params@ pointing to @bufSize@ elements of type @GLuint64@.
-> m ()
glGetnUniformui64vARB v1 v2 v3 v4 = liftIO $ dyn482 ptr_glGetnUniformui64vARB v1 v2 v3 v4
| 386 |
glGetnUniformui64vARB
:: MonadIO m
=> GLuint -- ^ @program@.
-> GLint -- ^ @location@.
-> GLsizei -- ^ @bufSize@.
-> Ptr GLuint64 -- ^ @params@ pointing to @bufSize@ elements of type @GLuint64@.
-> m ()
glGetnUniformui64vARB v1 v2 v3 v4 = liftIO $ dyn482 ptr_glGetnUniformui64vARB v1 v2 v3 v4
| 304 |
glGetnUniformui64vARB v1 v2 v3 v4 = liftIO $ dyn482 ptr_glGetnUniformui64vARB v1 v2 v3 v4
| 89 | true | true | 0 | 12 | 64 | 75 | 37 | 38 | null | null |
andreasabel/helf
|
src/TermGraph.hs
|
mit
|
evalTGM :: TGM a -> ORefM a
evalTGM (TGM cont) = do
dc <- newORef $ DontCare -- prints as r0
ty <- newORef $ Sort Type
ki <- newORef $ Sort Kind
runReaderT cont $ TGCxt { pType = ty, pKind = ki, pDontCare = dc }
| 221 |
evalTGM :: TGM a -> ORefM a
evalTGM (TGM cont) = do
dc <- newORef $ DontCare -- prints as r0
ty <- newORef $ Sort Type
ki <- newORef $ Sort Kind
runReaderT cont $ TGCxt { pType = ty, pKind = ki, pDontCare = dc }
| 221 |
evalTGM (TGM cont) = do
dc <- newORef $ DontCare -- prints as r0
ty <- newORef $ Sort Type
ki <- newORef $ Sort Kind
runReaderT cont $ TGCxt { pType = ty, pKind = ki, pDontCare = dc }
| 193 | false | true | 0 | 9 | 57 | 100 | 49 | 51 | null | null |
FranklinChen/hugs98-plus-Sep2006
|
packages/HaXml/src/Text/XML/HaXml/Combinators.hs
|
bsd-3-clause
|
iffind :: String -> (String->CFilter i) -> CFilter i -> CFilter i
iffind key yes no c@(CElem (Elem _ as _) _) =
case (lookup key as) of
Nothing -> no c
(Just (AttValue [Left s])) -> yes s c
| 200 |
iffind :: String -> (String->CFilter i) -> CFilter i -> CFilter i
iffind key yes no c@(CElem (Elem _ as _) _) =
case (lookup key as) of
Nothing -> no c
(Just (AttValue [Left s])) -> yes s c
| 200 |
iffind key yes no c@(CElem (Elem _ as _) _) =
case (lookup key as) of
Nothing -> no c
(Just (AttValue [Left s])) -> yes s c
| 134 | false | true | 5 | 11 | 50 | 118 | 59 | 59 | null | null |
HIPERFIT/futhark
|
src/Futhark/TypeCheck.hs
|
isc
|
checkFun ::
Checkable rep =>
FunDef (Aliases rep) ->
TypeM rep ()
checkFun (FunDef _ _ fname rettype params body) =
context ("In function " ++ nameToString fname) $
checkFun'
( fname,
map declExtTypeOf rettype,
funParamsToNameInfos params
)
(Just consumable)
$ do
checkFunParams params
checkRetType rettype
context "When checking function body" $ checkFunBody rettype body
where
consumable =
[ (paramName param, mempty)
| param <- params,
unique $ paramDeclType param
]
| 581 |
checkFun ::
Checkable rep =>
FunDef (Aliases rep) ->
TypeM rep ()
checkFun (FunDef _ _ fname rettype params body) =
context ("In function " ++ nameToString fname) $
checkFun'
( fname,
map declExtTypeOf rettype,
funParamsToNameInfos params
)
(Just consumable)
$ do
checkFunParams params
checkRetType rettype
context "When checking function body" $ checkFunBody rettype body
where
consumable =
[ (paramName param, mempty)
| param <- params,
unique $ paramDeclType param
]
| 581 |
checkFun (FunDef _ _ fname rettype params body) =
context ("In function " ++ nameToString fname) $
checkFun'
( fname,
map declExtTypeOf rettype,
funParamsToNameInfos params
)
(Just consumable)
$ do
checkFunParams params
checkRetType rettype
context "When checking function body" $ checkFunBody rettype body
where
consumable =
[ (paramName param, mempty)
| param <- params,
unique $ paramDeclType param
]
| 509 | false | true | 2 | 10 | 182 | 151 | 73 | 78 | null | null |
soimort/GrassMudHorse
|
Input.hs
|
gpl-2.0
|
parse (A:B:A:xs) = let (num,rest) = parseNumber xs in
(Ref num):(parse rest)
| 95 |
parse (A:B:A:xs) = let (num,rest) = parseNumber xs in
(Ref num):(parse rest)
| 95 |
parse (A:B:A:xs) = let (num,rest) = parseNumber xs in
(Ref num):(parse rest)
| 95 | false | false | 0 | 9 | 30 | 62 | 30 | 32 | null | null |
aneksteind/Core
|
src/Core/Compiler.hs
|
mit
|
compileConstrArgs numArgs [] env = []
| 37 |
compileConstrArgs numArgs [] env = []
| 37 |
compileConstrArgs numArgs [] env = []
| 37 | false | false | 0 | 6 | 5 | 18 | 8 | 10 | null | null |
haskell-distributed/distributed-process-execution
|
tests/TestMailbox.hs
|
bsd-3-clause
|
-- TODO: This whole test suite would be much better off using QuickCheck.
-- The test-framework driver however, doesn't have the API support we'd need
-- to wire in our tests, so we'll have to write a compatibility layer.
-- That should probably go into (or beneath) the C.D.P.P.Test module.
allBuffersShouldRespectFIFOOrdering :: BufferType -> TestResult Bool -> Process ()
allBuffersShouldRespectFIFOOrdering buffT result = do
let [a, b, c] = ["a", "b", "c"]
mbox <- createAndSend buffT [a, b, c]
active mbox acceptEverything
Just Delivery { messages = msgs } <- receiveTimeout (after 2 Seconds)
[ match return ]
let [ma', mb', mc'] = msgs
Just a' <- unwrapMessage ma' :: Process (Maybe String)
Just b' <- unwrapMessage mb' :: Process (Maybe String)
Just c' <- unwrapMessage mc' :: Process (Maybe String)
let values = [a', b', c']
stash result $ values == [a, b, c]
-- if values /= [a, b, c]
-- then liftIO $ putStrLn $ "unexpected " ++ ((show buffT) ++ (" values: " ++ (show values)))
-- else return ()
| 1,092 |
allBuffersShouldRespectFIFOOrdering :: BufferType -> TestResult Bool -> Process ()
allBuffersShouldRespectFIFOOrdering buffT result = do
let [a, b, c] = ["a", "b", "c"]
mbox <- createAndSend buffT [a, b, c]
active mbox acceptEverything
Just Delivery { messages = msgs } <- receiveTimeout (after 2 Seconds)
[ match return ]
let [ma', mb', mc'] = msgs
Just a' <- unwrapMessage ma' :: Process (Maybe String)
Just b' <- unwrapMessage mb' :: Process (Maybe String)
Just c' <- unwrapMessage mc' :: Process (Maybe String)
let values = [a', b', c']
stash result $ values == [a, b, c]
-- if values /= [a, b, c]
-- then liftIO $ putStrLn $ "unexpected " ++ ((show buffT) ++ (" values: " ++ (show values)))
-- else return ()
| 799 |
allBuffersShouldRespectFIFOOrdering buffT result = do
let [a, b, c] = ["a", "b", "c"]
mbox <- createAndSend buffT [a, b, c]
active mbox acceptEverything
Just Delivery { messages = msgs } <- receiveTimeout (after 2 Seconds)
[ match return ]
let [ma', mb', mc'] = msgs
Just a' <- unwrapMessage ma' :: Process (Maybe String)
Just b' <- unwrapMessage mb' :: Process (Maybe String)
Just c' <- unwrapMessage mc' :: Process (Maybe String)
let values = [a', b', c']
stash result $ values == [a, b, c]
-- if values /= [a, b, c]
-- then liftIO $ putStrLn $ "unexpected " ++ ((show buffT) ++ (" values: " ++ (show values)))
-- else return ()
| 716 | true | true | 3 | 12 | 260 | 271 | 136 | 135 | null | null |
jbracker/supermonad-plugin
|
src/Control/Super/Monad/Functions.hs
|
bsd-3-clause
|
- | Standard implementation of if-then-else. Necessary because we are
-- going to use @RebindableSyntax@ together with this prelude.
ifThenElse :: Bool -> a -> a -> a
ifThenElse True t _f = t
| 195 |
ifThenElse :: Bool -> a -> a -> a
ifThenElse True t _f = t
| 59 |
ifThenElse True t _f = t
| 25 | true | true | 2 | 6 | 37 | 60 | 32 | 28 | null | null |
fffej/HS-Poker
|
LookupPatternMatch.hs
|
bsd-3-clause
|
getValueFromProduct 364994 = 4118
| 33 |
getValueFromProduct 364994 = 4118
| 33 |
getValueFromProduct 364994 = 4118
| 33 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
GaloisInc/halvm-ghc
|
compiler/main/DynFlags.hs
|
bsd-3-clause
|
-- | Is the Safe Haskell safe inference mode active
safeInferOn :: DynFlags -> Bool
safeInferOn = safeInfer
| 107 |
safeInferOn :: DynFlags -> Bool
safeInferOn = safeInfer
| 55 |
safeInferOn = safeInfer
| 23 | true | true | 0 | 5 | 17 | 16 | 9 | 7 | null | null |
listx/miro
|
app/Main.hs
|
bsd-2-clause
|
main :: IO ()
main = do
randSeed <- mkRngSeed
opts <- sanitizeOpts =<< execParser (optsParser randSeed)
generateMaze opts
where
optsParser randSeed = info
( helper
<*> versionOption
<*> programOptions randSeed
)
( fullDesc
<> header "miro - a maze generator"
)
versionOption = infoOption
(concat [showVersion version, " ", $(gitHash)])
(long "version" <> help "Show version")
programOptions randSeed
= Opts
<$> optMazeTypeParser
<*> optOutputParser
<*> optSvgFilenameParser
<*> optSvgWidthParser
<*> optSeedParser randSeed
<*> optSizeParser
<*> optQuietParser
mkRngSeed = do
-- FIXME: Because pcg-random 0.1.3.4 does not export the FrozenGen data
-- constructor, we cannot examine it easily (we could do stuff with its
-- Storable typeclass functions, but that's quite painful). For now, we
-- instantiate a throwaway RNG to generate 2 random Word64s, which are
-- then used for the real RNG. Later when pcg-random fixes this, we can do
-- away with this layer of indirection.
rng <- createSystemRandom
s1 <- uniform rng :: IO Word64
s2 <- uniform rng :: IO Word64
return (s1, s2)
| 1,204 |
main :: IO ()
main = do
randSeed <- mkRngSeed
opts <- sanitizeOpts =<< execParser (optsParser randSeed)
generateMaze opts
where
optsParser randSeed = info
( helper
<*> versionOption
<*> programOptions randSeed
)
( fullDesc
<> header "miro - a maze generator"
)
versionOption = infoOption
(concat [showVersion version, " ", $(gitHash)])
(long "version" <> help "Show version")
programOptions randSeed
= Opts
<$> optMazeTypeParser
<*> optOutputParser
<*> optSvgFilenameParser
<*> optSvgWidthParser
<*> optSeedParser randSeed
<*> optSizeParser
<*> optQuietParser
mkRngSeed = do
-- FIXME: Because pcg-random 0.1.3.4 does not export the FrozenGen data
-- constructor, we cannot examine it easily (we could do stuff with its
-- Storable typeclass functions, but that's quite painful). For now, we
-- instantiate a throwaway RNG to generate 2 random Word64s, which are
-- then used for the real RNG. Later when pcg-random fixes this, we can do
-- away with this layer of indirection.
rng <- createSystemRandom
s1 <- uniform rng :: IO Word64
s2 <- uniform rng :: IO Word64
return (s1, s2)
| 1,204 |
main = do
randSeed <- mkRngSeed
opts <- sanitizeOpts =<< execParser (optsParser randSeed)
generateMaze opts
where
optsParser randSeed = info
( helper
<*> versionOption
<*> programOptions randSeed
)
( fullDesc
<> header "miro - a maze generator"
)
versionOption = infoOption
(concat [showVersion version, " ", $(gitHash)])
(long "version" <> help "Show version")
programOptions randSeed
= Opts
<$> optMazeTypeParser
<*> optOutputParser
<*> optSvgFilenameParser
<*> optSvgWidthParser
<*> optSeedParser randSeed
<*> optSizeParser
<*> optQuietParser
mkRngSeed = do
-- FIXME: Because pcg-random 0.1.3.4 does not export the FrozenGen data
-- constructor, we cannot examine it easily (we could do stuff with its
-- Storable typeclass functions, but that's quite painful). For now, we
-- instantiate a throwaway RNG to generate 2 random Word64s, which are
-- then used for the real RNG. Later when pcg-random fixes this, we can do
-- away with this layer of indirection.
rng <- createSystemRandom
s1 <- uniform rng :: IO Word64
s2 <- uniform rng :: IO Word64
return (s1, s2)
| 1,190 | false | true | 23 | 11 | 291 | 271 | 128 | 143 | null | null |
frantisekfarka/ghc-dsi
|
testsuite/tests/typecheck/should_compile/T3108.hs
|
bsd-3-clause
|
-- It is this declaration that causes nontermination of typechecking.
bar :: ()
bar = m1 (1::Int)
| 97 |
bar :: ()
bar = m1 (1::Int)
| 27 |
bar = m1 (1::Int)
| 17 | true | true | 0 | 7 | 16 | 29 | 14 | 15 | null | null |
gspindles/mj-score-eval
|
src/Game/Mahjong/Pattern.hs
|
mit
|
littleThreeWinds = Pattern "Little Three Winds" "小三風" 40
| 60 |
littleThreeWinds = Pattern "Little Three Winds" "小三風" 40
| 60 |
littleThreeWinds = Pattern "Little Three Winds" "小三風" 40
| 60 | false | false | 0 | 5 | 11 | 13 | 6 | 7 | null | null |
snapframework/cufp2011
|
src/Snap/Chat/ChatRoom.hs
|
bsd-3-clause
|
lookupUser :: UserName -> ChatRoom -> IO (Maybe User)
lookupUser userName chatRoom = withMVar userMapMVar $ flip HT.lookup userName
where
userMapMVar = _userMap chatRoom
------------------------------------------------------------------------------
| 259 |
lookupUser :: UserName -> ChatRoom -> IO (Maybe User)
lookupUser userName chatRoom = withMVar userMapMVar $ flip HT.lookup userName
where
userMapMVar = _userMap chatRoom
------------------------------------------------------------------------------
| 259 |
lookupUser userName chatRoom = withMVar userMapMVar $ flip HT.lookup userName
where
userMapMVar = _userMap chatRoom
------------------------------------------------------------------------------
| 205 | false | true | 1 | 9 | 35 | 66 | 29 | 37 | null | null |
mgrabmueller/harpy
|
Harpy/X86CodeGen.hs
|
bsd-3-clause
|
x86_prefetchnta_membase :: Word8 -> Word32 -> CodeGen e s ()
x86_prefetchnta_membase r m = x86_prefetch_membase 0 r m
| 117 |
x86_prefetchnta_membase :: Word8 -> Word32 -> CodeGen e s ()
x86_prefetchnta_membase r m = x86_prefetch_membase 0 r m
| 117 |
x86_prefetchnta_membase r m = x86_prefetch_membase 0 r m
| 56 | false | true | 0 | 8 | 17 | 40 | 19 | 21 | null | null |
snoyberg/yesod-js
|
Yesod/Javascript.hs
|
bsd-2-clause
|
ajaxJson :: Route master -> JS sub master (JSValue jstype, JSFunc)
ajaxJson route = do
render <- lift $ lift getUrlRender
varname <- lift $ lift newIdent
let var = JSVar varname
loadFuncName <- lift $ lift newIdent
let loadFunc = JSFunc loadFuncName
tell $ mempty
{ jsdVars = Set.singleton var
, jsdEvents = Map.singleton var $ \fs ->
"var " <> fromText loadFuncName <> "=function(){$.getJSON('" <>
fromText (render route) <> "', function(data){" <>
fromText varname <> "=data;" <> callFuncs fs <> "})};" <>
fromText loadFuncName <> "();"
}
return (JSValue
{ jsvExpr = fromText varname
, jsvDeps = Set.singleton var
}, loadFunc)
where
callFuncs = mconcat . map (\(JSFunc f) -> fromText f <> "();") . Set.toList
| 844 |
ajaxJson :: Route master -> JS sub master (JSValue jstype, JSFunc)
ajaxJson route = do
render <- lift $ lift getUrlRender
varname <- lift $ lift newIdent
let var = JSVar varname
loadFuncName <- lift $ lift newIdent
let loadFunc = JSFunc loadFuncName
tell $ mempty
{ jsdVars = Set.singleton var
, jsdEvents = Map.singleton var $ \fs ->
"var " <> fromText loadFuncName <> "=function(){$.getJSON('" <>
fromText (render route) <> "', function(data){" <>
fromText varname <> "=data;" <> callFuncs fs <> "})};" <>
fromText loadFuncName <> "();"
}
return (JSValue
{ jsvExpr = fromText varname
, jsvDeps = Set.singleton var
}, loadFunc)
where
callFuncs = mconcat . map (\(JSFunc f) -> fromText f <> "();") . Set.toList
| 844 |
ajaxJson route = do
render <- lift $ lift getUrlRender
varname <- lift $ lift newIdent
let var = JSVar varname
loadFuncName <- lift $ lift newIdent
let loadFunc = JSFunc loadFuncName
tell $ mempty
{ jsdVars = Set.singleton var
, jsdEvents = Map.singleton var $ \fs ->
"var " <> fromText loadFuncName <> "=function(){$.getJSON('" <>
fromText (render route) <> "', function(data){" <>
fromText varname <> "=data;" <> callFuncs fs <> "})};" <>
fromText loadFuncName <> "();"
}
return (JSValue
{ jsvExpr = fromText varname
, jsvDeps = Set.singleton var
}, loadFunc)
where
callFuncs = mconcat . map (\(JSFunc f) -> fromText f <> "();") . Set.toList
| 777 | false | true | 0 | 22 | 251 | 280 | 134 | 146 | null | null |
LightAndLight/pl0-haskell
|
src/PL0/StaticChecker.hs
|
bsd-3-clause
|
checkStatement SError = return SError
| 37 |
checkStatement SError = return SError
| 37 |
checkStatement SError = return SError
| 37 | false | false | 0 | 5 | 4 | 12 | 5 | 7 | null | null |
spaceships/circuit-synthesis
|
src/Circuit.hs
|
mit
|
nsymbols :: Circuit gate -> Int
nsymbols = IM.size . view circ_symlen
| 69 |
nsymbols :: Circuit gate -> Int
nsymbols = IM.size . view circ_symlen
| 69 |
nsymbols = IM.size . view circ_symlen
| 37 | false | true | 1 | 7 | 11 | 35 | 14 | 21 | null | null |
randen/cabal
|
cabal-install/Distribution/Client/Dependency/Modular/Log.hs
|
bsd-3-clause
|
succeedWith :: m -> a -> Log m a
succeedWith m x = Step m (Done x)
| 66 |
succeedWith :: m -> a -> Log m a
succeedWith m x = Step m (Done x)
| 66 |
succeedWith m x = Step m (Done x)
| 33 | false | true | 0 | 7 | 16 | 40 | 19 | 21 | null | null |
sopvop/cabal
|
cabal-install/Distribution/Client/Sandbox.hs
|
bsd-3-clause
|
dumpPackageEnvironment :: Verbosity -> SandboxFlags -> GlobalFlags -> IO ()
dumpPackageEnvironment verbosity _sandboxFlags globalFlags = do
(sandboxDir, pkgEnv) <- tryLoadSandboxConfig verbosity globalFlags
commentPkgEnv <- commentPackageEnvironment sandboxDir
putStrLn . showPackageEnvironmentWithComments (Just commentPkgEnv) $ pkgEnv
-- | Entry point for the 'cabal sandbox init' command.
| 405 |
dumpPackageEnvironment :: Verbosity -> SandboxFlags -> GlobalFlags -> IO ()
dumpPackageEnvironment verbosity _sandboxFlags globalFlags = do
(sandboxDir, pkgEnv) <- tryLoadSandboxConfig verbosity globalFlags
commentPkgEnv <- commentPackageEnvironment sandboxDir
putStrLn . showPackageEnvironmentWithComments (Just commentPkgEnv) $ pkgEnv
-- | Entry point for the 'cabal sandbox init' command.
| 405 |
dumpPackageEnvironment verbosity _sandboxFlags globalFlags = do
(sandboxDir, pkgEnv) <- tryLoadSandboxConfig verbosity globalFlags
commentPkgEnv <- commentPackageEnvironment sandboxDir
putStrLn . showPackageEnvironmentWithComments (Just commentPkgEnv) $ pkgEnv
-- | Entry point for the 'cabal sandbox init' command.
| 329 | false | true | 0 | 11 | 56 | 84 | 40 | 44 | null | null |
Brightgalrs/con-lang-gen
|
src/Gen/Inflection.hs
|
mit
|
bar2 :: [(LexCat, Int, Int, Int, Int, Int)] -> [LexCat] -> Maybe LexCat -> RVar ([ManifestPlace], [(LexCat, Int, Int, Int, Int, Int)])
bar2 ks [] _ = return ([],ks)
| 164 |
bar2 :: [(LexCat, Int, Int, Int, Int, Int)] -> [LexCat] -> Maybe LexCat -> RVar ([ManifestPlace], [(LexCat, Int, Int, Int, Int, Int)])
bar2 ks [] _ = return ([],ks)
| 164 |
bar2 ks [] _ = return ([],ks)
| 29 | false | true | 0 | 11 | 28 | 107 | 61 | 46 | null | null |
oldmanmike/ghc
|
compiler/main/DynFlags.hs
|
bsd-3-clause
|
-- | Unset a 'LangExt.Extension'
xopt_unset :: DynFlags -> LangExt.Extension -> DynFlags
xopt_unset dfs f
= let onoffs = Off f : extensions dfs
in dfs { extensions = onoffs,
extensionFlags = flattenExtensionFlags (language dfs) onoffs }
| 261 |
xopt_unset :: DynFlags -> LangExt.Extension -> DynFlags
xopt_unset dfs f
= let onoffs = Off f : extensions dfs
in dfs { extensions = onoffs,
extensionFlags = flattenExtensionFlags (language dfs) onoffs }
| 228 |
xopt_unset dfs f
= let onoffs = Off f : extensions dfs
in dfs { extensions = onoffs,
extensionFlags = flattenExtensionFlags (language dfs) onoffs }
| 172 | true | true | 0 | 10 | 61 | 82 | 39 | 43 | null | null |
ddssff/pandoc
|
src/Text/Pandoc/Writers/Docx.hs
|
gpl-2.0
|
withTextProp :: Element -> WS a -> WS a
withTextProp d p = do
pushTextProp d
res <- p
popTextProp
return res
| 116 |
withTextProp :: Element -> WS a -> WS a
withTextProp d p = do
pushTextProp d
res <- p
popTextProp
return res
| 116 |
withTextProp d p = do
pushTextProp d
res <- p
popTextProp
return res
| 76 | false | true | 0 | 7 | 29 | 52 | 22 | 30 | null | null |
jeannekamikaze/Spear
|
Spear/Math/Matrix4.hs
|
mit
|
up (Matrix4 _ a10 _ _ _ a11 _ _ _ a12 _ _ _ _ _ _) = vec3 a10 a11 a12
| 99 |
up (Matrix4 _ a10 _ _ _ a11 _ _ _ a12 _ _ _ _ _ _) = vec3 a10 a11 a12
| 99 |
up (Matrix4 _ a10 _ _ _ a11 _ _ _ a12 _ _ _ _ _ _) = vec3 a10 a11 a12
| 99 | false | false | 0 | 6 | 52 | 53 | 25 | 28 | null | null |
vigojug/reto
|
201705/felixgomez/haskell/Tests.hs
|
bsd-3-clause
|
dataTest = [
([1, 2, 3], False),
([-5, -3, -1, 2, 4, 6], True),
([], False),
([-1, 1], True),
([-97364, -71561, -69336, 19675, 71561, 97863], True),
([-53974, -39140, -36561, -23935, -15680, 0], True),
([-2, 2, 3], True),
([0], True),
([-3, 1, 2], True),
([-98634, -86888, -48841, -40483, 2612, 9225, 17848, 71967, 84319, 88875], True),
([-83314, -82838, -80120, -63468, -62478, -59378, -56958, -50061, -34791, -32264, -21928, -14988, 23767, 24417, 26403, 26511, 36399, 78055], False),
([-92953, -91613, -89733, -50673, -16067, -9172, 8852, 30883, 46690, 46968, 56772, 58703, 59150, 78476, 84413, 90106, 94777, 95148], False),
([-94624, -86776, -85833, -80822, -71902, -54562, -38638, -26483, -20207, -1290, 12414, 12627, 19509, 30894, 32505, 46825, 50321, 69294], False),
([-83964, -81834, -78386, -70497, -69357, -61867, -49127, -47916, -38361, -35772, -29803, -15343, 6918, 19662, 44614, 66049, 93789, 95405], False),
([-68808, -58968, -45958, -36013, -32810, -28726, -13488, 3986, 26342, 29245, 30686, 47966, 58352, 68610, 74533, 77939, 80520, 87195], False),
([-97162, -95761, -94672, -87254, -57207, -22163, -20207, -1753, 11646, 13652, 14572, 30580, 52502, 64282, 74896, 83730, 89889, 92200], True),
([-93976, -93807, -64604, -59939, -44394, -36454, -34635, -16483, 267, 3245, 8031, 10622, 44815, 46829, 61689, 65756, 69220, 70121], True),
([-92474, -61685, -55348, -42019, -35902, -7815, -5579, 4490, 14778, 19399, 34202, 46624, 55800, 57719, 60260, 71511, 75665, 82754], True),
([-85029, -84549, -82646, -80493, -73373, -57478, -56711, -42456, -38923, -29277, -3685, -3164, 26863, 29890, 37187, 46607, 69300, 84808], True),
([-87565, -71009, -49312, -47554, -27197, 905, 2839, 8657, 14622, 32217, 35567, 38470, 46885, 59236, 64704, 82944, 86902, 90487], True)]
| 1,850 |
dataTest = [
([1, 2, 3], False),
([-5, -3, -1, 2, 4, 6], True),
([], False),
([-1, 1], True),
([-97364, -71561, -69336, 19675, 71561, 97863], True),
([-53974, -39140, -36561, -23935, -15680, 0], True),
([-2, 2, 3], True),
([0], True),
([-3, 1, 2], True),
([-98634, -86888, -48841, -40483, 2612, 9225, 17848, 71967, 84319, 88875], True),
([-83314, -82838, -80120, -63468, -62478, -59378, -56958, -50061, -34791, -32264, -21928, -14988, 23767, 24417, 26403, 26511, 36399, 78055], False),
([-92953, -91613, -89733, -50673, -16067, -9172, 8852, 30883, 46690, 46968, 56772, 58703, 59150, 78476, 84413, 90106, 94777, 95148], False),
([-94624, -86776, -85833, -80822, -71902, -54562, -38638, -26483, -20207, -1290, 12414, 12627, 19509, 30894, 32505, 46825, 50321, 69294], False),
([-83964, -81834, -78386, -70497, -69357, -61867, -49127, -47916, -38361, -35772, -29803, -15343, 6918, 19662, 44614, 66049, 93789, 95405], False),
([-68808, -58968, -45958, -36013, -32810, -28726, -13488, 3986, 26342, 29245, 30686, 47966, 58352, 68610, 74533, 77939, 80520, 87195], False),
([-97162, -95761, -94672, -87254, -57207, -22163, -20207, -1753, 11646, 13652, 14572, 30580, 52502, 64282, 74896, 83730, 89889, 92200], True),
([-93976, -93807, -64604, -59939, -44394, -36454, -34635, -16483, 267, 3245, 8031, 10622, 44815, 46829, 61689, 65756, 69220, 70121], True),
([-92474, -61685, -55348, -42019, -35902, -7815, -5579, 4490, 14778, 19399, 34202, 46624, 55800, 57719, 60260, 71511, 75665, 82754], True),
([-85029, -84549, -82646, -80493, -73373, -57478, -56711, -42456, -38923, -29277, -3685, -3164, 26863, 29890, 37187, 46607, 69300, 84808], True),
([-87565, -71009, -49312, -47554, -27197, 905, 2839, 8657, 14622, 32217, 35567, 38470, 46885, 59236, 64704, 82944, 86902, 90487], True)]
| 1,850 |
dataTest = [
([1, 2, 3], False),
([-5, -3, -1, 2, 4, 6], True),
([], False),
([-1, 1], True),
([-97364, -71561, -69336, 19675, 71561, 97863], True),
([-53974, -39140, -36561, -23935, -15680, 0], True),
([-2, 2, 3], True),
([0], True),
([-3, 1, 2], True),
([-98634, -86888, -48841, -40483, 2612, 9225, 17848, 71967, 84319, 88875], True),
([-83314, -82838, -80120, -63468, -62478, -59378, -56958, -50061, -34791, -32264, -21928, -14988, 23767, 24417, 26403, 26511, 36399, 78055], False),
([-92953, -91613, -89733, -50673, -16067, -9172, 8852, 30883, 46690, 46968, 56772, 58703, 59150, 78476, 84413, 90106, 94777, 95148], False),
([-94624, -86776, -85833, -80822, -71902, -54562, -38638, -26483, -20207, -1290, 12414, 12627, 19509, 30894, 32505, 46825, 50321, 69294], False),
([-83964, -81834, -78386, -70497, -69357, -61867, -49127, -47916, -38361, -35772, -29803, -15343, 6918, 19662, 44614, 66049, 93789, 95405], False),
([-68808, -58968, -45958, -36013, -32810, -28726, -13488, 3986, 26342, 29245, 30686, 47966, 58352, 68610, 74533, 77939, 80520, 87195], False),
([-97162, -95761, -94672, -87254, -57207, -22163, -20207, -1753, 11646, 13652, 14572, 30580, 52502, 64282, 74896, 83730, 89889, 92200], True),
([-93976, -93807, -64604, -59939, -44394, -36454, -34635, -16483, 267, 3245, 8031, 10622, 44815, 46829, 61689, 65756, 69220, 70121], True),
([-92474, -61685, -55348, -42019, -35902, -7815, -5579, 4490, 14778, 19399, 34202, 46624, 55800, 57719, 60260, 71511, 75665, 82754], True),
([-85029, -84549, -82646, -80493, -73373, -57478, -56711, -42456, -38923, -29277, -3685, -3164, 26863, 29890, 37187, 46607, 69300, 84808], True),
([-87565, -71009, -49312, -47554, -27197, 905, 2839, 8657, 14622, 32217, 35567, 38470, 46885, 59236, 64704, 82944, 86902, 90487], True)]
| 1,850 | false | false | 1 | 8 | 324 | 1,061 | 669 | 392 | null | null |
TakeLab/gpkex
|
kex.hs
|
bsd-3-clause
|
eval NumberT c = Just (cT c)
| 28 |
eval NumberT c = Just (cT c)
| 28 |
eval NumberT c = Just (cT c)
| 28 | false | false | 0 | 7 | 6 | 20 | 9 | 11 | null | null |
nevrenato/HetsAlloy
|
HasCASL/ParseItem.hs
|
gpl-2.0
|
genVarItems :: AParser st ([GenVarDecl], [Token])
genVarItems = do
vs <- genVarDecls
do s <- trySemi << addLineAnnos
do tryItemEnd hasCaslStartKeywords
return (vs, [s])
<|> do
(ws, ts) <- genVarItems
return (vs ++ ws, s : ts)
<|> return (vs, [])
| 309 |
genVarItems :: AParser st ([GenVarDecl], [Token])
genVarItems = do
vs <- genVarDecls
do s <- trySemi << addLineAnnos
do tryItemEnd hasCaslStartKeywords
return (vs, [s])
<|> do
(ws, ts) <- genVarItems
return (vs ++ ws, s : ts)
<|> return (vs, [])
| 309 |
genVarItems = do
vs <- genVarDecls
do s <- trySemi << addLineAnnos
do tryItemEnd hasCaslStartKeywords
return (vs, [s])
<|> do
(ws, ts) <- genVarItems
return (vs ++ ws, s : ts)
<|> return (vs, [])
| 259 | false | true | 1 | 16 | 104 | 129 | 63 | 66 | null | null |
mtlstats/mtlstats
|
src/Mtlstats/Menu.hs
|
gpl-3.0
|
-- | The draw function for a 'Menu'
drawMenu :: Menu a -> C.Update C.CursorMode
drawMenu m = do
(_, cols) <- C.windowSize
let
width = fromIntegral $ pred cols
menuText = map (centre width) $ lines $ show m
C.drawString $ unlines menuText
return C.CursorInvisible
-- | The event handler for a 'Menu'
| 318 |
drawMenu :: Menu a -> C.Update C.CursorMode
drawMenu m = do
(_, cols) <- C.windowSize
let
width = fromIntegral $ pred cols
menuText = map (centre width) $ lines $ show m
C.drawString $ unlines menuText
return C.CursorInvisible
-- | The event handler for a 'Menu'
| 282 |
drawMenu m = do
(_, cols) <- C.windowSize
let
width = fromIntegral $ pred cols
menuText = map (centre width) $ lines $ show m
C.drawString $ unlines menuText
return C.CursorInvisible
-- | The event handler for a 'Menu'
| 238 | true | true | 0 | 14 | 73 | 106 | 50 | 56 | null | null |
ghc-android/ghc
|
testsuite/tests/ghci/should_run/ghcirun004.hs
|
bsd-3-clause
|
3123 = 3122
| 11 |
3123 = 3122
| 11 |
3123 = 3122
| 11 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
uduki/hsQt
|
Qtc/Gui/QCursor.hs
|
bsd-2-clause
|
qCursorPos :: (()) -> IO (Point)
qCursorPos ()
= withPointResult $ \cpoint_ret_x cpoint_ret_y ->
qtc_QCursor_pos_qth cpoint_ret_x cpoint_ret_y
| 148 |
qCursorPos :: (()) -> IO (Point)
qCursorPos ()
= withPointResult $ \cpoint_ret_x cpoint_ret_y ->
qtc_QCursor_pos_qth cpoint_ret_x cpoint_ret_y
| 148 |
qCursorPos ()
= withPointResult $ \cpoint_ret_x cpoint_ret_y ->
qtc_QCursor_pos_qth cpoint_ret_x cpoint_ret_y
| 115 | false | true | 2 | 8 | 22 | 54 | 25 | 29 | null | null |
iand675/pvector
|
src/Data/Vector/Internal/Transient.hs
|
mit
|
emptyState :: PrimMonad m => m (TransientVectorState (PrimState m) a)
emptyState = do
root <- makeMutableLevel
(MutableLevel leaf) <- makeMutableLeaf
return $ TransientVectorState 0 bitsPerLevel (EditedBranch root) leaf True 0
| 232 |
emptyState :: PrimMonad m => m (TransientVectorState (PrimState m) a)
emptyState = do
root <- makeMutableLevel
(MutableLevel leaf) <- makeMutableLeaf
return $ TransientVectorState 0 bitsPerLevel (EditedBranch root) leaf True 0
| 232 |
emptyState = do
root <- makeMutableLevel
(MutableLevel leaf) <- makeMutableLeaf
return $ TransientVectorState 0 bitsPerLevel (EditedBranch root) leaf True 0
| 162 | false | true | 0 | 10 | 35 | 81 | 38 | 43 | null | null |
geraldus/yesod
|
yesod-core/src/Yesod/Routes/Parse.hs
|
mit
|
splitSpaces :: String -> [String]
splitSpaces "" = []
| 53 |
splitSpaces :: String -> [String]
splitSpaces "" = []
| 53 |
splitSpaces "" = []
| 19 | false | true | 0 | 6 | 8 | 23 | 12 | 11 | null | null |
yangsiwei880813/CS644
|
src/TypeDatabase.hs
|
gpl-2.0
|
buildEntry' sym env cond = case kind su of
Class -> Just (TN sym (map buildTypeEntryFromSymbol (funcs ++ sflds)))
Interface -> Just (TN sym (map buildTypeEntryFromSymbol (funcs)))
_ -> Nothing
where
ENV su ch = env
syms = symbolTable su
funcs = [(FUNC mds ls ln params lt) | (FUNC mds ls ln params lt) <- syms]
sflds = [(SYM mds ls ln lt) | (SYM mds ls ln lt) <- syms, cond mds]
| 506 |
buildEntry' sym env cond = case kind su of
Class -> Just (TN sym (map buildTypeEntryFromSymbol (funcs ++ sflds)))
Interface -> Just (TN sym (map buildTypeEntryFromSymbol (funcs)))
_ -> Nothing
where
ENV su ch = env
syms = symbolTable su
funcs = [(FUNC mds ls ln params lt) | (FUNC mds ls ln params lt) <- syms]
sflds = [(SYM mds ls ln lt) | (SYM mds ls ln lt) <- syms, cond mds]
| 506 |
buildEntry' sym env cond = case kind su of
Class -> Just (TN sym (map buildTypeEntryFromSymbol (funcs ++ sflds)))
Interface -> Just (TN sym (map buildTypeEntryFromSymbol (funcs)))
_ -> Nothing
where
ENV su ch = env
syms = symbolTable su
funcs = [(FUNC mds ls ln params lt) | (FUNC mds ls ln params lt) <- syms]
sflds = [(SYM mds ls ln lt) | (SYM mds ls ln lt) <- syms, cond mds]
| 506 | false | false | 3 | 14 | 201 | 210 | 99 | 111 | null | null |
merijn/trifecta
|
src/Text/Trifecta/Rendering.hs
|
bsd-3-clause
|
caretEffects :: [SGR]
caretEffects = [SetColor Foreground Vivid Green]
| 70 |
caretEffects :: [SGR]
caretEffects = [SetColor Foreground Vivid Green]
| 70 |
caretEffects = [SetColor Foreground Vivid Green]
| 48 | false | true | 0 | 6 | 8 | 24 | 13 | 11 | null | null |
ekmett/wxHaskell
|
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
|
lgpl-2.1
|
wxSTC_HJ_NUMBER :: Int
wxSTC_HJ_NUMBER = 45
| 43 |
wxSTC_HJ_NUMBER :: Int
wxSTC_HJ_NUMBER = 45
| 43 |
wxSTC_HJ_NUMBER = 45
| 20 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.