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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
eklavya/Idris-dev | src/Idris/Core/TT.hs | bsd-3-clause | fmapMB f (PVTy t) = liftM PVTy (f t) | 39 | fmapMB f (PVTy t) = liftM PVTy (f t) | 39 | fmapMB f (PVTy t) = liftM PVTy (f t) | 39 | false | false | 0 | 7 | 11 | 29 | 13 | 16 | null | null |
sjakobi/stack | src/Stack/Types/BuildPlan.hs | bsd-3-clause | compToText CompTestSuite = "test-suite" | 39 | compToText CompTestSuite = "test-suite" | 39 | compToText CompTestSuite = "test-suite" | 39 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
nomeata/ghc | compiler/nativeGen/PPC/CodeGen.hs | bsd-3-clause | etRegister' _ (CmmMachOp (MO_SS_Conv W16 W32) [CmmLoad mem _]) = do
Amode addr addr_code <- getAmode mem
return (Any II32 (\dst -> addr_code `snocOL` LA II16 dst addr))
| 177 | getRegister' _ (CmmMachOp (MO_SS_Conv W16 W32) [CmmLoad mem _]) = do
Amode addr addr_code <- getAmode mem
return (Any II32 (\dst -> addr_code `snocOL` LA II16 dst addr)) | 177 | getRegister' _ (CmmMachOp (MO_SS_Conv W16 W32) [CmmLoad mem _]) = do
Amode addr addr_code <- getAmode mem
return (Any II32 (\dst -> addr_code `snocOL` LA II16 dst addr)) | 177 | false | false | 1 | 13 | 36 | 87 | 41 | 46 | null | null |
janschulz/pandoc | src/Text/Pandoc/Parsing.hs | gpl-2.0 | -- | Parses one or more blank lines and returns a string of newlines.
blanklines :: Stream s m Char => ParserT s st m [Char]
blanklines = many1 blankline | 153 | blanklines :: Stream s m Char => ParserT s st m [Char]
blanklines = many1 blankline | 83 | blanklines = many1 blankline | 28 | true | true | 0 | 8 | 29 | 44 | 20 | 24 | null | null |
adnelson/Idris-dev | src/Idris/Reflection.hs | bsd-3-clause | reflectErr (TooManyArguments n) = raw_apply (Var $ reflErrName "TooManyArguments") [reflectName n] | 98 | reflectErr (TooManyArguments n) = raw_apply (Var $ reflErrName "TooManyArguments") [reflectName n] | 98 | reflectErr (TooManyArguments n) = raw_apply (Var $ reflErrName "TooManyArguments") [reflectName n] | 98 | false | false | 0 | 8 | 10 | 36 | 17 | 19 | null | null |
ugnom/MachineLearningStudy | src/Week1/CostFunction.hs | bsd-3-clause | -- calcurate error of cost function using training sets.
errorf :: Parameter -> [TrainingSet] -> Double
errorf p ts =
let h = hyp p
in (sum (map (\t -> ((h (x t)) - (y t))^2) ts)) / (2 * (fromIntegral (length ts))) | 220 | errorf :: Parameter -> [TrainingSet] -> Double
errorf p ts =
let h = hyp p
in (sum (map (\t -> ((h (x t)) - (y t))^2) ts)) / (2 * (fromIntegral (length ts))) | 163 | errorf p ts =
let h = hyp p
in (sum (map (\t -> ((h (x t)) - (y t))^2) ts)) / (2 * (fromIntegral (length ts))) | 116 | true | true | 0 | 20 | 48 | 116 | 60 | 56 | null | null |
cutsea110/aop | src/Fix.hs | bsd-3-clause | -- catamorphism
cata :: Functor f => (f a -> a) -> Fix f -> a
cata phi = phi . fmap (cata phi) . out | 100 | cata :: Functor f => (f a -> a) -> Fix f -> a
cata phi = phi . fmap (cata phi) . out | 84 | cata phi = phi . fmap (cata phi) . out | 38 | true | true | 1 | 10 | 25 | 67 | 30 | 37 | null | null |
spechub/Hets | Comorphisms/CommonLogic2CASL.hs | gpl-2.0 | tok2Str :: Token -> String
tok2Str t = let
r = concatMap (\ c -> if c == 'x' then [c, c] else [c])
$ tokStr t
(d, u) = span (== '.') r
s = if null d then u else 'x' : show (length d) ++ u
in if elem s casl_reserved_fwords then "x_" ++ s else s | 255 | tok2Str :: Token -> String
tok2Str t = let
r = concatMap (\ c -> if c == 'x' then [c, c] else [c])
$ tokStr t
(d, u) = span (== '.') r
s = if null d then u else 'x' : show (length d) ++ u
in if elem s casl_reserved_fwords then "x_" ++ s else s | 255 | tok2Str t = let
r = concatMap (\ c -> if c == 'x' then [c, c] else [c])
$ tokStr t
(d, u) = span (== '.') r
s = if null d then u else 'x' : show (length d) ++ u
in if elem s casl_reserved_fwords then "x_" ++ s else s | 228 | false | true | 0 | 14 | 71 | 139 | 74 | 65 | null | null |
bjpop/berp | libs/src/Berp/Compile/PrimName.hs | bsd-3-clause | preludeModuleName = ModuleName "Prelude" | 40 | preludeModuleName = ModuleName "Prelude" | 40 | preludeModuleName = ModuleName "Prelude" | 40 | false | false | 1 | 5 | 3 | 12 | 4 | 8 | null | null |
mtlstats/mtlstats | src/Mtlstats/Actions.hs | gpl-3.0 | -- | Starts the player editing process
editPlayer :: ProgState -> ProgState
editPlayer = progMode .~ EditPlayer newEditPlayerState | 130 | editPlayer :: ProgState -> ProgState
editPlayer = progMode .~ EditPlayer newEditPlayerState | 91 | editPlayer = progMode .~ EditPlayer newEditPlayerState | 54 | true | true | 0 | 6 | 17 | 23 | 12 | 11 | null | null |
zmeadows/zwerg | lib/Zwerg/Component/Base.hs | mit | getComp :: UUID -> Component a -> MonadCompState (Maybe a)
getComp uuid comp = zLookup uuid . snd <$> use comp | 110 | getComp :: UUID -> Component a -> MonadCompState (Maybe a)
getComp uuid comp = zLookup uuid . snd <$> use comp | 110 | getComp uuid comp = zLookup uuid . snd <$> use comp | 51 | false | true | 0 | 9 | 20 | 50 | 23 | 27 | null | null |
felipeZ/Dynamics | src/copiaGaussian.hs | bsd-3-clause | blockcheck (TGauBlock t) = return True | 38 | blockcheck (TGauBlock t) = return True | 38 | blockcheck (TGauBlock t) = return True | 38 | false | false | 0 | 7 | 5 | 18 | 8 | 10 | null | null |
DougBurke/swish | tests/RDFQueryTest.hs | lgpl-2.1 | u_s, u_o, u_p, u_p1, u_p2a, u_p2b, u_m1, u_m2,
u_rt, u_xt, u_dt :: RDFLabel
u_s = Res $ makeScopedName Nothing baseex "s" | 125 | u_s, u_o, u_p, u_p1, u_p2a, u_p2b, u_m1, u_m2,
u_rt, u_xt, u_dt :: RDFLabel
u_s = Res $ makeScopedName Nothing baseex "s" | 125 | u_s = Res $ makeScopedName Nothing baseex "s" | 47 | false | true | 9 | 5 | 24 | 58 | 31 | 27 | null | null |
kolmodin/cabal | cabal-install/tests/UnitTests/Distribution/Solver/Modular/DSL.hs | bsd-3-clause | withSetupDeps :: ExampleAvailable -> [ExampleDependency] -> ExampleAvailable
withSetupDeps ex setupDeps = ex {
exAvDeps = exAvDeps ex <> CD.fromSetupDeps setupDeps
} | 175 | withSetupDeps :: ExampleAvailable -> [ExampleDependency] -> ExampleAvailable
withSetupDeps ex setupDeps = ex {
exAvDeps = exAvDeps ex <> CD.fromSetupDeps setupDeps
} | 175 | withSetupDeps ex setupDeps = ex {
exAvDeps = exAvDeps ex <> CD.fromSetupDeps setupDeps
} | 98 | false | true | 0 | 9 | 30 | 47 | 24 | 23 | null | null |
5outh/textlunky | src/Types/Item.hs | mit | randItem :: MonadRandom m => m Item
randItem = fromList $
withWeight 1 [Jetpack]
++ withWeight 2 [Cape]
++ withWeight 5 [ClimbingGloves, PitchersMitt, SpikeShoes, SpringShoes]
++ withWeight 8 [Paste, Compass, Spectacles, Parachute] | 244 | randItem :: MonadRandom m => m Item
randItem = fromList $
withWeight 1 [Jetpack]
++ withWeight 2 [Cape]
++ withWeight 5 [ClimbingGloves, PitchersMitt, SpikeShoes, SpringShoes]
++ withWeight 8 [Paste, Compass, Spectacles, Parachute] | 244 | randItem = fromList $
withWeight 1 [Jetpack]
++ withWeight 2 [Cape]
++ withWeight 5 [ClimbingGloves, PitchersMitt, SpikeShoes, SpringShoes]
++ withWeight 8 [Paste, Compass, Spectacles, Parachute] | 208 | false | true | 6 | 7 | 44 | 90 | 46 | 44 | null | null |
lukexi/udp-pal | reliable/Render.hs | bsd-3-clause | initRenderer :: IO (Window, Events, Shape Uniforms)
initRenderer = do
(window, events) <- createWindow "ReliableCubes" resX resY
cubeProg <- createShaderProgram "reliable/poly.vert" "reliable/poly.frag"
cubeGeo <- cubeGeometry (0.5 :: V3 GLfloat) (V3 1 1 1)
cubeShape <- makeShape cubeGeo cubeProg
glE... | 482 | initRenderer :: IO (Window, Events, Shape Uniforms)
initRenderer = do
(window, events) <- createWindow "ReliableCubes" resX resY
cubeProg <- createShaderProgram "reliable/poly.vert" "reliable/poly.frag"
cubeGeo <- cubeGeometry (0.5 :: V3 GLfloat) (V3 1 1 1)
cubeShape <- makeShape cubeGeo cubeProg
glE... | 482 | initRenderer = do
(window, events) <- createWindow "ReliableCubes" resX resY
cubeProg <- createShaderProgram "reliable/poly.vert" "reliable/poly.frag"
cubeGeo <- cubeGeometry (0.5 :: V3 GLfloat) (V3 1 1 1)
cubeShape <- makeShape cubeGeo cubeProg
glEnable GL_DEPTH_TEST
glClearColor 0 0 0.1 1
glEna... | 430 | false | true | 0 | 10 | 86 | 158 | 73 | 85 | null | null |
noteed/gh-hooks | bin/gh-hooks.hs | bsd-2-clause | payload :: B.ByteString -> L.ByteString -> Handler App App ()
payload dbUrl secret = do
signature <- getsRequest $ getHeader "X-Hub-Signature"
body <- readRequestBody 16384 -- TODO correct size.
liftIO $ do
putStrLn "Got some payload."
print body
hFlush stdout
modifyResponse $ setContentType "text/p... | 1,268 | payload :: B.ByteString -> L.ByteString -> Handler App App ()
payload dbUrl secret = do
signature <- getsRequest $ getHeader "X-Hub-Signature"
body <- readRequestBody 16384 -- TODO correct size.
liftIO $ do
putStrLn "Got some payload."
print body
hFlush stdout
modifyResponse $ setContentType "text/p... | 1,268 | payload dbUrl secret = do
signature <- getsRequest $ getHeader "X-Hub-Signature"
body <- readRequestBody 16384 -- TODO correct size.
liftIO $ do
putStrLn "Got some payload."
print body
hFlush stdout
modifyResponse $ setContentType "text/plain"
if signature == Just (B.pack ("sha1=" ++ showDigest (h... | 1,206 | false | true | 0 | 23 | 374 | 325 | 142 | 183 | null | null |
snape/LooplessFunctionalAlgorithms | LooplessGrayRose.hs | apache-2.0 | tmix n mxt = mxt `o` Just (Node n empty) `o` mxt | 50 | tmix n mxt = mxt `o` Just (Node n empty) `o` mxt | 50 | tmix n mxt = mxt `o` Just (Node n empty) `o` mxt | 50 | false | false | 1 | 7 | 13 | 41 | 19 | 22 | null | null |
oldmanmike/ghc | compiler/cmm/CLabel.hs | bsd-3-clause | externallyVisibleCLabel (IdLabel name _ info) = isExternalName name && externallyVisibleIdLabel info | 102 | externallyVisibleCLabel (IdLabel name _ info) = isExternalName name && externallyVisibleIdLabel info | 102 | externallyVisibleCLabel (IdLabel name _ info) = isExternalName name && externallyVisibleIdLabel info | 102 | false | false | 0 | 7 | 12 | 29 | 13 | 16 | null | null |
juodaspaulius/clafer | src/Language/Clafer/Intermediate/StringAnalyzer.hs | mit | -- astrs single subclafer
astrElement :: MonadState (Map.Map String Int) m => IElement -> m IElement
astrElement x = case x of
IEClafer clafer -> IEClafer `liftM` astrClafer clafer
IEConstraint isHard' pexp -> IEConstraint isHard' `liftM` astrPExp pexp
IEGoal isMaximize' pexp -> IEGoal isMaximize' `liftM` astrPEx... | 326 | astrElement :: MonadState (Map.Map String Int) m => IElement -> m IElement
astrElement x = case x of
IEClafer clafer -> IEClafer `liftM` astrClafer clafer
IEConstraint isHard' pexp -> IEConstraint isHard' `liftM` astrPExp pexp
IEGoal isMaximize' pexp -> IEGoal isMaximize' `liftM` astrPExp pexp | 300 | astrElement x = case x of
IEClafer clafer -> IEClafer `liftM` astrClafer clafer
IEConstraint isHard' pexp -> IEConstraint isHard' `liftM` astrPExp pexp
IEGoal isMaximize' pexp -> IEGoal isMaximize' `liftM` astrPExp pexp | 225 | true | true | 0 | 10 | 52 | 113 | 54 | 59 | null | null |
Zankoku-Okuno/ammonite | Language/Ammonite/Syntax/Sugar/Distfix.hs | gpl-3.0 | _go dft (Subvalue x route act) = do
x' <- go dft x
route' <- doRoute `mapM` route
act' <- doAct act
pure $ Subvalue x' route' act'
where
doRoute (Field x) = pure $ Field x
doRoute (Index x) = Index <$> go dft x
doRoute (Slice start stop) = do
start' <- maybe (pure Nothing) ((Just... | 504 | _go dft (Subvalue x route act) = do
x' <- go dft x
route' <- doRoute `mapM` route
act' <- doAct act
pure $ Subvalue x' route' act'
where
doRoute (Field x) = pure $ Field x
doRoute (Index x) = Index <$> go dft x
doRoute (Slice start stop) = do
start' <- maybe (pure Nothing) ((Just... | 504 | _go dft (Subvalue x route act) = do
x' <- go dft x
route' <- doRoute `mapM` route
act' <- doAct act
pure $ Subvalue x' route' act'
where
doRoute (Field x) = pure $ Field x
doRoute (Index x) = Index <$> go dft x
doRoute (Slice start stop) = do
start' <- maybe (pure Nothing) ((Just... | 504 | false | false | 0 | 13 | 156 | 246 | 117 | 129 | null | null |
mightybyte/reflex-dom-stubs | src/GHCJS/DOM/UIEvent.hs | bsd-3-clause | ghcjs_dom_ui_event_get_page_x = undefined | 41 | ghcjs_dom_ui_event_get_page_x = undefined | 41 | ghcjs_dom_ui_event_get_page_x = undefined | 41 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
yangjueji/hblas | tests/UnitBLAS/Level3.hs | bsd-3-clause | matmatTest8DGEMM :: Matrix.SOrientation x -> IO ()
matmatTest8DGEMM or = do
left <- Matrix.generateMutableDenseMatrix or (2,9) (const 1.0)
right <- Matrix.generateMutableDenseMatrix or (2,9) (const 1.0)
res <- Matrix.generateMutableDenseMatrix or (2,2) (const 0.0)
BLAS.dgemm Matrix.Transpose Matrix.N... | 448 | matmatTest8DGEMM :: Matrix.SOrientation x -> IO ()
matmatTest8DGEMM or = do
left <- Matrix.generateMutableDenseMatrix or (2,9) (const 1.0)
right <- Matrix.generateMutableDenseMatrix or (2,9) (const 1.0)
res <- Matrix.generateMutableDenseMatrix or (2,2) (const 0.0)
BLAS.dgemm Matrix.Transpose Matrix.N... | 448 | matmatTest8DGEMM or = do
left <- Matrix.generateMutableDenseMatrix or (2,9) (const 1.0)
right <- Matrix.generateMutableDenseMatrix or (2,9) (const 1.0)
res <- Matrix.generateMutableDenseMatrix or (2,2) (const 0.0)
BLAS.dgemm Matrix.Transpose Matrix.NoTranspose 1.0 1.0 left right res
resList <- Ma... | 397 | false | true | 0 | 10 | 77 | 164 | 78 | 86 | null | null |
bacchanalia/KitchenSink | KitchenSink/Qualified.hs | gpl-3.0 | -- |'VP.foldM_'
vp_foldM_ = VP.foldM_ | 37 | vp_foldM_ = VP.foldM_ | 21 | vp_foldM_ = VP.foldM_ | 21 | true | false | 0 | 5 | 4 | 9 | 5 | 4 | null | null |
hbrouwer/pdrt-sandbox | tutorials/DRSTutorial.hs | apache-2.0 | exampleDRSLambda2b = printDRSBetaReduct exampleDRSLambda2 exampleDRS3 | 69 | exampleDRSLambda2b = printDRSBetaReduct exampleDRSLambda2 exampleDRS3 | 69 | exampleDRSLambda2b = printDRSBetaReduct exampleDRSLambda2 exampleDRS3 | 69 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
Bodigrim/exp-pairs | Math/ExpPairs.hs | gpl-3.0 | -- | Build a constraint, which states that the value of the first linear form is greater or equal to the value of the second one.
(>=.) :: Num t => LinearForm t -> LinearForm t -> Constraint t
lf1 >=. lf2 = Constraint (lf1 - lf2) NonStrict | 239 | (>=.) :: Num t => LinearForm t -> LinearForm t -> Constraint t
lf1 >=. lf2 = Constraint (lf1 - lf2) NonStrict | 109 | lf1 >=. lf2 = Constraint (lf1 - lf2) NonStrict | 46 | true | true | 0 | 10 | 47 | 56 | 27 | 29 | null | null |
nek0/yammat | Handler/Common.hs | agpl-3.0 | removeItem :: Eq a => a -> [a] -> [a]
removeItem _ [] = [] | 58 | removeItem :: Eq a => a -> [a] -> [a]
removeItem _ [] = [] | 58 | removeItem _ [] = [] | 20 | false | true | 0 | 10 | 14 | 47 | 22 | 25 | null | null |
GaloisInc/halvm-ghc | compiler/typecheck/TcType.hs | bsd-3-clause | occCheckExpand :: TcTyVar -> TcType -> Maybe TcType
occCheckExpand tv ty
= go emptyVarEnv ty
where
go :: VarEnv TyVar -> Type -> Maybe Type
-- The Varenv carries mappings necessary
-- because of kind expansion
go env (TyVarTy tv')
| tv == tv' = Nothing
... | 5,771 | occCheckExpand :: TcTyVar -> TcType -> Maybe TcType
occCheckExpand tv ty
= go emptyVarEnv ty
where
go :: VarEnv TyVar -> Type -> Maybe Type
-- The Varenv carries mappings necessary
-- because of kind expansion
go env (TyVarTy tv')
| tv == tv' = Nothing
... | 5,771 | occCheckExpand tv ty
= go emptyVarEnv ty
where
go :: VarEnv TyVar -> Type -> Maybe Type
-- The Varenv carries mappings necessary
-- because of kind expansion
go env (TyVarTy tv')
| tv == tv' = Nothing
| Just tv'' <- lookupVarEnv env tv' = return (mkTyV... | 5,719 | false | true | 5 | 13 | 2,908 | 1,769 | 828 | 941 | null | null |
zanesterling/haskell-compiler | src/TypedPeanoArithmetic/Syntax.hs | bsd-3-clause | -- Type checking
typecheck :: Expr -> Maybe ExprType
typecheck x = case x of
Tr -> Just Bool
Fl -> Just Bool
Zero -> Just Num
IsZero x' -> if typecheck x' == Just Num then Just Bool else Nothing
Succ x' -> if typecheck x' == Just Num then Just Num else Nothing
Pred x' -> if typecheck x' == Just Num the... | 482 | typecheck :: Expr -> Maybe ExprType
typecheck x = case x of
Tr -> Just Bool
Fl -> Just Bool
Zero -> Just Num
IsZero x' -> if typecheck x' == Just Num then Just Bool else Nothing
Succ x' -> if typecheck x' == Just Num then Just Num else Nothing
Pred x' -> if typecheck x' == Just Num then Just Num else ... | 465 | typecheck x = case x of
Tr -> Just Bool
Fl -> Just Bool
Zero -> Just Num
IsZero x' -> if typecheck x' == Just Num then Just Bool else Nothing
Succ x' -> if typecheck x' == Just Num then Just Num else Nothing
Pred x' -> if typecheck x' == Just Num then Just Num else Nothing
If c t f -> let tt = type... | 429 | true | true | 0 | 14 | 132 | 205 | 95 | 110 | null | null |
leshchevds/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | htBoDisk :: String
htBoDisk = "disk" | 36 | htBoDisk :: String
htBoDisk = "disk" | 36 | htBoDisk = "disk" | 17 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
FranklinChen/csound-expression | src/Csound/Air/Misc.hs | bsd-3-clause | razorPad = razorPad' def | 24 | razorPad = razorPad' def | 24 | razorPad = razorPad' def | 24 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
fpco/inline-c-nag | examples/one-dim-fft.hs | mit | main :: IO ()
main = do
let vec = V.fromList
[ C.Complex 0.34907 (-0.37168)
, C.Complex 0.54890 (-0.35669)
, C.Complex 0.74776 (-0.31175)
, C.Complex 0.94459 (-0.23702)
, C.Complex 1.13850 (-0.13274)
, C.Complex 1.32850 0.00074
, C.Complex 1.51370 0.16298
... | 511 | main :: IO ()
main = do
let vec = V.fromList
[ C.Complex 0.34907 (-0.37168)
, C.Complex 0.54890 (-0.35669)
, C.Complex 0.74776 (-0.31175)
, C.Complex 0.94459 (-0.23702)
, C.Complex 1.13850 (-0.13274)
, C.Complex 1.32850 0.00074
, C.Complex 1.51370 0.16298
... | 511 | main = do
let vec = V.fromList
[ C.Complex 0.34907 (-0.37168)
, C.Complex 0.54890 (-0.35669)
, C.Complex 0.74776 (-0.31175)
, C.Complex 0.94459 (-0.23702)
, C.Complex 1.13850 (-0.13274)
, C.Complex 1.32850 0.00074
, C.Complex 1.51370 0.16298
]
prin... | 497 | false | true | 0 | 14 | 164 | 211 | 102 | 109 | null | null |
green-haskell/ghc | compiler/main/Packages.hs | bsd-3-clause | collectLibraryPaths :: [PackageConfig] -> [FilePath]
collectLibraryPaths ps = nub (filter notNull (concatMap libraryDirs ps)) | 125 | collectLibraryPaths :: [PackageConfig] -> [FilePath]
collectLibraryPaths ps = nub (filter notNull (concatMap libraryDirs ps)) | 125 | collectLibraryPaths ps = nub (filter notNull (concatMap libraryDirs ps)) | 72 | false | true | 0 | 9 | 13 | 43 | 22 | 21 | null | null |
acamino/state-codes | src/Data/StateCodes/ISO31662US.hs | mit | toText IN = "IN" | 16 | toText IN = "IN" | 16 | toText IN = "IN" | 16 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
fffej/HS-Poker | LookupPatternMatch.hs | bsd-3-clause | getValueFromProduct 278369 = 5471 | 33 | getValueFromProduct 278369 = 5471 | 33 | getValueFromProduct 278369 = 5471 | 33 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
mfpi/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/EXT/TexturePerturbNormal.hs | bsd-3-clause | gl_TEXTURE_NORMAL :: GLenum
gl_TEXTURE_NORMAL = 0x85AF | 54 | gl_TEXTURE_NORMAL :: GLenum
gl_TEXTURE_NORMAL = 0x85AF | 54 | gl_TEXTURE_NORMAL = 0x85AF | 26 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
choener/FormalGrammars | src/Nussinov.hs | gpl-3.0 | airs !c !d
= c=='A' && d=='U'
|| c=='C' && d=='G'
|| c=='G' && d=='C'
|| c=='G' && d=='U'
|| c=='U' && d=='A'
|| c=='U' && d=='G'
| 143 | pairs !c !d
= c=='A' && d=='U'
|| c=='C' && d=='G'
|| c=='G' && d=='C'
|| c=='G' && d=='U'
|| c=='U' && d=='A'
|| c=='U' && d=='G' | 143 | pairs !c !d
= c=='A' && d=='U'
|| c=='C' && d=='G'
|| c=='G' && d=='C'
|| c=='G' && d=='U'
|| c=='U' && d=='A'
|| c=='U' && d=='G' | 143 | false | false | 7 | 21 | 40 | 125 | 57 | 68 | null | null |
jbracker/supermonad-plugin | src/Control/Super/Plugin/Names.hs | bsd-3-clause | - | Name of the @Return@ type class.
-- Also used as dictionary key for the @Return@ class.
returnClassName :: PluginClassName
returnClassName = "Return"
| 156 | returnClassName :: PluginClassName
returnClassName = "Return" | 61 | returnClassName = "Return" | 26 | true | true | 1 | 10 | 26 | 38 | 18 | 20 | null | null |
brendanhay/gogol | gogol-serviceusage/gen/Network/Google/Resource/ServiceUsage/Services/Disable.hs | mpl-2.0 | -- | Creates a value of 'ServicesDisable' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'sdXgafv'
--
-- * 'sdUploadProtocol'
--
-- * 'sdAccessToken'
--
-- * 'sdUploadType'
--
-- * 'sdPayload'
--
-- * 'sdName'
--
-- * 'sdCallback'
ser... | 695 | servicesDisable
:: DisableServiceRequest -- ^ 'sdPayload'
-> Text -- ^ 'sdName'
-> ServicesDisable
servicesDisable pSdPayload_ pSdName_ =
ServicesDisable'
{ _sdXgafv = Nothing
, _sdUploadProtocol = Nothing
, _sdAccessToken = Nothing
, _sdUploadType = Nothing
, _sdPayload = pSdPayload_
... | 378 | servicesDisable pSdPayload_ pSdName_ =
ServicesDisable'
{ _sdXgafv = Nothing
, _sdUploadProtocol = Nothing
, _sdAccessToken = Nothing
, _sdUploadType = Nothing
, _sdPayload = pSdPayload_
, _sdName = pSdName_
, _sdCallback = Nothing
} | 267 | true | true | 0 | 8 | 150 | 96 | 62 | 34 | null | null |
ghcjs/ghcjs | src/Gen2/Prim.hs | mit | genPrim _ _ DoubleSubOp [r] [x,y] = PrimInline $ r |= x - y | 65 | genPrim _ _ DoubleSubOp [r] [x,y] = PrimInline $ r |= x - y | 65 | genPrim _ _ DoubleSubOp [r] [x,y] = PrimInline $ r |= x - y | 65 | false | false | 0 | 7 | 19 | 38 | 20 | 18 | null | null |
willdonnelly/xdg-basedir | System/Environment/XDG/BaseDir.hs | bsd-3-clause | getDefault "XDG_DATA_HOME" = getEnv "AppData" | 47 | getDefault "XDG_DATA_HOME" = getEnv "AppData" | 47 | getDefault "XDG_DATA_HOME" = getEnv "AppData" | 47 | false | false | 0 | 5 | 6 | 12 | 5 | 7 | null | null |
beni55/haste-compiler | libraries/ghc-7.10/base/GHC/IO/Handle/Internals.hs | bsd-3-clause | withHandle_ :: String -> Handle -> (Handle__ -> IO a) -> IO a
withHandle_ fun h@(FileHandle _ m) act = withHandle_' fun h m act | 131 | withHandle_ :: String -> Handle -> (Handle__ -> IO a) -> IO a
withHandle_ fun h@(FileHandle _ m) act = withHandle_' fun h m act | 131 | withHandle_ fun h@(FileHandle _ m) act = withHandle_' fun h m act | 69 | false | true | 0 | 10 | 28 | 63 | 31 | 32 | null | null |
ndmitchell/hoogle | src/Input/Settings.hs | bsd-3-clause | createSettings :: [Setting] -> Settings
createSettings xs = Settings{..}
where
renameTag = \x -> fromMaybe x $ f x
where f = literals [(a,b) | RenameTag a b <- xs]
reorderModule = \pkg -> case f pkg of
[] -> const 0
... | 581 | createSettings :: [Setting] -> Settings
createSettings xs = Settings{..}
where
renameTag = \x -> fromMaybe x $ f x
where f = literals [(a,b) | RenameTag a b <- xs]
reorderModule = \pkg -> case f pkg of
[] -> const 0
... | 581 | createSettings xs = Settings{..}
where
renameTag = \x -> fromMaybe x $ f x
where f = literals [(a,b) | RenameTag a b <- xs]
reorderModule = \pkg -> case f pkg of
[] -> const 0
xs -> let f = wildcards xs
... | 541 | false | true | 4 | 14 | 232 | 206 | 98 | 108 | null | null |
qzchenwl/LambdaNet | AI/Trainer/BackpropTrainer.hs | mit | updateLayer :: BackpropTrainer -> (Layer, Vector Double, Vector Double) -> Layer
updateLayer t (l, delta, output) = Layer newWeight newBias n
where n = neuron l
newWeight = ((reshape 1 delta) <> (reshape (dim output) output))
newBias = delta
-- | The outputs function scans over each layer of the netw... | 361 | updateLayer :: BackpropTrainer -> (Layer, Vector Double, Vector Double) -> Layer
updateLayer t (l, delta, output) = Layer newWeight newBias n
where n = neuron l
newWeight = ((reshape 1 delta) <> (reshape (dim output) output))
newBias = delta
-- | The outputs function scans over each layer of the netw... | 361 | updateLayer t (l, delta, output) = Layer newWeight newBias n
where n = neuron l
newWeight = ((reshape 1 delta) <> (reshape (dim output) output))
newBias = delta
-- | The outputs function scans over each layer of the network and stores the
-- activated results | 280 | false | true | 2 | 11 | 77 | 109 | 57 | 52 | null | null |
binesiyu/ifl | examples/ch18/StackStack.hs | mit | {-- /snippet Foo --}
{-- snippet outerPut --}
outerPut :: Int -> Foo ()
outerPut = put | 87 | outerPut :: Int -> Foo ()
outerPut = put | 40 | outerPut = put | 14 | true | true | 0 | 7 | 17 | 22 | 12 | 10 | null | null |
sampou-org/pfad | Code/Code07.hs | bsd-3-clause | fringe (Fork xt yt) = fringe xt ++ fringe yt | 47 | fringe (Fork xt yt) = fringe xt ++ fringe yt | 47 | fringe (Fork xt yt) = fringe xt ++ fringe yt | 47 | false | false | 0 | 7 | 12 | 27 | 12 | 15 | null | null |
romanofski/codesnippets | parsecuvmeter/Main.hs | unlicense | main :: IO ()
main = do
contents <- getData
case (parse document "" contents) of
Right xml -> print $ getUVRating "Brisbane" xml
Left err -> print $ show err | 182 | main :: IO ()
main = do
contents <- getData
case (parse document "" contents) of
Right xml -> print $ getUVRating "Brisbane" xml
Left err -> print $ show err | 182 | main = do
contents <- getData
case (parse document "" contents) of
Right xml -> print $ getUVRating "Brisbane" xml
Left err -> print $ show err | 168 | false | true | 1 | 12 | 55 | 78 | 34 | 44 | null | null |
johntyree/HsQML | src/Graphics/QML/Internal/Marshal.hs | bsd-3-clause | tyObject = TypeId 39 | 21 | tyObject = TypeId 39 | 21 | tyObject = TypeId 39 | 21 | false | false | 0 | 5 | 4 | 9 | 4 | 5 | null | null |
timtylin/scholdoc-citeproc | src/Text/CSL/Proc/Disamb.hs | bsd-3-clause | getYears :: Output -> [(String,String)]
getYears o
| OYear x k _ <- o = [(k,x)]
| otherwise = [] | 111 | getYears :: Output -> [(String,String)]
getYears o
| OYear x k _ <- o = [(k,x)]
| otherwise = [] | 111 | getYears o
| OYear x k _ <- o = [(k,x)]
| otherwise = [] | 71 | false | true | 1 | 9 | 34 | 63 | 33 | 30 | null | null |
Super-Fluid/heqet | Heqet/Output/Symbols.hs | gpl-3.0 | {-
The PointInTime is where we measure the clefs and keys for the heading.
-}
renderSymbols :: Music -> StaffOrdering -> PointInTime -> ([HeadingSymbol],[Symbol])
renderSymbols m order pit = let
heading = [ (ClefH Treble,1) ]
syms = concatMap toSym m
in (heading,syms) | 281 | renderSymbols :: Music -> StaffOrdering -> PointInTime -> ([HeadingSymbol],[Symbol])
renderSymbols m order pit = let
heading = [ (ClefH Treble,1) ]
syms = concatMap toSym m
in (heading,syms) | 203 | renderSymbols m order pit = let
heading = [ (ClefH Treble,1) ]
syms = concatMap toSym m
in (heading,syms) | 118 | true | true | 0 | 11 | 55 | 82 | 45 | 37 | null | null |
kharvd/tridiagonal | OptionsParser.hs | bsd-3-clause | defaultOptions = Options
{ optTesting = False
, optMethod = MethodTDMA
, optRandom = Nothing
, optHelp = False
} | 126 | defaultOptions = Options
{ optTesting = False
, optMethod = MethodTDMA
, optRandom = Nothing
, optHelp = False
} | 126 | defaultOptions = Options
{ optTesting = False
, optMethod = MethodTDMA
, optRandom = Nothing
, optHelp = False
} | 126 | false | false | 1 | 7 | 33 | 39 | 21 | 18 | null | null |
ksaveljev/hake-2 | src/Client/Menu.hs | bsd-3-clause | menuItemCommon :: MenuItemRef -> Quake MenuCommonS
menuItemCommon menuItemRef = do
case menuItemRef of
MenuListRef itemRef -> do
menuItem <- readRef itemRef
return (menuItem^.mlGeneric)
MenuActionRef itemRef -> do
menuItem <- readRef itemRef
return (menuItem^.maGeneric)
... | 536 | menuItemCommon :: MenuItemRef -> Quake MenuCommonS
menuItemCommon menuItemRef = do
case menuItemRef of
MenuListRef itemRef -> do
menuItem <- readRef itemRef
return (menuItem^.mlGeneric)
MenuActionRef itemRef -> do
menuItem <- readRef itemRef
return (menuItem^.maGeneric)
... | 536 | menuItemCommon menuItemRef = do
case menuItemRef of
MenuListRef itemRef -> do
menuItem <- readRef itemRef
return (menuItem^.mlGeneric)
MenuActionRef itemRef -> do
menuItem <- readRef itemRef
return (menuItem^.maGeneric)
MenuSliderRef itemRef -> do
menuItem <... | 485 | false | true | 0 | 16 | 144 | 161 | 70 | 91 | null | null |
UU-ComputerScience/uu-cco | uu-cco/src/CCO/Tree/Parser/Validation.hs | bsd-3-clause | schemeOf (List _) = ListTerm | 34 | schemeOf (List _) = ListTerm | 34 | schemeOf (List _) = ListTerm | 34 | false | false | 0 | 7 | 10 | 15 | 7 | 8 | null | null |
scsibug/hS3 | examples/uploadFile.hs | bsd-3-clause | main = do argv <- getArgs
let bucket : key : filename : xs = argv
f <- L.readFile filename
contentFS <- getFileStatus filename
let offset = fileSize contentFS
mConn <- amazonS3ConnectionFromEnv
let conn = fromJust mConn
let obj = S3Object bucket key ... | 550 | main = do argv <- getArgs
let bucket : key : filename : xs = argv
f <- L.readFile filename
contentFS <- getFileStatus filename
let offset = fileSize contentFS
mConn <- amazonS3ConnectionFromEnv
let conn = fromJust mConn
let obj = S3Object bucket key ... | 550 | main = do argv <- getArgs
let bucket : key : filename : xs = argv
f <- L.readFile filename
contentFS <- getFileStatus filename
let offset = fileSize contentFS
mConn <- amazonS3ConnectionFromEnv
let conn = fromJust mConn
let obj = S3Object bucket key ... | 550 | false | false | 3 | 10 | 191 | 162 | 79 | 83 | null | null |
giorgidze/HCodecs | src/Codec/Midi.hs | bsd-3-clause | buildMessage :: Message -> Builder
buildMessage msg | isChannelMessage msg = buildChannelMessage msg | 100 | buildMessage :: Message -> Builder
buildMessage msg | isChannelMessage msg = buildChannelMessage msg | 100 | buildMessage msg | isChannelMessage msg = buildChannelMessage msg | 65 | false | true | 0 | 8 | 12 | 30 | 13 | 17 | null | null |
arekfu/project_euler | p0086/p0086.hs | mit | snd3 (_,x,_) = x | 16 | snd3 (_,x,_) = x | 16 | snd3 (_,x,_) = x | 16 | false | false | 0 | 6 | 3 | 18 | 10 | 8 | null | null |
ktvoelker/robin | src/PidFile.hs | gpl-3.0 | readPidFile :: (MonadIO m, MonadReader Env m) => m (Maybe CPid)
readPidFile = do
view envPidFile
>>= \fp -> liftIO (doesFileExist fp)
>>= \ex -> case ex of
False -> return Nothing
True -> liftIO (readFile fp) >>= return . readMaybe | 246 | readPidFile :: (MonadIO m, MonadReader Env m) => m (Maybe CPid)
readPidFile = do
view envPidFile
>>= \fp -> liftIO (doesFileExist fp)
>>= \ex -> case ex of
False -> return Nothing
True -> liftIO (readFile fp) >>= return . readMaybe | 246 | readPidFile = do
view envPidFile
>>= \fp -> liftIO (doesFileExist fp)
>>= \ex -> case ex of
False -> return Nothing
True -> liftIO (readFile fp) >>= return . readMaybe | 182 | false | true | 6 | 9 | 55 | 112 | 54 | 58 | null | null |
mrmonday/Idris-dev | src/Idris/Primitives.hs | bsd-3-clause | bsrem _ _ = Nothing | 19 | bsrem _ _ = Nothing | 19 | bsrem _ _ = Nothing | 19 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
fiigii/dataflow | ContextSensitiveCP.hs | mit | cpA _ _ = Bottom | 16 | cpA _ _ = Bottom | 16 | cpA _ _ = Bottom | 16 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
gnn/Hets | Maude/Maude2DG.hs | gpl-2.0 | printNewParams4sort [p] = show p | 32 | printNewParams4sort [p] = show p | 32 | printNewParams4sort [p] = show p | 32 | false | false | 0 | 5 | 4 | 16 | 7 | 9 | null | null |
imalsogreg/GameTheory | src/UISetup.hs | bsd-3-clause | setupButtonElements :: String -> UI Element
setupButtonElements groupName = do
UI.mkElement "groupName" #+ [column [
UI.h4 # set UI.id_ (groupName ++ "TopText")
, row [ column [ UI.img # set UI.id_ (groupName ++ "ABtn")
, UI.img # set UI.id_ (groupName ++ "AText")]
, column [ UI... | 526 | setupButtonElements :: String -> UI Element
setupButtonElements groupName = do
UI.mkElement "groupName" #+ [column [
UI.h4 # set UI.id_ (groupName ++ "TopText")
, row [ column [ UI.img # set UI.id_ (groupName ++ "ABtn")
, UI.img # set UI.id_ (groupName ++ "AText")]
, column [ UI... | 526 | setupButtonElements groupName = do
UI.mkElement "groupName" #+ [column [
UI.h4 # set UI.id_ (groupName ++ "TopText")
, row [ column [ UI.img # set UI.id_ (groupName ++ "ABtn")
, UI.img # set UI.id_ (groupName ++ "AText")]
, column [ UI.img # set UI.id_ (groupName ++ "BBtn")
... | 482 | false | true | 0 | 19 | 140 | 178 | 89 | 89 | null | null |
vdweegen/UvA-Software_Testing | Lab2/Willem/Exercises.hs | gpl-3.0 | -- Assignment 2 / Lab 2 :: Group 14 --
-- Define Main --
main = do
putStrLn "===================="
putStrLn "Assignment 2 / Lab 2"
putStrLn "===================="
putStrLn "> Exercise 1"
exercise1
putStrLn "> Exercise 2"
exercise2
putStrLn "> Exercise 3a"
exercise3a
putStrLn "> ... | 569 | main = do
putStrLn "===================="
putStrLn "Assignment 2 / Lab 2"
putStrLn "===================="
putStrLn "> Exercise 1"
exercise1
putStrLn "> Exercise 2"
exercise2
putStrLn "> Exercise 3a"
exercise3a
putStrLn "> Exercise 3b"
exercise3b
putStrLn "> Exercise 4"
... | 511 | main = do
putStrLn "===================="
putStrLn "Assignment 2 / Lab 2"
putStrLn "===================="
putStrLn "> Exercise 1"
exercise1
putStrLn "> Exercise 2"
exercise2
putStrLn "> Exercise 3a"
exercise3a
putStrLn "> Exercise 3b"
exercise3b
putStrLn "> Exercise 4"
... | 511 | true | false | 0 | 7 | 158 | 108 | 39 | 69 | null | null |
tolysz/prepare-ghcjs | spec-lts8/cabal/Cabal/Distribution/PackageDescription.hs | bsd-3-clause | specVersion :: PackageDescription -> Version
specVersion pkg = case specVersionRaw pkg of
Left version -> version
Right versionRange -> case asVersionIntervals versionRange of
[] -> Version [0] []
((LowerBound version _, _):_) -> v... | 567 | specVersion :: PackageDescription -> Version
specVersion pkg = case specVersionRaw pkg of
Left version -> version
Right versionRange -> case asVersionIntervals versionRange of
[] -> Version [0] []
((LowerBound version _, _):_) -> v... | 567 | specVersion pkg = case specVersionRaw pkg of
Left version -> version
Right versionRange -> case asVersionIntervals versionRange of
[] -> Version [0] []
((LowerBound version _, _):_) -> version
-- | The range of versions of the Cab... | 522 | false | true | 0 | 14 | 169 | 98 | 51 | 47 | null | null |
dylanmc/cryptol | src/Cryptol/Symbolic/Value.hs | bsd-3-clause | fromSeq (VCons x th) = do
v <- force th
xs <- fromSeq v
return (x : xs) | 77 | fromSeq (VCons x th) = do
v <- force th
xs <- fromSeq v
return (x : xs) | 77 | fromSeq (VCons x th) = do
v <- force th
xs <- fromSeq v
return (x : xs) | 77 | false | false | 0 | 9 | 23 | 50 | 22 | 28 | null | null |
hvr/jhc | regress/tests/1_typecheck/2_pass/ghc/tc112.hs | mit | g :: (C a b, Eq b) => a -> Bool
g x = f x == f x | 48 | g :: (C a b, Eq b) => a -> Bool
g x = f x == f x | 48 | g x = f x == f x | 16 | false | true | 0 | 8 | 18 | 50 | 23 | 27 | null | null |
brendanhay/gogol | gogol-ml/gen/Network/Google/Resource/Ml/Projects/Predict.hs | mpl-2.0 | -- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
ppUploadType :: Lens' ProjectsPredict (Maybe Text)
ppUploadType
= lens _ppUploadType (\ s a -> s{_ppUploadType = a}) | 189 | ppUploadType :: Lens' ProjectsPredict (Maybe Text)
ppUploadType
= lens _ppUploadType (\ s a -> s{_ppUploadType = a}) | 118 | ppUploadType
= lens _ppUploadType (\ s a -> s{_ppUploadType = a}) | 67 | true | true | 0 | 9 | 28 | 48 | 25 | 23 | null | null |
dcreager/cabal | Distribution/Compat/TempFile.hs | bsd-3-clause | pathSeparator = '\\' | 20 | pathSeparator = '\\' | 20 | pathSeparator = '\\' | 20 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
lucasdicioccio/laborantin-hs | Laborantin/Query.hs | apache-2.0 | evalExpr exec (ScParam key) = Right $ (key, M.lookup key (eParamSet exec)) | 76 | evalExpr exec (ScParam key) = Right $ (key, M.lookup key (eParamSet exec)) | 76 | evalExpr exec (ScParam key) = Right $ (key, M.lookup key (eParamSet exec)) | 76 | false | false | 0 | 9 | 13 | 40 | 20 | 20 | null | null |
whittle/subledger | subledger-tests/src/Network/API/Subledger/Test/Prelude.hs | bsd-3-clause | liftIO :: IO a -> Subledger a
liftIO io = M.liftIO io | 53 | liftIO :: IO a -> Subledger a
liftIO io = M.liftIO io | 53 | liftIO io = M.liftIO io | 23 | false | true | 0 | 6 | 11 | 32 | 14 | 18 | null | null |
bobismijnnaam/hywar | Transformations.hs | mit | inlines [] e = e | 16 | inlines [] e = e | 16 | inlines [] e = e | 16 | false | false | 0 | 6 | 4 | 13 | 6 | 7 | null | null |
athanclark/sets | src/Data/Set/Ordered/Many/With.hs | mit | difference :: ( Ord k
, Eq (c a)
, Sets.HasEmpty (c a)
, Sets.HasDifference (c a)
) => SetsWith k c a -> SetsWith k c a -> SetsWith k c a
difference (SetsWith (f,xs)) (SetsWith (_,ys)) = SetsWith
(f, Map.filter (/= Sets.empty) $ Map.unionWith Sets.difference
... | 355 | difference :: ( Ord k
, Eq (c a)
, Sets.HasEmpty (c a)
, Sets.HasDifference (c a)
) => SetsWith k c a -> SetsWith k c a -> SetsWith k c a
difference (SetsWith (f,xs)) (SetsWith (_,ys)) = SetsWith
(f, Map.filter (/= Sets.empty) $ Map.unionWith Sets.difference
... | 355 | difference (SetsWith (f,xs)) (SetsWith (_,ys)) = SetsWith
(f, Map.filter (/= Sets.empty) $ Map.unionWith Sets.difference
xs (ys `Map.intersection` xs)) | 161 | false | true | 0 | 9 | 116 | 164 | 85 | 79 | null | null |
liamoc/sprig-hs | Graphics/UI/SDL/Sprig/Primitives.hs | bsd-3-clause | ellipseBlendArb a a1 a2 a3 a4 a5 a6 a7 = withSurface a $ \a' -> withInteger a1 $ \a1' -> withInteger a2 $ \a2' -> withDoubleP a3 $ \a3' -> withDoubleP a4 $ \a4' -> withDoubleP a5 $ \a5' -> withPixelVl a6 $ \a6' -> withWordVal a7 $ \a7' -> spgEllipseBlendArb a' a1' a2' a3' a4' a5' a6' a7' | 294 | ellipseBlendArb a a1 a2 a3 a4 a5 a6 a7 = withSurface a $ \a' -> withInteger a1 $ \a1' -> withInteger a2 $ \a2' -> withDoubleP a3 $ \a3' -> withDoubleP a4 $ \a4' -> withDoubleP a5 $ \a5' -> withPixelVl a6 $ \a6' -> withWordVal a7 $ \a7' -> spgEllipseBlendArb a' a1' a2' a3' a4' a5' a6' a7' | 294 | ellipseBlendArb a a1 a2 a3 a4 a5 a6 a7 = withSurface a $ \a' -> withInteger a1 $ \a1' -> withInteger a2 $ \a2' -> withDoubleP a3 $ \a3' -> withDoubleP a4 $ \a4' -> withDoubleP a5 $ \a5' -> withPixelVl a6 $ \a6' -> withWordVal a7 $ \a7' -> spgEllipseBlendArb a' a1' a2' a3' a4' a5' a6' a7' | 294 | false | false | 0 | 21 | 64 | 136 | 67 | 69 | null | null |
suhailshergill/liboleg | Language/TEval/EvalTaglessF.hs | bsd-3-clause | test23d = evald (term2 `a` (i 1) `a` (i 2)) | 43 | test23d = evald (term2 `a` (i 1) `a` (i 2)) | 43 | test23d = evald (term2 `a` (i 1) `a` (i 2)) | 43 | false | false | 1 | 10 | 9 | 40 | 20 | 20 | null | null |
jvilar/hrows | test/Expression.hs | gpl-2.0 | evalNoNames :: [Int] -> Text -> Field
evalNoNames xs = evalInts xs . parseExpression | 84 | evalNoNames :: [Int] -> Text -> Field
evalNoNames xs = evalInts xs . parseExpression | 84 | evalNoNames xs = evalInts xs . parseExpression | 46 | false | true | 0 | 6 | 13 | 32 | 16 | 16 | null | null |
anwb/fp-one-on-one | lab-06.hs | mit | size (_:>rs) = 1 + foldl (+) 0 (map size rs) | 47 | size (_:>rs) = 1 + foldl (+) 0 (map size rs) | 47 | size (_:>rs) = 1 + foldl (+) 0 (map size rs) | 47 | false | false | 0 | 8 | 13 | 37 | 19 | 18 | null | null |
rad1al/hutton_exercises | ch07.hs | gpl-2.0 | f = unfold null (f . head) tail | 31 | f = unfold null (f . head) tail | 31 | f = unfold null (f . head) tail | 31 | false | false | 1 | 7 | 7 | 23 | 10 | 13 | null | null |
GaloisInc/http-server | Network/HTTP/Server/HtmlForm.hs | mit | -- | Try to parse the body of a request.
fromRequest :: Request String -> Maybe FormFields
fromRequest r = let mv = mime_request r
in case mimeType (mime_val_type mv) of
Multipart FormData -> Just (FF (toMap mv))
_ -> Nothing
where toMap mv =... | 663 | fromRequest :: Request String -> Maybe FormFields
fromRequest r = let mv = mime_request r
in case mimeType (mime_val_type mv) of
Multipart FormData -> Just (FF (toMap mv))
_ -> Nothing
where toMap mv = case mime_val_content mv of
... | 622 | fromRequest r = let mv = mime_request r
in case mimeType (mime_val_type mv) of
Multipart FormData -> Just (FF (toMap mv))
_ -> Nothing
where toMap mv = case mime_val_content mv of
Multi vs -> concatMap toMap vs
... | 572 | true | true | 2 | 14 | 284 | 213 | 96 | 117 | null | null |
leormarqs/TrabalhoGrafos | src/Graph/Digraph.hs | agpl-3.0 | removeNode :: NodeId -> Digraph -> Digraph
removeNode n (Digraph ns a) = Digraph ns' a'
where
ns' = delete n ns
a' = filter (\x -> n /= sourceOf x) a''
a'' = filter (\x -> n /= targetOf x) a
--remove a Arch from a digraph | 237 | removeNode :: NodeId -> Digraph -> Digraph
removeNode n (Digraph ns a) = Digraph ns' a'
where
ns' = delete n ns
a' = filter (\x -> n /= sourceOf x) a''
a'' = filter (\x -> n /= targetOf x) a
--remove a Arch from a digraph | 237 | removeNode n (Digraph ns a) = Digraph ns' a'
where
ns' = delete n ns
a' = filter (\x -> n /= sourceOf x) a''
a'' = filter (\x -> n /= targetOf x) a
--remove a Arch from a digraph | 194 | false | true | 0 | 9 | 63 | 101 | 51 | 50 | null | null |
FranklinChen/hugs98-plus-Sep2006 | packages/GLUT/Graphics/UI/GLUT/Constants.hs | bsd-3-clause | glut_AUX3 = 0x4000 | 47 | glut_AUX3 = 0x4000 | 47 | glut_AUX3 = 0x4000 | 47 | false | false | 0 | 4 | 31 | 6 | 3 | 3 | null | null |
Fermat/Gottlob | Language/TypeInference.hs | bsd-3-clause | infer (SApp p1 p2) = do
(a1, c1) <- infer p1
(a2, c2) <- infer p2
n <- get
modify (+1)
return (EVar $ "X"++ show n, (a1, To a2 (EVar $ "X"++ show n)):(c1 ++ c2)) | 174 | infer (SApp p1 p2) = do
(a1, c1) <- infer p1
(a2, c2) <- infer p2
n <- get
modify (+1)
return (EVar $ "X"++ show n, (a1, To a2 (EVar $ "X"++ show n)):(c1 ++ c2)) | 174 | infer (SApp p1 p2) = do
(a1, c1) <- infer p1
(a2, c2) <- infer p2
n <- get
modify (+1)
return (EVar $ "X"++ show n, (a1, To a2 (EVar $ "X"++ show n)):(c1 ++ c2)) | 174 | false | false | 0 | 14 | 49 | 126 | 62 | 64 | null | null |
jacekszymanski/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxLANGUAGE_ARABIC_YEMEN :: Int
wxLANGUAGE_ARABIC_YEMEN = 24 | 59 | wxLANGUAGE_ARABIC_YEMEN :: Int
wxLANGUAGE_ARABIC_YEMEN = 24 | 59 | wxLANGUAGE_ARABIC_YEMEN = 24 | 28 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
ekmett/ghc | utils/genprimopcode/Main.hs | bsd-3-clause | mkPOI_LHS_text :: Entry -> String
mkPOI_LHS_text i
= "primOpInfo " ++ cons i ++ " = " | 88 | mkPOI_LHS_text :: Entry -> String
mkPOI_LHS_text i
= "primOpInfo " ++ cons i ++ " = " | 88 | mkPOI_LHS_text i
= "primOpInfo " ++ cons i ++ " = " | 54 | false | true | 0 | 7 | 19 | 29 | 14 | 15 | null | null |
christiaanb/Idris-dev | src/Idris/ElabTerm.hs | bsd-3-clause | reifyRaw t = fail ("Unknown reflection raw term: " ++ show t) | 61 | reifyRaw t = fail ("Unknown reflection raw term: " ++ show t) | 61 | reifyRaw t = fail ("Unknown reflection raw term: " ++ show t) | 61 | false | false | 0 | 8 | 11 | 22 | 10 | 12 | null | null |
PavelClaudiuStefan/FMI | An_3_Semestru_1/ProgramareDeclarativa/Extra/Laborator/Laborator 9/Audit.hs | cc0-1.0 | chr' :: Int -> Audit Char
chr' = debug chr | 42 | chr' :: Int -> Audit Char
chr' = debug chr | 42 | chr' = debug chr | 16 | false | true | 0 | 7 | 9 | 27 | 11 | 16 | null | null |
rosenbergdm/language-r | src/Language/R/sketches/InFin.hs | bsd-3-clause | -- 128
-- Converter from the Initial to the Final representations
itf :: Symantics repr => IR repr t -> repr t
itf (INT n) = int n | 133 | itf :: Symantics repr => IR repr t -> repr t
itf (INT n) = int n | 65 | itf (INT n) = int n | 20 | true | true | 0 | 7 | 30 | 48 | 22 | 26 | null | null |
alexander-at-github/eta | compiler/ETA/Main/ErrUtils.hs | bsd-3-clause | fatalErrorMsg' :: LogAction -> DynFlags -> MsgDoc -> IO ()
fatalErrorMsg' la dflags msg =
la dflags SevFatal noSrcSpan (defaultErrStyle dflags) msg | 151 | fatalErrorMsg' :: LogAction -> DynFlags -> MsgDoc -> IO ()
fatalErrorMsg' la dflags msg =
la dflags SevFatal noSrcSpan (defaultErrStyle dflags) msg | 151 | fatalErrorMsg' la dflags msg =
la dflags SevFatal noSrcSpan (defaultErrStyle dflags) msg | 92 | false | true | 0 | 9 | 25 | 59 | 26 | 33 | null | null |
AlexeyRaga/eta | compiler/ETA/Prelude/PrelNames.hs | bsd-3-clause | newStablePtrName = varQual gHC_STABLE (fsLit "newStablePtr") newStablePtrIdKey | 84 | newStablePtrName = varQual gHC_STABLE (fsLit "newStablePtr") newStablePtrIdKey | 84 | newStablePtrName = varQual gHC_STABLE (fsLit "newStablePtr") newStablePtrIdKey | 84 | false | false | 0 | 7 | 12 | 19 | 9 | 10 | null | null |
opentower/carnap | Carnap/src/Carnap/Calculi/NaturalDeduction/Checker.hs | gpl-3.0 | hoseqFromNode lineno rules prems conc =
do r <- rules
--run a non-deterministic computation over all permutations of
--the supplied premises
rps <- permutations (premisesOf r)
if length rps /= length prems
then return $ Left $ GenericError "Wrong nu... | 1,960 | hoseqFromNode lineno rules prems conc =
do r <- rules
--run a non-deterministic computation over all permutations of
--the supplied premises
rps <- permutations (premisesOf r)
if length rps /= length prems
then return $ Left $ GenericError "Wrong nu... | 1,960 | hoseqFromNode lineno rules prems conc =
do r <- rules
--run a non-deterministic computation over all permutations of
--the supplied premises
rps <- permutations (premisesOf r)
if length rps /= length prems
then return $ Left $ GenericError "Wrong nu... | 1,960 | false | false | 0 | 24 | 981 | 409 | 204 | 205 | null | null |
mkfifo/lambda_calculus | impl/untyped/haskell/parse.hs | mit | showStmt (SAssign n t) = n ++ " = " ++ (showTerm t) | 51 | showStmt (SAssign n t) = n ++ " = " ++ (showTerm t) | 51 | showStmt (SAssign n t) = n ++ " = " ++ (showTerm t) | 51 | false | false | 0 | 7 | 12 | 32 | 15 | 17 | null | null |
ezyang/binary | tests/File.hs | bsd-3-clause | main :: IO ()
main = do
_ <- runTestTT readWriteTest
return () | 67 | main :: IO ()
main = do
_ <- runTestTT readWriteTest
return () | 67 | main = do
_ <- runTestTT readWriteTest
return () | 53 | false | true | 1 | 9 | 17 | 38 | 15 | 23 | null | null |
urbanslug/ghc | testsuite/tests/typecheck/should_compile/tc093.hs | bsd-3-clause | bindState :: State c a -> (a -> State c b) -> State c b
bindState m k = State (\s0 -> let (a,s1) = (unState m) s0
(b,s2) = (unState (k a)) s1
in (b,s2)) | 217 | bindState :: State c a -> (a -> State c b) -> State c b
bindState m k = State (\s0 -> let (a,s1) = (unState m) s0
(b,s2) = (unState (k a)) s1
in (b,s2)) | 217 | bindState m k = State (\s0 -> let (a,s1) = (unState m) s0
(b,s2) = (unState (k a)) s1
in (b,s2)) | 161 | false | true | 0 | 16 | 100 | 117 | 59 | 58 | null | null |
rubik/stack | src/Stack/Package.hs | bsd-3-clause | benchmarkFiles
:: (MonadLogger m, MonadIO m, MonadThrow m, MonadReader (Path Abs File, Path Abs Dir) m)
=> Benchmark -> m (Set ModuleName, Set DotCabalPath, [PackageWarning])
benchmarkFiles bench = do
dirs <- mapMaybeM resolveDirOrWarn (hsSourceDirs build)
dir <- asks (parent . fst)
(modules,files,w... | 868 | benchmarkFiles
:: (MonadLogger m, MonadIO m, MonadThrow m, MonadReader (Path Abs File, Path Abs Dir) m)
=> Benchmark -> m (Set ModuleName, Set DotCabalPath, [PackageWarning])
benchmarkFiles bench = do
dirs <- mapMaybeM resolveDirOrWarn (hsSourceDirs build)
dir <- asks (parent . fst)
(modules,files,w... | 868 | benchmarkFiles bench = do
dirs <- mapMaybeM resolveDirOrWarn (hsSourceDirs build)
dir <- asks (parent . fst)
(modules,files,warnings) <-
resolveFilesAndDeps
(Just $ benchmarkName bench)
(dirs ++ [dir])
(bnames <> exposed)
haskellModuleExts
cfiles <... | 685 | false | true | 2 | 11 | 231 | 267 | 133 | 134 | null | null |
gnn/Hets | Driver/Options.hs | gpl-2.0 | outTypeList :: [OutType]
outTypeList = let dl = [Delta, Fully] in
plainOutTypeList
++ [ PrettyOut p | p <- prettyList ++ prettyList2]
++ [ SigFile d | d <- dl ]
++ [ TheoryFile d | d <- dl ]
++ [ DfgFile x | x <- spfTypes]
++ [ GraphOut f | f <- graphList ] | 281 | outTypeList :: [OutType]
outTypeList = let dl = [Delta, Fully] in
plainOutTypeList
++ [ PrettyOut p | p <- prettyList ++ prettyList2]
++ [ SigFile d | d <- dl ]
++ [ TheoryFile d | d <- dl ]
++ [ DfgFile x | x <- spfTypes]
++ [ GraphOut f | f <- graphList ] | 281 | outTypeList = let dl = [Delta, Fully] in
plainOutTypeList
++ [ PrettyOut p | p <- prettyList ++ prettyList2]
++ [ SigFile d | d <- dl ]
++ [ TheoryFile d | d <- dl ]
++ [ DfgFile x | x <- spfTypes]
++ [ GraphOut f | f <- graphList ] | 256 | false | true | 10 | 9 | 80 | 131 | 64 | 67 | null | null |
keithodulaigh/Hets | PGIP/ParseProofScript.hs | gpl-2.0 | parseContent :: FilePath -> String -> Either String [LitCommand]
parseContent fp str = let
l = number $ lines str
(es, rs) = partitionEithers $ map
(\ (s, i) -> parseSingleLine fp i s) l
in if null es then Right rs else
Left $ unlines es | 252 | parseContent :: FilePath -> String -> Either String [LitCommand]
parseContent fp str = let
l = number $ lines str
(es, rs) = partitionEithers $ map
(\ (s, i) -> parseSingleLine fp i s) l
in if null es then Right rs else
Left $ unlines es | 252 | parseContent fp str = let
l = number $ lines str
(es, rs) = partitionEithers $ map
(\ (s, i) -> parseSingleLine fp i s) l
in if null es then Right rs else
Left $ unlines es | 187 | false | true | 0 | 13 | 61 | 113 | 57 | 56 | null | null |
forked-upstream-packages-for-ghcjs/ghcjs | ghcjs/src/Gen2/Compactor.hs | mit | -- ByteString is prefixed with length, then blocks of 4 numbers encoding 3 bytes
encodeBinary :: BS.ByteString -> [Int]
encodeBinary bs = BS.length bs : go bs
where
go b | BS.null b = []
| l == 1 = let b0 = b `BS.index` 0
in map fromIntegral [ b0 `shiftR` 2, (b0 .&. 3) `shiftL`... | 1,216 | encodeBinary :: BS.ByteString -> [Int]
encodeBinary bs = BS.length bs : go bs
where
go b | BS.null b = []
| l == 1 = let b0 = b `BS.index` 0
in map fromIntegral [ b0 `shiftR` 2, (b0 .&. 3) `shiftL` 4 ]
| l == 2 = let b0 = b `BS.index` 0
b1... | 1,135 | encodeBinary bs = BS.length bs : go bs
where
go b | BS.null b = []
| l == 1 = let b0 = b `BS.index` 0
in map fromIntegral [ b0 `shiftR` 2, (b0 .&. 3) `shiftL` 4 ]
| l == 2 = let b0 = b `BS.index` 0
b1 = b `BS.index` 1
... | 1,096 | true | true | 0 | 15 | 666 | 396 | 220 | 176 | null | null |
ibotty/snaplet-mysql-simple | src/Snap/Snaplet/Auth/Backends/MysqlSimple.hs | bsd-3-clause | saveQuery :: AuthTable -> AuthUser -> (Text, [Action])
saveQuery at u@AuthUser{..} = maybe insertQuery updateQuery userId
where
insertQuery = (T.concat [ "INSERT INTO "
, tblName at
, " ("
, T.intercalate "," cols
... | 1,007 | saveQuery :: AuthTable -> AuthUser -> (Text, [Action])
saveQuery at u@AuthUser{..} = maybe insertQuery updateQuery userId
where
insertQuery = (T.concat [ "INSERT INTO "
, tblName at
, " ("
, T.intercalate "," cols
... | 1,007 | saveQuery at u@AuthUser{..} = maybe insertQuery updateQuery userId
where
insertQuery = (T.concat [ "INSERT INTO "
, tblName at
, " ("
, T.intercalate "," cols
, ") VALUES ("
... | 952 | false | true | 0 | 13 | 519 | 296 | 155 | 141 | null | null |
TueHaulund/ROOPLC | src/CodeGenerator.hs | mit | registerZero :: Register
registerZero = Reg 0 | 45 | registerZero :: Register
registerZero = Reg 0 | 45 | registerZero = Reg 0 | 20 | false | true | 0 | 5 | 6 | 14 | 7 | 7 | null | null |
BartAdv/Idris-dev | src/Idris/Elab/Record.hs | bsd-3-clause | in_name :: Name -> Name
in_name (UN n) = sMN 0 (str n ++ "_in") | 63 | in_name :: Name -> Name
in_name (UN n) = sMN 0 (str n ++ "_in") | 63 | in_name (UN n) = sMN 0 (str n ++ "_in") | 39 | false | true | 0 | 9 | 14 | 44 | 20 | 24 | null | null |
ancientlanguage/haskell-analysis | grammar/src/Grammar/Common/Decompose.hs | mit | decomposeChar '\x1E48' = "\x004E\x0331" | 39 | decomposeChar '\x1E48' = "\x004E\x0331" | 39 | decomposeChar '\x1E48' = "\x004E\x0331" | 39 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
ocean0yohsuke/Scheme | src/Scheme/Action/Command.hs | bsd-3-clause | pushTry :: Try -> Scm ()
pushTry try = do
heap <- getTryHeap
putTryHeap $ try : heap | 92 | pushTry :: Try -> Scm ()
pushTry try = do
heap <- getTryHeap
putTryHeap $ try : heap | 92 | pushTry try = do
heap <- getTryHeap
putTryHeap $ try : heap | 67 | false | true | 0 | 8 | 25 | 41 | 19 | 22 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.