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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
leshchevds/ganeti | src/Ganeti/Query/Node.hs | bsd-2-clause | nodeLiveFieldExtract "spfree" res =
getAttrFromStorageInfo storageInfoStorageFree (getStorageInfoForType
(rpcResNodeInfoStorageInfo res) StorageLvmPv) | 158 | nodeLiveFieldExtract "spfree" res =
getAttrFromStorageInfo storageInfoStorageFree (getStorageInfoForType
(rpcResNodeInfoStorageInfo res) StorageLvmPv) | 158 | nodeLiveFieldExtract "spfree" res =
getAttrFromStorageInfo storageInfoStorageFree (getStorageInfoForType
(rpcResNodeInfoStorageInfo res) StorageLvmPv) | 158 | false | false | 0 | 9 | 17 | 30 | 14 | 16 | null | null |
green-haskell/ghc | libraries/base/Data/Data.hs | bsd-3-clause | tuple4Constr :: Constr
tuple4Constr = mkConstr tuple4DataType "(,,,)" [] Infix | 78 | tuple4Constr :: Constr
tuple4Constr = mkConstr tuple4DataType "(,,,)" [] Infix | 78 | tuple4Constr = mkConstr tuple4DataType "(,,,)" [] Infix | 55 | false | true | 0 | 6 | 9 | 29 | 12 | 17 | null | null |
edwtjo/SimpleIRC | Network/SimpleIRC/Core.hs | bsd-3-clause | eventFunc (Join f) = f | 25 | eventFunc (Join f) = f | 25 | eventFunc (Join f) = f | 25 | false | false | 0 | 7 | 7 | 15 | 7 | 8 | null | null |
edgarklerks/document-indexer | DSL/Results.hs | bsd-2-clause | parseCTags :: S.HashMap T.Text Value -> A.Parser (Maybe [Tag])
parseCTags h = let tag = S.lookup "ctags.tag" h
sourceline = S.lookup "ctags.sourceline" h
offset = S.lookup "ctags.offset" h
definition = S.lookup "ctags.definition" h
in return $ pars... | 362 | parseCTags :: S.HashMap T.Text Value -> A.Parser (Maybe [Tag])
parseCTags h = let tag = S.lookup "ctags.tag" h
sourceline = S.lookup "ctags.sourceline" h
offset = S.lookup "ctags.offset" h
definition = S.lookup "ctags.definition" h
in return $ pars... | 362 | parseCTags h = let tag = S.lookup "ctags.tag" h
sourceline = S.lookup "ctags.sourceline" h
offset = S.lookup "ctags.offset" h
definition = S.lookup "ctags.definition" h
in return $ parseDist Tag tag sourceline offset definition | 299 | false | true | 4 | 10 | 113 | 113 | 53 | 60 | null | null |
utsav2601/cmpe295A | hake/RuleDefs.hs | mit | --
-- Link a CPU driver. This is where it gets distinctly architecture-specific.
--
linkKernel :: Options -> String -> [String] -> [String] -> HRule
linkKernel opts name objs libs
| optArch opts == "x86_64" = X86_64.linkKernel opts objs [libraryPath l | l <- libs ] ("/sbin" ./. name)
| optArch opts == "k1om" =... | 1,217 | linkKernel :: Options -> String -> [String] -> [String] -> HRule
linkKernel opts name objs libs
| optArch opts == "x86_64" = X86_64.linkKernel opts objs [libraryPath l | l <- libs ] ("/sbin" ./. name)
| optArch opts == "k1om" = K1om.linkKernel opts objs [libraryPath l | l <- libs ] ("/sbin" ./. name)
| optA... | 1,132 | linkKernel opts name objs libs
| optArch opts == "x86_64" = X86_64.linkKernel opts objs [libraryPath l | l <- libs ] ("/sbin" ./. name)
| optArch opts == "k1om" = K1om.linkKernel opts objs [libraryPath l | l <- libs ] ("/sbin" ./. name)
| optArch opts == "x86_32" = X86_32.linkKernel opts objs [libraryPath l... | 1,067 | true | true | 0 | 12 | 258 | 519 | 249 | 270 | null | null |
jwiegley/ghc-release | utils/haddock/src/Haddock/Doc.hs | gpl-3.0 | docAppend DocEmpty d = d | 24 | docAppend DocEmpty d = d | 24 | docAppend DocEmpty d = d | 24 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
hsyl20/ViperVM | scripts/Unums.hs | bsd-3-clause | nr1 :: U U2
nr1 = unumEncode (Proxy :: Proxy U2) (Proxy :: Proxy (Rcp (Neg (I 1)))) ExactNumber | 95 | nr1 :: U U2
nr1 = unumEncode (Proxy :: Proxy U2) (Proxy :: Proxy (Rcp (Neg (I 1)))) ExactNumber | 95 | nr1 = unumEncode (Proxy :: Proxy U2) (Proxy :: Proxy (Rcp (Neg (I 1)))) ExactNumber | 83 | false | true | 0 | 13 | 18 | 63 | 30 | 33 | null | null |
djeik/fuckdown2 | src/Assembler.hs | mit | oneIndirect :: Register -> Register -> ModRm
oneIndirect reg rm = ModRmRr OneIndirect reg rm | 92 | oneIndirect :: Register -> Register -> ModRm
oneIndirect reg rm = ModRmRr OneIndirect reg rm | 92 | oneIndirect reg rm = ModRmRr OneIndirect reg rm | 47 | false | true | 0 | 6 | 14 | 31 | 15 | 16 | null | null |
rueshyna/gogol | gogol-admin-directory/gen/Network/Google/Resource/Directory/Schemas/Update.hs | mpl-2.0 | -- | Multipart request metadata.
suPayload :: Lens' SchemasUpdate Schema
suPayload
= lens _suPayload (\ s a -> s{_suPayload = a}) | 131 | suPayload :: Lens' SchemasUpdate Schema
suPayload
= lens _suPayload (\ s a -> s{_suPayload = a}) | 98 | suPayload
= lens _suPayload (\ s a -> s{_suPayload = a}) | 58 | true | true | 0 | 9 | 22 | 42 | 22 | 20 | null | null |
psibi/yesod | yesod-core/Yesod/Core/Content.hs | mit | repPlain :: ToContent a => a -> RepPlain
repPlain = RepPlain . toContent | 72 | repPlain :: ToContent a => a -> RepPlain
repPlain = RepPlain . toContent | 72 | repPlain = RepPlain . toContent | 31 | false | true | 0 | 6 | 12 | 26 | 13 | 13 | null | null |
egaburov/funstuff | Haskell/fun-with-types/memo.hs | apache-2.0 | g1 = fromTable . toTable $ f1 | 29 | g1 = fromTable . toTable $ f1 | 29 | g1 = fromTable . toTable $ f1 | 29 | false | false | 1 | 6 | 6 | 18 | 7 | 11 | null | null |
rahulmutt/ghcvm | compiler/Eta/BasicTypes/Module.hs | bsd-3-clause | pprUnitId (IndefiniteUnitId uid) = ppr uid | 42 | pprUnitId (IndefiniteUnitId uid) = ppr uid | 42 | pprUnitId (IndefiniteUnitId uid) = ppr uid | 42 | false | false | 0 | 7 | 5 | 18 | 8 | 10 | null | null |
jwvg0425/hasConsoleGame | games/battleship/Board.hs | mit | placeShip :: Board -> Ship -> Maybe Board
placeShip board ship = place board points
where points = getPosList ship
place board [] = Just board
place board (pos:other) = if Map.member pos $ state board
then Nothing
else place (cha... | 350 | placeShip :: Board -> Ship -> Maybe Board
placeShip board ship = place board points
where points = getPosList ship
place board [] = Just board
place board (pos:other) = if Map.member pos $ state board
then Nothing
else place (cha... | 350 | placeShip board ship = place board points
where points = getPosList ship
place board [] = Just board
place board (pos:other) = if Map.member pos $ state board
then Nothing
else place (changeState board pos SHIP) other | 308 | false | true | 1 | 8 | 135 | 121 | 54 | 67 | null | null |
mcmaniac/ghc | compiler/nativeGen/X86/Regs.hs | bsd-3-clause | globalRegMaybe (VanillaReg 3 _) = Just (RealRegSingle REG_R3) | 69 | globalRegMaybe (VanillaReg 3 _) = Just (RealRegSingle REG_R3) | 69 | globalRegMaybe (VanillaReg 3 _) = Just (RealRegSingle REG_R3) | 69 | false | false | 0 | 7 | 15 | 27 | 12 | 15 | null | null |
luispedro/NGH | Data/NGH/SuffixTrie.hs | mit | _root :: Trie -> Node
_root (Trie n) = n | 40 | _root :: Trie -> Node
_root (Trie n) = n | 40 | _root (Trie n) = n | 18 | false | true | 0 | 7 | 9 | 24 | 12 | 12 | null | null |
GaloisInc/verification-game | web-prover/src/TaskGroup.hs | bsd-3-clause | taskGroupStats :: TaskGroupData -> TaskGroupStats
taskGroupStats tg = TaskGroupStats
{ statTgTaskNum = taskNum
, statTgTasksWithLoops = length $ filter (not . null . statLoops) stats
, statTgTasksWithCalls = length $ filter (not . null . statCalls) stats
, statTgTaskStats = stats
}
where
t... | 471 | taskGroupStats :: TaskGroupData -> TaskGroupStats
taskGroupStats tg = TaskGroupStats
{ statTgTaskNum = taskNum
, statTgTasksWithLoops = length $ filter (not . null . statLoops) stats
, statTgTasksWithCalls = length $ filter (not . null . statCalls) stats
, statTgTaskStats = stats
}
where
t... | 471 | taskGroupStats tg = TaskGroupStats
{ statTgTaskNum = taskNum
, statTgTasksWithLoops = length $ filter (not . null . statLoops) stats
, statTgTasksWithCalls = length $ filter (not . null . statCalls) stats
, statTgTaskStats = stats
}
where
taskIds = allTaskIdsThat (\_ -> True) tg
taskNum ... | 421 | false | true | 4 | 11 | 107 | 173 | 82 | 91 | null | null |
alexander-at-github/eta | compiler/ETA/Prelude/PrelNames.hs | bsd-3-clause | mkThisGhcModule :: FastString -> Module
mkThisGhcModule m = mkModule thisGhcPackageKey (mkModuleNameFS m) | 105 | mkThisGhcModule :: FastString -> Module
mkThisGhcModule m = mkModule thisGhcPackageKey (mkModuleNameFS m) | 105 | mkThisGhcModule m = mkModule thisGhcPackageKey (mkModuleNameFS m) | 65 | false | true | 0 | 7 | 11 | 34 | 15 | 19 | null | null |
haskell-opengl/OpenGLRaw | src/Graphics/GL/Functions/F11.hs | bsd-3-clause | ptr_glGetNamedProgramLocalParameterIivEXT :: FunPtr (GLuint -> GLenum -> GLuint -> Ptr GLint -> IO ())
ptr_glGetNamedProgramLocalParameterIivEXT = unsafePerformIO $ getCommand "glGetNamedProgramLocalParameterIivEXT" | 215 | ptr_glGetNamedProgramLocalParameterIivEXT :: FunPtr (GLuint -> GLenum -> GLuint -> Ptr GLint -> IO ())
ptr_glGetNamedProgramLocalParameterIivEXT = unsafePerformIO $ getCommand "glGetNamedProgramLocalParameterIivEXT" | 215 | ptr_glGetNamedProgramLocalParameterIivEXT = unsafePerformIO $ getCommand "glGetNamedProgramLocalParameterIivEXT" | 112 | false | true | 0 | 12 | 19 | 48 | 23 | 25 | null | null |
emwap/feldspar-compiler | lib/Feldspar/Compiler/Backend/C/Library.hs | bsd-3-clause | makeHFileName :: String -> String
makeHFileName = (<.> "h") | 59 | makeHFileName :: String -> String
makeHFileName = (<.> "h") | 59 | makeHFileName = (<.> "h") | 25 | false | true | 0 | 5 | 8 | 19 | 11 | 8 | null | null |
olorin/amazonka | amazonka-ec2/gen/Network/AWS/EC2/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'ImportSnapshotTask' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'istSnapshotTaskDetail'
--
-- * 'istImportTaskId'
--
-- * 'istDescription'
importSnapshotTask
:: ImportSnapshotTask
importSnapshotTask =
... | 452 | importSnapshotTask
:: ImportSnapshotTask
importSnapshotTask =
ImportSnapshotTask'
{ _istSnapshotTaskDetail = Nothing
, _istImportTaskId = Nothing
, _istDescription = Nothing
} | 199 | importSnapshotTask =
ImportSnapshotTask'
{ _istSnapshotTaskDetail = Nothing
, _istImportTaskId = Nothing
, _istDescription = Nothing
} | 154 | true | true | 0 | 6 | 84 | 40 | 28 | 12 | null | null |
JamesSullivan1/Minisculus | src/MinisculusParser.hs | mit | moreExprExpected = "'+', '-', " ++ termExpected | 50 | moreExprExpected = "'+', '-', " ++ termExpected | 50 | moreExprExpected = "'+', '-', " ++ termExpected | 50 | false | false | 0 | 5 | 9 | 10 | 5 | 5 | null | null |
mayeranalytics/nanoPage | src/Internal/FileDB.hs | mit | splitPagePreviewContent :: BS8.ByteString -> (BS8.ByteString, BS8.ByteString)
splitPagePreviewContent bs = (p, c) where
brk = "---" :: BS8.ByteString
(p', c') = BS8.breakSubstring brk bs
(p,c) | c' == "" = ("", p')
| otherwise = (p', BS8.drop 3 c')
-- | Create the page identified by @pageDir@ from Fi... | 330 | splitPagePreviewContent :: BS8.ByteString -> (BS8.ByteString, BS8.ByteString)
splitPagePreviewContent bs = (p, c) where
brk = "---" :: BS8.ByteString
(p', c') = BS8.breakSubstring brk bs
(p,c) | c' == "" = ("", p')
| otherwise = (p', BS8.drop 3 c')
-- | Create the page identified by @pageDir@ from Fi... | 330 | splitPagePreviewContent bs = (p, c) where
brk = "---" :: BS8.ByteString
(p', c') = BS8.breakSubstring brk bs
(p,c) | c' == "" = ("", p')
| otherwise = (p', BS8.drop 3 c')
-- | Create the page identified by @pageDir@ from FileDB @db@. | 252 | false | true | 0 | 10 | 67 | 118 | 64 | 54 | null | null |
Altech/haScm | src/Scheme/Evaluator/Utils.hs | gpl-3.0 | runIOThrows :: IOThrowsError String -> IO String
runIOThrows action = runErrorT (trapError action) >>= return . extractValue | 124 | runIOThrows :: IOThrowsError String -> IO String
runIOThrows action = runErrorT (trapError action) >>= return . extractValue | 124 | runIOThrows action = runErrorT (trapError action) >>= return . extractValue | 75 | false | true | 0 | 8 | 16 | 46 | 20 | 26 | null | null |
gridaphobe/ghc | compiler/llvmGen/LlvmCodeGen/CodeGen.hs | bsd-3-clause | genCall (PrimTarget (MO_UF_Conv w)) [dst] [e] = runStmtsDecls $ do
dstV <- getCmmRegW (CmmLocal dst)
let ty = cmmToLlvmType $ localRegType dst
width = widthToLlvmFloat w
castV <- lift $ mkLocalVar ty
ve <- exprToVarW e
statement $ Assignment castV $ Cast LM_Uitofp ve width
statement $ St... | 334 | genCall (PrimTarget (MO_UF_Conv w)) [dst] [e] = runStmtsDecls $ do
dstV <- getCmmRegW (CmmLocal dst)
let ty = cmmToLlvmType $ localRegType dst
width = widthToLlvmFloat w
castV <- lift $ mkLocalVar ty
ve <- exprToVarW e
statement $ Assignment castV $ Cast LM_Uitofp ve width
statement $ St... | 334 | genCall (PrimTarget (MO_UF_Conv w)) [dst] [e] = runStmtsDecls $ do
dstV <- getCmmRegW (CmmLocal dst)
let ty = cmmToLlvmType $ localRegType dst
width = widthToLlvmFloat w
castV <- lift $ mkLocalVar ty
ve <- exprToVarW e
statement $ Assignment castV $ Cast LM_Uitofp ve width
statement $ St... | 334 | false | false | 0 | 12 | 81 | 132 | 60 | 72 | null | null |
IgorRodic/fp16-Pongout | src/Main.hs | mit | resetGame :: PongoutGame -> PongoutGame
resetGame game = game
{ ball1 = createGameObject (0, -120) (ballRadius, ballRadius) ("images/ball1.png", 581, 604)
, ball2 = createGameObject (0, 120) (ballRadius, ballRadius) ("images/ball2.png", 581, 604)
, ball1Vel = (0, -200)
, ball2Vel = (0, 200)
, ball1Collisio... | 891 | resetGame :: PongoutGame -> PongoutGame
resetGame game = game
{ ball1 = createGameObject (0, -120) (ballRadius, ballRadius) ("images/ball1.png", 581, 604)
, ball2 = createGameObject (0, 120) (ballRadius, ballRadius) ("images/ball2.png", 581, 604)
, ball1Vel = (0, -200)
, ball2Vel = (0, 200)
, ball1Collisio... | 891 | resetGame game = game
{ ball1 = createGameObject (0, -120) (ballRadius, ballRadius) ("images/ball1.png", 581, 604)
, ball2 = createGameObject (0, 120) (ballRadius, ballRadius) ("images/ball2.png", 581, 604)
, ball1Vel = (0, -200)
, ball2Vel = (0, 200)
, ball1Collision = 0
, ball2Collision = 0
, player1... | 851 | false | true | 0 | 11 | 187 | 304 | 187 | 117 | null | null |
IreneKnapp/direct-opengl | Graphics/Rendering/OpenGL/GLU/Tessellation.hs | bsd-3-clause | offsetOfProperty :: Storable v => v -> Int
offsetOfProperty v = alignOffset v (3 * sizeOf x)
where AnnotatedVertex (Vertex3 x _ _) _ = undefined | 147 | offsetOfProperty :: Storable v => v -> Int
offsetOfProperty v = alignOffset v (3 * sizeOf x)
where AnnotatedVertex (Vertex3 x _ _) _ = undefined | 147 | offsetOfProperty v = alignOffset v (3 * sizeOf x)
where AnnotatedVertex (Vertex3 x _ _) _ = undefined | 104 | false | true | 0 | 8 | 28 | 62 | 30 | 32 | null | null |
yav/sequent-core | src/SequentCore.hs | bsd-3-clause | commandToCoreExpr :: Command b -> GHC.Expr b
commandToCoreExpr cmd = foldl addLet baseExpr (cmdLet cmd)
where
addLet e b = GHC.Let (toCoreBind b) e
baseExpr = foldl (flip frameToCoreExpr)
(valueToCoreExpr (cmdValue cmd))
(cmdCont cmd) | 288 | commandToCoreExpr :: Command b -> GHC.Expr b
commandToCoreExpr cmd = foldl addLet baseExpr (cmdLet cmd)
where
addLet e b = GHC.Let (toCoreBind b) e
baseExpr = foldl (flip frameToCoreExpr)
(valueToCoreExpr (cmdValue cmd))
(cmdCont cmd) | 288 | commandToCoreExpr cmd = foldl addLet baseExpr (cmdLet cmd)
where
addLet e b = GHC.Let (toCoreBind b) e
baseExpr = foldl (flip frameToCoreExpr)
(valueToCoreExpr (cmdValue cmd))
(cmdCont cmd) | 243 | false | true | 2 | 8 | 87 | 117 | 49 | 68 | null | null |
lslah/nvim-hs | library/Neovim/API/Parser.hs | apache-2.0 | -- | Run @nvim --api-info@ and parse its output.
parseAPI :: IO (Either Doc NeovimAPI)
parseAPI = either (Left . P.text) extractAPI <$> decodeAPI | 145 | parseAPI :: IO (Either Doc NeovimAPI)
parseAPI = either (Left . P.text) extractAPI <$> decodeAPI | 96 | parseAPI = either (Left . P.text) extractAPI <$> decodeAPI | 58 | true | true | 0 | 9 | 23 | 41 | 21 | 20 | null | null |
facebookincubator/duckling | tests/Duckling/AmountOfMoney/NL/Tests.hs | bsd-3-clause | tests :: TestTree
tests = testGroup "NL Tests"
[ makeCorpusTest [Seal AmountOfMoney] corpus
] | 97 | tests :: TestTree
tests = testGroup "NL Tests"
[ makeCorpusTest [Seal AmountOfMoney] corpus
] | 97 | tests = testGroup "NL Tests"
[ makeCorpusTest [Seal AmountOfMoney] corpus
] | 79 | false | true | 0 | 9 | 17 | 38 | 16 | 22 | null | null |
tekul/cryptonite | Crypto/Cipher/AES/Primitive.hs | bsd-3-clause | withNewGCMSt :: AESGCM -> (Ptr AESGCM -> IO ()) -> IO AESGCM
withNewGCMSt (AESGCM gcmSt) f = B.copy gcmSt (f . castPtr) >>= \sm2 -> return (AESGCM sm2) | 151 | withNewGCMSt :: AESGCM -> (Ptr AESGCM -> IO ()) -> IO AESGCM
withNewGCMSt (AESGCM gcmSt) f = B.copy gcmSt (f . castPtr) >>= \sm2 -> return (AESGCM sm2) | 151 | withNewGCMSt (AESGCM gcmSt) f = B.copy gcmSt (f . castPtr) >>= \sm2 -> return (AESGCM sm2) | 90 | false | true | 0 | 11 | 27 | 84 | 40 | 44 | null | null |
tkasu/haskellbook-adventure | app/Chap9.hs | bsd-3-clause | myOr (x:xs) = if x == True then True else myOr xs | 49 | myOr (x:xs) = if x == True then True else myOr xs | 49 | myOr (x:xs) = if x == True then True else myOr xs | 49 | false | false | 0 | 7 | 11 | 31 | 16 | 15 | null | null |
KenetJervet/giterate | src/Giterate/Internal.hs | bsd-3-clause | gitCommit :: String -> IO CmdResult
gitCommit msg = runGitCmd_ ["commit", "-m", msg] | 84 | gitCommit :: String -> IO CmdResult
gitCommit msg = runGitCmd_ ["commit", "-m", msg] | 84 | gitCommit msg = runGitCmd_ ["commit", "-m", msg] | 48 | false | true | 0 | 6 | 12 | 33 | 17 | 16 | null | null |
agentm/project-m36 | src/lib/ProjectM36/AtomFunctionBody.hs | unlicense | compiledAtomFunctionBody :: AtomFunctionBodyType -> AtomFunctionBody
compiledAtomFunctionBody = FunctionBuiltInBody | 117 | compiledAtomFunctionBody :: AtomFunctionBodyType -> AtomFunctionBody
compiledAtomFunctionBody = FunctionBuiltInBody | 115 | compiledAtomFunctionBody = FunctionBuiltInBody | 46 | false | true | 0 | 5 | 9 | 15 | 8 | 7 | null | null |
trskop/cabal | Cabal/Distribution/Simple/PreProcess.hs | bsd-3-clause | ppC2hs :: BuildInfo -> LocalBuildInfo -> PreProcessor
ppC2hs bi lbi =
PreProcessor {
platformIndependent = False,
runPreProcessor = \(inBaseDir, inRelativeFile)
(outBaseDir, outRelativeFile) verbosity -> do
(c2hsProg, _, _) <- requireProgramVersion verbosity
... | 1,507 | ppC2hs :: BuildInfo -> LocalBuildInfo -> PreProcessor
ppC2hs bi lbi =
PreProcessor {
platformIndependent = False,
runPreProcessor = \(inBaseDir, inRelativeFile)
(outBaseDir, outRelativeFile) verbosity -> do
(c2hsProg, _, _) <- requireProgramVersion verbosity
... | 1,507 | ppC2hs bi lbi =
PreProcessor {
platformIndependent = False,
runPreProcessor = \(inBaseDir, inRelativeFile)
(outBaseDir, outRelativeFile) verbosity -> do
(c2hsProg, _, _) <- requireProgramVersion verbosity
c2hsProgram (orLaterVersion (Version [0,15] []))... | 1,453 | false | true | 0 | 22 | 491 | 359 | 192 | 167 | null | null |
tjakway/ghcjvm | compiler/coreSyn/CoreFVs.hs | bsd-3-clause | -- Look through type synonyms (Trac #4912)
orphNamesOfType (TyVarTy _) = emptyNameSet | 94 | orphNamesOfType (TyVarTy _) = emptyNameSet | 51 | orphNamesOfType (TyVarTy _) = emptyNameSet | 51 | true | false | 0 | 7 | 20 | 16 | 8 | 8 | null | null |
xldenis/ruby | src/Ruby/Parser/Lexer.hs | bsd-3-clause | startLetter :: Parser Char
startLetter = oneOf chars
where chars = "@$_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" :: String | 136 | startLetter :: Parser Char
startLetter = oneOf chars
where chars = "@$_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" :: String | 136 | startLetter = oneOf chars
where chars = "@$_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" :: String | 109 | false | true | 0 | 5 | 15 | 28 | 14 | 14 | null | null |
cies/htoml | src/Text/Toml/Types.hs | bsd-3-clause | -- | Convenience function to get a boolean value.
isExplicit :: Explicitness -> Bool
isExplicit Explicit = True | 111 | isExplicit :: Explicitness -> Bool
isExplicit Explicit = True | 61 | isExplicit Explicit = True | 26 | true | true | 0 | 5 | 17 | 19 | 10 | 9 | null | null |
lambdageek/insomnia | src/Insomnia/Typecheck/TypeDefn.hs | bsd-3-clause | kofTypeDefn :: TypeDefn -> TC Kind
kofTypeDefn d =
case d of
DataDefn dd -> kofDataDefn dd
EnumDefn {} -> return KType | 124 | kofTypeDefn :: TypeDefn -> TC Kind
kofTypeDefn d =
case d of
DataDefn dd -> kofDataDefn dd
EnumDefn {} -> return KType | 124 | kofTypeDefn d =
case d of
DataDefn dd -> kofDataDefn dd
EnumDefn {} -> return KType | 89 | false | true | 3 | 6 | 27 | 46 | 23 | 23 | null | null |
dancor/pgn | src/Data/PGN.hs | bsd-2-clause | -- Parsec String () for characters inside a string token.
pgnStringChar :: Parsec String () Char
pgnStringChar = do
c <- satisfy (\c -> isPrint c && c /= '"')
if c == '\\'
then P.oneOf "\\\""
else return c | 217 | pgnStringChar :: Parsec String () Char
pgnStringChar = do
c <- satisfy (\c -> isPrint c && c /= '"')
if c == '\\'
then P.oneOf "\\\""
else return c | 159 | pgnStringChar = do
c <- satisfy (\c -> isPrint c && c /= '"')
if c == '\\'
then P.oneOf "\\\""
else return c | 120 | true | true | 0 | 14 | 51 | 79 | 37 | 42 | null | null |
brendanhay/gogol | gogol-drive/gen/Network/Google/Resource/Drive/Permissions/Update.hs | mpl-2.0 | -- | Creates a value of 'PermissionsUpdate' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'puPayload'
--
-- * 'puSupportsAllDrives'
--
-- * 'puRemoveExpiration'
--
-- * 'puUseDomainAdminAccess'
--
-- * 'puTransferOwnership'
--
-- * '... | 891 | permissionsUpdate
:: Permission -- ^ 'puPayload'
-> Text -- ^ 'puFileId'
-> Text -- ^ 'puPermissionId'
-> PermissionsUpdate
permissionsUpdate pPuPayload_ pPuFileId_ pPuPermissionId_ =
PermissionsUpdate'
{ _puPayload = pPuPayload_
, _puSupportsAllDrives = False
, _puRemoveExpiration = False... | 505 | permissionsUpdate pPuPayload_ pPuFileId_ pPuPermissionId_ =
PermissionsUpdate'
{ _puPayload = pPuPayload_
, _puSupportsAllDrives = False
, _puRemoveExpiration = False
, _puUseDomainAdminAccess = False
, _puTransferOwnership = False
, _puFileId = pPuFileId_
, _puSupportsTeamDrives = False
... | 365 | true | true | 0 | 9 | 172 | 111 | 72 | 39 | null | null |
GaloisInc/saw-script | saw-core/src/Verifier/SAW/Simulator/RME.hs | bsd-3-clause | -- streamGet :: (a :: sort 0) -> Stream a -> Nat -> a;
streamGetOp :: RPrim
streamGetOp =
Prims.tvalFun $ \tp ->
Prims.strictFun $ \xs ->
Prims.strictFun $ \ix -> Prims.Prim $ case ix of
VNat n -> pure $ IntTrie.apply (toStream xs) (toInteger n)
VIntToNat _i -> error "RME.streamGetOp : symbolic integer ... | 1,024 | streamGetOp :: RPrim
streamGetOp =
Prims.tvalFun $ \tp ->
Prims.strictFun $ \xs ->
Prims.strictFun $ \ix -> Prims.Prim $ case ix of
VNat n -> pure $ IntTrie.apply (toStream xs) (toInteger n)
VIntToNat _i -> error "RME.streamGetOp : symbolic integer TODO"
VBVToNat _sz bv ->
do let trie = toStre... | 969 | streamGetOp =
Prims.tvalFun $ \tp ->
Prims.strictFun $ \xs ->
Prims.strictFun $ \ix -> Prims.Prim $ case ix of
VNat n -> pure $ IntTrie.apply (toStream xs) (toInteger n)
VIntToNat _i -> error "RME.streamGetOp : symbolic integer TODO"
VBVToNat _sz bv ->
do let trie = toStream xs
lo... | 948 | true | true | 0 | 25 | 358 | 317 | 155 | 162 | null | null |
graninas/Andromeda | src/Andromeda/Assets/SpaceshipSample.hs | bsd-3-clause | boostersNozzle2P = (boostersAddr, nozzle2PCompIdx) | 52 | boostersNozzle2P = (boostersAddr, nozzle2PCompIdx) | 52 | boostersNozzle2P = (boostersAddr, nozzle2PCompIdx) | 52 | false | false | 0 | 5 | 5 | 12 | 7 | 5 | null | null |
vincenthz/hs-crypto-pubkey | Crypto/PubKey/MaskGenFunction.hs | bsd-2-clause | -- | Mask generation algorithm MGF1
mgf1 :: MaskGenAlgorithm
mgf1 hashF seed len = loop B.empty 0
where loop t counter
| B.length t >= len = B.take len t
| otherwise = let counterBS = i2ospOf_ 4 counter
newT = t `B.append` hashF (seed `B.append` ... | 390 | mgf1 :: MaskGenAlgorithm
mgf1 hashF seed len = loop B.empty 0
where loop t counter
| B.length t >= len = B.take len t
| otherwise = let counterBS = i2ospOf_ 4 counter
newT = t `B.append` hashF (seed `B.append` counterBS)
... | 354 | mgf1 hashF seed len = loop B.empty 0
where loop t counter
| B.length t >= len = B.take len t
| otherwise = let counterBS = i2ospOf_ 4 counter
newT = t `B.append` hashF (seed `B.append` counterBS)
in loop newT (c... | 329 | true | true | 0 | 13 | 159 | 124 | 61 | 63 | null | null |
markus-git/co-feldspar | src/Feldspar/Software/Primitive/Backend.hs | bsd-3-clause | compSign t a | integerType t = do
addTagMacro
a' <- compPrim $ Prim a
return [cexp| TAG("signum", ($a' > 0) - ($a' < 0)) |] | 129 | compSign t a | integerType t = do
addTagMacro
a' <- compPrim $ Prim a
return [cexp| TAG("signum", ($a' > 0) - ($a' < 0)) |] | 129 | compSign t a | integerType t = do
addTagMacro
a' <- compPrim $ Prim a
return [cexp| TAG("signum", ($a' > 0) - ($a' < 0)) |] | 129 | false | false | 1 | 10 | 31 | 48 | 21 | 27 | null | null |
muspellsson/hiccup | TclLib/Interp.hs | lgpl-2.1 | interp_eval args = case args of
(n:xs) -> do
it <- toPath n >>= getInterp
interpEval it xs
_ -> argErr "interp eval" | 144 | interp_eval args = case args of
(n:xs) -> do
it <- toPath n >>= getInterp
interpEval it xs
_ -> argErr "interp eval" | 144 | interp_eval args = case args of
(n:xs) -> do
it <- toPath n >>= getInterp
interpEval it xs
_ -> argErr "interp eval" | 144 | false | false | 0 | 12 | 50 | 57 | 26 | 31 | null | null |
thoughtpolice/binary-serialise-cbor | tests/ReferenceImpl.hs | bsd-3-clause | word64ToNet :: Word64 -> (Word8, Word8, Word8, Word8,
Word8, Word8, Word8, Word8)
word64ToNet w =
( fromIntegral ((w `shiftR` (8*7)) .&. 0xff)
, fromIntegral ((w `shiftR` (8*6)) .&. 0xff)
, fromIntegral ((w `shiftR` (8*5)) .&. 0xff)
, fromIntegral ((w `shiftR` (8*4)) .&. 0xff)
... | 521 | word64ToNet :: Word64 -> (Word8, Word8, Word8, Word8,
Word8, Word8, Word8, Word8)
word64ToNet w =
( fromIntegral ((w `shiftR` (8*7)) .&. 0xff)
, fromIntegral ((w `shiftR` (8*6)) .&. 0xff)
, fromIntegral ((w `shiftR` (8*5)) .&. 0xff)
, fromIntegral ((w `shiftR` (8*4)) .&. 0xff)
... | 521 | word64ToNet w =
( fromIntegral ((w `shiftR` (8*7)) .&. 0xff)
, fromIntegral ((w `shiftR` (8*6)) .&. 0xff)
, fromIntegral ((w `shiftR` (8*5)) .&. 0xff)
, fromIntegral ((w `shiftR` (8*4)) .&. 0xff)
, fromIntegral ((w `shiftR` (8*3)) .&. 0xff)
, fromIntegral ((w `shiftR` (8*2)) .&. 0xff)
, from... | 413 | false | true | 0 | 12 | 133 | 274 | 161 | 113 | null | null |
SKA-ScienceDataProcessor/RC | MS5/dna/flow/Flow/Vector.hs | apache-2.0 | toDeviceVector v = do v' <- dupDeviceVector v; freeVector v; return v'
#endif
-- | Create a copy of the given vector as a C vector. Leaves the
-- original vector intact. | 185 | toDeviceVector v = do v' <- dupDeviceVector v; freeVector v; return v'
#endif
-- | Create a copy of the given vector as a C vector. Leaves the
-- original vector intact. | 185 | toDeviceVector v = do v' <- dupDeviceVector v; freeVector v; return v'
#endif
-- | Create a copy of the given vector as a C vector. Leaves the
-- original vector intact. | 185 | false | false | 0 | 8 | 47 | 36 | 17 | 19 | null | null |
sdiehl/ghc | compiler/GHC/Cmm.hs | bsd-3-clause | topInfoTable _ = Nothing | 44 | topInfoTable _ = Nothing | 44 | topInfoTable _ = Nothing | 44 | false | false | 0 | 5 | 23 | 9 | 4 | 5 | null | null |
deontologician/orbRPG | Game/OrbRPG/HAdventure/Engine.hs | gpl-3.0 | parseObjects [x] = do lookupTarget x >>= setS dirO
setS indO None | 95 | parseObjects [x] = do lookupTarget x >>= setS dirO
setS indO None | 95 | parseObjects [x] = do lookupTarget x >>= setS dirO
setS indO None | 95 | false | false | 0 | 8 | 41 | 34 | 14 | 20 | null | null |
patperry/hs-linear-algebra | lib/Numeric/LinearAlgebra/Matrix/Herm.hs | bsd-3-clause | hermRankKUpdate :: (BLAS3 e)
=> e -> Trans -> Matrix e -> e -> Herm Matrix e
-> Herm Matrix e
hermRankKUpdate alpha trans a beta (Herm uplo c) = runST $ do
mc' <- M.newCopy c
hermRankKUpdateM_ alpha trans a beta (Herm uplo mc')
c' <- M.unsafeFreeze mc'
return $ Herm uplo ... | 621 | hermRankKUpdate :: (BLAS3 e)
=> e -> Trans -> Matrix e -> e -> Herm Matrix e
-> Herm Matrix e
hermRankKUpdate alpha trans a beta (Herm uplo c) = runST $ do
mc' <- M.newCopy c
hermRankKUpdateM_ alpha trans a beta (Herm uplo mc')
c' <- M.unsafeFreeze mc'
return $ Herm uplo ... | 621 | hermRankKUpdate alpha trans a beta (Herm uplo c) = runST $ do
mc' <- M.newCopy c
hermRankKUpdateM_ alpha trans a beta (Herm uplo mc')
c' <- M.unsafeFreeze mc'
return $ Herm uplo c'
-- | @hermRank2KUpdate alpha trans a b beta c@ returns
-- @c := alpha * a * b^H + conj(alpha) * b * a^H + beta * c@ when @... | 495 | false | true | 0 | 11 | 169 | 139 | 67 | 72 | null | null |
dysinger/amazonka | amazonka-ec2/gen/Network/AWS/EC2/Types.hs | mpl-2.0 | -- | [EC2-VPC] The ID of the VPC for the security group.
sgVpcId :: Lens' SecurityGroup (Maybe Text)
sgVpcId = lens _sgVpcId (\s a -> s { _sgVpcId = a }) | 153 | sgVpcId :: Lens' SecurityGroup (Maybe Text)
sgVpcId = lens _sgVpcId (\s a -> s { _sgVpcId = a }) | 96 | sgVpcId = lens _sgVpcId (\s a -> s { _sgVpcId = a }) | 52 | true | true | 1 | 9 | 30 | 49 | 25 | 24 | null | null |
NorfairKing/the-notes | src/Computability/Languages.hs | gpl-2.0 | languages :: Note
languages = section "Languages" $ do
languageDefinition
languageConcatenationDefinition
concatenationAssociative
concatenationNotCommutative
selfConcatenationDefinition
kleeneStarDefinition
languagePlusDefinition
languesOverAlphabetDefinition
infiniteLanguagesCounta... | 382 | languages :: Note
languages = section "Languages" $ do
languageDefinition
languageConcatenationDefinition
concatenationAssociative
concatenationNotCommutative
selfConcatenationDefinition
kleeneStarDefinition
languagePlusDefinition
languesOverAlphabetDefinition
infiniteLanguagesCounta... | 382 | languages = section "Languages" $ do
languageDefinition
languageConcatenationDefinition
concatenationAssociative
concatenationNotCommutative
selfConcatenationDefinition
kleeneStarDefinition
languagePlusDefinition
languesOverAlphabetDefinition
infiniteLanguagesCountable
uncountabl... | 364 | false | true | 0 | 7 | 63 | 51 | 20 | 31 | null | null |
flowbox-public/language-c-quote | Language/C/Quote/Base.hs | bsd-3-clause | qqBlockItemListE :: [C.BlockItem] -> Maybe (Q Exp)
qqBlockItemListE [] = Just [|[]|] | 84 | qqBlockItemListE :: [C.BlockItem] -> Maybe (Q Exp)
qqBlockItemListE [] = Just [|[]|] | 84 | qqBlockItemListE [] = Just [|[]|] | 33 | false | true | 0 | 8 | 11 | 40 | 21 | 19 | null | null |
LeventErkok/conjugateGradient | Math/ConjugateGradient.hs | bsd-3-clause | -- | Multiply a sparse-matrix by a scalar.
sMulSM :: Num a => a -> SM a -> SM a
sMulSM s (SM (n, m)) = SM (n, IM.map (s `sMulSV`) m) | 132 | sMulSM :: Num a => a -> SM a -> SM a
sMulSM s (SM (n, m)) = SM (n, IM.map (s `sMulSV`) m) | 89 | sMulSM s (SM (n, m)) = SM (n, IM.map (s `sMulSV`) m) | 52 | true | true | 0 | 8 | 31 | 77 | 39 | 38 | null | null |
olorin/git-vogue | src/git-vogue-hlint.hs | bsd-3-clause | showNotes :: [Note] -> String
showNotes = intercalate ", " . fmap show . filter use
where use ValidInstance{} = False -- Not important enough to tell an end user
use _ = True | 188 | showNotes :: [Note] -> String
showNotes = intercalate ", " . fmap show . filter use
where use ValidInstance{} = False -- Not important enough to tell an end user
use _ = True | 188 | showNotes = intercalate ", " . fmap show . filter use
where use ValidInstance{} = False -- Not important enough to tell an end user
use _ = True | 158 | false | true | 1 | 7 | 47 | 59 | 29 | 30 | null | null |
snoyberg/ghc | compiler/simplCore/OccurAnal.hs | bsd-3-clause | -- It's OK to use nonDetFoldUFM here because addIdOcc commutes
addIdOcc :: Id -> UsageDetails -> UsageDetails
addIdOcc v u | isId v = addOneOcc u v NoOccInfo
| otherwise = u | 190 | addIdOcc :: Id -> UsageDetails -> UsageDetails
addIdOcc v u | isId v = addOneOcc u v NoOccInfo
| otherwise = u | 126 | addIdOcc v u | isId v = addOneOcc u v NoOccInfo
| otherwise = u | 79 | true | true | 0 | 8 | 48 | 50 | 23 | 27 | null | null |
BitFunctor/bitfunctor-theory | src/Network/BitFunctor/Theory/theoryd.hs | mit | heorydArgsInterface :: IO (CmdLnInterface TheoryDArguments)
theorydArgsInterface =
(`setAppDescr` "Theory daemon program as a part of Bitfunctor environment")
<$> (`setAppEpilog` "BitFunctor team")
<$> mkApp theorydArgsParser
| 232 | theorydArgsInterface :: IO (CmdLnInterface TheoryDArguments)
theorydArgsInterface =
(`setAppDescr` "Theory daemon program as a part of Bitfunctor environment")
<$> (`setAppEpilog` "BitFunctor team")
<$> mkApp theorydArgsParser | 232 | theorydArgsInterface =
(`setAppDescr` "Theory daemon program as a part of Bitfunctor environment")
<$> (`setAppEpilog` "BitFunctor team")
<$> mkApp theorydArgsParser | 171 | false | true | 4 | 7 | 30 | 45 | 25 | 20 | null | null |
advancedtelematic/quickcheck-state-machine-model | src/Test/StateMachine/Z.hs | bsd-3-clause | singleton :: a -> b -> Rel a b
singleton x y = [(x, y)] | 55 | singleton :: a -> b -> Rel a b
singleton x y = [(x, y)] | 55 | singleton x y = [(x, y)] | 24 | false | true | 0 | 7 | 14 | 38 | 20 | 18 | null | null |
brendanhay/gogol | gogol-youtube/gen/Network/Google/YouTube/Types/Product.hs | mpl-2.0 | -- | The approximate number of items that the subscription points to.
scdTotalItemCount :: Lens' SubscriptionContentDetails (Maybe Word32)
scdTotalItemCount
= lens _scdTotalItemCount
(\ s a -> s{_scdTotalItemCount = a})
. mapping _Coerce | 251 | scdTotalItemCount :: Lens' SubscriptionContentDetails (Maybe Word32)
scdTotalItemCount
= lens _scdTotalItemCount
(\ s a -> s{_scdTotalItemCount = a})
. mapping _Coerce | 181 | scdTotalItemCount
= lens _scdTotalItemCount
(\ s a -> s{_scdTotalItemCount = a})
. mapping _Coerce | 112 | true | true | 0 | 10 | 45 | 55 | 28 | 27 | null | null |
sushantmahajan/programs | haskell-work/haskell/parser_.hs | cc0-1.0 | bterm = sp *> (chainl appterm ((mult <@ const (f "*") ) <|> (slash <@ const (f "/") ))) | 87 | bterm = sp *> (chainl appterm ((mult <@ const (f "*") ) <|> (slash <@ const (f "/") ))) | 87 | bterm = sp *> (chainl appterm ((mult <@ const (f "*") ) <|> (slash <@ const (f "/") ))) | 87 | false | false | 3 | 14 | 18 | 63 | 30 | 33 | null | null |
brendanhay/gogol | gogol-fusiontables/gen/Network/Google/FusionTables/Types/Product.hs | mpl-2.0 | -- | The kind of item this is. For a column, this is always
-- fusiontables#column.
cKind :: Lens' Column Text
cKind = lens _cKind (\ s a -> s{_cKind = a}) | 155 | cKind :: Lens' Column Text
cKind = lens _cKind (\ s a -> s{_cKind = a}) | 71 | cKind = lens _cKind (\ s a -> s{_cKind = a}) | 44 | true | true | 1 | 9 | 31 | 47 | 23 | 24 | null | null |
idris-hackers/idris-bot | src/Main.hs | bsd-3-clause | prepareHomedir :: Maybe FilePath -> IO (FilePath, [FilePath], Bool)
prepareHomedir prelude = do
libdir <- init `fmap` readProcess "idris" ["--libdir"] ""
homedir <- mktmpdir "idris-bot"
ents <- getDirectoryContents libdir
let pkgs = ents \\ [".","..","rts","llvm","jsrts","oldeffects"]
createDirector... | 611 | prepareHomedir :: Maybe FilePath -> IO (FilePath, [FilePath], Bool)
prepareHomedir prelude = do
libdir <- init `fmap` readProcess "idris" ["--libdir"] ""
homedir <- mktmpdir "idris-bot"
ents <- getDirectoryContents libdir
let pkgs = ents \\ [".","..","rts","llvm","jsrts","oldeffects"]
createDirector... | 611 | prepareHomedir prelude = do
libdir <- init `fmap` readProcess "idris" ["--libdir"] ""
homedir <- mktmpdir "idris-bot"
ents <- getDirectoryContents libdir
let pkgs = ents \\ [".","..","rts","llvm","jsrts","oldeffects"]
createDirectory $ homedir </> "libs"
forM_ pkgs $ \pkg -> copyRec (libdir </> ... | 543 | false | true | 0 | 15 | 150 | 223 | 110 | 113 | null | null |
rscprof/kalium | src/Kalium/Nucleus/Vector/Inline.hs | bsd-3-clause | reorders :: Pattern -> Expression -> Pairs Pattern Expression
reorders p (Taint a) = do
(f, b) <- reorderings a
case f p of
Nothing -> []
Just p' -> [(p', Taint b)] | 188 | reorders :: Pattern -> Expression -> Pairs Pattern Expression
reorders p (Taint a) = do
(f, b) <- reorderings a
case f p of
Nothing -> []
Just p' -> [(p', Taint b)] | 188 | reorders p (Taint a) = do
(f, b) <- reorderings a
case f p of
Nothing -> []
Just p' -> [(p', Taint b)] | 126 | false | true | 0 | 12 | 56 | 90 | 44 | 46 | null | null |
urbanslug/ghc | testsuite/tests/partial-sigs/should_compile/ExtraConstraints3.hs | bsd-3-clause | elem :: _ => _
elem = P.elem | 28 | elem :: _ => _
elem = P.elem | 28 | elem = P.elem | 13 | false | true | 0 | 7 | 7 | 25 | 10 | 15 | null | null |
LambdaMx/haskelldojo | session_4/tictactoe/domix_agus/web/ui.hs | unlicense | -- | Alert using window.alert.
console_log :: String -> Fay ()
console_log = ffi "console['log'](%1)" | 101 | console_log :: String -> Fay ()
console_log = ffi "console['log'](%1)" | 70 | console_log = ffi "console['log'](%1)" | 38 | true | true | 0 | 8 | 14 | 30 | 13 | 17 | null | null |
chrisdone/haskelldb-demo | lib/haskelldb/examples/DB1/Hdb_t2.hs | bsd-3-clause | t2f15 :: Attr T2f15 (Maybe Double)
t2f15 = mkAttr T2f15 | 56 | t2f15 :: Attr T2f15 (Maybe Double)
t2f15 = mkAttr T2f15 | 55 | t2f15 = mkAttr T2f15 | 20 | false | true | 0 | 7 | 10 | 25 | 12 | 13 | null | null |
githubkleon/ConvenientHDL | src/Language/Cynide/Parser.hs | bsd-3-clause | dot = T.dot cynide >> return () | 41 | dot = T.dot cynide >> return () | 41 | dot = T.dot cynide >> return () | 41 | false | false | 0 | 7 | 16 | 20 | 9 | 11 | null | null |
vTurbine/ghc | compiler/basicTypes/BasicTypes.hs | bsd-3-clause | competesWith AlwaysActive _ = True | 54 | competesWith AlwaysActive _ = True | 54 | competesWith AlwaysActive _ = True | 54 | false | false | 0 | 4 | 24 | 13 | 5 | 8 | null | null |
alexbiehl/StringMap | Data/StringMap/Strict.hs | mit | map' f k (LsSeL cs v) = LsSeL cs $! (f (k []) v) | 59 | map' f k (LsSeL cs v) = LsSeL cs $! (f (k []) v) | 59 | map' f k (LsSeL cs v) = LsSeL cs $! (f (k []) v) | 59 | false | false | 0 | 10 | 24 | 47 | 21 | 26 | null | null |
slon1024/functional_programming | haskell/Fibonacci.hs | mit | fib3 n =
if n == 0
then 0
else if n == 1
then 1
else fib3(n-1) + fib3(n-2) | 123 | fib3 n =
if n == 0
then 0
else if n == 1
then 1
else fib3(n-1) + fib3(n-2) | 123 | fib3 n =
if n == 0
then 0
else if n == 1
then 1
else fib3(n-1) + fib3(n-2) | 123 | false | false | 0 | 10 | 68 | 57 | 30 | 27 | null | null |
ancientlanguage/haskell-analysis | grammar/src/Grammar/Common/Decompose.hs | mit | decomposeChar '\x1F3A' = "\x0399\x0313\x0300" | 45 | decomposeChar '\x1F3A' = "\x0399\x0313\x0300" | 45 | decomposeChar '\x1F3A' = "\x0399\x0313\x0300" | 45 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
pikajude/kevin | src/Kevin/Util/Logger.hs | gpl-3.0 | render :: Color -> String -> String
render col str = "\027["
++ show (colorAsNum col)
++ "m" ++ rtrimmed
++ "\027[0m"
where
rtrimmed = reverse . dropWhile (\x -> isSpace x || x == '\x0') . reverse $ str | 256 | render :: Color -> String -> String
render col str = "\027["
++ show (colorAsNum col)
++ "m" ++ rtrimmed
++ "\027[0m"
where
rtrimmed = reverse . dropWhile (\x -> isSpace x || x == '\x0') . reverse $ str | 256 | render col str = "\027["
++ show (colorAsNum col)
++ "m" ++ rtrimmed
++ "\027[0m"
where
rtrimmed = reverse . dropWhile (\x -> isSpace x || x == '\x0') . reverse $ str | 220 | false | true | 6 | 13 | 93 | 99 | 46 | 53 | null | null |
shak-mar/botstrats | supervisor/Main.hs | mit | main = do
mutables <- initialMutables =<< connectTo "localhost" (PortNumber 2001)
(forMessages' (withMVar $ server mutables) $ \m -> case m of
Nothing -> return ()
Just message -> do
waiters <- readMVar (waiters mutables)
forM_ waiters $ \(Waiter i f) -> do
... | 494 | main = do
mutables <- initialMutables =<< connectTo "localhost" (PortNumber 2001)
(forMessages' (withMVar $ server mutables) $ \m -> case m of
Nothing -> return ()
Just message -> do
waiters <- readMVar (waiters mutables)
forM_ waiters $ \(Waiter i f) -> do
... | 494 | main = do
mutables <- initialMutables =<< connectTo "localhost" (PortNumber 2001)
(forMessages' (withMVar $ server mutables) $ \m -> case m of
Nothing -> return ()
Just message -> do
waiters <- readMVar (waiters mutables)
forM_ waiters $ \(Waiter i f) -> do
... | 494 | false | false | 1 | 25 | 160 | 188 | 87 | 101 | null | null |
konn/hskk | cocoa/AppDelegate.hs | bsd-3-clause | miscDic2NSDict :: MiscDict -> IO NSDictionary
miscDic2NSDict (MiscDict k loc) = do
nsLog $ "marshaling MiscDict..."
let tag = kind2Tag k
$(objc ['loc :> ''String, 'tag :> ''Int] $
Class ''NSDictionary <: [cexp| @{@$string:(miscDicKindKey): [NSNumber numberWithInt: tag],
... | 361 | miscDic2NSDict :: MiscDict -> IO NSDictionary
miscDic2NSDict (MiscDict k loc) = do
nsLog $ "marshaling MiscDict..."
let tag = kind2Tag k
$(objc ['loc :> ''String, 'tag :> ''Int] $
Class ''NSDictionary <: [cexp| @{@$string:(miscDicKindKey): [NSNumber numberWithInt: tag],
... | 361 | miscDic2NSDict (MiscDict k loc) = do
nsLog $ "marshaling MiscDict..."
let tag = kind2Tag k
$(objc ['loc :> ''String, 'tag :> ''Int] $
Class ''NSDictionary <: [cexp| @{@$string:(miscDicKindKey): [NSNumber numberWithInt: tag],
@$string:(miscDicLocationKey): loc} |]) | 315 | false | true | 0 | 14 | 90 | 95 | 48 | 47 | null | null |
kylcarte/harihara | src/Harihara/Monad.hs | bsd-3-clause | modifyHHEnv :: (HariharaEnv -> HariharaEnv) -> Harihara ()
modifyHHEnv = Harihara . modify | 90 | modifyHHEnv :: (HariharaEnv -> HariharaEnv) -> Harihara ()
modifyHHEnv = Harihara . modify | 90 | modifyHHEnv = Harihara . modify | 31 | false | true | 0 | 7 | 12 | 31 | 16 | 15 | null | null |
angelworm/Kikka | Main.hs | bsd-3-clause | passMsg :: Password -> Message
passMsg p = Message Nothing "PASS" [p] | 69 | passMsg :: Password -> Message
passMsg p = Message Nothing "PASS" [p] | 69 | passMsg p = Message Nothing "PASS" [p] | 38 | false | true | 0 | 7 | 11 | 34 | 15 | 19 | null | null |
juhp/leksah | src/IDE/Core/Types.hs | gpl-2.0 | runWorkspace :: WorkspaceM a -> Workspace -> IDEM a
runWorkspace = runReaderT | 77 | runWorkspace :: WorkspaceM a -> Workspace -> IDEM a
runWorkspace = runReaderT | 77 | runWorkspace = runReaderT | 25 | false | true | 0 | 8 | 11 | 31 | 13 | 18 | null | null |
brendanhay/gogol | gogol-youtube/gen/Network/Google/Resource/YouTube/LiveChatMessages/List.hs | mpl-2.0 | -- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
lcmlUploadType :: Lens' LiveChatMessagesList (Maybe Text)
lcmlUploadType
= lens _lcmlUploadType
(\ s a -> s{_lcmlUploadType = a}) | 208 | lcmlUploadType :: Lens' LiveChatMessagesList (Maybe Text)
lcmlUploadType
= lens _lcmlUploadType
(\ s a -> s{_lcmlUploadType = a}) | 137 | lcmlUploadType
= lens _lcmlUploadType
(\ s a -> s{_lcmlUploadType = a}) | 79 | true | true | 0 | 9 | 34 | 48 | 25 | 23 | null | null |
bitemyapp/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | ddpLocalMinor :: String
ddpLocalMinor = "local-minor" | 53 | ddpLocalMinor :: String
ddpLocalMinor = "local-minor" | 53 | ddpLocalMinor = "local-minor" | 29 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
alexisVallet/haskell-shmup | Config.hs | bsd-3-clause | screenCenter :: (Float,Float)
screenCenter =
let AABB center _ = screenAABB in
center | 89 | screenCenter :: (Float,Float)
screenCenter =
let AABB center _ = screenAABB in
center | 89 | screenCenter =
let AABB center _ = screenAABB in
center | 59 | false | true | 0 | 9 | 16 | 34 | 17 | 17 | null | null |
sherwoodwang/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxSTC_V_NUMBER :: Int
wxSTC_V_NUMBER = 4 | 40 | wxSTC_V_NUMBER :: Int
wxSTC_V_NUMBER = 4 | 40 | wxSTC_V_NUMBER = 4 | 18 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
urbanslug/ghc | compiler/typecheck/TcPatSyn.hs | bsd-3-clause | tcPatSynBuilderOcc :: CtOrigin -> PatSyn -> TcM (HsExpr TcId, TcRhoType)
-- The result type should be fully instantiated
tcPatSynBuilderOcc orig ps
| Just (builder_id, add_void_arg) <- builder
= do { (wrap, rho) <- deeplyInstantiate orig (idType builder_id)
; let inst_fun = mkHsWrap wrap (HsVar builder_id)
... | 2,747 | tcPatSynBuilderOcc :: CtOrigin -> PatSyn -> TcM (HsExpr TcId, TcRhoType)
tcPatSynBuilderOcc orig ps
| Just (builder_id, add_void_arg) <- builder
= do { (wrap, rho) <- deeplyInstantiate orig (idType builder_id)
; let inst_fun = mkHsWrap wrap (HsVar builder_id)
; if add_void_arg
then return ( H... | 2,699 | tcPatSynBuilderOcc orig ps
| Just (builder_id, add_void_arg) <- builder
= do { (wrap, rho) <- deeplyInstantiate orig (idType builder_id)
; let inst_fun = mkHsWrap wrap (HsVar builder_id)
; if add_void_arg
then return ( HsApp (noLoc inst_fun) (nlHsVar voidPrimId)
, tcFunRe... | 2,626 | true | true | 2 | 13 | 654 | 225 | 112 | 113 | null | null |
monsanto/hie | hie.hs | gpl-3.0 | extractPat (L.PList _ pats) = merges extractPat pats | 52 | extractPat (L.PList _ pats) = merges extractPat pats | 52 | extractPat (L.PList _ pats) = merges extractPat pats | 52 | false | false | 0 | 7 | 7 | 25 | 11 | 14 | null | null |
jjingram/satori | src/Parser.hs | bsd-3-clause | quasiatom :: Parser (Quasisexp Name)
quasiatom = fmap Quasiatom (fmap Integer L.integer <|> symbol <|> Parser.nil) | 114 | quasiatom :: Parser (Quasisexp Name)
quasiatom = fmap Quasiatom (fmap Integer L.integer <|> symbol <|> Parser.nil) | 114 | quasiatom = fmap Quasiatom (fmap Integer L.integer <|> symbol <|> Parser.nil) | 77 | false | true | 2 | 10 | 15 | 52 | 22 | 30 | null | null |
cryptonomicon314/pyccoon-hs-xml | Text/XML/Light/Proc.hs | bsd-3-clause | -- | Find the left-most occurrence of an element matching given name.
findElement :: QName -> Element -> Maybe Element
findElement q e = listToMaybe (findElements q e) | 178 | findElement :: QName -> Element -> Maybe Element
findElement q e = listToMaybe (findElements q e) | 108 | findElement q e = listToMaybe (findElements q e) | 52 | true | true | 0 | 7 | 38 | 39 | 19 | 20 | null | null |
sgraf812/GLFW-b | Graphics/UI/GLFW.hs | bsd-2-clause | pollEvents :: IO ()
pollEvents = c'glfwPollEvents >> executeScheduled | 69 | pollEvents :: IO ()
pollEvents = c'glfwPollEvents >> executeScheduled | 69 | pollEvents = c'glfwPollEvents >> executeScheduled | 49 | false | true | 0 | 6 | 8 | 20 | 10 | 10 | null | null |
duplode/dohaskell | src/Model/Resource.hs | bsd-3-clause | mkYearMap :: Ord v
=> (Value v, Value (Maybe (Maybe Int)), Value (Maybe (Maybe Int)))
-> Map v (Int, Int)
-> Map v (Int, Int)
mkYearMap (Value _, Value (Just Nothing), Value (Just Nothing)) = id | 226 | mkYearMap :: Ord v
=> (Value v, Value (Maybe (Maybe Int)), Value (Maybe (Maybe Int)))
-> Map v (Int, Int)
-> Map v (Int, Int)
mkYearMap (Value _, Value (Just Nothing), Value (Just Nothing)) = id | 226 | mkYearMap (Value _, Value (Just Nothing), Value (Just Nothing)) = id | 70 | false | true | 0 | 12 | 67 | 123 | 62 | 61 | null | null |
cchantep/dhek | Dhek/Engine/Misc/LastHistory.hs | gpl-3.0 | lhPeek :: LastHistory k -> Maybe k
lhPeek = fst . lhPop' | 56 | lhPeek :: LastHistory k -> Maybe k
lhPeek = fst . lhPop' | 56 | lhPeek = fst . lhPop' | 21 | false | true | 0 | 6 | 11 | 25 | 12 | 13 | null | null |
romildo/gsynt | src/nullable-first-follow.hs | isc | lookupIndex [] _ _ = Nothing | 28 | lookupIndex [] _ _ = Nothing | 28 | lookupIndex [] _ _ = Nothing | 28 | false | false | 0 | 6 | 5 | 15 | 7 | 8 | null | null |
da-x/Algorithm-W-Step-By-Step | src/TestVals.hs | gpl-3.0 | -- TODO: $$ to be type-classed for TApp vs BApp
-- TODO: TCon "->" instead of TFun
eLet :: V.Var -> Val () -> (Val () -> Val ()) -> Val ()
eLet name val mkBody = P.app (P.abs name body) val
where
body = mkBody $ P.var name | 235 | eLet :: V.Var -> Val () -> (Val () -> Val ()) -> Val ()
eLet name val mkBody = P.app (P.abs name body) val
where
body = mkBody $ P.var name | 151 | eLet name val mkBody = P.app (P.abs name body) val
where
body = mkBody $ P.var name | 95 | true | true | 0 | 11 | 61 | 99 | 47 | 52 | null | null |
thomaseding/cgs | src/Transform/Extract.hs | bsd-3-clause | braceIndices :: [SyntaxToken Hoops] -> [Either Index Index]
braceIndices = mapMaybe f . zip [0 ..]
where
f (idx, tok) = case tok of
Punctuation symbol -> case unpunc symbol of
"{" -> Just $ Left idx
"}" -> Just $ Right idx
_ -> Nothing
... | 332 | braceIndices :: [SyntaxToken Hoops] -> [Either Index Index]
braceIndices = mapMaybe f . zip [0 ..]
where
f (idx, tok) = case tok of
Punctuation symbol -> case unpunc symbol of
"{" -> Just $ Left idx
"}" -> Just $ Right idx
_ -> Nothing
... | 332 | braceIndices = mapMaybe f . zip [0 ..]
where
f (idx, tok) = case tok of
Punctuation symbol -> case unpunc symbol of
"{" -> Just $ Left idx
"}" -> Just $ Right idx
_ -> Nothing
_ -> Nothing | 272 | false | true | 0 | 12 | 132 | 117 | 58 | 59 | null | null |
matterhorn-chat/matterhorn | src/Matterhorn/InputHistory.hs | bsd-3-clause | getHistoryEntry :: ChannelId -> Int -> InputHistory -> Maybe Text
getHistoryEntry cId i ih = do
es <- ih^.historyEntries.at cId
es ^? ix i | 146 | getHistoryEntry :: ChannelId -> Int -> InputHistory -> Maybe Text
getHistoryEntry cId i ih = do
es <- ih^.historyEntries.at cId
es ^? ix i | 146 | getHistoryEntry cId i ih = do
es <- ih^.historyEntries.at cId
es ^? ix i | 80 | false | true | 0 | 11 | 31 | 65 | 28 | 37 | null | null |
dan-t/Gamgine | Gamgine/State/StateTreeZipper.hs | bsd-3-clause | replace :: S.State a -> Zipper a -> Zipper a
replace s (Zipper p (ST.Branch _ e l ss)) = Zipper p (ST.Branch s e l ss) | 118 | replace :: S.State a -> Zipper a -> Zipper a
replace s (Zipper p (ST.Branch _ e l ss)) = Zipper p (ST.Branch s e l ss) | 118 | replace s (Zipper p (ST.Branch _ e l ss)) = Zipper p (ST.Branch s e l ss) | 73 | false | true | 0 | 13 | 26 | 80 | 37 | 43 | null | null |
Copilot-Language/atom_for_copilot | Language/Atom/Expressions.hs | bsd-3-clause | ueq (UConst (CBool a)) (UConst (CBool b)) = ubool $ a == b | 62 | ueq (UConst (CBool a)) (UConst (CBool b)) = ubool $ a == b | 62 | ueq (UConst (CBool a)) (UConst (CBool b)) = ubool $ a == b | 62 | false | false | 1 | 11 | 16 | 47 | 21 | 26 | null | null |
FranklinChen/hugs98-plus-Sep2006 | packages/HaXml/src/Text/XML/HaXml/ShowXmlLazy.hs | bsd-3-clause | attvalue (AttValue esr) = text "\"" <>
hcat (map (either text reference) esr) <>
text "\"" | 163 | attvalue (AttValue esr) = text "\"" <>
hcat (map (either text reference) esr) <>
text "\"" | 163 | attvalue (AttValue esr) = text "\"" <>
hcat (map (either text reference) esr) <>
text "\"" | 163 | false | false | 0 | 11 | 88 | 48 | 22 | 26 | null | null |
spechub/Hets | TPTP/Pretty.hs | gpl-2.0 | printTFF_top_level_type :: TFF_top_level_type -> Doc
printTFF_top_level_type x = case x of
TFFTLT_atomic a -> pretty a
TFFTLT_mapping a -> pretty a
TFFTLT_quantified a -> pretty a
TFFTLT_parens a -> parens $ pretty a
-- <tf1_quantified_type> ::= !> [<tff_variable_list>] : <tff_monotype> | 297 | printTFF_top_level_type :: TFF_top_level_type -> Doc
printTFF_top_level_type x = case x of
TFFTLT_atomic a -> pretty a
TFFTLT_mapping a -> pretty a
TFFTLT_quantified a -> pretty a
TFFTLT_parens a -> parens $ pretty a
-- <tf1_quantified_type> ::= !> [<tff_variable_list>] : <tff_monotype> | 297 | printTFF_top_level_type x = case x of
TFFTLT_atomic a -> pretty a
TFFTLT_mapping a -> pretty a
TFFTLT_quantified a -> pretty a
TFFTLT_parens a -> parens $ pretty a
-- <tf1_quantified_type> ::= !> [<tff_variable_list>] : <tff_monotype> | 244 | false | true | 0 | 9 | 49 | 80 | 35 | 45 | null | null |
Javran/Project-Euler | src/ProjectEuler/CommandLine/CmdBenchmark.hs | mit | cmdBenchmark :: [String] -> IO ()
cmdBenchmark args
| idStr:benchArgs <- args
, [(pId, "")] <- reads idStr =
case IM.lookup pId allProblems of
Just _ -> do
prjHome <- getProjectHome
cd prjHome
withArgs benchArgs $
defaultMain
[bench ("Problem #" <> show pId) $... | 543 | cmdBenchmark :: [String] -> IO ()
cmdBenchmark args
| idStr:benchArgs <- args
, [(pId, "")] <- reads idStr =
case IM.lookup pId allProblems of
Just _ -> do
prjHome <- getProjectHome
cd prjHome
withArgs benchArgs $
defaultMain
[bench ("Problem #" <> show pId) $... | 543 | cmdBenchmark args
| idStr:benchArgs <- args
, [(pId, "")] <- reads idStr =
case IM.lookup pId allProblems of
Just _ -> do
prjHome <- getProjectHome
cd prjHome
withArgs benchArgs $
defaultMain
[bench ("Problem #" <> show pId) $ nfAppIO runProblemAsExternalBinar... | 509 | false | true | 1 | 18 | 161 | 170 | 78 | 92 | null | null |
markus1189/xmonad-contrib-710 | XMonad/Prompt.hs | bsd-3-clause | createComplWin :: ComplWindowDim -> XP Window
createComplWin wi@(x,y,wh,ht,_,_) = do
st <- get
let d = dpy st
scr = defaultScreenOfDisplay d
w <- io $ mkUnmanagedWindow d scr (rootw st)
x y wh ht
io $ mapWindow d w
setComplWin w wi
return w | 280 | createComplWin :: ComplWindowDim -> XP Window
createComplWin wi@(x,y,wh,ht,_,_) = do
st <- get
let d = dpy st
scr = defaultScreenOfDisplay d
w <- io $ mkUnmanagedWindow d scr (rootw st)
x y wh ht
io $ mapWindow d w
setComplWin w wi
return w | 280 | createComplWin wi@(x,y,wh,ht,_,_) = do
st <- get
let d = dpy st
scr = defaultScreenOfDisplay d
w <- io $ mkUnmanagedWindow d scr (rootw st)
x y wh ht
io $ mapWindow d w
setComplWin w wi
return w | 234 | false | true | 0 | 11 | 84 | 127 | 61 | 66 | null | null |
forste/haReFork | tools/base/defs/FreeNames.hs | bsd-3-clause | var = val . HsVar | 17 | var = val . HsVar | 17 | var = val . HsVar | 17 | false | false | 2 | 5 | 4 | 15 | 5 | 10 | null | null |
dysinger/amazonka | amazonka-storagegateway/gen/Network/AWS/StorageGateway/DescribeTapeRecoveryPoints.hs | mpl-2.0 | -- | Specifies that the number of virtual tape recovery points that are described
-- be limited to the specified number.
dtrpLimit :: Lens' DescribeTapeRecoveryPoints (Maybe Natural)
dtrpLimit = lens _dtrpLimit (\s a -> s { _dtrpLimit = a }) . mapping _Nat | 256 | dtrpLimit :: Lens' DescribeTapeRecoveryPoints (Maybe Natural)
dtrpLimit = lens _dtrpLimit (\s a -> s { _dtrpLimit = a }) . mapping _Nat | 135 | dtrpLimit = lens _dtrpLimit (\s a -> s { _dtrpLimit = a }) . mapping _Nat | 73 | true | true | 0 | 10 | 42 | 54 | 29 | 25 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.