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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
mpickering/HaRe | old/testing/foldDef/ComplexParamIn2.hs | bsd-3-clause | sq (Tup n m) = m^n | 18 | sq (Tup n m) = m^n | 18 | sq (Tup n m) = m^n | 18 | false | false | 2 | 6 | 5 | 25 | 10 | 15 | null | null |
Tatsuki-I/Vihs | src/Vihs.hs | apache-2.0 | delete :: Count -> EditorState -> EditorState
delete c st@(vs, fsl@(fs : _)) = f (vs & yanked .~ take c snd, fsl)
where (fst, snd) = splitAt (vs ^. column) (currline st)
f :: (EditorState -> EditorState)
... | 510 | delete :: Count -> EditorState -> EditorState
delete c st@(vs, fsl@(fs : _)) = f (vs & yanked .~ take c snd, fsl)
where (fst, snd) = splitAt (vs ^. column) (currline st)
f :: (EditorState -> EditorState)
... | 510 | delete c st@(vs, fsl@(fs : _)) = f (vs & yanked .~ take c snd, fsl)
where (fst, snd) = splitAt (vs ^. column) (currline st)
f :: (EditorState -> EditorState)
f | (null . currline) st
... | 440 | false | true | 4 | 10 | 293 | 156 | 78 | 78 | null | null |
enolan/Idris-dev | src/Idris/Reflection.hs | bsd-3-clause | reflectRawQuote unq RType = Var (reflm "RType") | 47 | reflectRawQuote unq RType = Var (reflm "RType") | 47 | reflectRawQuote unq RType = Var (reflm "RType") | 47 | false | false | 0 | 7 | 6 | 21 | 9 | 12 | null | null |
oldmanmike/ghc | compiler/typecheck/TcType.hs | bsd-3-clause | mkNakedAppTys :: Type -> [Type] -> Type
-- See Note [Type-checking inside the knot] in TcHsType
mkNakedAppTys ty1 [] = ty1 | 139 | mkNakedAppTys :: Type -> [Type] -> Type
mkNakedAppTys ty1 [] = ty1 | 83 | mkNakedAppTys ty1 [] = ty1 | 43 | true | true | 0 | 7 | 37 | 30 | 16 | 14 | null | null |
DavidAlphaFox/ghc | compiler/hsSyn/HsPat.hs | bsd-3-clause | hsPatNeedsParens (LitPat {}) = False | 44 | hsPatNeedsParens (LitPat {}) = False | 44 | hsPatNeedsParens (LitPat {}) = False | 44 | false | false | 0 | 7 | 12 | 16 | 8 | 8 | null | null |
forked-upstream-packages-for-ghcjs/ghc | compiler/main/DriverPhases.hs | bsd-3-clause | phaseInputExt MergeStub = "o" | 39 | phaseInputExt MergeStub = "o" | 39 | phaseInputExt MergeStub = "o" | 39 | false | false | 0 | 5 | 13 | 9 | 4 | 5 | null | null |
kosmoskatten/hats | test/MessageProps.hs | mit | -- | Arbitrary generation of Sub messages.
arbitraryUnsub :: Gen Message
arbitraryUnsub = UNSUB <$> sid
<*> perhaps posInt | 145 | arbitraryUnsub :: Gen Message
arbitraryUnsub = UNSUB <$> sid
<*> perhaps posInt | 102 | arbitraryUnsub = UNSUB <$> sid
<*> perhaps posInt | 72 | true | true | 0 | 6 | 41 | 26 | 13 | 13 | null | null |
sdiehl/ghc | hadrian/src/Rules/Documentation.hs | bsd-3-clause | getPkgDocTarget :: FilePath -> FilePath -> Action PkgDocTarget
getPkgDocTarget root path =
parsePath (parsePkgDocTarget root) "<doc target>" path | 147 | getPkgDocTarget :: FilePath -> FilePath -> Action PkgDocTarget
getPkgDocTarget root path =
parsePath (parsePkgDocTarget root) "<doc target>" path | 147 | getPkgDocTarget root path =
parsePath (parsePkgDocTarget root) "<doc target>" path | 84 | false | true | 0 | 7 | 19 | 40 | 19 | 21 | null | null |
josefs/autosar | oldARSim/ABS.hs | bsd-3-clause | pressure :: AR c (RE Double (), PO Int () (), PE Bool ())
pressure = component $ do
valve <- providedDataElement
accel <- requiredDataElement
ctrl <- sequencer (pressure_setup valve) (pressure_step valve accel) (pressure_ctrl valve accel)
return (seal accel, ctrl, seal valve)
----------... | 857 | pressure :: AR c (RE Double (), PO Int () (), PE Bool ())
pressure = component $ do
valve <- providedDataElement
accel <- requiredDataElement
ctrl <- sequencer (pressure_setup valve) (pressure_step valve accel) (pressure_ctrl valve accel)
return (seal accel, ctrl, seal valve)
----------... | 857 | pressure = component $ do
valve <- providedDataElement
accel <- requiredDataElement
ctrl <- sequencer (pressure_setup valve) (pressure_step valve accel) (pressure_ctrl valve accel)
return (seal accel, ctrl, seal valve)
--------------------------------------------------------------
-- A ... | 799 | false | true | 4 | 11 | 152 | 143 | 69 | 74 | null | null |
dmuneras/LambdaIntegrator | src/GramaticaConcreta.hs | gpl-2.0 | {-Parser que reconoce una funcion trigonometrica
-}
pTrig :: Parser Token Func
pTrig = pSen <|> pCos <|> pTan <|> pCot <|> pSec <|> pCsc | 139 | pTrig :: Parser Token Func
pTrig = pSen <|> pCos <|> pTan <|> pCot <|> pSec <|> pCsc | 84 | pTrig = pSen <|> pCos <|> pTan <|> pCot <|> pSec <|> pCsc | 57 | true | true | 9 | 6 | 27 | 52 | 26 | 26 | null | null |
fmapfmapfmap/amazonka | amazonka-opsworks/gen/Network/AWS/OpsWorks/Types/Product.hs | mpl-2.0 | -- | The agent version.
avVersion :: Lens' AgentVersion (Maybe Text)
avVersion = lens _avVersion (\ s a -> s{_avVersion = a}) | 125 | avVersion :: Lens' AgentVersion (Maybe Text)
avVersion = lens _avVersion (\ s a -> s{_avVersion = a}) | 101 | avVersion = lens _avVersion (\ s a -> s{_avVersion = a}) | 56 | true | true | 0 | 9 | 21 | 46 | 25 | 21 | null | null |
nikki-and-the-robots/nikki | src/Base/Types.hs | lgpl-3.0 | hasUpdates (UpdateVersions _ (Right (Just _))) = True | 53 | hasUpdates (UpdateVersions _ (Right (Just _))) = True | 53 | hasUpdates (UpdateVersions _ (Right (Just _))) = True | 53 | false | false | 0 | 11 | 7 | 29 | 14 | 15 | null | null |
Rotsor/factorio-module-selector | factorio-module-selector.hs | unlicense | print_config_details totalTime demand gc =
let solved = solvedRecipes gc in
let matrix = recipesToMatrix gc in
let
(total_cost_per_second, executions_per_second) =
foldr add zero (
map
(\(product, amount) ->
scale (recip $ unTime totalTime) (scale amount $ solved !!! product)
... | 2,004 | print_config_details totalTime demand gc =
let solved = solvedRecipes gc in
let matrix = recipesToMatrix gc in
let
(total_cost_per_second, executions_per_second) =
foldr add zero (
map
(\(product, amount) ->
scale (recip $ unTime totalTime) (scale amount $ solved !!! product)
... | 2,004 | print_config_details totalTime demand gc =
let solved = solvedRecipes gc in
let matrix = recipesToMatrix gc in
let
(total_cost_per_second, executions_per_second) =
foldr add zero (
map
(\(product, amount) ->
scale (recip $ unTime totalTime) (scale amount $ solved !!! product)
... | 2,004 | false | false | 0 | 28 | 464 | 611 | 298 | 313 | null | null |
RyanGlScott/nfa2dfa | src/NFA2DFA/Parse.hs | gpl-3.0 | -- | Parses "Total States: x"
totalStates :: Parser Word
totalStates = wsString "Total" *> wsString "States:" *> (fromInteger <$> natural) | 138 | totalStates :: Parser Word
totalStates = wsString "Total" *> wsString "States:" *> (fromInteger <$> natural) | 108 | totalStates = wsString "Total" *> wsString "States:" *> (fromInteger <$> natural) | 81 | true | true | 0 | 7 | 20 | 36 | 18 | 18 | null | null |
ehird/mchost | MC/Utils.hs | bsd-3-clause | enumPut :: (Monad m, Show t) => Putter t -> Inum [t] ByteString m a
enumPut f = mkInum (SE.runPut . mapM_ f <$> dataI) | 118 | enumPut :: (Monad m, Show t) => Putter t -> Inum [t] ByteString m a
enumPut f = mkInum (SE.runPut . mapM_ f <$> dataI) | 118 | enumPut f = mkInum (SE.runPut . mapM_ f <$> dataI) | 50 | false | true | 0 | 9 | 24 | 67 | 33 | 34 | null | null |
travitch/dalvik | tests/ssa-tests/Main.hs | bsd-3-clause | findAnyMethodByName :: (Failure LookupError f) => BS.ByteString -> Class -> f Method
findAnyMethodByName mname klass = maybe err return $ do
F.find ((==mname) . methodName) ms
where
err = failure $ NoMethodFound mname "" (className klass)
ms = classDirectMethods klass ++ classVirtualMethods klass | 309 | findAnyMethodByName :: (Failure LookupError f) => BS.ByteString -> Class -> f Method
findAnyMethodByName mname klass = maybe err return $ do
F.find ((==mname) . methodName) ms
where
err = failure $ NoMethodFound mname "" (className klass)
ms = classDirectMethods klass ++ classVirtualMethods klass | 309 | findAnyMethodByName mname klass = maybe err return $ do
F.find ((==mname) . methodName) ms
where
err = failure $ NoMethodFound mname "" (className klass)
ms = classDirectMethods klass ++ classVirtualMethods klass | 224 | false | true | 2 | 11 | 54 | 116 | 54 | 62 | null | null |
hpacheco/jasminv | src/Language/Jasmin/TypeChecker.hs | gpl-3.0 | triOp2 _ = Nothing | 18 | triOp2 _ = Nothing | 18 | triOp2 _ = Nothing | 18 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
alexander-at-github/eta | compiler/ETA/DeSugar/Check.hs | bsd-3-clause | make_con :: Pat Id -> ExhaustivePat -> ExhaustivePat
make_con (ConPatOut{ pat_con = L _ (RealDataCon id) }) (lp:lq:ps, constraints)
| return_list id q = (noLoc (make_list lp q) : ps, constraints)
| isInfixCon id = (nlInfixConPat (getName id) lp lq : ps, constraints)
where q = unLoc lq | 302 | make_con :: Pat Id -> ExhaustivePat -> ExhaustivePat
make_con (ConPatOut{ pat_con = L _ (RealDataCon id) }) (lp:lq:ps, constraints)
| return_list id q = (noLoc (make_list lp q) : ps, constraints)
| isInfixCon id = (nlInfixConPat (getName id) lp lq : ps, constraints)
where q = unLoc lq | 302 | make_con (ConPatOut{ pat_con = L _ (RealDataCon id) }) (lp:lq:ps, constraints)
| return_list id q = (noLoc (make_list lp q) : ps, constraints)
| isInfixCon id = (nlInfixConPat (getName id) lp lq : ps, constraints)
where q = unLoc lq | 249 | false | true | 0 | 12 | 64 | 142 | 70 | 72 | null | null |
ganeti-github-testing/ganeti-test-1 | src/Ganeti/Constants.hs | bsd-2-clause | nvInstancelist :: String
nvInstancelist = "instancelist" | 56 | nvInstancelist :: String
nvInstancelist = "instancelist" | 56 | nvInstancelist = "instancelist" | 31 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
dan-t/hsimport | lib/HsImport/ImportChange.hs | bsd-3-clause | -- | Remove an element from the import list if it matches the symbol.
-- If the resulting spec list is empty afterwards, Nothing is returned to remove
-- the import list.
-- Removes duplicate imports.
removeSpecList
:: SymbolImport
-> ImportSpecList
-> Either ErrorMessage (Maybe (ImportSpecList))
removeS... | 2,535 | removeSpecList
:: SymbolImport
-> ImportSpecList
-> Either ErrorMessage (Maybe (ImportSpecList))
removeSpecList symbolImport (HS.ImportSpecList annotation hid specs) =
let specListRemovedSymbol = traverse (removeSymbols (symbol symbolImport)) specs
in specListRemovedSymbol >>= \specList ->
... | 2,328 | removeSpecList symbolImport (HS.ImportSpecList annotation hid specs) =
let specListRemovedSymbol = traverse (removeSymbols (symbol symbolImport)) specs
in specListRemovedSymbol >>= \specList ->
if null (catMaybes specList)
then Right Nothing -- Remove the spec list if it is empty now
... | 2,222 | true | true | 0 | 13 | 791 | 507 | 265 | 242 | null | null |
Garygunn94/DFS | CommonResources/.stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/autogen/Paths_CommonResources.hs | bsd-3-clause | libexecdir = "/home/ggunn/DFS/TransactionServer/.stack-work/install/x86_64-linux/lts-7.13/8.0.1/libexec" | 104 | libexecdir = "/home/ggunn/DFS/TransactionServer/.stack-work/install/x86_64-linux/lts-7.13/8.0.1/libexec" | 104 | libexecdir = "/home/ggunn/DFS/TransactionServer/.stack-work/install/x86_64-linux/lts-7.13/8.0.1/libexec" | 104 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
apriori/luminance | src/Graphics/Luminance/Texture.hs | bsd-3-clause | fromCompareFunc :: (Eq a,Num a) => CompareFunc -> a
fromCompareFunc f = case f of
Never -> GL_NEVER
Less -> GL_LESS
Equal -> GL_EQUAL
LessOrEqual -> GL_LEQUAL
Greater -> GL_GREATER
GreaterOrEqual -> GL_GEQUAL
NotEqual -> GL_NOTEQUAL
Always -> GL_ALWAYS | 268 | fromCompareFunc :: (Eq a,Num a) => CompareFunc -> a
fromCompareFunc f = case f of
Never -> GL_NEVER
Less -> GL_LESS
Equal -> GL_EQUAL
LessOrEqual -> GL_LEQUAL
Greater -> GL_GREATER
GreaterOrEqual -> GL_GEQUAL
NotEqual -> GL_NOTEQUAL
Always -> GL_ALWAYS | 268 | fromCompareFunc f = case f of
Never -> GL_NEVER
Less -> GL_LESS
Equal -> GL_EQUAL
LessOrEqual -> GL_LEQUAL
Greater -> GL_GREATER
GreaterOrEqual -> GL_GEQUAL
NotEqual -> GL_NOTEQUAL
Always -> GL_ALWAYS | 216 | false | true | 8 | 6 | 54 | 100 | 43 | 57 | null | null |
chrys-h/ftag | test/EnvSpec.hs | mit | spec :: Spec
spec = return () | 29 | spec :: Spec
spec = return () | 29 | spec = return () | 16 | false | true | 0 | 6 | 6 | 23 | 9 | 14 | null | null |
tomahawkins/gigl | Language/GIGL.hs | bsd-3-clause | modify :: ((a, Program i, Stmt i) -> (a, Program i, Stmt i)) -> GIGL a i ()
modify f = get >>= set . f | 102 | modify :: ((a, Program i, Stmt i) -> (a, Program i, Stmt i)) -> GIGL a i ()
modify f = get >>= set . f | 102 | modify f = get >>= set . f | 26 | false | true | 0 | 9 | 25 | 72 | 37 | 35 | null | null |
EdisonAlgorithms/HackerRank | practice/fp/ds/range-minimum-query/range-minimum-query.hs | mit | query node l r = if r < ll || rr < l then maxValue
else if l <= ll && rr <= r then getValue node
else min (query (leftNode node) l r) (query (rightNode node) l r)
where ll = lRange node
rr = rRange node | 250 | query node l r = if r < ll || rr < l then maxValue
else if l <= ll && rr <= r then getValue node
else min (query (leftNode node) l r) (query (rightNode node) l r)
where ll = lRange node
rr = rRange node | 250 | query node l r = if r < ll || rr < l then maxValue
else if l <= ll && rr <= r then getValue node
else min (query (leftNode node) l r) (query (rightNode node) l r)
where ll = lRange node
rr = rRange node | 250 | false | false | 0 | 11 | 95 | 111 | 56 | 55 | null | null |
whitehead1415/cql | src/Database/CQL/Protocol/Request.hs | mpl-2.0 | encodeRequest _ (RqAuthResp r) = encodeAuthResponse r | 53 | encodeRequest _ (RqAuthResp r) = encodeAuthResponse r | 53 | encodeRequest _ (RqAuthResp r) = encodeAuthResponse r | 53 | false | false | 0 | 7 | 6 | 20 | 9 | 11 | null | null |
ghcjs/ghcjs | src/Gen2/RtsTypes.hs | mit | -- | add `n` unknown slots to our stack knowledge
addUnknownSlots :: Int -> G ()
addUnknownSlots n = addSlots (replicate n SlotUnknown) | 135 | addUnknownSlots :: Int -> G ()
addUnknownSlots n = addSlots (replicate n SlotUnknown) | 85 | addUnknownSlots n = addSlots (replicate n SlotUnknown) | 54 | true | true | 0 | 7 | 22 | 35 | 17 | 18 | null | null |
onponomarev/ganeti | src/Ganeti/JSON.hs | bsd-2-clause | -- | Tries to read a string from a JSON value.
--
-- In case the value was not a string, we fail the read (in the
-- context of the current monad.
readEitherString :: (Monad m) => J.JSValue -> m String
readEitherString v =
case v of
J.JSString s -> return $ J.fromJSString s
_ -> fail "Wrong JSON type"
-- | C... | 373 | readEitherString :: (Monad m) => J.JSValue -> m String
readEitherString v =
case v of
J.JSString s -> return $ J.fromJSString s
_ -> fail "Wrong JSON type"
-- | Converts a JSON message into an array of JSON objects. | 226 | readEitherString v =
case v of
J.JSString s -> return $ J.fromJSString s
_ -> fail "Wrong JSON type"
-- | Converts a JSON message into an array of JSON objects. | 171 | true | true | 0 | 10 | 83 | 70 | 36 | 34 | null | null |
wowofbob/gol | src/Game.hs | bsd-3-clause | encodeColor Green = V4 0 255 0 255 | 38 | encodeColor Green = V4 0 255 0 255 | 38 | encodeColor Green = V4 0 255 0 255 | 38 | false | false | 0 | 5 | 11 | 18 | 8 | 10 | null | null |
cbrghostrider/Hacking | codeJam/2008/scalar/greedySelect.hs | mit | parseInput _ = [] | 17 | parseInput _ = [] | 17 | parseInput _ = [] | 17 | false | false | 0 | 5 | 3 | 12 | 5 | 7 | null | null |
michaelmp/chess | app/Main.hs | agpl-3.0 | main :: IO ()
main = do
args <- getArgs
putStrLn $ head args | 64 | main :: IO ()
main = do
args <- getArgs
putStrLn $ head args | 64 | main = do
args <- getArgs
putStrLn $ head args | 50 | false | true | 1 | 9 | 17 | 37 | 15 | 22 | null | null |
tismith/tlisp | src/Parse.hs | mit | parseQuasiQuoted :: Parser LispVal
parseQuasiQuoted = do
char '`'
x <- parseExpr
return $ List [Atom "quasiquote", x]
-- |
-- >>> parse parseVector "lisp" "#(1 2 3)"
-- Right #(1 2 3) | 196 | parseQuasiQuoted :: Parser LispVal
parseQuasiQuoted = do
char '`'
x <- parseExpr
return $ List [Atom "quasiquote", x]
-- |
-- >>> parse parseVector "lisp" "#(1 2 3)"
-- Right #(1 2 3) | 196 | parseQuasiQuoted = do
char '`'
x <- parseExpr
return $ List [Atom "quasiquote", x]
-- |
-- >>> parse parseVector "lisp" "#(1 2 3)"
-- Right #(1 2 3) | 161 | false | true | 0 | 10 | 45 | 49 | 24 | 25 | null | null |
dolio/primitive | Data/Primitive/Array.hs | bsd-3-clause | indexArrayM arr (I# i#)
= case indexArray# (array# arr) i# of (# x #) -> return x
-- | Create an immutable copy of a slice of an array.
--
-- This operation makes a copy of the specified section, so it is safe to
-- continue using the mutable array afterward. | 262 | indexArrayM arr (I# i#)
= case indexArray# (array# arr) i# of (# x #) -> return x
-- | Create an immutable copy of a slice of an array.
--
-- This operation makes a copy of the specified section, so it is safe to
-- continue using the mutable array afterward. | 262 | indexArrayM arr (I# i#)
= case indexArray# (array# arr) i# of (# x #) -> return x
-- | Create an immutable copy of a slice of an array.
--
-- This operation makes a copy of the specified section, so it is safe to
-- continue using the mutable array afterward. | 262 | false | false | 0 | 8 | 54 | 47 | 24 | 23 | null | null |
23Skidoo/io-streams-haproxy | src/System/IO/Streams/Network/HAProxy.hs | bsd-3-clause | behindHAProxyWithLocalInfo
:: ProxyInfo -- ^ local socket info
-> (InputStream ByteString, OutputStream ByteString) -- ^ socket streams
-> (ProxyInfo
-> InputStream ByteString
-> OutputStream ByteString
-> IO a) -- ^ user functio... | 548 | behindHAProxyWithLocalInfo
:: ProxyInfo -- ^ local socket info
-> (InputStream ByteString, OutputStream ByteString) -- ^ socket streams
-> (ProxyInfo
-> InputStream ByteString
-> OutputStream ByteString
-> IO a) -- ^ user functio... | 548 | behindHAProxyWithLocalInfo localProxyInfo (is, os) m = do
proxyInfo <- decodeHAProxyHeaders localProxyInfo is
m proxyInfo is os
------------------------------------------------------------------------------ | 216 | false | true | 0 | 13 | 154 | 106 | 51 | 55 | null | null |
MaxOw/awesomium | src/Graphics/UI/Awesomium/WebView/Callbacks.hs | lgpl-3.0 | setCallbackChangeHistory :: WebView -> ChangeHistoryCallbackHandler -> IO (FunPtr ChangeHistoryCallback)
setCallbackChangeHistory wv ah =
mkChangeHistoryCallback (defChangeHistoryCallback ah) >>=>
awe_webview_set_callback_change_history wv | 248 | setCallbackChangeHistory :: WebView -> ChangeHistoryCallbackHandler -> IO (FunPtr ChangeHistoryCallback)
setCallbackChangeHistory wv ah =
mkChangeHistoryCallback (defChangeHistoryCallback ah) >>=>
awe_webview_set_callback_change_history wv | 248 | setCallbackChangeHistory wv ah =
mkChangeHistoryCallback (defChangeHistoryCallback ah) >>=>
awe_webview_set_callback_change_history wv | 143 | false | true | 0 | 9 | 27 | 49 | 23 | 26 | null | null |
hce/yanas | src/Network.hs | gpl-2.0 | atcSay :: ATCState -> Frequency -> String -> IO ()
atcSay state freq text = do
Just chan <- atcGetChannel' state freq
writeChan chan (ATCText text) | 151 | atcSay :: ATCState -> Frequency -> String -> IO ()
atcSay state freq text = do
Just chan <- atcGetChannel' state freq
writeChan chan (ATCText text) | 151 | atcSay state freq text = do
Just chan <- atcGetChannel' state freq
writeChan chan (ATCText text) | 100 | false | true | 0 | 9 | 29 | 64 | 29 | 35 | null | null |
ryantm/ghc | ghc/Main.hs | bsd-3-clause | needsInputsMode :: PostLoadMode -> Bool
needsInputsMode DoMkDependHS = True | 78 | needsInputsMode :: PostLoadMode -> Bool
needsInputsMode DoMkDependHS = True | 78 | needsInputsMode DoMkDependHS = True | 38 | false | true | 0 | 7 | 11 | 24 | 10 | 14 | null | null |
wfleming/advent-of-code-2016 | 2017/D4/src/D4Lib.hs | bsd-3-clause | -- using this after `sepBy` in `passphraseParser` hangs indefinitely. Why?
-- skipSpaces :: Parser ()
-- skipSpaces = skipMany (char ' ' <|> char '\t')
passphraseParser :: Parser Passphrase
passphraseParser = between
C.space
eol $ -- should really be eol <|> eof but that's not typechecking: skip vs return?
(many... | 353 | passphraseParser :: Parser Passphrase
passphraseParser = between
C.space
eol $ -- should really be eol <|> eof but that's not typechecking: skip vs return?
(many alphaNumChar) `sepBy` (char ' ') | 200 | passphraseParser = between
C.space
eol $ -- should really be eol <|> eof but that's not typechecking: skip vs return?
(many alphaNumChar) `sepBy` (char ' ') | 162 | true | true | 0 | 8 | 61 | 48 | 26 | 22 | null | null |
verement/etamoo | src/MOO/Builtins/Common.hs | bsd-3-clause | -- | Generate an infinite list of arguments where each missing argument is
-- 'Nothing'.
maybeDefaults :: [Value] -> [Maybe Value]
maybeDefaults = flip (defaultOptions Just) (repeat Nothing) | 190 | maybeDefaults :: [Value] -> [Maybe Value]
maybeDefaults = flip (defaultOptions Just) (repeat Nothing) | 101 | maybeDefaults = flip (defaultOptions Just) (repeat Nothing) | 59 | true | true | 0 | 7 | 27 | 43 | 23 | 20 | null | null |
ndmitchell/hoogle | src/Paths.hs | bsd-3-clause | getDataDir :: IO FilePath
getDataDir = pure "." | 47 | getDataDir :: IO FilePath
getDataDir = pure "." | 47 | getDataDir = pure "." | 21 | false | true | 0 | 5 | 7 | 17 | 8 | 9 | null | null |
oldmanmike/ghc | compiler/iface/IfaceType.hs | bsd-3-clause | ppr_co _ (IfaceCoVarCo covar) = ppr covar | 55 | ppr_co _ (IfaceCoVarCo covar) = ppr covar | 55 | ppr_co _ (IfaceCoVarCo covar) = ppr covar | 55 | false | false | 0 | 7 | 20 | 20 | 9 | 11 | null | null |
acowley/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | enumFromTo_RDR = nameRdrName enumFromToName | 52 | enumFromTo_RDR = nameRdrName enumFromToName | 52 | enumFromTo_RDR = nameRdrName enumFromToName | 52 | false | false | 0 | 5 | 12 | 9 | 4 | 5 | null | null |
rrnewton/accelerate | Data/Array/Accelerate/Trafo/Vectorise.hs | bsd-3-clause | weakenE1 :: SinkExp f
=> f env aenv t
-> f (env,s) aenv t
weakenE1 = weakenE SuccIdx | 106 | weakenE1 :: SinkExp f
=> f env aenv t
-> f (env,s) aenv t
weakenE1 = weakenE SuccIdx | 106 | weakenE1 = weakenE SuccIdx | 26 | false | true | 0 | 8 | 39 | 45 | 22 | 23 | null | null |
kmels/hledger | hledger-lib/Hledger/Data/Journal.hs | gpl-3.0 | -- | A query for Equity accounts in this journal.
-- This is currently hard-coded to the case-insensitive regex @^equity(:|$)@.
journalEquityAccountQuery :: Journal -> Query
journalEquityAccountQuery _ = Acct "^equity(:|$)" | 224 | journalEquityAccountQuery :: Journal -> Query
journalEquityAccountQuery _ = Acct "^equity(:|$)" | 96 | journalEquityAccountQuery _ = Acct "^equity(:|$)" | 49 | true | true | 0 | 5 | 30 | 23 | 12 | 11 | null | null |
kazu-yamamoto/mighttpd2 | test/ConfigSpec.hs | bsd-3-clause | ans :: Option
ans = Option
{ opt_port = 80
, opt_host = "*"
, opt_debug_mode = True
, opt_user = "root"
, opt_group = "root"
, opt_pid_file = "/var/run/mighty.pid"
, opt_report_file = "/tmp/mighty_report"
, opt_logging = True
, opt_log_file = "/var/log/mighty"
, opt_log_file_... | 976 | ans :: Option
ans = Option
{ opt_port = 80
, opt_host = "*"
, opt_debug_mode = True
, opt_user = "root"
, opt_group = "root"
, opt_pid_file = "/var/run/mighty.pid"
, opt_report_file = "/tmp/mighty_report"
, opt_logging = True
, opt_log_file = "/var/log/mighty"
, opt_log_file_... | 976 | ans = Option
{ opt_port = 80
, opt_host = "*"
, opt_debug_mode = True
, opt_user = "root"
, opt_group = "root"
, opt_pid_file = "/var/run/mighty.pid"
, opt_report_file = "/tmp/mighty_report"
, opt_logging = True
, opt_log_file = "/var/log/mighty"
, opt_log_file_size = 1677721... | 962 | false | true | 0 | 8 | 251 | 197 | 125 | 72 | null | null |
nedervold/origami | tests/Data/OrigamiTests.hs | bsd-3-clause | -- import Test.Framework.Providers.HUnit(testCase)
-- import Test.HUnit(assertEqual)
tests :: Test
tests = testGroup "Data.Origami" [ Data.Origami.Internal.BuildTests.tests ] | 175 | tests :: Test
tests = testGroup "Data.Origami" [ Data.Origami.Internal.BuildTests.tests ] | 89 | tests = testGroup "Data.Origami" [ Data.Origami.Internal.BuildTests.tests ] | 75 | true | true | 0 | 7 | 16 | 33 | 17 | 16 | null | null |
green-haskell/ghc | compiler/main/DriverPipeline.hs | bsd-3-clause | mk_pvm_wrapper_script :: String -> String -> String -> String
mk_pvm_wrapper_script pvm_executable pvm_executable_base sysMan = unlines $
[
"eval 'exec perl -S $0 ${1+\"$@\"}'",
" if $running_under_some_shell;",
"# =!=!=!=!=!=!=!=!=!=!=!",
"# This script is automatically generated: DO NOT EDIT!!!",
"# Gener... | 2,110 | mk_pvm_wrapper_script :: String -> String -> String -> String
mk_pvm_wrapper_script pvm_executable pvm_executable_base sysMan = unlines $
[
"eval 'exec perl -S $0 ${1+\"$@\"}'",
" if $running_under_some_shell;",
"# =!=!=!=!=!=!=!=!=!=!=!",
"# This script is automatically generated: DO NOT EDIT!!!",
"# Gener... | 2,110 | mk_pvm_wrapper_script pvm_executable pvm_executable_base sysMan = unlines $
[
"eval 'exec perl -S $0 ${1+\"$@\"}'",
" if $running_under_some_shell;",
"# =!=!=!=!=!=!=!=!=!=!=!",
"# This script is automatically generated: DO NOT EDIT!!!",
"# Generated by Glasgow Haskell Compiler",
"# ngoqvam choHbogh vaj' ... | 2,048 | false | true | 0 | 8 | 480 | 189 | 117 | 72 | null | null |
holzensp/ghc | libraries/base/Data/List.hs | bsd-3-clause | -- | The non-overloaded version of 'insert'.
insertBy :: (a -> a -> Ordering) -> a -> [a] -> [a]
insertBy _ x [] = [x] | 120 | insertBy :: (a -> a -> Ordering) -> a -> [a] -> [a]
insertBy _ x [] = [x] | 75 | insertBy _ x [] = [x] | 23 | true | true | 0 | 10 | 27 | 59 | 30 | 29 | null | null |
raposalorx/leaf | FileHelper.hs | bsd-3-clause | fileError (f:fs) = do
putStrLn $ f++" doesn't exist."
fileError fs | 74 | fileError (f:fs) = do
putStrLn $ f++" doesn't exist."
fileError fs | 74 | fileError (f:fs) = do
putStrLn $ f++" doesn't exist."
fileError fs | 74 | false | false | 0 | 8 | 18 | 34 | 15 | 19 | null | null |
bergmannf/gitit | src/Network/Gitit/Interface.hs | gpl-2.0 | -- | Returns the current wiki configuration.
askConfig :: PluginM Config
askConfig = liftM pluginConfig ask | 107 | askConfig :: PluginM Config
askConfig = liftM pluginConfig ask | 62 | askConfig = liftM pluginConfig ask | 34 | true | true | 0 | 6 | 15 | 26 | 11 | 15 | null | null |
rueshyna/gogol | gogol-sheets/gen/Network/Google/Sheets/Types/Product.hs | mpl-2.0 | -- | The number of rows or columns that data should be filled into. Positive
-- numbers expand beyond the last row or last column of the source.
-- Negative numbers expand before the first row or first column of the
-- source.
sadFillLength :: Lens' SourceAndDestination (Maybe Int32)
sadFillLength
= lens _sadFillLeng... | 385 | sadFillLength :: Lens' SourceAndDestination (Maybe Int32)
sadFillLength
= lens _sadFillLength
(\ s a -> s{_sadFillLength = a})
. mapping _Coerce | 158 | sadFillLength
= lens _sadFillLength
(\ s a -> s{_sadFillLength = a})
. mapping _Coerce | 100 | true | true | 2 | 8 | 76 | 62 | 31 | 31 | null | null |
haskell-distributed/distributed-process-task | src/Control/Distributed/Process/Task/Pool.hs | bsd-3-clause | -- | Release a resource of type /r/, previously acquired from the pool.
--
-- > acquireResource poolHandle >>= \r -> doSomethingWithResource >> releaseResource r
--
releaseResource :: forall r. (Referenced r)
=> ResourcePool r
-> r
-> Process ()
releaseResource pool res =... | 367 | releaseResource :: forall r. (Referenced r)
=> ResourcePool r
-> r
-> Process ()
releaseResource pool res = getSelfPid >>= cast pool . ReleaseResource res | 202 | releaseResource pool res = getSelfPid >>= cast pool . ReleaseResource res | 73 | true | true | 0 | 10 | 98 | 64 | 33 | 31 | null | null |
Moskau/estuary | Estuary/Tidal/Types.hs | gpl-3.0 | emptySoundPattern :: SpecificPattern
emptySoundPattern = Sound Blank | 68 | emptySoundPattern :: SpecificPattern
emptySoundPattern = Sound Blank | 68 | emptySoundPattern = Sound Blank | 31 | false | true | 0 | 5 | 6 | 14 | 7 | 7 | null | null |
martinra/hlinear | src/HLinear/Matrix/Algebra.hs | gpl-3.0 | tensorProduct :: Semiring a => Matrix a -> Matrix a -> Matrix a
tensorProduct m = M.concatMap (\a -> fmap (*a) m) | 113 | tensorProduct :: Semiring a => Matrix a -> Matrix a -> Matrix a
tensorProduct m = M.concatMap (\a -> fmap (*a) m) | 113 | tensorProduct m = M.concatMap (\a -> fmap (*a) m) | 49 | false | true | 0 | 9 | 21 | 60 | 29 | 31 | null | null |
lukemaurer/sequent-core | src/Language/SequentCore/PrePrep.hs | bsd-3-clause | wrapBindsAroundBodyTerm :: Floats -> CpeTerm -> CpeTerm
wrapBindsAroundBodyTerm floats rhs | isEmptyFloats floats = rhs | 119 | wrapBindsAroundBodyTerm :: Floats -> CpeTerm -> CpeTerm
wrapBindsAroundBodyTerm floats rhs | isEmptyFloats floats = rhs | 119 | wrapBindsAroundBodyTerm floats rhs | isEmptyFloats floats = rhs | 63 | false | true | 0 | 8 | 14 | 33 | 15 | 18 | null | null |
erikd/hs-tls | core/Network/TLS/Crypto/IES.hs | bsd-3-clause | calcShared :: Params -> PublicNumber -> PrivateNumber -> SharedSecret
calcShared params pub pri = SharedSecret share
where
SharedKey share = getShared params pri pub | 171 | calcShared :: Params -> PublicNumber -> PrivateNumber -> SharedSecret
calcShared params pub pri = SharedSecret share
where
SharedKey share = getShared params pri pub | 171 | calcShared params pub pri = SharedSecret share
where
SharedKey share = getShared params pri pub | 101 | false | true | 0 | 7 | 29 | 50 | 24 | 26 | null | null |
crazymaik/ard-haskell | lib/ARD/Math.hs | mit | radians deg = deg * (pi / 180.0) | 32 | radians deg = deg * (pi / 180.0) | 32 | radians deg = deg * (pi / 180.0) | 32 | false | false | 0 | 7 | 7 | 20 | 10 | 10 | null | null |
beni55/hdbc-postgresql | Database/HDBC/PostgreSQL/ErrorCodes.hs | bsd-3-clause | -- |Same as 'invalidSchemaName'.
undefinedSchema :: String
undefinedSchema = invalidSchemaName | 94 | undefinedSchema :: String
undefinedSchema = invalidSchemaName | 61 | undefinedSchema = invalidSchemaName | 35 | true | true | 0 | 4 | 9 | 12 | 7 | 5 | null | null |
rueshyna/gogol | gogol-dataflow/gen/Network/Google/Dataflow/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'ListJobMessagesResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ljmrJobMessages'
--
-- * 'ljmrNextPageToken'
listJobMessagesResponse
:: ListJobMessagesResponse
listJobMessagesResponse =
ListJo... | 412 | listJobMessagesResponse
:: ListJobMessagesResponse
listJobMessagesResponse =
ListJobMessagesResponse'
{ _ljmrJobMessages = Nothing
, _ljmrNextPageToken = Nothing
} | 183 | listJobMessagesResponse =
ListJobMessagesResponse'
{ _ljmrJobMessages = Nothing
, _ljmrNextPageToken = Nothing
} | 128 | true | true | 0 | 7 | 72 | 42 | 24 | 18 | null | null |
jystic/sandwich-press | doc/Experiment.hs | bsd-3-clause | centos6 :: Dockerfile '[Redhat]
centos6 = Dockerfile "centos" "6" [] | 68 | centos6 :: Dockerfile '[Redhat]
centos6 = Dockerfile "centos" "6" [] | 68 | centos6 = Dockerfile "centos" "6" [] | 36 | false | true | 0 | 7 | 9 | 28 | 14 | 14 | null | null |
uduki/hsQt | demos/PathDeform.hs | bsd-2-clause | pdWidget :: QWidget a -> IO (PDWidget)
pdWidget parent = qSubClass (qWidget ()) | 79 | pdWidget :: QWidget a -> IO (PDWidget)
pdWidget parent = qSubClass (qWidget ()) | 79 | pdWidget parent = qSubClass (qWidget ()) | 40 | false | true | 0 | 8 | 12 | 38 | 18 | 20 | null | null |
frontrowed/stratosphere | library-gen/Stratosphere/Resources/IoT1ClickProject.hs | mit | -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot1click-project.html#cfn-iot1click-project-projectname
itcprProjectName :: Lens' IoT1ClickProject (Maybe (Val Text))
itcprProjectName = lens _ioT1ClickProjectProjectName (\s a -> s { _ioT1ClickProjectProjectName = a }) | 300 | itcprProjectName :: Lens' IoT1ClickProject (Maybe (Val Text))
itcprProjectName = lens _ioT1ClickProjectProjectName (\s a -> s { _ioT1ClickProjectProjectName = a }) | 163 | itcprProjectName = lens _ioT1ClickProjectProjectName (\s a -> s { _ioT1ClickProjectProjectName = a }) | 101 | true | true | 0 | 9 | 22 | 52 | 28 | 24 | null | null |
sergv/tags-server | tests/Haskell/Language/Server/Tags/AnalyzeHeaderTests.hs | bsd-3-clause | moduleWithDisabledSectionTest1 :: Test
moduleWithDisabledSectionTest1 = TestCase
{ testName = "Module header with a part guarded by #if 0"
, input =
"module Test\n\
\ (\n\
\ Foo( X, Y, Z)\n\
\#if 0\n\
\ , Bar\n\
\#endif\n\
\ , Baz\n\
\ ) where"
... | 1,326 | moduleWithDisabledSectionTest1 :: Test
moduleWithDisabledSectionTest1 = TestCase
{ testName = "Module header with a part guarded by #if 0"
, input =
"module Test\n\
\ (\n\
\ Foo( X, Y, Z)\n\
\#if 0\n\
\ , Bar\n\
\#endif\n\
\ , Baz\n\
\ ) where"
... | 1,326 | moduleWithDisabledSectionTest1 = TestCase
{ testName = "Module header with a part guarded by #if 0"
, input =
"module Test\n\
\ (\n\
\ Foo( X, Y, Z)\n\
\#if 0\n\
\ , Bar\n\
\#endif\n\
\ , Baz\n\
\ ) where"
, expectedResult = ModuleHeader
... | 1,287 | false | true | 0 | 21 | 585 | 218 | 123 | 95 | null | null |
WraithM/fingmodules | src/Language/Lambda/Pretty.hs | bsd-3-clause | prettyExp (Lit l) = prettyLit l | 31 | prettyExp (Lit l) = prettyLit l | 31 | prettyExp (Lit l) = prettyLit l | 31 | false | false | 0 | 7 | 5 | 18 | 8 | 10 | null | null |
stefanjaax/omega-automata | ldba-tool/Main.hs | gpl-3.0 | action2Complement :: T.Text -> IO ()
action2Complement s = do
hoa <- parseHoaOrExit s
let nba = hoaToNBA hoa
printHoa hoa (buchiComplement nba) | 149 | action2Complement :: T.Text -> IO ()
action2Complement s = do
hoa <- parseHoaOrExit s
let nba = hoaToNBA hoa
printHoa hoa (buchiComplement nba) | 149 | action2Complement s = do
hoa <- parseHoaOrExit s
let nba = hoaToNBA hoa
printHoa hoa (buchiComplement nba) | 112 | false | true | 0 | 10 | 28 | 61 | 27 | 34 | null | null |
ezyang/ghc | compiler/basicTypes/OccName.hs | bsd-3-clause | -- Used in derived instances
mkCon2TagOcc = mk_simple_deriv varName "$con2tag_" | 87 | mkCon2TagOcc = mk_simple_deriv varName "$con2tag_" | 58 | mkCon2TagOcc = mk_simple_deriv varName "$con2tag_" | 58 | true | false | 0 | 5 | 17 | 12 | 6 | 6 | null | null |
igormoraisn/sanity | src/ghc.hs | mit | quicksort [] = [] | 17 | quicksort [] = [] | 17 | quicksort [] = [] | 17 | false | false | 0 | 6 | 3 | 13 | 6 | 7 | null | null |
sergv/tags-server | src/Haskell/Language/Lexer/Input.hs | bsd-3-clause | alexGetByte :: AlexInput -> Maybe (Word8, AlexInput)
alexGetByte input =
case aiBytes input of
b:bs -> Just (b, input { aiBytes = bs })
[] -> nextChar
where
nextChar :: Maybe (Word8, AlexInput)
nextChar = case InputStack.uncons $ aiInput input of
Nothing -> Nothing
Just (typ,... | 843 | alexGetByte :: AlexInput -> Maybe (Word8, AlexInput)
alexGetByte input =
case aiBytes input of
b:bs -> Just (b, input { aiBytes = bs })
[] -> nextChar
where
nextChar :: Maybe (Word8, AlexInput)
nextChar = case InputStack.uncons $ aiInput input of
Nothing -> Nothing
Just (typ,... | 843 | alexGetByte input =
case aiBytes input of
b:bs -> Just (b, input { aiBytes = bs })
[] -> nextChar
where
nextChar :: Maybe (Word8, AlexInput)
nextChar = case InputStack.uncons $ aiInput input of
Nothing -> Nothing
Just (typ, c, cs) -> Just $ encode typ (fromMaybe c $ fixChar c... | 790 | false | true | 3 | 13 | 310 | 266 | 140 | 126 | null | null |
s9gf4ult/yesod | yesod-form/Yesod/Form/Fields.hs | mit | -- | Creates a input with @type="text"@.
textField :: Monad m => RenderMessage (HandlerSite m) FormMessage => Field m Text
textField = Field
{ fieldParse = parseHelper $ Right
, fieldView = \theId name attrs val isReq ->
[whamlet|
$newline never
<input id="#{theId}" name="#{name}" *{attrs} type="text" :... | 404 | textField :: Monad m => RenderMessage (HandlerSite m) FormMessage => Field m Text
textField = Field
{ fieldParse = parseHelper $ Right
, fieldView = \theId name attrs val isReq ->
[whamlet|
$newline never
<input id="#{theId}" name="#{name}" *{attrs} type="text" :isReq:required value="#{either id id val}... | 363 | textField = Field
{ fieldParse = parseHelper $ Right
, fieldView = \theId name attrs val isReq ->
[whamlet|
$newline never
<input id="#{theId}" name="#{name}" *{attrs} type="text" :isReq:required value="#{either id id val}">
|]
, fieldEnctype = UrlEncoded
} | 281 | true | true | 0 | 10 | 80 | 89 | 47 | 42 | null | null |
KommuSoft/dep-software | Dep.Ui.Utils.hs | gpl-3.0 | edgeEmitW :: Int -> EdgeEmit -> EdgeEmit -> EdgeEmit
edgeEmitW dw (EdgeEmit wa ha ta _ ba la) (EdgeEmit wb hb tb rb bb _) = EdgeEmit (dww+wb) (max ha hb) (cnc ta tb) rb (cnc ba bb) la
where dww = dw+wa
cnc x y = x++map (dww+) y | 241 | edgeEmitW :: Int -> EdgeEmit -> EdgeEmit -> EdgeEmit
edgeEmitW dw (EdgeEmit wa ha ta _ ba la) (EdgeEmit wb hb tb rb bb _) = EdgeEmit (dww+wb) (max ha hb) (cnc ta tb) rb (cnc ba bb) la
where dww = dw+wa
cnc x y = x++map (dww+) y | 241 | edgeEmitW dw (EdgeEmit wa ha ta _ ba la) (EdgeEmit wb hb tb rb bb _) = EdgeEmit (dww+wb) (max ha hb) (cnc ta tb) rb (cnc ba bb) la
where dww = dw+wa
cnc x y = x++map (dww+) y | 188 | false | true | 1 | 7 | 63 | 142 | 71 | 71 | null | null |
Atidot/hs-mesos | src/System/Mesos/Resources.hs | mit | cpus :: Prism' Resource Double
cpus = prism' (\x -> Resource "cpus" (Scalar x) (Just "*") Nothing Nothing Nothing) $ \r ->
if resourceName r == "cpus"
then r ^? value . scalar
else Nothing | 200 | cpus :: Prism' Resource Double
cpus = prism' (\x -> Resource "cpus" (Scalar x) (Just "*") Nothing Nothing Nothing) $ \r ->
if resourceName r == "cpus"
then r ^? value . scalar
else Nothing | 200 | cpus = prism' (\x -> Resource "cpus" (Scalar x) (Just "*") Nothing Nothing Nothing) $ \r ->
if resourceName r == "cpus"
then r ^? value . scalar
else Nothing | 169 | false | true | 0 | 11 | 46 | 84 | 43 | 41 | null | null |
k00mi/bckspc-bot | src/EventEnv.hs | mit | runEnv :: EventEnv a -> String -> MVar String -> MIrc -> IrcMessage -> MQTTEnv
-> IO a
runEnv env url file s message mqtt =
runReaderT env $ MsgEnv s message url file mqtt | 182 | runEnv :: EventEnv a -> String -> MVar String -> MIrc -> IrcMessage -> MQTTEnv
-> IO a
runEnv env url file s message mqtt =
runReaderT env $ MsgEnv s message url file mqtt | 182 | runEnv env url file s message mqtt =
runReaderT env $ MsgEnv s message url file mqtt | 88 | false | true | 0 | 11 | 45 | 75 | 35 | 40 | null | null |
rolph-recto/liquidhaskell | FaultLocal.hs | bsd-3-clause | getBindMap :: FInfo Cinfo -> BindMap (Symbol, SortedReft)
getBindMap finfo = case bs finfo of
BE _ bmap -> bmap | 113 | getBindMap :: FInfo Cinfo -> BindMap (Symbol, SortedReft)
getBindMap finfo = case bs finfo of
BE _ bmap -> bmap | 113 | getBindMap finfo = case bs finfo of
BE _ bmap -> bmap | 55 | false | true | 0 | 8 | 21 | 53 | 24 | 29 | null | null |
bbangert/push-tester | spTester/SimpleTest/Interact.hs | mpl-2.0 | assert (False, obj) msg cntr = do
liftIO $ putStrLn $ "Assert failed: " ++ msg ++ " \tObject: " ++ show obj
incrementCounter "push_test.assertfail" (BC.pack cntr) 1
fail "Abort" | 189 | assert (False, obj) msg cntr = do
liftIO $ putStrLn $ "Assert failed: " ++ msg ++ " \tObject: " ++ show obj
incrementCounter "push_test.assertfail" (BC.pack cntr) 1
fail "Abort" | 189 | assert (False, obj) msg cntr = do
liftIO $ putStrLn $ "Assert failed: " ++ msg ++ " \tObject: " ++ show obj
incrementCounter "push_test.assertfail" (BC.pack cntr) 1
fail "Abort" | 189 | false | false | 0 | 11 | 41 | 69 | 32 | 37 | null | null |
markuspf/Idris-dev | src/Idris/Parser/Helpers.hs | bsd-3-clause | initsEndAt p (x:xs) | p x = [] : x_inits_xs
| otherwise = x_inits_xs
where x_inits_xs = [x : cs | cs <- initsEndAt p xs]
{- | Create a `Name' from a pair of strings representing a base name and its
namespace.
-} | 236 | initsEndAt p (x:xs) | p x = [] : x_inits_xs
| otherwise = x_inits_xs
where x_inits_xs = [x : cs | cs <- initsEndAt p xs]
{- | Create a `Name' from a pair of strings representing a base name and its
namespace.
-} | 236 | initsEndAt p (x:xs) | p x = [] : x_inits_xs
| otherwise = x_inits_xs
where x_inits_xs = [x : cs | cs <- initsEndAt p xs]
{- | Create a `Name' from a pair of strings representing a base name and its
namespace.
-} | 236 | false | false | 0 | 8 | 68 | 71 | 34 | 37 | null | null |
AmkG/merchants-race | Merch/Race/Ruleset/Parser.hs | gpl-3.0 | topDecl :: Parser TopDeclaration
topDecl = itemDecl
<|> settlementTypeDecl
<|> nameGeneratorDecl
<|> settlementGeneratorDecl
<|> difficultyDecl | 167 | topDecl :: Parser TopDeclaration
topDecl = itemDecl
<|> settlementTypeDecl
<|> nameGeneratorDecl
<|> settlementGeneratorDecl
<|> difficultyDecl | 167 | topDecl = itemDecl
<|> settlementTypeDecl
<|> nameGeneratorDecl
<|> settlementGeneratorDecl
<|> difficultyDecl | 134 | false | true | 12 | 6 | 38 | 48 | 24 | 24 | null | null |
sdiehl/ghc | includes/CodeGen.Platform.hs | bsd-3-clause | callerSaves (FloatReg 6) = True | 36 | callerSaves (FloatReg 6) = True | 36 | callerSaves (FloatReg 6) = True | 36 | false | false | 0 | 7 | 9 | 15 | 7 | 8 | null | null |
kosmoskatten/ghost-lang | ghost-node/src/GhostLang/Node/State.hs | mit | -- | Initialize the state.
initState :: IO State
initState = State <$> newTVarIO Map.empty
<*> newTVarIO Map.empty
<*> newTVarIO emptyNetworkConfiguration
<*> newTVarIO emptyCounter
<*> genDataChunk 32768
<*> newStdoutGLog | 312 | initState :: IO State
initState = State <$> newTVarIO Map.empty
<*> newTVarIO Map.empty
<*> newTVarIO emptyNetworkConfiguration
<*> newTVarIO emptyCounter
<*> genDataChunk 32768
<*> newStdoutGLog | 285 | initState = State <$> newTVarIO Map.empty
<*> newTVarIO Map.empty
<*> newTVarIO emptyNetworkConfiguration
<*> newTVarIO emptyCounter
<*> genDataChunk 32768
<*> newStdoutGLog | 263 | true | true | 0 | 12 | 118 | 58 | 27 | 31 | null | null |
BinRoot/graphUVA | main.hs | gpl-2.0 | getPhoneNumberFromTr row = getTextFromTd $ getTreeChildren row !! 7 | 67 | getPhoneNumberFromTr row = getTextFromTd $ getTreeChildren row !! 7 | 67 | getPhoneNumberFromTr row = getTextFromTd $ getTreeChildren row !! 7 | 67 | false | false | 0 | 7 | 8 | 20 | 9 | 11 | null | null |
pbv/codex | src/Codex/Quiz.hs | mit | makeRoman n
| n>0 = symbols ++ makeRoman (n - value)
| otherwise = error "lowerRoman: negative argument"
where (value, symbols) = head [ (val,sym) | (val,sym) <-numerals, val<=n ] | 185 | makeRoman n
| n>0 = symbols ++ makeRoman (n - value)
| otherwise = error "lowerRoman: negative argument"
where (value, symbols) = head [ (val,sym) | (val,sym) <-numerals, val<=n ] | 185 | makeRoman n
| n>0 = symbols ++ makeRoman (n - value)
| otherwise = error "lowerRoman: negative argument"
where (value, symbols) = head [ (val,sym) | (val,sym) <-numerals, val<=n ] | 185 | false | false | 1 | 9 | 35 | 91 | 47 | 44 | null | null |
urbanslug/ghc | compiler/stranal/WwLib.hs | bsd-3-clause | mkWWstr :: DynFlags
-> FamInstEnvs
-> [Var] -- Wrapper args; have their demand info on them
-- *Includes type variables*
-> UniqSM (Bool, -- Is this useful
[Var], ... | 901 | mkWWstr :: DynFlags
-> FamInstEnvs
-> [Var] -- Wrapper args; have their demand info on them
-- *Includes type variables*
-> UniqSM (Bool, -- Is this useful
[Var], ... | 682 | mkWWstr _ _ []
= return (False, [], nop_fn, nop_fn) | 53 | true | true | 0 | 11 | 500 | 92 | 54 | 38 | null | null |
soscpd/bee | root/tests/zguide/examples/Haskell/MDPDef.hs | mit | mdpwWorker = pack "MDPW01" | 26 | mdpwWorker = pack "MDPW01" | 26 | mdpwWorker = pack "MDPW01" | 26 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
josuf107/Adverb | Adverb/Common.hs | gpl-3.0 | gorgeously = id | 15 | gorgeously = id | 15 | gorgeously = id | 15 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
JoeyEremondi/utrecht-apa-p1 | src/Type/Constrain/Expression.hs | bsd-3-clause | expandPattern :: Canonical.Def -> [Canonical.Def]
expandPattern def@(Canonical.Definition pattern lexpr@(A r _) maybeType) =
case pattern of
P.Var _ -> [def]
_ -> Canonical.Definition (P.Var x) lexpr maybeType : map toDef vars
where
vars = P.boundVarList pattern
x = "$"... | 475 | expandPattern :: Canonical.Def -> [Canonical.Def]
expandPattern def@(Canonical.Definition pattern lexpr@(A r _) maybeType) =
case pattern of
P.Var _ -> [def]
_ -> Canonical.Definition (P.Var x) lexpr maybeType : map toDef vars
where
vars = P.boundVarList pattern
x = "$"... | 475 | expandPattern def@(Canonical.Definition pattern lexpr@(A r _) maybeType) =
case pattern of
P.Var _ -> [def]
_ -> Canonical.Definition (P.Var x) lexpr maybeType : map toDef vars
where
vars = P.boundVarList pattern
x = "$" ++ concat vars
mkVar = A r . localVar... | 425 | false | true | 0 | 16 | 137 | 195 | 98 | 97 | null | null |
dylex/wai | warp/Network/Wai/Handler/Warp/HTTP2/Manager.hs | mit | del :: ThreadSet -> ThreadId -> IO ()
del (ThreadSet ref) tid =
atomicModifyIORef' ref (\set -> (Set.delete tid set, ())) | 125 | del :: ThreadSet -> ThreadId -> IO ()
del (ThreadSet ref) tid =
atomicModifyIORef' ref (\set -> (Set.delete tid set, ())) | 125 | del (ThreadSet ref) tid =
atomicModifyIORef' ref (\set -> (Set.delete tid set, ())) | 87 | false | true | 0 | 10 | 24 | 67 | 33 | 34 | null | null |
ghc-android/ghc | compiler/deSugar/Coverage.hs | bsd-3-clause | addTickHsLocalBinds (HsIPBinds binds) =
liftM HsIPBinds
(addTickHsIPBinds binds) | 105 | addTickHsLocalBinds (HsIPBinds binds) =
liftM HsIPBinds
(addTickHsIPBinds binds) | 105 | addTickHsLocalBinds (HsIPBinds binds) =
liftM HsIPBinds
(addTickHsIPBinds binds) | 105 | false | false | 0 | 7 | 32 | 26 | 12 | 14 | null | null |
gridaphobe/liquid-fixpoint | src/Language/Fixpoint/Parse.hs | bsd-3-clause | cmdVarP
= do x <- bindP
t <- sortP
return $ Declare x [] t
---------------------------------------------------------------------
-- Bundling Parsers into a Typeclass --------------------------------
--------------------------------------------------------------------- | 286 | cmdVarP
= do x <- bindP
t <- sortP
return $ Declare x [] t
---------------------------------------------------------------------
-- Bundling Parsers into a Typeclass --------------------------------
--------------------------------------------------------------------- | 286 | cmdVarP
= do x <- bindP
t <- sortP
return $ Declare x [] t
---------------------------------------------------------------------
-- Bundling Parsers into a Typeclass --------------------------------
--------------------------------------------------------------------- | 286 | false | false | 1 | 10 | 41 | 43 | 19 | 24 | null | null |
arnihermann/timedreb2erl | src/Language/Rebeca/Skelrebeca.hs | mit | transTypedParameter :: TypedParameter -> Result
transTypedParameter x = case x of
TypedParameter typename id -> failure x | 124 | transTypedParameter :: TypedParameter -> Result
transTypedParameter x = case x of
TypedParameter typename id -> failure x | 124 | transTypedParameter x = case x of
TypedParameter typename id -> failure x | 76 | false | true | 0 | 8 | 19 | 41 | 18 | 23 | null | null |
merijn/GPU-benchmarks | benchmark-analysis/src/Sql/Transaction.hs | gpl-3.0 | queryExternalImplementations
:: (MonadResource m, MonadSql m)
=> Key Algorithm -> Transaction m (IntMap ExternalImpl)
queryExternalImplementations algoId = selectImpls algoId $ C.foldMap toIntMap
where
selectImpls aId = Sql.selectSource [ ExternalImplAlgorithmId ==. aId ] []
toIntMap :: Entity Extern... | 426 | queryExternalImplementations
:: (MonadResource m, MonadSql m)
=> Key Algorithm -> Transaction m (IntMap ExternalImpl)
queryExternalImplementations algoId = selectImpls algoId $ C.foldMap toIntMap
where
selectImpls aId = Sql.selectSource [ ExternalImplAlgorithmId ==. aId ] []
toIntMap :: Entity Extern... | 426 | queryExternalImplementations algoId = selectImpls algoId $ C.foldMap toIntMap
where
selectImpls aId = Sql.selectSource [ ExternalImplAlgorithmId ==. aId ] []
toIntMap :: Entity ExternalImpl -> IntMap ExternalImpl
toIntMap (Entity k val) = IM.singleton (fromIntegral $ fromSqlKey k) val | 300 | false | true | 2 | 9 | 73 | 129 | 63 | 66 | null | null |
ucsd-progsys/nanomaly | src/NanoML/Prim.hs | bsd-3-clause | pand :: MonadEval m => Value -> Value -> m Value
pand (VB _ x) (VB _ y) = withCurrentProv $ \prv -> (VB prv (x && y)) | 117 | pand :: MonadEval m => Value -> Value -> m Value
pand (VB _ x) (VB _ y) = withCurrentProv $ \prv -> (VB prv (x && y)) | 117 | pand (VB _ x) (VB _ y) = withCurrentProv $ \prv -> (VB prv (x && y)) | 68 | false | true | 0 | 11 | 27 | 79 | 38 | 41 | null | null |
pparkkin/eta | compiler/ETA/SimplCore/FloatIn.hs | bsd-3-clause | fbFVs :: FloatInBind -> VarSet
fbFVs (FB _ fvs _) = fvs | 55 | fbFVs :: FloatInBind -> VarSet
fbFVs (FB _ fvs _) = fvs | 55 | fbFVs (FB _ fvs _) = fvs | 24 | false | true | 0 | 7 | 11 | 28 | 14 | 14 | null | null |
joelburget/haste-compiler | src/Data/JSTarget/PP.hs | bsd-3-clause | intDec :: Int -> Builder
intDec = B.fromString . show | 53 | intDec :: Int -> Builder
intDec = B.fromString . show | 53 | intDec = B.fromString . show | 28 | false | true | 0 | 7 | 9 | 28 | 12 | 16 | null | null |
danoctavian/utp | src/Network/UTP.hs | mit | -- manual debugging Setup
-- create 2 UDP sockets tunnel through them
echoPort = 9901 | 87 | echoPort = 9901 | 15 | echoPort = 9901 | 15 | true | false | 0 | 4 | 16 | 8 | 5 | 3 | null | null |
ElvishJerricco/nix-simple-ci | src/Main.hs | bsd-3-clause | main :: IO ()
main = do
Option {..} <- getRecord "nix-simple-ci"
mgr <- newTlsManager
sem <- newQSem 1
let port' = fromMaybe 8080 port
putStrLn $ "Starting server on " ++ show port'
withStdoutLogger $ \logger -> do
let settings = setPort port' $ setLogger logger defaultSettings
runSe... | 520 | main :: IO ()
main = do
Option {..} <- getRecord "nix-simple-ci"
mgr <- newTlsManager
sem <- newQSem 1
let port' = fromMaybe 8080 port
putStrLn $ "Starting server on " ++ show port'
withStdoutLogger $ \logger -> do
let settings = setPort port' $ setLogger logger defaultSettings
runSe... | 520 | main = do
Option {..} <- getRecord "nix-simple-ci"
mgr <- newTlsManager
sem <- newQSem 1
let port' = fromMaybe 8080 port
putStrLn $ "Starting server on " ++ show port'
withStdoutLogger $ \logger -> do
let settings = setPort port' $ setLogger logger defaultSettings
runSettings setting... | 506 | false | true | 0 | 17 | 186 | 161 | 73 | 88 | null | null |
AndreaInfUFSM/elc117-2016a | praticas/haskell3/svgcolors.hs | gpl-3.0 | genRects :: Float -> Float -> Float -> [Rect]
-- Remova a linha abaixo antes de implementar a nova funcao recursiva
genRects n w h = [((0.0,0.0), w, h)] | 154 | genRects :: Float -> Float -> Float -> [Rect]
genRects n w h = [((0.0,0.0), w, h)] | 82 | genRects n w h = [((0.0,0.0), w, h)] | 36 | true | true | 0 | 10 | 30 | 58 | 31 | 27 | null | null |
rahulmutt/ghcvm | compiler/Eta/Prelude/PrimOp.hs | bsd-3-clause | primOpOutOfLine _ = False | 25 | primOpOutOfLine _ = False | 25 | primOpOutOfLine _ = False | 25 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
AaronFriel/eff-experiments | src/Data/Iota/Tagged/Eff1.hs | bsd-3-clause | tmapr = ([11,12,13,14,15] ==) $
run $ runReader tmap (10::Int) | 70 | tmapr = ([11,12,13,14,15] ==) $
run $ runReader tmap (10::Int) | 70 | tmapr = ([11,12,13,14,15] ==) $
run $ runReader tmap (10::Int) | 70 | false | false | 3 | 7 | 17 | 49 | 26 | 23 | null | null |
smurphy8/shakespeare-dynamic | shakespeare-dynamic-opheilia/src/Shakespeare/Dynamic/Opheilia/Parser.hs | mit | parseDoc :: HamletSettings -> String -> Result (Maybe NewlineStyle, [Doc])
parseDoc set s = do
(mnl, set', ns) <- parseToNestList set s
ds <- nestToDoc set' ns
return (mnl, compressDoc ds) | 201 | parseDoc :: HamletSettings -> String -> Result (Maybe NewlineStyle, [Doc])
parseDoc set s = do
(mnl, set', ns) <- parseToNestList set s
ds <- nestToDoc set' ns
return (mnl, compressDoc ds) | 201 | parseDoc set s = do
(mnl, set', ns) <- parseToNestList set s
ds <- nestToDoc set' ns
return (mnl, compressDoc ds) | 126 | false | true | 0 | 9 | 43 | 87 | 43 | 44 | null | null |
zyla/haskell-nullpointer | Data/NullPointer.hs | bsd-3-clause | -- | The null value.
-- When forced, a NullPointerException will be thrown.
null :: a
null = throw NullPointerException | 119 | null :: a
null = throw NullPointerException | 43 | null = throw NullPointerException | 33 | true | true | 0 | 6 | 19 | 23 | 10 | 13 | null | null |
lucasdicioccio/stampede | Stampede/Dump.hs | apache-2.0 | dumpServerCommand Receipt = "RECEIPT" | 37 | dumpServerCommand Receipt = "RECEIPT" | 37 | dumpServerCommand Receipt = "RECEIPT" | 37 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.