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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bennofs/freenect | src/Freenect.hs | bsd-3-clause | setVideoCallback :: Device -> (Vector Word8 -> Word32 -> IO ()) -> IO ()
setVideoCallback d callback = flip withD d $ \dptr -> do
dptr <- peek dptr
resolution <- get_freenect_video_resolution dptr
let !size = resolutionToSize (toEnum (fromIntegral resolution))
callbackPtr <- wrapVideoCallback $ \_ payloadptr ti... | 562 | setVideoCallback :: Device -> (Vector Word8 -> Word32 -> IO ()) -> IO ()
setVideoCallback d callback = flip withD d $ \dptr -> do
dptr <- peek dptr
resolution <- get_freenect_video_resolution dptr
let !size = resolutionToSize (toEnum (fromIntegral resolution))
callbackPtr <- wrapVideoCallback $ \_ payloadptr ti... | 562 | setVideoCallback d callback = flip withD d $ \dptr -> do
dptr <- peek dptr
resolution <- get_freenect_video_resolution dptr
let !size = resolutionToSize (toEnum (fromIntegral resolution))
callbackPtr <- wrapVideoCallback $ \_ payloadptr timestamp -> do
fptr <- newForeignPtr_ payloadptr
let !vector = uns... | 489 | false | true | 0 | 20 | 99 | 185 | 82 | 103 | null | null |
SavinaRoja/SavinaRoja.github.io | assets/centraldogma.hs | mit | -- Arginine
geneticCode "AGU" = 'S' | 35 | geneticCode "AGU" = 'S' | 23 | geneticCode "AGU" = 'S' | 23 | true | false | 0 | 5 | 5 | 10 | 5 | 5 | null | null |
massysett/penny | penny/lib/Penny/Copper/Grammar.hs | bsd-3-clause | t_DebitCredit_NonNeutral = record "T_DebitCredit_NonNeutral"
[ debitCredit, rWhite'Star, nonNeutral] | 102 | t_DebitCredit_NonNeutral = record "T_DebitCredit_NonNeutral"
[ debitCredit, rWhite'Star, nonNeutral] | 102 | t_DebitCredit_NonNeutral = record "T_DebitCredit_NonNeutral"
[ debitCredit, rWhite'Star, nonNeutral] | 102 | false | false | 0 | 5 | 9 | 21 | 11 | 10 | null | null |
svenssonjoel/Obsidian-Run-CUDA | Obsidian/Run/CUDA/Exec.hs | bsd-3-clause | createCtx :: Device -> IO Context
createCtx (dev,prop) = do
ctx <- CUDA.create dev [CUDA.SchedAuto]
return (Context ctx prop)
---------------------------------------------------------------------------
-- destroyCtx
--------------------------------------------------------------------------- | 298 | createCtx :: Device -> IO Context
createCtx (dev,prop) = do
ctx <- CUDA.create dev [CUDA.SchedAuto]
return (Context ctx prop)
---------------------------------------------------------------------------
-- destroyCtx
--------------------------------------------------------------------------- | 298 | createCtx (dev,prop) = do
ctx <- CUDA.create dev [CUDA.SchedAuto]
return (Context ctx prop)
---------------------------------------------------------------------------
-- destroyCtx
--------------------------------------------------------------------------- | 264 | false | true | 0 | 10 | 29 | 63 | 32 | 31 | null | null |
fthomas/ignifera | src/Ignifera/Rules.hs | gpl-3.0 | filesList :: [File]
filesList = map File [(unFile (minBound :: File)) .. (unFile (maxBound :: File))] | 101 | filesList :: [File]
filesList = map File [(unFile (minBound :: File)) .. (unFile (maxBound :: File))] | 101 | filesList = map File [(unFile (minBound :: File)) .. (unFile (maxBound :: File))] | 81 | false | true | 0 | 9 | 15 | 49 | 28 | 21 | null | null |
wavewave/madgraph-auto-dataset | src/HEP/Automation/MadGraph/Dataset/Processes.hs | gpl-3.0 | preDefProcess TTBarSemiZpNotFull = "\ngenerate P P > t t~ QED=99, t > b w+, t~ > u~ zput @1 \nadd process P P > t t~ QED=99, t > u zptu, t~ > b~ w- @2 \n" | 154 | preDefProcess TTBarSemiZpNotFull = "\ngenerate P P > t t~ QED=99, t > b w+, t~ > u~ zput @1 \nadd process P P > t t~ QED=99, t > u zptu, t~ > b~ w- @2 \n" | 154 | preDefProcess TTBarSemiZpNotFull = "\ngenerate P P > t t~ QED=99, t > b w+, t~ > u~ zput @1 \nadd process P P > t t~ QED=99, t > u zptu, t~ > b~ w- @2 \n" | 154 | false | false | 0 | 5 | 36 | 9 | 4 | 5 | null | null |
vincenthz/hs-foundation | basement/Basement/Block/Base.hs | bsd-3-clause | mutableEmpty :: PrimMonad prim => prim (MutableBlock ty (PrimState prim))
mutableEmpty = primitive $ \s1 ->
case newByteArray# 0# s1 of { (# s2, mba #) ->
(# s2, MutableBlock mba #) } | 195 | mutableEmpty :: PrimMonad prim => prim (MutableBlock ty (PrimState prim))
mutableEmpty = primitive $ \s1 ->
case newByteArray# 0# s1 of { (# s2, mba #) ->
(# s2, MutableBlock mba #) } | 195 | mutableEmpty = primitive $ \s1 ->
case newByteArray# 0# s1 of { (# s2, mba #) ->
(# s2, MutableBlock mba #) } | 121 | false | true | 0 | 11 | 44 | 74 | 38 | 36 | null | null |
pepijnkokke/unlit | src/Unlit/String.hs | bsd-3-clause | emitDelimiter (LaTeX End) = "\\end{code}" | 51 | emitDelimiter (LaTeX End) = "\\end{code}" | 51 | emitDelimiter (LaTeX End) = "\\end{code}" | 51 | false | false | 0 | 7 | 14 | 15 | 7 | 8 | null | null |
mapinguari/SC_HS_Proxy | src/Proxy/Query/Unit.hs | mit | airDamage ZergLarva = 0 | 23 | airDamage ZergLarva = 0 | 23 | airDamage ZergLarva = 0 | 23 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
sdiehl/ghc | compiler/simplCore/SimplEnv.hs | bsd-3-clause | pprSimplEnv :: SimplEnv -> SDoc
-- Used for debugging; selective
pprSimplEnv env
= vcat [text "TvSubst:" <+> ppr (seTvSubst env),
text "CvSubst:" <+> ppr (seCvSubst env),
text "IdSubst:" <+> id_subst_doc,
text "InScope:" <+> in_scope_vars_doc
]
where
id_subst_doc = pprUniqFM ppr... | 543 | pprSimplEnv :: SimplEnv -> SDoc
pprSimplEnv env
= vcat [text "TvSubst:" <+> ppr (seTvSubst env),
text "CvSubst:" <+> ppr (seCvSubst env),
text "IdSubst:" <+> id_subst_doc,
text "InScope:" <+> in_scope_vars_doc
]
where
id_subst_doc = pprUniqFM ppr (seIdSubst env)
in_scope_vars... | 510 | pprSimplEnv env
= vcat [text "TvSubst:" <+> ppr (seTvSubst env),
text "CvSubst:" <+> ppr (seCvSubst env),
text "IdSubst:" <+> id_subst_doc,
text "InScope:" <+> in_scope_vars_doc
]
where
id_subst_doc = pprUniqFM ppr (seIdSubst env)
in_scope_vars_doc = pprVarSet (getInScopeVars... | 478 | true | true | 4 | 11 | 161 | 173 | 83 | 90 | null | null |
joelburget/haste-compiler | libraries/haste-lib/src/Haste/Concurrent/Monad.hs | bsd-3-clause | withMVarIO :: MVar a -> (a -> IO b) -> CIO b
withMVarIO v m = takeMVar v >>= liftIO . m | 87 | withMVarIO :: MVar a -> (a -> IO b) -> CIO b
withMVarIO v m = takeMVar v >>= liftIO . m | 87 | withMVarIO v m = takeMVar v >>= liftIO . m | 42 | false | true | 0 | 10 | 21 | 56 | 25 | 31 | null | null |
eeight/haskell-mms | src/Foreign/Mms/Internal/Builder.hs | bsd-3-clause | flush :: Builder
flush = Builder $ \k b@(Buffer p o s u) ->
if u == 0
then k b
else lazyPrepend b (k $ Buffer p (o + u) (s - u) 0) | 150 | flush :: Builder
flush = Builder $ \k b@(Buffer p o s u) ->
if u == 0
then k b
else lazyPrepend b (k $ Buffer p (o + u) (s - u) 0) | 150 | flush = Builder $ \k b@(Buffer p o s u) ->
if u == 0
then k b
else lazyPrepend b (k $ Buffer p (o + u) (s - u) 0) | 133 | false | true | 0 | 13 | 54 | 87 | 46 | 41 | null | null |
schernichkin/vinyl-boxes | src/Data/Vinyl/Boxes.hs | bsd-3-clause | reifyProxyConstraint :: RecAll f rs c
=> proxy c
-> ProxyRec f rs
-> Rec (ProxyDict c :. f) rs
reifyProxyConstraint prx rec =
case rec of
RNil -> RNil
(Compose p :& xs) -> Compose (ProxyDict p) :& reifyProxyConstraint prx xs
-- | Pro... | 365 | reifyProxyConstraint :: RecAll f rs c
=> proxy c
-> ProxyRec f rs
-> Rec (ProxyDict c :. f) rs
reifyProxyConstraint prx rec =
case rec of
RNil -> RNil
(Compose p :& xs) -> Compose (ProxyDict p) :& reifyProxyConstraint prx xs
-- | Pro... | 365 | reifyProxyConstraint prx rec =
case rec of
RNil -> RNil
(Compose p :& xs) -> Compose (ProxyDict p) :& reifyProxyConstraint prx xs
-- | Provides information how to render record field. | 207 | false | true | 0 | 12 | 137 | 107 | 50 | 57 | null | null |
chrisdone/hell | test/Main.hs | bsd-3-clause | main :: IO ()
main = hspec spec | 31 | main :: IO ()
main = hspec spec | 31 | main = hspec spec | 17 | false | true | 1 | 6 | 7 | 22 | 9 | 13 | null | null |
christiaanb/Idris-dev | src/Core/CoreParser.hs | bsd-3-clause | lexeme = PTok.lexeme lexer | 29 | lexeme = PTok.lexeme lexer | 29 | lexeme = PTok.lexeme lexer | 29 | false | false | 1 | 6 | 6 | 14 | 5 | 9 | null | null |
gcampax/ghc | compiler/utils/Util.hs | bsd-3-clause | mapAccumL2 :: (s1 -> s2 -> a -> (s1, s2, b)) -> s1 -> s2 -> [a] -> (s1, s2, [b])
mapAccumL2 f s1 s2 xs = (s1', s2', ys)
where ((s1', s2'), ys) = mapAccumL (\(s1, s2) x -> case f s1 s2 x of
(s1', s2', y) -> ((s1', s2'), y))
(s1... | 328 | mapAccumL2 :: (s1 -> s2 -> a -> (s1, s2, b)) -> s1 -> s2 -> [a] -> (s1, s2, [b])
mapAccumL2 f s1 s2 xs = (s1', s2', ys)
where ((s1', s2'), ys) = mapAccumL (\(s1, s2) x -> case f s1 s2 x of
(s1', s2', y) -> ((s1', s2'), y))
(s1... | 328 | mapAccumL2 f s1 s2 xs = (s1', s2', ys)
where ((s1', s2'), ys) = mapAccumL (\(s1, s2) x -> case f s1 s2 x of
(s1', s2', y) -> ((s1', s2'), y))
(s1, s2) xs | 247 | false | true | 0 | 12 | 149 | 177 | 100 | 77 | null | null |
brendanhay/numbersd | test/Properties/Series.hs | mpl-2.0 | prop_resolution_preserved_by_update :: SeriesUpdate -> Bool
prop_resolution_preserved_by_update SeriesUpdate{..} =
updateInputRes == updateOutputRes | 150 | prop_resolution_preserved_by_update :: SeriesUpdate -> Bool
prop_resolution_preserved_by_update SeriesUpdate{..} =
updateInputRes == updateOutputRes | 150 | prop_resolution_preserved_by_update SeriesUpdate{..} =
updateInputRes == updateOutputRes | 90 | false | true | 0 | 7 | 12 | 28 | 14 | 14 | null | null |
lhuang7/mysql | dist/dist-sandbox-31c119e4/build/autogen/Paths_mysql.hs | bsd-3-clause | getDataFileName :: FilePath -> IO FilePath
getDataFileName name = do
dir <- getDataDir
return (dir ++ "/" ++ name) | 118 | getDataFileName :: FilePath -> IO FilePath
getDataFileName name = do
dir <- getDataDir
return (dir ++ "/" ++ name) | 118 | getDataFileName name = do
dir <- getDataDir
return (dir ++ "/" ++ name) | 75 | false | true | 0 | 11 | 22 | 50 | 22 | 28 | null | null |
CS-CLUB/contests | 2012/submissions/Matteo Ferrando/3/Peculiar.hs | gpl-3.0 | divOrMul :: Integer -> [Integer]
divOrMul 1 = [1] | 49 | divOrMul :: Integer -> [Integer]
divOrMul 1 = [1] | 49 | divOrMul 1 = [1] | 16 | false | true | 0 | 8 | 8 | 30 | 14 | 16 | null | null |
tolysz/dsp | DSP/Filter/FIR/PolyInterp.hs | gpl-2.0 | bspline_6p5o :: (Ord a, Fractional a) => a -> a
bspline_6p5o x | 0 <= x && x < 1 = polyeval [ 11/20, 0, -1/2, 0, 1/4, -1/12 ] x
| 1 <= x && x < 2 = polyeval [ 17/40, 5/8, -7/4, 5/4, -3/8, 1/24 ] x
| 2 <= x && x < 3 = polyeval [ 81/40, -27/8, 9/4, -3/4, 1/8, -1/120 ] x
... | 404 | bspline_6p5o :: (Ord a, Fractional a) => a -> a
bspline_6p5o x | 0 <= x && x < 1 = polyeval [ 11/20, 0, -1/2, 0, 1/4, -1/12 ] x
| 1 <= x && x < 2 = polyeval [ 17/40, 5/8, -7/4, 5/4, -3/8, 1/24 ] x
| 2 <= x && x < 3 = polyeval [ 81/40, -27/8, 9/4, -3/4, 1/8, -1/120 ] x
... | 404 | bspline_6p5o x | 0 <= x && x < 1 = polyeval [ 11/20, 0, -1/2, 0, 1/4, -1/12 ] x
| 1 <= x && x < 2 = polyeval [ 17/40, 5/8, -7/4, 5/4, -3/8, 1/24 ] x
| 2 <= x && x < 3 = polyeval [ 81/40, -27/8, 9/4, -3/4, 1/8, -1/120 ] x
| 3 <= x = 0
|... | 356 | false | true | 0 | 10 | 170 | 270 | 140 | 130 | null | null |
dinkelk/redo | src/Main.hs | mit | main :: IO ()
main = do
-- Get program name and arguments:
progName <- getProgName
-- Parse options, getting a list of option actions:
(opts, targets) <- getOptions
let Options { help = help',
dashX = dashX',
dashV = dashV',
dashD1 = dashD1',
... | 2,577 | main :: IO ()
main = do
-- Get program name and arguments:
progName <- getProgName
-- Parse options, getting a list of option actions:
(opts, targets) <- getOptions
let Options { help = help',
dashX = dashX',
dashV = dashV',
dashD1 = dashD1',
... | 2,577 | main = do
-- Get program name and arguments:
progName <- getProgName
-- Parse options, getting a list of option actions:
(opts, targets) <- getOptions
let Options { help = help',
dashX = dashX',
dashV = dashV',
dashD1 = dashD1',
dashD2 = da... | 2,563 | false | true | 0 | 12 | 728 | 536 | 265 | 271 | null | null |
girving/games | Util.hs | bsd-3-clause | splitStack :: Stack a b -> ([a],b)
splitStack (Base b) = ([],b) | 63 | splitStack :: Stack a b -> ([a],b)
splitStack (Base b) = ([],b) | 63 | splitStack (Base b) = ([],b) | 28 | false | true | 0 | 7 | 11 | 46 | 25 | 21 | null | null |
AlbinTheander/oden | src/Oden/Type/Polymorphic.hs | mit | isPolymorphicType (TSlice _ a) = isPolymorphicType a | 52 | isPolymorphicType (TSlice _ a) = isPolymorphicType a | 52 | isPolymorphicType (TSlice _ a) = isPolymorphicType a | 52 | false | false | 0 | 7 | 6 | 20 | 9 | 11 | null | null |
ben-schulz/Idris-dev | src/Idris/ElabDecls.hs | bsd-3-clause | -- nothing to elaborate
elabDecl' what info (PTy doc argdocs s f o n nfc ty)
| what /= EDefns
= do logElab 1 $ "Elaborating type decl " ++ show n ++ show o
elabType info s doc argdocs f o n nfc ty
return () | 230 | elabDecl' what info (PTy doc argdocs s f o n nfc ty)
| what /= EDefns
= do logElab 1 $ "Elaborating type decl " ++ show n ++ show o
elabType info s doc argdocs f o n nfc ty
return () | 206 | elabDecl' what info (PTy doc argdocs s f o n nfc ty)
| what /= EDefns
= do logElab 1 $ "Elaborating type decl " ++ show n ++ show o
elabType info s doc argdocs f o n nfc ty
return () | 206 | true | false | 0 | 11 | 70 | 99 | 44 | 55 | null | null |
AubreyEAnderson/shellcheck | ShellCheck/Parser.hs | gpl-3.0 | prop_readCondition6 = isOk readCondition "[[ $c =~ ^[yY]$ ]]" | 61 | prop_readCondition6 = isOk readCondition "[[ $c =~ ^[yY]$ ]]" | 61 | prop_readCondition6 = isOk readCondition "[[ $c =~ ^[yY]$ ]]" | 61 | false | false | 0 | 5 | 8 | 11 | 5 | 6 | null | null |
TrustNoOne/Euler | haskell/src/Euler008.hs | mit | euler8 :: Int
euler8 = maximum [product adjacents | adjacents <- sliding 13 num] | 80 | euler8 :: Int
euler8 = maximum [product adjacents | adjacents <- sliding 13 num] | 80 | euler8 = maximum [product adjacents | adjacents <- sliding 13 num] | 66 | false | true | 0 | 9 | 13 | 33 | 16 | 17 | null | null |
ndmitchell/hlint | src/Config/Yaml.hs | bsd-3-clause | addVal :: String -> Value -> Val -> Val
addVal key v (Val focus path) = Val v $ (key,v) : path | 94 | addVal :: String -> Value -> Val -> Val
addVal key v (Val focus path) = Val v $ (key,v) : path | 94 | addVal key v (Val focus path) = Val v $ (key,v) : path | 54 | false | true | 0 | 7 | 21 | 55 | 28 | 27 | null | null |
phile314/tasty-silver | Test/Tasty/Silver/Interactive.hs | mit | showDiff_ :: Bool -> TestName -> GDiff -> IO ()
showDiff_ _ _ Equal = error "Can't show diff for equal values." | 135 | showDiff_ :: Bool -> TestName -> GDiff -> IO ()
showDiff_ _ _ Equal = error "Can't show diff for equal values." | 135 | showDiff_ _ _ Equal = error "Can't show diff for equal values." | 87 | false | true | 0 | 10 | 45 | 42 | 19 | 23 | null | null |
dunnl/sally | src/Sally/Application/WebSockets.hs | mit | newServerState :: IO (MVar ServerState)
newServerState = newMVar emptyState | 75 | newServerState :: IO (MVar ServerState)
newServerState = newMVar emptyState | 75 | newServerState = newMVar emptyState | 35 | false | true | 0 | 7 | 8 | 23 | 11 | 12 | null | null |
kadena-io/pact | src-ghc/Pact/GasModel/Types.hs | bsd-3-clause | defEvalEnv :: PactDbEnv e -> EvalEnv e
defEvalEnv db =
setupEvalEnv db entity Transactional (initMsgData pactInitialHash)
initRefStore prodGasModel permissiveNamespacePolicy noSPVSupport def def
where entity = Just $ EntityName "entity"
prodGasModel = GasEnv 10000000 0.01 $ tableGasModel defaultGasConfig
... | 333 | defEvalEnv :: PactDbEnv e -> EvalEnv e
defEvalEnv db =
setupEvalEnv db entity Transactional (initMsgData pactInitialHash)
initRefStore prodGasModel permissiveNamespacePolicy noSPVSupport def def
where entity = Just $ EntityName "entity"
prodGasModel = GasEnv 10000000 0.01 $ tableGasModel defaultGasConfig
... | 333 | defEvalEnv db =
setupEvalEnv db entity Transactional (initMsgData pactInitialHash)
initRefStore prodGasModel permissiveNamespacePolicy noSPVSupport def def
where entity = Just $ EntityName "entity"
prodGasModel = GasEnv 10000000 0.01 $ tableGasModel defaultGasConfig
-- MockDb
-- | 294 | false | true | 1 | 7 | 54 | 87 | 41 | 46 | null | null |
kairne/repa-lts | Data/Array/Repa/Eval/Reduction.hs | bsd-3-clause | unboxDouble :: Double -> Double#
unboxDouble (D# d) = d | 55 | unboxDouble :: Double -> Double#
unboxDouble (D# d) = d | 55 | unboxDouble (D# d) = d | 22 | false | true | 0 | 9 | 9 | 30 | 13 | 17 | null | null |
ganeti/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | ip4Version :: Int
ip4Version = 4 | 32 | ip4Version :: Int
ip4Version = 4 | 32 | ip4Version = 4 | 14 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
k0001/pipes-http-message | src/Pipes/HTTP/Message/Attoparsec/FastSet.hs | bsd-3-clause | -- | Create a set.
set :: B.ByteString -> FastSet
set s | B.length s < tableCutoff = Sorted . B.sort $ s
| otherwise = Table . mkTable $ s | 159 | set :: B.ByteString -> FastSet
set s | B.length s < tableCutoff = Sorted . B.sort $ s
| otherwise = Table . mkTable $ s | 140 | set s | B.length s < tableCutoff = Sorted . B.sort $ s
| otherwise = Table . mkTable $ s | 109 | true | true | 1 | 10 | 51 | 67 | 31 | 36 | null | null |
ssaavedra/liquidhaskell | src/Language/Haskell/Liquid/Types.hs | bsd-3-clause | isProp _ = False | 25 | isProp _ = False | 25 | isProp _ = False | 25 | false | false | 0 | 5 | 12 | 9 | 4 | 5 | null | null |
mfpi/OpenGL | Graphics/Rendering/OpenGL/GL/Shaders/Uniform.hs | bsd-3-clause | --------------------------------------------------------------------------------
activeUniforms :: Program -> GettableStateVar [(GLint,VariableType,String)]
activeUniforms =
activeVars
numActiveUniforms
activeUniformMaxLength
glGetActiveUniform
unmarshalVariableType | 294 | activeUniforms :: Program -> GettableStateVar [(GLint,VariableType,String)]
activeUniforms =
activeVars
numActiveUniforms
activeUniformMaxLength
glGetActiveUniform
unmarshalVariableType | 212 | activeUniforms =
activeVars
numActiveUniforms
activeUniformMaxLength
glGetActiveUniform
unmarshalVariableType | 136 | true | true | 0 | 8 | 41 | 40 | 22 | 18 | null | null |
dselsam/tc | src/Kernel/Expr/Internal.hs | gpl-3.0 | innerBodyOfLambda :: Expr -> Expr
innerBodyOfLambda e = case e of
Lambda lam -> innerBodyOfLambda (bindingBody lam)
_ -> e | 130 | innerBodyOfLambda :: Expr -> Expr
innerBodyOfLambda e = case e of
Lambda lam -> innerBodyOfLambda (bindingBody lam)
_ -> e | 130 | innerBodyOfLambda e = case e of
Lambda lam -> innerBodyOfLambda (bindingBody lam)
_ -> e | 96 | false | true | 0 | 10 | 27 | 46 | 22 | 24 | null | null |
Chouffe/skelme | test/SpecUtils.hs | bsd-3-clause | shrinkLispVal _ = [] | 20 | shrinkLispVal _ = [] | 20 | shrinkLispVal _ = [] | 20 | false | false | 0 | 5 | 3 | 11 | 5 | 6 | null | null |
benma/blockchain-parser-hs | src/BitcoinAddress.hs | bsd-3-clause | decodeBase58Check :: BS.ByteString -> Maybe BS.ByteString
decodeBase58Check bs = do
rs <- decodeBase58 bs
let (res,chk) = BS.splitAt (BS.length rs - 4) rs
guard $ chk == checkSum res
return res | 201 | decodeBase58Check :: BS.ByteString -> Maybe BS.ByteString
decodeBase58Check bs = do
rs <- decodeBase58 bs
let (res,chk) = BS.splitAt (BS.length rs - 4) rs
guard $ chk == checkSum res
return res | 201 | decodeBase58Check bs = do
rs <- decodeBase58 bs
let (res,chk) = BS.splitAt (BS.length rs - 4) rs
guard $ chk == checkSum res
return res | 143 | false | true | 0 | 14 | 38 | 90 | 41 | 49 | null | null |
urbanslug/ghc | compiler/typecheck/TcType.hs | bsd-3-clause | tcTyFamInsts (ForAllTy _ ty) = tcTyFamInsts ty | 49 | tcTyFamInsts (ForAllTy _ ty) = tcTyFamInsts ty | 49 | tcTyFamInsts (ForAllTy _ ty) = tcTyFamInsts ty | 49 | false | false | 0 | 7 | 9 | 20 | 9 | 11 | null | null |
k0001/gtk2hs | tools/c2hs/gen/GenBind.hs | gpl-3.0 | evalConstCExpr (CUnary op arg at) =
do
argVal <- evalConstCExpr arg
applyUnary (posOf at) op argVal | 109 | evalConstCExpr (CUnary op arg at) =
do
argVal <- evalConstCExpr arg
applyUnary (posOf at) op argVal | 109 | evalConstCExpr (CUnary op arg at) =
do
argVal <- evalConstCExpr arg
applyUnary (posOf at) op argVal | 109 | false | false | 0 | 9 | 25 | 45 | 20 | 25 | null | null |
emmanueldenloye/QuickHull | src/QuickHull.hs | bsd-3-clause | rMap
:: Eq b
=> b -> V.Vector (b, UV.Vector Double) -> V.Vector (UV.Vector Double)
rMap r = V.map snd . V.filter ((== r) . fst) | 135 | rMap
:: Eq b
=> b -> V.Vector (b, UV.Vector Double) -> V.Vector (UV.Vector Double)
rMap r = V.map snd . V.filter ((== r) . fst) | 135 | rMap r = V.map snd . V.filter ((== r) . fst) | 44 | false | true | 0 | 11 | 33 | 86 | 42 | 44 | null | null |
henrystanley/Quark | Quark/Serialize.hs | cc0-1.0 | serializeQ _ (QStr x) = "\"" ++ escaped ++ "\""
where escaped = replaceChar '"' "\\\"" $ replaceChar '\\' "\\\\" x | 116 | serializeQ _ (QStr x) = "\"" ++ escaped ++ "\""
where escaped = replaceChar '"' "\\\"" $ replaceChar '\\' "\\\\" x | 116 | serializeQ _ (QStr x) = "\"" ++ escaped ++ "\""
where escaped = replaceChar '"' "\\\"" $ replaceChar '\\' "\\\\" x | 116 | false | false | 0 | 7 | 22 | 49 | 23 | 26 | null | null |
koengit/cyphy | src/Zelus.hs | mit | automaton :: Eq a => [(a,S Bool,a)] -> S a
automaton ts@((s0,_,_):_) = s
where
s = val s0 |-> trans ts
trans [] = s
trans ((s1,t,s2):ts) = s ==? val s1 &&? t ? (val s2, trans ts)
-- cute syntax | 214 | automaton :: Eq a => [(a,S Bool,a)] -> S a
automaton ts@((s0,_,_):_) = s
where
s = val s0 |-> trans ts
trans [] = s
trans ((s1,t,s2):ts) = s ==? val s1 &&? t ? (val s2, trans ts)
-- cute syntax | 214 | automaton ts@((s0,_,_):_) = s
where
s = val s0 |-> trans ts
trans [] = s
trans ((s1,t,s2):ts) = s ==? val s1 &&? t ? (val s2, trans ts)
-- cute syntax | 171 | false | true | 1 | 9 | 63 | 146 | 75 | 71 | null | null |
Javran/Project-Euler | src/ProjectEuler/Problem69.hs | mit | problem :: Problem
problem = pureProblem 69 Solved result | 57 | problem :: Problem
problem = pureProblem 69 Solved result | 57 | problem = pureProblem 69 Solved result | 38 | false | true | 0 | 5 | 8 | 18 | 9 | 9 | null | null |
IreneKnapp/direct-http | Haskell/Network/HTTP.hs | mit | headerType HttpAge = ResponseHeader | 35 | headerType HttpAge = ResponseHeader | 35 | headerType HttpAge = ResponseHeader | 35 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
diku-dk/futhark | src/Futhark/CodeGen/ImpGen/GPU/ToOpenCL.hs | isc | onHostOp :: KernelTarget -> HostOp -> OnKernelM OpenCL
onHostOp target (CallKernel k) = onKernel target k | 105 | onHostOp :: KernelTarget -> HostOp -> OnKernelM OpenCL
onHostOp target (CallKernel k) = onKernel target k | 105 | onHostOp target (CallKernel k) = onKernel target k | 50 | false | true | 0 | 7 | 15 | 38 | 18 | 20 | null | null |
rueshyna/gogol | gogol-dns/gen/Network/Google/DNS/Types/Product.hs | mpl-2.0 | -- | Type of resource.
mzlrKind :: Lens' ManagedZonesListResponse Text
mzlrKind = lens _mzlrKind (\ s a -> s{_mzlrKind = a}) | 124 | mzlrKind :: Lens' ManagedZonesListResponse Text
mzlrKind = lens _mzlrKind (\ s a -> s{_mzlrKind = a}) | 101 | mzlrKind = lens _mzlrKind (\ s a -> s{_mzlrKind = a}) | 53 | true | true | 1 | 9 | 20 | 46 | 22 | 24 | null | null |
snoyberg/ghc | compiler/basicTypes/IdInfo.hs | bsd-3-clause | pprIdDetails other = brackets (pp other)
where
pp VanillaId = panic "pprIdDetails"
pp (DataConWorkId _) = text "DataCon"
pp (DataConWrapId _) = text "DataConWrapper"
pp (ClassOpId {}) = text "ClassOp"
pp (PrimOpId _) = text "PrimOp"
pp (FCallId _) = text "ForeignCall"
pp ... | 1,739 | pprIdDetails other = brackets (pp other)
where
pp VanillaId = panic "pprIdDetails"
pp (DataConWorkId _) = text "DataCon"
pp (DataConWrapId _) = text "DataConWrapper"
pp (ClassOpId {}) = text "ClassOp"
pp (PrimOpId _) = text "PrimOp"
pp (FCallId _) = text "ForeignCall"
pp ... | 1,739 | pprIdDetails other = brackets (pp other)
where
pp VanillaId = panic "pprIdDetails"
pp (DataConWorkId _) = text "DataCon"
pp (DataConWrapId _) = text "DataConWrapper"
pp (ClassOpId {}) = text "ClassOp"
pp (PrimOpId _) = text "PrimOp"
pp (FCallId _) = text "ForeignCall"
pp ... | 1,739 | false | false | 9 | 11 | 498 | 229 | 123 | 106 | null | null |
jmillikan/gtk2hs-puyopuyo | src/Game/PuyoPuyo.hs | bsd-2-clause | dropCell :: ((Int, Int), PuyoCell) -> ((Int, Int), PuyoCell)
dropCell = _1 %~ dropIx | 84 | dropCell :: ((Int, Int), PuyoCell) -> ((Int, Int), PuyoCell)
dropCell = _1 %~ dropIx | 84 | dropCell = _1 %~ dropIx | 23 | false | true | 0 | 7 | 13 | 43 | 26 | 17 | null | null |
UCSD-PL/RefScript | src/Language/Rsc/Errors.hs | bsd-3-clause | -- Lookup
errorEnumLookup l e n = mkErr l $ text $ printf "Cannot find member '%s' in enumeration '%s'" (ppshow n) (ppshow e) | 133 | errorEnumLookup l e n = mkErr l $ text $ printf "Cannot find member '%s' in enumeration '%s'" (ppshow n) (ppshow e) | 123 | errorEnumLookup l e n = mkErr l $ text $ printf "Cannot find member '%s' in enumeration '%s'" (ppshow n) (ppshow e) | 123 | true | false | 0 | 8 | 31 | 44 | 21 | 23 | null | null |
christiaanb/ghc | compiler/hsSyn/HsExpr.hs | bsd-3-clause | pprMatchContextNoun CaseAlt = ptext (sLit "case alternative") | 69 | pprMatchContextNoun CaseAlt = ptext (sLit "case alternative") | 69 | pprMatchContextNoun CaseAlt = ptext (sLit "case alternative") | 69 | false | false | 0 | 7 | 14 | 19 | 8 | 11 | null | null |
hdb3/FP-Router | DVP.hs | apache-2.0 | vectorsFromDVP :: DVPTable -> DVPMsg
vectorsFromDVP dvpt = map (\dvpr -> DVPVec (addr dvpr) (cost dvpr)) (M.elems dvpt) | 119 | vectorsFromDVP :: DVPTable -> DVPMsg
vectorsFromDVP dvpt = map (\dvpr -> DVPVec (addr dvpr) (cost dvpr)) (M.elems dvpt) | 119 | vectorsFromDVP dvpt = map (\dvpr -> DVPVec (addr dvpr) (cost dvpr)) (M.elems dvpt) | 82 | false | true | 0 | 10 | 17 | 56 | 28 | 28 | null | null |
tolysz/prepare-ghcjs | spec-lts8/base/GHC/Word.hs | bsd-3-clause | (W8# x) `leWord8` (W8# y) = isTrue# (x `leWord#` y) | 51 | (W8# x) `leWord8` (W8# y) = isTrue# (x `leWord#` y) | 51 | (W8# x) `leWord8` (W8# y) = isTrue# (x `leWord#` y) | 51 | false | false | 0 | 7 | 9 | 38 | 20 | 18 | null | null |
asib/cryptopals-haskell | Crypto.hs | mit | getBlockSizeSimple :: EncryptionAlgorithm -> LGW.Word128 -> Int
getBlockSizeSimple oracle k =
helper 0 0
where helper c l
| c == 0 = helper 1 encLen
| encLen /= l = encLen - l
| otherwise = helper (c+1) encLen
where encLen = B.length . oracle k $ B.replicate c 65 | 319 | getBlockSizeSimple :: EncryptionAlgorithm -> LGW.Word128 -> Int
getBlockSizeSimple oracle k =
helper 0 0
where helper c l
| c == 0 = helper 1 encLen
| encLen /= l = encLen - l
| otherwise = helper (c+1) encLen
where encLen = B.length . oracle k $ B.replicate c 65 | 319 | getBlockSizeSimple oracle k =
helper 0 0
where helper c l
| c == 0 = helper 1 encLen
| encLen /= l = encLen - l
| otherwise = helper (c+1) encLen
where encLen = B.length . oracle k $ B.replicate c 65 | 255 | false | true | 0 | 11 | 106 | 123 | 58 | 65 | null | null |
bjpop/blip | bliplib/src/Blip/Marshal.hs | bsd-3-clause | writeStringObject other = error $ "writStringObject called on non string object: " ++ show other | 96 | writeStringObject other = error $ "writStringObject called on non string object: " ++ show other | 96 | writeStringObject other = error $ "writStringObject called on non string object: " ++ show other | 96 | false | false | 3 | 6 | 14 | 24 | 9 | 15 | null | null |
CloudI/CloudI | src/api/haskell/external/binary-0.8.7.0/benchmarks/MemBench.hs | mit | hs_wordwrite :: Ptr CULong -> Int -> IO ()
hs_wordwrite !ptr bytes = loop 0 0
where iterations = bytes `div` sizeOf (undefined :: CULong)
loop :: Int -> CULong -> IO ()
loop !i !n | i == iterations = return ()
| otherwise = do pokeElemOff ptr i n
... | 336 | hs_wordwrite :: Ptr CULong -> Int -> IO ()
hs_wordwrite !ptr bytes = loop 0 0
where iterations = bytes `div` sizeOf (undefined :: CULong)
loop :: Int -> CULong -> IO ()
loop !i !n | i == iterations = return ()
| otherwise = do pokeElemOff ptr i n
... | 336 | hs_wordwrite !ptr bytes = loop 0 0
where iterations = bytes `div` sizeOf (undefined :: CULong)
loop :: Int -> CULong -> IO ()
loop !i !n | i == iterations = return ()
| otherwise = do pokeElemOff ptr i n
loop (i+1) (n+1) | 293 | false | true | 2 | 11 | 126 | 143 | 70 | 73 | null | null |
GaloisInc/halvm-ghc | compiler/basicTypes/VarEnv.hs | bsd-3-clause | rnBndrR :: RnEnv2 -> Var -> (RnEnv2, Var)
-- ^ Similar to 'rnBndr2' but used when there's a binder on the right
-- side only.
rnBndrR (RV2 { envL = envL, envR = envR, in_scope = in_scope }) bR
= (RV2 { envR = extendVarEnv envR bR new_b
, envL = envL
, in_scope = extendInScopeSet in_scope new... | 373 | rnBndrR :: RnEnv2 -> Var -> (RnEnv2, Var)
rnBndrR (RV2 { envL = envL, envR = envR, in_scope = in_scope }) bR
= (RV2 { envR = extendVarEnv envR bR new_b
, envL = envL
, in_scope = extendInScopeSet in_scope new_b }, new_b)
where
new_b = uniqAway in_scope bR | 289 | rnBndrR (RV2 { envL = envL, envR = envR, in_scope = in_scope }) bR
= (RV2 { envR = extendVarEnv envR bR new_b
, envL = envL
, in_scope = extendInScopeSet in_scope new_b }, new_b)
where
new_b = uniqAway in_scope bR | 247 | true | true | 0 | 9 | 99 | 107 | 61 | 46 | null | null |
opentower/carnap | Carnap/src/Carnap/Languages/PurePropositional/Logic.hs | gpl-3.0 | ofPropSys :: (forall r . (Show r, Inference r PurePropLexicon (Form Bool)) =>
NaturalDeductionCalc r PurePropLexicon (Form Bool) -> a) -> String -> Maybe a
ofPropSys f sys | sys == "prop" = Just $ f propCalc
| sys == "montagueSC" = Just $ f mon... | 1,864 | ofPropSys :: (forall r . (Show r, Inference r PurePropLexicon (Form Bool)) =>
NaturalDeductionCalc r PurePropLexicon (Form Bool) -> a) -> String -> Maybe a
ofPropSys f sys | sys == "prop" = Just $ f propCalc
| sys == "montagueSC" = Just $ f mon... | 1,864 | ofPropSys f sys | sys == "prop" = Just $ f propCalc
| sys == "montagueSC" = Just $ f montagueSCCalc
| sys == "LogicBookSD" = Just $ f logicBookSDCalc
| sys == "LogicBookSDPlus" = Just $ f logic... | 1,693 | false | true | 0 | 12 | 883 | 463 | 212 | 251 | null | null |
roberth/uu-helium | test/staticerrors/CapitalFunctionErrors.hs | gpl-3.0 | BlaBla = undefined | 18 | BlaBla = undefined | 18 | BlaBla = undefined | 18 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
stackbuilders/inflections-hs | Text/Inflections/Types.hs | mit | -- | Create an acronym from given 'Text'. The input should consist of only
-- alpha-numeric characters 'InflectionInvalidAcronym' will be thrown.
-- Acronym is different from normal word by that it may not be transformed
-- by inflections (also see 'unSomeWord').
--
-- /since 0.3.0.0/
mkAcronym :: MonadThrow m => Text... | 457 | mkAcronym :: MonadThrow m => Text -> m (Word 'Acronym)
mkAcronym txt =
if T.all isAlphaNum txt
then return (Word txt)
else throwM (InflectionInvalidAcronym txt) | 170 | mkAcronym txt =
if T.all isAlphaNum txt
then return (Word txt)
else throwM (InflectionInvalidAcronym txt) | 115 | true | true | 0 | 10 | 80 | 75 | 39 | 36 | null | null |
vladimir-ipatov/ganeti | test/hs/Test/Ganeti/Query/Language.hs | gpl-2.0 | -- | Tests 'ResultEntry' serialisation. Needed especially as this is
-- done manually, and not via buildObject (different serialisation
-- format).
prop_resultentry_serialisation :: Property
prop_resultentry_serialisation = forAll genResultEntry testSerialisation | 263 | prop_resultentry_serialisation :: Property
prop_resultentry_serialisation = forAll genResultEntry testSerialisation | 115 | prop_resultentry_serialisation = forAll genResultEntry testSerialisation | 72 | true | true | 0 | 5 | 28 | 19 | 11 | 8 | null | null |
vTurbine/ghc | compiler/main/DynFlags.hs | bsd-3-clause | makeDynFlagsConsistent :: DynFlags -> (DynFlags, [Located String])
-- Whenever makeDynFlagsConsistent does anything, it starts over, to
-- ensure that a later change doesn't invalidate an earlier check.
-- Be careful not to introduce potential loops!
makeDynFlagsConsistent dflags
-- Disable -dynamic-too on Windows (#8... | 3,620 | makeDynFlagsConsistent :: DynFlags -> (DynFlags, [Located String])
makeDynFlagsConsistent dflags
-- Disable -dynamic-too on Windows (#8228, #7134, #5987)
| os == OSMinGW32 && gopt Opt_BuildDynamicToo dflags
= let dflags' = gopt_unset dflags Opt_BuildDynamicToo
warn = "-dynamic-too is not supported on... | 3,436 | makeDynFlagsConsistent dflags
-- Disable -dynamic-too on Windows (#8228, #7134, #5987)
| os == OSMinGW32 && gopt Opt_BuildDynamicToo dflags
= let dflags' = gopt_unset dflags Opt_BuildDynamicToo
warn = "-dynamic-too is not supported on Windows"
in loop dflags' warn
| hscTarget dflags == HscC &&... | 3,369 | true | true | 3 | 16 | 858 | 788 | 396 | 392 | null | null |
bergmark/fclabels | src/Data/Label/Mono.hs | bsd-3-clause | -- | Create lens from a `Point`.
point :: Point cat f o f o -> Lens cat f o
point = Poly.point | 95 | point :: Point cat f o f o -> Lens cat f o
point = Poly.point | 61 | point = Poly.point | 18 | true | true | 0 | 6 | 23 | 36 | 18 | 18 | null | null |
energyflowanalysis/efa-2.1 | sandbox/stateanalysis/2/Main.hs | bsd-3-clause | expand :: GraphInfo -> LNEdge -> [(Topology, InsertInfo)] -> [(Topology, InsertInfo)]
expand gf x = filter (ok gf) . uncurry zip . cross (extend x, modify x) . unzip | 165 | expand :: GraphInfo -> LNEdge -> [(Topology, InsertInfo)] -> [(Topology, InsertInfo)]
expand gf x = filter (ok gf) . uncurry zip . cross (extend x, modify x) . unzip | 165 | expand gf x = filter (ok gf) . uncurry zip . cross (extend x, modify x) . unzip | 79 | false | true | 0 | 11 | 28 | 91 | 45 | 46 | null | null |
haskell-opengl/OpenGLRaw | src/Graphics/GL/ExtensionPredicates.hs | bsd-3-clause | -- | Is the <https://www.opengl.org/registry/specs/EXT/histogram.txt EXT_histogram> extension supported?
glGetEXTHistogram :: MonadIO m => m Bool
glGetEXTHistogram = getExtensions >>= (return . member "GL_EXT_histogram") | 220 | glGetEXTHistogram :: MonadIO m => m Bool
glGetEXTHistogram = getExtensions >>= (return . member "GL_EXT_histogram") | 115 | glGetEXTHistogram = getExtensions >>= (return . member "GL_EXT_histogram") | 74 | true | true | 0 | 8 | 22 | 36 | 18 | 18 | null | null |
sdiehl/ghc | compiler/basicTypes/Var.hs | bsd-3-clause | -- | Make a named binder
mkTyCoVarBinder :: ArgFlag -> TyCoVar -> TyCoVarBinder
mkTyCoVarBinder vis var = Bndr var vis | 118 | mkTyCoVarBinder :: ArgFlag -> TyCoVar -> TyCoVarBinder
mkTyCoVarBinder vis var = Bndr var vis | 93 | mkTyCoVarBinder vis var = Bndr var vis | 38 | true | true | 0 | 6 | 19 | 30 | 15 | 15 | null | null |
brendanhay/gogol | gogol-dataproc/gen/Network/Google/Dataproc/Types/Product.hs | mpl-2.0 | -- | Output only. The job id; populated after the node enters RUNNING state.
wnJobId :: Lens' WorkflowNode (Maybe Text)
wnJobId = lens _wnJobId (\ s a -> s{_wnJobId = a}) | 170 | wnJobId :: Lens' WorkflowNode (Maybe Text)
wnJobId = lens _wnJobId (\ s a -> s{_wnJobId = a}) | 93 | wnJobId = lens _wnJobId (\ s a -> s{_wnJobId = a}) | 50 | true | true | 0 | 9 | 30 | 46 | 25 | 21 | null | null |
olsner/ghc | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | translateOp dflags IntQuotOp = Just (mo_wordSQuot dflags) | 63 | translateOp dflags IntQuotOp = Just (mo_wordSQuot dflags) | 63 | translateOp dflags IntQuotOp = Just (mo_wordSQuot dflags) | 63 | false | false | 0 | 7 | 12 | 22 | 9 | 13 | null | null |
bfops/Chess | src/Game/SceneGraph.hs | mit | -- | Performs an n-dimensional scaling of the scene graph. Bigger numbers mean
-- bigger objects. 1.0 means no scaling.
scaleGraph :: Vector Double -- ^ The N-dimensional vector of values to scale by.
-> Transformation
scaleGraph v = Scale v $ scaleMat v | 267 | scaleGraph :: Vector Double -- ^ The N-dimensional vector of values to scale by.
-> Transformation
scaleGraph v = Scale v $ scaleMat v | 145 | scaleGraph v = Scale v $ scaleMat v | 35 | true | true | 0 | 6 | 56 | 34 | 17 | 17 | null | null |
mdibaiee/serverman | src/System/Serverman/Utils.hs | gpl-3.0 | writeFileIfMissing :: FilePath -> String -> IO ()
writeFileIfMissing path content = execIfMissing path (writeFile path content) | 129 | writeFileIfMissing :: FilePath -> String -> IO ()
writeFileIfMissing path content = execIfMissing path (writeFile path content) | 127 | writeFileIfMissing path content = execIfMissing path (writeFile path content) | 77 | false | true | 0 | 9 | 18 | 46 | 21 | 25 | null | null |
hvr/jhc | src/Grin/Show.hs | mit | hasError' Error {} = Nothing | 28 | hasError' Error {} = Nothing | 28 | hasError' Error {} = Nothing | 28 | false | false | 0 | 6 | 4 | 13 | 6 | 7 | null | null |
TOSPIO/yi | src/library/Yi/Editor.hs | gpl-2.0 | bufferSet :: Editor -> [FBuffer]
bufferSet = M.elems . buffers | 62 | bufferSet :: Editor -> [FBuffer]
bufferSet = M.elems . buffers | 62 | bufferSet = M.elems . buffers | 29 | false | true | 0 | 6 | 9 | 24 | 13 | 11 | null | null |
uuhan/Idris-dev | src/Idris/Core/TT.hs | bsd-3-clause | thead :: T.Text -> Char
thead = T.head | 38 | thead :: T.Text -> Char
thead = T.head | 38 | thead = T.head | 14 | false | true | 0 | 7 | 7 | 26 | 11 | 15 | null | null |
nbloomf/munge | src/Align.hs | gpl-3.0 | main = do
args <- getArgs
(actions, _, errs) <- return $ getOpt Permute options args
opts <- foldl (>>=) (return defaultArgs) actions
{---------------------------------------------------}
{- If any command line errors, show usage and quit -}
{------------------------------------... | 907 | main = do
args <- getArgs
(actions, _, errs) <- return $ getOpt Permute options args
opts <- foldl (>>=) (return defaultArgs) actions
{---------------------------------------------------}
{- If any command line errors, show usage and quit -}
{------------------------------------... | 907 | main = do
args <- getArgs
(actions, _, errs) <- return $ getOpt Permute options args
opts <- foldl (>>=) (return defaultArgs) actions
{---------------------------------------------------}
{- If any command line errors, show usage and quit -}
{------------------------------------... | 907 | false | false | 0 | 12 | 218 | 231 | 114 | 117 | null | null |
alios/geojson-types | src/Data/GeoJSON/Position.hs | bsd-3-clause | fromPositionVector :: (VectorStructureClass fv fc a) =>
PositionVector a -> PositionVectorStructure fv fc a
fromPositionVector = foldMap pure . fmap fromPosition | 164 | fromPositionVector :: (VectorStructureClass fv fc a) =>
PositionVector a -> PositionVectorStructure fv fc a
fromPositionVector = foldMap pure . fmap fromPosition | 164 | fromPositionVector = foldMap pure . fmap fromPosition | 53 | false | true | 0 | 7 | 23 | 48 | 23 | 25 | null | null |
pparkkin/eta | compiler/ETA/Prelude/TysWiredIn.hs | bsd-3-clause | nothingDataCon :: DataCon
nothingDataCon = pcDataCon nothingDataConName alpha_tyvar [] maybeTyCon | 97 | nothingDataCon :: DataCon
nothingDataCon = pcDataCon nothingDataConName alpha_tyvar [] maybeTyCon | 97 | nothingDataCon = pcDataCon nothingDataConName alpha_tyvar [] maybeTyCon | 71 | false | true | 0 | 6 | 9 | 22 | 11 | 11 | null | null |
scott-fleischman/greek-grammar | haskell/greek-grammar/src/Data/Unicode/DecomposeChar.hs | mit | decomposeChar '\x1112E' = "\x11131\x11127" | 42 | decomposeChar '\x1112E' = "\x11131\x11127" | 42 | decomposeChar '\x1112E' = "\x11131\x11127" | 42 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
jwiegley/ghc-release | utils/haddock/src/Haddock/Backends/LaTeX.hs | gpl-3.0 | latexFilter :: String -> String
latexFilter = foldr latexMunge "" | 65 | latexFilter :: String -> String
latexFilter = foldr latexMunge "" | 65 | latexFilter = foldr latexMunge "" | 33 | false | true | 0 | 5 | 9 | 20 | 10 | 10 | null | null |
gridaphobe/ghc | compiler/typecheck/TcPatSyn.hs | bsd-3-clause | tcPatSynBuilderBind :: TcSigFun
-> PatSynBind Name Name
-> TcM (LHsBinds Id)
-- See Note [Matchers and builders for pattern synonyms] in PatSyn
tcPatSynBuilderBind sig_fun PSB{ psb_id = L loc name, psb_def = lpat
, psb_dir = dir, psb_args = details ... | 2,771 | tcPatSynBuilderBind :: TcSigFun
-> PatSynBind Name Name
-> TcM (LHsBinds Id)
tcPatSynBuilderBind sig_fun PSB{ psb_id = L loc name, psb_def = lpat
, psb_dir = dir, psb_args = details }
| isUnidirectional dir
= return emptyBag
| isNothing mb_ma... | 2,704 | tcPatSynBuilderBind sig_fun PSB{ psb_id = L loc name, psb_def = lpat
, psb_dir = dir, psb_args = details }
| isUnidirectional dir
= return emptyBag
| isNothing mb_match_group -- Can't invert the pattern
= setSrcSpan (getLoc lpat) $ failWithTc $
hang (text "Right-hand si... | 2,587 | true | true | 1 | 16 | 961 | 684 | 341 | 343 | null | null |
codemac/yi-editor | src/Yi/UI/Cocoa/TextStorage.hs | gpl-2.0 | newTextStorage :: UIStyle -> FBuffer -> Window -> IO TextStorage
newTextStorage sty b w = do
buf <- new _YiTextStorage
s <- new _YiRope
s # setIVar _str (mkSplitRope R.empty (runBufferDummyWindow b (streamB Forward 0)))
buf # setIVar _yiState (emptyEditor, b, w, sty, s)
-- Determine the set of characters in t... | 754 | newTextStorage :: UIStyle -> FBuffer -> Window -> IO TextStorage
newTextStorage sty b w = do
buf <- new _YiTextStorage
s <- new _YiRope
s # setIVar _str (mkSplitRope R.empty (runBufferDummyWindow b (streamB Forward 0)))
buf # setIVar _yiState (emptyEditor, b, w, sty, s)
-- Determine the set of characters in t... | 754 | newTextStorage sty b w = do
buf <- new _YiTextStorage
s <- new _YiRope
s # setIVar _str (mkSplitRope R.empty (runBufferDummyWindow b (streamB Forward 0)))
buf # setIVar _yiState (emptyEditor, b, w, sty, s)
-- Determine the set of characters in the font.
-- Always add newlines, since they are currently not r... | 689 | false | true | 0 | 14 | 130 | 219 | 103 | 116 | null | null |
bitemyapp/ghc | compiler/typecheck/TcClassDcl.hs | bsd-3-clause | tcClassDecl2 d = pprPanic "tcClassDecl2" (ppr d) | 48 | tcClassDecl2 d = pprPanic "tcClassDecl2" (ppr d) | 48 | tcClassDecl2 d = pprPanic "tcClassDecl2" (ppr d) | 48 | false | false | 0 | 7 | 6 | 20 | 9 | 11 | null | null |
jystic/ntpmon | src/Network/NTP/Config.hs | bsd-3-clause | showRefId :: RefId -> T.Text
showRefId (RefId a b c d) = T.strip (T.pack [a,b,c,d]) | 83 | showRefId :: RefId -> T.Text
showRefId (RefId a b c d) = T.strip (T.pack [a,b,c,d]) | 83 | showRefId (RefId a b c d) = T.strip (T.pack [a,b,c,d]) | 54 | false | true | 0 | 8 | 14 | 57 | 30 | 27 | null | null |
rfranek/duckling | Duckling/Volume/PT/Rules.hs | bsd-3-clause | ruleLatentVolGallon :: Rule
ruleLatentVolGallon = Rule
{ name = "<latent vol> gallon"
, pattern =
[ dimension Volume
, regex "gal(a|\x00e3|o|\x00f5)o?e?s?"
]
, prod = \tokens -> case tokens of
(Token Volume vd:_) ->
Just . Token Volume $ withUnit TVolume.Gallon vd
_ -> Nothing
} | 319 | ruleLatentVolGallon :: Rule
ruleLatentVolGallon = Rule
{ name = "<latent vol> gallon"
, pattern =
[ dimension Volume
, regex "gal(a|\x00e3|o|\x00f5)o?e?s?"
]
, prod = \tokens -> case tokens of
(Token Volume vd:_) ->
Just . Token Volume $ withUnit TVolume.Gallon vd
_ -> Nothing
} | 319 | ruleLatentVolGallon = Rule
{ name = "<latent vol> gallon"
, pattern =
[ dimension Volume
, regex "gal(a|\x00e3|o|\x00f5)o?e?s?"
]
, prod = \tokens -> case tokens of
(Token Volume vd:_) ->
Just . Token Volume $ withUnit TVolume.Gallon vd
_ -> Nothing
} | 291 | false | true | 0 | 14 | 85 | 104 | 52 | 52 | null | null |
nakaji-dayo/persistent | persistent/Database/Persist/Sql/Class.hs | mit | to3 :: ((a,b),c) -> (a,b,c)
to3 ((a,b),c) = (a,b,c) | 51 | to3 :: ((a,b),c) -> (a,b,c)
to3 ((a,b),c) = (a,b,c) | 51 | to3 ((a,b),c) = (a,b,c) | 23 | false | true | 0 | 9 | 8 | 66 | 38 | 28 | null | null |
icyfork/shellcheck | ShellCheck/Analytics.hs | gpl-3.0 | prop_checkBashisms4 = verify checkBashisms "rm !(*.hs)" | 55 | prop_checkBashisms4 = verify checkBashisms "rm !(*.hs)" | 55 | prop_checkBashisms4 = verify checkBashisms "rm !(*.hs)" | 55 | false | false | 1 | 5 | 5 | 15 | 5 | 10 | null | null |
mitchellwrosen/language-lua2 | src/Language/Lua/Lexer.hs | bsd-3-clause | luaToken :: RE Char Token
luaToken =
TkAnd <$ "and"
<|> TkBreak <$ "break"
<|> TkDo <$ "do"
<|> TkElse <$ "else"
<|> TkElseif <$ "elseif"
<|> TkEnd <$ "end"
<|> TkFalse <$ "false"
<|> TkFor <$ "for"
<|> TkFunction <$ "function"
<|> TkGo... | 1,800 | luaToken :: RE Char Token
luaToken =
TkAnd <$ "and"
<|> TkBreak <$ "break"
<|> TkDo <$ "do"
<|> TkElse <$ "else"
<|> TkElseif <$ "elseif"
<|> TkEnd <$ "end"
<|> TkFalse <$ "false"
<|> TkFor <$ "for"
<|> TkFunction <$ "function"
<|> TkGo... | 1,800 | luaToken =
TkAnd <$ "and"
<|> TkBreak <$ "break"
<|> TkDo <$ "do"
<|> TkElse <$ "else"
<|> TkElseif <$ "elseif"
<|> TkEnd <$ "end"
<|> TkFalse <$ "false"
<|> TkFor <$ "for"
<|> TkFunction <$ "function"
<|> TkGoto <$ "goto"
<|> ... | 1,774 | false | true | 302 | 6 | 733 | 747 | 371 | 376 | null | null |
onponomarev/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | elogRemoteImport :: String
elogRemoteImport = Types.eLogTypeToRaw ELogRemoteImport | 82 | elogRemoteImport :: String
elogRemoteImport = Types.eLogTypeToRaw ELogRemoteImport | 82 | elogRemoteImport = Types.eLogTypeToRaw ELogRemoteImport | 55 | false | true | 0 | 6 | 6 | 22 | 9 | 13 | null | null |
D4r1/project-euler | Euler/E60.hs | mit | findCandidates :: CMap -> Int -> [Int] -> (CMap, [Int])
findCandidates m _ [] = (m, []) | 87 | findCandidates :: CMap -> Int -> [Int] -> (CMap, [Int])
findCandidates m _ [] = (m, []) | 87 | findCandidates m _ [] = (m, []) | 31 | false | true | 0 | 9 | 16 | 52 | 29 | 23 | null | null |
TWal/ENS_adac | src/Asm.hs | bsd-3-clause | cmovle = ins2 "cmovle" | 22 | cmovle = ins2 "cmovle" | 22 | cmovle = ins2 "cmovle" | 22 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
Palmik/data-store | src/Data/Store/Selection.hs | bsd-3-clause | -- | The expression (@not' sel@) is a selection that includes all values
-- except those that match the selection @sel@.
not :: IsSelection sel => sel tag krs irs ts -> Selection tag krs irs ts
not = SelectionNot | 213 | not :: IsSelection sel => sel tag krs irs ts -> Selection tag krs irs ts
not = SelectionNot | 91 | not = SelectionNot | 18 | true | true | 0 | 8 | 40 | 48 | 22 | 26 | null | null |
diffusionkinetics/open | fuml/lib/Fuml/Optimisation/NelderMead.hs | mit | initialSimplex' :: Monad m => (Vector Double -> m Double)
-> RVarT m (Vector Double)
-> RVarT m Simplex
initialSimplex' f vgen = do
v0 <- vgen
let n = VS.length v0 + 1
fmap sortSimplex $ replicateM n $ do
v <- vgen
y <- lift $ f v
return (v, y) | 314 | initialSimplex' :: Monad m => (Vector Double -> m Double)
-> RVarT m (Vector Double)
-> RVarT m Simplex
initialSimplex' f vgen = do
v0 <- vgen
let n = VS.length v0 + 1
fmap sortSimplex $ replicateM n $ do
v <- vgen
y <- lift $ f v
return (v, y) | 314 | initialSimplex' f vgen = do
v0 <- vgen
let n = VS.length v0 + 1
fmap sortSimplex $ replicateM n $ do
v <- vgen
y <- lift $ f v
return (v, y) | 158 | false | true | 0 | 12 | 122 | 135 | 61 | 74 | null | null |
frenetic-lang/nettle-openflow | src/Nettle/OpenFlow/MessagesBinary.hs | bsd-3-clause | statsRequestSize (FlowStatsRequest _ _ _) = headerSize + 2 + 2 + matchSize + 1 + 1 + 2 | 86 | statsRequestSize (FlowStatsRequest _ _ _) = headerSize + 2 + 2 + matchSize + 1 + 1 + 2 | 86 | statsRequestSize (FlowStatsRequest _ _ _) = headerSize + 2 + 2 + matchSize + 1 + 1 + 2 | 86 | false | false | 0 | 10 | 18 | 44 | 21 | 23 | null | null |
jtdubs/Light | testsuite/Light/Geometry/MatrixTest.hs | mit | prop_VectorTimesIdentity :: Vector -> Bool
prop_VectorTimesIdentity v = v ^*| identityMatrix == v
&& identityMatrix |*^ v == v | 152 | prop_VectorTimesIdentity :: Vector -> Bool
prop_VectorTimesIdentity v = v ^*| identityMatrix == v
&& identityMatrix |*^ v == v | 152 | prop_VectorTimesIdentity v = v ^*| identityMatrix == v
&& identityMatrix |*^ v == v | 109 | false | true | 0 | 9 | 44 | 38 | 19 | 19 | null | null |
firefrorefiddle/hssh | src/InternalCommands.hs | bsd-3-clause | changeDir args = case args of
[] -> do home <- B.pack . homeDirectory <$>
liftIO (getRealUserID >>= getUserEntryForID)
changeDir [home]
[tgt] -> do liftIO $ changeWorkingDirectory tgt
return $ InternalResult True ""
_ -> error "cd: Syntax error" | 298 | changeDir args = case args of
[] -> do home <- B.pack . homeDirectory <$>
liftIO (getRealUserID >>= getUserEntryForID)
changeDir [home]
[tgt] -> do liftIO $ changeWorkingDirectory tgt
return $ InternalResult True ""
_ -> error "cd: Syntax error" | 298 | changeDir args = case args of
[] -> do home <- B.pack . homeDirectory <$>
liftIO (getRealUserID >>= getUserEntryForID)
changeDir [home]
[tgt] -> do liftIO $ changeWorkingDirectory tgt
return $ InternalResult True ""
_ -> error "cd: Syntax error" | 298 | false | false | 3 | 12 | 91 | 100 | 45 | 55 | null | null |
Ketouem/learn-you-a-haskell | src/chapter-6-modules/modules.hs | unlicense | -- folded version
findKey'' :: (Eq k) => k -> [(k, v)] -> Maybe v
findKey'' key xs = foldr (\(k,v) acc -> if key == k then Just v else acc) Nothing xs | 150 | findKey'' :: (Eq k) => k -> [(k, v)] -> Maybe v
findKey'' key xs = foldr (\(k,v) acc -> if key == k then Just v else acc) Nothing xs | 132 | findKey'' key xs = foldr (\(k,v) acc -> if key == k then Just v else acc) Nothing xs | 84 | true | true | 0 | 9 | 33 | 84 | 46 | 38 | null | null |
danidiaz/foldl-transduce | src/Control/Foldl/Transduce/Text.hs | bsd-3-clause | lines :: L.Transducer T.Text T.Text ()
lines = L.Transducer step False done
where
step previousnl txt =
if Data.Text.null txt
then
(previousnl,[],[])
else
let
lastc = Data.Text.last txt == '\n'
... | 631 | lines :: L.Transducer T.Text T.Text ()
lines = L.Transducer step False done
where
step previousnl txt =
if Data.Text.null txt
then
(previousnl,[],[])
else
let
lastc = Data.Text.last txt == '\n'
... | 631 | lines = L.Transducer step False done
where
step previousnl txt =
if Data.Text.null txt
then
(previousnl,[],[])
else
let
lastc = Data.Text.last txt == '\n'
txts = T.lines txt
... | 592 | false | true | 1 | 13 | 317 | 213 | 116 | 97 | null | null |
brendanhay/gogol | gogol-analytics/gen/Network/Google/Resource/Analytics/Management/Experiments/Get.hs | mpl-2.0 | -- | Experiment ID to retrieve the experiment for.
megExperimentId :: Lens' ManagementExperimentsGet Text
megExperimentId
= lens _megExperimentId
(\ s a -> s{_megExperimentId = a}) | 188 | megExperimentId :: Lens' ManagementExperimentsGet Text
megExperimentId
= lens _megExperimentId
(\ s a -> s{_megExperimentId = a}) | 137 | megExperimentId
= lens _megExperimentId
(\ s a -> s{_megExperimentId = a}) | 82 | true | true | 0 | 9 | 32 | 42 | 22 | 20 | null | null |
acharal/hopes | src/interpreter/Shell.hs | gpl-2.0 | dispatch (CRefute s) = refute s | 31 | dispatch (CRefute s) = refute s | 31 | dispatch (CRefute s) = refute s | 31 | false | false | 0 | 7 | 5 | 18 | 8 | 10 | null | null |
ombocomp/Renaming | Data/Renaming.hs | apache-2.0 | -- |Extracts the right value from an Either.
fromRight :: Either a b -> b
fromRight (Right x) = x | 97 | fromRight :: Either a b -> b
fromRight (Right x) = x | 52 | fromRight (Right x) = x | 23 | true | true | 0 | 7 | 19 | 30 | 15 | 15 | null | null |
fmapfmapfmap/amazonka | amazonka-codedeploy/gen/Network/AWS/CodeDeploy/DeleteDeploymentGroup.hs | mpl-2.0 | -- | The name of an existing AWS CodeDeploy application associated with the
-- applicable IAM user or AWS account.
ddgApplicationName :: Lens' DeleteDeploymentGroup Text
ddgApplicationName = lens _ddgApplicationName (\ s a -> s{_ddgApplicationName = a}) | 253 | ddgApplicationName :: Lens' DeleteDeploymentGroup Text
ddgApplicationName = lens _ddgApplicationName (\ s a -> s{_ddgApplicationName = a}) | 138 | ddgApplicationName = lens _ddgApplicationName (\ s a -> s{_ddgApplicationName = a}) | 83 | true | true | 1 | 9 | 35 | 45 | 23 | 22 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.