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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cutsea110/aop | src/FixPrimeTest.hs | bsd-3-clause | tail :: List a -> List a
tail = para phi
where
phi Nil = nil
phi (Cons _ (xs, _)) = xs | 96 | tail :: List a -> List a
tail = para phi
where
phi Nil = nil
phi (Cons _ (xs, _)) = xs | 96 | tail = para phi
where
phi Nil = nil
phi (Cons _ (xs, _)) = xs | 71 | false | true | 0 | 8 | 32 | 57 | 28 | 29 | null | null |
mcschroeder/ghc | compiler/main/DynFlags.hs | bsd-3-clause | -- | Is the Safe Haskell safe language in use
safeLanguageOn :: DynFlags -> Bool
safeLanguageOn dflags = safeHaskell dflags == Sf_Safe | 134 | safeLanguageOn :: DynFlags -> Bool
safeLanguageOn dflags = safeHaskell dflags == Sf_Safe | 88 | safeLanguageOn dflags = safeHaskell dflags == Sf_Safe | 53 | true | true | 0 | 6 | 21 | 26 | 13 | 13 | null | null |
mcmaniac/ghc | utils/compare_sizes/Main.hs | bsd-3-clause | main :: IO ()
main = do hSetBuffering stdout LineBuffering
args <- getArgs
case args of
["--hi", dir1, dir2] -> doit isHiFile dir1 dir2
["--o", dir1, dir2] -> doit isOFile dir1 dir2
[dir1, dir2] -> doit isHiFile dir1 dir2
_ -> error "... | 334 | main :: IO ()
main = do hSetBuffering stdout LineBuffering
args <- getArgs
case args of
["--hi", dir1, dir2] -> doit isHiFile dir1 dir2
["--o", dir1, dir2] -> doit isOFile dir1 dir2
[dir1, dir2] -> doit isHiFile dir1 dir2
_ -> error "... | 334 | main = do hSetBuffering stdout LineBuffering
args <- getArgs
case args of
["--hi", dir1, dir2] -> doit isHiFile dir1 dir2
["--o", dir1, dir2] -> doit isOFile dir1 dir2
[dir1, dir2] -> doit isHiFile dir1 dir2
_ -> error "Bad arguments" | 320 | false | true | 0 | 10 | 129 | 110 | 55 | 55 | null | null |
justinethier/husk-scheme | hs-src/Language/Scheme/Numerical.hs | mit | unpackNum notNum = throwError $ TypeMismatch "number" notNum | 60 | unpackNum notNum = throwError $ TypeMismatch "number" notNum | 60 | unpackNum notNum = throwError $ TypeMismatch "number" notNum | 60 | false | false | 0 | 6 | 7 | 18 | 8 | 10 | null | null |
bus000/Dikunt | plugins/WordReplacer/Main.hs | bsd-3-clause | handleRequest (prob , WordSequence words) =
handleWordReplacement words prob | 80 | handleRequest (prob , WordSequence words) =
handleWordReplacement words prob | 80 | handleRequest (prob , WordSequence words) =
handleWordReplacement words prob | 80 | false | false | 0 | 7 | 12 | 23 | 11 | 12 | null | null |
oldmanmike/ghc | compiler/typecheck/TcRnTypes.hs | bsd-3-clause | -- Helper for cases when we know for sure we have a complete type
-- signature, e.g. class methods.
completeIdSigPolyId :: TcIdSigInfo -> TcId
completeIdSigPolyId (TISI { sig_bndr = CompleteSig id }) = id | 204 | completeIdSigPolyId :: TcIdSigInfo -> TcId
completeIdSigPolyId (TISI { sig_bndr = CompleteSig id }) = id | 104 | completeIdSigPolyId (TISI { sig_bndr = CompleteSig id }) = id | 61 | true | true | 3 | 7 | 33 | 41 | 20 | 21 | null | null |
typelead/epm | epm/Distribution/Client/SetupWrapper.hs | bsd-3-clause | defaultSetupScriptOptions :: SetupScriptOptions
defaultSetupScriptOptions = SetupScriptOptions {
useCabalVersion = anyVersion,
useCompiler = Nothing,
usePlatform = Nothing,
usePackageDB = [GlobalPackageDB, UserPackageDB],
usePackageIndex = Noth... | 629 | defaultSetupScriptOptions :: SetupScriptOptions
defaultSetupScriptOptions = SetupScriptOptions {
useCabalVersion = anyVersion,
useCompiler = Nothing,
usePlatform = Nothing,
usePackageDB = [GlobalPackageDB, UserPackageDB],
usePackageIndex = Noth... | 629 | defaultSetupScriptOptions = SetupScriptOptions {
useCabalVersion = anyVersion,
useCompiler = Nothing,
usePlatform = Nothing,
usePackageDB = [GlobalPackageDB, UserPackageDB],
usePackageIndex = Nothing,
useProgramConfig = emptyProgram... | 581 | false | true | 0 | 7 | 207 | 91 | 59 | 32 | null | null |
chemist/agentx | src/Network/Protocol/Snmp/AgentX/MIBTree/Tree.hs | bsd-3-clause | goClosest ys c z = walk ys (top z)
where
giz (Node x _ _, _) = (index x, context x)
giz _ = error "goClosest: giz Empty Tree"
walk [] z' = z'
walk (x : []) z'
| (x,c) == giz z' = z'
| otherwise = maybe z' (walk (x : [])) (goNext z')
walk (x : xs) z'
| x == fst (giz z') = maybe z' (walk xs) (goLe... | 382 | goClosest ys c z = walk ys (top z)
where
giz (Node x _ _, _) = (index x, context x)
giz _ = error "goClosest: giz Empty Tree"
walk [] z' = z'
walk (x : []) z'
| (x,c) == giz z' = z'
| otherwise = maybe z' (walk (x : [])) (goNext z')
walk (x : xs) z'
| x == fst (giz z') = maybe z' (walk xs) (goLe... | 382 | goClosest ys c z = walk ys (top z)
where
giz (Node x _ _, _) = (index x, context x)
giz _ = error "goClosest: giz Empty Tree"
walk [] z' = z'
walk (x : []) z'
| (x,c) == giz z' = z'
| otherwise = maybe z' (walk (x : [])) (goNext z')
walk (x : xs) z'
| x == fst (giz z') = maybe z' (walk xs) (goLe... | 382 | false | false | 2 | 11 | 113 | 256 | 122 | 134 | null | null |
taojang/haskell-programming-book-exercise | src/ch22/Intermediate.hs | bsd-3-clause | myLiftA2 :: Applicative f => (a -> b -> c) -> f a -> f b -> f c
myLiftA2 f fa fb = f <$> fa <*> fb | 98 | myLiftA2 :: Applicative f => (a -> b -> c) -> f a -> f b -> f c
myLiftA2 f fa fb = f <$> fa <*> fb | 98 | myLiftA2 f fa fb = f <$> fa <*> fb | 34 | false | true | 0 | 9 | 28 | 65 | 31 | 34 | null | null |
jonathankochems/raskell-git-download | src/RaskellDownload/PathApis.hs | bsd-3-clause | -- | Path API for github server using the github API v3 (<https://developer.github.com/v3/>)
githubApiV3 = PathApi{ rawUrl = let url owner repo path branch token =
intercalate "/" ["https://api.github.com/repos",owner,repo,"contents",path++ parameters]
... | 915 | githubApiV3 = PathApi{ rawUrl = let url owner repo path branch token =
intercalate "/" ["https://api.github.com/repos",owner,repo,"contents",path++ parameters]
where parameters | null parameterlist = ""
... | 822 | githubApiV3 = PathApi{ rawUrl = let url owner repo path branch token =
intercalate "/" ["https://api.github.com/repos",owner,repo,"contents",path++ parameters]
where parameters | null parameterlist = ""
... | 822 | true | false | 0 | 20 | 437 | 189 | 96 | 93 | null | null |
ssaavedra/liquidhaskell | src/Language/Haskell/Liquid/Desugar710/Coverage.hs | bsd-3-clause | addTickGRHSs :: Bool -> Bool -> GRHSs Id (LHsExpr Id) -> TM (GRHSs Id (LHsExpr Id))
addTickGRHSs isOneOfMany isLambda (GRHSs guarded local_binds) = do
bindLocals binders $ do
local_binds' <- addTickHsLocalBinds local_binds
guarded' <- mapM (liftL (addTickGRHS isOneOfMany isLambda)) guarded
return $ GRHSs ... | 395 | addTickGRHSs :: Bool -> Bool -> GRHSs Id (LHsExpr Id) -> TM (GRHSs Id (LHsExpr Id))
addTickGRHSs isOneOfMany isLambda (GRHSs guarded local_binds) = do
bindLocals binders $ do
local_binds' <- addTickHsLocalBinds local_binds
guarded' <- mapM (liftL (addTickGRHS isOneOfMany isLambda)) guarded
return $ GRHSs ... | 395 | addTickGRHSs isOneOfMany isLambda (GRHSs guarded local_binds) = do
bindLocals binders $ do
local_binds' <- addTickHsLocalBinds local_binds
guarded' <- mapM (liftL (addTickGRHS isOneOfMany isLambda)) guarded
return $ GRHSs guarded' local_binds'
where
binders = collectLocalBinders local_binds | 311 | false | true | 0 | 15 | 69 | 135 | 62 | 73 | null | null |
turion/haskell-asteroids | src/Graphics.hs | mit | showText :: String -> Vector -> [GLfloat] -> GLfloat -> TextType -> IO ()
showText text (Vector x y) fontColors s Title= preservingMatrix $ do
color $ Color3 (fontColors !! 0) (fontColors !! 1) (fontColors !! 2)
ss <- screenSize
viewport $= (Position (getDistanceFromBorderToMakeScreenCentered ss) 0, modifyS... | 425 | showText :: String -> Vector -> [GLfloat] -> GLfloat -> TextType -> IO ()
showText text (Vector x y) fontColors s Title= preservingMatrix $ do
color $ Color3 (fontColors !! 0) (fontColors !! 1) (fontColors !! 2)
ss <- screenSize
viewport $= (Position (getDistanceFromBorderToMakeScreenCentered ss) 0, modifyS... | 425 | showText text (Vector x y) fontColors s Title= preservingMatrix $ do
color $ Color3 (fontColors !! 0) (fontColors !! 1) (fontColors !! 2)
ss <- screenSize
viewport $= (Position (getDistanceFromBorderToMakeScreenCentered ss) 0, modifySizeToSquare ss)
translate $ Vector3 x y 0
scale s s s
renderSt... | 351 | false | true | 0 | 12 | 89 | 166 | 79 | 87 | null | null |
Trundle/idris-go | src/IRTS/CodegenGo.hs | mit | primToGo var (LSLt (ATInt ITBig)) [left, right] =
let code = T.concat [ "MkIntFromBool((*big.Int)("
, lVarToGo left
, ").Cmp((*big.Int)("
, lVarToGo right
, ")) < 0)"
]
in Line (Just var) [ lVarToVar l... | 360 | primToGo var (LSLt (ATInt ITBig)) [left, right] =
let code = T.concat [ "MkIntFromBool((*big.Int)("
, lVarToGo left
, ").Cmp((*big.Int)("
, lVarToGo right
, ")) < 0)"
]
in Line (Just var) [ lVarToVar l... | 360 | primToGo var (LSLt (ATInt ITBig)) [left, right] =
let code = T.concat [ "MkIntFromBool((*big.Int)("
, lVarToGo left
, ").Cmp((*big.Int)("
, lVarToGo right
, ")) < 0)"
]
in Line (Just var) [ lVarToVar l... | 360 | false | false | 0 | 11 | 158 | 101 | 51 | 50 | null | null |
amcphail/hsignal | lib/Numeric/Signal.hs | bsd-3-clause | freqzN :: (S.Filterable a, Double ~ DoubleOf a) =>
Vector a -- ^ zero coefficients
-> Vector a -- ^ pole coefficients
-> Int -- ^ sampling rate
-> Int -- ^ number of points
-> (Vector a,Vector a) -- ^ (frequencies,response)
freqzN b a s n = let w' = linspace n (0... | 460 | freqzN :: (S.Filterable a, Double ~ DoubleOf a) =>
Vector a -- ^ zero coefficients
-> Vector a -- ^ pole coefficients
-> Int -- ^ sampling rate
-> Int -- ^ number of points
-> (Vector a,Vector a)
freqzN b a s n = let w' = linspace n (0,((fromIntegral n)-1)/(fromInt... | 430 | freqzN b a s n = let w' = linspace n (0,((fromIntegral n)-1)/(fromIntegral (2*n)))
r = S.freqz b a ((2*pi)*w')
in ((fromIntegral s)*w',r) | 179 | true | true | 0 | 15 | 163 | 183 | 94 | 89 | null | null |
hoffmeyer/timeregger | src/Model.hs | bsd-3-clause | runDb :: SqlPersistT (ResourceT (NoLoggingT IO)) a -> IO a
runDb = runNoLoggingT . runResourceT . withSqliteConn "dev.sqlite3" . runSqlConn | 139 | runDb :: SqlPersistT (ResourceT (NoLoggingT IO)) a -> IO a
runDb = runNoLoggingT . runResourceT . withSqliteConn "dev.sqlite3" . runSqlConn | 139 | runDb = runNoLoggingT . runResourceT . withSqliteConn "dev.sqlite3" . runSqlConn | 80 | false | true | 0 | 10 | 19 | 50 | 24 | 26 | null | null |
ameingast/giraffe | src/System/Giraffe/Application.hs | bsd-3-clause | parseAnnounceRequest :: Request -> Maybe AnnounceRequest
parseAnnounceRequest r | not (isValidRequest r "announce") = Nothing | 125 | parseAnnounceRequest :: Request -> Maybe AnnounceRequest
parseAnnounceRequest r | not (isValidRequest r "announce") = Nothing | 125 | parseAnnounceRequest r | not (isValidRequest r "announce") = Nothing | 68 | false | true | 0 | 10 | 14 | 38 | 17 | 21 | null | null |
MAPSuio/spring-challenge16 | words_words_words/larstvei.hs | mit | chunksOf n xs = take n xs : (chunksOf n $ drop n xs) | 52 | chunksOf n xs = take n xs : (chunksOf n $ drop n xs) | 52 | chunksOf n xs = take n xs : (chunksOf n $ drop n xs) | 52 | false | false | 0 | 8 | 13 | 35 | 16 | 19 | null | null |
alexander-at-github/eta | compiler/ETA/Prelude/PrimOp.hs | bsd-3-clause | primOpCanFail ReadJCharArrayOp = True | 41 | primOpCanFail ReadJCharArrayOp = True | 41 | primOpCanFail ReadJCharArrayOp = True | 41 | false | false | 0 | 5 | 7 | 9 | 4 | 5 | null | null |
bobjflong/biblesearch-api-haskell | src/Bible/Verses.hs | mit | listVerses :: Text -> ApiKey -> IO (Maybe [Verse])
listVerses chapterId key = do
raw <- getResourceAtPath path key
return $ fmap verses $ decode raw
where path = "/chapters/" `append` chapterId `append` "/verses.js" | 221 | listVerses :: Text -> ApiKey -> IO (Maybe [Verse])
listVerses chapterId key = do
raw <- getResourceAtPath path key
return $ fmap verses $ decode raw
where path = "/chapters/" `append` chapterId `append` "/verses.js" | 221 | listVerses chapterId key = do
raw <- getResourceAtPath path key
return $ fmap verses $ decode raw
where path = "/chapters/" `append` chapterId `append` "/verses.js" | 170 | false | true | 1 | 11 | 39 | 96 | 44 | 52 | null | null |
yesodweb/shakespeare | Text/Hamlet.hs | mit | strToExp "" = error "strToExp on empty string" | 46 | strToExp "" = error "strToExp on empty string" | 46 | strToExp "" = error "strToExp on empty string" | 46 | false | false | 1 | 5 | 7 | 16 | 5 | 11 | null | null |
olsner/ghc | testsuite/tests/programs/andy_cherry/DataTypes.hs | bsd-3-clause | castleQ = "O-O-O" | 17 | castleQ = "O-O-O" | 17 | castleQ = "O-O-O" | 17 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
ozgurakgun/Idris-dev | src/Idris/REPL.hs | bsd-3-clause | process fn (TestInline t)
= do (tm, ty) <- elabVal (recinfo (fileFC "toplevel")) ERHS t
ctxt <- getContext
ist <- getIState
let tm' = inlineTerm ist tm
c <- colouris... | 395 | process fn (TestInline t)
= do (tm, ty) <- elabVal (recinfo (fileFC "toplevel")) ERHS t
ctxt <- getContext
ist <- getIState
let tm' = inlineTerm ist tm
c <- colouris... | 395 | process fn (TestInline t)
= do (tm, ty) <- elabVal (recinfo (fileFC "toplevel")) ERHS t
ctxt <- getContext
ist <- getIState
let tm' = inlineTerm ist tm
c <- colouris... | 395 | false | false | 0 | 12 | 222 | 106 | 49 | 57 | null | null |
hsyl20/ViperVM | haskus-system/src/lib/Haskus/System/Linux/Process.hs | bsd-3-clause | -- | Get real user ID of the calling process
sysGetRealUserID :: IO UserID
sysGetRealUserID = UserID . fromIntegral <$> syscall_getuid | 134 | sysGetRealUserID :: IO UserID
sysGetRealUserID = UserID . fromIntegral <$> syscall_getuid | 89 | sysGetRealUserID = UserID . fromIntegral <$> syscall_getuid | 59 | true | true | 0 | 6 | 20 | 23 | 12 | 11 | null | null |
kojiromike/Idris-dev | src/Idris/IdrisDoc.hs | bsd-3-clause | extractPTermNames (PCase _ p ps) = let (ps1, ps2) = unzip ps
in concatMap extract (p:(ps1 ++ ps2)) | 142 | extractPTermNames (PCase _ p ps) = let (ps1, ps2) = unzip ps
in concatMap extract (p:(ps1 ++ ps2)) | 142 | extractPTermNames (PCase _ p ps) = let (ps1, ps2) = unzip ps
in concatMap extract (p:(ps1 ++ ps2)) | 142 | false | false | 0 | 11 | 61 | 60 | 29 | 31 | null | null |
Bodigrim/arithmoi | test-suite/Math/NumberTheory/Moduli/EquationsTests.hs | mit | solveQuadraticProperty1 :: (Positive Natural, Integer, Integer, Integer) -> ([SomeMod], [SomeMod])
solveQuadraticProperty1 (Positive m, a, b, c) = case someNatVal m of
SomeNat (_ :: Proxy t) -> wrapSome $ solveQuadraticProp (fromInteger a :: Mod t) (fromInteger b) (fromInteger c) | 282 | solveQuadraticProperty1 :: (Positive Natural, Integer, Integer, Integer) -> ([SomeMod], [SomeMod])
solveQuadraticProperty1 (Positive m, a, b, c) = case someNatVal m of
SomeNat (_ :: Proxy t) -> wrapSome $ solveQuadraticProp (fromInteger a :: Mod t) (fromInteger b) (fromInteger c) | 282 | solveQuadraticProperty1 (Positive m, a, b, c) = case someNatVal m of
SomeNat (_ :: Proxy t) -> wrapSome $ solveQuadraticProp (fromInteger a :: Mod t) (fromInteger b) (fromInteger c) | 183 | false | true | 3 | 8 | 40 | 121 | 65 | 56 | null | null |
elegios/datalang | src/Parser.hs | mit | braces :: Parser a -> Parser a
braces = T.braces lexer | 54 | braces :: Parser a -> Parser a
braces = T.braces lexer | 54 | braces = T.braces lexer | 23 | false | true | 0 | 6 | 10 | 26 | 12 | 14 | null | null |
leepike/copilot-language | src/Copilot/Language/Spec.hs | bsd-3-clause | trigger :: String -> Stream Bool -> [Arg] -> Spec
trigger name e args = tell [TriggerItem $ Trigger name e args] | 112 | trigger :: String -> Stream Bool -> [Arg] -> Spec
trigger name e args = tell [TriggerItem $ Trigger name e args] | 112 | trigger name e args = tell [TriggerItem $ Trigger name e args] | 62 | false | true | 0 | 8 | 21 | 53 | 26 | 27 | null | null |
DiegoNolan/Asciify | Asciify.hs | mit | approx :: Word8 -> Quadrant
approx n
| n >= 150 = Blank
| n >= 70 = Light
| otherwise = Dark | 103 | approx :: Word8 -> Quadrant
approx n
| n >= 150 = Blank
| n >= 70 = Light
| otherwise = Dark | 103 | approx n
| n >= 150 = Blank
| n >= 70 = Light
| otherwise = Dark | 75 | false | true | 0 | 8 | 33 | 60 | 26 | 34 | null | null |
sharpjs/haskell-learning | before-stack/Asm.hs | gpl-3.0 | evalAsm :: Asm a -> AsmState -> a
evalAsm = evalState | 53 | evalAsm :: Asm a -> AsmState -> a
evalAsm = evalState | 53 | evalAsm = evalState | 19 | false | true | 0 | 8 | 10 | 29 | 12 | 17 | null | null |
akerber47/train | Main.hs | bsd-3-clause | -- Isotope the given map so that all preimages of the given edge's starting
-- vertex are pulled across the given edge. Then collapse the given edge,
-- removing it and its 1st vertex from both graph and map.
isoAndCollapse :: SG.Edge -> GraphMap -> GraphMap
isoAndCollapse e@(SG.Edge ue _) g@(GraphMap sg _ _) =
Gra... | 982 | isoAndCollapse :: SG.Edge -> GraphMap -> GraphMap
isoAndCollapse e@(SG.Edge ue _) g@(GraphMap sg _ _) =
GraphMap newsg newvm newem
where -- Remove the offending edge from the graph itself
newsg = SG.collapseEdge e sg
-- Postcompose g with isotopy so that no vertex lands on 1st vertex.
... | 773 | isoAndCollapse e@(SG.Edge ue _) g@(GraphMap sg _ _) =
GraphMap newsg newvm newem
where -- Remove the offending edge from the graph itself
newsg = SG.collapseEdge e sg
-- Postcompose g with isotopy so that no vertex lands on 1st vertex.
-- We can safely remove all copies of the give... | 723 | true | true | 0 | 11 | 264 | 160 | 83 | 77 | null | null |
Teaspot-Studio/Urho3D-Haskell | urho3d-bindgen/src/Graphics/Urho3D/Monad.hs | mit | -- | Same as @Prelude.maybe@, but operates with pointer
maybeNull :: Pointer p a => b -> (p -> b) -> p -> b
maybeNull b f ptr
| isNull ptr = b
| otherwise = f ptr | 166 | maybeNull :: Pointer p a => b -> (p -> b) -> p -> b
maybeNull b f ptr
| isNull ptr = b
| otherwise = f ptr | 110 | maybeNull b f ptr
| isNull ptr = b
| otherwise = f ptr | 58 | true | true | 0 | 10 | 41 | 76 | 34 | 42 | null | null |
rahulmutt/ghcvm | compiler/Eta/Types/TypeRep.hs | bsd-3-clause | noFreeVarsOfType (AppTy t1 t2) = noFreeVarsOfType t1 && noFreeVarsOfType t2 | 78 | noFreeVarsOfType (AppTy t1 t2) = noFreeVarsOfType t1 && noFreeVarsOfType t2 | 78 | noFreeVarsOfType (AppTy t1 t2) = noFreeVarsOfType t1 && noFreeVarsOfType t2 | 78 | false | false | 0 | 7 | 12 | 27 | 12 | 15 | null | null |
thalerjonathan/phd | public/ArtIterating/code/haskell/PureAgentsPar/src/SpacialGameEnv/SGModelEnv.hs | gpl-3.0 | bParam :: Double
bParam = 1.9 | 29 | bParam :: Double
bParam = 1.9 | 29 | bParam = 1.9 | 12 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
fredmorcos/attic | projects/pet/archive/pet_haskell_master_complete/Expense.hs | isc | showExpenseList :: [Expense] -> String
showExpenseList l = unlines $ map show l | 79 | showExpenseList :: [Expense] -> String
showExpenseList l = unlines $ map show l | 79 | showExpenseList l = unlines $ map show l | 40 | false | true | 0 | 6 | 12 | 30 | 15 | 15 | null | null |
hpacheco/HAAP | examples/plab/svn/2017li1g183/src/BotHugo183.hs | mit | apontaPara :: [(Peca,Posicao,Orientacao)] -> Int -> Tempo -> Jogo -> Int -> Double
apontaPara pecas 0 tick jogo p = {-error ("aponta " ++ show (direcao $ getCarro p jogo)) -- $ -} direcao $ getCarro p jogo | 205 | apontaPara :: [(Peca,Posicao,Orientacao)] -> Int -> Tempo -> Jogo -> Int -> Double
apontaPara pecas 0 tick jogo p = {-error ("aponta " ++ show (direcao $ getCarro p jogo)) -- $ -} direcao $ getCarro p jogo | 205 | apontaPara pecas 0 tick jogo p = {-error ("aponta " ++ show (direcao $ getCarro p jogo)) -- $ -} direcao $ getCarro p jogo | 122 | false | true | 0 | 9 | 37 | 64 | 34 | 30 | null | null |
sos22/ppres | ppres/driver/Explore.hs | gpl-2.0 | exhaustiveExplore :: (Eq a, Render a) => a -> (a -> [a]) -> [a]
exhaustiveExplore start advance =
let startState = ExploreState [] [start]
exploreState state =
case pickNextItem state of
Nothing -> state
Just (n_item, n_state) ->
let new_greys = adva... | 489 | exhaustiveExplore :: (Eq a, Render a) => a -> (a -> [a]) -> [a]
exhaustiveExplore start advance =
let startState = ExploreState [] [start]
exploreState state =
case pickNextItem state of
Nothing -> state
Just (n_item, n_state) ->
let new_greys = adva... | 489 | exhaustiveExplore start advance =
let startState = ExploreState [] [start]
exploreState state =
case pickNextItem state of
Nothing -> state
Just (n_item, n_state) ->
let new_greys = advance n_item
next_state = foldr discoverItem... | 425 | false | true | 0 | 16 | 170 | 145 | 72 | 73 | null | null |
d0kt0r0/Tidal | src/Sound/Tidal/Core.hs | gpl-3.0 | in31 :: Pattern Double
in31 = cF 0 "31" | 39 | in31 :: Pattern Double
in31 = cF 0 "31" | 39 | in31 = cF 0 "31" | 16 | false | true | 1 | 5 | 8 | 24 | 9 | 15 | null | null |
phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/Tokens.hs | bsd-3-clause | gl_POST_COLOR_MATRIX_RED_BIAS :: GLenum
gl_POST_COLOR_MATRIX_RED_BIAS = 0x80B8 | 78 | gl_POST_COLOR_MATRIX_RED_BIAS :: GLenum
gl_POST_COLOR_MATRIX_RED_BIAS = 0x80B8 | 78 | gl_POST_COLOR_MATRIX_RED_BIAS = 0x80B8 | 38 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
ghc-android/ghc | testsuite/tests/ghci/should_run/ghcirun004.hs | bsd-3-clause | 2662 = 2661 | 11 | 2662 = 2661 | 11 | 2662 = 2661 | 11 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
fffej/HS-Poker | LookupPatternMatch.hs | bsd-3-clause | getValueFromProduct 1114366 = 1735 | 34 | getValueFromProduct 1114366 = 1735 | 34 | getValueFromProduct 1114366 = 1735 | 34 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
forked-upstream-packages-for-ghcjs/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | unmarshalStringIdKey = mkPreludeMiscIdUnique 153 | 57 | unmarshalStringIdKey = mkPreludeMiscIdUnique 153 | 57 | unmarshalStringIdKey = mkPreludeMiscIdUnique 153 | 57 | false | false | 0 | 5 | 12 | 9 | 4 | 5 | null | null |
bgold-cosmos/Tidal | test/Sound/Tidal/ExceptionsTest.hs | gpl-3.0 | errorCall s (ErrorCallWithLocation msg _) = s == msg | 52 | errorCall s (ErrorCallWithLocation msg _) = s == msg | 52 | errorCall s (ErrorCallWithLocation msg _) = s == msg | 52 | false | false | 0 | 7 | 8 | 23 | 11 | 12 | null | null |
rightfold/snek | src/SNEK/PHP.hs | bsd-3-clause | ve2PHPS r (LetVE n v b) =
local (Set.insert n) $
(++) <$> ve2PHPS (assign n) v
<*> ve2PHPS r b | 109 | ve2PHPS r (LetVE n v b) =
local (Set.insert n) $
(++) <$> ve2PHPS (assign n) v
<*> ve2PHPS r b | 109 | ve2PHPS r (LetVE n v b) =
local (Set.insert n) $
(++) <$> ve2PHPS (assign n) v
<*> ve2PHPS r b | 109 | false | false | 0 | 11 | 35 | 62 | 30 | 32 | null | null |
gpahal/hgraph | src/HGraph/Node.hs | bsd-3-clause | getAllOutEdges :: Id -> GS [Edge]
getAllOutEdges i = getNodeByIdUnsafe i >>= getAllOutEdgesN | 92 | getAllOutEdges :: Id -> GS [Edge]
getAllOutEdges i = getNodeByIdUnsafe i >>= getAllOutEdgesN | 92 | getAllOutEdges i = getNodeByIdUnsafe i >>= getAllOutEdgesN | 58 | false | true | 0 | 7 | 12 | 35 | 16 | 19 | null | null |
DaMSL/K3 | src/Language/K3/Interpreter/Evaluation.hs | apache-2.0 | global :: Identifier -> K3 Type -> Maybe (K3 Expression) -> Interpretation ()
global n (details -> (TSink, _, anns)) (Just e) = expression e >>= replaceTrigger n anns | 166 | global :: Identifier -> K3 Type -> Maybe (K3 Expression) -> Interpretation ()
global n (details -> (TSink, _, anns)) (Just e) = expression e >>= replaceTrigger n anns | 166 | global n (details -> (TSink, _, anns)) (Just e) = expression e >>= replaceTrigger n anns | 88 | false | true | 0 | 10 | 28 | 81 | 40 | 41 | null | null |
mathhun/stack | src/Stack/Build/Cache.hs | bsd-3-clause | -- | Write the dirtiness cache for this package's configuration.
writeConfigCache :: (MonadIO m, MonadReader env m, HasConfig env, MonadThrow m, MonadLogger m, HasEnvConfig env)
=> Path Abs Dir
-> ConfigCache
-> m ()
writeConfigCache dir = writeCache dir configCacheFile | 318 | writeConfigCache :: (MonadIO m, MonadReader env m, HasConfig env, MonadThrow m, MonadLogger m, HasEnvConfig env)
=> Path Abs Dir
-> ConfigCache
-> m ()
writeConfigCache dir = writeCache dir configCacheFile | 253 | writeConfigCache dir = writeCache dir configCacheFile | 53 | true | true | 0 | 9 | 87 | 79 | 39 | 40 | null | null |
bitemyapp/these | Data/These.hs | bsd-3-clause | partitionThese (That y:xs) = second (second (y:)) $ partitionThese xs | 72 | partitionThese (That y:xs) = second (second (y:)) $ partitionThese xs | 72 | partitionThese (That y:xs) = second (second (y:)) $ partitionThese xs | 72 | false | false | 0 | 9 | 12 | 39 | 19 | 20 | null | null |
romanb/amazonka | amazonka-cognito-sync/gen/Network/AWS/CognitoSync/SetIdentityPoolConfiguration.hs | mpl-2.0 | -- | Options to apply to this identity pool for Amazon Cognito streams.
sipcCognitoStreams :: Lens' SetIdentityPoolConfiguration (Maybe CognitoStreams)
sipcCognitoStreams =
lens _sipcCognitoStreams (\s a -> s { _sipcCognitoStreams = a }) | 241 | sipcCognitoStreams :: Lens' SetIdentityPoolConfiguration (Maybe CognitoStreams)
sipcCognitoStreams =
lens _sipcCognitoStreams (\s a -> s { _sipcCognitoStreams = a }) | 169 | sipcCognitoStreams =
lens _sipcCognitoStreams (\s a -> s { _sipcCognitoStreams = a }) | 89 | true | true | 0 | 9 | 35 | 46 | 25 | 21 | null | null |
bgold-cosmos/Tidal | src/Sound/Tidal/Params.hs | gpl-3.0 | crushCountTo :: String -> Pattern Double -> Pattern ValueMap
crushCountTo name ipat = innerJoin $ (\i -> pStateF "crush" name (maybe 0 ((`mod'` i) . (+1)))) <$> ipat | 165 | crushCountTo :: String -> Pattern Double -> Pattern ValueMap
crushCountTo name ipat = innerJoin $ (\i -> pStateF "crush" name (maybe 0 ((`mod'` i) . (+1)))) <$> ipat | 165 | crushCountTo name ipat = innerJoin $ (\i -> pStateF "crush" name (maybe 0 ((`mod'` i) . (+1)))) <$> ipat | 104 | false | true | 2 | 13 | 27 | 84 | 43 | 41 | null | null |
olsner/ghc | compiler/simplCore/OccurAnal.hs | bsd-3-clause | argCtxt :: OccEnv -> [OneShots] -> (OccEnv, [OneShots])
argCtxt env []
= (env { occ_encl = OccVanilla, occ_one_shots = [] }, []) | 130 | argCtxt :: OccEnv -> [OneShots] -> (OccEnv, [OneShots])
argCtxt env []
= (env { occ_encl = OccVanilla, occ_one_shots = [] }, []) | 130 | argCtxt env []
= (env { occ_encl = OccVanilla, occ_one_shots = [] }, []) | 74 | false | true | 0 | 8 | 23 | 62 | 36 | 26 | null | null |
robeverest/accelerate | Data/Array/Accelerate/Smart.hs | bsd-3-clause | mkAsin :: (Elt t, IsFloating t) => Exp t -> Exp t
mkAsin x = Exp $ PrimAsin floatingType `PrimApp` x | 100 | mkAsin :: (Elt t, IsFloating t) => Exp t -> Exp t
mkAsin x = Exp $ PrimAsin floatingType `PrimApp` x | 100 | mkAsin x = Exp $ PrimAsin floatingType `PrimApp` x | 50 | false | true | 0 | 7 | 20 | 52 | 26 | 26 | null | null |
fuchsto/drool | src/Drool/Utils/SigGen.hs | mit | envelopeFunFromIndex :: Int -> (Int -> TValue -> SValue -> SValue)
envelopeFunFromIndex sigGenIdx = case sigGenIdx of
0 -> (\pLength t sample -> (sine pLength t) * sample)
1 -> (\pLength t sample -> (square pLength t) * sample)
... | 456 | envelopeFunFromIndex :: Int -> (Int -> TValue -> SValue -> SValue)
envelopeFunFromIndex sigGenIdx = case sigGenIdx of
0 -> (\pLength t sample -> (sine pLength t) * sample)
1 -> (\pLength t sample -> (square pLength t) * sample)
... | 456 | envelopeFunFromIndex sigGenIdx = case sigGenIdx of
0 -> (\pLength t sample -> (sine pLength t) * sample)
1 -> (\pLength t sample -> (square pLength t) * sample)
2 -> (\pLength t sample -> (saw pLength t) * sample)
... | 389 | false | true | 0 | 12 | 195 | 139 | 72 | 67 | null | null |
sgillespie/ghc | compiler/codeGen/StgCmmClosure.hs | bsd-3-clause | lfClosureType (LFCon con) = Constr (dataConTagZ con)
(dataConIdentity con) | 145 | lfClosureType (LFCon con) = Constr (dataConTagZ con)
(dataConIdentity con) | 145 | lfClosureType (LFCon con) = Constr (dataConTagZ con)
(dataConIdentity con) | 145 | false | false | 0 | 7 | 79 | 32 | 15 | 17 | null | null |
lukexi/ghc-7.8-arm64 | ghc/Main.hs | bsd-3-clause | countFS entries longest has_z (b:bs) =
let
len = length b
longest' = max len longest
entries' = entries + len
has_zs = length (filter hasZEncoding b)
in
countFS entries' longest' (has_z + has_zs) bs | 242 | countFS entries longest has_z (b:bs) =
let
len = length b
longest' = max len longest
entries' = entries + len
has_zs = length (filter hasZEncoding b)
in
countFS entries' longest' (has_z + has_zs) bs | 242 | countFS entries longest has_z (b:bs) =
let
len = length b
longest' = max len longest
entries' = entries + len
has_zs = length (filter hasZEncoding b)
in
countFS entries' longest' (has_z + has_zs) bs | 242 | false | false | 0 | 11 | 78 | 87 | 43 | 44 | null | null |
YoshikuniJujo/funpaala | samples/29_monoid/monoid.hs | bsd-3-clause | fldMap :: Monoid m => (a -> m) -> [a] -> m
fldMap f (x : xs) = f x `mappend` fldMap f xs | 88 | fldMap :: Monoid m => (a -> m) -> [a] -> m
fldMap f (x : xs) = f x `mappend` fldMap f xs | 88 | fldMap f (x : xs) = f x `mappend` fldMap f xs | 45 | false | true | 0 | 8 | 23 | 62 | 32 | 30 | null | null |
zmthy/mandelbrot | Pnm.hs | gpl-3.0 | render :: Show a => a -> Text
render = pack . show | 50 | render :: Show a => a -> Text
render = pack . show | 50 | render = pack . show | 20 | false | true | 1 | 8 | 12 | 34 | 14 | 20 | null | null |
dysinger/amazonka | amazonka-elastictranscoder/gen/Network/AWS/ElasticTranscoder/CreatePreset.hs | mpl-2.0 | -- | If the preset settings don't comply with the standards for the video codec
-- but Elastic Transcoder created the preset, this message explains the reason
-- the preset settings don't meet the standard. Elastic Transcoder created the
-- preset because the settings might produce acceptable output.
cprWarning :: Lens... | 417 | cprWarning :: Lens' CreatePresetResponse (Maybe Text)
cprWarning = lens _cprWarning (\s a -> s { _cprWarning = a }) | 115 | cprWarning = lens _cprWarning (\s a -> s { _cprWarning = a }) | 61 | true | true | 2 | 9 | 66 | 58 | 28 | 30 | null | null |
brendanhay/gogol | gogol-redis/gen/Network/Google/Redis/Types/Product.hs | mpl-2.0 | -- | Output only. List of server CA certificates for the instance.
iServerCaCerts :: Lens' Instance [TLSCertificate]
iServerCaCerts
= lens _iServerCaCerts
(\ s a -> s{_iServerCaCerts = a})
. _Default
. _Coerce | 229 | iServerCaCerts :: Lens' Instance [TLSCertificate]
iServerCaCerts
= lens _iServerCaCerts
(\ s a -> s{_iServerCaCerts = a})
. _Default
. _Coerce | 162 | iServerCaCerts
= lens _iServerCaCerts
(\ s a -> s{_iServerCaCerts = a})
. _Default
. _Coerce | 112 | true | true | 3 | 8 | 51 | 58 | 28 | 30 | null | null |
yossarin/hash | src/Hash/Language/Exec.hs | mit | evalExpr vt (Var s) = fromMaybe (error $ "The variable " ++ s ++ " is not initialised.") $ M.lookup s vt | 104 | evalExpr vt (Var s) = fromMaybe (error $ "The variable " ++ s ++ " is not initialised.") $ M.lookup s vt | 104 | evalExpr vt (Var s) = fromMaybe (error $ "The variable " ++ s ++ " is not initialised.") $ M.lookup s vt | 104 | false | false | 0 | 10 | 21 | 46 | 22 | 24 | null | null |
valderman/himitsu | src/Himitsu/PasswordFile.hs | bsd-3-clause | encryptPF :: ToJSON a
=> ProtectedFile Unlocked a
-> Password
-> IO (ProtectedFile Locked a)
encryptPF pf pwd = do
saltlen <- randomVal (5, 10)
salt <- Salt <$> randomBytes saltlen
Just nonce <- toBlock <$> randomBytes 32 -- never fails for 32 bytes
let Just k = deriveKey (... | 839 | encryptPF :: ToJSON a
=> ProtectedFile Unlocked a
-> Password
-> IO (ProtectedFile Locked a)
encryptPF pf pwd = do
saltlen <- randomVal (5, 10)
salt <- Salt <$> randomBytes saltlen
Just nonce <- toBlock <$> randomBytes 32 -- never fails for 32 bytes
let Just k = deriveKey (... | 839 | encryptPF pf pwd = do
saltlen <- randomVal (5, 10)
salt <- Salt <$> randomBytes saltlen
Just nonce <- toBlock <$> randomBytes 32 -- never fails for 32 bytes
let Just k = deriveKey (pfKeyParams pf) salt pwd
key = kKey k
cryptotext = encrypt key nonce plaintext
revision = pfRevisio... | 716 | false | true | 0 | 14 | 257 | 253 | 126 | 127 | null | null |
flipstone/orville | orville-postgresql-libpq/src/Orville/PostgreSQL/Internal/ConstraintDefinition.hs | mit | {- |
Gets the 'ConstraintMigrationKey' for the 'ConstraintDefinition'
-}
constraintMigrationKey :: ConstraintDefinition -> ConstraintMigrationKey
constraintMigrationKey = _constraintMigrationKey | 196 | constraintMigrationKey :: ConstraintDefinition -> ConstraintMigrationKey
constraintMigrationKey = _constraintMigrationKey | 121 | constraintMigrationKey = _constraintMigrationKey | 48 | true | true | 0 | 5 | 18 | 16 | 9 | 7 | null | null |
TomMD/ghc | compiler/hsSyn/HsTypes.hs | bsd-3-clause | _ `plus` _ = Implicit | 37 | _ `plus` _ = Implicit | 37 | _ `plus` _ = Implicit | 37 | false | false | 0 | 5 | 20 | 14 | 7 | 7 | null | null |
jwaldmann/streams | Main.hs | gpl-3.0 | unary s = do
x <- expressions $ s - 1
op <- [ Snd, Thrd, Delta , Inv , Tail ]
return $ op x | 97 | unary s = do
x <- expressions $ s - 1
op <- [ Snd, Thrd, Delta , Inv , Tail ]
return $ op x | 97 | unary s = do
x <- expressions $ s - 1
op <- [ Snd, Thrd, Delta , Inv , Tail ]
return $ op x | 97 | false | false | 0 | 9 | 31 | 56 | 28 | 28 | null | null |
lukaramu/yarn | src/Game/Yarn/ParseYarn.hs | mit | parseYarn :: String -> String -> Either ParseError YarnFile
parseYarn name = either Left (parseTokens name) . lexYarn name | 122 | parseYarn :: String -> String -> Either ParseError YarnFile
parseYarn name = either Left (parseTokens name) . lexYarn name | 122 | parseYarn name = either Left (parseTokens name) . lexYarn name | 62 | false | true | 0 | 8 | 18 | 50 | 22 | 28 | null | null |
mainland/nikola | examples/common/GUI.hs | bsd-3-clause | bitmapPath :: Float -> Float -> [(Float, Float)]
bitmapPath width height =
[(-width', -height'), (width', -height'), (width', height'), (-width', height')]
where
width' = width / 2
height' = height / 2 | 214 | bitmapPath :: Float -> Float -> [(Float, Float)]
bitmapPath width height =
[(-width', -height'), (width', -height'), (width', height'), (-width', height')]
where
width' = width / 2
height' = height / 2 | 214 | bitmapPath width height =
[(-width', -height'), (width', -height'), (width', height'), (-width', height')]
where
width' = width / 2
height' = height / 2 | 165 | false | true | 0 | 8 | 43 | 98 | 57 | 41 | null | null |
ocharles/hackage-server | MirrorClient.hs | bsd-3-clause | mirrorPackage :: Verbosity
-> MirrorOpts
-> SourceRepo
-> TargetRepo
-> PkgIndexInfo
-> MirrorSession ()
mirrorPackage verbosity opts sourceRepo targetRepo pkginfo = do
liftIO $ notice verbosity $ "mirroring " ++ display pkgid
go `mirrorFin... | 1,444 | mirrorPackage :: Verbosity
-> MirrorOpts
-> SourceRepo
-> TargetRepo
-> PkgIndexInfo
-> MirrorSession ()
mirrorPackage verbosity opts sourceRepo targetRepo pkginfo = do
liftIO $ notice verbosity $ "mirroring " ++ display pkgid
go `mirrorFin... | 1,444 | mirrorPackage verbosity opts sourceRepo targetRepo pkginfo = do
liftIO $ notice verbosity $ "mirroring " ++ display pkgid
go `mirrorFinally` removeTempFiles
where
go :: MirrorSession ()
go = do
rsp <- downloadPackage sourceRepo pkgid locCab locTgz
case rsp of
Just theError ->
... | 1,269 | false | true | 23 | 15 | 402 | 316 | 153 | 163 | null | null |
raventid/coursera_learning | haskell/stepik/4.2numbers_as_bits.hs | mit | parseOnePair :: String -> Either Error (String, String)
parseOnePair xs =
let
parsed = splitOn "=" xs
-- dropWhileEnd might not work on older Haskell
-- trim = dropWhileEnd isSpace . dropWhile isSpace
trim = lstrip . rstrip
lstrip = dropWhile (`elem` " \tn")
rstrip = reverse . lstrip . reverse... | 445 | parseOnePair :: String -> Either Error (String, String)
parseOnePair xs =
let
parsed = splitOn "=" xs
-- dropWhileEnd might not work on older Haskell
-- trim = dropWhileEnd isSpace . dropWhile isSpace
trim = lstrip . rstrip
lstrip = dropWhile (`elem` " \tn")
rstrip = reverse . lstrip . reverse... | 445 | parseOnePair xs =
let
parsed = splitOn "=" xs
-- dropWhileEnd might not work on older Haskell
-- trim = dropWhileEnd isSpace . dropWhile isSpace
trim = lstrip . rstrip
lstrip = dropWhile (`elem` " \tn")
rstrip = reverse . lstrip . reverse
in
if length parsed == 2
then Right ((trim . ... | 389 | false | true | 0 | 13 | 111 | 134 | 71 | 63 | null | null |
egison/egison | hs-src/Language/Egison/Completion.hs | mit | completeEgison _ arg@(']':_, _) = completeParen arg | 53 | completeEgison _ arg@(']':_, _) = completeParen arg | 53 | completeEgison _ arg@(']':_, _) = completeParen arg | 53 | false | false | 1 | 7 | 8 | 29 | 14 | 15 | null | null |
olsner/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | decidedStrictDataConKey = mkPreludeDataConUnique 66 | 67 | decidedStrictDataConKey = mkPreludeDataConUnique 66 | 67 | decidedStrictDataConKey = mkPreludeDataConUnique 66 | 67 | false | false | 0 | 5 | 19 | 9 | 4 | 5 | null | null |
bacchanalia/KitchenSink | KitchenSink/Qualified.hs | gpl-3.0 | -- |'MapS.singleton'
ms_singleton = MapS.singleton | 50 | ms_singleton = MapS.singleton | 29 | ms_singleton = MapS.singleton | 29 | true | false | 0 | 5 | 4 | 9 | 5 | 4 | null | null |
ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/notElem_6.hs | mit | foldr :: (b -> a -> a) -> a -> (List b) -> a;
foldr f z Nil = z | 73 | foldr :: (b -> a -> a) -> a -> (List b) -> a
foldr f z Nil = z | 72 | foldr f z Nil = z | 17 | false | true | 0 | 9 | 29 | 48 | 25 | 23 | null | null |
mightymoose/liquidhaskell | tests/pos/deptup1.hs | bsd-3-clause | incr :: Int -> Int
incr x = x + 1 | 45 | incr :: Int -> Int
incr x = x + 1 | 45 | incr x = x + 1 | 19 | false | true | 0 | 5 | 22 | 22 | 11 | 11 | null | null |
samscott89/tamarin-prover | lib/theory/src/Theory/Constraint/System/Guarded.hs | gpl-3.0 | isGAction _ = False | 31 | isGAction _ = False | 31 | isGAction _ = False | 31 | false | false | 0 | 5 | 15 | 9 | 4 | 5 | null | null |
alexvong1995/pandoc | src/Text/Pandoc/Writers/ICML.hs | gpl-2.0 | inlineToICML opts style (Strikeout lst) = inlinesToICML opts (strikeoutName:style) lst | 86 | inlineToICML opts style (Strikeout lst) = inlinesToICML opts (strikeoutName:style) lst | 86 | inlineToICML opts style (Strikeout lst) = inlinesToICML opts (strikeoutName:style) lst | 86 | false | false | 0 | 7 | 9 | 36 | 16 | 20 | null | null |
sdiehl/ghc | compiler/GHC/Cmm/Expr.hs | bsd-3-clause | minusRegSet = Set.difference | 33 | minusRegSet = Set.difference | 33 | minusRegSet = Set.difference | 33 | false | false | 0 | 5 | 7 | 8 | 4 | 4 | null | null |
Javran/Project-Euler | src/ProjectEuler/Problem65.hs | mit | problem :: Problem
problem = pureProblem 65 Solved result | 57 | problem :: Problem
problem = pureProblem 65 Solved result | 57 | problem = pureProblem 65 Solved result | 38 | false | true | 0 | 5 | 8 | 18 | 9 | 9 | null | null |
timtylin/scholdoc | src/Text/Pandoc/Writers/Haddock.hs | gpl-2.0 | inlineToHaddock opts (Math mt str) = do
let adjust x = case mt of
DisplayMath _ -> cr <> x <> cr
InlineMath -> x
adjust `fmap` (inlineListToHaddock opts $ texMathToInlines mt str) | 228 | inlineToHaddock opts (Math mt str) = do
let adjust x = case mt of
DisplayMath _ -> cr <> x <> cr
InlineMath -> x
adjust `fmap` (inlineListToHaddock opts $ texMathToInlines mt str) | 228 | inlineToHaddock opts (Math mt str) = do
let adjust x = case mt of
DisplayMath _ -> cr <> x <> cr
InlineMath -> x
adjust `fmap` (inlineListToHaddock opts $ texMathToInlines mt str) | 228 | false | false | 0 | 14 | 81 | 82 | 39 | 43 | null | null |
elieux/ghc | compiler/hsSyn/HsExpr.hs | bsd-3-clause | isAtomicHsExpr (HsLit {}) = True | 39 | isAtomicHsExpr (HsLit {}) = True | 39 | isAtomicHsExpr (HsLit {}) = True | 39 | false | false | 0 | 6 | 11 | 17 | 8 | 9 | null | null |
ulricha/dsh-example-queries | Queries/TPCH/Standard/Q10.hs | bsd-3-clause | q10_join :: Day -> Q [((Integer, Text, Decimal, Text, Text, Text, Text), Decimal)]
q10_join startDate =
[ pair (tup7 (c_custkeyQ c)
(c_nameQ c)
(c_acctbalQ c)
(c_phoneQ c)
(n_nameQ n)
(c_addressQ c)
(c_commentQ c))... | 786 | q10_join :: Day -> Q [((Integer, Text, Decimal, Text, Text, Text, Text), Decimal)]
q10_join startDate =
[ pair (tup7 (c_custkeyQ c)
(c_nameQ c)
(c_acctbalQ c)
(c_phoneQ c)
(n_nameQ n)
(c_addressQ c)
(c_commentQ c))... | 786 | q10_join startDate =
[ pair (tup7 (c_custkeyQ c)
(c_nameQ c)
(c_acctbalQ c)
(c_phoneQ c)
(n_nameQ n)
(c_addressQ c)
(c_commentQ c))
(l_extendedpriceQ l * (1 - l_discountQ l))
| c <- customers
, o... | 703 | false | true | 0 | 11 | 266 | 261 | 132 | 129 | null | null |
zhangyz/llvm-slicing | src/LLVM/Slicing/Static/Weiser/MWeiser.hs | apache-2.0 | top :: SliceInfo
top = SInfo mempty mempty | 42 | top :: SliceInfo
top = SInfo mempty mempty | 42 | top = SInfo mempty mempty | 25 | false | true | 0 | 6 | 7 | 24 | 9 | 15 | null | null |
deepakjois/hs-logo | src/Logo/Evaluator.hs | bsd-3-clause | evalBinOp (OperLiteral ">") (NumLiteral l) (NumLiteral r) = StrLiteral (if l > r then "TRUE" else "FALSE") | 107 | evalBinOp (OperLiteral ">") (NumLiteral l) (NumLiteral r) = StrLiteral (if l > r then "TRUE" else "FALSE") | 107 | evalBinOp (OperLiteral ">") (NumLiteral l) (NumLiteral r) = StrLiteral (if l > r then "TRUE" else "FALSE") | 107 | false | false | 0 | 8 | 17 | 52 | 25 | 27 | null | null |
jackbowman/basilica | Main.hs | mit | randomSubject :: IO Strict.Text
randomSubject = (subjects !!) <$> getStdRandom (randomR (0, length subjects - 1))
where subjects = [ "Hey Beautiful"
, "Hey Baby"
, "Hey Hon"
, "Hey Honey"
, "Hey Girl"
, "Hey Sugarlips"
... | 485 | randomSubject :: IO Strict.Text
randomSubject = (subjects !!) <$> getStdRandom (randomR (0, length subjects - 1))
where subjects = [ "Hey Beautiful"
, "Hey Baby"
, "Hey Hon"
, "Hey Honey"
, "Hey Girl"
, "Hey Sugarlips"
... | 485 | randomSubject = (subjects !!) <$> getStdRandom (randomR (0, length subjects - 1))
where subjects = [ "Hey Beautiful"
, "Hey Baby"
, "Hey Hon"
, "Hey Honey"
, "Hey Girl"
, "Hey Sugarlips"
, "Hey Darling"
... | 453 | false | true | 0 | 11 | 241 | 84 | 48 | 36 | null | null |
mookerji/libsbp | haskell/src/SwiftNav/SBP/Flash.hs | lgpl-3.0 | msgFlashReadReq :: Word16
msgFlashReadReq = 0x00E7 | 50 | msgFlashReadReq :: Word16
msgFlashReadReq = 0x00E7 | 50 | msgFlashReadReq = 0x00E7 | 24 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
cfredric/arithmoi | test-suite/Math/NumberTheory/CurvesTests.hs | mit | addAndMultiplyProperty :: Shrink2 (Positive Integer) -> Shrink2 (Positive Integer) -> Shrink2 Word -> Shrink2 Word -> Property
addAndMultiplyProperty (Shrink2 (Positive s)) (Shrink2 (Positive n)) (Shrink2 k) (Shrink2 l) = newPoint s n ==>? \case
SomePoint p
-> k < maxBound `div` 3 && l < maxBound `div` 3 && point... | 593 | addAndMultiplyProperty :: Shrink2 (Positive Integer) -> Shrink2 (Positive Integer) -> Shrink2 Word -> Shrink2 Word -> Property
addAndMultiplyProperty (Shrink2 (Positive s)) (Shrink2 (Positive n)) (Shrink2 k) (Shrink2 l) = newPoint s n ==>? \case
SomePoint p
-> k < maxBound `div` 3 && l < maxBound `div` 3 && point... | 593 | addAndMultiplyProperty (Shrink2 (Positive s)) (Shrink2 (Positive n)) (Shrink2 k) (Shrink2 l) = newPoint s n ==>? \case
SomePoint p
-> k < maxBound `div` 3 && l < maxBound `div` 3 && pointX kp /= 0 && gcd n (pointZ kp) == 1 && gcd n (pointZ lp) == 1 && gcd n (pointZ klp) == 1
==> add kp lp klp === k2lp
whe... | 466 | false | true | 0 | 23 | 174 | 283 | 139 | 144 | null | null |
adbrowne/s3ls-parallel | Main.hs | bsd-3-clause | timeItem
:: NFData b
=> (String -> IO ()) -> String -> (a -> IO b) -> a -> IO b
timeItem logger name f a = do
startTime <- getCurrentTime
result <- f a
_ <- deepseq result (return ()) -- Ensure we include deserialization
endTime <- getCurrentTime
let diff = diffUTCTime endTime startTime
... | 385 | timeItem
:: NFData b
=> (String -> IO ()) -> String -> (a -> IO b) -> a -> IO b
timeItem logger name f a = do
startTime <- getCurrentTime
result <- f a
_ <- deepseq result (return ()) -- Ensure we include deserialization
endTime <- getCurrentTime
let diff = diffUTCTime endTime startTime
... | 385 | timeItem logger name f a = do
startTime <- getCurrentTime
result <- f a
_ <- deepseq result (return ()) -- Ensure we include deserialization
endTime <- getCurrentTime
let diff = diffUTCTime endTime startTime
logger $ "Timing: " ++ name ++ " " ++ show diff
return result | 297 | false | true | 0 | 12 | 104 | 159 | 72 | 87 | null | null |
haskell-opengl/OpenGLRaw | src/Graphics/GL/Functions/F11.hs | bsd-3-clause | ptr_glGetPathTexGenfvNV :: FunPtr (GLenum -> GLenum -> Ptr GLfloat -> IO ())
ptr_glGetPathTexGenfvNV = unsafePerformIO $ getCommand "glGetPathTexGenfvNV" | 153 | ptr_glGetPathTexGenfvNV :: FunPtr (GLenum -> GLenum -> Ptr GLfloat -> IO ())
ptr_glGetPathTexGenfvNV = unsafePerformIO $ getCommand "glGetPathTexGenfvNV" | 153 | ptr_glGetPathTexGenfvNV = unsafePerformIO $ getCommand "glGetPathTexGenfvNV" | 76 | false | true | 0 | 11 | 17 | 44 | 21 | 23 | null | null |
sboosali/workflow-osx | workflow-osx/sources/Workflow/OSX/Example.hs | mit | markWord = do
sendKeyChord [OptionModifier] LeftArrowKey
sendKeyChord [OptionModifier, ShiftModifier] RightArrowKey | 117 | markWord = do
sendKeyChord [OptionModifier] LeftArrowKey
sendKeyChord [OptionModifier, ShiftModifier] RightArrowKey | 117 | markWord = do
sendKeyChord [OptionModifier] LeftArrowKey
sendKeyChord [OptionModifier, ShiftModifier] RightArrowKey | 117 | false | false | 1 | 9 | 11 | 35 | 15 | 20 | null | null |
bjornbm/astro | src/IAU2000/FundamentalArguments.hs | bsd-3-clause | -- | Coefficients required to calculate the equation of the equinoxes
-- terms exceeding 0.5 microarcseconds during the interval 1975-2025.
c_k' :: Floating a => [Angle a]
c_k' = [ -0.00264096
, -0.00006352
, -0.00001175
, -0.00001121
, 0.00000455
] *~~ arcsecond ++ c_k_shared | 314 | c_k' :: Floating a => [Angle a]
c_k' = [ -0.00264096
, -0.00006352
, -0.00001175
, -0.00001121
, 0.00000455
] *~~ arcsecond ++ c_k_shared | 173 | c_k' = [ -0.00264096
, -0.00006352
, -0.00001175
, -0.00001121
, 0.00000455
] *~~ arcsecond ++ c_k_shared | 141 | true | true | 0 | 8 | 80 | 57 | 32 | 25 | null | null |
ckaestne/CIDE | other/CaseStudies/fgl/CIDEfgl/Data/Graph/Inductive/Internal/FiniteMap.hs | gpl-3.0 | rotl (Node _ _ _ Empty) = error "rotl on invalid FiniteMap" | 59 | rotl (Node _ _ _ Empty) = error "rotl on invalid FiniteMap" | 59 | rotl (Node _ _ _ Empty) = error "rotl on invalid FiniteMap" | 59 | false | false | 0 | 6 | 11 | 25 | 11 | 14 | null | null |
vikraman/ghc | compiler/coreSyn/CoreUtils.hs | bsd-3-clause | {- *********************************************************************
* *
exprIsTrivial
* *
************************************************************************
... | 2,217 | exprIsTrivial :: CoreExpr -> Bool
exprIsTrivial (Var _) = True | 71 | exprIsTrivial (Var _) = True | 37 | true | true | 0 | 7 | 541 | 25 | 13 | 12 | null | null |
pwoh/examples-hs | src/MMultDivConq.hs | bsd-3-clause | splitFour :: Acc (Matrix Double)
-> (Acc (Matrix Double), Acc (Matrix Double), Acc (Matrix Double), Acc (Matrix Double))
splitFour arr = (generate sh f1, generate sh f2, generate sh f3, generate sh f4)
where f1 i = arr ! i
f2 i = let Z :. (mi :: Exp Int) :. (ni :: Exp Int) = unlift i
... | 980 | splitFour :: Acc (Matrix Double)
-> (Acc (Matrix Double), Acc (Matrix Double), Acc (Matrix Double), Acc (Matrix Double))
splitFour arr = (generate sh f1, generate sh f2, generate sh f3, generate sh f4)
where f1 i = arr ! i
f2 i = let Z :. (mi :: Exp Int) :. (ni :: Exp Int) = unlift i
... | 980 | splitFour arr = (generate sh f1, generate sh f2, generate sh f3, generate sh f4)
where f1 i = arr ! i
f2 i = let Z :. (mi :: Exp Int) :. (ni :: Exp Int) = unlift i
i' = lift $ Z :. mi :. ni + (n `div` (constant 2))
in arr ! i'
f3 i = let Z :. (mi :: Exp Int)... | 849 | false | true | 5 | 28 | 386 | 536 | 270 | 266 | null | null |
vikraman/ghc | compiler/typecheck/TcBinds.hs | bsd-3-clause | tcVectDecls :: [LVectDecl Name] -> TcM ([LVectDecl TcId])
tcVectDecls decls
= do { decls' <- mapM (wrapLocM tcVect) decls
; let ids = [lvectDeclName decl | decl <- decls', not $ lvectInstDecl decl]
dups = findDupsEq (==) ids
; mapM_ reportVectDups dups
; traceTcConstraints "End of t... | 571 | tcVectDecls :: [LVectDecl Name] -> TcM ([LVectDecl TcId])
tcVectDecls decls
= do { decls' <- mapM (wrapLocM tcVect) decls
; let ids = [lvectDeclName decl | decl <- decls', not $ lvectInstDecl decl]
dups = findDupsEq (==) ids
; mapM_ reportVectDups dups
; traceTcConstraints "End of t... | 571 | tcVectDecls decls
= do { decls' <- mapM (wrapLocM tcVect) decls
; let ids = [lvectDeclName decl | decl <- decls', not $ lvectInstDecl decl]
dups = findDupsEq (==) ids
; mapM_ reportVectDups dups
; traceTcConstraints "End of tcVectDecls"
; return decls'
}
where
re... | 513 | false | true | 2 | 13 | 150 | 193 | 91 | 102 | null | null |
danstiner/transpiler | src/Batch/Lexer.hs | mit | gotoCommand :: Parsec String st [Token]
gotoCommand = keyword KeywordGoto <:> label <:> return []
where
label = fmap (StringTok . strip) unescapedString | 158 | gotoCommand :: Parsec String st [Token]
gotoCommand = keyword KeywordGoto <:> label <:> return []
where
label = fmap (StringTok . strip) unescapedString | 158 | gotoCommand = keyword KeywordGoto <:> label <:> return []
where
label = fmap (StringTok . strip) unescapedString | 118 | false | true | 2 | 7 | 28 | 63 | 28 | 35 | null | null |
AlexeyRaga/eta | compiler/ETA/Prelude/PrelNames.hs | bsd-3-clause | not_RDR = varQual_RDR gHC_CLASSES (fsLit "not") | 63 | not_RDR = varQual_RDR gHC_CLASSES (fsLit "not") | 63 | not_RDR = varQual_RDR gHC_CLASSES (fsLit "not") | 63 | false | false | 0 | 7 | 21 | 17 | 8 | 9 | null | null |
jyrimatti/alava | src-lib/TypeCheck.hs | mit | tcType :: (MonadLogger m, HasCallStack) => Env -> Term -> ResultM m (ETerm,EType)
tcType env term = withExceptT ((err $ ExpectedType env term) <>) $ do
logDebug $ "tcType: " <> show term
checkType env term EType | 218 | tcType :: (MonadLogger m, HasCallStack) => Env -> Term -> ResultM m (ETerm,EType)
tcType env term = withExceptT ((err $ ExpectedType env term) <>) $ do
logDebug $ "tcType: " <> show term
checkType env term EType | 218 | tcType env term = withExceptT ((err $ ExpectedType env term) <>) $ do
logDebug $ "tcType: " <> show term
checkType env term EType | 136 | false | true | 0 | 10 | 43 | 100 | 48 | 52 | null | null |
esengie/algebraic-checker | src/Horn.hs | bsd-3-clause | defFun :: Signature s f => Term s f -> Formula s f
defFun b = b :== b | 69 | defFun :: Signature s f => Term s f -> Formula s f
defFun b = b :== b | 69 | defFun b = b :== b | 18 | false | true | 2 | 8 | 18 | 49 | 22 | 27 | null | null |
myuon/DOTO | src/Api/TodoList.hs | mit | selectTodoLists :: IO [TodoList]
selectTodoLists = do
lists <- runDB connInfo $ selectList [] []
return $ (\(Entity _ u) -> u) <$> lists | 140 | selectTodoLists :: IO [TodoList]
selectTodoLists = do
lists <- runDB connInfo $ selectList [] []
return $ (\(Entity _ u) -> u) <$> lists | 140 | selectTodoLists = do
lists <- runDB connInfo $ selectList [] []
return $ (\(Entity _ u) -> u) <$> lists | 107 | false | true | 0 | 12 | 27 | 67 | 33 | 34 | null | null |
frantisekfarka/ghc-dsi | compiler/nativeGen/PPC/CodeGen.hs | bsd-3-clause | getCondCode :: CmmExpr -> NatM CondCode
-- almost the same as everywhere else - but we need to
-- extend small integers to 32 bit first
getCondCode (CmmMachOp mop [x, y])
= case mop of
MO_F_Eq W32 -> condFltCode EQQ x y
MO_F_Ne W32 -> condFltCode NE x y
MO_F_Gt W32 -> condFltCode GTT x y
MO... | 1,520 | getCondCode :: CmmExpr -> NatM CondCode
getCondCode (CmmMachOp mop [x, y])
= case mop of
MO_F_Eq W32 -> condFltCode EQQ x y
MO_F_Ne W32 -> condFltCode NE x y
MO_F_Gt W32 -> condFltCode GTT x y
MO_F_Ge W32 -> condFltCode GE x y
MO_F_Lt W32 -> condFltCode LTT x y
MO_F_Le W32 -> con... | 1,422 | getCondCode (CmmMachOp mop [x, y])
= case mop of
MO_F_Eq W32 -> condFltCode EQQ x y
MO_F_Ne W32 -> condFltCode NE x y
MO_F_Gt W32 -> condFltCode GTT x y
MO_F_Ge W32 -> condFltCode GE x y
MO_F_Lt W32 -> condFltCode LTT x y
MO_F_Le W32 -> condFltCode LE x y
MO_F_Eq W64 -> c... | 1,382 | true | true | 0 | 10 | 402 | 574 | 265 | 309 | null | null |
brendanhay/gogol | gogol-cloudprivatecatalog/gen/Network/Google/Resource/CloudPrivateCatalog/Projects/Versions/Search.hs | mpl-2.0 | -- | JSONP
pvsCallback :: Lens' ProjectsVersionsSearch (Maybe Text)
pvsCallback
= lens _pvsCallback (\ s a -> s{_pvsCallback = a}) | 132 | pvsCallback :: Lens' ProjectsVersionsSearch (Maybe Text)
pvsCallback
= lens _pvsCallback (\ s a -> s{_pvsCallback = a}) | 121 | pvsCallback
= lens _pvsCallback (\ s a -> s{_pvsCallback = a}) | 64 | true | true | 0 | 9 | 21 | 48 | 25 | 23 | null | null |
elieux/ghc | compiler/main/HscMain.hs | bsd-3-clause | makeSimpleIface :: HscEnv -> Maybe ModIface -> TcGblEnv -> ModDetails
-> IO (ModIface,Bool)
makeSimpleIface hsc_env maybe_old_iface tc_result details = runHsc hsc_env $ do
safe_mode <- hscGetSafeMode tc_result
liftIO $ do
mkIfaceTc hsc_env (fmap mi_iface_hash maybe_old_iface) safe_mode
... | 478 | makeSimpleIface :: HscEnv -> Maybe ModIface -> TcGblEnv -> ModDetails
-> IO (ModIface,Bool)
makeSimpleIface hsc_env maybe_old_iface tc_result details = runHsc hsc_env $ do
safe_mode <- hscGetSafeMode tc_result
liftIO $ do
mkIfaceTc hsc_env (fmap mi_iface_hash maybe_old_iface) safe_mode
... | 478 | makeSimpleIface hsc_env maybe_old_iface tc_result details = runHsc hsc_env $ do
safe_mode <- hscGetSafeMode tc_result
liftIO $ do
mkIfaceTc hsc_env (fmap mi_iface_hash maybe_old_iface) safe_mode
details tc_result
-- | Make a 'ModDetails' from the results of typechecking. Used when
-- ... | 370 | false | true | 0 | 13 | 108 | 96 | 46 | 50 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.