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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
brendanhay/gogol
|
gogol-drive/gen/Network/Google/Drive/Types/Product.hs
|
mpl-2.0
|
-- | The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5).
fchtImage :: Lens' FileContentHintsThumbnail (Maybe ByteString)
fchtImage
= lens _fchtImage (\ s a -> s{_fchtImage = a}) .
mapping _Bytes
| 220
|
fchtImage :: Lens' FileContentHintsThumbnail (Maybe ByteString)
fchtImage
= lens _fchtImage (\ s a -> s{_fchtImage = a}) .
mapping _Bytes
| 145
|
fchtImage
= lens _fchtImage (\ s a -> s{_fchtImage = a}) .
mapping _Bytes
| 81
| true
| true
| 0
| 10
| 40
| 55
| 28
| 27
| null | null |
unknownloner/calccomp
|
FORTH/Stdlib.hs
|
mit
|
-- x1 x2 x3 x4 -- x3 x4 x1 x2
wasm "2SWAP" = rtni [asm|
pop bc ;x4
pop hl ;x3
pop de ;x2
ex (sp),hl ;hl = x1
push bc
push hl
push de
|]
| 163
|
wasm "2SWAP" = rtni [asm|
pop bc ;x4
pop hl ;x3
pop de ;x2
ex (sp),hl ;hl = x1
push bc
push hl
push de
|]
| 133
|
wasm "2SWAP" = rtni [asm|
pop bc ;x4
pop hl ;x3
pop de ;x2
ex (sp),hl ;hl = x1
push bc
push hl
push de
|]
| 133
| true
| false
| 0
| 5
| 63
| 18
| 10
| 8
| null | null |
flyingleafe/parser-gen
|
src/GrammarProcessing.hs
|
bsd-3-clause
|
makePairs (x:xs) = map (x, ) xs ++ makePairs xs
| 47
|
makePairs (x:xs) = map (x, ) xs ++ makePairs xs
| 47
|
makePairs (x:xs) = map (x, ) xs ++ makePairs xs
| 47
| false
| false
| 0
| 7
| 9
| 32
| 16
| 16
| null | null |
tpsinnem/Idris-dev
|
src/Idris/Reflection.hs
|
bsd-3-clause
|
reflectErr (CantMatch t) = raw_apply (Var $ reflErrName "CantMatch") [reflect t]
| 80
|
reflectErr (CantMatch t) = raw_apply (Var $ reflErrName "CantMatch") [reflect t]
| 80
|
reflectErr (CantMatch t) = raw_apply (Var $ reflErrName "CantMatch") [reflect t]
| 80
| false
| false
| 0
| 8
| 10
| 36
| 17
| 19
| null | null |
michelk/yaml-overrides.hs
|
src/Data/Yaml/Dirs.hs
|
bsd-3-clause
|
getDirectoryDirs :: FilePath -> IO [FilePath]
getDirectoryDirs d =
do fs <- getDirectoryContents d
let fs' = filter ( `notElem` [".",".." ]) fs
filterM (\f -> doesDirectoryExist (d </> f))fs'
-- | Decode directories either reverse sorted or not
| 258
|
getDirectoryDirs :: FilePath -> IO [FilePath]
getDirectoryDirs d =
do fs <- getDirectoryContents d
let fs' = filter ( `notElem` [".",".." ]) fs
filterM (\f -> doesDirectoryExist (d </> f))fs'
-- | Decode directories either reverse sorted or not
| 258
|
getDirectoryDirs d =
do fs <- getDirectoryContents d
let fs' = filter ( `notElem` [".",".." ]) fs
filterM (\f -> doesDirectoryExist (d </> f))fs'
-- | Decode directories either reverse sorted or not
| 212
| false
| true
| 0
| 12
| 52
| 87
| 45
| 42
| null | null |
notae/haskell-exercise
|
record/PatternSynonyms.hs
|
bsd-3-clause
|
-- causes "Warning: Pattern match(es) are overlapped"
g :: Int -> String
g p1 = "one"
| 85
|
g :: Int -> String
g p1 = "one"
| 31
|
g p1 = "one"
| 12
| true
| true
| 0
| 5
| 15
| 23
| 11
| 12
| null | null |
clample/lamdabtc
|
backend/src/Protocol/Messages.hs
|
bsd-3-clause
|
commandTable :: [(Command, ByteString)]
commandTable = over (mapped . _2) getCommandBS commandTable'
| 100
|
commandTable :: [(Command, ByteString)]
commandTable = over (mapped . _2) getCommandBS commandTable'
| 100
|
commandTable = over (mapped . _2) getCommandBS commandTable'
| 60
| false
| true
| 0
| 7
| 11
| 34
| 19
| 15
| null | null |
oldmanmike/ghc
|
compiler/stgSyn/StgSyn.hs
|
bsd-3-clause
|
stgSatOcc = SatCallsOnly
| 27
|
stgSatOcc = SatCallsOnly
| 27
|
stgSatOcc = SatCallsOnly
| 27
| false
| false
| 0
| 4
| 5
| 6
| 3
| 3
| null | null |
kyagrd/mininax
|
src/Main.hs
|
bsd-2-clause
|
mypath2 = mygr2 "test/path.mininax"
| 35
|
mypath2 = mygr2 "test/path.mininax"
| 35
|
mypath2 = mygr2 "test/path.mininax"
| 35
| false
| false
| 1
| 5
| 3
| 13
| 4
| 9
| null | null |
jclee/cartparse
|
parse.hs
|
bsd-2-clause
|
renderInterleaved vals seps =
error $ "wrong number of interleaved args"
++ (show $ length vals)
++ " "
++ (show $ length seps)
| 141
|
renderInterleaved vals seps =
error $ "wrong number of interleaved args"
++ (show $ length vals)
++ " "
++ (show $ length seps)
| 141
|
renderInterleaved vals seps =
error $ "wrong number of interleaved args"
++ (show $ length vals)
++ " "
++ (show $ length seps)
| 141
| false
| false
| 8
| 8
| 37
| 52
| 23
| 29
| null | null |
alisheikh/elm-server
|
server/Server.hs
|
bsd-3-clause
|
-- | Set up the server.
main :: IO ()
main = do
cargs <- cmdArgs flags
(_,Just h,_,_) <- createProcess $ (shell "elm --version") { std_out = CreatePipe }
elmVer <- hGetContents h
putStr $ "Elm Server " ++ Version.showVersion version ++ " serving Elm " ++ elmVer
putStrLn "Just refresh a page to recompile it!"
httpServe (setPort (port cargs) config) $
serveRuntime (maybe Elm.runtime id (runtime cargs))
<|> serveElm
<|> route [ ("socket", socket)
]
<|> serveDirectoryWith directoryConfig "."
<|> serveAssets
<|> error404
| 585
|
main :: IO ()
main = do
cargs <- cmdArgs flags
(_,Just h,_,_) <- createProcess $ (shell "elm --version") { std_out = CreatePipe }
elmVer <- hGetContents h
putStr $ "Elm Server " ++ Version.showVersion version ++ " serving Elm " ++ elmVer
putStrLn "Just refresh a page to recompile it!"
httpServe (setPort (port cargs) config) $
serveRuntime (maybe Elm.runtime id (runtime cargs))
<|> serveElm
<|> route [ ("socket", socket)
]
<|> serveDirectoryWith directoryConfig "."
<|> serveAssets
<|> error404
| 561
|
main = do
cargs <- cmdArgs flags
(_,Just h,_,_) <- createProcess $ (shell "elm --version") { std_out = CreatePipe }
elmVer <- hGetContents h
putStr $ "Elm Server " ++ Version.showVersion version ++ " serving Elm " ++ elmVer
putStrLn "Just refresh a page to recompile it!"
httpServe (setPort (port cargs) config) $
serveRuntime (maybe Elm.runtime id (runtime cargs))
<|> serveElm
<|> route [ ("socket", socket)
]
<|> serveDirectoryWith directoryConfig "."
<|> serveAssets
<|> error404
| 547
| true
| true
| 1
| 17
| 148
| 193
| 92
| 101
| null | null |
ghc-android/ghc
|
compiler/codeGen/StgCmmPrim.hs
|
bsd-3-clause
|
translateOp dflags WordQuotOp = Just (mo_wordUQuot dflags)
| 62
|
translateOp dflags WordQuotOp = Just (mo_wordUQuot dflags)
| 62
|
translateOp dflags WordQuotOp = Just (mo_wordUQuot dflags)
| 62
| false
| false
| 0
| 7
| 10
| 20
| 9
| 11
| null | null |
jgardella/nancy
|
src/Nancy/Core/Language.hs
|
mit
|
mapExpr f (Lam var varType bodyExpr) =
Lam var varType (f bodyExpr)
| 69
|
mapExpr f (Lam var varType bodyExpr) =
Lam var varType (f bodyExpr)
| 69
|
mapExpr f (Lam var varType bodyExpr) =
Lam var varType (f bodyExpr)
| 69
| false
| false
| 0
| 7
| 13
| 34
| 16
| 18
| null | null |
codemac/yi-editor
|
src/Yi/Config.hs
|
gpl-2.0
|
configTopLevelKeymap :: Config -> Keymap
configTopLevelKeymap = extractTopKeymap . defaultKm
| 92
|
configTopLevelKeymap :: Config -> Keymap
configTopLevelKeymap = extractTopKeymap . defaultKm
| 92
|
configTopLevelKeymap = extractTopKeymap . defaultKm
| 51
| false
| true
| 0
| 7
| 9
| 26
| 11
| 15
| null | null |
mightymoose/liquidhaskell
|
benchmarks/esop2013-submission/Fib.hs
|
bsd-3-clause
|
-------------------------------------------------------------------------------
---------------------------- memoization --------------------------------------
-------------------------------------------------------------------------------
{-@ measure fib :: Int -> Int @-}
{-@ type FibV = j:Int -> {v:Int| ((v != 0) => (v = fib(j)))} @-}
{-@ assume axiom_fib :: i:Int -> {v: Bool | Prop v <=> (fib i = (if i <= 1 then 1 else (fib (i-1) + fib (i-2)))) } @-}
axiom_fib :: Int -> Bool
axiom_fib i = undefined
| 508
|
axiom_fib :: Int -> Bool
axiom_fib i = undefined
| 48
|
axiom_fib i = undefined
| 23
| true
| true
| 0
| 7
| 67
| 30
| 16
| 14
| null | null |
nomicflux/servant-opaleye-blog
|
src/Lib.hs
|
gpl-2.0
|
api :: Proxy API
api = Proxy
| 28
|
api :: Proxy API
api = Proxy
| 28
|
api = Proxy
| 11
| false
| true
| 1
| 5
| 6
| 18
| 7
| 11
| null | null |
Qinka/GiveYouAHead
|
lib/Data/GiveYouAHead.hs
|
mit
|
turncm :: Int -> CommandMap -> CommandMap
turncm i cm =
if null bs then as else let ((x,y,z):xs)=bs
in as++(turnSwitch x,y,z):xs
where
(as,bs) = splitAt i cm
| 199
|
turncm :: Int -> CommandMap -> CommandMap
turncm i cm =
if null bs then as else let ((x,y,z):xs)=bs
in as++(turnSwitch x,y,z):xs
where
(as,bs) = splitAt i cm
| 193
|
turncm i cm =
if null bs then as else let ((x,y,z):xs)=bs
in as++(turnSwitch x,y,z):xs
where
(as,bs) = splitAt i cm
| 151
| false
| true
| 0
| 12
| 69
| 104
| 54
| 50
| null | null |
Oblosys/webviews
|
src/exec/BorrowIt/BorrowItUtils.hs
|
mit
|
lenderDistance Lender{_lenderCoords=(lat1,long1)} Lender{_lenderCoords=(lat2,long2)} = 300
| 90
|
lenderDistance Lender{_lenderCoords=(lat1,long1)} Lender{_lenderCoords=(lat2,long2)} = 300
| 90
|
lenderDistance Lender{_lenderCoords=(lat1,long1)} Lender{_lenderCoords=(lat2,long2)} = 300
| 90
| false
| false
| 1
| 8
| 4
| 42
| 23
| 19
| null | null |
christiaanb/ghc
|
compiler/basicTypes/DataCon.hs
|
bsd-3-clause
|
isBanged (HsUnpack {}) = True
| 36
|
isBanged (HsUnpack {}) = True
| 36
|
isBanged (HsUnpack {}) = True
| 36
| false
| false
| 0
| 7
| 11
| 16
| 8
| 8
| null | null |
ekr/tamarin-prover
|
lib/theory/src/Theory.hs
|
gpl-3.0
|
-- | Adds the LHS lemma attribute.
addLeftLemma :: Lemma p -> Lemma p
addLeftLemma lem =
L.set lAttributes (LHSLemma:(L.get lAttributes lem)) lem
| 150
|
addLeftLemma :: Lemma p -> Lemma p
addLeftLemma lem =
L.set lAttributes (LHSLemma:(L.get lAttributes lem)) lem
| 115
|
addLeftLemma lem =
L.set lAttributes (LHSLemma:(L.get lAttributes lem)) lem
| 80
| true
| true
| 0
| 10
| 27
| 57
| 26
| 31
| null | null |
jsavatgy/hatupist
|
hatupist-104.hs
|
gpl-2.0
|
readSs :: String -> IO Settings
readSs = readIO
| 47
|
readSs :: String -> IO Settings
readSs = readIO
| 47
|
readSs = readIO
| 15
| false
| true
| 0
| 6
| 8
| 18
| 9
| 9
| null | null |
ledyba/bf2sat
|
lib/Brainfuck2Sat/SAT.hs
|
gpl-3.0
|
notEqP :: Component -> Component -> Fml Component
notEqP from_ to_ = notEqFml (Pred from_) (Pred to_)
| 101
|
notEqP :: Component -> Component -> Fml Component
notEqP from_ to_ = notEqFml (Pred from_) (Pred to_)
| 101
|
notEqP from_ to_ = notEqFml (Pred from_) (Pred to_)
| 51
| false
| true
| 0
| 7
| 16
| 44
| 21
| 23
| null | null |
ulricha/dsh
|
src/Database/DSH/NKL/Quote.hs
|
bsd-3-clause
|
freeVars (App _ e1 e2) = freeVars e1 `S.union` freeVars e2
| 62
|
freeVars (App _ e1 e2) = freeVars e1 `S.union` freeVars e2
| 62
|
freeVars (App _ e1 e2) = freeVars e1 `S.union` freeVars e2
| 62
| false
| false
| 0
| 6
| 14
| 34
| 16
| 18
| null | null |
gcross/either-unwrap
|
tests/runtests.hs
|
bsd-3-clause
|
test_fromRight_left = assertEqual "Is the correct value returned?" () (fromRight (Right ()))
| 92
|
test_fromRight_left = assertEqual "Is the correct value returned?" () (fromRight (Right ()))
| 92
|
test_fromRight_left = assertEqual "Is the correct value returned?" () (fromRight (Right ()))
| 92
| false
| false
| 0
| 10
| 11
| 29
| 14
| 15
| null | null |
brendanhay/gogol
|
gogol-youtube/gen/Network/Google/Resource/YouTube/Captions/Update.hs
|
mpl-2.0
|
-- | Creates a value of 'CaptionsUpdate' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'capOnBehalfOf'
--
-- * 'capXgafv'
--
-- * 'capPart'
--
-- * 'capUploadProtocol'
--
-- * 'capAccessToken'
--
-- * 'capUploadType'
--
-- * 'capPayload'
--
-- * 'capOnBehalfOfContentOwner'
--
-- * 'capSync'
--
-- * 'capCallback'
captionsUpdate
:: [Text] -- ^ 'capPart'
-> Caption -- ^ 'capPayload'
-> CaptionsUpdate
captionsUpdate pCapPart_ pCapPayload_ =
CaptionsUpdate'
{ _capOnBehalfOf = Nothing
, _capXgafv = Nothing
, _capPart = _Coerce # pCapPart_
, _capUploadProtocol = Nothing
, _capAccessToken = Nothing
, _capUploadType = Nothing
, _capPayload = pCapPayload_
, _capOnBehalfOfContentOwner = Nothing
, _capSync = Nothing
, _capCallback = Nothing
}
| 885
|
captionsUpdate
:: [Text] -- ^ 'capPart'
-> Caption -- ^ 'capPayload'
-> CaptionsUpdate
captionsUpdate pCapPart_ pCapPayload_ =
CaptionsUpdate'
{ _capOnBehalfOf = Nothing
, _capXgafv = Nothing
, _capPart = _Coerce # pCapPart_
, _capUploadProtocol = Nothing
, _capAccessToken = Nothing
, _capUploadType = Nothing
, _capPayload = pCapPayload_
, _capOnBehalfOfContentOwner = Nothing
, _capSync = Nothing
, _capCallback = Nothing
}
| 484
|
captionsUpdate pCapPart_ pCapPayload_ =
CaptionsUpdate'
{ _capOnBehalfOf = Nothing
, _capXgafv = Nothing
, _capPart = _Coerce # pCapPart_
, _capUploadProtocol = Nothing
, _capAccessToken = Nothing
, _capUploadType = Nothing
, _capPayload = pCapPayload_
, _capOnBehalfOfContentOwner = Nothing
, _capSync = Nothing
, _capCallback = Nothing
}
| 385
| true
| true
| 0
| 8
| 188
| 127
| 84
| 43
| null | null |
trskop/command-wrapper
|
command-wrapper-core/src/CommandWrapper/Core/Help/Pretty.hs
|
bsd-3-clause
|
optionalSubcommand :: Pretty.Doc (Result Pretty.AnsiStyle)
optionalSubcommand = Pretty.brackets subcommand
| 106
|
optionalSubcommand :: Pretty.Doc (Result Pretty.AnsiStyle)
optionalSubcommand = Pretty.brackets subcommand
| 106
|
optionalSubcommand = Pretty.brackets subcommand
| 47
| false
| true
| 0
| 8
| 8
| 29
| 14
| 15
| null | null |
ghc-android/ghc
|
compiler/prelude/PrelNames.hs
|
bsd-3-clause
|
unpackCStringFoldr_RDR = nameRdrName unpackCStringFoldrName
| 60
|
unpackCStringFoldr_RDR = nameRdrName unpackCStringFoldrName
| 60
|
unpackCStringFoldr_RDR = nameRdrName unpackCStringFoldrName
| 60
| false
| false
| 0
| 5
| 4
| 9
| 4
| 5
| null | null |
johnbcoughlin/mucalc
|
test/GRSynth/SynthesisTest.hs
|
gpl-2.0
|
fixpointStopTests = [ testCase "Bottom < Top" bottomTopTest
, testCase "Top < Bottom" topBottomTest
, testCase "Top <> Top" topTopTest
, testCase "Bottom <> Bottom" bottomBottomTest
, testCase "Bottom < Something" bottomSomethingTest
, testCase "Something < ManyThings" somethingManyThingsTest
, testCase "ManyThings < Top" manyThingsTopTest
]
| 483
|
fixpointStopTests = [ testCase "Bottom < Top" bottomTopTest
, testCase "Top < Bottom" topBottomTest
, testCase "Top <> Top" topTopTest
, testCase "Bottom <> Bottom" bottomBottomTest
, testCase "Bottom < Something" bottomSomethingTest
, testCase "Something < ManyThings" somethingManyThingsTest
, testCase "ManyThings < Top" manyThingsTopTest
]
| 483
|
fixpointStopTests = [ testCase "Bottom < Top" bottomTopTest
, testCase "Top < Bottom" topBottomTest
, testCase "Top <> Top" topTopTest
, testCase "Bottom <> Bottom" bottomBottomTest
, testCase "Bottom < Something" bottomSomethingTest
, testCase "Something < ManyThings" somethingManyThingsTest
, testCase "ManyThings < Top" manyThingsTopTest
]
| 483
| false
| false
| 1
| 7
| 184
| 66
| 31
| 35
| null | null |
frantisekfarka/ghc-dsi
|
ghc/Main.hs
|
bsd-3-clause
|
showUsage :: Bool -> DynFlags -> IO ()
showUsage ghci dflags = do
let usage_path = if ghci then ghciUsagePath dflags
else ghcUsagePath dflags
usage <- readFile usage_path
dump usage
where
dump "" = return ()
dump ('$':'$':s) = putStr progName >> dump s
dump (c:s) = putChar c >> dump s
| 350
|
showUsage :: Bool -> DynFlags -> IO ()
showUsage ghci dflags = do
let usage_path = if ghci then ghciUsagePath dflags
else ghcUsagePath dflags
usage <- readFile usage_path
dump usage
where
dump "" = return ()
dump ('$':'$':s) = putStr progName >> dump s
dump (c:s) = putChar c >> dump s
| 350
|
showUsage ghci dflags = do
let usage_path = if ghci then ghciUsagePath dflags
else ghcUsagePath dflags
usage <- readFile usage_path
dump usage
where
dump "" = return ()
dump ('$':'$':s) = putStr progName >> dump s
dump (c:s) = putChar c >> dump s
| 311
| false
| true
| 2
| 11
| 116
| 135
| 64
| 71
| null | null |
spechub/Hets
|
Modal/Logic_Modal.hs
|
gpl-2.0
|
rmTypesExt :: a -> b -> b
rmTypesExt _ f = f
| 44
|
rmTypesExt :: a -> b -> b
rmTypesExt _ f = f
| 44
|
rmTypesExt _ f = f
| 18
| false
| true
| 0
| 8
| 11
| 30
| 13
| 17
| null | null |
chrys-h/ftag
|
src/FTag/DB/Basic.hs
|
mit
|
removePreset :: TagN -> DBAction ()
removePreset n = deleteWhere [PresetName ==. n]
| 83
|
removePreset :: TagN -> DBAction ()
removePreset n = deleteWhere [PresetName ==. n]
| 83
|
removePreset n = deleteWhere [PresetName ==. n]
| 47
| false
| true
| 0
| 8
| 12
| 38
| 17
| 21
| null | null |
phaazon/OpenGLRaw
|
src/Graphics/Rendering/OpenGL/Raw/Tokens.hs
|
bsd-3-clause
|
gl_IMAGE_2D_EXT :: GLenum
gl_IMAGE_2D_EXT = 0x904D
| 50
|
gl_IMAGE_2D_EXT :: GLenum
gl_IMAGE_2D_EXT = 0x904D
| 50
|
gl_IMAGE_2D_EXT = 0x904D
| 24
| false
| true
| 0
| 4
| 5
| 11
| 6
| 5
| null | null |
li-zhirui/EoplLangs
|
src/InferredLang/Parser.hs
|
bsd-3-clause
|
questionMark = symbol "?"
| 25
|
questionMark = symbol "?"
| 25
|
questionMark = symbol "?"
| 25
| false
| false
| 0
| 5
| 3
| 9
| 4
| 5
| null | null |
chetant/mdp
|
AI/MDP/GridWorld.hs
|
bsd-3-clause
|
maybeReverseActions :: Probability -> ActionResults
maybeReverseActions p = [[(MoveW, p), (MoveE, p2)]
,[(MoveE, p), (MoveW, p2)]
,[(MoveN, p), (MoveS, p2)]
,[(MoveS, p), (MoveN, p2)]
,[(MoveNE, p), (MoveSW, p2)]
,[(MoveNW, p), (MoveSE, p2)]
,[(MoveSE, p), (MoveNW, p2)]
,[(MoveSW, p), (MoveNE, p2)]]
where p2 = 1-p
| 487
|
maybeReverseActions :: Probability -> ActionResults
maybeReverseActions p = [[(MoveW, p), (MoveE, p2)]
,[(MoveE, p), (MoveW, p2)]
,[(MoveN, p), (MoveS, p2)]
,[(MoveS, p), (MoveN, p2)]
,[(MoveNE, p), (MoveSW, p2)]
,[(MoveNW, p), (MoveSE, p2)]
,[(MoveSE, p), (MoveNW, p2)]
,[(MoveSW, p), (MoveNE, p2)]]
where p2 = 1-p
| 487
|
maybeReverseActions p = [[(MoveW, p), (MoveE, p2)]
,[(MoveE, p), (MoveW, p2)]
,[(MoveN, p), (MoveS, p2)]
,[(MoveS, p), (MoveN, p2)]
,[(MoveNE, p), (MoveSW, p2)]
,[(MoveNW, p), (MoveSE, p2)]
,[(MoveSE, p), (MoveNW, p2)]
,[(MoveSW, p), (MoveNE, p2)]]
where p2 = 1-p
| 435
| false
| true
| 0
| 7
| 215
| 198
| 127
| 71
| null | null |
epsilonhalbe/Algebra-Alchemy
|
tData.hs
|
bsd-3-clause
|
foo 2 = [1]
| 11
|
foo 2 = [1]
| 11
|
foo 2 = [1]
| 11
| false
| false
| 1
| 5
| 3
| 15
| 6
| 9
| null | null |
jean-edouard/manager
|
updatemgr/UpdateMgr/Logic.hs
|
gpl-2.0
|
dictFile :: String -> Map String String
dictFile =
Map.fromList
. mapMaybe (safeHead2 . split '=')
. lines
where
safeHead2 (k:v:_) = Just (strip k,strip v)
safeHead2 _ = Nothing
| 219
|
dictFile :: String -> Map String String
dictFile =
Map.fromList
. mapMaybe (safeHead2 . split '=')
. lines
where
safeHead2 (k:v:_) = Just (strip k,strip v)
safeHead2 _ = Nothing
| 219
|
dictFile =
Map.fromList
. mapMaybe (safeHead2 . split '=')
. lines
where
safeHead2 (k:v:_) = Just (strip k,strip v)
safeHead2 _ = Nothing
| 179
| false
| true
| 2
| 7
| 71
| 98
| 44
| 54
| null | null |
AndreasPK/stack
|
src/Stack/Types/Compiler.hs
|
bsd-3-clause
|
compilerVersionText :: CompilerVersion -> T.Text
compilerVersionText (GhcVersion vghc) =
"ghc-" <> versionText vghc
| 119
|
compilerVersionText :: CompilerVersion -> T.Text
compilerVersionText (GhcVersion vghc) =
"ghc-" <> versionText vghc
| 119
|
compilerVersionText (GhcVersion vghc) =
"ghc-" <> versionText vghc
| 70
| false
| true
| 0
| 7
| 16
| 33
| 16
| 17
| null | null |
databrary/databrary
|
src/JSON.hs
|
agpl-3.0
|
recordEncoding :: ToJSON k => Record k Series -> Encoding
recordEncoding = pairs . recordObject
| 95
|
recordEncoding :: ToJSON k => Record k Series -> Encoding
recordEncoding = pairs . recordObject
| 95
|
recordEncoding = pairs . recordObject
| 37
| false
| true
| 0
| 7
| 14
| 31
| 15
| 16
| null | null |
wjt/bustle
|
Bustle/VariantFormatter.hs
|
lgpl-2.1
|
format_Structure :: Structure -> String
format_Structure s = case structureItems s of
[] -> "()"
[v] -> "(" ++ format_Variant VariantStyleBare v ++ ",)"
vs -> "(" ++ intercalate ", " items ++ ")"
where
items = map (format_Variant VariantStyleBare) vs
| 278
|
format_Structure :: Structure -> String
format_Structure s = case structureItems s of
[] -> "()"
[v] -> "(" ++ format_Variant VariantStyleBare v ++ ",)"
vs -> "(" ++ intercalate ", " items ++ ")"
where
items = map (format_Variant VariantStyleBare) vs
| 278
|
format_Structure s = case structureItems s of
[] -> "()"
[v] -> "(" ++ format_Variant VariantStyleBare v ++ ",)"
vs -> "(" ++ intercalate ", " items ++ ")"
where
items = map (format_Variant VariantStyleBare) vs
| 238
| false
| true
| 0
| 12
| 68
| 97
| 46
| 51
| null | null |
mcschroeder/ghc
|
compiler/coreSyn/PprCore.hs
|
bsd-3-clause
|
-- Weird
ppr_expr add_par (Coercion co) = add_par (text "CO:" <+> ppr co)
| 73
|
ppr_expr add_par (Coercion co) = add_par (text "CO:" <+> ppr co)
| 64
|
ppr_expr add_par (Coercion co) = add_par (text "CO:" <+> ppr co)
| 64
| true
| false
| 0
| 8
| 12
| 34
| 16
| 18
| null | null |
konn/graph-utils
|
Data/Graph/PageRank.hs
|
bsd-3-clause
|
outdegree :: Node -> PRMachine Int
outdegree = lookupEnv outdegrees
| 67
|
outdegree :: Node -> PRMachine Int
outdegree = lookupEnv outdegrees
| 67
|
outdegree = lookupEnv outdegrees
| 32
| false
| true
| 0
| 7
| 9
| 27
| 11
| 16
| null | null |
seckcoder/lang-learn
|
haskell/scoped-type-variable.hs
|
unlicense
|
mkpair3 :: a -> b -> (a,b)
mkpair3 aa bb = (ida aa, bb)
where
ida :: b -> b -- Legal, because b is now a free variable
ida = id
| 143
|
mkpair3 :: a -> b -> (a,b)
mkpair3 aa bb = (ida aa, bb)
where
ida :: b -> b -- Legal, because b is now a free variable
ida = id
| 143
|
mkpair3 aa bb = (ida aa, bb)
where
ida :: b -> b -- Legal, because b is now a free variable
ida = id
| 116
| false
| true
| 0
| 7
| 47
| 62
| 32
| 30
| null | null |
GaloisInc/tower
|
tower-aadl/src/Tower/AADL/AST/Common.hs
|
bsd-3-clause
|
-- | Remove connections that don't have both endpoints.
filterEndpoints :: Connections -> Connections
filterEndpoints = M.filter go
where
go c = not (S.null (chanTxThds c) || S.null (chanRxThds c))
-- Given a list of pairs of AADL threads and local variables, Create their
-- connections.
| 293
|
filterEndpoints :: Connections -> Connections
filterEndpoints = M.filter go
where
go c = not (S.null (chanTxThds c) || S.null (chanRxThds c))
-- Given a list of pairs of AADL threads and local variables, Create their
-- connections.
| 237
|
filterEndpoints = M.filter go
where
go c = not (S.null (chanTxThds c) || S.null (chanRxThds c))
-- Given a list of pairs of AADL threads and local variables, Create their
-- connections.
| 191
| true
| true
| 0
| 10
| 50
| 66
| 33
| 33
| null | null |
exitmouse/proper
|
src/GLFWHelpers.hs
|
gpl-3.0
|
drawGameTextBox :: Drawing ()
drawGameTextBox = do
tgt <- asks surface
let x1 = 35
y1 = 480
x2 = 605
y2 = 295
_ <- liftIO $ box tgt (Rect x1 y1 x2 y2) (Pixel 0xffbe6cbb)
return ()
| 205
|
drawGameTextBox :: Drawing ()
drawGameTextBox = do
tgt <- asks surface
let x1 = 35
y1 = 480
x2 = 605
y2 = 295
_ <- liftIO $ box tgt (Rect x1 y1 x2 y2) (Pixel 0xffbe6cbb)
return ()
| 205
|
drawGameTextBox = do
tgt <- asks surface
let x1 = 35
y1 = 480
x2 = 605
y2 = 295
_ <- liftIO $ box tgt (Rect x1 y1 x2 y2) (Pixel 0xffbe6cbb)
return ()
| 175
| false
| true
| 1
| 12
| 64
| 98
| 45
| 53
| null | null |
vasily-kartashov/playground
|
euler/problem-054.hs
|
apache-2.0
|
main = do
c <- readFile "problem-054.txt"
let hands = map readHands $ lines c
print $ sum [1 | (a, b) <- hands, rank a > rank b]
| 134
|
main = do
c <- readFile "problem-054.txt"
let hands = map readHands $ lines c
print $ sum [1 | (a, b) <- hands, rank a > rank b]
| 134
|
main = do
c <- readFile "problem-054.txt"
let hands = map readHands $ lines c
print $ sum [1 | (a, b) <- hands, rank a > rank b]
| 134
| false
| false
| 1
| 13
| 34
| 80
| 35
| 45
| null | null |
olorin/amazonka
|
amazonka-redshift/gen/Network/AWS/Redshift/EnableSnapshotCopy.hs
|
mpl-2.0
|
-- | The number of days to retain automated snapshots in the destination
-- region after they are copied from the source region.
--
-- Default: 7.
--
-- Constraints: Must be at least 1 and no more than 35.
escRetentionPeriod :: Lens' EnableSnapshotCopy (Maybe Int)
escRetentionPeriod = lens _escRetentionPeriod (\ s a -> s{_escRetentionPeriod = a})
| 348
|
escRetentionPeriod :: Lens' EnableSnapshotCopy (Maybe Int)
escRetentionPeriod = lens _escRetentionPeriod (\ s a -> s{_escRetentionPeriod = a})
| 142
|
escRetentionPeriod = lens _escRetentionPeriod (\ s a -> s{_escRetentionPeriod = a})
| 83
| true
| true
| 1
| 9
| 56
| 54
| 30
| 24
| null | null |
coolhacks/scripts-hacks
|
examples/shellcheck-master/ShellCheck/Parser.hs
|
mit
|
doubleQuotableChars = "\"$`" ++ unicodeDoubleQuoteChars
| 55
|
doubleQuotableChars = "\"$`" ++ unicodeDoubleQuoteChars
| 55
|
doubleQuotableChars = "\"$`" ++ unicodeDoubleQuoteChars
| 55
| false
| false
| 0
| 5
| 4
| 10
| 5
| 5
| null | null |
robdockins/edison
|
edison-core/src/Data/Edison/Assoc/PatriciaLoMap.hs
|
mit
|
null :: FM a -> Bool
null E = True
| 34
|
null :: FM a -> Bool
null E = True
| 34
|
null E = True
| 13
| false
| true
| 0
| 7
| 9
| 27
| 11
| 16
| null | null |
fmapfmapfmap/amazonka
|
amazonka-support/gen/Network/AWS/Support/AddCommunicationToCase.hs
|
mpl-2.0
|
-- | Creates a value of 'AddCommunicationToCase' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'actcCaseId'
--
-- * 'actcCcEmailAddresses'
--
-- * 'actcAttachmentSetId'
--
-- * 'actcCommunicationBody'
addCommunicationToCase
:: Text -- ^ 'actcCommunicationBody'
-> AddCommunicationToCase
addCommunicationToCase pCommunicationBody_ =
AddCommunicationToCase'
{ _actcCaseId = Nothing
, _actcCcEmailAddresses = Nothing
, _actcAttachmentSetId = Nothing
, _actcCommunicationBody = pCommunicationBody_
}
| 614
|
addCommunicationToCase
:: Text -- ^ 'actcCommunicationBody'
-> AddCommunicationToCase
addCommunicationToCase pCommunicationBody_ =
AddCommunicationToCase'
{ _actcCaseId = Nothing
, _actcCcEmailAddresses = Nothing
, _actcAttachmentSetId = Nothing
, _actcCommunicationBody = pCommunicationBody_
}
| 326
|
addCommunicationToCase pCommunicationBody_ =
AddCommunicationToCase'
{ _actcCaseId = Nothing
, _actcCcEmailAddresses = Nothing
, _actcAttachmentSetId = Nothing
, _actcCommunicationBody = pCommunicationBody_
}
| 232
| true
| true
| 0
| 7
| 106
| 65
| 40
| 25
| null | null |
dysinger/amazonka
|
amazonka-ecs/gen/Network/AWS/ECS/ListContainerInstances.hs
|
mpl-2.0
|
-- | The list of container instance full Amazon Resource Name (ARN) entries for
-- each container instance associated with the specified cluster.
lcirContainerInstanceArns :: Lens' ListContainerInstancesResponse [Text]
lcirContainerInstanceArns =
lens _lcirContainerInstanceArns
(\s a -> s { _lcirContainerInstanceArns = a })
. _List
| 357
|
lcirContainerInstanceArns :: Lens' ListContainerInstancesResponse [Text]
lcirContainerInstanceArns =
lens _lcirContainerInstanceArns
(\s a -> s { _lcirContainerInstanceArns = a })
. _List
| 211
|
lcirContainerInstanceArns =
lens _lcirContainerInstanceArns
(\s a -> s { _lcirContainerInstanceArns = a })
. _List
| 138
| true
| true
| 2
| 8
| 66
| 55
| 27
| 28
| null | null |
Tener/haskell-sorty
|
sorty.hs
|
bsd-3-clause
|
e2e :: (Enum a, Enum b) => a -> b
e2e = toEnum . fromEnum
| 57
|
e2e :: (Enum a, Enum b) => a -> b
e2e = toEnum . fromEnum
| 57
|
e2e = toEnum . fromEnum
| 23
| false
| true
| 0
| 8
| 14
| 41
| 19
| 22
| null | null |
twopoint718/haifa
|
src/Org/Xmlsoap/Schemas/Soap/Encoding.hs
|
gpl-2.0
|
soapArrayType = "Array"
| 23
|
soapArrayType = "Array"
| 23
|
soapArrayType = "Array"
| 23
| false
| false
| 0
| 4
| 2
| 6
| 3
| 3
| null | null |
davdar/pretty-monadic-printer
|
Text/PrettyPrint/Final/Demos/STLCDemo.hs
|
mit
|
(/@/) :: Exp -> Exp -> Exp
(/@/) = App
| 38
|
(/@/) :: Exp -> Exp -> Exp
(/@/) = App
| 38
|
(/@/) = App
| 11
| false
| true
| 0
| 8
| 9
| 30
| 15
| 15
| null | null |
rueshyna/gogol
|
gogol-runtimeconfig/gen/Network/Google/Resource/RuntimeConfig/Operations/Cancel.hs
|
mpl-2.0
|
-- | OAuth access token.
ocAccessToken :: Lens' OperationsCancel (Maybe Text)
ocAccessToken
= lens _ocAccessToken
(\ s a -> s{_ocAccessToken = a})
| 154
|
ocAccessToken :: Lens' OperationsCancel (Maybe Text)
ocAccessToken
= lens _ocAccessToken
(\ s a -> s{_ocAccessToken = a})
| 129
|
ocAccessToken
= lens _ocAccessToken
(\ s a -> s{_ocAccessToken = a})
| 76
| true
| true
| 1
| 9
| 29
| 51
| 25
| 26
| null | null |
kim/amazonka
|
amazonka-opsworks/gen/Network/AWS/OpsWorks/Types.hs
|
mpl-2.0
|
-- | The stack's ARN.
sArn :: Lens' Stack (Maybe Text)
sArn = lens _sArn (\s a -> s { _sArn = a })
| 98
|
sArn :: Lens' Stack (Maybe Text)
sArn = lens _sArn (\s a -> s { _sArn = a })
| 76
|
sArn = lens _sArn (\s a -> s { _sArn = a })
| 43
| true
| true
| 0
| 9
| 23
| 46
| 25
| 21
| null | null |
DataStewardshipPortal/ds-elixir-cz
|
Server/app/Model/Respondent.hs
|
apache-2.0
|
submissionInfo :: Respondent -> Text
submissionInfo respondent = fromMaybe "never" ((pack . show) <$> finished respondent)
| 122
|
submissionInfo :: Respondent -> Text
submissionInfo respondent = fromMaybe "never" ((pack . show) <$> finished respondent)
| 122
|
submissionInfo respondent = fromMaybe "never" ((pack . show) <$> finished respondent)
| 85
| false
| true
| 0
| 9
| 15
| 40
| 20
| 20
| null | null |
cliffano/swaggy-jenkins
|
clients/haskell-yesod/generated/src/Foundation.hs
|
mit
|
unsafeHandler :: App -> Handler a -> IO a
unsafeHandler = Unsafe.fakeHandlerGetLogger appLogger
| 95
|
unsafeHandler :: App -> Handler a -> IO a
unsafeHandler = Unsafe.fakeHandlerGetLogger appLogger
| 95
|
unsafeHandler = Unsafe.fakeHandlerGetLogger appLogger
| 53
| false
| true
| 0
| 8
| 12
| 35
| 15
| 20
| null | null |
kawamuray/ganeti
|
src/Ganeti/Runtime.hs
|
gpl-2.0
|
daemonOnlyOnMaster GanetiKvmd = False
| 40
|
daemonOnlyOnMaster GanetiKvmd = False
| 40
|
daemonOnlyOnMaster GanetiKvmd = False
| 40
| false
| false
| 0
| 5
| 6
| 9
| 4
| 5
| null | null |
rsasse/tamarin-prover
|
lib/theory/src/Theory/Proof.hs
|
gpl-3.0
|
-- | Resorts to the second prover, if the first one is not successful.
orelse :: Prover -> Prover -> Prover
orelse p1 p2 = Prover $ \ctxt d se prf ->
runProver p1 ctxt d se prf `mplus` runProver p2 ctxt d se prf
| 215
|
orelse :: Prover -> Prover -> Prover
orelse p1 p2 = Prover $ \ctxt d se prf ->
runProver p1 ctxt d se prf `mplus` runProver p2 ctxt d se prf
| 144
|
orelse p1 p2 = Prover $ \ctxt d se prf ->
runProver p1 ctxt d se prf `mplus` runProver p2 ctxt d se prf
| 107
| true
| true
| 0
| 8
| 48
| 68
| 35
| 33
| null | null |
fmthoma/ghc
|
compiler/prelude/PrelNames.hs
|
bsd-3-clause
|
quotIntegerIdKey = mkPreludeMiscIdUnique 79
| 56
|
quotIntegerIdKey = mkPreludeMiscIdUnique 79
| 56
|
quotIntegerIdKey = mkPreludeMiscIdUnique 79
| 56
| false
| false
| 0
| 5
| 16
| 9
| 4
| 5
| null | null |
cwgreene/javaclassreader
|
src/ConstantPool.hs
|
mit
|
cCONSTANT_MethodType = 16
| 25
|
cCONSTANT_MethodType = 16
| 25
|
cCONSTANT_MethodType = 16
| 25
| false
| false
| 0
| 4
| 2
| 6
| 3
| 3
| null | null |
bendyworks/haskbot
|
src/Web/Haskbot/Responder.hs
|
mit
|
sendFromQueue :: RespM ()
sendFromQueue = forever $ dequeue >>= sendNext >> wait1Sec
| 84
|
sendFromQueue :: RespM ()
sendFromQueue = forever $ dequeue >>= sendNext >> wait1Sec
| 84
|
sendFromQueue = forever $ dequeue >>= sendNext >> wait1Sec
| 58
| false
| true
| 0
| 7
| 12
| 28
| 14
| 14
| null | null |
tibbe/hyena
|
Hyena/Http.hs
|
bsd-3-clause
|
-- | Mapping from status code to reason phrases.
reasonPhrases :: M.Map Int S.ByteString
reasonPhrases = M.fromList . map (second C.pack) $
[(100, "Continue")
,(101, "Switching Protocols")
,(200, "OK")
,(201, "Created")
,(202, "Accepted")
,(203, "Non-Authoritative Information")
,(204, "No Content")
,(205, "Reset Content")
,(206, "Partial Content")
,(300, "Multiple Choices")
,(301, "Moved Permanently")
,(302, "Found")
,(303, "See Other")
,(304, "Not Modified")
,(305, "Use Proxy")
,(307, "Temporary Redirect")
,(400, "Bad Request")
,(401, "Unauthorized")
,(402, "Payment Required")
,(403, "Forbidden")
,(404, "Not Found")
,(405, "Method Not Allowed")
,(406, "Not Acceptable")
,(407, "Proxy Authentication Required")
,(408, "Request Time-out")
,(409, "Conflict")
,(410, "Gone")
,(411, "Length Required")
,(412, "Precondition Failed")
,(413, "Request Entity Too Large")
,(414, "Request-URI Too Large")
,(415, "Unsupported Media Type")
,(416, "Requested range not satisfiable")
,(417, "Expectation Failed")
,(500, "Internal Server Error")
,(501, "Not Implemented")
,(502, "Bad Gateway")
,(503, "Service Unavailable")
,(504, "Gateway Time-out")
,(505, "HTTP Version not supported")]
| 1,821
|
reasonPhrases :: M.Map Int S.ByteString
reasonPhrases = M.fromList . map (second C.pack) $
[(100, "Continue")
,(101, "Switching Protocols")
,(200, "OK")
,(201, "Created")
,(202, "Accepted")
,(203, "Non-Authoritative Information")
,(204, "No Content")
,(205, "Reset Content")
,(206, "Partial Content")
,(300, "Multiple Choices")
,(301, "Moved Permanently")
,(302, "Found")
,(303, "See Other")
,(304, "Not Modified")
,(305, "Use Proxy")
,(307, "Temporary Redirect")
,(400, "Bad Request")
,(401, "Unauthorized")
,(402, "Payment Required")
,(403, "Forbidden")
,(404, "Not Found")
,(405, "Method Not Allowed")
,(406, "Not Acceptable")
,(407, "Proxy Authentication Required")
,(408, "Request Time-out")
,(409, "Conflict")
,(410, "Gone")
,(411, "Length Required")
,(412, "Precondition Failed")
,(413, "Request Entity Too Large")
,(414, "Request-URI Too Large")
,(415, "Unsupported Media Type")
,(416, "Requested range not satisfiable")
,(417, "Expectation Failed")
,(500, "Internal Server Error")
,(501, "Not Implemented")
,(502, "Bad Gateway")
,(503, "Service Unavailable")
,(504, "Gateway Time-out")
,(505, "HTTP Version not supported")]
| 1,772
|
reasonPhrases = M.fromList . map (second C.pack) $
[(100, "Continue")
,(101, "Switching Protocols")
,(200, "OK")
,(201, "Created")
,(202, "Accepted")
,(203, "Non-Authoritative Information")
,(204, "No Content")
,(205, "Reset Content")
,(206, "Partial Content")
,(300, "Multiple Choices")
,(301, "Moved Permanently")
,(302, "Found")
,(303, "See Other")
,(304, "Not Modified")
,(305, "Use Proxy")
,(307, "Temporary Redirect")
,(400, "Bad Request")
,(401, "Unauthorized")
,(402, "Payment Required")
,(403, "Forbidden")
,(404, "Not Found")
,(405, "Method Not Allowed")
,(406, "Not Acceptable")
,(407, "Proxy Authentication Required")
,(408, "Request Time-out")
,(409, "Conflict")
,(410, "Gone")
,(411, "Length Required")
,(412, "Precondition Failed")
,(413, "Request Entity Too Large")
,(414, "Request-URI Too Large")
,(415, "Unsupported Media Type")
,(416, "Requested range not satisfiable")
,(417, "Expectation Failed")
,(500, "Internal Server Error")
,(501, "Not Implemented")
,(502, "Bad Gateway")
,(503, "Service Unavailable")
,(504, "Gateway Time-out")
,(505, "HTTP Version not supported")]
| 1,732
| true
| true
| 1
| 9
| 783
| 409
| 262
| 147
| null | null |
xpika/mohws
|
src/Network/MoHWS/Utility.hs
|
bsd-3-clause
|
isSymLink :: FilePath -> IO Bool
isSymLink = liftM (maybe False isSymbolicLink) . runMaybeT . statSymLink
| 105
|
isSymLink :: FilePath -> IO Bool
isSymLink = liftM (maybe False isSymbolicLink) . runMaybeT . statSymLink
| 105
|
isSymLink = liftM (maybe False isSymbolicLink) . runMaybeT . statSymLink
| 72
| false
| true
| 0
| 8
| 15
| 43
| 19
| 24
| null | null |
jtapolczai/wumpus
|
World/Utils.hs
|
apache-2.0
|
actionDirection x = error $ "error: actionDirection called with " ++ show x
| 75
|
actionDirection x = error $ "error: actionDirection called with " ++ show x
| 75
|
actionDirection x = error $ "error: actionDirection called with " ++ show x
| 75
| false
| false
| 0
| 6
| 12
| 20
| 9
| 11
| null | null |
sopvop/cabal
|
Cabal/Distribution/Types/GenericPackageDescription.hs
|
bsd-3-clause
|
cAnd _ (Lit False) = Lit False
| 40
|
cAnd _ (Lit False) = Lit False
| 40
|
cAnd _ (Lit False) = Lit False
| 40
| false
| false
| 1
| 6
| 16
| 22
| 9
| 13
| null | null |
andorp/presentations
|
CCC/CoAlg.hs
|
gpl-3.0
|
bal2 :: BankAccount -> Int
bal2 = simplifyMethodType . bal1
| 59
|
bal2 :: BankAccount -> Int
bal2 = simplifyMethodType . bal1
| 59
|
bal2 = simplifyMethodType . bal1
| 32
| false
| true
| 0
| 5
| 9
| 19
| 10
| 9
| null | null |
GaloisInc/SHA
|
src/Data/Digest/Pure/SHA.hs
|
bsd-3-clause
|
synthesizeSHA256 :: SHA256State -> Put
synthesizeSHA256 (SHA256S a b c d e f g h) = do
putWord32be a
putWord32be b
putWord32be c
putWord32be d
putWord32be e
putWord32be f
putWord32be g
putWord32be h
| 214
|
synthesizeSHA256 :: SHA256State -> Put
synthesizeSHA256 (SHA256S a b c d e f g h) = do
putWord32be a
putWord32be b
putWord32be c
putWord32be d
putWord32be e
putWord32be f
putWord32be g
putWord32be h
| 214
|
synthesizeSHA256 (SHA256S a b c d e f g h) = do
putWord32be a
putWord32be b
putWord32be c
putWord32be d
putWord32be e
putWord32be f
putWord32be g
putWord32be h
| 175
| false
| true
| 0
| 7
| 48
| 90
| 36
| 54
| null | null |
facebookincubator/duckling
|
Duckling/Time/FR/Rules.hs
|
bsd-3-clause
|
ruleLeTime :: Rule
ruleLeTime = Rule
{ name = "le <time>"
, pattern =
[ regex "l[ea]"
, Predicate isNotLatent
]
, prod = \tokens -> case tokens of
(_:x:_) -> Just x
_ -> Nothing
}
| 211
|
ruleLeTime :: Rule
ruleLeTime = Rule
{ name = "le <time>"
, pattern =
[ regex "l[ea]"
, Predicate isNotLatent
]
, prod = \tokens -> case tokens of
(_:x:_) -> Just x
_ -> Nothing
}
| 211
|
ruleLeTime = Rule
{ name = "le <time>"
, pattern =
[ regex "l[ea]"
, Predicate isNotLatent
]
, prod = \tokens -> case tokens of
(_:x:_) -> Just x
_ -> Nothing
}
| 192
| false
| true
| 0
| 14
| 68
| 88
| 45
| 43
| null | null |
glutamate/cmdtheline
|
test/Cipher.hs
|
mit
|
defaultTerm :: ( Term a, TermInfo )
defaultTerm = ( ret $ const (helpFail Pager Nothing) <$> input
, termInfo
)
where
termInfo = defTI'
{ termName = "cipher"
, version = "v1.0"
, termDoc = doc
}
doc = "An implementation of the morse-code and rotational(Caesar) ciphers."
| 338
|
defaultTerm :: ( Term a, TermInfo )
defaultTerm = ( ret $ const (helpFail Pager Nothing) <$> input
, termInfo
)
where
termInfo = defTI'
{ termName = "cipher"
, version = "v1.0"
, termDoc = doc
}
doc = "An implementation of the morse-code and rotational(Caesar) ciphers."
| 338
|
defaultTerm = ( ret $ const (helpFail Pager Nothing) <$> input
, termInfo
)
where
termInfo = defTI'
{ termName = "cipher"
, version = "v1.0"
, termDoc = doc
}
doc = "An implementation of the morse-code and rotational(Caesar) ciphers."
| 302
| false
| true
| 0
| 10
| 115
| 78
| 44
| 34
| null | null |
xymostech/hpong
|
src/Sound/Wave.hs
|
mit
|
readLittleEndian :: [Word8] -> Int
readLittleEndian = foldr (\num prod -> 256 * prod + fromIntegral num) 0
| 106
|
readLittleEndian :: [Word8] -> Int
readLittleEndian = foldr (\num prod -> 256 * prod + fromIntegral num) 0
| 106
|
readLittleEndian = foldr (\num prod -> 256 * prod + fromIntegral num) 0
| 71
| false
| true
| 0
| 9
| 17
| 51
| 24
| 27
| null | null |
fmi-lab/fp-elective-2017
|
exams/preparation/extractEvens.hs
|
mit
|
{- Да се напише функция extractEvens string, която връща списък от всички
- четни числа в низа string.
-}
extractEvens :: String -> [String]
extractEvens [] = []
| 165
|
extractEvens :: String -> [String]
extractEvens [] = []
| 55
|
extractEvens [] = []
| 20
| true
| true
| 0
| 8
| 31
| 32
| 15
| 17
| null | null |
Paow/encore
|
src/ir/AST/Util.hs
|
bsd-3-clause
|
getChildren Embed {embedded} = map snd embedded
| 47
|
getChildren Embed {embedded} = map snd embedded
| 47
|
getChildren Embed {embedded} = map snd embedded
| 47
| false
| false
| 1
| 6
| 6
| 24
| 10
| 14
| null | null |
hdevtools/hdevtools
|
src/Stack.hs
|
mit
|
extractDbs :: String -> IO [FilePath]
extractDbs = filterM doesDirectoryExist . stringPaths
| 91
|
extractDbs :: String -> IO [FilePath]
extractDbs = filterM doesDirectoryExist . stringPaths
| 91
|
extractDbs = filterM doesDirectoryExist . stringPaths
| 53
| false
| true
| 0
| 7
| 11
| 28
| 14
| 14
| null | null |
rueshyna/gogol
|
gogol-maps-engine/gen/Network/Google/Resource/MapsEngine/Projects/Icons/Create.hs
|
mpl-2.0
|
-- | Creates a value of 'ProjectsIconsCreate' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'picPayload'
--
-- * 'picProjectId'
projectsIconsCreate
:: Icon -- ^ 'picPayload'
-> Text -- ^ 'picProjectId'
-> ProjectsIconsCreate
projectsIconsCreate pPicPayload_ pPicProjectId_ =
ProjectsIconsCreate'
{ _picPayload = pPicPayload_
, _picProjectId = pPicProjectId_
}
| 474
|
projectsIconsCreate
:: Icon -- ^ 'picPayload'
-> Text -- ^ 'picProjectId'
-> ProjectsIconsCreate
projectsIconsCreate pPicPayload_ pPicProjectId_ =
ProjectsIconsCreate'
{ _picPayload = pPicPayload_
, _picProjectId = pPicProjectId_
}
| 259
|
projectsIconsCreate pPicPayload_ pPicProjectId_ =
ProjectsIconsCreate'
{ _picPayload = pPicPayload_
, _picProjectId = pPicProjectId_
}
| 150
| true
| true
| 0
| 8
| 92
| 56
| 32
| 24
| null | null |
supermario/hilt
|
src/Hilt/Postgres.hs
|
bsd-3-clause
|
formatParams :: [(Text, Text)] -> ByteString
formatParams = encodeUtf8 . T.unwords . map toKeyValue
| 99
|
formatParams :: [(Text, Text)] -> ByteString
formatParams = encodeUtf8 . T.unwords . map toKeyValue
| 99
|
formatParams = encodeUtf8 . T.unwords . map toKeyValue
| 54
| false
| true
| 0
| 7
| 13
| 37
| 20
| 17
| null | null |
lynnard/reflex-cocos2d
|
src/Reflex/Cocos2d/Misc/Chipmunk.hs
|
mit
|
-- whether the body is added to the space
active :: (MonadIO m, H.Entity e, SpacePtr a e) => Attrib' e m Bool
active = Attrib getter setter
where setter p True = safeAdd p p
setter p False = safeRemove p p
getter = liftIO . H.inSpace
-- attributes for shapes
| 278
|
active :: (MonadIO m, H.Entity e, SpacePtr a e) => Attrib' e m Bool
active = Attrib getter setter
where setter p True = safeAdd p p
setter p False = safeRemove p p
getter = liftIO . H.inSpace
-- attributes for shapes
| 236
|
active = Attrib getter setter
where setter p True = safeAdd p p
setter p False = safeRemove p p
getter = liftIO . H.inSpace
-- attributes for shapes
| 168
| true
| true
| 2
| 7
| 71
| 93
| 47
| 46
| null | null |
gridaphobe/ghc
|
compiler/nativeGen/X86/Ppr.hs
|
bsd-3-clause
|
pprInstr (SETCC cond op) = pprCondInstr (sLit "set") cond (pprOperand II8 op)
| 77
|
pprInstr (SETCC cond op) = pprCondInstr (sLit "set") cond (pprOperand II8 op)
| 77
|
pprInstr (SETCC cond op) = pprCondInstr (sLit "set") cond (pprOperand II8 op)
| 77
| false
| false
| 0
| 7
| 11
| 39
| 18
| 21
| null | null |
fredmorcos/attic
|
projects/pet/archive/pet_haskell_master_complete/Extras.hs
|
isc
|
splitWith :: Eq a => a -> [a] -> [[a]]
splitWith s l = __splitWith s l [] []
where __splitWith _ [] acc r = r ++ [acc]
__splitWith s2 (x:xs) acc r
| x /= s2 = __splitWith s2 xs (acc ++ [x]) r
| otherwise = __splitWith s2 xs [] (r ++ [acc])
| 276
|
splitWith :: Eq a => a -> [a] -> [[a]]
splitWith s l = __splitWith s l [] []
where __splitWith _ [] acc r = r ++ [acc]
__splitWith s2 (x:xs) acc r
| x /= s2 = __splitWith s2 xs (acc ++ [x]) r
| otherwise = __splitWith s2 xs [] (r ++ [acc])
| 276
|
splitWith s l = __splitWith s l [] []
where __splitWith _ [] acc r = r ++ [acc]
__splitWith s2 (x:xs) acc r
| x /= s2 = __splitWith s2 xs (acc ++ [x]) r
| otherwise = __splitWith s2 xs [] (r ++ [acc])
| 237
| false
| true
| 4
| 9
| 92
| 155
| 80
| 75
| null | null |
yoo-e/weixin-mp-sdk
|
WeiXin/PublicPlatform/Conversation/TextParser.hs
|
mit
|
showParseErrorZh :: IsString a => ParseError -> a
showParseErrorZh = fromString . showErrorMessages "或" "未知解释错误" "可接受" "非法输入" "结束输入" . errorMessages
| 148
|
showParseErrorZh :: IsString a => ParseError -> a
showParseErrorZh = fromString . showErrorMessages "或" "未知解释错误" "可接受" "非法输入" "结束输入" . errorMessages
| 148
|
showParseErrorZh = fromString . showErrorMessages "或" "未知解释错误" "可接受" "非法输入" "结束输入" . errorMessages
| 98
| false
| true
| 0
| 7
| 19
| 41
| 20
| 21
| null | null |
tomjefferys/fuligite
|
test/Test.hs
|
mit
|
testObjectProperties =
hyaliteTest "Test object properties" $
testScript
% "(var o {r:1.0 g:0.5 b:0.25})"
% "o.g" % (Lit $ F 0.5)
% "(set o.g o.r)"
% "o.g" % (Lit $ F 1.0)
| 194
|
testObjectProperties =
hyaliteTest "Test object properties" $
testScript
% "(var o {r:1.0 g:0.5 b:0.25})"
% "o.g" % (Lit $ F 0.5)
% "(set o.g o.r)"
% "o.g" % (Lit $ F 1.0)
| 194
|
testObjectProperties =
hyaliteTest "Test object properties" $
testScript
% "(var o {r:1.0 g:0.5 b:0.25})"
% "o.g" % (Lit $ F 0.5)
% "(set o.g o.r)"
% "o.g" % (Lit $ F 1.0)
| 194
| false
| false
| 7
| 8
| 54
| 67
| 28
| 39
| null | null |
kim/amazonka
|
amazonka-iam/gen/Network/AWS/IAM/Types.hs
|
mpl-2.0
|
-- | The friendly name (not ARN) identifying the policy.
mpdPolicyName :: Lens' ManagedPolicyDetail (Maybe Text)
mpdPolicyName = lens _mpdPolicyName (\s a -> s { _mpdPolicyName = a })
| 183
|
mpdPolicyName :: Lens' ManagedPolicyDetail (Maybe Text)
mpdPolicyName = lens _mpdPolicyName (\s a -> s { _mpdPolicyName = a })
| 126
|
mpdPolicyName = lens _mpdPolicyName (\s a -> s { _mpdPolicyName = a })
| 70
| true
| true
| 0
| 9
| 28
| 46
| 25
| 21
| null | null |
haskell-opengl/OpenGLRaw
|
src/Graphics/GL/Functions/F07.hs
|
bsd-3-clause
|
ptr_glEndPerfMonitorAMD :: FunPtr (GLuint -> IO ())
ptr_glEndPerfMonitorAMD = unsafePerformIO $ getCommand "glEndPerfMonitorAMD"
| 128
|
ptr_glEndPerfMonitorAMD :: FunPtr (GLuint -> IO ())
ptr_glEndPerfMonitorAMD = unsafePerformIO $ getCommand "glEndPerfMonitorAMD"
| 128
|
ptr_glEndPerfMonitorAMD = unsafePerformIO $ getCommand "glEndPerfMonitorAMD"
| 76
| false
| true
| 0
| 9
| 12
| 33
| 16
| 17
| null | null |
romanb/amazonka
|
amazonka-ec2/gen/Network/AWS/EC2/Types.hs
|
mpl-2.0
|
-- | 'InstanceState' constructor.
--
-- The fields accessible through corresponding lenses are:
--
-- * 'isCode' @::@ 'Int'
--
-- * 'isName' @::@ 'InstanceStateName'
--
instanceState :: Int -- ^ 'isCode'
-> InstanceStateName -- ^ 'isName'
-> InstanceState
instanceState p1 p2 = InstanceState
{ _isCode = p1
, _isName = p2
}
| 363
|
instanceState :: Int -- ^ 'isCode'
-> InstanceStateName -- ^ 'isName'
-> InstanceState
instanceState p1 p2 = InstanceState
{ _isCode = p1
, _isName = p2
}
| 194
|
instanceState p1 p2 = InstanceState
{ _isCode = p1
, _isName = p2
}
| 79
| true
| true
| 0
| 8
| 92
| 57
| 33
| 24
| null | null |
DavidAlphaFox/ghc
|
libraries/bytestring/Data/ByteString/Lazy.hs
|
bsd-3-clause
|
cons' w cs = Chunk (S.singleton w) cs
| 65
|
cons' w cs = Chunk (S.singleton w) cs
| 65
|
cons' w cs = Chunk (S.singleton w) cs
| 65
| false
| false
| 0
| 8
| 35
| 24
| 11
| 13
| null | null |
unknownloner/calccomp
|
Asm/InstrBytes.hs
|
mit
|
instrBytes LD (Reg16 SP:Reg16 HL:_) = w8 0xF9
| 56
|
instrBytes LD (Reg16 SP:Reg16 HL:_) = w8 0xF9
| 56
|
instrBytes LD (Reg16 SP:Reg16 HL:_) = w8 0xF9
| 56
| false
| false
| 0
| 9
| 18
| 31
| 14
| 17
| null | null |
Daniel-Diaz/wavy
|
Data/Sound/Core/Chunked.hs
|
bsd-3-clause
|
- Tail of chunks
-- | Chunk size is chosen as a power of two for efficiency reasons.
-- Current value is @2^15 = 32768@.
chunkSize :: Int
chunkSize = 2^(15::Int)
| 165
|
chunkSize :: Int
chunkSize = 2^(15::Int)
| 40
|
chunkSize = 2^(15::Int)
| 23
| true
| true
| 1
| 6
| 34
| 29
| 17
| 12
| null | null |
treeowl/bound
|
examples/Simple.hs
|
bsd-3-clause
|
let_ bs b = Let (map (abstr . snd) bs) (abstr b)
where abstr = abstract (`elemIndex` map fst bs)
| 98
|
let_ bs b = Let (map (abstr . snd) bs) (abstr b)
where abstr = abstract (`elemIndex` map fst bs)
| 98
|
let_ bs b = Let (map (abstr . snd) bs) (abstr b)
where abstr = abstract (`elemIndex` map fst bs)
| 98
| false
| false
| 0
| 9
| 21
| 59
| 30
| 29
| null | null |
zenhack/haskell-capnp
|
lib/Capnp/New/Rpc/Server.hs
|
mit
|
-- Helpers for writing method handlers
-- | Handle a method, working with the parsed form of parameters and
-- results.
handleParsed ::
( C.Parse p pp, R.IsStruct p
, C.Parse r rr, R.IsStruct r
) => (pp -> IO rr) -> MethodHandler p r
handleParsed handler param = propagateExceptions $ \f -> do
p <- evalLimitT defaultLimit $ C.parse param
r <- handler p
-- TODO: Figure out how to add an instance of Thaw for
-- Raw so we can skip the (un)wrapping here.
struct <- createPure maxBound $ R.fromRaw <$> parsedToRaw r
fulfill f (R.Raw struct)
-- | Handle a method, working with the raw (unparsed) form of
-- parameters and results.
| 665
|
handleParsed ::
( C.Parse p pp, R.IsStruct p
, C.Parse r rr, R.IsStruct r
) => (pp -> IO rr) -> MethodHandler p r
handleParsed handler param = propagateExceptions $ \f -> do
p <- evalLimitT defaultLimit $ C.parse param
r <- handler p
-- TODO: Figure out how to add an instance of Thaw for
-- Raw so we can skip the (un)wrapping here.
struct <- createPure maxBound $ R.fromRaw <$> parsedToRaw r
fulfill f (R.Raw struct)
-- | Handle a method, working with the raw (unparsed) form of
-- parameters and results.
| 544
|
handleParsed handler param = propagateExceptions $ \f -> do
p <- evalLimitT defaultLimit $ C.parse param
r <- handler p
-- TODO: Figure out how to add an instance of Thaw for
-- Raw so we can skip the (un)wrapping here.
struct <- createPure maxBound $ R.fromRaw <$> parsedToRaw r
fulfill f (R.Raw struct)
-- | Handle a method, working with the raw (unparsed) form of
-- parameters and results.
| 418
| true
| true
| 0
| 12
| 152
| 158
| 78
| 80
| null | null |
jml/haverer
|
lib/Haverer/Player.hs
|
apache-2.0
|
protect :: Player -> Player
protect = set protected True
| 56
|
protect :: Player -> Player
protect = set protected True
| 56
|
protect = set protected True
| 28
| false
| true
| 0
| 5
| 9
| 20
| 10
| 10
| null | null |
capital-match/bake
|
src/General/Extra.hs
|
bsd-3-clause
|
withs (f:fs) act = f $ \a -> withs fs $ \as -> act $ a:as
| 57
|
withs (f:fs) act = f $ \a -> withs fs $ \as -> act $ a:as
| 57
|
withs (f:fs) act = f $ \a -> withs fs $ \as -> act $ a:as
| 57
| false
| false
| 1
| 10
| 15
| 51
| 24
| 27
| null | null |
laurencer/confluence-sync
|
vendor/http-streams/tests/TestSuite.hs
|
bsd-3-clause
|
testRequestLineFormat = do
it "has a properly formatted request line" $ bracket
(fakeConnection)
(return)
(\c -> do
let q = buildRequest1 $ do
http GET "/time"
let e' = Builder.toByteString $ composeRequestBytes q (cHost c)
let l' = S.takeWhile (/= '\r') e'
assertEqual "Invalid HTTP request line" "GET /time HTTP/1.1" l')
it "handles empty request path" $ bracket
(fakeConnection)
(return)
(\c -> do
let q = buildRequest1 $ do
http GET ""
let e' = Builder.toByteString $ composeRequestBytes q (cHost c)
let l' = S.takeWhile (/= '\r') e'
assertEqual "Invalid HTTP request line" "GET / HTTP/1.1" l')
| 803
|
testRequestLineFormat = do
it "has a properly formatted request line" $ bracket
(fakeConnection)
(return)
(\c -> do
let q = buildRequest1 $ do
http GET "/time"
let e' = Builder.toByteString $ composeRequestBytes q (cHost c)
let l' = S.takeWhile (/= '\r') e'
assertEqual "Invalid HTTP request line" "GET /time HTTP/1.1" l')
it "handles empty request path" $ bracket
(fakeConnection)
(return)
(\c -> do
let q = buildRequest1 $ do
http GET ""
let e' = Builder.toByteString $ composeRequestBytes q (cHost c)
let l' = S.takeWhile (/= '\r') e'
assertEqual "Invalid HTTP request line" "GET / HTTP/1.1" l')
| 803
|
testRequestLineFormat = do
it "has a properly formatted request line" $ bracket
(fakeConnection)
(return)
(\c -> do
let q = buildRequest1 $ do
http GET "/time"
let e' = Builder.toByteString $ composeRequestBytes q (cHost c)
let l' = S.takeWhile (/= '\r') e'
assertEqual "Invalid HTTP request line" "GET /time HTTP/1.1" l')
it "handles empty request path" $ bracket
(fakeConnection)
(return)
(\c -> do
let q = buildRequest1 $ do
http GET ""
let e' = Builder.toByteString $ composeRequestBytes q (cHost c)
let l' = S.takeWhile (/= '\r') e'
assertEqual "Invalid HTTP request line" "GET / HTTP/1.1" l')
| 803
| false
| false
| 0
| 19
| 301
| 222
| 105
| 117
| null | null |
tdeekens/tda452-code
|
Lab-3/Sudoku.hs
|
mit
|
parseSudoku :: String -> Sudoku
parseSudoku s = Sudoku (map parseRow (lines s))
| 79
|
parseSudoku :: String -> Sudoku
parseSudoku s = Sudoku (map parseRow (lines s))
| 79
|
parseSudoku s = Sudoku (map parseRow (lines s))
| 47
| false
| true
| 0
| 9
| 12
| 40
| 18
| 22
| null | null |
Paow/encore
|
src/ir/AST/PrettyPrinter.hs
|
bsd-3-clause
|
ppExpr Async {body} = "async" <> parens (ppExpr body)
| 53
|
ppExpr Async {body} = "async" <> parens (ppExpr body)
| 53
|
ppExpr Async {body} = "async" <> parens (ppExpr body)
| 53
| false
| false
| 1
| 8
| 8
| 33
| 14
| 19
| null | null |
keithodulaigh/Hets
|
CspCASLProver/Consts.hs
|
gpl-2.0
|
-- | Name for the lemma which is the collection of identity axioms.
lemmasIdentityAxS :: String
lemmasIdentityAxS = "allGaIdentityAx"
| 133
|
lemmasIdentityAxS :: String
lemmasIdentityAxS = "allGaIdentityAx"
| 65
|
lemmasIdentityAxS = "allGaIdentityAx"
| 37
| true
| true
| 0
| 4
| 18
| 12
| 7
| 5
| null | null |
ygale/yesod
|
yesod-bin/Scaffolding/Scaffolder.hs
|
mit
|
backendBS :: Backend -> S.ByteString
backendBS Sqlite = $(embedFile "hsfiles/sqlite.hsfiles")
| 93
|
backendBS :: Backend -> S.ByteString
backendBS Sqlite = $(embedFile "hsfiles/sqlite.hsfiles")
| 93
|
backendBS Sqlite = $(embedFile "hsfiles/sqlite.hsfiles")
| 56
| false
| true
| 0
| 7
| 9
| 27
| 13
| 14
| null | null |
teiche/femtocc
|
Parser.hs
|
bsd-3-clause
|
semiSep :: Parser a -> Parser [a]
semiSep = Tok.semiSep lexer
| 61
|
semiSep :: Parser a -> Parser [a]
semiSep = Tok.semiSep lexer
| 61
|
semiSep = Tok.semiSep lexer
| 27
| false
| true
| 0
| 8
| 10
| 34
| 15
| 19
| null | null |
RossMeikleham/GPC
|
src/GPC/SimplifyAST.hs
|
bsd-2-clause
|
simplifyStmt (T.ForLoop var e1 e2 e3 bStmt) =
S.ForLoop (simplifyIdent var) (simplifyExpr e1) (simplifyExpr e2) (simplifyExpr e3)
(simplifyBStmt bStmt)
| 171
|
simplifyStmt (T.ForLoop var e1 e2 e3 bStmt) =
S.ForLoop (simplifyIdent var) (simplifyExpr e1) (simplifyExpr e2) (simplifyExpr e3)
(simplifyBStmt bStmt)
| 171
|
simplifyStmt (T.ForLoop var e1 e2 e3 bStmt) =
S.ForLoop (simplifyIdent var) (simplifyExpr e1) (simplifyExpr e2) (simplifyExpr e3)
(simplifyBStmt bStmt)
| 171
| false
| false
| 0
| 8
| 38
| 68
| 33
| 35
| null | null |
dec9ue/jhc_copygc
|
src/Name/Name.hs
|
gpl-2.0
|
isTypeNamespace TypeConstructor = True
| 38
|
isTypeNamespace TypeConstructor = True
| 38
|
isTypeNamespace TypeConstructor = True
| 38
| false
| false
| 0
| 4
| 3
| 10
| 4
| 6
| null | null |
jml/haverer
|
lib/Haverer/Internal/Error.hs
|
apache-2.0
|
-- | Assert that the value is Right. Throws error if it's Left.
assertRight' :: Show a => Either a b -> b
assertRight' (Right value) = value
| 140
|
assertRight' :: Show a => Either a b -> b
assertRight' (Right value) = value
| 76
|
assertRight' (Right value) = value
| 34
| true
| true
| 0
| 7
| 27
| 37
| 18
| 19
| null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.