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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
adarqui/ztail-tools-redis | src/ZTail/Tools/Common.hs | mit | redisHost :: String -> Redis.ConnectInfo
redisHost host =
case (splitOn ":" host) of
[] -> Redis.defaultConnectInfo { Redis.connectHost = host }
(host':[]) -> Redis.defaultConnectInfo { Redis.connectHost = host' }
(host':port':[]) -> Redis.defaultConnectInfo { Redis.connectHost = host', Redis.connectPort = (PortNumber (fromIntegral (read port' :: Int))) }
_ -> error "Invalid host specification." | 434 | redisHost :: String -> Redis.ConnectInfo
redisHost host =
case (splitOn ":" host) of
[] -> Redis.defaultConnectInfo { Redis.connectHost = host }
(host':[]) -> Redis.defaultConnectInfo { Redis.connectHost = host' }
(host':port':[]) -> Redis.defaultConnectInfo { Redis.connectHost = host', Redis.connectPort = (PortNumber (fromIntegral (read port' :: Int))) }
_ -> error "Invalid host specification." | 434 | redisHost host =
case (splitOn ":" host) of
[] -> Redis.defaultConnectInfo { Redis.connectHost = host }
(host':[]) -> Redis.defaultConnectInfo { Redis.connectHost = host' }
(host':port':[]) -> Redis.defaultConnectInfo { Redis.connectHost = host', Redis.connectPort = (PortNumber (fromIntegral (read port' :: Int))) }
_ -> error "Invalid host specification." | 393 | false | true | 7 | 12 | 86 | 151 | 79 | 72 | null | null |
erikd/hs-tls | core/Network/TLS/Context/Internal.hs | bsd-3-clause | getHState :: Context -> IO (Maybe HandshakeState)
getHState ctx = liftIO $ readMVar (ctxHandshake ctx) | 102 | getHState :: Context -> IO (Maybe HandshakeState)
getHState ctx = liftIO $ readMVar (ctxHandshake ctx) | 102 | getHState ctx = liftIO $ readMVar (ctxHandshake ctx) | 52 | false | true | 0 | 8 | 14 | 40 | 19 | 21 | null | null |
abuiles/turbinado-blog | tmp/dependencies/hslogger-1.0.6/src/System/Log/Handler/Log4jXML.hs | bsd-3-clause | log4jFileHandler :: FilePath -> Priority -> IO (GenericHandler Handle)
log4jFileHandler fp pri = do
h <- openFile fp AppendMode
sh <- log4jStreamHandler h pri
return (sh{closeFunc = hClose})
{- | Create a file log handler that uses log4j levels (see
'log4jStreamHandler'' for mappings). -} | 371 | log4jFileHandler :: FilePath -> Priority -> IO (GenericHandler Handle)
log4jFileHandler fp pri = do
h <- openFile fp AppendMode
sh <- log4jStreamHandler h pri
return (sh{closeFunc = hClose})
{- | Create a file log handler that uses log4j levels (see
'log4jStreamHandler'' for mappings). -} | 371 | log4jFileHandler fp pri = do
h <- openFile fp AppendMode
sh <- log4jStreamHandler h pri
return (sh{closeFunc = hClose})
{- | Create a file log handler that uses log4j levels (see
'log4jStreamHandler'' for mappings). -} | 300 | false | true | 0 | 10 | 125 | 75 | 36 | 39 | null | null |
martin-kolinek/stack | src/Stack/Ghci.hs | bsd-3-clause | renderScriptIntero :: [GhciPkgInfo] -> Maybe (Path Abs File) -> [Path Abs File] -> GhciScript
renderScriptIntero pkgs mainFile extraFiles =
let addPhase = mconcat $ fmap renderPkg pkgs
mainPhase = case mainFile of
Just path ->
case findOwningPackageForMain pkgs path of
Just mainPkg -> cmdCdGhc (ghciPkgDir mainPkg) <> cmdAddFile path
Nothing -> cmdAddFile path
Nothing -> mempty
modulePhase = cmdModule $ foldl' S.union S.empty (fmap ghciPkgModules pkgs)
in case getFileTargets pkgs <> extraFiles of
[] -> addPhase <> mainPhase <> modulePhase
fileTargets -> mconcat $ map cmdAddFile fileTargets
where
renderPkg pkg = cmdCdGhc (ghciPkgDir pkg)
<> cmdAdd (ghciPkgModules pkg)
-- Hacky check if module / main phase should be omitted. This should be
-- improved if / when we have a better per-component load. | 998 | renderScriptIntero :: [GhciPkgInfo] -> Maybe (Path Abs File) -> [Path Abs File] -> GhciScript
renderScriptIntero pkgs mainFile extraFiles =
let addPhase = mconcat $ fmap renderPkg pkgs
mainPhase = case mainFile of
Just path ->
case findOwningPackageForMain pkgs path of
Just mainPkg -> cmdCdGhc (ghciPkgDir mainPkg) <> cmdAddFile path
Nothing -> cmdAddFile path
Nothing -> mempty
modulePhase = cmdModule $ foldl' S.union S.empty (fmap ghciPkgModules pkgs)
in case getFileTargets pkgs <> extraFiles of
[] -> addPhase <> mainPhase <> modulePhase
fileTargets -> mconcat $ map cmdAddFile fileTargets
where
renderPkg pkg = cmdCdGhc (ghciPkgDir pkg)
<> cmdAdd (ghciPkgModules pkg)
-- Hacky check if module / main phase should be omitted. This should be
-- improved if / when we have a better per-component load. | 998 | renderScriptIntero pkgs mainFile extraFiles =
let addPhase = mconcat $ fmap renderPkg pkgs
mainPhase = case mainFile of
Just path ->
case findOwningPackageForMain pkgs path of
Just mainPkg -> cmdCdGhc (ghciPkgDir mainPkg) <> cmdAddFile path
Nothing -> cmdAddFile path
Nothing -> mempty
modulePhase = cmdModule $ foldl' S.union S.empty (fmap ghciPkgModules pkgs)
in case getFileTargets pkgs <> extraFiles of
[] -> addPhase <> mainPhase <> modulePhase
fileTargets -> mconcat $ map cmdAddFile fileTargets
where
renderPkg pkg = cmdCdGhc (ghciPkgDir pkg)
<> cmdAdd (ghciPkgModules pkg)
-- Hacky check if module / main phase should be omitted. This should be
-- improved if / when we have a better per-component load. | 904 | false | true | 1 | 18 | 315 | 246 | 117 | 129 | null | null |
Palmik/snaplet-mongodb-minimalistic | src/Snap/Snaplet/MongoDB/Core.hs | bsd-3-clause | ------------------------------------------------------------------------------
------------------------------------------------------------------------------
-- | Description text used in mongoDBInit as makeSnaplet argument.
description :: Text
description = "Minimalistic MongoDB Snaplet." | 291 | description :: Text
description = "Minimalistic MongoDB Snaplet." | 65 | description = "Minimalistic MongoDB Snaplet." | 45 | true | true | 0 | 4 | 20 | 14 | 9 | 5 | null | null |
Chouffe/hlisp | src/Evaluator.hs | bsd-3-clause | eval env (List (fun : args)) = do
func <- eval env fun
argVals <- mapM (eval env) args
apply func argVals | 117 | eval env (List (fun : args)) = do
func <- eval env fun
argVals <- mapM (eval env) args
apply func argVals | 117 | eval env (List (fun : args)) = do
func <- eval env fun
argVals <- mapM (eval env) args
apply func argVals | 117 | false | false | 0 | 10 | 33 | 62 | 28 | 34 | null | null |
frantisekfarka/ghc-dsi | compiler/llvmGen/Llvm/Types.hs | bsd-3-clause | widenFp = float2Double | 22 | widenFp = float2Double | 22 | widenFp = float2Double | 22 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
haskell-opengl/OpenGLRaw | src/Graphics/GL/Functions/F15.hs | bsd-3-clause | ptr_glListParameterivSGIX :: FunPtr (GLuint -> GLenum -> Ptr GLint -> IO ())
ptr_glListParameterivSGIX = unsafePerformIO $ getCommand "glListParameterivSGIX" | 157 | ptr_glListParameterivSGIX :: FunPtr (GLuint -> GLenum -> Ptr GLint -> IO ())
ptr_glListParameterivSGIX = unsafePerformIO $ getCommand "glListParameterivSGIX" | 157 | ptr_glListParameterivSGIX = unsafePerformIO $ getCommand "glListParameterivSGIX" | 80 | false | true | 1 | 11 | 17 | 47 | 21 | 26 | null | null |
eigengrau/haskell-ghci-pprint | src/GHC/GHCi/PPrint.hs | gpl-3.0 | unescapeToken ∷ String → String
unescapeToken token
| matchEscaped token = read $ ("\"") ⧺ token ⧺ ("\"")
| otherwise = token | 142 | unescapeToken ∷ String → String
unescapeToken token
| matchEscaped token = read $ ("\"") ⧺ token ⧺ ("\"")
| otherwise = token | 142 | unescapeToken token
| matchEscaped token = read $ ("\"") ⧺ token ⧺ ("\"")
| otherwise = token | 110 | false | true | 0 | 9 | 38 | 54 | 26 | 28 | null | null |
brendanhay/gogol | gogol-drive/gen/Network/Google/Drive/Types/Product.hs | mpl-2.0 | -- | Whether the account associated with this permission has been deleted.
-- This field only pertains to user and group permissions.
pDeleted :: Lens' Permission (Maybe Bool)
pDeleted = lens _pDeleted (\ s a -> s{_pDeleted = a}) | 229 | pDeleted :: Lens' Permission (Maybe Bool)
pDeleted = lens _pDeleted (\ s a -> s{_pDeleted = a}) | 95 | pDeleted = lens _pDeleted (\ s a -> s{_pDeleted = a}) | 53 | true | true | 0 | 9 | 38 | 47 | 26 | 21 | null | null |
taojang/haskell-programming-book-exercise | src/ch15/Chapter15.hs | bsd-3-clause | semigrpAssocLaw :: (Semigroup a, Eq a) => a -> a -> a -> Bool
semigrpAssocLaw x y z = (x <> y) <> z == x <> (y <> z) | 116 | semigrpAssocLaw :: (Semigroup a, Eq a) => a -> a -> a -> Bool
semigrpAssocLaw x y z = (x <> y) <> z == x <> (y <> z) | 116 | semigrpAssocLaw x y z = (x <> y) <> z == x <> (y <> z) | 54 | false | true | 2 | 10 | 29 | 78 | 38 | 40 | null | null |
arijitkar98/al-go-rithms | sort/insertion_sort/haskell/InsertionSortTest.hs | mit | test :: ([Int] -> [Int]) -> IO ()
test f = if f list == sort list
then putStrLn "List sorted correctly"
else putStrLn "Error: List did not sort correctly"
where list = [12,3,55,1,2,7,4] | 195 | test :: ([Int] -> [Int]) -> IO ()
test f = if f list == sort list
then putStrLn "List sorted correctly"
else putStrLn "Error: List did not sort correctly"
where list = [12,3,55,1,2,7,4] | 195 | test f = if f list == sort list
then putStrLn "List sorted correctly"
else putStrLn "Error: List did not sort correctly"
where list = [12,3,55,1,2,7,4] | 161 | false | true | 1 | 9 | 43 | 96 | 49 | 47 | null | null |
ledyba/hs-java | JVM/Builder/Instructions.hs | lgpl-3.0 | dup2_x1 :: Generator e g => g e ()
dup2_x1 = i0 DUP2_X1 | 55 | dup2_x1 :: Generator e g => g e ()
dup2_x1 = i0 DUP2_X1 | 55 | dup2_x1 = i0 DUP2_X1 | 20 | false | true | 0 | 7 | 12 | 30 | 14 | 16 | null | null |
termite2/tsl | Internal/IExpr.hs | bsd-3-clause | isConstLExpr (EIndex a i) = isConstLExpr a && isConstExpr i | 59 | isConstLExpr (EIndex a i) = isConstLExpr a && isConstExpr i | 59 | isConstLExpr (EIndex a i) = isConstLExpr a && isConstExpr i | 59 | false | false | 0 | 6 | 9 | 28 | 12 | 16 | null | null |
fredmorcos/attic | projects/pet/archive/pet_haskell_20131204_1/Extras/List.hs | isc | anyIsPrefixOf :: Eq a => [[a]] -> [a] -> Bool
anyIsPrefixOf p t = any (`isPrefixOf` t) p | 88 | anyIsPrefixOf :: Eq a => [[a]] -> [a] -> Bool
anyIsPrefixOf p t = any (`isPrefixOf` t) p | 88 | anyIsPrefixOf p t = any (`isPrefixOf` t) p | 42 | false | true | 0 | 8 | 17 | 51 | 28 | 23 | null | null |
kazu-yamamoto/wai | wai-extra/Network/Wai/Test.hs | mit | assertString :: HasCallStack => String -> Session ()
assertString s = unless (null s) $ assertFailure s | 103 | assertString :: HasCallStack => String -> Session ()
assertString s = unless (null s) $ assertFailure s | 103 | assertString s = unless (null s) $ assertFailure s | 50 | false | true | 0 | 8 | 16 | 44 | 20 | 24 | null | null |
ku-fpg/kansas-amber | System/Hardware/Haskino/Compiler.hs | bsd-3-clause | compileProcedure (IterateI8FloatE br iv bf) = do
b <- nextBind
let bb = RemBindI b
i <- nextBind
let bi = RemBindI8 i
j <- nextBind
let bj = RemBindFloat j
_ <- compileIterateProcedure Int8Type FloatType b bb br i bi j bj iv bf
return bj | 269 | compileProcedure (IterateI8FloatE br iv bf) = do
b <- nextBind
let bb = RemBindI b
i <- nextBind
let bi = RemBindI8 i
j <- nextBind
let bj = RemBindFloat j
_ <- compileIterateProcedure Int8Type FloatType b bb br i bi j bj iv bf
return bj | 269 | compileProcedure (IterateI8FloatE br iv bf) = do
b <- nextBind
let bb = RemBindI b
i <- nextBind
let bi = RemBindI8 i
j <- nextBind
let bj = RemBindFloat j
_ <- compileIterateProcedure Int8Type FloatType b bb br i bi j bj iv bf
return bj | 269 | false | false | 0 | 10 | 78 | 112 | 49 | 63 | null | null |
beni55/hermit | src/HERMIT/Dictionary/Reasoning.hs | bsd-2-clause | retraction :: Maybe (RewriteH LCore) -> CoreString -> CoreString -> BiRewriteH CoreExpr
retraction mr = parse2beforeBiR (retractionBR (extractR <$> mr)) | 152 | retraction :: Maybe (RewriteH LCore) -> CoreString -> CoreString -> BiRewriteH CoreExpr
retraction mr = parse2beforeBiR (retractionBR (extractR <$> mr)) | 152 | retraction mr = parse2beforeBiR (retractionBR (extractR <$> mr)) | 64 | false | true | 4 | 9 | 19 | 58 | 26 | 32 | null | null |
prikhi/hkredmine | bin/Main/Actions.hs | gpl-3.0 | -- | Print A 'Version' and it's Issues.
printVersion :: VersionId -> IssueFilter -> Redmine ()
printVersion v f = do
version <- getVersion v
issues <- getVersionsIssues version f
width <- liftIO getWidth
liftIO $ putStrLn (versionDetail version) >> putStrLn "" >>
putStrLn "Issues:" >> putStrLn (issuesTable width issues)
-- | Print a table showing all 'Versions' of a 'Project'. | 463 | printVersion :: VersionId -> IssueFilter -> Redmine ()
printVersion v f = do
version <- getVersion v
issues <- getVersionsIssues version f
width <- liftIO getWidth
liftIO $ putStrLn (versionDetail version) >> putStrLn "" >>
putStrLn "Issues:" >> putStrLn (issuesTable width issues)
-- | Print a table showing all 'Versions' of a 'Project'. | 423 | printVersion v f = do
version <- getVersion v
issues <- getVersionsIssues version f
width <- liftIO getWidth
liftIO $ putStrLn (versionDetail version) >> putStrLn "" >>
putStrLn "Issues:" >> putStrLn (issuesTable width issues)
-- | Print a table showing all 'Versions' of a 'Project'. | 368 | true | true | 0 | 13 | 144 | 108 | 49 | 59 | null | null |
sdiehl/ghc | libraries/base/Control/Monad.hs | bsd-3-clause | -- Inline so that fusion with zipWith and sequenceA have a chance to fire
-- See Note [Fusion for zipN/zipWithN] in List.hs]
zipWithM_ f xs ys = sequenceA_ (zipWith f xs ys) | 174 | zipWithM_ f xs ys = sequenceA_ (zipWith f xs ys) | 49 | zipWithM_ f xs ys = sequenceA_ (zipWith f xs ys) | 49 | true | false | 0 | 7 | 32 | 28 | 14 | 14 | null | null |
cblp/hindent | src/HIndent/Pretty.hs | bsd-3-clause | flattenOpChain e = [OpChainExp e] | 33 | flattenOpChain e = [OpChainExp e] | 33 | flattenOpChain e = [OpChainExp e] | 33 | false | false | 0 | 6 | 4 | 15 | 7 | 8 | null | null |
HJvT/hdirect | src/Parser.hs | bsd-3-clause | action_300 x = happyTcHack x happyFail | 38 | action_300 x = happyTcHack x happyFail | 38 | action_300 x = happyTcHack x happyFail | 38 | false | false | 0 | 5 | 5 | 14 | 6 | 8 | null | null |
michalkonecny/aern2 | aern2-fun-univariate/src/AERN2/Local/Frac.hs | bsd-3-clause | intify :: ChPoly MPBall -> (ErrorBound, Poly Integer)
intify (ChPoly _ p _ _) =
(err, pInt)
where
termsRational = terms_map (rational . ball_value) (poly_terms p)
err = termsError * termsDenominator
termsError = ball_error $ terms_lookupCoeff (poly_terms p) 0
termsDenominator = Map.foldl' lcm 1 $ terms_map denominator termsRational
pInt = Poly $ terms_map (numerator . (* termsDenominator)) termsRational | 420 | intify :: ChPoly MPBall -> (ErrorBound, Poly Integer)
intify (ChPoly _ p _ _) =
(err, pInt)
where
termsRational = terms_map (rational . ball_value) (poly_terms p)
err = termsError * termsDenominator
termsError = ball_error $ terms_lookupCoeff (poly_terms p) 0
termsDenominator = Map.foldl' lcm 1 $ terms_map denominator termsRational
pInt = Poly $ terms_map (numerator . (* termsDenominator)) termsRational | 420 | intify (ChPoly _ p _ _) =
(err, pInt)
where
termsRational = terms_map (rational . ball_value) (poly_terms p)
err = termsError * termsDenominator
termsError = ball_error $ terms_lookupCoeff (poly_terms p) 0
termsDenominator = Map.foldl' lcm 1 $ terms_map denominator termsRational
pInt = Poly $ terms_map (numerator . (* termsDenominator)) termsRational | 366 | false | true | 10 | 9 | 71 | 174 | 78 | 96 | null | null |
froozen/kademlia | test/Test.hs | bsd-3-clause | quickCheckTests = testGroup "QuickCheck" [
typeChecks
, protocolChecks
, networkingChecks
, treeChecks
, instanceChecks
, replyQueueChecks
, implementationChecks
] | 197 | quickCheckTests = testGroup "QuickCheck" [
typeChecks
, protocolChecks
, networkingChecks
, treeChecks
, instanceChecks
, replyQueueChecks
, implementationChecks
] | 197 | quickCheckTests = testGroup "QuickCheck" [
typeChecks
, protocolChecks
, networkingChecks
, treeChecks
, instanceChecks
, replyQueueChecks
, implementationChecks
] | 197 | false | false | 0 | 6 | 52 | 32 | 19 | 13 | null | null |
input-output-hk/pos-haskell-prototype | client/src/Pos/Client/KeyStorage.hs | mit | deleteSecretKeyBy :: MonadKeys m => (EncryptedSecretKey -> Bool) -> m ()
deleteSecretKeyBy predicate = modifySecret (usKeys %~ filter (not . predicate)) | 152 | deleteSecretKeyBy :: MonadKeys m => (EncryptedSecretKey -> Bool) -> m ()
deleteSecretKeyBy predicate = modifySecret (usKeys %~ filter (not . predicate)) | 152 | deleteSecretKeyBy predicate = modifySecret (usKeys %~ filter (not . predicate)) | 79 | false | true | 0 | 10 | 20 | 57 | 28 | 29 | null | null |
VELVETDETH/MiniAcc | AST/SymbolTable.hs | apache-2.0 | topSymbol :: SymbolTable -> String
topSymbol symTable = last $ nameList symTable | 80 | topSymbol :: SymbolTable -> String
topSymbol symTable = last $ nameList symTable | 80 | topSymbol symTable = last $ nameList symTable | 45 | false | true | 2 | 7 | 11 | 32 | 13 | 19 | null | null |
AlexanderPankiv/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | wordTyConKey = mkPreludeTyConUnique 59 | 65 | wordTyConKey = mkPreludeTyConUnique 59 | 65 | wordTyConKey = mkPreludeTyConUnique 59 | 65 | false | false | 0 | 5 | 30 | 9 | 4 | 5 | null | null |
UCSD-PL/RefScript | src/Language/Rsc/Typecheck/Types.hs | bsd-3-clause | rTypeR (TOr _ r ) = r | 23 | rTypeR (TOr _ r ) = r | 23 | rTypeR (TOr _ r ) = r | 23 | false | false | 0 | 7 | 8 | 17 | 8 | 9 | null | null |
haroldcarr/learn-haskell-coq-ml-etc | foundations/book/2002-TAPL-2005-ATAPL/tapl/src/Ch10_Simply_Typed_Lambda_Calculus.hs | unlicense | getTypeFromContext :: Context -> Int -> Either Text Ty
getTypeFromContext ctx idx = getBinding ctx idx >>= go
where go = \case VarBind ty -> Right ty; x -> Left $ show idx <> " wrong binding " <> show x | 203 | getTypeFromContext :: Context -> Int -> Either Text Ty
getTypeFromContext ctx idx = getBinding ctx idx >>= go
where go = \case VarBind ty -> Right ty; x -> Left $ show idx <> " wrong binding " <> show x | 203 | getTypeFromContext ctx idx = getBinding ctx idx >>= go
where go = \case VarBind ty -> Right ty; x -> Left $ show idx <> " wrong binding " <> show x | 148 | false | true | 1 | 12 | 41 | 93 | 41 | 52 | null | null |
artuuge/IHaskell | src/IHaskell/Convert/Args.hs | mit | mergeArg unexpectedArg _ = error $ "IHaskell.Convert.mergeArg: impossible argument: "
++ show unexpectedArg | 142 | mergeArg unexpectedArg _ = error $ "IHaskell.Convert.mergeArg: impossible argument: "
++ show unexpectedArg | 142 | mergeArg unexpectedArg _ = error $ "IHaskell.Convert.mergeArg: impossible argument: "
++ show unexpectedArg | 142 | false | false | 0 | 6 | 47 | 22 | 10 | 12 | null | null |
olorin/amazonka | amazonka-iam/test/Test/AWS/Gen/IAM.hs | mpl-2.0 | testAttachUserPolicyResponse :: AttachUserPolicyResponse -> TestTree
testAttachUserPolicyResponse = res
"AttachUserPolicyResponse"
"fixture/AttachUserPolicyResponse.proto"
iAM
(Proxy :: Proxy AttachUserPolicy) | 225 | testAttachUserPolicyResponse :: AttachUserPolicyResponse -> TestTree
testAttachUserPolicyResponse = res
"AttachUserPolicyResponse"
"fixture/AttachUserPolicyResponse.proto"
iAM
(Proxy :: Proxy AttachUserPolicy) | 225 | testAttachUserPolicyResponse = res
"AttachUserPolicyResponse"
"fixture/AttachUserPolicyResponse.proto"
iAM
(Proxy :: Proxy AttachUserPolicy) | 156 | false | true | 0 | 6 | 30 | 36 | 17 | 19 | null | null |
neale/CS-program | 581-FunctionalProgramming/week6/Church.hs | unlicense | -- | λt.t(λxy.y)
snd :: Exp
snd = Abs (App (Ref 0) false) | 57 | snd :: Exp
snd = Abs (App (Ref 0) false) | 40 | snd = Abs (App (Ref 0) false) | 29 | true | true | 0 | 8 | 12 | 35 | 16 | 19 | null | null |
brendanhay/gogol | gogol-slides/gen/Network/Google/Slides/Types/Product.hs | mpl-2.0 | -- | The hyperlink destination of the line. If unset, there is no link.
lpLink :: Lens' LineProperties (Maybe Link)
lpLink = lens _lpLink (\ s a -> s{_lpLink = a}) | 163 | lpLink :: Lens' LineProperties (Maybe Link)
lpLink = lens _lpLink (\ s a -> s{_lpLink = a}) | 91 | lpLink = lens _lpLink (\ s a -> s{_lpLink = a}) | 47 | true | true | 0 | 9 | 30 | 46 | 25 | 21 | null | null |
lukexi/ghc-7.8-arm64 | compiler/main/DynFlags.hs | bsd-3-clause | wayDesc WayDebug = "Debug" | 29 | wayDesc WayDebug = "Debug" | 29 | wayDesc WayDebug = "Debug" | 29 | false | false | 0 | 4 | 6 | 10 | 4 | 6 | null | null |
tel/haskell-maia | maia-serialization/src/Maia/Serialization.hs | mpl-2.0 | mapSectionSource ::
Functor f =>
(x -> a) -> (a -> x) ->
(Section f b a -> Section f b x)
mapSectionSource xa ax s =
Section
(inject s . xa)
(fmap ax . retract s) | 174 | mapSectionSource ::
Functor f =>
(x -> a) -> (a -> x) ->
(Section f b a -> Section f b x)
mapSectionSource xa ax s =
Section
(inject s . xa)
(fmap ax . retract s) | 174 | mapSectionSource xa ax s =
Section
(inject s . xa)
(fmap ax . retract s) | 78 | false | true | 0 | 10 | 48 | 97 | 47 | 50 | null | null |
Concomitant/LambdaHack | Game/LambdaHack/Common/Tile.hs | bsd-3-clause | isClear Kind.Ops{ospeedup = Just TileSpeedup{isClearTab}} = accessTab isClearTab | 80 | isClear Kind.Ops{ospeedup = Just TileSpeedup{isClearTab}} = accessTab isClearTab | 80 | isClear Kind.Ops{ospeedup = Just TileSpeedup{isClearTab}} = accessTab isClearTab | 80 | false | false | 0 | 11 | 7 | 32 | 15 | 17 | null | null |
jml/hazard | lib/Hazard/Users.hs | apache-2.0 | getUserID :: User -> UserID
getUserID = _userID | 47 | getUserID :: User -> UserID
getUserID = _userID | 47 | getUserID = _userID | 19 | false | true | 0 | 7 | 7 | 22 | 9 | 13 | null | null |
kyren/hstecs | library/Tecs/Definitions.hs | unlicense | jumpDesc JumpEQ = ("JEQ", 0x2) | 30 | jumpDesc JumpEQ = ("JEQ", 0x2) | 30 | jumpDesc JumpEQ = ("JEQ", 0x2) | 30 | false | false | 0 | 5 | 4 | 15 | 8 | 7 | null | null |
jb55/bson-lens | src/Data/Bson/Lens.hs | mit | -- |
-- A traversal for a specific Document 'Field'.
-- This is similar to 'key' except it can target labels as well as values
--
-- >>> ["someKey" := Float 3.0] & field "someKey"._Label .~ "someOtherKey"
-- [ someOtherKey: 3.0 ]
field :: AsDocument t => Label -> Traversal' t Field
field k = _Document._IndexedDocument.ix k | 324 | field :: AsDocument t => Label -> Traversal' t Field
field k = _Document._IndexedDocument.ix k | 94 | field k = _Document._IndexedDocument.ix k | 41 | true | true | 1 | 8 | 56 | 51 | 25 | 26 | null | null |
CulpaBS/wbBach | src/Language/Futhark/Renamer.hs | bsd-3-clause | bind :: (Eq f, Hashable f) => [IdentBase x f] -> RenameM f t a -> RenameM f t a
bind = bindNames . map identName | 112 | bind :: (Eq f, Hashable f) => [IdentBase x f] -> RenameM f t a -> RenameM f t a
bind = bindNames . map identName | 112 | bind = bindNames . map identName | 32 | false | true | 0 | 8 | 25 | 63 | 31 | 32 | null | null |
rgaiacs/pandoc | src/Text/Pandoc/Readers/LaTeX.hs | gpl-2.0 | inBrackets :: Inlines -> Inlines
inBrackets x = (str "[") <> x <> (str "]") | 75 | inBrackets :: Inlines -> Inlines
inBrackets x = (str "[") <> x <> (str "]") | 75 | inBrackets x = (str "[") <> x <> (str "]") | 42 | false | true | 0 | 8 | 14 | 38 | 19 | 19 | null | null |
TomMD/ghc | compiler/types/InstEnv.hs | bsd-3-clause | instanceSig :: ClsInst -> ([TyVar], [Type], Class, [Type])
-- Decomposes the DFunId
instanceSig ispec = tcSplitDFunTy (idType (is_dfun ispec)) | 142 | instanceSig :: ClsInst -> ([TyVar], [Type], Class, [Type])
instanceSig ispec = tcSplitDFunTy (idType (is_dfun ispec)) | 117 | instanceSig ispec = tcSplitDFunTy (idType (is_dfun ispec)) | 58 | true | true | 0 | 9 | 18 | 55 | 31 | 24 | null | null |
ekmett/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxTEXT_ATTR_FONT_FAMILY :: Int
wxTEXT_ATTR_FONT_FAMILY = 0x04000000 | 85 | wxTEXT_ATTR_FONT_FAMILY :: Int
wxTEXT_ATTR_FONT_FAMILY = 0x04000000 | 85 | wxTEXT_ATTR_FONT_FAMILY = 0x04000000 | 45 | false | true | 0 | 6 | 23 | 18 | 7 | 11 | null | null |
CloudI/CloudI | src/api/haskell/external/zlib-0.6.2.1/test/Test.hs | mit | main :: IO ()
main = defaultMain $
testGroup "zlib tests" [
testGroup "property tests" [
testProperty "decompress . compress = id (standard)" prop_decompress_after_compress,
testProperty "decompress . compress = id (Zlib -> GZipOrZLib)" prop_gziporzlib1,
testProperty "decompress . compress = id (GZip -> GZipOrZlib)" prop_gziporzlib2,
testProperty "concatenated gzip members" prop_gzip_concat,
testProperty "multiple gzip members, boundaries (all 2-chunks)" prop_multiple_members_boundary2,
testProperty "multiple gzip members, boundaries (all 3-chunks)" prop_multiple_members_boundary3,
testProperty "prefixes of valid stream detected as truncated" prop_truncated
],
testGroup "unit tests" [
testCase "simple gzip case" test_simple_gzip,
testCase "detect bad crc" test_bad_crc,
testCase "detect non-gzip" test_non_gzip,
testCase "detect custom dictionary" test_custom_dict,
testCase "dectect inflate with wrong dict" test_wrong_dictionary,
testCase "dectect inflate with right dict" test_right_dictionary,
testCase "handle trailing data" test_trailing_data,
testCase "multiple gzip members" test_multiple_members,
testCase "check small input chunks" test_small_chunks,
testCase "check empty input" test_empty,
testCase "check exception raised" test_exception
]
] | 1,481 | main :: IO ()
main = defaultMain $
testGroup "zlib tests" [
testGroup "property tests" [
testProperty "decompress . compress = id (standard)" prop_decompress_after_compress,
testProperty "decompress . compress = id (Zlib -> GZipOrZLib)" prop_gziporzlib1,
testProperty "decompress . compress = id (GZip -> GZipOrZlib)" prop_gziporzlib2,
testProperty "concatenated gzip members" prop_gzip_concat,
testProperty "multiple gzip members, boundaries (all 2-chunks)" prop_multiple_members_boundary2,
testProperty "multiple gzip members, boundaries (all 3-chunks)" prop_multiple_members_boundary3,
testProperty "prefixes of valid stream detected as truncated" prop_truncated
],
testGroup "unit tests" [
testCase "simple gzip case" test_simple_gzip,
testCase "detect bad crc" test_bad_crc,
testCase "detect non-gzip" test_non_gzip,
testCase "detect custom dictionary" test_custom_dict,
testCase "dectect inflate with wrong dict" test_wrong_dictionary,
testCase "dectect inflate with right dict" test_right_dictionary,
testCase "handle trailing data" test_trailing_data,
testCase "multiple gzip members" test_multiple_members,
testCase "check small input chunks" test_small_chunks,
testCase "check empty input" test_empty,
testCase "check exception raised" test_exception
]
] | 1,481 | main = defaultMain $
testGroup "zlib tests" [
testGroup "property tests" [
testProperty "decompress . compress = id (standard)" prop_decompress_after_compress,
testProperty "decompress . compress = id (Zlib -> GZipOrZLib)" prop_gziporzlib1,
testProperty "decompress . compress = id (GZip -> GZipOrZlib)" prop_gziporzlib2,
testProperty "concatenated gzip members" prop_gzip_concat,
testProperty "multiple gzip members, boundaries (all 2-chunks)" prop_multiple_members_boundary2,
testProperty "multiple gzip members, boundaries (all 3-chunks)" prop_multiple_members_boundary3,
testProperty "prefixes of valid stream detected as truncated" prop_truncated
],
testGroup "unit tests" [
testCase "simple gzip case" test_simple_gzip,
testCase "detect bad crc" test_bad_crc,
testCase "detect non-gzip" test_non_gzip,
testCase "detect custom dictionary" test_custom_dict,
testCase "dectect inflate with wrong dict" test_wrong_dictionary,
testCase "dectect inflate with right dict" test_right_dictionary,
testCase "handle trailing data" test_trailing_data,
testCase "multiple gzip members" test_multiple_members,
testCase "check small input chunks" test_small_chunks,
testCase "check empty input" test_empty,
testCase "check exception raised" test_exception
]
] | 1,467 | false | true | 2 | 9 | 356 | 192 | 93 | 99 | null | null |
rahulmutt/codec-jvm | src/Codec/JVM/Opcode.hs | apache-2.0 | -- return
getstatic = Opcode 0xb2 | 33 | getstatic = Opcode 0xb2 | 23 | getstatic = Opcode 0xb2 | 23 | true | false | 0 | 5 | 5 | 10 | 5 | 5 | null | null |
danstiner/transpiler | test/Batch/LexerTests.hs | mit | prop_empty :: Property.Result
prop_empty = assertLex "" [] | 58 | prop_empty :: Property.Result
prop_empty = assertLex "" [] | 58 | prop_empty = assertLex "" [] | 28 | false | true | 0 | 6 | 7 | 20 | 10 | 10 | null | null |
seckcoder/vector | Data/Vector/Storable.hs | bsd-3-clause | unsafeToForeignPtr0 (Vector n fp) = (fp, n) | 43 | unsafeToForeignPtr0 (Vector n fp) = (fp, n) | 43 | unsafeToForeignPtr0 (Vector n fp) = (fp, n) | 43 | false | false | 0 | 6 | 6 | 24 | 12 | 12 | null | null |
DavidAlphaFox/ghc | libraries/transformers/Control/Monad/Trans/Cont.hs | bsd-3-clause | -- | @'shiftT' f@ captures the continuation up to the nearest enclosing
-- 'resetT' and passes it to @f@:
--
-- * @'resetT' ('shiftT' f >>= k) = 'resetT' (f ('evalContT' . k))@
--
shiftT :: (Monad m) => ((a -> m r) -> ContT r m r) -> ContT r m a
shiftT f = ContT (evalContT . f) | 278 | shiftT :: (Monad m) => ((a -> m r) -> ContT r m r) -> ContT r m a
shiftT f = ContT (evalContT . f) | 98 | shiftT f = ContT (evalContT . f) | 32 | true | true | 0 | 11 | 59 | 76 | 40 | 36 | null | null |
AndrewRademacher/wai | warp/Network/Wai/Handler/Warp/HTTP2/EncodeFrame.hs | mit | pingFrame :: ByteString -> ByteString
pingFrame bs = encodeFrame einfo $ PingFrame bs
where
einfo = encodeInfo setAck 0 | 125 | pingFrame :: ByteString -> ByteString
pingFrame bs = encodeFrame einfo $ PingFrame bs
where
einfo = encodeInfo setAck 0 | 125 | pingFrame bs = encodeFrame einfo $ PingFrame bs
where
einfo = encodeInfo setAck 0 | 87 | false | true | 0 | 6 | 24 | 41 | 19 | 22 | null | null |
tkonolige/haskell-bplist | test/properties.hs | bsd-3-clause | prop_encode_decode x = (decodePList' $ encodePList x) `equal` x | 63 | prop_encode_decode x = (decodePList' $ encodePList x) `equal` x | 63 | prop_encode_decode x = (decodePList' $ encodePList x) `equal` x | 63 | false | false | 0 | 8 | 8 | 25 | 13 | 12 | null | null |
cliffano/swaggy-jenkins | clients/haskell-http-client/generated/lib/SwaggyJenkins/Core.hs | mit | -- | Collapse (Just "") to Nothing
_emptyToNothing :: Maybe String -> Maybe String
_emptyToNothing (Just "") = Nothing | 118 | _emptyToNothing :: Maybe String -> Maybe String
_emptyToNothing (Just "") = Nothing | 83 | _emptyToNothing (Just "") = Nothing | 35 | true | true | 0 | 7 | 18 | 31 | 15 | 16 | null | null |
rasendubi/arachne | src/Network/MQTT/Encoder.hs | bsd-3-clause | returnCodeValue BadUserNameOrPassword = 4 | 41 | returnCodeValue BadUserNameOrPassword = 4 | 41 | returnCodeValue BadUserNameOrPassword = 4 | 41 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
brendanhay/gogol | gogol-youtube/gen/Network/Google/YouTube/Types/Product.hs | mpl-2.0 | -- | The snippet object contains basic details about the activity, including
-- the activity\'s type and group ID.
aSnippet :: Lens' Activity (Maybe ActivitySnippet)
aSnippet = lens _aSnippet (\ s a -> s{_aSnippet = a}) | 219 | aSnippet :: Lens' Activity (Maybe ActivitySnippet)
aSnippet = lens _aSnippet (\ s a -> s{_aSnippet = a}) | 104 | aSnippet = lens _aSnippet (\ s a -> s{_aSnippet = a}) | 53 | true | true | 0 | 9 | 35 | 47 | 26 | 21 | null | null |
nevrenato/Hets_Fork | Syntax/Print_AS_Structured.hs | gpl-2.0 | condBracesWithin :: Annoted SPEC -> Doc
condBracesWithin s = let d = pretty s in
case skip_Group $ item s of
Extension _ _ -> specBraces d
Union _ _ -> specBraces d
_ -> d
{- |
only Extensions inside of Unions (and) need grouping braces
-} | 296 | condBracesWithin :: Annoted SPEC -> Doc
condBracesWithin s = let d = pretty s in
case skip_Group $ item s of
Extension _ _ -> specBraces d
Union _ _ -> specBraces d
_ -> d
{- |
only Extensions inside of Unions (and) need grouping braces
-} | 296 | condBracesWithin s = let d = pretty s in
case skip_Group $ item s of
Extension _ _ -> specBraces d
Union _ _ -> specBraces d
_ -> d
{- |
only Extensions inside of Unions (and) need grouping braces
-} | 256 | false | true | 0 | 10 | 104 | 87 | 38 | 49 | null | null |
MichaelXavier/Bucketeer | Bucketeer/Testing/WebServer.hs | bsd-2-clause | cns :: Consumer
cns = Consumer "summer" | 39 | cns :: Consumer
cns = Consumer "summer" | 39 | cns = Consumer "summer" | 23 | false | true | 0 | 5 | 6 | 14 | 7 | 7 | null | null |
fffej/HS-Poker | LookupPatternMatch.hs | bsd-3-clause | getValueFromProduct 2886689 = 4967 | 34 | getValueFromProduct 2886689 = 4967 | 34 | getValueFromProduct 2886689 = 4967 | 34 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
stepcut/plugins | src/System/Plugins/Env.hs | lgpl-2.1 | --
-- | Unrecord a module from the environment.
--
rmModuleDeps :: Module -> IO ()
rmModuleDeps m = modifyDepEnv env $ \fm -> return $ delFromFM fm m | 149 | rmModuleDeps :: Module -> IO ()
rmModuleDeps m = modifyDepEnv env $ \fm -> return $ delFromFM fm m | 98 | rmModuleDeps m = modifyDepEnv env $ \fm -> return $ delFromFM fm m | 66 | true | true | 0 | 8 | 28 | 51 | 25 | 26 | null | null |
NickAger/LearningHaskell | HaskellProgrammingFromFirstPrinciples/Chapter7.hsproj/Chapter7.hs | mit | ifEvenAdd2 n =
case even n of
True -> n+2
False -> n | 64 | ifEvenAdd2 n =
case even n of
True -> n+2
False -> n | 64 | ifEvenAdd2 n =
case even n of
True -> n+2
False -> n | 64 | false | false | 1 | 8 | 24 | 36 | 15 | 21 | null | null |
danielqo/PiAlgorithms | haskell/PiEstimator.hs | mit | sqRadius = radius^2 | 19 | sqRadius = radius^2 | 19 | sqRadius = radius^2 | 19 | false | false | 0 | 5 | 2 | 10 | 5 | 5 | null | null |
liyanchang/scheme-in-haskell | src/chp4.hs | mit | unwordsList :: [LispVal] -> String
unwordsList = unwords . map showVal | 70 | unwordsList :: [LispVal] -> String
unwordsList = unwords . map showVal | 70 | unwordsList = unwords . map showVal | 35 | false | true | 0 | 6 | 10 | 25 | 13 | 12 | null | null |
Ferdinand-vW/HHDFS | src/DataNode.hs | isc | writeIOChan :: DataNode -> Process () -> STM ()
writeIOChan DataNode{..} = writeTChan procChan | 94 | writeIOChan :: DataNode -> Process () -> STM ()
writeIOChan DataNode{..} = writeTChan procChan | 94 | writeIOChan DataNode{..} = writeTChan procChan | 46 | false | true | 1 | 8 | 13 | 49 | 21 | 28 | null | null |
takano-akio/ordrea | FRP/Ordrea/Base.hs | cc0-1.0 | test_dropStepE = do
r <- networkToListGC 3 $ do
strB <- behaviorFromList ["foo", "", "baz"]
lenE <- dropStepE $ behaviorToEvent strB
return $ eventToBehavior $ lenE `mappend` lenE
r @?= ["", "", "bazbaz"] | 220 | test_dropStepE = do
r <- networkToListGC 3 $ do
strB <- behaviorFromList ["foo", "", "baz"]
lenE <- dropStepE $ behaviorToEvent strB
return $ eventToBehavior $ lenE `mappend` lenE
r @?= ["", "", "bazbaz"] | 220 | test_dropStepE = do
r <- networkToListGC 3 $ do
strB <- behaviorFromList ["foo", "", "baz"]
lenE <- dropStepE $ behaviorToEvent strB
return $ eventToBehavior $ lenE `mappend` lenE
r @?= ["", "", "bazbaz"] | 220 | false | false | 0 | 13 | 48 | 86 | 43 | 43 | null | null |
abakst/liquidhaskell | tests/neg/poly2-degenerate.hs | bsd-3-clause | ----------------------------------------------------------
myid3 x y = y | 74 | myid3 x y = y | 14 | myid3 x y = y | 14 | true | false | 0 | 4 | 7 | 13 | 6 | 7 | null | null |
icidasset/shikensu | src/Shikensu/Internal/Utilities.hs | mit | {-| Path to parent, when there is one.
> Just "../" or Nothing
-}
compileParentPath :: FilePath -> Maybe FilePath
compileParentPath dirname =
case dirname of
"" -> Nothing
_ -> Just $ addTrailingPathSeparator ".."
{-| Path to root.
Example, if `dirname` is 'example/subdir',
then this will be `../../`.
If the `dirname` is empty,
then this will be empty as well.
-} | 393 | compileParentPath :: FilePath -> Maybe FilePath
compileParentPath dirname =
case dirname of
"" -> Nothing
_ -> Just $ addTrailingPathSeparator ".."
{-| Path to root.
Example, if `dirname` is 'example/subdir',
then this will be `../../`.
If the `dirname` is empty,
then this will be empty as well.
-} | 325 | compileParentPath dirname =
case dirname of
"" -> Nothing
_ -> Just $ addTrailingPathSeparator ".."
{-| Path to root.
Example, if `dirname` is 'example/subdir',
then this will be `../../`.
If the `dirname` is empty,
then this will be empty as well.
-} | 277 | true | true | 0 | 9 | 89 | 46 | 23 | 23 | null | null |
razvan9310/barrelfish | hake/Args.hs | mit | showArgs :: String -> Args -> String
showArgs prefix a =
prefix ++ "Args:"
++ "\n target: " ++ (show $ target a)
++ "\n cFiles: " ++ (show $ cFiles a)
++ "\n generatedCFiles: " ++ (show $ generatedCFiles a)
++ "\n cxxFiles: " ++ (show $ cxxFiles a)
++ "\n generatedCxxFiles " ++ (show $ generatedCxxFiles a)
++ "\n assemblyFiles: " ++ (show $ assemblyFiles a)
++ "\n addCFlags: " ++ (show $ addCFlags a)
++ "\n addCxxFlags: " ++ (show $ addCxxFlags a)
++ "\n omitCFlags: " ++ (show $ omitCFlags a)
++ "\n omitCxxFlags: " ++ (show $ omitCxxFlags a)
++ "\n addIncludes: " ++ (show $ addIncludes a)
++ "\n omitIncludes: " ++ (show $ omitIncludes a)
++ "\n addLinkFlags: " ++ (show $ addLinkFlags a)
++ "\n addLibraries: " ++ (show $ addLibraries a)
++ "\n addDeps: " ++ (show $ addGeneratedDependencies a)
++ "\n architectures: " ++ (show $ architectures a)
++ "\n sockeyeSchema: " ++ (show $ sockeyeSchema a)
++ "\n" | 1,179 | showArgs :: String -> Args -> String
showArgs prefix a =
prefix ++ "Args:"
++ "\n target: " ++ (show $ target a)
++ "\n cFiles: " ++ (show $ cFiles a)
++ "\n generatedCFiles: " ++ (show $ generatedCFiles a)
++ "\n cxxFiles: " ++ (show $ cxxFiles a)
++ "\n generatedCxxFiles " ++ (show $ generatedCxxFiles a)
++ "\n assemblyFiles: " ++ (show $ assemblyFiles a)
++ "\n addCFlags: " ++ (show $ addCFlags a)
++ "\n addCxxFlags: " ++ (show $ addCxxFlags a)
++ "\n omitCFlags: " ++ (show $ omitCFlags a)
++ "\n omitCxxFlags: " ++ (show $ omitCxxFlags a)
++ "\n addIncludes: " ++ (show $ addIncludes a)
++ "\n omitIncludes: " ++ (show $ omitIncludes a)
++ "\n addLinkFlags: " ++ (show $ addLinkFlags a)
++ "\n addLibraries: " ++ (show $ addLibraries a)
++ "\n addDeps: " ++ (show $ addGeneratedDependencies a)
++ "\n architectures: " ++ (show $ architectures a)
++ "\n sockeyeSchema: " ++ (show $ sockeyeSchema a)
++ "\n" | 1,179 | showArgs prefix a =
prefix ++ "Args:"
++ "\n target: " ++ (show $ target a)
++ "\n cFiles: " ++ (show $ cFiles a)
++ "\n generatedCFiles: " ++ (show $ generatedCFiles a)
++ "\n cxxFiles: " ++ (show $ cxxFiles a)
++ "\n generatedCxxFiles " ++ (show $ generatedCxxFiles a)
++ "\n assemblyFiles: " ++ (show $ assemblyFiles a)
++ "\n addCFlags: " ++ (show $ addCFlags a)
++ "\n addCxxFlags: " ++ (show $ addCxxFlags a)
++ "\n omitCFlags: " ++ (show $ omitCFlags a)
++ "\n omitCxxFlags: " ++ (show $ omitCxxFlags a)
++ "\n addIncludes: " ++ (show $ addIncludes a)
++ "\n omitIncludes: " ++ (show $ omitIncludes a)
++ "\n addLinkFlags: " ++ (show $ addLinkFlags a)
++ "\n addLibraries: " ++ (show $ addLibraries a)
++ "\n addDeps: " ++ (show $ addGeneratedDependencies a)
++ "\n architectures: " ++ (show $ architectures a)
++ "\n sockeyeSchema: " ++ (show $ sockeyeSchema a)
++ "\n" | 1,142 | false | true | 38 | 8 | 433 | 363 | 170 | 193 | null | null |
jberryman/hashabler | src/Data/Hashabler/SipHash.hs | bsd-3-clause | sipRounds n = go n where
go 0 v0 v1 v2 v3 = return (v0,v1,v2,v3)
go n' v0 v1 v2 v3 = do
(v0,v1,v2,v3) <- sipRound v0 v1 v2 v3
go (n'-1) v0 v1 v2 v3
-- | A 128-bit secret key. This should be generated randomly and must be kept
-- secret. | 251 | sipRounds n = go n where
go 0 v0 v1 v2 v3 = return (v0,v1,v2,v3)
go n' v0 v1 v2 v3 = do
(v0,v1,v2,v3) <- sipRound v0 v1 v2 v3
go (n'-1) v0 v1 v2 v3
-- | A 128-bit secret key. This should be generated randomly and must be kept
-- secret. | 251 | sipRounds n = go n where
go 0 v0 v1 v2 v3 = return (v0,v1,v2,v3)
go n' v0 v1 v2 v3 = do
(v0,v1,v2,v3) <- sipRound v0 v1 v2 v3
go (n'-1) v0 v1 v2 v3
-- | A 128-bit secret key. This should be generated randomly and must be kept
-- secret. | 251 | false | false | 2 | 10 | 67 | 122 | 58 | 64 | null | null |
cpettitt/haskell-ptree | test/qc/Main.hs | mit | prop_null (t :: T) = if P.size t == 0 then P.null t else not $ P.null t | 71 | prop_null (t :: T) = if P.size t == 0 then P.null t else not $ P.null t | 71 | prop_null (t :: T) = if P.size t == 0 then P.null t else not $ P.null t | 71 | false | false | 0 | 8 | 17 | 47 | 23 | 24 | null | null |
olsner/ghc | compiler/utils/FastString.hs | bsd-3-clause | mkFastString# :: Addr# -> FastString
mkFastString# a# = mkFastStringBytes ptr (ptrStrLength ptr)
where ptr = Ptr a#
{- Note [Updating the FastString table]
The procedure goes like this:
1. Read the relevant bucket and perform a look up of the string.
2. If it exists, return it.
3. Otherwise grab a unique ID, create a new FastString and atomically attempt
to update the relevant bucket with this FastString:
* Double check that the string is not in the bucket. Another thread may have
inserted it while we were creating our string.
* Return the existing FastString if it exists. The one we preemptively
created will get GCed.
* Otherwise, insert and return the string we created.
-}
{- Note [Double-checking the bucket]
It is not necessary to check the entire bucket the second time. We only have to
check the strings that are new to the bucket since the last time we read it.
-} | 910 | mkFastString# :: Addr# -> FastString
mkFastString# a# = mkFastStringBytes ptr (ptrStrLength ptr)
where ptr = Ptr a#
{- Note [Updating the FastString table]
The procedure goes like this:
1. Read the relevant bucket and perform a look up of the string.
2. If it exists, return it.
3. Otherwise grab a unique ID, create a new FastString and atomically attempt
to update the relevant bucket with this FastString:
* Double check that the string is not in the bucket. Another thread may have
inserted it while we were creating our string.
* Return the existing FastString if it exists. The one we preemptively
created will get GCed.
* Otherwise, insert and return the string we created.
-}
{- Note [Double-checking the bucket]
It is not necessary to check the entire bucket the second time. We only have to
check the strings that are new to the bucket since the last time we read it.
-} | 910 | mkFastString# a# = mkFastStringBytes ptr (ptrStrLength ptr)
where ptr = Ptr a#
{- Note [Updating the FastString table]
The procedure goes like this:
1. Read the relevant bucket and perform a look up of the string.
2. If it exists, return it.
3. Otherwise grab a unique ID, create a new FastString and atomically attempt
to update the relevant bucket with this FastString:
* Double check that the string is not in the bucket. Another thread may have
inserted it while we were creating our string.
* Return the existing FastString if it exists. The one we preemptively
created will get GCed.
* Otherwise, insert and return the string we created.
-}
{- Note [Double-checking the bucket]
It is not necessary to check the entire bucket the second time. We only have to
check the strings that are new to the bucket since the last time we read it.
-} | 873 | false | true | 0 | 7 | 184 | 42 | 21 | 21 | null | null |
wunderdogsw/funniest-finnish-words | haskell-not-idiomatic-but-fast/HassutSanat.hs | mit | ifoldl :: ((# Int#, Int# #) -> Char -> (# Int#, Int# #)) -> (# Int#, Int# #) -> T.Text -> (# Int#, Int# #)
ifoldl !f !i !t = foldl' f i (S.stream t) | 148 | ifoldl :: ((# Int#, Int# #) -> Char -> (# Int#, Int# #)) -> (# Int#, Int# #) -> T.Text -> (# Int#, Int# #)
ifoldl !f !i !t = foldl' f i (S.stream t) | 148 | ifoldl !f !i !t = foldl' f i (S.stream t) | 41 | false | true | 0 | 9 | 34 | 81 | 41 | 40 | null | null |
ribag/ganeti-experiments | src/Ganeti/Constants.hs | gpl-2.0 | metadGroup :: String
metadGroup = Runtime.daemonGroup (DaemonGroup GanetiMetad) | 79 | metadGroup :: String
metadGroup = Runtime.daemonGroup (DaemonGroup GanetiMetad) | 79 | metadGroup = Runtime.daemonGroup (DaemonGroup GanetiMetad) | 58 | false | true | 0 | 7 | 7 | 22 | 11 | 11 | null | null |
phischu/fragnix | builtins/base/System.Console.GetOpt.hs | bsd-3-clause | getNext ('-': x :xs) rest optDescr = shortOpt x xs rest optDescr | 64 | getNext ('-': x :xs) rest optDescr = shortOpt x xs rest optDescr | 64 | getNext ('-': x :xs) rest optDescr = shortOpt x xs rest optDescr | 64 | false | false | 0 | 8 | 11 | 33 | 16 | 17 | null | null |
termite2/tsl | TSL2Boogie/Spec2Boogie.hs | bsd-3-clause | collectOpsExpr (ESlice e _) = collectOpsExpr e | 51 | collectOpsExpr (ESlice e _) = collectOpsExpr e | 51 | collectOpsExpr (ESlice e _) = collectOpsExpr e | 51 | false | false | 0 | 6 | 11 | 21 | 9 | 12 | null | null |
sboosali/enumerate | enumerate/tests/DocTests.hs | mit | putStringsLine :: [String] -> IO ()
putStringsLine = fmap (const ()) . traverse putStrLn | 88 | putStringsLine :: [String] -> IO ()
putStringsLine = fmap (const ()) . traverse putStrLn | 88 | putStringsLine = fmap (const ()) . traverse putStrLn | 52 | false | true | 0 | 9 | 13 | 41 | 20 | 21 | null | null |
peterokagey/haskellOEIS | src/Permutations/A068424.hs | apache-2.0 | a068424T :: Integer -> Integer -> Integer
a068424T n k
| n < k = 0
| otherwise = product $ map (\i -> n - i) [0..k-1] | 125 | a068424T :: Integer -> Integer -> Integer
a068424T n k
| n < k = 0
| otherwise = product $ map (\i -> n - i) [0..k-1] | 125 | a068424T n k
| n < k = 0
| otherwise = product $ map (\i -> n - i) [0..k-1] | 83 | false | true | 1 | 9 | 35 | 71 | 36 | 35 | null | null |
vladfi1/game-ai | lib/Game.hs | mit | lookAheadPlayDepth :: Game a s => Int -> Heuristic a s -> s -> s
lookAheadPlayDepth n heuristic = lookAheadPlay (lookAheadEvalDepth (n - 1) heuristic) | 150 | lookAheadPlayDepth :: Game a s => Int -> Heuristic a s -> s -> s
lookAheadPlayDepth n heuristic = lookAheadPlay (lookAheadEvalDepth (n - 1) heuristic) | 150 | lookAheadPlayDepth n heuristic = lookAheadPlay (lookAheadEvalDepth (n - 1) heuristic) | 85 | false | true | 0 | 9 | 24 | 64 | 30 | 34 | null | null |
josuf107/Adverb | Adverb/Common.hs | gpl-3.0 | dogmatically = id | 17 | dogmatically = id | 17 | dogmatically = id | 17 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
qnikst/distributed-process | src/Control/Distributed/Process/Internal/Messaging.hs | bsd-3-clause | impliesDeathOf :: Identifier
-> Identifier
-> Bool
NodeIdentifier nid `impliesDeathOf` NodeIdentifier nid' =
nid' == nid | 152 | impliesDeathOf :: Identifier
-> Identifier
-> Bool
NodeIdentifier nid `impliesDeathOf` NodeIdentifier nid' =
nid' == nid | 152 | NodeIdentifier nid `impliesDeathOf` NodeIdentifier nid' =
nid' == nid | 71 | false | true | 0 | 6 | 47 | 37 | 18 | 19 | null | null |
trskop/hpwgen | src/Main/Application.hs | bsd-3-clause | numberOfColumnsAndPasswords
:: Config
-> Maybe Int
-- ^ Terminal width or 'Nothing' if not a terminal.
-> (Int, Int)
-- ^ Number of columns to print passwords in and number of passowrds that
-- will be generated.
numberOfColumnsAndPasswords cfg s = case (get printInColumnsL cfg, s) of
(Nothing, Nothing) -> (1, fromMaybe 1 pwNum)
-- In auto mode and output is not a terminal.
(Just False, _) -> (1, fromMaybe 1 pwNum)
-- Forcing one column mode, then by default just one password shouls be
-- printed.
(Just True, Nothing) -> let cols = numberOfColumns defaultLineLength
in (cols, fromMaybe (cols * defaultNumberOfLines) pwNum)
-- Forced to print in columns, but output is not a terminal, assuming
-- defaultLineLength character width.
(_, Just n) -> let cols = numberOfColumns n
in (cols, fromMaybe (cols * defaultNumberOfLines) pwNum)
-- Either in auto mode or forced to print in columns, output is a
-- terminal.
where
pwNum = fromIntegral <$> get numberOfPasswordsL cfg
-- n * pwlen + n - 1 <= terminalWidth
-- n * (pwlen + 1) - 1 <= terminalWidth
--
-- terminalWidth + 1
-- n <= -------------------
-- pwlen + 1
numberOfColumns n
| n <= pwlen = 1
| otherwise = case (n + 1) `div` (pwlen + 1) of
d | d <= 1 -> 1
| otherwise -> d
where
pwlen = fromIntegral $ get passwordLengthL cfg | 1,506 | numberOfColumnsAndPasswords
:: Config
-> Maybe Int
-- ^ Terminal width or 'Nothing' if not a terminal.
-> (Int, Int)
numberOfColumnsAndPasswords cfg s = case (get printInColumnsL cfg, s) of
(Nothing, Nothing) -> (1, fromMaybe 1 pwNum)
-- In auto mode and output is not a terminal.
(Just False, _) -> (1, fromMaybe 1 pwNum)
-- Forcing one column mode, then by default just one password shouls be
-- printed.
(Just True, Nothing) -> let cols = numberOfColumns defaultLineLength
in (cols, fromMaybe (cols * defaultNumberOfLines) pwNum)
-- Forced to print in columns, but output is not a terminal, assuming
-- defaultLineLength character width.
(_, Just n) -> let cols = numberOfColumns n
in (cols, fromMaybe (cols * defaultNumberOfLines) pwNum)
-- Either in auto mode or forced to print in columns, output is a
-- terminal.
where
pwNum = fromIntegral <$> get numberOfPasswordsL cfg
-- n * pwlen + n - 1 <= terminalWidth
-- n * (pwlen + 1) - 1 <= terminalWidth
--
-- terminalWidth + 1
-- n <= -------------------
-- pwlen + 1
numberOfColumns n
| n <= pwlen = 1
| otherwise = case (n + 1) `div` (pwlen + 1) of
d | d <= 1 -> 1
| otherwise -> d
where
pwlen = fromIntegral $ get passwordLengthL cfg | 1,402 | numberOfColumnsAndPasswords cfg s = case (get printInColumnsL cfg, s) of
(Nothing, Nothing) -> (1, fromMaybe 1 pwNum)
-- In auto mode and output is not a terminal.
(Just False, _) -> (1, fromMaybe 1 pwNum)
-- Forcing one column mode, then by default just one password shouls be
-- printed.
(Just True, Nothing) -> let cols = numberOfColumns defaultLineLength
in (cols, fromMaybe (cols * defaultNumberOfLines) pwNum)
-- Forced to print in columns, but output is not a terminal, assuming
-- defaultLineLength character width.
(_, Just n) -> let cols = numberOfColumns n
in (cols, fromMaybe (cols * defaultNumberOfLines) pwNum)
-- Either in auto mode or forced to print in columns, output is a
-- terminal.
where
pwNum = fromIntegral <$> get numberOfPasswordsL cfg
-- n * pwlen + n - 1 <= terminalWidth
-- n * (pwlen + 1) - 1 <= terminalWidth
--
-- terminalWidth + 1
-- n <= -------------------
-- pwlen + 1
numberOfColumns n
| n <= pwlen = 1
| otherwise = case (n + 1) `div` (pwlen + 1) of
d | d <= 1 -> 1
| otherwise -> d
where
pwlen = fromIntegral $ get passwordLengthL cfg | 1,269 | true | true | 1 | 13 | 451 | 320 | 170 | 150 | null | null |
GaloisInc/ivory | ivory/src/Ivory/Language/Syntax/Concrete/QQ/ExprQQ.hs | bsd-3-clause | fromOpExp :: VarEnv -> ExpOp -> [Exp] -> T.Exp
fromOpExp env op args = case op of
EqOp -> mkInfix '(I.==?)
NeqOp -> mkInfix '(I./=?)
CondOp -> mkTert '(I.?)
GtOp g -> mkInfix $ if g then '(I.>=?) else '(I.>?)
LtOp g -> mkInfix $ if g then '(I.<=?) else '(I.<?)
NotOp -> mkUn 'I.iNot
AndOp -> mkInfix '(I..&&)
OrOp -> mkInfix '(I..||)
MulOp -> mkInfix '(*)
AddOp -> mkInfix '(+)
SubOp -> mkInfix '(-)
DivOp -> mkInfix '(/)
NegateOp -> mkUn 'negate
AbsOp -> mkUn 'abs
SignumOp -> mkUn 'signum
EucDivOp -> mkInfix '(I../) -- Euclidean division
ModOp -> mkInfix '(I..%) -- Euclidean modulo
FExpOp -> mkUn 'P.exp
FSqrtOp -> mkUn 'sqrt
FLogOp -> mkUn 'log
FPowOp -> mkInfix '(**)
FSinOp -> mkUn 'sin
FTanOp -> mkUn 'tan
FCosOp -> mkUn 'cos
FAsinOp -> mkUn 'asin
FAtanOp -> mkUn 'atan
FAtan2Op -> mkBin 'I.atan2F
FAcosOp -> mkUn 'acos
FSinhOp -> mkUn 'sinh
FTanhOp -> mkUn 'tanh
FCoshOp -> mkUn 'cosh
FAsinhOp -> mkUn 'asinh
FAtanhOp -> mkUn 'atanh
FAcoshOp -> mkUn 'acosh
IsNanOp -> mkUn 'I.isnan
IsInfOp -> mkUn 'I.isinf
RoundFOp -> mkUn 'I.roundF
CeilFOp -> mkUn 'I.ceilF
FloorFOp -> mkUn 'I.floorF
BitAndOp -> mkInfix '(I..&)
BitOrOp -> mkInfix '(I..|)
BitXorOp -> mkInfix '(I..^)
BitComplementOp -> mkUn 'I.iComplement
BitShiftLOp -> mkBin 'I.iShiftL
BitShiftROp -> mkBin 'I.iShiftR
ConstRefOp -> mkUn 'I.constRef
SafeCast -> mkUn 'I.safeCast
BitCast -> mkUn 'I.bitCast
CastWith -> mkBin 'I.castWith
TwosCompCast -> mkUn 'I.twosComplementCast
TwosCompRep -> mkUn 'I.twosComplementRep
ToIx -> mkUn 'I.toIx
FromIx -> mkUn 'I.fromIx
ToCArray -> mkUn 'I.toCArray
ArrayLen -> mkUn 'I.arrayLen
SizeOf -> mkUn 'I.sizeOf
NullPtr -> mkUn 'I.nullPtr
RefToPtr -> mkUn 'I.refToPtr
IxSize -> mkUn 'I.ixSize
where
getArg i = toExp env (args !! i)
mkArg = Just . getArg
mkInfix op' = InfixE (mkArg 0) (VarE op') (mkArg 1)
mkTert op' = InfixE (mkArg 0) (VarE op') (Just $ TupE [getArg 1, getArg 2])
mkUn op' = AppE (VarE op') (getArg 0)
mkBin op' = AppE (AppE (VarE op') (getArg 0)) (getArg 1) | 2,676 | fromOpExp :: VarEnv -> ExpOp -> [Exp] -> T.Exp
fromOpExp env op args = case op of
EqOp -> mkInfix '(I.==?)
NeqOp -> mkInfix '(I./=?)
CondOp -> mkTert '(I.?)
GtOp g -> mkInfix $ if g then '(I.>=?) else '(I.>?)
LtOp g -> mkInfix $ if g then '(I.<=?) else '(I.<?)
NotOp -> mkUn 'I.iNot
AndOp -> mkInfix '(I..&&)
OrOp -> mkInfix '(I..||)
MulOp -> mkInfix '(*)
AddOp -> mkInfix '(+)
SubOp -> mkInfix '(-)
DivOp -> mkInfix '(/)
NegateOp -> mkUn 'negate
AbsOp -> mkUn 'abs
SignumOp -> mkUn 'signum
EucDivOp -> mkInfix '(I../) -- Euclidean division
ModOp -> mkInfix '(I..%) -- Euclidean modulo
FExpOp -> mkUn 'P.exp
FSqrtOp -> mkUn 'sqrt
FLogOp -> mkUn 'log
FPowOp -> mkInfix '(**)
FSinOp -> mkUn 'sin
FTanOp -> mkUn 'tan
FCosOp -> mkUn 'cos
FAsinOp -> mkUn 'asin
FAtanOp -> mkUn 'atan
FAtan2Op -> mkBin 'I.atan2F
FAcosOp -> mkUn 'acos
FSinhOp -> mkUn 'sinh
FTanhOp -> mkUn 'tanh
FCoshOp -> mkUn 'cosh
FAsinhOp -> mkUn 'asinh
FAtanhOp -> mkUn 'atanh
FAcoshOp -> mkUn 'acosh
IsNanOp -> mkUn 'I.isnan
IsInfOp -> mkUn 'I.isinf
RoundFOp -> mkUn 'I.roundF
CeilFOp -> mkUn 'I.ceilF
FloorFOp -> mkUn 'I.floorF
BitAndOp -> mkInfix '(I..&)
BitOrOp -> mkInfix '(I..|)
BitXorOp -> mkInfix '(I..^)
BitComplementOp -> mkUn 'I.iComplement
BitShiftLOp -> mkBin 'I.iShiftL
BitShiftROp -> mkBin 'I.iShiftR
ConstRefOp -> mkUn 'I.constRef
SafeCast -> mkUn 'I.safeCast
BitCast -> mkUn 'I.bitCast
CastWith -> mkBin 'I.castWith
TwosCompCast -> mkUn 'I.twosComplementCast
TwosCompRep -> mkUn 'I.twosComplementRep
ToIx -> mkUn 'I.toIx
FromIx -> mkUn 'I.fromIx
ToCArray -> mkUn 'I.toCArray
ArrayLen -> mkUn 'I.arrayLen
SizeOf -> mkUn 'I.sizeOf
NullPtr -> mkUn 'I.nullPtr
RefToPtr -> mkUn 'I.refToPtr
IxSize -> mkUn 'I.ixSize
where
getArg i = toExp env (args !! i)
mkArg = Just . getArg
mkInfix op' = InfixE (mkArg 0) (VarE op') (mkArg 1)
mkTert op' = InfixE (mkArg 0) (VarE op') (Just $ TupE [getArg 1, getArg 2])
mkUn op' = AppE (VarE op') (getArg 0)
mkBin op' = AppE (AppE (VarE op') (getArg 0)) (getArg 1) | 2,676 | fromOpExp env op args = case op of
EqOp -> mkInfix '(I.==?)
NeqOp -> mkInfix '(I./=?)
CondOp -> mkTert '(I.?)
GtOp g -> mkInfix $ if g then '(I.>=?) else '(I.>?)
LtOp g -> mkInfix $ if g then '(I.<=?) else '(I.<?)
NotOp -> mkUn 'I.iNot
AndOp -> mkInfix '(I..&&)
OrOp -> mkInfix '(I..||)
MulOp -> mkInfix '(*)
AddOp -> mkInfix '(+)
SubOp -> mkInfix '(-)
DivOp -> mkInfix '(/)
NegateOp -> mkUn 'negate
AbsOp -> mkUn 'abs
SignumOp -> mkUn 'signum
EucDivOp -> mkInfix '(I../) -- Euclidean division
ModOp -> mkInfix '(I..%) -- Euclidean modulo
FExpOp -> mkUn 'P.exp
FSqrtOp -> mkUn 'sqrt
FLogOp -> mkUn 'log
FPowOp -> mkInfix '(**)
FSinOp -> mkUn 'sin
FTanOp -> mkUn 'tan
FCosOp -> mkUn 'cos
FAsinOp -> mkUn 'asin
FAtanOp -> mkUn 'atan
FAtan2Op -> mkBin 'I.atan2F
FAcosOp -> mkUn 'acos
FSinhOp -> mkUn 'sinh
FTanhOp -> mkUn 'tanh
FCoshOp -> mkUn 'cosh
FAsinhOp -> mkUn 'asinh
FAtanhOp -> mkUn 'atanh
FAcoshOp -> mkUn 'acosh
IsNanOp -> mkUn 'I.isnan
IsInfOp -> mkUn 'I.isinf
RoundFOp -> mkUn 'I.roundF
CeilFOp -> mkUn 'I.ceilF
FloorFOp -> mkUn 'I.floorF
BitAndOp -> mkInfix '(I..&)
BitOrOp -> mkInfix '(I..|)
BitXorOp -> mkInfix '(I..^)
BitComplementOp -> mkUn 'I.iComplement
BitShiftLOp -> mkBin 'I.iShiftL
BitShiftROp -> mkBin 'I.iShiftR
ConstRefOp -> mkUn 'I.constRef
SafeCast -> mkUn 'I.safeCast
BitCast -> mkUn 'I.bitCast
CastWith -> mkBin 'I.castWith
TwosCompCast -> mkUn 'I.twosComplementCast
TwosCompRep -> mkUn 'I.twosComplementRep
ToIx -> mkUn 'I.toIx
FromIx -> mkUn 'I.fromIx
ToCArray -> mkUn 'I.toCArray
ArrayLen -> mkUn 'I.arrayLen
SizeOf -> mkUn 'I.sizeOf
NullPtr -> mkUn 'I.nullPtr
RefToPtr -> mkUn 'I.refToPtr
IxSize -> mkUn 'I.ixSize
where
getArg i = toExp env (args !! i)
mkArg = Just . getArg
mkInfix op' = InfixE (mkArg 0) (VarE op') (mkArg 1)
mkTert op' = InfixE (mkArg 0) (VarE op') (Just $ TupE [getArg 1, getArg 2])
mkUn op' = AppE (VarE op') (getArg 0)
mkBin op' = AppE (AppE (VarE op') (getArg 0)) (getArg 1) | 2,629 | false | true | 0 | 10 | 1,031 | 951 | 497 | 454 | null | null |
garetxe/cabal | Cabal/Distribution/Simple/Utils.hs | bsd-3-clause | -- | Non fatal conditions that may be indicative of an error or problem.
--
-- We display these at the 'normal' verbosity level.
--
warn :: Verbosity -> String -> IO ()
warn verbosity msg =
when (verbosity >= normal) $ do
hFlush stdout
hPutStr stderr (wrapText ("Warning: " ++ msg))
-- | Useful status messages.
--
-- We display these at the 'normal' verbosity level.
--
-- This is for the ordinary helpful status messages that users see. Just
-- enough information to know that things are working but not floods of detail.
-- | 537 | warn :: Verbosity -> String -> IO ()
warn verbosity msg =
when (verbosity >= normal) $ do
hFlush stdout
hPutStr stderr (wrapText ("Warning: " ++ msg))
-- | Useful status messages.
--
-- We display these at the 'normal' verbosity level.
--
-- This is for the ordinary helpful status messages that users see. Just
-- enough information to know that things are working but not floods of detail.
-- | 405 | warn verbosity msg =
when (verbosity >= normal) $ do
hFlush stdout
hPutStr stderr (wrapText ("Warning: " ++ msg))
-- | Useful status messages.
--
-- We display these at the 'normal' verbosity level.
--
-- This is for the ordinary helpful status messages that users see. Just
-- enough information to know that things are working but not floods of detail.
-- | 368 | true | true | 0 | 12 | 106 | 81 | 44 | 37 | null | null |
andrewjanke/mytardis-dicom | src/Dicom.hs | bsd-2-clause | pPatientAge = parseField "(0010,1010) AS" | 57 | pPatientAge = parseField "(0010,1010) AS" | 57 | pPatientAge = parseField "(0010,1010) AS" | 57 | false | false | 0 | 5 | 20 | 9 | 4 | 5 | null | null |
junjihashimoto/persistent | persistent-mongoDB/Database/Persist/MongoDB.hs | mit | zipToDoc (e:efields) (p:pfields) =
let pv = toPersistValue p
in (unDBName e DB.:= DB.val pv):zipToDoc efields pfields | 122 | zipToDoc (e:efields) (p:pfields) =
let pv = toPersistValue p
in (unDBName e DB.:= DB.val pv):zipToDoc efields pfields | 122 | zipToDoc (e:efields) (p:pfields) =
let pv = toPersistValue p
in (unDBName e DB.:= DB.val pv):zipToDoc efields pfields | 122 | false | false | 1 | 11 | 21 | 69 | 31 | 38 | null | null |
hjwylde/werewolf | src/Game/Werewolf/Player.hs | bsd-3-clause | -- | The traversal of 'druid' 'Player's.
--
-- @
-- 'druids' = 'traverse' . 'filtered' ('is' 'druid')
-- @
druids :: Traversable t => Traversal' (t Player) Player
druids = traverse . filtered (is druid) | 202 | druids :: Traversable t => Traversal' (t Player) Player
druids = traverse . filtered (is druid) | 95 | druids = traverse . filtered (is druid) | 39 | true | true | 0 | 9 | 35 | 52 | 26 | 26 | null | null |
danoctavian/tcp-proxy | test/HTTPProxySpec.hs | mit | localhost = "127.0.0.1" | 23 | localhost = "127.0.0.1" | 23 | localhost = "127.0.0.1" | 23 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
jeffreyrosenbluth/flourine | src/Fluorine/HTML.hs | bsd-3-clause | ul :: [A.Attr i] -> [HTML i] -> HTML i
ul xs = element (tagName "ul") xs | 72 | ul :: [A.Attr i] -> [HTML i] -> HTML i
ul xs = element (tagName "ul") xs | 72 | ul xs = element (tagName "ul") xs | 33 | false | true | 0 | 9 | 16 | 56 | 25 | 31 | null | null |
scottgw/language-eiffel | Language/Eiffel/Parser/Expr.hs | bsd-3-clause | factorUnPos :: Parser UnPosExpr
factorUnPos = choice [ tuple
, onceString
, address
, agent
, across
, question
, attached
, createExpr
, varOrCall
, precursorCall
, void
, manifest
, unaryExpr
, ifThenElse
] | 502 | factorUnPos :: Parser UnPosExpr
factorUnPos = choice [ tuple
, onceString
, address
, agent
, across
, question
, attached
, createExpr
, varOrCall
, precursorCall
, void
, manifest
, unaryExpr
, ifThenElse
] | 502 | factorUnPos = choice [ tuple
, onceString
, address
, agent
, across
, question
, attached
, createExpr
, varOrCall
, precursorCall
, void
, manifest
, unaryExpr
, ifThenElse
] | 470 | false | true | 0 | 6 | 329 | 59 | 36 | 23 | null | null |
copumpkin/charm | src/Architecture/ARM/Pretty.hs | bsd-3-clause | showInstruction SEV = printf "SEV" | 52 | showInstruction SEV = printf "SEV" | 52 | showInstruction SEV = printf "SEV" | 52 | false | false | 0 | 5 | 22 | 12 | 5 | 7 | null | null |
foreverbell/unlimited-plt-toys | tapl/simplesub/PPrint.hs | bsd-3-clause | pprintAtomicTerm _ TermFalse = "false" | 38 | pprintAtomicTerm _ TermFalse = "false" | 38 | pprintAtomicTerm _ TermFalse = "false" | 38 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
codemac/yi-editor | src/Yi/Buffer/Implementation.hs | gpl-2.0 | getAst :: Int -> BufferImpl syntax -> syntax
getAst w b@FBufferData {hlCache = HLState s@(SynHL {hlGetTree = gt}) cache} = gt cache w | 133 | getAst :: Int -> BufferImpl syntax -> syntax
getAst w b@FBufferData {hlCache = HLState s@(SynHL {hlGetTree = gt}) cache} = gt cache w | 133 | getAst w b@FBufferData {hlCache = HLState s@(SynHL {hlGetTree = gt}) cache} = gt cache w | 88 | false | true | 0 | 15 | 22 | 64 | 33 | 31 | null | null |
tjakway/ghcjvm | compiler/stgSyn/StgLint.hs | bsd-3-clause | checkInScope :: Id -> LintM ()
checkInScope id = LintM $ \loc scope errs
-> if isLocalId id && not (id `elemVarSet` scope) then
((), addErr errs (hsep [ppr id, text "is out of scope"]) loc)
else
((), errs) | 226 | checkInScope :: Id -> LintM ()
checkInScope id = LintM $ \loc scope errs
-> if isLocalId id && not (id `elemVarSet` scope) then
((), addErr errs (hsep [ppr id, text "is out of scope"]) loc)
else
((), errs) | 226 | checkInScope id = LintM $ \loc scope errs
-> if isLocalId id && not (id `elemVarSet` scope) then
((), addErr errs (hsep [ppr id, text "is out of scope"]) loc)
else
((), errs) | 195 | false | true | 0 | 13 | 59 | 104 | 55 | 49 | null | null |
urbanslug/ghc | testsuite/tests/driver/recomp013/A.hs | bsd-3-clause | a1 = 5 | 6 | a1 = 5 | 6 | a1 = 5 | 6 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
NorfairKing/haphviz | src/Text/Dot/Render.hs | mit | renderDot (Ranksame d) = do
indent
braced $ do
tell " rank=same"
newline
indented $ renderDot d
indent
newline | 154 | renderDot (Ranksame d) = do
indent
braced $ do
tell " rank=same"
newline
indented $ renderDot d
indent
newline | 154 | renderDot (Ranksame d) = do
indent
braced $ do
tell " rank=same"
newline
indented $ renderDot d
indent
newline | 154 | false | false | 0 | 11 | 62 | 51 | 20 | 31 | null | null |
hanshoglund/sox2 | src/Sound/Sox2.hs | bsd-3-clause | trebleGain :: Audio -> Sox Audio
trebleGain = error "No trebleGain" | 67 | trebleGain :: Audio -> Sox Audio
trebleGain = error "No trebleGain" | 67 | trebleGain = error "No trebleGain" | 34 | false | true | 0 | 6 | 10 | 21 | 10 | 11 | null | null |
urbanslug/ghc | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | translateOp dflags SameMutableArrayArrayOp= Just (mo_wordEq dflags) | 67 | translateOp dflags SameMutableArrayArrayOp= Just (mo_wordEq dflags) | 67 | translateOp dflags SameMutableArrayArrayOp= Just (mo_wordEq dflags) | 67 | false | false | 0 | 7 | 5 | 21 | 9 | 12 | null | null |
ekmett/ghc | compiler/cmm/CmmUtils.hs | bsd-3-clause | isTrivialCmmExpr (CmmMachOp _ _) = False | 43 | isTrivialCmmExpr (CmmMachOp _ _) = False | 43 | isTrivialCmmExpr (CmmMachOp _ _) = False | 43 | false | false | 0 | 7 | 8 | 17 | 8 | 9 | null | null |
futufeld/eclogues | eclogues-impl/gen-hs/AuroraSchedulerManager.hs | bsd-3-clause | from_CreateJob_result :: CreateJob_result -> T.ThriftVal
from_CreateJob_result record = T.TStruct $ Map.fromList $ M.catMaybes
[ (\_v909 -> P.Just (0, ("success",from_Response _v909))) $ createJob_result_success record
] | 224 | from_CreateJob_result :: CreateJob_result -> T.ThriftVal
from_CreateJob_result record = T.TStruct $ Map.fromList $ M.catMaybes
[ (\_v909 -> P.Just (0, ("success",from_Response _v909))) $ createJob_result_success record
] | 224 | from_CreateJob_result record = T.TStruct $ Map.fromList $ M.catMaybes
[ (\_v909 -> P.Just (0, ("success",from_Response _v909))) $ createJob_result_success record
] | 167 | false | true | 0 | 13 | 27 | 79 | 40 | 39 | null | null |
Zimmi48/gps-bank-data-analysis | CombinedDataMining.hs | mpl-2.0 | groupByDay _ [] = [] | 20 | groupByDay _ [] = [] | 20 | groupByDay _ [] = [] | 20 | false | false | 0 | 6 | 4 | 15 | 7 | 8 | null | null |
Frefreak/hearthstone-cardsearch | client/src/JavaScript/JQuery.hs | bsd-3-clause | appendToJQuery :: JQuery -> JQuery -> IO JQuery
appendToJQuery j jq = jq_appendTo_jq j jq | 89 | appendToJQuery :: JQuery -> JQuery -> IO JQuery
appendToJQuery j jq = jq_appendTo_jq j jq | 89 | appendToJQuery j jq = jq_appendTo_jq j jq | 41 | false | true | 0 | 8 | 14 | 36 | 16 | 20 | null | null |
alphaHeavy/alphaheavy-conduit | src/AlphaHeavy/Conduit.hs | bsd-3-clause | passthroughSink (Done r) =
return r | 37 | passthroughSink (Done r) =
return r | 37 | passthroughSink (Done r) =
return r | 37 | false | false | 0 | 7 | 7 | 18 | 8 | 10 | null | null |
chaosim/peasy | coffee/samples/latex.hs | mit | inlineCommand :: LP Inlines
inlineCommand = try $ do
name <- anyControlSeq
guard $ name /= "begin" && name /= "end"
guard $ not $ isBlockCommand name
parseRaw <- getOption readerParseRaw
star <- option "" (string "*")
let name' = name ++ star
let raw = do
rawargs <- withRaw (skipopts *> option "" dimenarg *> many braced)
let rawcommand = '\\' : name ++ star ++ snd rawargs
transformed <- applyMacros' rawcommand
if transformed /= rawcommand
then parseFromString inlines transformed
else if parseRaw
then return $ rawInline "latex" rawcommand
else return mempty
case M.lookup name' inlineCommands of
Just p -> p <|> raw
Nothing -> case M.lookup name inlineCommands of
Just p -> p <|> raw
Nothing -> raw | 893 | inlineCommand :: LP Inlines
inlineCommand = try $ do
name <- anyControlSeq
guard $ name /= "begin" && name /= "end"
guard $ not $ isBlockCommand name
parseRaw <- getOption readerParseRaw
star <- option "" (string "*")
let name' = name ++ star
let raw = do
rawargs <- withRaw (skipopts *> option "" dimenarg *> many braced)
let rawcommand = '\\' : name ++ star ++ snd rawargs
transformed <- applyMacros' rawcommand
if transformed /= rawcommand
then parseFromString inlines transformed
else if parseRaw
then return $ rawInline "latex" rawcommand
else return mempty
case M.lookup name' inlineCommands of
Just p -> p <|> raw
Nothing -> case M.lookup name inlineCommands of
Just p -> p <|> raw
Nothing -> raw | 893 | inlineCommand = try $ do
name <- anyControlSeq
guard $ name /= "begin" && name /= "end"
guard $ not $ isBlockCommand name
parseRaw <- getOption readerParseRaw
star <- option "" (string "*")
let name' = name ++ star
let raw = do
rawargs <- withRaw (skipopts *> option "" dimenarg *> many braced)
let rawcommand = '\\' : name ++ star ++ snd rawargs
transformed <- applyMacros' rawcommand
if transformed /= rawcommand
then parseFromString inlines transformed
else if parseRaw
then return $ rawInline "latex" rawcommand
else return mempty
case M.lookup name' inlineCommands of
Just p -> p <|> raw
Nothing -> case M.lookup name inlineCommands of
Just p -> p <|> raw
Nothing -> raw | 865 | false | true | 2 | 18 | 309 | 282 | 127 | 155 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.