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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Helkafen/haddock
|
haddock-api/src/Haddock/Backends/LaTeX.hs
|
bsd-2-clause
|
ppr_mono_ty _ (HsWildCardTy (AnonWildCard _)) _ = char '_'
| 58
|
ppr_mono_ty _ (HsWildCardTy (AnonWildCard _)) _ = char '_'
| 58
|
ppr_mono_ty _ (HsWildCardTy (AnonWildCard _)) _ = char '_'
| 58
| false
| false
| 0
| 9
| 8
| 28
| 13
| 15
| null | null |
leshchevds/ganeti
|
src/Ganeti/Constants.hs
|
bsd-2-clause
|
ip4AddressLocalhost :: String
ip4AddressLocalhost = "127.0.0.1"
| 63
|
ip4AddressLocalhost :: String
ip4AddressLocalhost = "127.0.0.1"
| 63
|
ip4AddressLocalhost = "127.0.0.1"
| 33
| false
| true
| 0
| 4
| 5
| 11
| 6
| 5
| null | null |
david-caro/shellcheck
|
ShellCheck/Analytics.hs
|
gpl-3.0
|
checkPrefixAssignmentReference _ _ = return ()
| 46
|
checkPrefixAssignmentReference _ _ = return ()
| 46
|
checkPrefixAssignmentReference _ _ = return ()
| 46
| false
| false
| 0
| 6
| 5
| 16
| 7
| 9
| null | null |
tolysz/prepare-ghcjs
|
spec-lts8/ghc-boot/GHC/PackageDb.hs
|
bsd-3-clause
|
putHeader :: Put
putHeader = do
putByteString headerMagic
put majorVersion
put minorVersion
put headerExtraLen
where
majorVersion = 1 :: Word32
minorVersion = 0 :: Word32
headerExtraLen = 0 :: Word32
| 233
|
putHeader :: Put
putHeader = do
putByteString headerMagic
put majorVersion
put minorVersion
put headerExtraLen
where
majorVersion = 1 :: Word32
minorVersion = 0 :: Word32
headerExtraLen = 0 :: Word32
| 233
|
putHeader = do
putByteString headerMagic
put majorVersion
put minorVersion
put headerExtraLen
where
majorVersion = 1 :: Word32
minorVersion = 0 :: Word32
headerExtraLen = 0 :: Word32
| 216
| false
| true
| 0
| 7
| 63
| 65
| 30
| 35
| null | null |
nevrenato/Hets_Fork
|
Taxonomy/MMiSSOntologyGraph.hs
|
gpl-2.0
|
reduceToRelations :: ClassGraph -> ClassGraph -> Bool -> [String] -> String
-> ClassGraph
reduceToRelations wholeGraph g withIncoming forbiddenRels name =
let g1 = elfilter (not . (`elem` forbiddenRels)) wholeGraph
in case findLNode g1 name of
Nothing -> g
Just selectedNode ->
let nodeList = if withIncoming
then udfs [selectedNode] g1
else dfs [selectedNode] g1
toDelete = nodes g1 \\ nodeList
g1' = delNodes toDelete g1
g2 = mergeGraphs g1' g
newNodesList = nodeList \\ nodes g
in if null newNodesList
then g2
else foldl (followRelationOverSubClasses wholeGraph
withIncoming forbiddenRels) g2 newNodesList
| 833
|
reduceToRelations :: ClassGraph -> ClassGraph -> Bool -> [String] -> String
-> ClassGraph
reduceToRelations wholeGraph g withIncoming forbiddenRels name =
let g1 = elfilter (not . (`elem` forbiddenRels)) wholeGraph
in case findLNode g1 name of
Nothing -> g
Just selectedNode ->
let nodeList = if withIncoming
then udfs [selectedNode] g1
else dfs [selectedNode] g1
toDelete = nodes g1 \\ nodeList
g1' = delNodes toDelete g1
g2 = mergeGraphs g1' g
newNodesList = nodeList \\ nodes g
in if null newNodesList
then g2
else foldl (followRelationOverSubClasses wholeGraph
withIncoming forbiddenRels) g2 newNodesList
| 833
|
reduceToRelations wholeGraph g withIncoming forbiddenRels name =
let g1 = elfilter (not . (`elem` forbiddenRels)) wholeGraph
in case findLNode g1 name of
Nothing -> g
Just selectedNode ->
let nodeList = if withIncoming
then udfs [selectedNode] g1
else dfs [selectedNode] g1
toDelete = nodes g1 \\ nodeList
g1' = delNodes toDelete g1
g2 = mergeGraphs g1' g
newNodesList = nodeList \\ nodes g
in if null newNodesList
then g2
else foldl (followRelationOverSubClasses wholeGraph
withIncoming forbiddenRels) g2 newNodesList
| 725
| false
| true
| 0
| 16
| 314
| 205
| 104
| 101
| null | null |
Fermat/FCR
|
src/Fcr/Rewrite.hs
|
gpl-3.0
|
getTrace env e n = execState (steps env e n) (Trace [([],[],"", e)])
| 68
|
getTrace env e n = execState (steps env e n) (Trace [([],[],"", e)])
| 68
|
getTrace env e n = execState (steps env e n) (Trace [([],[],"", e)])
| 68
| false
| false
| 1
| 10
| 12
| 58
| 28
| 30
| null | null |
jmitchell/Idris-dev
|
src/Idris/Core/Evaluate.hs
|
bsd-3-clause
|
uniqueNameCtxt :: Context -> Name -> [Name] -> Name
uniqueNameCtxt ctxt n hs
| n `elem` hs = uniqueNameCtxt ctxt (nextName n) hs
| [_] <- lookupTy n ctxt = uniqueNameCtxt ctxt (nextName n) hs
| otherwise = n
| 219
|
uniqueNameCtxt :: Context -> Name -> [Name] -> Name
uniqueNameCtxt ctxt n hs
| n `elem` hs = uniqueNameCtxt ctxt (nextName n) hs
| [_] <- lookupTy n ctxt = uniqueNameCtxt ctxt (nextName n) hs
| otherwise = n
| 219
|
uniqueNameCtxt ctxt n hs
| n `elem` hs = uniqueNameCtxt ctxt (nextName n) hs
| [_] <- lookupTy n ctxt = uniqueNameCtxt ctxt (nextName n) hs
| otherwise = n
| 167
| false
| true
| 0
| 9
| 50
| 110
| 52
| 58
| null | null |
jbracker/supermonad-plugin
|
examples/monad/hmtc/supermonad/PPMTIR.hs
|
bsd-3-clause
|
ppExpression n (ExpAry {eaElts = es, expType = t, expSrcPos = sp}) =
indent n . showString "ExpAry" . spc . ppSrcPos sp . nl
. ppSeq (n+1) ppExpression es
. indent n . showString ": " . shows t . nl
| 210
|
ppExpression n (ExpAry {eaElts = es, expType = t, expSrcPos = sp}) =
indent n . showString "ExpAry" . spc . ppSrcPos sp . nl
. ppSeq (n+1) ppExpression es
. indent n . showString ": " . shows t . nl
| 210
|
ppExpression n (ExpAry {eaElts = es, expType = t, expSrcPos = sp}) =
indent n . showString "ExpAry" . spc . ppSrcPos sp . nl
. ppSeq (n+1) ppExpression es
. indent n . showString ": " . shows t . nl
| 210
| false
| false
| 4
| 8
| 53
| 112
| 51
| 61
| null | null |
tylerjl/adventofcode
|
app/Main.hs
|
mit
|
main :: IO ()
main = do
args <- getArgs
let mYear = (readMaybe <=< flip atMay 0) args
mDay = (readMaybe <=< flip atMay 1) args
mInp = args `atMay` 2
case (mYear, mDay, mInp) of
(Nothing, _, _) -> putStr $ unlines ["Error: missing year.", usage]
(_, Nothing, _) -> putStr $ unlines ["Error: missing day number.", usage]
(_, _, Nothing) -> putStr $ unlines ["Error: missing input.", usage]
(Just y, Just d, Just i) -> run y d i
| 461
|
main :: IO ()
main = do
args <- getArgs
let mYear = (readMaybe <=< flip atMay 0) args
mDay = (readMaybe <=< flip atMay 1) args
mInp = args `atMay` 2
case (mYear, mDay, mInp) of
(Nothing, _, _) -> putStr $ unlines ["Error: missing year.", usage]
(_, Nothing, _) -> putStr $ unlines ["Error: missing day number.", usage]
(_, _, Nothing) -> putStr $ unlines ["Error: missing input.", usage]
(Just y, Just d, Just i) -> run y d i
| 461
|
main = do
args <- getArgs
let mYear = (readMaybe <=< flip atMay 0) args
mDay = (readMaybe <=< flip atMay 1) args
mInp = args `atMay` 2
case (mYear, mDay, mInp) of
(Nothing, _, _) -> putStr $ unlines ["Error: missing year.", usage]
(_, Nothing, _) -> putStr $ unlines ["Error: missing day number.", usage]
(_, _, Nothing) -> putStr $ unlines ["Error: missing input.", usage]
(Just y, Just d, Just i) -> run y d i
| 447
| false
| true
| 0
| 13
| 117
| 209
| 111
| 98
| null | null |
agrafix/legoDSL
|
NXT/Parser/AttoParser.hs
|
bsd-3-clause
|
escapeSeq :: Parser Char
escapeSeq = choice (zipWith decode "bnfrt\\\"'" "\b\n\f\r\t\\\"'")
where decode c r = r <$ char c
| 126
|
escapeSeq :: Parser Char
escapeSeq = choice (zipWith decode "bnfrt\\\"'" "\b\n\f\r\t\\\"'")
where decode c r = r <$ char c
| 126
|
escapeSeq = choice (zipWith decode "bnfrt\\\"'" "\b\n\f\r\t\\\"'")
where decode c r = r <$ char c
| 101
| false
| true
| 0
| 8
| 23
| 46
| 22
| 24
| null | null |
haroldcarr/learn-haskell-coq-ml-etc
|
haskell/topic/program-structure/2019-01-hc-example-based-on-adjointio-raft/test/XTestUtils.hs
|
unlicense
|
pairMsToMicroS :: Num n => (n, n) -> (n, n)
pairMsToMicroS = bimap msToMicroS msToMicroS
| 88
|
pairMsToMicroS :: Num n => (n, n) -> (n, n)
pairMsToMicroS = bimap msToMicroS msToMicroS
| 88
|
pairMsToMicroS = bimap msToMicroS msToMicroS
| 44
| false
| true
| 0
| 7
| 14
| 39
| 21
| 18
| null | null |
ducis/haAni
|
hs/common/Graphics/Rendering/OpenGL/GL/VertexArrays.hs
|
gpl-2.0
|
getSecondaryColorPointer :: IO (VertexArrayDescriptor a)
getSecondaryColorPointer = do
n <- getInteger1 id GetSecondaryColorArraySize
d <- getEnum1 unmarshalDataType GetSecondaryColorArrayType
s <- getInteger1 fromIntegral GetSecondaryColorArrayStride
p <- getPointer SecondaryColorArrayPointer
return $ VertexArrayDescriptor n d s p
| 348
|
getSecondaryColorPointer :: IO (VertexArrayDescriptor a)
getSecondaryColorPointer = do
n <- getInteger1 id GetSecondaryColorArraySize
d <- getEnum1 unmarshalDataType GetSecondaryColorArrayType
s <- getInteger1 fromIntegral GetSecondaryColorArrayStride
p <- getPointer SecondaryColorArrayPointer
return $ VertexArrayDescriptor n d s p
| 348
|
getSecondaryColorPointer = do
n <- getInteger1 id GetSecondaryColorArraySize
d <- getEnum1 unmarshalDataType GetSecondaryColorArrayType
s <- getInteger1 fromIntegral GetSecondaryColorArrayStride
p <- getPointer SecondaryColorArrayPointer
return $ VertexArrayDescriptor n d s p
| 291
| false
| true
| 0
| 8
| 48
| 82
| 36
| 46
| null | null |
uduki/hsQt
|
Qtc/ClassTypes/Gui.hs
|
bsd-2-clause
|
qCast_QDataWidgetMapper :: Object a -> IO (QDataWidgetMapper ())
qCast_QDataWidgetMapper _qobj
= return (objectCast _qobj)
| 124
|
qCast_QDataWidgetMapper :: Object a -> IO (QDataWidgetMapper ())
qCast_QDataWidgetMapper _qobj
= return (objectCast _qobj)
| 124
|
qCast_QDataWidgetMapper _qobj
= return (objectCast _qobj)
| 59
| false
| true
| 0
| 9
| 15
| 41
| 19
| 22
| null | null |
beni55/snap-server
|
src/Snap/Http/Server.hs
|
bsd-3-clause
|
------------------------------------------------------------------------------
-- | Given a string like \"en_US\", this sets the locale to \"en_US.UTF-8\".
-- This doesn't work on Windows.
setUnicodeLocale :: String -> IO ()
setUnicodeLocale =
#ifndef PORTABLE
\lang -> mapM_ (\k -> setEnv k (lang ++ ".UTF-8") True)
[ "LANG"
, "LC_CTYPE"
, "LC_NUMERIC"
, "LC_TIME"
, "LC_COLLATE"
, "LC_MONETARY"
, "LC_MESSAGES"
, "LC_PAPER"
, "LC_NAME"
, "LC_ADDRESS"
, "LC_TELEPHONE"
, "LC_MEASUREMENT"
, "LC_IDENTIFICATION"
, "LC_ALL" ]
| 737
|
setUnicodeLocale :: String -> IO ()
setUnicodeLocale =
#ifndef PORTABLE
\lang -> mapM_ (\k -> setEnv k (lang ++ ".UTF-8") True)
[ "LANG"
, "LC_CTYPE"
, "LC_NUMERIC"
, "LC_TIME"
, "LC_COLLATE"
, "LC_MONETARY"
, "LC_MESSAGES"
, "LC_PAPER"
, "LC_NAME"
, "LC_ADDRESS"
, "LC_TELEPHONE"
, "LC_MEASUREMENT"
, "LC_IDENTIFICATION"
, "LC_ALL" ]
| 548
|
setUnicodeLocale =
#ifndef PORTABLE
\lang -> mapM_ (\k -> setEnv k (lang ++ ".UTF-8") True)
[ "LANG"
, "LC_CTYPE"
, "LC_NUMERIC"
, "LC_TIME"
, "LC_COLLATE"
, "LC_MONETARY"
, "LC_MESSAGES"
, "LC_PAPER"
, "LC_NAME"
, "LC_ADDRESS"
, "LC_TELEPHONE"
, "LC_MEASUREMENT"
, "LC_IDENTIFICATION"
, "LC_ALL" ]
| 512
| true
| true
| 0
| 9
| 283
| 104
| 60
| 44
| null | null |
fmapfmapfmap/amazonka
|
amazonka-cloudformation/gen/Network/AWS/CloudFormation/DescribeStacks.hs
|
mpl-2.0
|
-- | The name or the unique stack ID that is associated with the stack, which
-- are not always interchangeable:
--
-- - Running stacks: You can specify either the stack\'s name or its
-- unique stack ID.
-- - Deleted stacks: You must specify the unique stack ID.
--
-- Default: There is no default value.
dStackName :: Lens' DescribeStacks (Maybe Text)
dStackName = lens _dStackName (\ s a -> s{_dStackName = a})
| 421
|
dStackName :: Lens' DescribeStacks (Maybe Text)
dStackName = lens _dStackName (\ s a -> s{_dStackName = a})
| 107
|
dStackName = lens _dStackName (\ s a -> s{_dStackName = a})
| 59
| true
| true
| 0
| 9
| 82
| 53
| 32
| 21
| null | null |
brendanhay/gogol
|
gogol-sheets/gen/Network/Google/Sheets/Types/Product.hs
|
mpl-2.0
|
-- | The background color for cells with a color value greater than or equal
-- to maxValue. Defaults to #109618 if not specified.
tccsMaxValueColor :: Lens' TreemapChartColorScale (Maybe Color)
tccsMaxValueColor
= lens _tccsMaxValueColor
(\ s a -> s{_tccsMaxValueColor = a})
| 283
|
tccsMaxValueColor :: Lens' TreemapChartColorScale (Maybe Color)
tccsMaxValueColor
= lens _tccsMaxValueColor
(\ s a -> s{_tccsMaxValueColor = a})
| 152
|
tccsMaxValueColor
= lens _tccsMaxValueColor
(\ s a -> s{_tccsMaxValueColor = a})
| 88
| true
| true
| 1
| 9
| 48
| 53
| 26
| 27
| null | null |
schell/orion
|
src/Web/Orion/OAuth.hs
|
bsd-3-clause
|
parseResponse :: FromJSON a => LB.ByteString -> OAuth2Result a
parseResponse bs =
let j = deunicode bs
in case decode j of
Nothing -> Left $ "Could not decode data: " `LB.append` j
Just data' -> Right data'
| 240
|
parseResponse :: FromJSON a => LB.ByteString -> OAuth2Result a
parseResponse bs =
let j = deunicode bs
in case decode j of
Nothing -> Left $ "Could not decode data: " `LB.append` j
Just data' -> Right data'
| 240
|
parseResponse bs =
let j = deunicode bs
in case decode j of
Nothing -> Left $ "Could not decode data: " `LB.append` j
Just data' -> Right data'
| 177
| false
| true
| 0
| 11
| 71
| 81
| 38
| 43
| null | null |
abakst/liquidhaskell
|
benchmarks/bytestring-0.9.2.1/Data/ByteString/Lazy.hs
|
bsd-3-clause
|
eq _ Empty = False
| 22
|
eq _ Empty = False
| 22
|
eq _ Empty = False
| 22
| false
| false
| 1
| 5
| 8
| 13
| 5
| 8
| null | null |
forked-upstream-packages-for-ghcjs/ghc
|
libraries/base/GHC/Conc/IO.hs
|
bsd-3-clause
|
-- | Returns an STM action that can be used to wait for data
-- to read from a file descriptor. The second returned value
-- is an IO action that can be used to deregister interest
-- in the file descriptor.
threadWaitReadSTM :: Fd -> IO (Sync.STM (), IO ())
threadWaitReadSTM fd
#if !defined(mingw32_HOST_OS) && !defined(ghcjs_HOST_OS)
| threaded = Event.threadWaitReadSTM fd
#endif
| otherwise = do
m <- Sync.newTVarIO False
_ <- Sync.forkIO $ do
threadWaitRead fd
Sync.atomically $ Sync.writeTVar m True
let waitAction = do b <- Sync.readTVar m
if b then return () else retry
let killAction = return ()
return (waitAction, killAction)
-- | Returns an STM action that can be used to wait until data
-- can be written to a file descriptor. The second returned value
-- is an IO action that can be used to deregister interest
-- in the file descriptor.
| 931
|
threadWaitReadSTM :: Fd -> IO (Sync.STM (), IO ())
threadWaitReadSTM fd
#if !defined(mingw32_HOST_OS) && !defined(ghcjs_HOST_OS)
| threaded = Event.threadWaitReadSTM fd
#endif
| otherwise = do
m <- Sync.newTVarIO False
_ <- Sync.forkIO $ do
threadWaitRead fd
Sync.atomically $ Sync.writeTVar m True
let waitAction = do b <- Sync.readTVar m
if b then return () else retry
let killAction = return ()
return (waitAction, killAction)
-- | Returns an STM action that can be used to wait until data
-- can be written to a file descriptor. The second returned value
-- is an IO action that can be used to deregister interest
-- in the file descriptor.
| 723
|
threadWaitReadSTM fd
#if !defined(mingw32_HOST_OS) && !defined(ghcjs_HOST_OS)
| threaded = Event.threadWaitReadSTM fd
#endif
| otherwise = do
m <- Sync.newTVarIO False
_ <- Sync.forkIO $ do
threadWaitRead fd
Sync.atomically $ Sync.writeTVar m True
let waitAction = do b <- Sync.readTVar m
if b then return () else retry
let killAction = return ()
return (waitAction, killAction)
-- | Returns an STM action that can be used to wait until data
-- can be written to a file descriptor. The second returned value
-- is an IO action that can be used to deregister interest
-- in the file descriptor.
| 672
| true
| true
| 1
| 15
| 227
| 178
| 86
| 92
| null | null |
annenkov/contracts
|
Coq/Extraction/contracts-haskell/src/Main.hs
|
mit
|
europeanOptInFuthark = putStrLn $ F.ppFutharkCode paramEnv $ CT.cutPayoff $ CT.simp_loopif $ transC (fromHoas european')
| 120
|
europeanOptInFuthark = putStrLn $ F.ppFutharkCode paramEnv $ CT.cutPayoff $ CT.simp_loopif $ transC (fromHoas european')
| 120
|
europeanOptInFuthark = putStrLn $ F.ppFutharkCode paramEnv $ CT.cutPayoff $ CT.simp_loopif $ transC (fromHoas european')
| 120
| false
| false
| 1
| 10
| 13
| 43
| 19
| 24
| null | null |
danr/hipspec
|
testsuite/prod/zeno_version/PropT25.hs
|
gpl-3.0
|
fac :: Nat -> Nat
fac Z = S Z
| 29
|
fac :: Nat -> Nat
fac Z = S Z
| 29
|
fac Z = S Z
| 11
| false
| true
| 0
| 5
| 9
| 25
| 11
| 14
| null | null |
DanielG/kvm-in-a-box
|
src/ParserUtils.hs
|
agpl-3.0
|
nonNewlineSpace :: Stream s m Char => ParsecT s u m Char
nonNewlineSpace = satisfy (\c -> c /= '\n' && isSpace c) <?> "non-newline-space"
| 137
|
nonNewlineSpace :: Stream s m Char => ParsecT s u m Char
nonNewlineSpace = satisfy (\c -> c /= '\n' && isSpace c) <?> "non-newline-space"
| 137
|
nonNewlineSpace = satisfy (\c -> c /= '\n' && isSpace c) <?> "non-newline-space"
| 80
| false
| true
| 0
| 10
| 24
| 57
| 28
| 29
| null | null |
laurencer/confluence-sync
|
vendor/http-streams/tests/MockServer.hs
|
bsd-3-clause
|
serveError :: ByteString -> SomeException -> Snap ()
serveError x' e = do
debug msg
modifyResponse $ setResponseStatus 500 "Internal Server Error"
writeBS x'
r <- getResponse
finishWith r
where
msg = show (e :: SomeException)
| 251
|
serveError :: ByteString -> SomeException -> Snap ()
serveError x' e = do
debug msg
modifyResponse $ setResponseStatus 500 "Internal Server Error"
writeBS x'
r <- getResponse
finishWith r
where
msg = show (e :: SomeException)
| 251
|
serveError x' e = do
debug msg
modifyResponse $ setResponseStatus 500 "Internal Server Error"
writeBS x'
r <- getResponse
finishWith r
where
msg = show (e :: SomeException)
| 198
| false
| true
| 0
| 8
| 61
| 83
| 37
| 46
| null | null |
themoritz/cabal
|
cabal-install/Distribution/Client/CmdErrorMessages.hs
|
bsd-3-clause
|
renderTargetSelector (TargetComponent pkgid CLibName WholeComponent) =
"the library in the package " ++ display pkgid
| 121
|
renderTargetSelector (TargetComponent pkgid CLibName WholeComponent) =
"the library in the package " ++ display pkgid
| 121
|
renderTargetSelector (TargetComponent pkgid CLibName WholeComponent) =
"the library in the package " ++ display pkgid
| 121
| false
| false
| 0
| 7
| 18
| 26
| 12
| 14
| null | null |
isomorphism/hackage2
|
Distribution/Server/Framework/Error.hs
|
bsd-3-clause
|
messageToText (MText x :xs) = x ++ messageToText xs
| 52
|
messageToText (MText x :xs) = x ++ messageToText xs
| 52
|
messageToText (MText x :xs) = x ++ messageToText xs
| 52
| false
| false
| 0
| 8
| 9
| 26
| 12
| 14
| null | null |
AlexanderPankiv/ghc
|
compiler/nativeGen/PPC/Ppr.hs
|
bsd-3-clause
|
pprInstr LWSYNC = ptext (sLit "\tlwsync")
| 41
|
pprInstr LWSYNC = ptext (sLit "\tlwsync")
| 41
|
pprInstr LWSYNC = ptext (sLit "\tlwsync")
| 41
| false
| false
| 1
| 7
| 5
| 21
| 8
| 13
| null | null |
enolan/Idris-dev
|
src/Idris/Delaborate.hs
|
bsd-3-clause
|
pprintErr' i (UnknownImplicit n f) = annName n <+> text "is not an implicit argument of" <+> annName f
| 102
|
pprintErr' i (UnknownImplicit n f) = annName n <+> text "is not an implicit argument of" <+> annName f
| 102
|
pprintErr' i (UnknownImplicit n f) = annName n <+> text "is not an implicit argument of" <+> annName f
| 102
| false
| false
| 0
| 7
| 18
| 37
| 16
| 21
| null | null |
joelchelliah/diy-lang-haskell
|
test/parts/Test_7_UsingTheLanguage.hs
|
bsd-3-clause
|
testingLessOrEqual :: TestTree
testingLessOrEqual = testCase
"\n Test 7.6 - The `<=` function" $ do
env <- stdLibEnv
mapM_ (assertInterpretWithEnvironment env)
[ ("#t", "(<= 1 2)")
, ("#t", "(<= 2 2)")
, ("#f", "(<= 2 1)")
]
| 260
|
testingLessOrEqual :: TestTree
testingLessOrEqual = testCase
"\n Test 7.6 - The `<=` function" $ do
env <- stdLibEnv
mapM_ (assertInterpretWithEnvironment env)
[ ("#t", "(<= 1 2)")
, ("#t", "(<= 2 2)")
, ("#f", "(<= 2 1)")
]
| 260
|
testingLessOrEqual = testCase
"\n Test 7.6 - The `<=` function" $ do
env <- stdLibEnv
mapM_ (assertInterpretWithEnvironment env)
[ ("#t", "(<= 1 2)")
, ("#t", "(<= 2 2)")
, ("#f", "(<= 2 1)")
]
| 229
| false
| true
| 0
| 10
| 72
| 66
| 36
| 30
| null | null |
romanb/amazonka
|
amazonka-ec2/gen/Network/AWS/EC2/Types.hs
|
mpl-2.0
|
-- | The tag value.
tdValue :: Lens' TagDescription Text
tdValue = lens _tdValue (\s a -> s { _tdValue = a })
| 109
|
tdValue :: Lens' TagDescription Text
tdValue = lens _tdValue (\s a -> s { _tdValue = a })
| 89
|
tdValue = lens _tdValue (\s a -> s { _tdValue = a })
| 52
| true
| true
| 1
| 9
| 22
| 46
| 22
| 24
| null | null |
brianshourd/adventOfCode2016
|
test/Day9Spec.hs
|
mit
|
main :: IO ()
main = hspec spec
| 31
|
main :: IO ()
main = hspec spec
| 31
|
main = hspec spec
| 17
| false
| true
| 0
| 6
| 7
| 19
| 9
| 10
| null | null |
d0kt0r0/estuary
|
common/src/Estuary/Types/Ensemble.hs
|
gpl-3.0
|
writeTempo :: Tempo -> Ensemble -> Ensemble
writeTempo t e = e { tempo = t }
| 77
|
writeTempo :: Tempo -> Ensemble -> Ensemble
writeTempo t e = e { tempo = t }
| 76
|
writeTempo t e = e { tempo = t }
| 32
| false
| true
| 0
| 6
| 17
| 32
| 17
| 15
| null | null |
fiigii/fJS
|
Parser.hs
|
mit
|
condExpr' :: Ast -> Parser Ast
condExpr' e = do reservedOp "?"
t2 <- expr
reservedOp ":"
t3 <- expr
return $ IfExpr e t2 t3
| 191
|
condExpr' :: Ast -> Parser Ast
condExpr' e = do reservedOp "?"
t2 <- expr
reservedOp ":"
t3 <- expr
return $ IfExpr e t2 t3
| 191
|
condExpr' e = do reservedOp "?"
t2 <- expr
reservedOp ":"
t3 <- expr
return $ IfExpr e t2 t3
| 160
| false
| true
| 0
| 9
| 93
| 66
| 27
| 39
| null | null |
limaner2002/ghcjs-test
|
app/Main.hs
|
bsd-3-clause
|
-- data Sorting = Ascending | Descending | NotSorted
-- createSortHeadCell :: MonadWidget t m => (Int, String, Sorting) -> m (Event t Int)
-- createSortHeadCell (idx, item, sorting) = do
-- (e, _) <- el' "div" $ do
-- text item
-- showArrow
-- el "span" blank
-- return $ pushAlways (const (return idx)) $ domEvent Click e
-- showArrow :: MonadWidget t m => Sorting -> m ()
-- showArrow Ascending = elAttr "i" ("class" =: "fa fa-long-arrow-down")
-- showArrow Descending = elAttr "i" ("class" =: "fa fa-long-arrow-up")
-- showArrow NotSorted = blank
-- thead :: MonadWidget t m => [String] -> [m (Event t Int)]
-- thead cts = fmap createSortHeadCell $ zip3 [0..] cts $ repeat NotSorted
-- -- thead :: [String]
-- -- thead = ["First", "Second"]
-- tbody :: MonadWidget t m => [[Int]] -> [[m ()]]
-- tbody contents = do
-- (fmap . fmap) (text . show) contents
-- bodyContents :: [[Int]]
-- bodyContents = [ [1, 3]
-- , [4, 2]
-- , [7, 5]
-- , [4, 1]
-- , [1, 9]
-- , [2, 14]
-- , [13, 93]
-- ]
-- -- -- Takes in a collection of cells and displays them
-- -- dispCells :: (Traversable t, MonadWidget t1 m) => String -> t (m b) -> m (t b)
-- -- dispCells label cells = el "tr" $ mapM dispCell cells
-- -- where
-- -- dispCell = el label
-- dispTable :: MonadWidget t m => m ()
-- dispTable = elAttr "table" ("class" =: "pure-table pure-table-striped") $ do
-- evts <- el "thead" $ dispCells "th" thead
-- let leftEvent = leftmost evts
-- folded <- foldDyn (\idx (idxOld, revBool) -> case idx == idxOld of
-- True -> (idx, not revBool)
-- False -> (idx, False)
-- ) (0, False) leftEvent
-- sorted <- mapDyn (\(idx, revBool) -> shouldReverse revBool $ sortTable idx) folded
-- el "tbody" $
-- simpleList sorted (\x -> el "tr" $
-- simpleList x (\y -> el "td" $ dynText =<< mapDyn show y)
-- )
-- return ()
-- mainView :: MonadWidget t m => m ()
-- mainView = do
-- dispTable
-- sortTable :: Int -> [[Int]]
-- sortTable idx = sortOn (flip indexEx idx) bodyContents
-- items :: [Int]
-- items = [1,5,3,4]
-- shouldReverse :: Bool -> [a] -> [a]
-- shouldReverse False items = items
-- shouldReverse True items = reverse items
main :: IO ()
main = mainWidgetWithHead (fontAwesome >> header) $ do
testTable
| 2,724
|
main :: IO ()
main = mainWidgetWithHead (fontAwesome >> header) $ do
testTable
| 87
|
main = mainWidgetWithHead (fontAwesome >> header) $ do
testTable
| 73
| true
| true
| 0
| 8
| 951
| 96
| 74
| 22
| null | null |
alphaHeavy/cabal
|
cabal-install/Distribution/Client/SetupWrapper.hs
|
bsd-3-clause
|
buildTypeAction Make = Make.defaultMainArgs
| 48
|
buildTypeAction Make = Make.defaultMainArgs
| 48
|
buildTypeAction Make = Make.defaultMainArgs
| 48
| false
| false
| 0
| 5
| 8
| 11
| 5
| 6
| null | null |
rrnewton/pcg-random
|
src/System/Random/PCG/Class.hs
|
bsd-3-clause
|
uniformRI16 :: Generator g m => (Int16, Int16) -> g -> m Int16
uniformRI16 = uniformR
| 85
|
uniformRI16 :: Generator g m => (Int16, Int16) -> g -> m Int16
uniformRI16 = uniformR
| 85
|
uniformRI16 = uniformR
| 22
| false
| true
| 0
| 9
| 15
| 43
| 20
| 23
| null | null |
sapek/pandoc
|
src/Text/Pandoc/Readers/HTML.hs
|
gpl-2.0
|
tagToString _ = ""
| 18
|
tagToString _ = ""
| 18
|
tagToString _ = ""
| 18
| false
| false
| 0
| 5
| 3
| 9
| 4
| 5
| null | null |
ganeti/ganeti
|
src/Ganeti/HTools/Program/Hbal.hs
|
bsd-2-clause
|
checkCluster :: Int -> Node.List -> Instance.List -> IO ()
checkCluster verbose nl il = do
-- nothing to do on an empty cluster
when (Container.null il) $ do
printf "Cluster is empty, exiting.\n"::IO ()
exitSuccess
-- hbal doesn't currently handle split clusters
let split_insts = Cluster.findSplitInstances nl il
unless (null split_insts || verbose <= 1) $ do
hPutStrLn stderr "Found instances belonging to multiple node groups:"
mapM_ (\i -> hPutStrLn stderr $ " " ++ Instance.name i) split_insts
hPutStrLn stderr "These instances will not be moved."
printf "Loaded %d nodes, %d instances\n"
(Container.size nl)
(Container.size il)::IO ()
let csf = commonSuffix nl il
when (not (null csf) && verbose > 1) $
printf "Note: Stripping common suffix of '%s' from names\n" csf
-- | Do a few checks on the selected group data.
| 905
|
checkCluster :: Int -> Node.List -> Instance.List -> IO ()
checkCluster verbose nl il = do
-- nothing to do on an empty cluster
when (Container.null il) $ do
printf "Cluster is empty, exiting.\n"::IO ()
exitSuccess
-- hbal doesn't currently handle split clusters
let split_insts = Cluster.findSplitInstances nl il
unless (null split_insts || verbose <= 1) $ do
hPutStrLn stderr "Found instances belonging to multiple node groups:"
mapM_ (\i -> hPutStrLn stderr $ " " ++ Instance.name i) split_insts
hPutStrLn stderr "These instances will not be moved."
printf "Loaded %d nodes, %d instances\n"
(Container.size nl)
(Container.size il)::IO ()
let csf = commonSuffix nl il
when (not (null csf) && verbose > 1) $
printf "Note: Stripping common suffix of '%s' from names\n" csf
-- | Do a few checks on the selected group data.
| 905
|
checkCluster verbose nl il = do
-- nothing to do on an empty cluster
when (Container.null il) $ do
printf "Cluster is empty, exiting.\n"::IO ()
exitSuccess
-- hbal doesn't currently handle split clusters
let split_insts = Cluster.findSplitInstances nl il
unless (null split_insts || verbose <= 1) $ do
hPutStrLn stderr "Found instances belonging to multiple node groups:"
mapM_ (\i -> hPutStrLn stderr $ " " ++ Instance.name i) split_insts
hPutStrLn stderr "These instances will not be moved."
printf "Loaded %d nodes, %d instances\n"
(Container.size nl)
(Container.size il)::IO ()
let csf = commonSuffix nl il
when (not (null csf) && verbose > 1) $
printf "Note: Stripping common suffix of '%s' from names\n" csf
-- | Do a few checks on the selected group data.
| 846
| false
| true
| 0
| 18
| 217
| 249
| 114
| 135
| null | null |
gcampax/ghc
|
compiler/types/FamInstEnv.hs
|
bsd-3-clause
|
pprFamInstHdr :: FamInst -> SDoc
pprFamInstHdr fi@(FamInst {fi_flavor = flavor})
= pprTyConSort <+> pp_instance <+> pp_head
where
-- For *associated* types, say "type T Int = blah"
-- For *top level* type instances, say "type instance T Int = blah"
pp_instance
| isTyConAssoc fam_tc = empty
| otherwise = ptext (sLit "instance")
(fam_tc, etad_lhs_tys) = famInstSplitLHS fi
vanilla_pp_head = pprTypeApp fam_tc etad_lhs_tys
pp_head | DataFamilyInst rep_tc <- flavor
, isAlgTyCon rep_tc
, let extra_tvs = dropList etad_lhs_tys (tyConTyVars rep_tc)
, not (null extra_tvs)
= getPprStyle $ \ sty ->
if debugStyle sty
then vanilla_pp_head -- With -dppr-debug just show it as-is
else pprTypeApp fam_tc (etad_lhs_tys ++ mkTyVarTys extra_tvs)
-- Without -dppr-debug, eta-expand
-- See Trac #8674
-- (This is probably over the top now that we use this
-- only for internal debug printing; PprTyThing.pprFamInst
-- is used for user-level printing.)
| otherwise
= vanilla_pp_head
pprTyConSort = case flavor of
SynFamilyInst -> ptext (sLit "type")
DataFamilyInst tycon
| isDataTyCon tycon -> ptext (sLit "data")
| isNewTyCon tycon -> ptext (sLit "newtype")
| isAbstractTyCon tycon -> ptext (sLit "data")
| otherwise -> ptext (sLit "WEIRD") <+> ppr tycon
| 1,681
|
pprFamInstHdr :: FamInst -> SDoc
pprFamInstHdr fi@(FamInst {fi_flavor = flavor})
= pprTyConSort <+> pp_instance <+> pp_head
where
-- For *associated* types, say "type T Int = blah"
-- For *top level* type instances, say "type instance T Int = blah"
pp_instance
| isTyConAssoc fam_tc = empty
| otherwise = ptext (sLit "instance")
(fam_tc, etad_lhs_tys) = famInstSplitLHS fi
vanilla_pp_head = pprTypeApp fam_tc etad_lhs_tys
pp_head | DataFamilyInst rep_tc <- flavor
, isAlgTyCon rep_tc
, let extra_tvs = dropList etad_lhs_tys (tyConTyVars rep_tc)
, not (null extra_tvs)
= getPprStyle $ \ sty ->
if debugStyle sty
then vanilla_pp_head -- With -dppr-debug just show it as-is
else pprTypeApp fam_tc (etad_lhs_tys ++ mkTyVarTys extra_tvs)
-- Without -dppr-debug, eta-expand
-- See Trac #8674
-- (This is probably over the top now that we use this
-- only for internal debug printing; PprTyThing.pprFamInst
-- is used for user-level printing.)
| otherwise
= vanilla_pp_head
pprTyConSort = case flavor of
SynFamilyInst -> ptext (sLit "type")
DataFamilyInst tycon
| isDataTyCon tycon -> ptext (sLit "data")
| isNewTyCon tycon -> ptext (sLit "newtype")
| isAbstractTyCon tycon -> ptext (sLit "data")
| otherwise -> ptext (sLit "WEIRD") <+> ppr tycon
| 1,681
|
pprFamInstHdr fi@(FamInst {fi_flavor = flavor})
= pprTyConSort <+> pp_instance <+> pp_head
where
-- For *associated* types, say "type T Int = blah"
-- For *top level* type instances, say "type instance T Int = blah"
pp_instance
| isTyConAssoc fam_tc = empty
| otherwise = ptext (sLit "instance")
(fam_tc, etad_lhs_tys) = famInstSplitLHS fi
vanilla_pp_head = pprTypeApp fam_tc etad_lhs_tys
pp_head | DataFamilyInst rep_tc <- flavor
, isAlgTyCon rep_tc
, let extra_tvs = dropList etad_lhs_tys (tyConTyVars rep_tc)
, not (null extra_tvs)
= getPprStyle $ \ sty ->
if debugStyle sty
then vanilla_pp_head -- With -dppr-debug just show it as-is
else pprTypeApp fam_tc (etad_lhs_tys ++ mkTyVarTys extra_tvs)
-- Without -dppr-debug, eta-expand
-- See Trac #8674
-- (This is probably over the top now that we use this
-- only for internal debug printing; PprTyThing.pprFamInst
-- is used for user-level printing.)
| otherwise
= vanilla_pp_head
pprTyConSort = case flavor of
SynFamilyInst -> ptext (sLit "type")
DataFamilyInst tycon
| isDataTyCon tycon -> ptext (sLit "data")
| isNewTyCon tycon -> ptext (sLit "newtype")
| isAbstractTyCon tycon -> ptext (sLit "data")
| otherwise -> ptext (sLit "WEIRD") <+> ppr tycon
| 1,648
| false
| true
| 2
| 13
| 628
| 327
| 159
| 168
| null | null |
ulricha/dsh
|
src/Database/DSH/Tests/CombinatorTests.hs
|
bsd-3-clause
|
prop_filter_gt_nested :: (BackendVector b, VectorLang v) => [(Integer, [Integer])] -> DSHProperty (v TExpr TExpr) b
prop_filter_gt_nested = makePropEq (Q.filter ((Q.> 42) . Q.fst)) (filter ((> 42) . fst))
| 204
|
prop_filter_gt_nested :: (BackendVector b, VectorLang v) => [(Integer, [Integer])] -> DSHProperty (v TExpr TExpr) b
prop_filter_gt_nested = makePropEq (Q.filter ((Q.> 42) . Q.fst)) (filter ((> 42) . fst))
| 204
|
prop_filter_gt_nested = makePropEq (Q.filter ((Q.> 42) . Q.fst)) (filter ((> 42) . fst))
| 88
| false
| true
| 0
| 10
| 27
| 100
| 55
| 45
| null | null |
sleexyz/haskell-fun
|
EmbedFunctorInHask2.hs
|
bsd-3-clause
|
foo2 = fmap (+1) (+2) 0
| 23
|
foo2 = fmap (+1) (+2) 0
| 23
|
foo2 = fmap (+1) (+2) 0
| 23
| false
| false
| 0
| 6
| 5
| 21
| 12
| 9
| null | null |
SteffenMichels/IHPMC
|
src/GroundedAST.hs
|
mit
|
exprProbabilisticFunctions (ConstantExpr _) = Set.empty
| 55
|
exprProbabilisticFunctions (ConstantExpr _) = Set.empty
| 55
|
exprProbabilisticFunctions (ConstantExpr _) = Set.empty
| 55
| false
| false
| 0
| 7
| 4
| 17
| 8
| 9
| null | null |
enolan/Idris-dev
|
Setup.hs
|
bsd-3-clause
|
fixPkg pkg target = pkg { dataDir = target }
| 44
|
fixPkg pkg target = pkg { dataDir = target }
| 44
|
fixPkg pkg target = pkg { dataDir = target }
| 44
| false
| false
| 1
| 7
| 9
| 24
| 10
| 14
| null | null |
brendanhay/ede
|
src/Text/EDE/Internal/Quoting.hs
|
mpl-2.0
|
typeErr :: Id -> Int -> AnsiDoc -> AnsiDoc -> Result a
typeErr k n x y = Failure $ "type" <+> pp k <+> pretty n <+> x <+> "::" <+> y
| 132
|
typeErr :: Id -> Int -> AnsiDoc -> AnsiDoc -> Result a
typeErr k n x y = Failure $ "type" <+> pp k <+> pretty n <+> x <+> "::" <+> y
| 132
|
typeErr k n x y = Failure $ "type" <+> pp k <+> pretty n <+> x <+> "::" <+> y
| 77
| false
| true
| 0
| 10
| 32
| 69
| 33
| 36
| null | null |
grandpascorpion/canon
|
Math/NumberTheory/Canon.hs
|
gpl-3.0
|
qcBase :: Canon -> Canon -> Canon
-- qcBase p c | trace ("qcBase: (p = " ++ show p ++ ", c = " ++ show c ++ ")") False = undefined
qcBase p c@(Bare n _) = if (n == cToI p) then c1 else error (errMsgQCB p c [])
| 209
|
qcBase :: Canon -> Canon -> Canon
qcBase p c@(Bare n _) = if (n == cToI p) then c1 else error (errMsgQCB p c [])
| 112
|
qcBase p c@(Bare n _) = if (n == cToI p) then c1 else error (errMsgQCB p c [])
| 78
| true
| true
| 0
| 9
| 51
| 69
| 36
| 33
| null | null |
rul/lazymail
|
src/Lazymail/State.hs
|
gpl-3.0
|
initialInputState = InputState {
inputRequested = False
, prompt = Nothing
, currentInput = ""
, postInputActions = return ()
}
| 157
|
initialInputState = InputState {
inputRequested = False
, prompt = Nothing
, currentInput = ""
, postInputActions = return ()
}
| 157
|
initialInputState = InputState {
inputRequested = False
, prompt = Nothing
, currentInput = ""
, postInputActions = return ()
}
| 157
| false
| false
| 0
| 8
| 50
| 37
| 22
| 15
| null | null |
krisajenkins/esqueleto
|
src/Database/Esqueleto/Internal/Sql.hs
|
bsd-3-clause
|
makeOrderBy :: IdentInfo -> [OrderByClause] -> (TLB.Builder, [PersistValue])
makeOrderBy _ [] = mempty
| 105
|
makeOrderBy :: IdentInfo -> [OrderByClause] -> (TLB.Builder, [PersistValue])
makeOrderBy _ [] = mempty
| 105
|
makeOrderBy _ [] = mempty
| 28
| false
| true
| 0
| 8
| 15
| 40
| 22
| 18
| null | null |
ardfard/caurakarman
|
src/Caurakarman/Fetcher.hs
|
mit
|
extractEntry = xshow $ css ".entry" >>> indentDoc
| 50
|
extractEntry = xshow $ css ".entry" >>> indentDoc
| 50
|
extractEntry = xshow $ css ".entry" >>> indentDoc
| 50
| false
| false
| 3
| 5
| 8
| 21
| 8
| 13
| null | null |
lukexi/ghc-7.8-arm64
|
compiler/main/DynFlags.hs
|
bsd-3-clause
|
-- OnOffs accumulate in reverse order, so we use foldr in order to
-- process them in the right order
flattenExtensionFlags :: Maybe Language -> [OnOff ExtensionFlag] -> IntSet
flattenExtensionFlags ml = foldr f defaultExtensionFlags
where f (On f) flags = IntSet.insert (fromEnum f) flags
f (Off f) flags = IntSet.delete (fromEnum f) flags
defaultExtensionFlags = IntSet.fromList (map fromEnum (languageExtensions ml))
| 444
|
flattenExtensionFlags :: Maybe Language -> [OnOff ExtensionFlag] -> IntSet
flattenExtensionFlags ml = foldr f defaultExtensionFlags
where f (On f) flags = IntSet.insert (fromEnum f) flags
f (Off f) flags = IntSet.delete (fromEnum f) flags
defaultExtensionFlags = IntSet.fromList (map fromEnum (languageExtensions ml))
| 342
|
flattenExtensionFlags ml = foldr f defaultExtensionFlags
where f (On f) flags = IntSet.insert (fromEnum f) flags
f (Off f) flags = IntSet.delete (fromEnum f) flags
defaultExtensionFlags = IntSet.fromList (map fromEnum (languageExtensions ml))
| 267
| true
| true
| 2
| 9
| 85
| 121
| 60
| 61
| null | null |
Andrey-Sisoyev/PCLT-DB
|
examples/HelloWorld/HelloWorld.hs
|
lgpl-2.1
|
__my_lng = "rus"
| 16
|
__my_lng = "rus"
| 16
|
__my_lng = "rus"
| 16
| false
| false
| 1
| 5
| 2
| 10
| 3
| 7
| null | null |
AaronFriel/hyhac
|
src/Database/HyperDex/Internal/Core.hs
|
bsd-3-clause
|
wrapIterator :: HyperDex o
=> (ReturnCode o -> Bool)
-> (ReturnCode o -> Bool)
-> ResIO (AsyncCall o a)
-> HyperDexConnection o
-> IO (Stream o a)
wrapIterator iteratorComplete iteratorSuccess = wrapGeneral iterator
where
iterator = CallDescription
{ resultIntermediate = newTQueueIO :: IO (TQueue (Maybe (HyperDexResult o a)))
, failureAction = \m rc -> atomically $ do
writeTQueue m $ Just $ Left rc
writeTQueue m Nothing
, defaultFailureCode = failureCode
, successAction = \m a -> atomically $ writeTQueue m $ Just a
, completeAction = \m -> atomically $ writeTQueue m Nothing
, returnCodeComplete = iteratorComplete
, returnCodeSuccess = iteratorSuccess
, returnResult = \client hvar m ->
makeStream m (demandHandle hvar client)
}
| 931
|
wrapIterator :: HyperDex o
=> (ReturnCode o -> Bool)
-> (ReturnCode o -> Bool)
-> ResIO (AsyncCall o a)
-> HyperDexConnection o
-> IO (Stream o a)
wrapIterator iteratorComplete iteratorSuccess = wrapGeneral iterator
where
iterator = CallDescription
{ resultIntermediate = newTQueueIO :: IO (TQueue (Maybe (HyperDexResult o a)))
, failureAction = \m rc -> atomically $ do
writeTQueue m $ Just $ Left rc
writeTQueue m Nothing
, defaultFailureCode = failureCode
, successAction = \m a -> atomically $ writeTQueue m $ Just a
, completeAction = \m -> atomically $ writeTQueue m Nothing
, returnCodeComplete = iteratorComplete
, returnCodeSuccess = iteratorSuccess
, returnResult = \client hvar m ->
makeStream m (demandHandle hvar client)
}
| 930
|
wrapIterator iteratorComplete iteratorSuccess = wrapGeneral iterator
where
iterator = CallDescription
{ resultIntermediate = newTQueueIO :: IO (TQueue (Maybe (HyperDexResult o a)))
, failureAction = \m rc -> atomically $ do
writeTQueue m $ Just $ Left rc
writeTQueue m Nothing
, defaultFailureCode = failureCode
, successAction = \m a -> atomically $ writeTQueue m $ Just a
, completeAction = \m -> atomically $ writeTQueue m Nothing
, returnCodeComplete = iteratorComplete
, returnCodeSuccess = iteratorSuccess
, returnResult = \client hvar m ->
makeStream m (demandHandle hvar client)
}
| 713
| false
| true
| 0
| 13
| 310
| 264
| 135
| 129
| null | null |
GaloisInc/pads-haskell
|
Examples/First.hs
|
bsd-3-clause
|
linesFW_test = mkTestCase "fixed-width record discpline" linesFW_expects linesFW_result
| 87
|
linesFW_test = mkTestCase "fixed-width record discpline" linesFW_expects linesFW_result
| 87
|
linesFW_test = mkTestCase "fixed-width record discpline" linesFW_expects linesFW_result
| 87
| false
| false
| 0
| 5
| 7
| 13
| 6
| 7
| null | null |
ComputationWithBoundedResources/ara-inference
|
doc/tpdb_trs/Haskell/basic_haskell/mapM__1.hs
|
mit
|
returnMaybe :: b -> Maybe b
returnMaybe = Just
| 48
|
returnMaybe :: b -> Maybe b
returnMaybe = Just
| 48
|
returnMaybe = Just
| 18
| false
| true
| 0
| 6
| 10
| 18
| 9
| 9
| null | null |
brendanhay/gogol
|
gogol-bigtableadmin/gen/Network/Google/Resource/BigtableAdmin/Projects/Instances/Tables/ModifyColumnFamilies.hs
|
mpl-2.0
|
-- | OAuth access token.
pitmcfAccessToken :: Lens' ProjectsInstancesTablesModifyColumnFamilies (Maybe Text)
pitmcfAccessToken
= lens _pitmcfAccessToken
(\ s a -> s{_pitmcfAccessToken = a})
| 197
|
pitmcfAccessToken :: Lens' ProjectsInstancesTablesModifyColumnFamilies (Maybe Text)
pitmcfAccessToken
= lens _pitmcfAccessToken
(\ s a -> s{_pitmcfAccessToken = a})
| 172
|
pitmcfAccessToken
= lens _pitmcfAccessToken
(\ s a -> s{_pitmcfAccessToken = a})
| 88
| true
| true
| 1
| 9
| 29
| 51
| 25
| 26
| null | null |
nickspinale/euler
|
complete/001.hs
|
mit
|
main = print $ sum [ x | x <- [0..999], x `mod` 3 == 0 || x `mod` 5 == 0 ]
| 74
|
main = print $ sum [ x | x <- [0..999], x `mod` 3 == 0 || x `mod` 5 == 0 ]
| 74
|
main = print $ sum [ x | x <- [0..999], x `mod` 3 == 0 || x `mod` 5 == 0 ]
| 74
| false
| false
| 3
| 12
| 22
| 62
| 31
| 31
| null | null |
geo2a/students-big-brother
|
students-big-brother-server/app/Main.hs
|
bsd-3-clause
|
main :: IO ()
main = do
args <- getArgs
if length args /= 1
then putStr help
else case args of
[cfg] -> startServer cfg
_ -> putStr help
-- | Help message
| 180
|
main :: IO ()
main = do
args <- getArgs
if length args /= 1
then putStr help
else case args of
[cfg] -> startServer cfg
_ -> putStr help
-- | Help message
| 180
|
main = do
args <- getArgs
if length args /= 1
then putStr help
else case args of
[cfg] -> startServer cfg
_ -> putStr help
-- | Help message
| 166
| false
| true
| 0
| 11
| 59
| 70
| 34
| 36
| null | null |
gafiatulin/codewars
|
src/6 kyu/Pentabonacci.hs
|
mit
|
countOddPentaFib :: Int -> Int
countOddPentaFib 0 = 0
| 53
|
countOddPentaFib :: Int -> Int
countOddPentaFib 0 = 0
| 53
|
countOddPentaFib 0 = 0
| 22
| false
| true
| 0
| 5
| 8
| 18
| 9
| 9
| null | null |
mrmonday/Idris-dev
|
src/Idris/Primitives.hs
|
bsd-3-clause
|
p_fPrim :: (Double -> Double) -> [Const] -> Maybe Const
p_fPrim f [Fl x] = Just $ Fl (f x)
| 90
|
p_fPrim :: (Double -> Double) -> [Const] -> Maybe Const
p_fPrim f [Fl x] = Just $ Fl (f x)
| 90
|
p_fPrim f [Fl x] = Just $ Fl (f x)
| 34
| false
| true
| 2
| 7
| 19
| 62
| 29
| 33
| null | null |
nomeata/ghc
|
compiler/main/DynFlags.hs
|
bsd-3-clause
|
-- | These @-d\<blah\>@ flags can all be reversed with @-dno-\<blah\>@
dFlags :: [FlagSpec DynFlag]
dFlags = [
( "ppr-case-as-let", Opt_PprCaseAsLet, nop ) ]
| 176
|
dFlags :: [FlagSpec DynFlag]
dFlags = [
( "ppr-case-as-let", Opt_PprCaseAsLet, nop ) ]
| 105
|
dFlags = [
( "ppr-case-as-let", Opt_PprCaseAsLet, nop ) ]
| 76
| true
| true
| 0
| 6
| 42
| 30
| 18
| 12
| null | null |
kelnage/tamarin-prover
|
src/Web/Theory.hs
|
gpl-3.0
|
titleDiffThyPath :: ClosedDiffTheory -> DiffTheoryPath -> String
titleDiffThyPath thy path = go path
where
go DiffTheoryHelp = "Theory: " ++ get diffThyName thy
go (DiffTheoryRules s d) = "Multiset rewriting rules and restrictions [" ++ show s ++ "]" ++ if d then " [Diff]" else ""
go DiffTheoryDiffRules = "Multiset rewriting rules and restrictions - unprocessed"
go (DiffTheoryMessage s d) = "Message theory [" ++ show s ++ "]" ++ if d then " [Diff]" else ""
go (DiffTheorySource s RawSource d _ _) = "Raw sources [" ++ show s ++ "]" ++ if d then " [Diff]" else ""
go (DiffTheorySource s RefinedSource d _ _) = "Refined sources [" ++ show s ++ "]" ++ if d then " [Diff]" else ""
go (DiffTheoryLemma s l) = "Lemma: " ++ l ++ "[" ++ show s ++ "]"
go (DiffTheoryDiffLemma l) = "DiffLemma: " ++ l
go (DiffTheoryProof s l []) = "Lemma: " ++ l ++ "[" ++ show s ++ "]"
go (DiffTheoryProof s l p)
| null (last p) = "Method: " ++ methodName s l p
| otherwise = "Case: " ++ last p
go (DiffTheoryDiffProof l []) = "Diff-Lemma: " ++ l
go (DiffTheoryDiffProof l p)
| null (last p) = "Method: " ++ diffMethodName l p
| otherwise = "Case: " ++ last p
go (DiffTheoryMethod _ _ _ _) = "Method Path: This title should not be shown. Please file a bug"
go (DiffTheoryDiffMethod _ _ _) = "DiffMethod Path: This title should not be shown. Please file a bug"
methodName s l p =
case resolveProofPathDiff thy s l p of
Nothing -> "None"
Just proof -> renderHtmlDoc $ prettyProofMethod $ psMethod $ root proof
diffMethodName l p =
case resolveProofPathDiffLemma thy l p of
Nothing -> "None"
Just proof -> renderHtmlDoc $ prettyDiffProofMethod $ dpsMethod $ root proof
-- | Resolve a proof path.
| 2,005
|
titleDiffThyPath :: ClosedDiffTheory -> DiffTheoryPath -> String
titleDiffThyPath thy path = go path
where
go DiffTheoryHelp = "Theory: " ++ get diffThyName thy
go (DiffTheoryRules s d) = "Multiset rewriting rules and restrictions [" ++ show s ++ "]" ++ if d then " [Diff]" else ""
go DiffTheoryDiffRules = "Multiset rewriting rules and restrictions - unprocessed"
go (DiffTheoryMessage s d) = "Message theory [" ++ show s ++ "]" ++ if d then " [Diff]" else ""
go (DiffTheorySource s RawSource d _ _) = "Raw sources [" ++ show s ++ "]" ++ if d then " [Diff]" else ""
go (DiffTheorySource s RefinedSource d _ _) = "Refined sources [" ++ show s ++ "]" ++ if d then " [Diff]" else ""
go (DiffTheoryLemma s l) = "Lemma: " ++ l ++ "[" ++ show s ++ "]"
go (DiffTheoryDiffLemma l) = "DiffLemma: " ++ l
go (DiffTheoryProof s l []) = "Lemma: " ++ l ++ "[" ++ show s ++ "]"
go (DiffTheoryProof s l p)
| null (last p) = "Method: " ++ methodName s l p
| otherwise = "Case: " ++ last p
go (DiffTheoryDiffProof l []) = "Diff-Lemma: " ++ l
go (DiffTheoryDiffProof l p)
| null (last p) = "Method: " ++ diffMethodName l p
| otherwise = "Case: " ++ last p
go (DiffTheoryMethod _ _ _ _) = "Method Path: This title should not be shown. Please file a bug"
go (DiffTheoryDiffMethod _ _ _) = "DiffMethod Path: This title should not be shown. Please file a bug"
methodName s l p =
case resolveProofPathDiff thy s l p of
Nothing -> "None"
Just proof -> renderHtmlDoc $ prettyProofMethod $ psMethod $ root proof
diffMethodName l p =
case resolveProofPathDiffLemma thy l p of
Nothing -> "None"
Just proof -> renderHtmlDoc $ prettyDiffProofMethod $ dpsMethod $ root proof
-- | Resolve a proof path.
| 2,005
|
titleDiffThyPath thy path = go path
where
go DiffTheoryHelp = "Theory: " ++ get diffThyName thy
go (DiffTheoryRules s d) = "Multiset rewriting rules and restrictions [" ++ show s ++ "]" ++ if d then " [Diff]" else ""
go DiffTheoryDiffRules = "Multiset rewriting rules and restrictions - unprocessed"
go (DiffTheoryMessage s d) = "Message theory [" ++ show s ++ "]" ++ if d then " [Diff]" else ""
go (DiffTheorySource s RawSource d _ _) = "Raw sources [" ++ show s ++ "]" ++ if d then " [Diff]" else ""
go (DiffTheorySource s RefinedSource d _ _) = "Refined sources [" ++ show s ++ "]" ++ if d then " [Diff]" else ""
go (DiffTheoryLemma s l) = "Lemma: " ++ l ++ "[" ++ show s ++ "]"
go (DiffTheoryDiffLemma l) = "DiffLemma: " ++ l
go (DiffTheoryProof s l []) = "Lemma: " ++ l ++ "[" ++ show s ++ "]"
go (DiffTheoryProof s l p)
| null (last p) = "Method: " ++ methodName s l p
| otherwise = "Case: " ++ last p
go (DiffTheoryDiffProof l []) = "Diff-Lemma: " ++ l
go (DiffTheoryDiffProof l p)
| null (last p) = "Method: " ++ diffMethodName l p
| otherwise = "Case: " ++ last p
go (DiffTheoryMethod _ _ _ _) = "Method Path: This title should not be shown. Please file a bug"
go (DiffTheoryDiffMethod _ _ _) = "DiffMethod Path: This title should not be shown. Please file a bug"
methodName s l p =
case resolveProofPathDiff thy s l p of
Nothing -> "None"
Just proof -> renderHtmlDoc $ prettyProofMethod $ psMethod $ root proof
diffMethodName l p =
case resolveProofPathDiffLemma thy l p of
Nothing -> "None"
Just proof -> renderHtmlDoc $ prettyDiffProofMethod $ dpsMethod $ root proof
-- | Resolve a proof path.
| 1,940
| false
| true
| 0
| 10
| 651
| 598
| 290
| 308
| null | null |
bos/critbit
|
Data/CritBit/Set.hs
|
bsd-2-clause
|
-- | Wraps (value, tree) operation to (value, set) operation
wrapVS :: (r -> q) -> (t -> CritBit a () -> r) -> t -> Set a -> q
wrapVS f g a (Set s) = f $ g a s
| 159
|
wrapVS :: (r -> q) -> (t -> CritBit a () -> r) -> t -> Set a -> q
wrapVS f g a (Set s) = f $ g a s
| 98
|
wrapVS f g a (Set s) = f $ g a s
| 32
| true
| true
| 0
| 11
| 41
| 80
| 40
| 40
| null | null |
pankajmore/Imghost
|
Helpers/Document.hs
|
bsd-3-clause
|
canDeleteImage :: UserId -> ImagesId -> Handler Bool
canDeleteImage uid id = do
ownerid <- getOwner id
case ownerid of
Nothing -> return False
Just Nothing -> return False
Just (Just oid) -> if uid == oid then return True else return False
| 311
|
canDeleteImage :: UserId -> ImagesId -> Handler Bool
canDeleteImage uid id = do
ownerid <- getOwner id
case ownerid of
Nothing -> return False
Just Nothing -> return False
Just (Just oid) -> if uid == oid then return True else return False
| 311
|
canDeleteImage uid id = do
ownerid <- getOwner id
case ownerid of
Nothing -> return False
Just Nothing -> return False
Just (Just oid) -> if uid == oid then return True else return False
| 258
| false
| true
| 0
| 12
| 114
| 98
| 45
| 53
| null | null |
monte-language/masque
|
Masque/Eval.hs
|
gpl-3.0
|
unify (IgnorePatt guardExpr) specimen ej = do
guard <- eval guardExpr
void $ call guard "coerce" [specimen, ej] []
| 122
|
unify (IgnorePatt guardExpr) specimen ej = do
guard <- eval guardExpr
void $ call guard "coerce" [specimen, ej] []
| 122
|
unify (IgnorePatt guardExpr) specimen ej = do
guard <- eval guardExpr
void $ call guard "coerce" [specimen, ej] []
| 122
| false
| false
| 1
| 10
| 26
| 56
| 25
| 31
| null | null |
lpeterse/koka
|
src/Core/Core.hs
|
apache-2.0
|
attenDefGroups :: [DefGroup] -> [Def]
flattenDefGroups defGroups
= concatMap (\defg -> case defg of { DefRec defs -> defs; DefNonRec def -> [def]}) defGroups
| 163
|
flattenDefGroups :: [DefGroup] -> [Def]
flattenDefGroups defGroups
= concatMap (\defg -> case defg of { DefRec defs -> defs; DefNonRec def -> [def]}) defGroups
| 162
|
flattenDefGroups defGroups
= concatMap (\defg -> case defg of { DefRec defs -> defs; DefNonRec def -> [def]}) defGroups
| 122
| false
| true
| 0
| 11
| 29
| 71
| 36
| 35
| null | null |
alexnel/intaractive-visualisation
|
src/Main.hs
|
bsd-3-clause
|
ab :: IORef (Map.Map Float Float)
ab = unsafePerformIO $ newIORef Map.empty
| 75
|
ab :: IORef (Map.Map Float Float)
ab = unsafePerformIO $ newIORef Map.empty
| 75
|
ab = unsafePerformIO $ newIORef Map.empty
| 41
| false
| true
| 2
| 7
| 11
| 39
| 16
| 23
| null | null |
nevrenato/Hets_Fork
|
CSL/GeneralExtendedParameter.hs
|
gpl-2.0
|
compareBIEP :: BaseInterval -> EPExp -> SetOrdering
compareBIEP _ [] = Comparable GT
| 84
|
compareBIEP :: BaseInterval -> EPExp -> SetOrdering
compareBIEP _ [] = Comparable GT
| 84
|
compareBIEP _ [] = Comparable GT
| 32
| false
| true
| 0
| 6
| 12
| 29
| 14
| 15
| null | null |
d10genes/haskell-edu
|
e7/Scrabble.hs
|
bsd-2-clause
|
scoreString :: String -> Score
scoreString = sum . map score
| 60
|
scoreString :: String -> Score
scoreString = sum . map score
| 60
|
scoreString = sum . map score
| 29
| false
| true
| 0
| 6
| 10
| 22
| 11
| 11
| null | null |
gregorias/Pentago
|
src/Pentago/Data/Pentago.hs
|
bsd-3-clause
|
lineFivesToResult' :: Maybe Player -> [Player] -> Maybe Result
lineFivesToResult' acc [] = fmap playerToResult acc
| 114
|
lineFivesToResult' :: Maybe Player -> [Player] -> Maybe Result
lineFivesToResult' acc [] = fmap playerToResult acc
| 114
|
lineFivesToResult' acc [] = fmap playerToResult acc
| 51
| false
| true
| 0
| 7
| 15
| 45
| 20
| 25
| null | null |
bjorg/HPlug
|
uri.hs
|
mit
|
-- TODO
-- withQuery :: Uri -> String -> Uri
withoutQuery :: Uri -> Uri
withoutQuery uri = uri { query = Nothing }
| 115
|
withoutQuery :: Uri -> Uri
withoutQuery uri = uri { query = Nothing }
| 69
|
withoutQuery uri = uri { query = Nothing }
| 42
| true
| true
| 0
| 7
| 24
| 34
| 17
| 17
| null | null |
prt2121/haskell-practice
|
parconc/kmeans/kmeans.hs
|
apache-2.0
|
-- >>
steps_par :: Int -> [Cluster] -> [[Point]] -> [Cluster]
steps_par nclusters clusters pointss
= makeNewClusters $
foldl1' combine $
(runPar $ Par.parMap (assign nclusters clusters) pointss)
| 213
|
steps_par :: Int -> [Cluster] -> [[Point]] -> [Cluster]
steps_par nclusters clusters pointss
= makeNewClusters $
foldl1' combine $
(runPar $ Par.parMap (assign nclusters clusters) pointss)
| 206
|
steps_par nclusters clusters pointss
= makeNewClusters $
foldl1' combine $
(runPar $ Par.parMap (assign nclusters clusters) pointss)
| 150
| true
| true
| 4
| 10
| 46
| 84
| 41
| 43
| null | null |
ledyba/hs-java
|
JVM/Builder/Instructions.hs
|
lgpl-3.0
|
allocNewArray :: Generator e g => B.ByteString -> g e ()
allocNewArray cls =
i1 ANEWARRAY (CClass cls)
| 104
|
allocNewArray :: Generator e g => B.ByteString -> g e ()
allocNewArray cls =
i1 ANEWARRAY (CClass cls)
| 104
|
allocNewArray cls =
i1 ANEWARRAY (CClass cls)
| 47
| false
| true
| 0
| 8
| 19
| 47
| 22
| 25
| null | null |
brendanhay/gogol
|
gogol-healthcare/gen/Network/Google/Resource/Healthcare/Projects/Locations/DataSets/ConsentStores/Consents/Activate.hs
|
mpl-2.0
|
-- | V1 error format.
pldscscaXgafv :: Lens' ProjectsLocationsDataSetsConsentStoresConsentsActivate (Maybe Xgafv)
pldscscaXgafv
= lens _pldscscaXgafv
(\ s a -> s{_pldscscaXgafv = a})
| 190
|
pldscscaXgafv :: Lens' ProjectsLocationsDataSetsConsentStoresConsentsActivate (Maybe Xgafv)
pldscscaXgafv
= lens _pldscscaXgafv
(\ s a -> s{_pldscscaXgafv = a})
| 168
|
pldscscaXgafv
= lens _pldscscaXgafv
(\ s a -> s{_pldscscaXgafv = a})
| 76
| true
| true
| 1
| 9
| 29
| 51
| 25
| 26
| null | null |
danr/hipspec
|
examples/old-examples/quickspec/Lists.hs
|
gpl-3.0
|
prop_revinv :: ListP a -> Prop (ListP a)
prop_revinv xs = reverse (reverse xs) =:= xs
| 85
|
prop_revinv :: ListP a -> Prop (ListP a)
prop_revinv xs = reverse (reverse xs) =:= xs
| 85
|
prop_revinv xs = reverse (reverse xs) =:= xs
| 44
| false
| true
| 0
| 8
| 15
| 43
| 20
| 23
| null | null |
lukexi/cabal
|
cabal-install/tests/UnitTests/Distribution/Client/FileMonitor.hs
|
bsd-3-clause
|
testGlobRemoveNonMatch :: Assertion
testGlobRemoveNonMatch =
withFileMonitor $ \root monitor -> do
touch root "dir/good-a"
touch root "dir/bad"
updateMonitor root monitor [monitorFileGlob "dir/good-*"] () ()
remove root "dir/bad"
(res, files) <- expectMonitorUnchanged root monitor ()
res @?= ()
files @?= [monitorFileGlob "dir/good-*"]
| 368
|
testGlobRemoveNonMatch :: Assertion
testGlobRemoveNonMatch =
withFileMonitor $ \root monitor -> do
touch root "dir/good-a"
touch root "dir/bad"
updateMonitor root monitor [monitorFileGlob "dir/good-*"] () ()
remove root "dir/bad"
(res, files) <- expectMonitorUnchanged root monitor ()
res @?= ()
files @?= [monitorFileGlob "dir/good-*"]
| 368
|
testGlobRemoveNonMatch =
withFileMonitor $ \root monitor -> do
touch root "dir/good-a"
touch root "dir/bad"
updateMonitor root monitor [monitorFileGlob "dir/good-*"] () ()
remove root "dir/bad"
(res, files) <- expectMonitorUnchanged root monitor ()
res @?= ()
files @?= [monitorFileGlob "dir/good-*"]
| 332
| false
| true
| 0
| 11
| 72
| 114
| 53
| 61
| null | null |
Luizss/TheSystem
|
src/Command.hs
|
bsd-3-clause
|
notin = parseText exprParser
| 41
|
notin = parseText exprParser
| 41
|
notin = parseText exprParser
| 41
| false
| false
| 0
| 5
| 16
| 9
| 4
| 5
| null | null |
kuribas/hmetafont
|
Typography/HMetafont.hs
|
bsd-3-clause
|
(-.) :: Num e => JoinModifier e -> MFPath e -> PartialPath e
f -. OpenMFPath o =
PartialOpen (f defaultJoin) o
| 112
|
(-.) :: Num e => JoinModifier e -> MFPath e -> PartialPath e
f -. OpenMFPath o =
PartialOpen (f defaultJoin) o
| 112
|
f -. OpenMFPath o =
PartialOpen (f defaultJoin) o
| 51
| false
| true
| 0
| 10
| 23
| 60
| 27
| 33
| null | null |
konn/hskk
|
Builder.hs
|
bsd-3-clause
|
getPackageName :: Dependency -> String
getPackageName (Dependency (PackageName name) _) = name
| 94
|
getPackageName :: Dependency -> String
getPackageName (Dependency (PackageName name) _) = name
| 94
|
getPackageName (Dependency (PackageName name) _) = name
| 55
| false
| true
| 0
| 9
| 11
| 32
| 16
| 16
| null | null |
kim/amazonka
|
amazonka-ec2/gen/Network/AWS/EC2/ImportInstance.hs
|
mpl-2.0
|
iiLaunchSpecification :: Lens' ImportInstance (Maybe ImportInstanceLaunchSpecification)
iiLaunchSpecification =
lens _iiLaunchSpecification (\s a -> s { _iiLaunchSpecification = a })
| 186
|
iiLaunchSpecification :: Lens' ImportInstance (Maybe ImportInstanceLaunchSpecification)
iiLaunchSpecification =
lens _iiLaunchSpecification (\s a -> s { _iiLaunchSpecification = a })
| 186
|
iiLaunchSpecification =
lens _iiLaunchSpecification (\s a -> s { _iiLaunchSpecification = a })
| 98
| false
| true
| 1
| 9
| 22
| 49
| 24
| 25
| null | null |
yiannist/ganeti
|
src/Ganeti/Hs2Py/OpDoc.hs
|
bsd-2-clause
|
opNodeQueryvols :: String
opNodeQueryvols =
"Get list of volumes on node."
| 76
|
opNodeQueryvols :: String
opNodeQueryvols =
"Get list of volumes on node."
| 76
|
opNodeQueryvols =
"Get list of volumes on node."
| 50
| false
| true
| 0
| 6
| 12
| 18
| 7
| 11
| null | null |
k-bx/snap-server
|
src/Snap/Internal/Http/Server/Config.hs
|
bsd-3-clause
|
------------------------------------------------------------------------------
completeConfig :: (MonadSnap m) => Config m a -> IO (Config m a)
completeConfig config = do
when noPort $ hPutStrLn stderr
"no port specified, defaulting to port 8000"
return $! cfg `mappend` cfg'
where
cfg = defaultConfig `mappend` config
sslVals = map ($ cfg) [ isJust . getSSLPort
, isJust . getSSLBind
, isJust . getSSLKey
, isJust . getSSLCert ]
sslValid = and sslVals
noPort = isNothing (getPort cfg) && not sslValid
cfg' = emptyConfig { port = if noPort then Just 8000 else Nothing }
------------------------------------------------------------------------------
| 773
|
completeConfig :: (MonadSnap m) => Config m a -> IO (Config m a)
completeConfig config = do
when noPort $ hPutStrLn stderr
"no port specified, defaulting to port 8000"
return $! cfg `mappend` cfg'
where
cfg = defaultConfig `mappend` config
sslVals = map ($ cfg) [ isJust . getSSLPort
, isJust . getSSLBind
, isJust . getSSLKey
, isJust . getSSLCert ]
sslValid = and sslVals
noPort = isNothing (getPort cfg) && not sslValid
cfg' = emptyConfig { port = if noPort then Just 8000 else Nothing }
------------------------------------------------------------------------------
| 694
|
completeConfig config = do
when noPort $ hPutStrLn stderr
"no port specified, defaulting to port 8000"
return $! cfg `mappend` cfg'
where
cfg = defaultConfig `mappend` config
sslVals = map ($ cfg) [ isJust . getSSLPort
, isJust . getSSLBind
, isJust . getSSLKey
, isJust . getSSLCert ]
sslValid = and sslVals
noPort = isNothing (getPort cfg) && not sslValid
cfg' = emptyConfig { port = if noPort then Just 8000 else Nothing }
------------------------------------------------------------------------------
| 629
| true
| true
| 0
| 9
| 214
| 182
| 96
| 86
| null | null |
TinyMultiplayerBot/GMRHC
|
GMRHC.hs
|
apache-2.0
|
listGamesHelper (g:gs) = do
Prelude.putStrLn ((name g) ++ " - " ++ (show $ turnId $ currentTurn g))
listGamesHelper gs
| 126
|
listGamesHelper (g:gs) = do
Prelude.putStrLn ((name g) ++ " - " ++ (show $ turnId $ currentTurn g))
listGamesHelper gs
| 126
|
listGamesHelper (g:gs) = do
Prelude.putStrLn ((name g) ++ " - " ++ (show $ turnId $ currentTurn g))
listGamesHelper gs
| 126
| false
| false
| 0
| 12
| 27
| 61
| 29
| 32
| null | null |
DougBurke/swish
|
src/Swish/RDF/Vocabulary/RDF.hs
|
lgpl-2.1
|
-- | @rdfs:Resource@ from <http://www.w3.org/TR/rdf-schema/#ch_resource>.
rdfsResource :: ScopedName
rdfsResource = toRDFS "Resource"
| 133
|
rdfsResource :: ScopedName
rdfsResource = toRDFS "Resource"
| 59
|
rdfsResource = toRDFS "Resource"
| 32
| true
| true
| 0
| 6
| 11
| 22
| 9
| 13
| null | null |
iemxblog/ulci
|
src/Evaluation.hs
|
gpl-2.0
|
subst (Var y) x _ | x/= y = Var y
| 33
|
subst (Var y) x _ | x/= y = Var y
| 33
|
subst (Var y) x _ | x/= y = Var y
| 33
| false
| false
| 0
| 8
| 10
| 35
| 14
| 21
| null | null |
rtoal/polyglot
|
haskell/quicksort.hs
|
mit
|
main =
print $ (quickSort [5,3,4,1,2,6] == [1..6]) || error("fail")
| 69
|
main =
print $ (quickSort [5,3,4,1,2,6] == [1..6]) || error("fail")
| 69
|
main =
print $ (quickSort [5,3,4,1,2,6] == [1..6]) || error("fail")
| 69
| false
| false
| 0
| 10
| 11
| 53
| 30
| 23
| null | null |
mcmaniac/blog.nils.cc
|
src/State/Users.hs
|
apache-2.0
|
--
-- UserIDs
--
newUniqueUserId :: MonadIO m => Action m UserDB UserID
newUniqueUserId = act pickId
where
pickId db = do
unique <- liftIO newUnique
let i = hashUnique unique
if isJust $ db ^. userAt i
then pickId db
else return i
| 258
|
newUniqueUserId :: MonadIO m => Action m UserDB UserID
newUniqueUserId = act pickId
where
pickId db = do
unique <- liftIO newUnique
let i = hashUnique unique
if isJust $ db ^. userAt i
then pickId db
else return i
| 240
|
newUniqueUserId = act pickId
where
pickId db = do
unique <- liftIO newUnique
let i = hashUnique unique
if isJust $ db ^. userAt i
then pickId db
else return i
| 185
| true
| true
| 1
| 11
| 71
| 101
| 44
| 57
| null | null |
qiuhw/sym
|
src/Sym/Parser.hs
|
bsd-3-clause
|
term = parens expr
<|> liftM ID identifier
<?> "simple expression"
| 75
|
term = parens expr
<|> liftM ID identifier
<?> "simple expression"
| 75
|
term = parens expr
<|> liftM ID identifier
<?> "simple expression"
| 75
| false
| false
| 6
| 5
| 19
| 31
| 12
| 19
| null | null |
bestian/haskell-sandbox
|
h99.hs
|
unlicense
|
--https://wiki.haskell.org/H-99:_Ninety-Nine_Haskell_Problems
--q1 Find the last element of a list.
myLast [] = error "empty list"
| 132
|
myLast [] = error "empty list"
| 30
|
myLast [] = error "empty list"
| 30
| true
| false
| 1
| 5
| 16
| 20
| 8
| 12
| null | null |
Tuplanolla/eigenlanguage
|
haskell/Parser.hs
|
gpl-3.0
|
past = manyTill anyToken . try
| 30
|
past = manyTill anyToken . try
| 30
|
past = manyTill anyToken . try
| 30
| false
| false
| 0
| 6
| 5
| 13
| 6
| 7
| null | null |
DavidAlphaFox/ghc
|
libraries/Cabal/cabal-install/Distribution/Client/PackageIndex.hs
|
bsd-3-clause
|
-- | Removes all packages satisfying this dependency from the index.
--
deleteDependency :: Package pkg => Dependency -> PackageIndex pkg -> PackageIndex pkg
deleteDependency (Dependency name verstionRange) =
delete name (\pkg -> packageVersion pkg `withinRange` verstionRange)
| 279
|
deleteDependency :: Package pkg => Dependency -> PackageIndex pkg -> PackageIndex pkg
deleteDependency (Dependency name verstionRange) =
delete name (\pkg -> packageVersion pkg `withinRange` verstionRange)
| 207
|
deleteDependency (Dependency name verstionRange) =
delete name (\pkg -> packageVersion pkg `withinRange` verstionRange)
| 121
| true
| true
| 0
| 8
| 38
| 68
| 34
| 34
| null | null |
phischu/fragnix
|
tests/packages/scotty/System.Posix.Terminal.hs
|
bsd-3-clause
|
-- | @getTerminalName fd@ calls @ttyname@ to obtain a name associated
-- with the terminal for @Fd@ @fd@. If @fd@ is associated
-- with a terminal, @getTerminalName@ returns the name of the
-- terminal.
getTerminalName :: Fd -> IO FilePath
getTerminalName (Fd fd) = do
s <- throwErrnoIfNull "getTerminalName" (c_ttyname fd)
peekFilePath s
| 348
|
getTerminalName :: Fd -> IO FilePath
getTerminalName (Fd fd) = do
s <- throwErrnoIfNull "getTerminalName" (c_ttyname fd)
peekFilePath s
| 139
|
getTerminalName (Fd fd) = do
s <- throwErrnoIfNull "getTerminalName" (c_ttyname fd)
peekFilePath s
| 102
| true
| true
| 0
| 10
| 62
| 55
| 27
| 28
| null | null |
castaway/pandoc
|
src/Text/Pandoc/Readers/HTML.hs
|
gpl-2.0
|
-- not "div"
t1 `closes` t2 |
t1 `elem` blockTags &&
t2 `notElem` (blockTags ++ eitherBlockOrInline) = True
| 113
|
t1 `closes` t2 |
t1 `elem` blockTags &&
t2 `notElem` (blockTags ++ eitherBlockOrInline) = True
| 100
|
t1 `closes` t2 |
t1 `elem` blockTags &&
t2 `notElem` (blockTags ++ eitherBlockOrInline) = True
| 100
| true
| false
| 0
| 10
| 23
| 44
| 24
| 20
| null | null |
gspia/reflex-dom-htmlea
|
lib/src/Reflex/Dom/HTML5/Elements/Elements.hs
|
bsd-3-clause
|
-- | A short-hand notion for @ elDynAttr \"code\" ... @
codd ∷ forall t m a. (DomBuilder t m, PostBuild t m) ⇒ Dynamic t Code → m a → m a
codd bm children = snd <$> codd' bm children
| 182
|
codd ∷ forall t m a. (DomBuilder t m, PostBuild t m) ⇒ Dynamic t Code → m a → m a
codd bm children = snd <$> codd' bm children
| 126
|
codd bm children = snd <$> codd' bm children
| 44
| true
| true
| 0
| 9
| 41
| 75
| 37
| 38
| null | null |
BartAdv/Idris-dev
|
src/Idris/Core/CaseTree.hs
|
bsd-3-clause
|
checkSameTypes _ _ = True
| 25
|
checkSameTypes _ _ = True
| 25
|
checkSameTypes _ _ = True
| 25
| false
| false
| 0
| 5
| 4
| 11
| 5
| 6
| null | null |
wiggly/functional-pokering
|
src/Poker.hs
|
mit
|
constructFullHouseHand :: [[Card]] -> [[Card]] -> Maybe PokerHand
constructFullHouseHand trips pairs = do
set <- headMay trips
pair <- headMay pairs
let (a:b:c:_) = set
(d:e:_) = pair
return (PokerHand FullHouse a b c d e)
-- Find the best 5-card poker hand based on four of a kind
--
-- PRE: quads is an array of trips found in the full set of cards
-- PRE: cards is sorted
| 389
|
constructFullHouseHand :: [[Card]] -> [[Card]] -> Maybe PokerHand
constructFullHouseHand trips pairs = do
set <- headMay trips
pair <- headMay pairs
let (a:b:c:_) = set
(d:e:_) = pair
return (PokerHand FullHouse a b c d e)
-- Find the best 5-card poker hand based on four of a kind
--
-- PRE: quads is an array of trips found in the full set of cards
-- PRE: cards is sorted
| 389
|
constructFullHouseHand trips pairs = do
set <- headMay trips
pair <- headMay pairs
let (a:b:c:_) = set
(d:e:_) = pair
return (PokerHand FullHouse a b c d e)
-- Find the best 5-card poker hand based on four of a kind
--
-- PRE: quads is an array of trips found in the full set of cards
-- PRE: cards is sorted
| 323
| false
| true
| 0
| 14
| 84
| 132
| 65
| 67
| null | null |
Paow/encore
|
src/back/CodeGen/MethodDecl.hs
|
bsd-3-clause
|
callMethodOneWay m cdecl@(A.Class {A.cname}) _ code
| A.isActive cdecl ||
A.isShared cdecl =
let retType = void
fName = methodImplOneWayName cname mName
args = formalMethodArguments cname ++ zip argTypes argNames
extractedTypeVars = map assignTypeVar (Ty.getTypeParameters cname)
fBody = Seq $ parametricMethodTypeVars : extractedTypeVars ++
Gc.ponyGcSendOneway argPairs ++ msg
in code ++ [Function retType fName args fBody]
| otherwise = code
where
mName = A.methodName m
mParams = A.methodParams m
argNames = map (AsLval . argName . A.pname) mParams
argTypes = map (translate . A.ptype) mParams
argPairs = zip (map A.ptype mParams) argNames
msg = expandMethodArgs (sendOneWayMsg cname) m
-- extract method type vars
mTypeVars = A.methodTypeParams m
parametricMethodTypeVars = Seq $ zipWith assignTypeVarMethod mTypeVars [0..]
assignTypeVarMethod ty i =
let fName = typeVarRefName ty
in Assign (Decl (Ptr ponyTypeT, AsLval fName))
(ArrAcc i encoreRuntimeType)
-- extract class type vars
assignTypeVar ty =
let fName = typeVarRefName ty
in Assign (Decl (Ptr ponyTypeT, AsLval fName)) $ getVar fName
getVar name =
(Deref $ Cast (Ptr . AsType $ classTypeName cname) thisVar)
`Dot`
name
| 1,392
|
callMethodOneWay m cdecl@(A.Class {A.cname}) _ code
| A.isActive cdecl ||
A.isShared cdecl =
let retType = void
fName = methodImplOneWayName cname mName
args = formalMethodArguments cname ++ zip argTypes argNames
extractedTypeVars = map assignTypeVar (Ty.getTypeParameters cname)
fBody = Seq $ parametricMethodTypeVars : extractedTypeVars ++
Gc.ponyGcSendOneway argPairs ++ msg
in code ++ [Function retType fName args fBody]
| otherwise = code
where
mName = A.methodName m
mParams = A.methodParams m
argNames = map (AsLval . argName . A.pname) mParams
argTypes = map (translate . A.ptype) mParams
argPairs = zip (map A.ptype mParams) argNames
msg = expandMethodArgs (sendOneWayMsg cname) m
-- extract method type vars
mTypeVars = A.methodTypeParams m
parametricMethodTypeVars = Seq $ zipWith assignTypeVarMethod mTypeVars [0..]
assignTypeVarMethod ty i =
let fName = typeVarRefName ty
in Assign (Decl (Ptr ponyTypeT, AsLval fName))
(ArrAcc i encoreRuntimeType)
-- extract class type vars
assignTypeVar ty =
let fName = typeVarRefName ty
in Assign (Decl (Ptr ponyTypeT, AsLval fName)) $ getVar fName
getVar name =
(Deref $ Cast (Ptr . AsType $ classTypeName cname) thisVar)
`Dot`
name
| 1,392
|
callMethodOneWay m cdecl@(A.Class {A.cname}) _ code
| A.isActive cdecl ||
A.isShared cdecl =
let retType = void
fName = methodImplOneWayName cname mName
args = formalMethodArguments cname ++ zip argTypes argNames
extractedTypeVars = map assignTypeVar (Ty.getTypeParameters cname)
fBody = Seq $ parametricMethodTypeVars : extractedTypeVars ++
Gc.ponyGcSendOneway argPairs ++ msg
in code ++ [Function retType fName args fBody]
| otherwise = code
where
mName = A.methodName m
mParams = A.methodParams m
argNames = map (AsLval . argName . A.pname) mParams
argTypes = map (translate . A.ptype) mParams
argPairs = zip (map A.ptype mParams) argNames
msg = expandMethodArgs (sendOneWayMsg cname) m
-- extract method type vars
mTypeVars = A.methodTypeParams m
parametricMethodTypeVars = Seq $ zipWith assignTypeVarMethod mTypeVars [0..]
assignTypeVarMethod ty i =
let fName = typeVarRefName ty
in Assign (Decl (Ptr ponyTypeT, AsLval fName))
(ArrAcc i encoreRuntimeType)
-- extract class type vars
assignTypeVar ty =
let fName = typeVarRefName ty
in Assign (Decl (Ptr ponyTypeT, AsLval fName)) $ getVar fName
getVar name =
(Deref $ Cast (Ptr . AsType $ classTypeName cname) thisVar)
`Dot`
name
| 1,392
| false
| false
| 12
| 13
| 380
| 475
| 215
| 260
| null | null |
lpeterse/koka
|
src/Kind/Assumption.hs
|
apache-2.0
|
{--------------------------------------------------------------------------
Initial kind gamma
--------------------------------------------------------------------------}
-- | The initial kind gamma contains the 'builtinTypes'.
kgammaInit :: KGamma
kgammaInit
= kgammaEmpty
| 277
|
kgammaInit :: KGamma
kgammaInit
= kgammaEmpty
| 47
|
kgammaInit
= kgammaEmpty
| 26
| true
| true
| 0
| 6
| 23
| 16
| 8
| 8
| null | null |
wuzzeb/yesod
|
yesod-core/Yesod/Core/Handler.hs
|
mit
|
-- | Set the language in the user session. Will show up in 'languages' on the
-- next request.
setLanguage :: MonadHandler m => Text -> m ()
setLanguage = setSession langKey
| 173
|
setLanguage :: MonadHandler m => Text -> m ()
setLanguage = setSession langKey
| 78
|
setLanguage = setSession langKey
| 32
| true
| true
| 0
| 8
| 31
| 32
| 16
| 16
| null | null |
wtetzner/hatemail
|
haskell/src/Parse.hs
|
gpl-3.0
|
crlf = do C8.string "\r\n"
| 26
|
crlf = do C8.string "\r\n"
| 26
|
crlf = do C8.string "\r\n"
| 26
| false
| false
| 1
| 9
| 4
| 18
| 6
| 12
| null | null |
ghcjs/jsaddle-dom
|
src/JSDOM/Generated/CanvasPath.hs
|
mit
|
-- | <https://developer.mozilla.org/en-US/docs/Web/API/CanvasPath.lineTo Mozilla CanvasPath.lineTo documentation>
lineTo ::
(MonadDOM m, IsCanvasPath self) => self -> Double -> Double -> m ()
lineTo self x y
= liftDOM
(void ((toCanvasPath self) ^. jsf "lineTo" [toJSVal x, toJSVal y]))
| 301
|
lineTo ::
(MonadDOM m, IsCanvasPath self) => self -> Double -> Double -> m ()
lineTo self x y
= liftDOM
(void ((toCanvasPath self) ^. jsf "lineTo" [toJSVal x, toJSVal y]))
| 186
|
lineTo self x y
= liftDOM
(void ((toCanvasPath self) ^. jsf "lineTo" [toJSVal x, toJSVal y]))
| 101
| true
| true
| 0
| 12
| 52
| 90
| 45
| 45
| null | null |
Javran/haptics
|
src/Trace/Haptics/Main.hs
|
bsd-3-clause
|
hooks :: [Plugin]
hooks =
[ help_plugin
, report_plugin
, markup_plugin
, sum_plugin
, combine_plugin
, map_plugin
, showtix_plugin
, overlay_plugin
, draft_plugin
, version_plugin
]
| 204
|
hooks :: [Plugin]
hooks =
[ help_plugin
, report_plugin
, markup_plugin
, sum_plugin
, combine_plugin
, map_plugin
, showtix_plugin
, overlay_plugin
, draft_plugin
, version_plugin
]
| 204
|
hooks =
[ help_plugin
, report_plugin
, markup_plugin
, sum_plugin
, combine_plugin
, map_plugin
, showtix_plugin
, overlay_plugin
, draft_plugin
, version_plugin
]
| 186
| false
| true
| 0
| 5
| 47
| 44
| 28
| 16
| null | null |
DrBoolean/wai-middleware-static
|
Network/Wai/Middleware/Static.hs
|
bsd-3-clause
|
-- This list taken from snap-core's Snap.Util.FileServe
defaultMimeTypes :: M.Map String Ascii
defaultMimeTypes = M.fromList [
( "asc" , "text/plain" ),
( "asf" , "video/x-ms-asf" ),
( "asx" , "video/x-ms-asf" ),
( "avi" , "video/x-msvideo" ),
( "bz2" , "application/x-bzip" ),
( "c" , "text/plain" ),
( "class" , "application/octet-stream" ),
( "conf" , "text/plain" ),
( "cpp" , "text/plain" ),
( "css" , "text/css" ),
( "cxx" , "text/plain" ),
( "dtd" , "text/xml" ),
( "dvi" , "application/x-dvi" ),
( "gif" , "image/gif" ),
( "gz" , "application/x-gzip" ),
( "hs" , "text/plain" ),
( "htm" , "text/html" ),
( "html" , "text/html" ),
( "jar" , "application/x-java-archive" ),
( "jpeg" , "image/jpeg" ),
( "jpg" , "image/jpeg" ),
( "js" , "text/javascript" ),
( "json" , "application/json" ),
( "log" , "text/plain" ),
( "m3u" , "audio/x-mpegurl" ),
( "mov" , "video/quicktime" ),
( "mp3" , "audio/mpeg" ),
( "mp4" , "video/mp4" ),
( "mpeg" , "video/mpeg" ),
( "mpg" , "video/mpeg" ),
( "ogg" , "application/ogg" ),
( "ogv" , "video/ogg" ),
( "pac" , "application/x-ns-proxy-autoconfig" ),
( "pdf" , "application/pdf" ),
( "png" , "image/png" ),
( "ps" , "application/postscript" ),
( "qt" , "video/quicktime" ),
( "sig" , "application/pgp-signature" ),
( "spl" , "application/futuresplash" ),
( "svg" , "image/svg+xml" ),
( "swf" , "application/x-shockwave-flash" ),
( "tar" , "application/x-tar" ),
( "tar.bz2" , "application/x-bzip-compressed-tar" ),
( "tar.gz" , "application/x-tgz" ),
( "tbz" , "application/x-bzip-compressed-tar" ),
( "text" , "text/plain" ),
( "tgz" , "application/x-tgz" ),
( "torrent" , "application/x-bittorrent" ),
( "ttf" , "application/x-font-truetype" ),
( "txt" , "text/plain" ),
( "wav" , "audio/x-wav" ),
( "wax" , "audio/x-ms-wax" ),
( "wma" , "audio/x-ms-wma" ),
( "wmv" , "video/x-ms-wmv" ),
( "xbm" , "image/x-xbitmap" ),
( "xml" , "text/xml" ),
( "xpm" , "image/x-xpixmap" ),
( "xwd" , "image/x-xwindowdump" ),
( "zip" , "application/zip" ) ]
| 3,372
|
defaultMimeTypes :: M.Map String Ascii
defaultMimeTypes = M.fromList [
( "asc" , "text/plain" ),
( "asf" , "video/x-ms-asf" ),
( "asx" , "video/x-ms-asf" ),
( "avi" , "video/x-msvideo" ),
( "bz2" , "application/x-bzip" ),
( "c" , "text/plain" ),
( "class" , "application/octet-stream" ),
( "conf" , "text/plain" ),
( "cpp" , "text/plain" ),
( "css" , "text/css" ),
( "cxx" , "text/plain" ),
( "dtd" , "text/xml" ),
( "dvi" , "application/x-dvi" ),
( "gif" , "image/gif" ),
( "gz" , "application/x-gzip" ),
( "hs" , "text/plain" ),
( "htm" , "text/html" ),
( "html" , "text/html" ),
( "jar" , "application/x-java-archive" ),
( "jpeg" , "image/jpeg" ),
( "jpg" , "image/jpeg" ),
( "js" , "text/javascript" ),
( "json" , "application/json" ),
( "log" , "text/plain" ),
( "m3u" , "audio/x-mpegurl" ),
( "mov" , "video/quicktime" ),
( "mp3" , "audio/mpeg" ),
( "mp4" , "video/mp4" ),
( "mpeg" , "video/mpeg" ),
( "mpg" , "video/mpeg" ),
( "ogg" , "application/ogg" ),
( "ogv" , "video/ogg" ),
( "pac" , "application/x-ns-proxy-autoconfig" ),
( "pdf" , "application/pdf" ),
( "png" , "image/png" ),
( "ps" , "application/postscript" ),
( "qt" , "video/quicktime" ),
( "sig" , "application/pgp-signature" ),
( "spl" , "application/futuresplash" ),
( "svg" , "image/svg+xml" ),
( "swf" , "application/x-shockwave-flash" ),
( "tar" , "application/x-tar" ),
( "tar.bz2" , "application/x-bzip-compressed-tar" ),
( "tar.gz" , "application/x-tgz" ),
( "tbz" , "application/x-bzip-compressed-tar" ),
( "text" , "text/plain" ),
( "tgz" , "application/x-tgz" ),
( "torrent" , "application/x-bittorrent" ),
( "ttf" , "application/x-font-truetype" ),
( "txt" , "text/plain" ),
( "wav" , "audio/x-wav" ),
( "wax" , "audio/x-ms-wax" ),
( "wma" , "audio/x-ms-wma" ),
( "wmv" , "video/x-ms-wmv" ),
( "xbm" , "image/x-xbitmap" ),
( "xml" , "text/xml" ),
( "xpm" , "image/x-xpixmap" ),
( "xwd" , "image/x-xwindowdump" ),
( "zip" , "application/zip" ) ]
| 3,316
|
defaultMimeTypes = M.fromList [
( "asc" , "text/plain" ),
( "asf" , "video/x-ms-asf" ),
( "asx" , "video/x-ms-asf" ),
( "avi" , "video/x-msvideo" ),
( "bz2" , "application/x-bzip" ),
( "c" , "text/plain" ),
( "class" , "application/octet-stream" ),
( "conf" , "text/plain" ),
( "cpp" , "text/plain" ),
( "css" , "text/css" ),
( "cxx" , "text/plain" ),
( "dtd" , "text/xml" ),
( "dvi" , "application/x-dvi" ),
( "gif" , "image/gif" ),
( "gz" , "application/x-gzip" ),
( "hs" , "text/plain" ),
( "htm" , "text/html" ),
( "html" , "text/html" ),
( "jar" , "application/x-java-archive" ),
( "jpeg" , "image/jpeg" ),
( "jpg" , "image/jpeg" ),
( "js" , "text/javascript" ),
( "json" , "application/json" ),
( "log" , "text/plain" ),
( "m3u" , "audio/x-mpegurl" ),
( "mov" , "video/quicktime" ),
( "mp3" , "audio/mpeg" ),
( "mp4" , "video/mp4" ),
( "mpeg" , "video/mpeg" ),
( "mpg" , "video/mpeg" ),
( "ogg" , "application/ogg" ),
( "ogv" , "video/ogg" ),
( "pac" , "application/x-ns-proxy-autoconfig" ),
( "pdf" , "application/pdf" ),
( "png" , "image/png" ),
( "ps" , "application/postscript" ),
( "qt" , "video/quicktime" ),
( "sig" , "application/pgp-signature" ),
( "spl" , "application/futuresplash" ),
( "svg" , "image/svg+xml" ),
( "swf" , "application/x-shockwave-flash" ),
( "tar" , "application/x-tar" ),
( "tar.bz2" , "application/x-bzip-compressed-tar" ),
( "tar.gz" , "application/x-tgz" ),
( "tbz" , "application/x-bzip-compressed-tar" ),
( "text" , "text/plain" ),
( "tgz" , "application/x-tgz" ),
( "torrent" , "application/x-bittorrent" ),
( "ttf" , "application/x-font-truetype" ),
( "txt" , "text/plain" ),
( "wav" , "audio/x-wav" ),
( "wax" , "audio/x-ms-wax" ),
( "wma" , "audio/x-ms-wma" ),
( "wmv" , "video/x-ms-wmv" ),
( "xbm" , "image/x-xbitmap" ),
( "xml" , "text/xml" ),
( "xpm" , "image/x-xpixmap" ),
( "xwd" , "image/x-xwindowdump" ),
( "zip" , "application/zip" ) ]
| 3,277
| true
| true
| 0
| 7
| 1,699
| 555
| 366
| 189
| null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.