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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
candidtim/tempo | src/Jira.hs | bsd-3-clause | logWork :: Config -> [WorkLog] -> IO ()
logWork conf ws = mapM_ (logOne conf) ws | 80 | logWork :: Config -> [WorkLog] -> IO ()
logWork conf ws = mapM_ (logOne conf) ws | 80 | logWork conf ws = mapM_ (logOne conf) ws | 40 | false | true | 0 | 8 | 15 | 43 | 21 | 22 | null | null |
davidspies/regret-solver | regret/src/Data/SelectionMap.hs | gpl-3.0 | noPaths :: SelectionPath
noPaths = SelectionPath 0 | 50 | noPaths :: SelectionPath
noPaths = SelectionPath 0 | 50 | noPaths = SelectionPath 0 | 25 | false | true | 0 | 5 | 6 | 14 | 7 | 7 | null | null |
idzardh/dotfiles | xmonad.hs | gpl-3.0 | aqua = "#8ec07c" | 21 | aqua = "#8ec07c" | 21 | aqua = "#8ec07c" | 21 | false | false | 0 | 4 | 7 | 6 | 3 | 3 | null | null |
input-output-hk/cardano-sl | util/src/Pos/Util/Log/Scribes.hs | apache-2.0 | mkStdoutScribe :: NamedSeverity -> Log.Severity -> Verbosity -> IO Scribe
mkStdoutScribe = mkFileScribeH stdout True | 116 | mkStdoutScribe :: NamedSeverity -> Log.Severity -> Verbosity -> IO Scribe
mkStdoutScribe = mkFileScribeH stdout True | 116 | mkStdoutScribe = mkFileScribeH stdout True | 42 | false | true | 0 | 8 | 14 | 33 | 16 | 17 | null | null |
Erdwolf/autotool-bonn | src/Binpack/Param.hs | gpl-2.0 | example :: Param
example = Param { capacity = 20, bins = 10 } | 61 | example :: Param
example = Param { capacity = 20, bins = 10 } | 61 | example = Param { capacity = 20, bins = 10 } | 44 | false | true | 0 | 7 | 13 | 35 | 17 | 18 | null | null |
ancientlanguage/haskell-analysis | prepare/src/Prepare/Decompose.hs | mit | decomposeChar '\x017D' = "\x005A\x030C" | 39 | decomposeChar '\x017D' = "\x005A\x030C" | 39 | decomposeChar '\x017D' = "\x005A\x030C" | 39 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
MichaelMcCulloch/MPlusPlus | src/ASTConv.hs | bsd-3-clause | transCompareOp :: CompareOp -> A.M_operation
transCompareOp x = case x of
B_EQ -> A.M_eq
B_LT -> A.M_lt
B_GT -> A.M_gt
B_LE -> A.M_le
B_GE -> A.M_ge | 164 | transCompareOp :: CompareOp -> A.M_operation
transCompareOp x = case x of
B_EQ -> A.M_eq
B_LT -> A.M_lt
B_GT -> A.M_gt
B_LE -> A.M_le
B_GE -> A.M_ge | 163 | transCompareOp x = case x of
B_EQ -> A.M_eq
B_LT -> A.M_lt
B_GT -> A.M_gt
B_LE -> A.M_le
B_GE -> A.M_ge | 118 | false | true | 5 | 6 | 41 | 73 | 32 | 41 | null | null |
phischu/fragnix | builtins/base/GHC.IO.Encoding.UTF16.hs | bsd-3-clause | utf16_native_encode :: EncodeBuffer
utf16_native_encode = utf16be_encode | 72 | utf16_native_encode :: EncodeBuffer
utf16_native_encode = utf16be_encode | 72 | utf16_native_encode = utf16be_encode | 36 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
emmanueltouzery/cigale-timesheet | src/WebServer/SnapUtil.hs | mit | setActionResponse :: ExceptT ByteString Snap ByteString -> Snap ()
setActionResponse action = runExceptT action >>= setResponse | 127 | setActionResponse :: ExceptT ByteString Snap ByteString -> Snap ()
setActionResponse action = runExceptT action >>= setResponse | 127 | setActionResponse action = runExceptT action >>= setResponse | 60 | false | true | 0 | 7 | 15 | 41 | 18 | 23 | null | null |
tjakway/ghcjvm | compiler/typecheck/TcType.hs | bsd-3-clause | getDFunTyKey (TyVarTy tv) = getOccName tv | 52 | getDFunTyKey (TyVarTy tv) = getOccName tv | 52 | getDFunTyKey (TyVarTy tv) = getOccName tv | 52 | false | false | 0 | 7 | 16 | 18 | 8 | 10 | null | null |
kig/tomtegebra | Tomtegebra/Models.hs | gpl-3.0 | quadModel :: IORef (Maybe Model)
quadModel = unsafePerformIO (newIORef Nothing) | 79 | quadModel :: IORef (Maybe Model)
quadModel = unsafePerformIO (newIORef Nothing) | 79 | quadModel = unsafePerformIO (newIORef Nothing) | 46 | false | true | 2 | 7 | 9 | 35 | 14 | 21 | null | null |
snoyberg/ghc | compiler/nativeGen/PPC/Regs.hs | bsd-3-clause | -- argRegs is the set of regs which are read for an n-argument call to C.
-- For archs which pass all args on the stack (x86), is empty.
-- Sparc passes up to the first 6 args in regs.
argRegs :: RegNo -> [Reg]
argRegs 0 = [] | 225 | argRegs :: RegNo -> [Reg]
argRegs 0 = [] | 40 | argRegs 0 = [] | 14 | true | true | 0 | 6 | 48 | 26 | 15 | 11 | null | null |
denibertovic/haskell | kubernetes/lib/Kubernetes/OpenAPI/ModelLens.hs | bsd-3-clause | -- | 'v2beta1ObjectMetricSourceTarget' Lens
v2beta1ObjectMetricSourceTargetL :: Lens_' V2beta1ObjectMetricSource (V2beta1CrossVersionObjectReference)
v2beta1ObjectMetricSourceTargetL f V2beta1ObjectMetricSource{..} = (\v2beta1ObjectMetricSourceTarget -> V2beta1ObjectMetricSource { v2beta1ObjectMetricSourceTarget, ..} )... | 358 | v2beta1ObjectMetricSourceTargetL :: Lens_' V2beta1ObjectMetricSource (V2beta1CrossVersionObjectReference)
v2beta1ObjectMetricSourceTargetL f V2beta1ObjectMetricSource{..} = (\v2beta1ObjectMetricSourceTarget -> V2beta1ObjectMetricSource { v2beta1ObjectMetricSourceTarget, ..} ) <$> f v2beta1ObjectMetricSourceTarget | 314 | v2beta1ObjectMetricSourceTargetL f V2beta1ObjectMetricSource{..} = (\v2beta1ObjectMetricSourceTarget -> V2beta1ObjectMetricSource { v2beta1ObjectMetricSourceTarget, ..} ) <$> f v2beta1ObjectMetricSourceTarget | 208 | true | true | 0 | 8 | 22 | 54 | 29 | 25 | null | null |
fibsifan/pandoc | src/Text/Pandoc/Writers/Haddock.hs | gpl-2.0 | pandocTable :: WriterOptions -> Bool -> [Alignment] -> [Double]
-> [Doc] -> [[Doc]] -> State WriterState Doc
pandocTable opts headless aligns widths rawHeaders rawRows = do
let isSimple = all (==0) widths
let alignHeader alignment = case alignment of
AlignLeft -> lblo... | 1,796 | pandocTable :: WriterOptions -> Bool -> [Alignment] -> [Double]
-> [Doc] -> [[Doc]] -> State WriterState Doc
pandocTable opts headless aligns widths rawHeaders rawRows = do
let isSimple = all (==0) widths
let alignHeader alignment = case alignment of
AlignLeft -> lblo... | 1,796 | pandocTable opts headless aligns widths rawHeaders rawRows = do
let isSimple = all (==0) widths
let alignHeader alignment = case alignment of
AlignLeft -> lblock
AlignCenter -> cblock
AlignRight -> rblock
... | 1,675 | false | true | 4 | 13 | 773 | 480 | 246 | 234 | null | null |
thielema/wxhaskell | wx/src/Graphics/UI/WX/Controls.hs | lgpl-2.1 | listViewSetItems :: ListView a -> [a] -> IO ()
listViewSetItems list its = do
set (listViewItems list) [value := its]
set (listViewCtrl list) [items := map (listViewToRow list) its] | 186 | listViewSetItems :: ListView a -> [a] -> IO ()
listViewSetItems list its = do
set (listViewItems list) [value := its]
set (listViewCtrl list) [items := map (listViewToRow list) its] | 186 | listViewSetItems list its = do
set (listViewItems list) [value := its]
set (listViewCtrl list) [items := map (listViewToRow list) its] | 139 | false | true | 0 | 12 | 33 | 88 | 42 | 46 | null | null |
andreasfrom/toyrsa | crypt.hs | mit | isCoprime :: Integer -> Integer -> Bool
isCoprime a b = gcd a b == 1 | 68 | isCoprime :: Integer -> Integer -> Bool
isCoprime a b = gcd a b == 1 | 68 | isCoprime a b = gcd a b == 1 | 28 | false | true | 1 | 8 | 15 | 43 | 18 | 25 | null | null |
drcabana/euler-fp | source/hs/P21.hs | epl-1.0 | main = print $ solution | 23 | main = print $ solution | 23 | main = print $ solution | 23 | false | false | 3 | 5 | 4 | 15 | 5 | 10 | null | null |
ublubu/shapes | shapes-demo/src/Physics/Draw.hs | mit | centeredRectangle :: (Fractional a) => P2 a -> V2 a -> R.Rectangle a
centeredRectangle center size = R.Rectangle (center .-^ halfSize) size
where halfSize = fmap (/2) size | 173 | centeredRectangle :: (Fractional a) => P2 a -> V2 a -> R.Rectangle a
centeredRectangle center size = R.Rectangle (center .-^ halfSize) size
where halfSize = fmap (/2) size | 173 | centeredRectangle center size = R.Rectangle (center .-^ halfSize) size
where halfSize = fmap (/2) size | 104 | false | true | 1 | 9 | 29 | 82 | 38 | 44 | null | null |
markhibberd/juggernaut | src/Juggernaut/Dependency.hs | bsd-3-clause | ddependenciesd :: Module -> [Module]
ddependenciesd x = map (\(m, _) -> m) (ddependencies x) | 92 | ddependenciesd :: Module -> [Module]
ddependenciesd x = map (\(m, _) -> m) (ddependencies x) | 92 | ddependenciesd x = map (\(m, _) -> m) (ddependencies x) | 55 | false | true | 0 | 8 | 14 | 46 | 25 | 21 | null | null |
olsner/ghc | testsuite/tests/perf/compiler/T10370.hs | bsd-3-clause | a237 :: IO (); a237 = forever $ putStrLn "a237" | 47 | a237 :: IO ()
a237 = forever $ putStrLn "a237" | 46 | a237 = forever $ putStrLn "a237" | 32 | false | true | 0 | 6 | 9 | 24 | 12 | 12 | null | null |
GaloisInc/saw-script | src/SAWScript/MGU.hs | bsd-3-clause | inferStmts m ctx [StmtBind pos (PWild mt) mc e] = do
t <- maybe newType return mt
e' <- checkE m e (tBlock ctx t)
mc' <- case mc of
Nothing -> return ctx
Just ty -> do ty' <- checkKind ty
unify m ty ctx -- TODO: should this be ty'?
return ty'
return ([StmtBind pos... | 355 | inferStmts m ctx [StmtBind pos (PWild mt) mc e] = do
t <- maybe newType return mt
e' <- checkE m e (tBlock ctx t)
mc' <- case mc of
Nothing -> return ctx
Just ty -> do ty' <- checkKind ty
unify m ty ctx -- TODO: should this be ty'?
return ty'
return ([StmtBind pos... | 355 | inferStmts m ctx [StmtBind pos (PWild mt) mc e] = do
t <- maybe newType return mt
e' <- checkE m e (tBlock ctx t)
mc' <- case mc of
Nothing -> return ctx
Just ty -> do ty' <- checkKind ty
unify m ty ctx -- TODO: should this be ty'?
return ty'
return ([StmtBind pos... | 355 | false | false | 0 | 14 | 118 | 165 | 76 | 89 | null | null |
vikraman/ghc | libraries/base/Data/Data.hs | bsd-3-clause | fromConstrM :: forall m a. (Monad m, Data a)
=> (forall d. Data d => m d)
-> Constr
-> m a
fromConstrM f = gunfold k z
where
k :: forall b r. Data b => m (b -> r) -> m r
k c = do { c' <- c; b <- f; return (c' b) }
z :: forall r. r -> m r
z = return
----------------------... | 627 | fromConstrM :: forall m a. (Monad m, Data a)
=> (forall d. Data d => m d)
-> Constr
-> m a
fromConstrM f = gunfold k z
where
k :: forall b r. Data b => m (b -> r) -> m r
k c = do { c' <- c; b <- f; return (c' b) }
z :: forall r. r -> m r
z = return
----------------------... | 627 | fromConstrM f = gunfold k z
where
k :: forall b r. Data b => m (b -> r) -> m r
k c = do { c' <- c; b <- f; return (c' b) }
z :: forall r. r -> m r
z = return
------------------------------------------------------------------------------
--
-- Datatype and constructor representations
--
---------------... | 500 | false | true | 0 | 12 | 153 | 190 | 97 | 93 | null | null |
mbelicki/valdemar | src/CodeGenerator.hs | gpl-3.0 | alloca :: LLVM.Type -> CodeGenerator LLVM.Operand
alloca t = instruction $ LLVM.Alloca t Nothing 0 [] | 101 | alloca :: LLVM.Type -> CodeGenerator LLVM.Operand
alloca t = instruction $ LLVM.Alloca t Nothing 0 [] | 101 | alloca t = instruction $ LLVM.Alloca t Nothing 0 [] | 51 | false | true | 2 | 8 | 15 | 47 | 21 | 26 | null | null |
tpsinnem/Idris-dev | src/Idris/Core/TT.hs | bsd-3-clause | mkApp :: TT n -> [TT n] -> TT n
mkApp f [] = f | 46 | mkApp :: TT n -> [TT n] -> TT n
mkApp f [] = f | 46 | mkApp f [] = f | 14 | false | true | 0 | 8 | 14 | 43 | 19 | 24 | null | null |
facebookarchive/lex-pass | src/Lang/Php/Ast/Lex.hs | bsd-3-clause | tokXorByP = try $ str tokXorBy | 30 | tokXorByP = try $ str tokXorBy | 30 | tokXorByP = try $ str tokXorBy | 30 | false | false | 0 | 6 | 5 | 13 | 6 | 7 | null | null |
rvion/ride | jetpack/src/Network/URI/AsUri.hs | bsd-3-clause | set_uri_uriAuthority x o = o { I.uriAuthority = x} | 50 | set_uri_uriAuthority x o = o { I.uriAuthority = x} | 50 | set_uri_uriAuthority x o = o { I.uriAuthority = x} | 50 | false | false | 0 | 6 | 8 | 21 | 11 | 10 | null | null |
ambiata/highlighting-kate | Text/Highlighting/Kate/Syntax/Idris.hs | gpl-2.0 | -- | Full name of language.
syntaxName :: String
syntaxName = "Idris" | 69 | syntaxName :: String
syntaxName = "Idris" | 41 | syntaxName = "Idris" | 20 | true | true | 0 | 6 | 11 | 19 | 8 | 11 | null | null |
wkoiking/simulator-for-PA-interface | src/PA.hs | bsd-3-clause | - | Start simulator for ATS server with scenario.
-- Currently following scenarios are available 'scenario1', 'scenario2', 'scenario3', 'scenario4' and 'scenario5'.
serverATS
:: ServiceName -- ^ Port number
-> Scenario -- ^ Scenario
-> IO ()
serverATS port scenario = withSocketsDo $
do addrinfos <- getA... | 2,002 | serverATS
:: ServiceName -- ^ Port number
-> Scenario -- ^ Scenario
-> IO ()
serverATS port scenario = withSocketsDo $
do addrinfos <- getAddrInfo (Just (defaultHints {addrFlags = [AI_PASSIVE]})) Nothing (Just port)
let serveraddr = head addrinfos
bracket (socket (addrFamily serveraddr) St... | 1,836 | serverATS port scenario = withSocketsDo $
do addrinfos <- getAddrInfo (Just (defaultHints {addrFlags = [AI_PASSIVE]})) Nothing (Just port)
let serveraddr = head addrinfos
bracket (socket (addrFamily serveraddr) Stream defaultProtocol) sClose $ \sock -> do
bind sock (addrAddress serveraddr)... | 1,747 | true | true | 1 | 18 | 813 | 492 | 223 | 269 | null | null |
olsner/ghc | compiler/main/ErrUtils.hs | bsd-3-clause | debugTraceMsg :: DynFlags -> Int -> MsgDoc -> IO ()
debugTraceMsg dflags val msg = ifVerbose dflags val $
logInfo dflags defaultDumpStyle msg | 172 | debugTraceMsg :: DynFlags -> Int -> MsgDoc -> IO ()
debugTraceMsg dflags val msg = ifVerbose dflags val $
logInfo dflags defaultDumpStyle msg | 172 | debugTraceMsg dflags val msg = ifVerbose dflags val $
logInfo dflags defaultDumpStyle msg | 120 | false | true | 0 | 9 | 53 | 51 | 24 | 27 | null | null |
olsner/ghc | compiler/coreSyn/CoreUnfold.hs | bsd-3-clause | mkSizeIs :: Int -> Int -> Bag (Id, Int) -> Int -> ExprSize
mkSizeIs max n xs d | (n - d) > max = TooBig
| otherwise = SizeIs n xs d | 155 | mkSizeIs :: Int -> Int -> Bag (Id, Int) -> Int -> ExprSize
mkSizeIs max n xs d | (n - d) > max = TooBig
| otherwise = SizeIs n xs d | 155 | mkSizeIs max n xs d | (n - d) > max = TooBig
| otherwise = SizeIs n xs d | 96 | false | true | 0 | 10 | 56 | 78 | 38 | 40 | null | null |
tjakway/ghcjvm | compiler/types/Coercion.hs | bsd-3-clause | emptyLiftingContext :: InScopeSet -> LiftingContext
emptyLiftingContext in_scope = LC (mkEmptyTCvSubst in_scope) emptyVarEnv | 124 | emptyLiftingContext :: InScopeSet -> LiftingContext
emptyLiftingContext in_scope = LC (mkEmptyTCvSubst in_scope) emptyVarEnv | 124 | emptyLiftingContext in_scope = LC (mkEmptyTCvSubst in_scope) emptyVarEnv | 72 | false | true | 0 | 7 | 11 | 32 | 15 | 17 | null | null |
begriffs/hs-webdriver | src/Test/WebDriver/Commands.hs | bsd-3-clause | -- |Get a list of available log types.
getLogTypes :: WebDriver wd => wd [LogType]
getLogTypes = doSessCommand methodGet "/log/types" Null | 138 | getLogTypes :: WebDriver wd => wd [LogType]
getLogTypes = doSessCommand methodGet "/log/types" Null | 99 | getLogTypes = doSessCommand methodGet "/log/types" Null | 55 | true | true | 0 | 7 | 20 | 32 | 16 | 16 | null | null |
mfpi/hnars | src/FingerTree.hs | mit | toList :: (Reduce f) => f a -> [a]
toList s = (reducer (:)) s [] | 64 | toList :: (Reduce f) => f a -> [a]
toList s = (reducer (:)) s [] | 64 | toList s = (reducer (:)) s [] | 29 | false | true | 0 | 7 | 15 | 48 | 25 | 23 | null | null |
kapilash/dc | src/csp/Chap01.hs | bsd-3-clause | example01 :: Proc SimpleVM
example01 = Then (\Coin -> Stop) | 59 | example01 :: Proc SimpleVM
example01 = Then (\Coin -> Stop) | 59 | example01 = Then (\Coin -> Stop) | 32 | false | true | 0 | 7 | 9 | 25 | 13 | 12 | null | null |
xu-hao/QueryArrow | QueryArrow-db-filesystem/src/QueryArrow/FileSystem/Interpreter.hs | bsd-3-clause | remoteToRemoteInterpreter2 (L2MoveDir (a) (b)) = do
(hosta, porta, _, hostb, portb, _) <- ask
liftIO $ bracket (connectTo hosta (PortNumber (fromIntegral porta))) hClose (\ha -> do
liftIO $ bracket (connectTo hostb (PortNumber (fromIntegral portb))) hClose (\hb -> do
remoteSendDir ha a hb b
sen... | 560 | remoteToRemoteInterpreter2 (L2MoveDir (a) (b)) = do
(hosta, porta, _, hostb, portb, _) <- ask
liftIO $ bracket (connectTo hosta (PortNumber (fromIntegral porta))) hClose (\ha -> do
liftIO $ bracket (connectTo hostb (PortNumber (fromIntegral portb))) hClose (\hb -> do
remoteSendDir ha a hb b
sen... | 560 | remoteToRemoteInterpreter2 (L2MoveDir (a) (b)) = do
(hosta, porta, _, hostb, portb, _) <- ask
liftIO $ bracket (connectTo hosta (PortNumber (fromIntegral porta))) hClose (\ha -> do
liftIO $ bracket (connectTo hostb (PortNumber (fromIntegral portb))) hClose (\hb -> do
remoteSendDir ha a hb b
sen... | 560 | false | false | 0 | 23 | 110 | 213 | 105 | 108 | null | null |
paraseba/haskell-brainfuck | test/Test/Eval.hs | mit | prop_Squares :: Bool
prop_Squares =
outToString out == expected
where program = squares
res = execState (evalStr simulatorMachine program) emptyState
out = simStateOutput res
expected = concat [show (n*n) ++ "\n" | n <- [0..100]]
-- taken from http://rosettacode.org/wiki/Even_or_odd | 312 | prop_Squares :: Bool
prop_Squares =
outToString out == expected
where program = squares
res = execState (evalStr simulatorMachine program) emptyState
out = simStateOutput res
expected = concat [show (n*n) ++ "\n" | n <- [0..100]]
-- taken from http://rosettacode.org/wiki/Even_or_odd | 312 | prop_Squares =
outToString out == expected
where program = squares
res = execState (evalStr simulatorMachine program) emptyState
out = simStateOutput res
expected = concat [show (n*n) ++ "\n" | n <- [0..100]]
-- taken from http://rosettacode.org/wiki/Even_or_odd | 291 | false | true | 3 | 10 | 67 | 92 | 47 | 45 | null | null |
lemol/HaskellNet | src/Network/HaskellNet/Debug.hs | bsd-3-clause | debugBsGetLine :: BSStream -> IO BS.ByteString
debugBsGetLine s = do
hPutStr stderr "reading with bsGetLine..."
hFlush stderr
l <- bsGetLine s
BS.hPutStrLn stderr l
return l | 183 | debugBsGetLine :: BSStream -> IO BS.ByteString
debugBsGetLine s = do
hPutStr stderr "reading with bsGetLine..."
hFlush stderr
l <- bsGetLine s
BS.hPutStrLn stderr l
return l | 183 | debugBsGetLine s = do
hPutStr stderr "reading with bsGetLine..."
hFlush stderr
l <- bsGetLine s
BS.hPutStrLn stderr l
return l | 136 | false | true | 0 | 8 | 35 | 63 | 26 | 37 | null | null |
kazu-yamamoto/network-uri | tests/uri001.hs | bsd-3-clause | testAltFn17 = testEq "testAltFn17" False (isAbsoluteURI "c/d") | 62 | testAltFn17 = testEq "testAltFn17" False (isAbsoluteURI "c/d") | 62 | testAltFn17 = testEq "testAltFn17" False (isAbsoluteURI "c/d") | 62 | false | false | 0 | 7 | 6 | 19 | 9 | 10 | null | null |
oldmanmike/ghc | compiler/llvmGen/Llvm/Types.hs | bsd-3-clause | ppPlainName (LMLitVar x ) = ppLit x | 47 | ppPlainName (LMLitVar x ) = ppLit x | 47 | ppPlainName (LMLitVar x ) = ppLit x | 47 | false | false | 0 | 7 | 18 | 18 | 8 | 10 | null | null |
wfleming/advent-of-code-2016 | 2017/D6/src/D6Lib.hs | bsd-3-clause | reallocateUntilDupe :: [Mem] -> [Mem]
reallocateUntilDupe [] = error "don't send a non-empty array" | 99 | reallocateUntilDupe :: [Mem] -> [Mem]
reallocateUntilDupe [] = error "don't send a non-empty array" | 99 | reallocateUntilDupe [] = error "don't send a non-empty array" | 61 | false | true | 0 | 6 | 13 | 29 | 15 | 14 | null | null |
aniketd/learn.haskell | RWH/4_and_before/SimpleJSON/test.hs | unlicense | simpleEscapes :: [(Char, String)]
simpleEscapes = zipWith ch "\b\n\f\r\t\\\"/" "bnfrt\\\"/"
where ch a b = (a, ['\\', b]) | 129 | simpleEscapes :: [(Char, String)]
simpleEscapes = zipWith ch "\b\n\f\r\t\\\"/" "bnfrt\\\"/"
where ch a b = (a, ['\\', b]) | 129 | simpleEscapes = zipWith ch "\b\n\f\r\t\\\"/" "bnfrt\\\"/"
where ch a b = (a, ['\\', b]) | 95 | false | true | 1 | 8 | 25 | 62 | 30 | 32 | null | null |
jac3km4/haskit | src/LuaJIT/ByteCode.hs | mit | ret1 a d = Instruction 72 $ TwoArgs a d | 39 | ret1 a d = Instruction 72 $ TwoArgs a d | 39 | ret1 a d = Instruction 72 $ TwoArgs a d | 39 | false | false | 3 | 5 | 9 | 28 | 10 | 18 | null | null |
nevrenato/Hets_Fork | SoftFOL/ProveHyperHyper.hs | gpl-2.0 | -- | The Prover implementation.
hyperProver :: Prover Sign Sentence SoftFOLMorphism () ProofTree
hyperProver = mkAutomaticProver ekrhyperS () hyperGUI hyperCMDLautomaticBatch | 174 | hyperProver :: Prover Sign Sentence SoftFOLMorphism () ProofTree
hyperProver = mkAutomaticProver ekrhyperS () hyperGUI hyperCMDLautomaticBatch | 142 | hyperProver = mkAutomaticProver ekrhyperS () hyperGUI hyperCMDLautomaticBatch | 77 | true | true | 1 | 6 | 19 | 45 | 18 | 27 | null | null |
elitak/hs-datahand | src/DataHand/KeyAliases.hs | gpl-3.0 | per = Period | 13 | per = Period | 13 | per = Period | 13 | false | false | 1 | 5 | 3 | 10 | 3 | 7 | null | null |
FranklinChen/twenty-four-days2015-of-hackage | test/DimensionalExampleSpec.hs | bsd-3-clause | -- | Required for auto-discovery.
spec :: Spec
spec =
describe "dimensional" $ do
it "check required running stride length" $
let fiveK :: Length Double
fiveK = 5 *~ kilo meter
goalTime :: Time Double
goalTime = 24 *~ minute + 45 *~ second
feetPerStep :: Double
... | 443 | spec :: Spec
spec =
describe "dimensional" $ do
it "check required running stride length" $
let fiveK :: Length Double
fiveK = 5 *~ kilo meter
goalTime :: Time Double
goalTime = 24 *~ minute + 45 *~ second
feetPerStep :: Double
feetPerStep = requiredStride... | 409 | spec =
describe "dimensional" $ do
it "check required running stride length" $
let fiveK :: Length Double
fiveK = 5 *~ kilo meter
goalTime :: Time Double
goalTime = 24 *~ minute + 45 *~ second
feetPerStep :: Double
feetPerStep = requiredStrideLength fiveK ... | 396 | true | true | 0 | 16 | 136 | 125 | 64 | 61 | null | null |
philopon/barrier | src/Graphics/Badge/Barrier/Style/Plastic.hs | mit | plastic :: Plastic
plastic = Plastic gray brightgreen | 53 | plastic :: Plastic
plastic = Plastic gray brightgreen | 53 | plastic = Plastic gray brightgreen | 34 | false | true | 0 | 6 | 7 | 24 | 9 | 15 | null | null |
LambdaMx/haskelldojo | session_4/tictactoe/domix_agus/web/ui.hs | unlicense | documentGetElements :: String -> Fay [Element]
documentGetElements = ffi "document.getElementsByTagName(%1)" | 108 | documentGetElements :: String -> Fay [Element]
documentGetElements = ffi "document.getElementsByTagName(%1)" | 108 | documentGetElements = ffi "document.getElementsByTagName(%1)" | 61 | false | true | 0 | 8 | 9 | 30 | 13 | 17 | null | null |
kishoredbn/barrelfish | hake/RuleDefs.hs | mit | sockeye :: String -> HRule
sockeye net =
let
factFile = sockeyeFactFilePath net
depFile = dependFilePath factFile
in Rules
[ Rule
[ sockeyeProgLoc
, Str "-i", sockeyeSocDir
, Str "-o", Out "" factFile
, Str "-d", Out "" depFile
... | 402 | sockeye :: String -> HRule
sockeye net =
let
factFile = sockeyeFactFilePath net
depFile = dependFilePath factFile
in Rules
[ Rule
[ sockeyeProgLoc
, Str "-i", sockeyeSocDir
, Str "-o", Out "" factFile
, Str "-d", Out "" depFile
... | 402 | sockeye net =
let
factFile = sockeyeFactFilePath net
depFile = dependFilePath factFile
in Rules
[ Rule
[ sockeyeProgLoc
, Str "-i", sockeyeSocDir
, Str "-o", Out "" factFile
, Str "-d", Out "" depFile
, sockeyeSocFileLoc net
... | 375 | false | true | 0 | 9 | 168 | 113 | 55 | 58 | null | null |
hackern/halfs | Halfs/Inode.hs | bsd-3-clause | freeInode :: HalfsCapable b t r l m =>
InodeRef -- ^ reference to the inode to remove
-> HalfsM b r l m ()
freeInode inr@(IR addr) =
withLockedInode inr $ do
bm <- hasks hsBlockMap
start <- inoExt `fmap` drefInode inr
freeBlocks bm (blockAddrs start)
_numFreed :: Word64 <- fr... | 359 | freeInode :: HalfsCapable b t r l m =>
InodeRef -- ^ reference to the inode to remove
-> HalfsM b r l m ()
freeInode inr@(IR addr) =
withLockedInode inr $ do
bm <- hasks hsBlockMap
start <- inoExt `fmap` drefInode inr
freeBlocks bm (blockAddrs start)
_numFreed :: Word64 <- fr... | 359 | freeInode inr@(IR addr) =
withLockedInode inr $ do
bm <- hasks hsBlockMap
start <- inoExt `fmap` drefInode inr
freeBlocks bm (blockAddrs start)
_numFreed :: Word64 <- freeExts bm start
BM.unalloc1 bm addr | 229 | false | true | 11 | 7 | 104 | 124 | 62 | 62 | null | null |
MasseR/Shopping-list | ostoslista.hs | bsd-3-clause | handler _ = mainApp | 19 | handler _ = mainApp | 19 | handler _ = mainApp | 19 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
apyrgio/snf-ganeti | test/hs/Test/Ganeti/HTools/Cluster.hs | bsd-2-clause | prop_AllocEvacuate :: Property
prop_AllocEvacuate =
forAll (choose (4, 8)) $ \count ->
forAll (genOnlineNode `suchThat` isNodeBig 4) $ \node ->
forAll (genInstanceSmallerThanNode node `suchThat` isMirrored) $ \inst ->
case genClusterAlloc count node inst of
Bad msg -> failTest msg
Ok (nl, il, inst') ->
... | 769 | prop_AllocEvacuate :: Property
prop_AllocEvacuate =
forAll (choose (4, 8)) $ \count ->
forAll (genOnlineNode `suchThat` isNodeBig 4) $ \node ->
forAll (genInstanceSmallerThanNode node `suchThat` isMirrored) $ \inst ->
case genClusterAlloc count node inst of
Bad msg -> failTest msg
Ok (nl, il, inst') ->
... | 769 | prop_AllocEvacuate =
forAll (choose (4, 8)) $ \count ->
forAll (genOnlineNode `suchThat` isNodeBig 4) $ \node ->
forAll (genInstanceSmallerThanNode node `suchThat` isMirrored) $ \inst ->
case genClusterAlloc count node inst of
Bad msg -> failTest msg
Ok (nl, il, inst') ->
conjoin . map (\mode -> c... | 738 | false | true | 5 | 13 | 241 | 182 | 97 | 85 | null | null |
benkio/VRP | src/DataParsing/VrpTxtParse.hs | gpl-3.0 | getYCoordinate :: VRPFileContent -> Int -> Int
getYCoordinate c l = readElementFromFile c l yLineIndex | 102 | getYCoordinate :: VRPFileContent -> Int -> Int
getYCoordinate c l = readElementFromFile c l yLineIndex | 102 | getYCoordinate c l = readElementFromFile c l yLineIndex | 55 | false | true | 0 | 8 | 14 | 36 | 16 | 20 | null | null |
kajigor/uKanren_transformations | src/Generalization.hs | bsd-3-clause | refine :: ([G S], Generalizer, Generalizer, FN.FreshNames) -> ([G S], Generalizer, Generalizer, FN.FreshNames)
refine msg@(g, Subst.Subst s1, Subst.Subst s2, d) =
let similar1 = filter ((>1) . length) $ groupBy group (Map.toList s1) [] in
let similar2 = filter ((>1) . length) $ groupBy group (Map.toList s2) []... | 1,011 | refine :: ([G S], Generalizer, Generalizer, FN.FreshNames) -> ([G S], Generalizer, Generalizer, FN.FreshNames)
refine msg@(g, Subst.Subst s1, Subst.Subst s2, d) =
let similar1 = filter ((>1) . length) $ groupBy group (Map.toList s1) [] in
let similar2 = filter ((>1) . length) $ groupBy group (Map.toList s2) []... | 1,011 | refine msg@(g, Subst.Subst s1, Subst.Subst s2, d) =
let similar1 = filter ((>1) . length) $ groupBy group (Map.toList s1) [] in
let similar2 = filter ((>1) . length) $ groupBy group (Map.toList s2) [] in
let sim1 = map (map fst) similar1 in
let sim2 = map (map fst) similar2 in
let toSwap = concatMap... | 899 | false | true | 7 | 27 | 232 | 569 | 282 | 287 | null | null |
Kingdread/Huno | src/Main.hs | bsd-2-clause | updateFirstPlayer :: (Hand -> Hand) -> [Player] -> [Player]
updateFirstPlayer f p = let (pl:rst) = p
in applyHand f pl : rst | 148 | updateFirstPlayer :: (Hand -> Hand) -> [Player] -> [Player]
updateFirstPlayer f p = let (pl:rst) = p
in applyHand f pl : rst | 148 | updateFirstPlayer f p = let (pl:rst) = p
in applyHand f pl : rst | 88 | false | true | 0 | 10 | 46 | 71 | 34 | 37 | null | null |
cocreature/leksah | src/IDE/Core/State.hs | gpl-2.0 | deactivatePaneIfActive :: RecoverablePane alpha beta IDEM => alpha -> IDEAction
deactivatePaneIfActive pane = do
mbActive <- getActivePane
case mbActive of
Nothing -> return ()
Just (n,_) -> when (n == paneName pane) deactivatePane
-- | Replaces an 'IDEPackage' in the workspace by the given 'ID... | 443 | deactivatePaneIfActive :: RecoverablePane alpha beta IDEM => alpha -> IDEAction
deactivatePaneIfActive pane = do
mbActive <- getActivePane
case mbActive of
Nothing -> return ()
Just (n,_) -> when (n == paneName pane) deactivatePane
-- | Replaces an 'IDEPackage' in the workspace by the given 'ID... | 443 | deactivatePaneIfActive pane = do
mbActive <- getActivePane
case mbActive of
Nothing -> return ()
Just (n,_) -> when (n == paneName pane) deactivatePane
-- | Replaces an 'IDEPackage' in the workspace by the given 'IDEPackage' and
-- replaces the current package if it matches.
-- Comparison is d... | 363 | false | true | 0 | 14 | 89 | 93 | 44 | 49 | null | null |
sol/aeson | tests/UnitTests.hs | bsd-3-clause | roundTripCamel :: String -> Assertion
roundTripCamel name = assertEqual "" name (camelFrom '_' $ camelTo '_' name) | 114 | roundTripCamel :: String -> Assertion
roundTripCamel name = assertEqual "" name (camelFrom '_' $ camelTo '_' name) | 114 | roundTripCamel name = assertEqual "" name (camelFrom '_' $ camelTo '_' name) | 76 | false | true | 0 | 8 | 16 | 40 | 19 | 21 | null | null |
irori/hs2lazy | examples/lisp.hs | bsd-3-clause | primCons _ glo = errExit "cons: invalid argument" | 49 | primCons _ glo = errExit "cons: invalid argument" | 49 | primCons _ glo = errExit "cons: invalid argument" | 49 | false | false | 0 | 5 | 7 | 14 | 6 | 8 | null | null |
mightymoose/liquidhaskell | src/Language/Haskell/Liquid/World.hs | bsd-3-clause | empty :: World t
empty = World [] | 37 | empty :: World t
empty = World [] | 37 | empty = World [] | 18 | false | true | 1 | 6 | 11 | 22 | 9 | 13 | null | null |
zaxtax/hakaru | haskell/Language/Hakaru/Pretty/Maple.hs | bsd-3-clause | -- Special case pair
mapleType (SData (STyCon c `STyApp` _ `STyApp` _) (SPlus x SVoid))
| isJust (jmEq1 c sSymbol_Pair)
= showString "HData(DatumStruct(pair,["
. mapleTypeDStruct x
. showString "]))" | 215 | mapleType (SData (STyCon c `STyApp` _ `STyApp` _) (SPlus x SVoid))
| isJust (jmEq1 c sSymbol_Pair)
= showString "HData(DatumStruct(pair,["
. mapleTypeDStruct x
. showString "]))" | 194 | mapleType (SData (STyCon c `STyApp` _ `STyApp` _) (SPlus x SVoid))
| isJust (jmEq1 c sSymbol_Pair)
= showString "HData(DatumStruct(pair,["
. mapleTypeDStruct x
. showString "]))" | 194 | true | false | 2 | 10 | 44 | 82 | 38 | 44 | null | null |
Danl2620/htads | src/Json.hs | bsd-3-clause | whenRight f (Right a) = Right (f a) | 35 | whenRight f (Right a) = Right (f a) | 35 | whenRight f (Right a) = Right (f a) | 35 | false | false | 0 | 7 | 7 | 28 | 12 | 16 | null | null |
scott-fleischman/greek-grammar | haskell/greek-grammar/src/Data/Unicode/DecomposeChar.hs | mit | decomposeChar '\x2F82E' = "\x535A" | 34 | decomposeChar '\x2F82E' = "\x535A" | 34 | decomposeChar '\x2F82E' = "\x535A" | 34 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
phischu/fragnix | tests/packages/scotty/Text.PrettyPrint.Annotated.HughesPJ.hs | bsd-3-clause | fits n (TextBeside s p) = fits (n - annotSize s) p | 53 | fits n (TextBeside s p) = fits (n - annotSize s) p | 53 | fits n (TextBeside s p) = fits (n - annotSize s) p | 53 | false | false | 0 | 8 | 14 | 36 | 16 | 20 | null | null |
mrak/ptui | src/Pt/StateMachine.hs | bsd-3-clause | transduce Q0 C1 t ('\x9b':>bs) = transduce QCSI C1 t bs | 55 | transduce Q0 C1 t ('\x9b':>bs) = transduce QCSI C1 t bs | 55 | transduce Q0 C1 t ('\x9b':>bs) = transduce QCSI C1 t bs | 55 | false | false | 0 | 7 | 10 | 31 | 15 | 16 | null | null |
jcollard/unm-hip | Data/Image/Binary.hs | gpl-3.0 | boolToDouble _ = 0.0 | 20 | boolToDouble _ = 0.0 | 20 | boolToDouble _ = 0.0 | 20 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
keithodulaigh/Hets | Common/Lexer.hs | gpl-2.0 | isNumber :: Token -> Bool
isNumber t = case tokStr t of
c : _ : _ -> isDigit c
_ -> False | 93 | isNumber :: Token -> Bool
isNumber t = case tokStr t of
c : _ : _ -> isDigit c
_ -> False | 93 | isNumber t = case tokStr t of
c : _ : _ -> isDigit c
_ -> False | 67 | false | true | 0 | 9 | 26 | 54 | 24 | 30 | null | null |
gallais/conkysh | src/Draw/Window.hs | gpl-2.0 | getSize :: Display -> Drawable -> IO (Dimension, Dimension)
getSize dpy win = select <$> getGeometry dpy win
where select (_,_,_,x,y,_,_) = (x, y)
-- ALIGNING WINDOWS | 169 | getSize :: Display -> Drawable -> IO (Dimension, Dimension)
getSize dpy win = select <$> getGeometry dpy win
where select (_,_,_,x,y,_,_) = (x, y)
-- ALIGNING WINDOWS | 169 | getSize dpy win = select <$> getGeometry dpy win
where select (_,_,_,x,y,_,_) = (x, y)
-- ALIGNING WINDOWS | 109 | false | true | 0 | 8 | 29 | 86 | 46 | 40 | null | null |
tjakway/ghcjvm | compiler/stranal/DmdAnal.hs | bsd-3-clause | dmdAnalTopBind sigs (Rec pairs)
= (sigs', Rec pairs')
where
(sigs', _, pairs') = dmdFix TopLevel sigs pairs
-- We get two iterations automatically
-- c.f. the NonRec case above
{-
************************************************************************
* ... | 1,357 | dmdAnalTopBind sigs (Rec pairs)
= (sigs', Rec pairs')
where
(sigs', _, pairs') = dmdFix TopLevel sigs pairs
-- We get two iterations automatically
-- c.f. the NonRec case above
{-
************************************************************************
* ... | 1,357 | dmdAnalTopBind sigs (Rec pairs)
= (sigs', Rec pairs')
where
(sigs', _, pairs') = dmdFix TopLevel sigs pairs
-- We get two iterations automatically
-- c.f. the NonRec case above
{-
************************************************************************
* ... | 1,357 | false | false | 0 | 7 | 418 | 56 | 31 | 25 | null | null |
individkid/sidegeo | src/AffTopo/Naive.hs | gpl-3.0 | -- return region from per boundary side
regionOfSides :: [Side] -> Space -> Region
regionOfSides r s = let [x] = (regionOfSidesF r s) in x | 138 | regionOfSides :: [Side] -> Space -> Region
regionOfSides r s = let [x] = (regionOfSidesF r s) in x | 98 | regionOfSides r s = let [x] = (regionOfSidesF r s) in x | 55 | true | true | 0 | 10 | 25 | 51 | 26 | 25 | null | null |
wxwxwwxxx/ghc | compiler/main/DynFlags.hs | bsd-3-clause | unSetGeneralFlag' :: GeneralFlag -> DynFlags -> DynFlags
unSetGeneralFlag' f dflags = gopt_unset dflags f | 105 | unSetGeneralFlag' :: GeneralFlag -> DynFlags -> DynFlags
unSetGeneralFlag' f dflags = gopt_unset dflags f | 105 | unSetGeneralFlag' f dflags = gopt_unset dflags f | 48 | false | true | 0 | 6 | 13 | 33 | 15 | 18 | null | null |
jtapolczai/wumpus | Agent/Intelligent/Affect/Fragments.hs | apache-2.0 | plantHere :: NodeName -- ^Prefix for the created nodes.
-> Rational -- ^Max. health of the agent.
-> AreaFilter
plantHere name v circ = do
(nodes, outNodes) <- entityHereFilt name circ [plant]
(li, lowHealth) <- indG AMNHaveHealth $ mkFNs (name ++ "_HaveHealth") (NodeLT _AMHaveHealth v) $ map ... | 728 | plantHere :: NodeName -- ^Prefix for the created nodes.
-> Rational -- ^Max. health of the agent.
-> AreaFilter
plantHere name v circ = do
(nodes, outNodes) <- entityHereFilt name circ [plant]
(li, lowHealth) <- indG AMNHaveHealth $ mkFNs (name ++ "_HaveHealth") (NodeLT _AMHaveHealth v) $ map ... | 728 | plantHere name v circ = do
(nodes, outNodes) <- entityHereFilt name circ [plant]
(li, lowHealth) <- indG AMNHaveHealth $ mkFNs (name ++ "_HaveHealth") (NodeLT _AMHaveHealth v) $ map (,1) $ HS.toList outNodes
let nodes' = HS.foldl' (\acc i -> acc & ix i . threshold . _Wrapped +~ 1) nodes outNodes
--let nod... | 596 | false | true | 0 | 17 | 163 | 211 | 110 | 101 | null | null |
s9gf4ult/yesod | yesod-core/test/YesodCoreTest/Cache.hs | mit | cacheTest :: Spec
cacheTest =
describe "Test.Cache" $ do
it "cached" $ runner $ do
res <- request defaultRequest
assertStatus 200 res
assertBody (L8.pack $ show [1, 1, 2, 2 :: Int]) res
it "cachedBy" $ runner $ do
res <- request defaultRequest { pathInfo = ["key"] }
assertStatus... | 750 | cacheTest :: Spec
cacheTest =
describe "Test.Cache" $ do
it "cached" $ runner $ do
res <- request defaultRequest
assertStatus 200 res
assertBody (L8.pack $ show [1, 1, 2, 2 :: Int]) res
it "cachedBy" $ runner $ do
res <- request defaultRequest { pathInfo = ["key"] }
assertStatus... | 750 | cacheTest =
describe "Test.Cache" $ do
it "cached" $ runner $ do
res <- request defaultRequest
assertStatus 200 res
assertBody (L8.pack $ show [1, 1, 2, 2 :: Int]) res
it "cachedBy" $ runner $ do
res <- request defaultRequest { pathInfo = ["key"] }
assertStatus 200 res
ass... | 732 | false | true | 0 | 15 | 210 | 307 | 150 | 157 | null | null |
Helkafen/cabal | cabal-install/Distribution/Client/Setup.hs | bsd-3-clause | win32SelfUpgradeCommand :: CommandUI Win32SelfUpgradeFlags
win32SelfUpgradeCommand = CommandUI {
commandName = "win32selfupgrade",
commandSynopsis = "Self-upgrade the executable on Windows",
commandDescription = Nothing,
commandNotes = Nothing,
commandUsage = \pname ->
"Usage: "... | 567 | win32SelfUpgradeCommand :: CommandUI Win32SelfUpgradeFlags
win32SelfUpgradeCommand = CommandUI {
commandName = "win32selfupgrade",
commandSynopsis = "Self-upgrade the executable on Windows",
commandDescription = Nothing,
commandNotes = Nothing,
commandUsage = \pname ->
"Usage: "... | 567 | win32SelfUpgradeCommand = CommandUI {
commandName = "win32selfupgrade",
commandSynopsis = "Self-upgrade the executable on Windows",
commandDescription = Nothing,
commandNotes = Nothing,
commandUsage = \pname ->
"Usage: " ++ pname ++ " win32selfupgrade PID PATH\n",
commandDefau... | 508 | false | true | 1 | 14 | 124 | 106 | 61 | 45 | null | null |
jasonbaker/lang | Lang/Parser.hs | bsd-3-clause | identifier= P.identifier lexer | 30 | identifier= P.identifier lexer | 30 | identifier= P.identifier lexer | 30 | false | false | 0 | 6 | 2 | 11 | 5 | 6 | null | null |
leshchevds/ganeti | test/hs/Test/Ganeti/TestCommon.hs | bsd-2-clause | genLuxiTagName _ = genFQDN | 26 | genLuxiTagName _ = genFQDN | 26 | genLuxiTagName _ = genFQDN | 26 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
brendanhay/gogol | gogol-bigtableadmin/gen/Network/Google/BigtableAdmin/Types/Product.hs | mpl-2.0 | tcsAddtional :: Lens' TableClusterStates (HashMap Text ClusterState)
tcsAddtional
= lens _tcsAddtional (\ s a -> s{_tcsAddtional = a})
. _Coerce | 152 | tcsAddtional :: Lens' TableClusterStates (HashMap Text ClusterState)
tcsAddtional
= lens _tcsAddtional (\ s a -> s{_tcsAddtional = a})
. _Coerce | 152 | tcsAddtional
= lens _tcsAddtional (\ s a -> s{_tcsAddtional = a})
. _Coerce | 83 | false | true | 0 | 10 | 27 | 53 | 27 | 26 | null | null |
brendanhay/gogol | gogol-sheets/gen/Network/Google/Sheets/Types/Product.hs | mpl-2.0 | -- | Color to be used, in case baseline value represents a negative change
-- for key value. This field is optional. If negative_color is also set,
-- this field takes precedence.
bvfNegativeColorStyle :: Lens' BaselineValueFormat (Maybe ColorStyle)
bvfNegativeColorStyle
= lens _bvfNegativeColorStyle
(\ s a -> ... | 350 | bvfNegativeColorStyle :: Lens' BaselineValueFormat (Maybe ColorStyle)
bvfNegativeColorStyle
= lens _bvfNegativeColorStyle
(\ s a -> s{_bvfNegativeColorStyle = a}) | 170 | bvfNegativeColorStyle
= lens _bvfNegativeColorStyle
(\ s a -> s{_bvfNegativeColorStyle = a}) | 100 | true | true | 1 | 9 | 56 | 53 | 27 | 26 | null | null |
snoyberg/ghc | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | emitCopyArray :: (CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr -> ByteOff
-> FCode ()) -- ^ copy function
-> CmmExpr -- ^ source array
-> CmmExpr -- ^ offset in source array
-> CmmExpr -- ^ destination array
-> CmmExpr --... | 1,426 | emitCopyArray :: (CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr -> ByteOff
-> FCode ()) -- ^ copy function
-> CmmExpr -- ^ source array
-> CmmExpr -- ^ offset in source array
-> CmmExpr -- ^ destination array
-> CmmExpr --... | 1,426 | emitCopyArray copy src0 src_off dst0 dst_off0 n = do
dflags <- getDynFlags
when (n /= 0) $ do
-- Passed as arguments (be careful)
src <- assignTempE src0
dst <- assignTempE dst0
dst_off <- assignTempE dst_off0
-- Set the dirty bit in the header.
emit (set... | 985 | false | true | 0 | 16 | 505 | 310 | 147 | 163 | null | null |
snoyberg/ghc | compiler/simplCore/CallArity.hs | bsd-3-clause | resDel :: Var -> CallArityRes -> CallArityRes
resDel v (g, ae) = (g `delNode` v, ae `delVarEnv` v) | 98 | resDel :: Var -> CallArityRes -> CallArityRes
resDel v (g, ae) = (g `delNode` v, ae `delVarEnv` v) | 98 | resDel v (g, ae) = (g `delNode` v, ae `delVarEnv` v) | 52 | false | true | 0 | 6 | 17 | 48 | 28 | 20 | null | null |
gridaphobe/ghc | compiler/coreSyn/CoreUtils.hs | bsd-3-clause | -- Hopefully coercions are not too big!
exprIsBig (Tick _ e) = exprIsBig e | 76 | exprIsBig (Tick _ e) = exprIsBig e | 36 | exprIsBig (Tick _ e) = exprIsBig e | 36 | true | false | 0 | 7 | 15 | 21 | 10 | 11 | null | null |
DavidAlphaFox/darcs | src/Darcs/UI/Options/Markdown.hs | gpl-2.0 | optionMarkdown (Compose (Option a b (ReqArg _ arg) h)) = unlines
[ "<tr>", "<td>", showShortOptionsMd a, "</td>"
, "<td>", showLongOptionsMd (map (++(' ' : arg)) b), "</td>"
, "<td>", h, "</td>", "</tr>" ] | 224 | optionMarkdown (Compose (Option a b (ReqArg _ arg) h)) = unlines
[ "<tr>", "<td>", showShortOptionsMd a, "</td>"
, "<td>", showLongOptionsMd (map (++(' ' : arg)) b), "</td>"
, "<td>", h, "</td>", "</tr>" ] | 224 | optionMarkdown (Compose (Option a b (ReqArg _ arg) h)) = unlines
[ "<tr>", "<td>", showShortOptionsMd a, "</td>"
, "<td>", showLongOptionsMd (map (++(' ' : arg)) b), "</td>"
, "<td>", h, "</td>", "</tr>" ] | 224 | false | false | 0 | 11 | 51 | 96 | 53 | 43 | null | null |
paul-rouse/persistent | persistent-mongoDB/Database/Persist/MongoDB.hs | mit | fld `addToSet` val = backendArrayOperation MongoAddToSet fld val | 64 | fld `addToSet` val = backendArrayOperation MongoAddToSet fld val | 64 | fld `addToSet` val = backendArrayOperation MongoAddToSet fld val | 64 | false | false | 0 | 5 | 7 | 24 | 11 | 13 | null | null |
jamshidh/ethereum-query | src/Init.hs | bsd-3-clause | --import Debug.Trace
formatBlock::Block->String
formatBlock = format | 69 | formatBlock::Block->String
formatBlock = format | 47 | formatBlock = format | 20 | true | true | 0 | 5 | 6 | 16 | 9 | 7 | null | null |
brendanhay/gogol | gogol-cloudkms/gen/Network/Google/Resource/CloudKMS/Projects/Locations/KeyRings/CryptoKeys/CryptoKeyVersions/List.hs | mpl-2.0 | -- | JSONP
plkrckckvlCallback :: Lens' ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsList (Maybe Text)
plkrckckvlCallback
= lens _plkrckckvlCallback
(\ s a -> s{_plkrckckvlCallback = a}) | 200 | plkrckckvlCallback :: Lens' ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsList (Maybe Text)
plkrckckvlCallback
= lens _plkrckckvlCallback
(\ s a -> s{_plkrckckvlCallback = a}) | 189 | plkrckckvlCallback
= lens _plkrckckvlCallback
(\ s a -> s{_plkrckckvlCallback = a}) | 91 | true | true | 0 | 9 | 27 | 48 | 25 | 23 | null | null |
beni55/haste-compiler | libraries/ghc-7.8/base/System/Exit.hs | bsd-3-clause | exitWith code@(ExitFailure n)
| n /= 0 = throwIO code
#ifdef __GLASGOW_HASKELL__
| otherwise = ioError (IOError Nothing InvalidArgument "exitWith" "ExitFailure 0" Nothing Nothing) | 183 | exitWith code@(ExitFailure n)
| n /= 0 = throwIO code
#ifdef __GLASGOW_HASKELL__
| otherwise = ioError (IOError Nothing InvalidArgument "exitWith" "ExitFailure 0" Nothing Nothing) | 183 | exitWith code@(ExitFailure n)
| n /= 0 = throwIO code
#ifdef __GLASGOW_HASKELL__
| otherwise = ioError (IOError Nothing InvalidArgument "exitWith" "ExitFailure 0" Nothing Nothing) | 183 | false | false | 0 | 8 | 27 | 67 | 30 | 37 | null | null |
Noeda/dfterm3 | src/Dfterm3/CP437ToUnicode.hs | isc | cp437ToUnicode 148 = '\x00f6' | 29 | cp437ToUnicode 148 = '\x00f6' | 29 | cp437ToUnicode 148 = '\x00f6' | 29 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
brendanhay/gogol | gogol-docs/gen/Network/Google/Docs/Types/Product.hs | mpl-2.0 | -- | The amount of space between lines, as a percentage of normal, where
-- normal is represented as 100.0. If unset, the value is inherited from
-- the parent.
psLineSpacing :: Lens' ParagraphStyle (Maybe Double)
psLineSpacing
= lens _psLineSpacing
(\ s a -> s{_psLineSpacing = a})
. mapping _Coerce | 314 | psLineSpacing :: Lens' ParagraphStyle (Maybe Double)
psLineSpacing
= lens _psLineSpacing
(\ s a -> s{_psLineSpacing = a})
. mapping _Coerce | 153 | psLineSpacing
= lens _psLineSpacing
(\ s a -> s{_psLineSpacing = a})
. mapping _Coerce | 100 | true | true | 0 | 10 | 63 | 57 | 30 | 27 | null | null |
soupi/hablog | src/Web/Hablog/Html.hs | mit | pagePage :: Config -> Page.Page -> H.Html
pagePage cfg page =
template
cfg
(Page.pagePreview page)
True
(Page.pageName page)
(Page.pageURL page)
(pageContent page) | 189 | pagePage :: Config -> Page.Page -> H.Html
pagePage cfg page =
template
cfg
(Page.pagePreview page)
True
(Page.pageName page)
(Page.pageURL page)
(pageContent page) | 189 | pagePage cfg page =
template
cfg
(Page.pagePreview page)
True
(Page.pageName page)
(Page.pageURL page)
(pageContent page) | 147 | false | true | 0 | 7 | 47 | 76 | 35 | 41 | null | null |
ciderpunx/rsstwit | src/Cli.hs | gpl-3.0 | main :: IO ()
main = join $ execParser (info opts idm) | 54 | main :: IO ()
main = join $ execParser (info opts idm) | 54 | main = join $ execParser (info opts idm) | 40 | false | true | 0 | 8 | 11 | 31 | 15 | 16 | null | null |
rueshyna/gogol | gogol-spectrum/gen/Network/Google/Spectrum/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'GeoSpectrumSchedule' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'gssLocation'
--
-- * 'gssSpectrumSchedules'
geoSpectrumSchedule
:: GeoSpectrumSchedule
geoSpectrumSchedule =
GeoSpectrumSchedule'
... | 390 | geoSpectrumSchedule
:: GeoSpectrumSchedule
geoSpectrumSchedule =
GeoSpectrumSchedule'
{ _gssLocation = Nothing
, _gssSpectrumSchedules = Nothing
} | 166 | geoSpectrumSchedule =
GeoSpectrumSchedule'
{ _gssLocation = Nothing
, _gssSpectrumSchedules = Nothing
} | 119 | true | true | 0 | 7 | 72 | 42 | 24 | 18 | null | null |
Airtnp/Freshman_Simple_Haskell_Lib | Idioms/Collaborative-filtering.hs | mit | -- This is a modified version of predict. It also expect the
-- unnormalized SlopeOne' but this is a small detail
predict' :: Ord a => SlopeOne' a -> Rating a -> Rating a
predict' (SlopeOne' matrixIn) userRatings =
M.mapMaybe calcItem (M.difference matrixIn userRatings)
where calcItem innerMap | M.null combined ... | 767 | predict' :: Ord a => SlopeOne' a -> Rating a -> Rating a
predict' (SlopeOne' matrixIn) userRatings =
M.mapMaybe calcItem (M.difference matrixIn userRatings)
where calcItem innerMap | M.null combined = Nothing
| norm_rating <= 0 = Nothing
| otherwise = Just norm_... | 652 | predict' (SlopeOne' matrixIn) userRatings =
M.mapMaybe calcItem (M.difference matrixIn userRatings)
where calcItem innerMap | M.null combined = Nothing
| norm_rating <= 0 = Nothing
| otherwise = Just norm_rating
where combined = M.intersectionWith weig... | 595 | true | true | 4 | 11 | 211 | 213 | 98 | 115 | null | null |
cordawyn/rdf4h | src/Text/RDF/RDF4H/Interact.hs | bsd-3-clause | -- Handle the result of an IO parse by returning the graph if parse was successful
-- and calling 'error' with the 'ParseFailure' error message if unsuccessful.
_handle :: forall rdf. (RDF rdf) => Either ParseFailure rdf -> IO rdf
_handle = either (error . show) return | 269 | _handle :: forall rdf. (RDF rdf) => Either ParseFailure rdf -> IO rdf
_handle = either (error . show) return | 108 | _handle = either (error . show) return | 38 | true | true | 0 | 9 | 46 | 57 | 28 | 29 | null | null |
mway08/thrift | test/hs/TestServer.hs | apache-2.0 | main :: IO ()
main = do
options <- flip parseFlags defaultOptions <$> getArgs
case options of
Nothing -> showHelp
Just Options{..} -> do
System.IO.putStrLn $ "Starting \"" ++ show serverType ++ "\" server (" ++
show transport ++ ") listen on: " ++ domainSocket ++ show port
case protocol ... | 678 | main :: IO ()
main = do
options <- flip parseFlags defaultOptions <$> getArgs
case options of
Nothing -> showHelp
Just Options{..} -> do
System.IO.putStrLn $ "Starting \"" ++ show serverType ++ "\" server (" ++
show transport ++ ") listen on: " ++ domainSocket ++ show port
case protocol ... | 678 | main = do
options <- flip parseFlags defaultOptions <$> getArgs
case options of
Nothing -> showHelp
Just Options{..} -> do
System.IO.putStrLn $ "Starting \"" ++ show serverType ++ "\" server (" ++
show transport ++ ") listen on: " ++ domainSocket ++ show port
case protocol of
Bin... | 664 | false | true | 0 | 19 | 196 | 223 | 105 | 118 | null | null |
AndrewRademacher/stack | src/Stack/Types/Config.hs | bsd-3-clause | minimalEnvSettings :: EnvSettings
minimalEnvSettings =
EnvSettings
{ esIncludeLocals = False
, esIncludeGhcPackagePath = False
, esStackExe = False
, esLocaleUtf8 = False
} | 196 | minimalEnvSettings :: EnvSettings
minimalEnvSettings =
EnvSettings
{ esIncludeLocals = False
, esIncludeGhcPackagePath = False
, esStackExe = False
, esLocaleUtf8 = False
} | 196 | minimalEnvSettings =
EnvSettings
{ esIncludeLocals = False
, esIncludeGhcPackagePath = False
, esStackExe = False
, esLocaleUtf8 = False
} | 162 | false | true | 0 | 6 | 46 | 37 | 23 | 14 | null | null |
tel/saltine | src/Crypto/Saltine/Internal/Password.hs | mit | -- | Minimum allowed memory limit for password hashing
pwhash_memlimit_min :: Int
pwhash_memlimit_min = fromIntegral c_crypto_pwhash_memlimit_min | 145 | pwhash_memlimit_min :: Int
pwhash_memlimit_min = fromIntegral c_crypto_pwhash_memlimit_min | 90 | pwhash_memlimit_min = fromIntegral c_crypto_pwhash_memlimit_min | 63 | true | true | 0 | 5 | 15 | 15 | 8 | 7 | null | null |
bjpop/berp | libs/src/Berp/Base/StdNames.hs | bsd-3-clause | addName :: Hashed String
addName = hashedStr "add" | 50 | addName :: Hashed String
addName = hashedStr "add" | 50 | addName = hashedStr "add" | 25 | false | true | 0 | 5 | 7 | 17 | 8 | 9 | null | null |
qrilka/xlsx | src/Codec/Xlsx/Types/Internal/ContentTypes.hs | mit | contentTypesNs :: Text
contentTypesNs = "http://schemas.openxmlformats.org/package/2006/content-types" | 102 | contentTypesNs :: Text
contentTypesNs = "http://schemas.openxmlformats.org/package/2006/content-types" | 102 | contentTypesNs = "http://schemas.openxmlformats.org/package/2006/content-types" | 79 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
dalonng/hellos | haskell.hello/quickSort.hs | gpl-2.0 | ] = [x]
q | 9 | [x] = [x] | 9 | [x] = [x] | 9 | false | false | 1 | 5 | 3 | 14 | 6 | 8 | null | null |
uebayasi/haskell-graphql-schema | src/Data/GraphQL/XXX/Schema/Lexer.hs | bsd-3-clause | delim :: Char -> Parser ()
delim c = spaces *> char c *> spaces | 63 | delim :: Char -> Parser ()
delim c = spaces *> char c *> spaces | 63 | delim c = spaces *> char c *> spaces | 36 | false | true | 0 | 7 | 14 | 34 | 16 | 18 | null | null |
robeverest/accelerate | Data/Array/Accelerate/Trafo/Common.hs | bsd-3-clause | prjExp _ _ = INTERNAL_ERROR(error) "prjExp" "inconsistent valuation" | 93 | prjExp _ _ = INTERNAL_ERROR(error) "prjExp" "inconsistent valuation" | 93 | prjExp _ _ = INTERNAL_ERROR(error) "prjExp" "inconsistent valuation" | 93 | false | false | 1 | 6 | 32 | 21 | 10 | 11 | null | null |
phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/Tokens.hs | bsd-3-clause | gl_DRAW_BUFFER6 :: GLenum
gl_DRAW_BUFFER6 = 0x882B | 50 | gl_DRAW_BUFFER6 :: GLenum
gl_DRAW_BUFFER6 = 0x882B | 50 | gl_DRAW_BUFFER6 = 0x882B | 24 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.