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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
irreverent-pixel-feats/bitbucket | bitbucket-http-client/src/Irreverent/Bitbucket/Http/Repositories/Pipelines/GetEnvironmentVariables.hs | bsd-3-clause | getPipelineEnvironmentVariables
:: (MonadCatch m, MonadIO m)
=> S.Session
-> Username
-> RepoName
-> EitherT BitbucketAPIError (BitbucketT m) [PipelinesEnvironmentVariable]
getPipelineEnvironmentVariables sess owner repo = join <$> (pipelineEnvConduit sess owner repo $$ C.consume) | 291 | getPipelineEnvironmentVariables
:: (MonadCatch m, MonadIO m)
=> S.Session
-> Username
-> RepoName
-> EitherT BitbucketAPIError (BitbucketT m) [PipelinesEnvironmentVariable]
getPipelineEnvironmentVariables sess owner repo = join <$> (pipelineEnvConduit sess owner repo $$ C.consume) | 291 | getPipelineEnvironmentVariables sess owner repo = join <$> (pipelineEnvConduit sess owner repo $$ C.consume) | 108 | false | true | 0 | 12 | 40 | 88 | 43 | 45 | null | null |
thulishuang/Compiler | src/Parser.hs | bsd-3-clause | eval (Ge p q) env = ExprBool ((evalDou (eval p env)) >= (evalDou (eval q env))) | 79 | eval (Ge p q) env = ExprBool ((evalDou (eval p env)) >= (evalDou (eval q env))) | 79 | eval (Ge p q) env = ExprBool ((evalDou (eval p env)) >= (evalDou (eval q env))) | 79 | false | false | 0 | 11 | 15 | 57 | 28 | 29 | null | null |
sebadoom/mpvguihs | MpvPlayer/Backend.hs | gpl-3.0 | buildArgs :: Word32 -> FilePath -> FilePath -> String -> [String]
buildArgs wid fifo filename extraArgs = filter (not . null) $
["--wid=" ++ (printf "0x%x" wid),
"--input-file=" ++ fifo,
"--status-msg=",
extraArgs,
filename] | 241 | buildArgs :: Word32 -> FilePath -> FilePath -> String -> [String]
buildArgs wid fifo filename extraArgs = filter (not . null) $
["--wid=" ++ (printf "0x%x" wid),
"--input-file=" ++ fifo,
"--status-msg=",
extraArgs,
filename] | 241 | buildArgs wid fifo filename extraArgs = filter (not . null) $
["--wid=" ++ (printf "0x%x" wid),
"--input-file=" ++ fifo,
"--status-msg=",
extraArgs,
filename] | 175 | false | true | 0 | 9 | 49 | 84 | 45 | 39 | null | null |
rickerbh/AoC | AoC2016/src/Frequency.hs | mit | frequencySort :: (Ord k, Ord a) => [(k, a)] -> [(k, a)]
frequencySort xs = reverse $ reverseFrequencySort xs | 108 | frequencySort :: (Ord k, Ord a) => [(k, a)] -> [(k, a)]
frequencySort xs = reverse $ reverseFrequencySort xs | 108 | frequencySort xs = reverse $ reverseFrequencySort xs | 52 | false | true | 0 | 8 | 18 | 58 | 32 | 26 | null | null |
nikita-volkov/hasql | library/Hasql/Private/PreparedStatementRegistry.hs | mit | new :: IO PreparedStatementRegistry
new =
PreparedStatementRegistry <$> A.new <*> newIORef 0 | 94 | new :: IO PreparedStatementRegistry
new =
PreparedStatementRegistry <$> A.new <*> newIORef 0 | 94 | new =
PreparedStatementRegistry <$> A.new <*> newIORef 0 | 58 | false | true | 2 | 6 | 13 | 33 | 14 | 19 | null | null |
QuickChick/Luck | luck/src/Core/Optimizations.hs | mit | inlineExp :: Exp -> Inliner Exp
inlineExp (Var x) = pure $ Var x | 64 | inlineExp :: Exp -> Inliner Exp
inlineExp (Var x) = pure $ Var x | 64 | inlineExp (Var x) = pure $ Var x | 32 | false | true | 0 | 7 | 13 | 34 | 16 | 18 | null | null |
CindyLinz/Haskell.js | trans/src/Desugar/LambdaCase.hs | mit | deLambdaCaseDeclHead :: DeclHead l -> DeclHead l
deLambdaCaseDeclHead (DHead l name) = DHead (id l) (deLambdaCaseName name) | 123 | deLambdaCaseDeclHead :: DeclHead l -> DeclHead l
deLambdaCaseDeclHead (DHead l name) = DHead (id l) (deLambdaCaseName name) | 123 | deLambdaCaseDeclHead (DHead l name) = DHead (id l) (deLambdaCaseName name) | 74 | false | true | 0 | 7 | 16 | 49 | 23 | 26 | null | null |
Vetii/SCFDMA | src/Bucket.hs | mit | toList :: Bucket -> [Label]
toList (Bucket l) = l | 49 | toList :: Bucket -> [Label]
toList (Bucket l) = l | 49 | toList (Bucket l) = l | 21 | false | true | 0 | 6 | 9 | 31 | 15 | 16 | null | null |
nfjinjing/mps | src/MPS/Math/Six.hs | bsd-3-clause | -- 15 different ways to pick three disjoint duads from [1..6]
synthemes = [ [d1,d2,d3] | d1 <- duads,
d2 <- duads, d2 > d1, disjoint d1 d2,
d3 <- duads, d3 > d2, disjoint (d1++d2) d3 ] | 241 | synthemes = [ [d1,d2,d3] | d1 <- duads,
d2 <- duads, d2 > d1, disjoint d1 d2,
d3 <- duads, d3 > d2, disjoint (d1++d2) d3 ] | 178 | synthemes = [ [d1,d2,d3] | d1 <- duads,
d2 <- duads, d2 > d1, disjoint d1 d2,
d3 <- duads, d3 > d2, disjoint (d1++d2) d3 ] | 178 | true | false | 1 | 10 | 94 | 88 | 44 | 44 | null | null |
CarstenKoenig/AdventOfCode2016 | Day21/Parser.hs | mit | parseAlpha :: Parser Char
parseAlpha = parseChar isAlpha | 56 | parseAlpha :: Parser Char
parseAlpha = parseChar isAlpha | 56 | parseAlpha = parseChar isAlpha | 30 | false | true | 0 | 6 | 7 | 23 | 9 | 14 | null | null |
josefs/autosar | oldARSim/ARSim.hs | bsd-3-clause | say (IRVW _ _) (RInst a n c ex (IrvWrite _ _ cont)) = [RInst a n c ex (cont void)] | 90 | say (IRVW _ _) (RInst a n c ex (IrvWrite _ _ cont)) = [RInst a n c ex (cont void)] | 90 | say (IRVW _ _) (RInst a n c ex (IrvWrite _ _ cont)) = [RInst a n c ex (cont void)] | 90 | false | false | 1 | 9 | 28 | 66 | 31 | 35 | null | null |
rahulmutt/ghcvm | tests/suite/array/run/Arr016/Arr016.hs | bsd-3-clause | prop_indices =
forAll genBounds $ \ (b :: (Int,Int)) ->
forAll (genIVPs b 10) $ \ (vs :: [(Int,Int)]) ->
let arr = Array.array b vs
in Array.indices arr == ((Array.range . Array.bounds) arr) | 220 | prop_indices =
forAll genBounds $ \ (b :: (Int,Int)) ->
forAll (genIVPs b 10) $ \ (vs :: [(Int,Int)]) ->
let arr = Array.array b vs
in Array.indices arr == ((Array.range . Array.bounds) arr) | 220 | prop_indices =
forAll genBounds $ \ (b :: (Int,Int)) ->
forAll (genIVPs b 10) $ \ (vs :: [(Int,Int)]) ->
let arr = Array.array b vs
in Array.indices arr == ((Array.range . Array.bounds) arr) | 220 | false | false | 0 | 16 | 63 | 111 | 58 | 53 | null | null |
sdiehl/ghc | testsuite/tests/codeGen/should_run/T16846.hs | bsd-3-clause | effect :: STM a -> Free SuspendF a
effect a = Free $ StepSTM a | 62 | effect :: STM a -> Free SuspendF a
effect a = Free $ StepSTM a | 62 | effect a = Free $ StepSTM a | 27 | false | true | 0 | 6 | 14 | 36 | 16 | 20 | null | null |
brendanhay/gogol | gogol-compute/gen/Network/Google/Resource/Compute/Subnetworks/Get.hs | mpl-2.0 | -- | Name of the Subnetwork resource to return.
sgSubnetwork :: Lens' SubnetworksGet Text
sgSubnetwork
= lens _sgSubnetwork (\ s a -> s{_sgSubnetwork = a}) | 157 | sgSubnetwork :: Lens' SubnetworksGet Text
sgSubnetwork
= lens _sgSubnetwork (\ s a -> s{_sgSubnetwork = a}) | 109 | sgSubnetwork
= lens _sgSubnetwork (\ s a -> s{_sgSubnetwork = a}) | 67 | true | true | 0 | 9 | 26 | 42 | 22 | 20 | null | null |
rwbarton/rw | Crawl/Status.hs | bsd-3-clause | canBiA :: Player -> Bool
canBiA p = canUseGodAbility "Trog" 4 p | 63 | canBiA :: Player -> Bool
canBiA p = canUseGodAbility "Trog" 4 p | 63 | canBiA p = canUseGodAbility "Trog" 4 p | 38 | false | true | 0 | 5 | 11 | 25 | 12 | 13 | null | null |
lessrest/koko | src/Koko/Types.hs | gpl-3.0 | noAnn :: Ann
noAnn = Ann Nothing | 32 | noAnn :: Ann
noAnn = Ann Nothing | 32 | noAnn = Ann Nothing | 19 | false | true | 0 | 5 | 6 | 14 | 7 | 7 | null | null |
yiannist/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | luxiReqQueryNodes :: String
luxiReqQueryNodes = "QueryNodes" | 60 | luxiReqQueryNodes :: String
luxiReqQueryNodes = "QueryNodes" | 60 | luxiReqQueryNodes = "QueryNodes" | 32 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
TorosFanny/kaleidoscope | src/chapter4/Lexer.hs | mit | integer = Tok.integer lexer | 30 | integer = Tok.integer lexer | 30 | integer = Tok.integer lexer | 30 | false | false | 0 | 6 | 6 | 11 | 5 | 6 | null | null |
thumbtack/datadog-petshop | src/Main.hs | bsd-3-clause | loadKeysFromEnv :: IO (String,String)
loadKeysFromEnv = do
api <- getEnv "DATADOG_API_KEY"
app <- getEnv "DATADOG_APP_KEY"
return (api,app) | 145 | loadKeysFromEnv :: IO (String,String)
loadKeysFromEnv = do
api <- getEnv "DATADOG_API_KEY"
app <- getEnv "DATADOG_APP_KEY"
return (api,app) | 145 | loadKeysFromEnv = do
api <- getEnv "DATADOG_API_KEY"
app <- getEnv "DATADOG_APP_KEY"
return (api,app) | 107 | false | true | 1 | 9 | 22 | 56 | 25 | 31 | null | null |
haasn/vimus | src/Vimus/Type.hs | mit | -- | Set path to music library.
--
-- This is need, if you want to use %-expansion in commands.
setLibraryPath :: FilePath -> Vimus ()
setLibraryPath path = liftIO (expandHome path) >>= either printError set
where
set p = modify (\state -> state {libraryPath = Just p})
-- | Set the @autotitle@ option. | 309 | setLibraryPath :: FilePath -> Vimus ()
setLibraryPath path = liftIO (expandHome path) >>= either printError set
where
set p = modify (\state -> state {libraryPath = Just p})
-- | Set the @autotitle@ option. | 213 | setLibraryPath path = liftIO (expandHome path) >>= either printError set
where
set p = modify (\state -> state {libraryPath = Just p})
-- | Set the @autotitle@ option. | 174 | true | true | 1 | 10 | 60 | 86 | 41 | 45 | null | null |
biegunka/biegunka | src/Control/Biegunka/Biegunka.hs | mit | getHome user = fmap Posix.homeDirectory (Posix.getUserEntryForName user) | 72 | getHome user = fmap Posix.homeDirectory (Posix.getUserEntryForName user) | 72 | getHome user = fmap Posix.homeDirectory (Posix.getUserEntryForName user) | 72 | false | false | 0 | 8 | 6 | 24 | 11 | 13 | null | null |
nevrenato/Hets_Fork | Common/Keywords.hs | gpl-2.0 | -- * Twelf conventions
-- non breaking space
whiteChars :: String
whiteChars = "\n\r\t\v\f \160" | 97 | whiteChars :: String
whiteChars = "\n\r\t\v\f \160" | 51 | whiteChars = "\n\r\t\v\f \160" | 30 | true | true | 0 | 4 | 15 | 13 | 8 | 5 | null | null |
diku-dk/futhark | src/Futhark/IR/TypeCheck.hs | isc | checkConsumption :: Consumption -> TypeM rep Occurences
checkConsumption (ConsumptionError e) = bad $ TypeError e | 113 | checkConsumption :: Consumption -> TypeM rep Occurences
checkConsumption (ConsumptionError e) = bad $ TypeError e | 113 | checkConsumption (ConsumptionError e) = bad $ TypeError e | 57 | false | true | 0 | 7 | 14 | 36 | 17 | 19 | null | null |
elieux/ghc | compiler/hsSyn/HsPat.hs | bsd-3-clause | hsPatNeedsParens (NPat {}) = False | 44 | hsPatNeedsParens (NPat {}) = False | 44 | hsPatNeedsParens (NPat {}) = False | 44 | false | false | 0 | 7 | 14 | 16 | 8 | 8 | null | null |
zeekay/lambdabot | Plugin/Free/Theorem.hs | mit | prettyTheorem p fa (ThImplies p1 p2)
= prettyParenIndent (p > precIMPLIES) (
prettyTheorem (precIMPLIES+1) True p1
$$ nest (-1) (text "=>")
$$ prettyTheorem precIMPLIES fa p2
) | 213 | prettyTheorem p fa (ThImplies p1 p2)
= prettyParenIndent (p > precIMPLIES) (
prettyTheorem (precIMPLIES+1) True p1
$$ nest (-1) (text "=>")
$$ prettyTheorem precIMPLIES fa p2
) | 213 | prettyTheorem p fa (ThImplies p1 p2)
= prettyParenIndent (p > precIMPLIES) (
prettyTheorem (precIMPLIES+1) True p1
$$ nest (-1) (text "=>")
$$ prettyTheorem precIMPLIES fa p2
) | 213 | false | false | 0 | 11 | 63 | 81 | 40 | 41 | null | null |
Peaker/FTGL | Graphics/Rendering/FTGL.hs | bsd-2-clause | marshalCharMap EncodingGB2312 = encodeTag 'g' 'b' ' ' ' ' | 57 | marshalCharMap EncodingGB2312 = encodeTag 'g' 'b' ' ' ' ' | 57 | marshalCharMap EncodingGB2312 = encodeTag 'g' 'b' ' ' ' ' | 57 | false | false | 0 | 5 | 9 | 18 | 8 | 10 | null | null |
imh/plover | src/Language/Plover/Types.hs | mit | numType :: Type
numType = NumType | 33 | numType :: Type
numType = NumType | 33 | numType = NumType | 17 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
kmate/HaRe | old/testing/introPattern/IrrefutableIn1_TokOut.hs | bsd-3-clause | f (~x@(b_1 : b_2)) = hd x | 25 | f (~x@(b_1 : b_2)) = hd x | 25 | f (~x@(b_1 : b_2)) = hd x | 25 | false | false | 0 | 9 | 6 | 27 | 13 | 14 | null | null |
cirquit/Personal-Repository | Haskell/svg-loading/.stack-work/dist/x86_64-linux-nopie/Cabal-1.24.2.0/build/autogen/Paths_svg_loading.hs | mit | getDynLibDir = catchIO (getEnv "svg_loading_dynlibdir") (\_ -> return dynlibdir) | 80 | getDynLibDir = catchIO (getEnv "svg_loading_dynlibdir") (\_ -> return dynlibdir) | 80 | getDynLibDir = catchIO (getEnv "svg_loading_dynlibdir") (\_ -> return dynlibdir) | 80 | false | false | 0 | 8 | 8 | 28 | 14 | 14 | null | null |
tychon/phrases | CryptoBackend.hs | mit | -- | Check StorageProps for sanity.
checkStorageProps StorageProps{..}
| version >= 1
, salt_length >= 16
, innersalt_length >= 16
, pbkdf2_rounds >= 150000
, pbkdf2_length >= 64
, BS.length salt == salt_length
, BS.length innersalt == innersalt_length
= True
| otherwise
= False | 303 | checkStorageProps StorageProps{..}
| version >= 1
, salt_length >= 16
, innersalt_length >= 16
, pbkdf2_rounds >= 150000
, pbkdf2_length >= 64
, BS.length salt == salt_length
, BS.length innersalt == innersalt_length
= True
| otherwise
= False | 267 | checkStorageProps StorageProps{..}
| version >= 1
, salt_length >= 16
, innersalt_length >= 16
, pbkdf2_rounds >= 150000
, pbkdf2_length >= 64
, BS.length salt == salt_length
, BS.length innersalt == innersalt_length
= True
| otherwise
= False | 267 | true | false | 0 | 10 | 67 | 96 | 45 | 51 | null | null |
mmhat/cblrepo | src/PkgDB.hs | apache-2.0 | isRepoPkg _ = False | 19 | isRepoPkg _ = False | 19 | isRepoPkg _ = False | 19 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
mariefarrell/Hets | Static/XSimplePath.hs | gpl-2.0 | isSentenceType :: Element -> Bool
isSentenceType e = isAxiomType e || isTheoremType e | 85 | isSentenceType :: Element -> Bool
isSentenceType e = isAxiomType e || isTheoremType e | 85 | isSentenceType e = isAxiomType e || isTheoremType e | 51 | false | true | 0 | 6 | 12 | 28 | 13 | 15 | null | null |
AubreyEAnderson/shellcheck | ShellCheck/Analytics.hs | gpl-3.0 | checkLiteralBreakingTest _ t = potentially $
case t of
(TC_Noary _ _ w@(T_NormalWord _ l)) -> do
guard . not $ isConstant w -- Covered by SC2078
comparisonWarning l `mplus` tautologyWarning w "Argument to implicit -n is always true due to literal strings."
... | 1,190 | checkLiteralBreakingTest _ t = potentially $
case t of
(TC_Noary _ _ w@(T_NormalWord _ l)) -> do
guard . not $ isConstant w -- Covered by SC2078
comparisonWarning l `mplus` tautologyWarning w "Argument to implicit -n is always true due to literal strings."
... | 1,190 | checkLiteralBreakingTest _ t = potentially $
case t of
(TC_Noary _ _ w@(T_NormalWord _ l)) -> do
guard . not $ isConstant w -- Covered by SC2078
comparisonWarning l `mplus` tautologyWarning w "Argument to implicit -n is always true due to literal strings."
... | 1,190 | false | false | 3 | 13 | 397 | 331 | 152 | 179 | null | null |
gcampax/ghc | compiler/types/FamInstEnv.hs | bsd-3-clause | -- Get the RHS of the FamInst
famInstRHS :: FamInst -> Type
famInstRHS = fi_rhs | 79 | famInstRHS :: FamInst -> Type
famInstRHS = fi_rhs | 49 | famInstRHS = fi_rhs | 19 | true | true | 0 | 5 | 14 | 16 | 9 | 7 | null | null |
turion/haskell-asteroids | src/Graphics.hs | mit | drawPoints :: [(GLfloat, GLfloat)] -> IO ()
drawPoints [] = do return () | 85 | drawPoints :: [(GLfloat, GLfloat)] -> IO ()
drawPoints [] = do return () | 85 | drawPoints [] = do return () | 41 | false | true | 0 | 8 | 25 | 42 | 21 | 21 | null | null |
ihc/futhark | src/Futhark/Optimise/InPlaceLowering.hs | isc | optimiseStms (bnd:bnds) m = do
(bnds', bup) <- tapBottomUp $ bindingStm bnd $ optimiseStms bnds m
bnd' <- optimiseInStm bnd
case filter ((`elem` boundHere) . updateValue) $
forwardThese bup of
[] -> checkIfForwardableUpdate bnd' bnds'
updates -> do
let updateStms = map updateStm updates
... | 1,365 | optimiseStms (bnd:bnds) m = do
(bnds', bup) <- tapBottomUp $ bindingStm bnd $ optimiseStms bnds m
bnd' <- optimiseInStm bnd
case filter ((`elem` boundHere) . updateValue) $
forwardThese bup of
[] -> checkIfForwardableUpdate bnd' bnds'
updates -> do
let updateStms = map updateStm updates
... | 1,365 | optimiseStms (bnd:bnds) m = do
(bnds', bup) <- tapBottomUp $ bindingStm bnd $ optimiseStms bnds m
bnd' <- optimiseInStm bnd
case filter ((`elem` boundHere) . updateValue) $
forwardThese bup of
[] -> checkIfForwardableUpdate bnd' bnds'
updates -> do
let updateStms = map updateStm updates
... | 1,365 | false | false | 9 | 22 | 505 | 403 | 195 | 208 | null | null |
gilith/hol | src/HOL/Print.hs | mit | ppSymbolName :: Name -> PP.Doc
ppSymbolName =
parenSymbol . showName
where
showName (Name ns s) = Name (showNamespace ns) s
showNamespace (Namespace ns) = Namespace (List.dropWhile isUpper ns)
isUpper [] = False
isUpper (c : _) = Char.isUpper c
parenSymbol n = (if isSymbol n then PP.parens el... | 597 | ppSymbolName :: Name -> PP.Doc
ppSymbolName =
parenSymbol . showName
where
showName (Name ns s) = Name (showNamespace ns) s
showNamespace (Namespace ns) = Namespace (List.dropWhile isUpper ns)
isUpper [] = False
isUpper (c : _) = Char.isUpper c
parenSymbol n = (if isSymbol n then PP.parens el... | 597 | ppSymbolName =
parenSymbol . showName
where
showName (Name ns s) = Name (showNamespace ns) s
showNamespace (Namespace ns) = Namespace (List.dropWhile isUpper ns)
isUpper [] = False
isUpper (c : _) = Char.isUpper c
parenSymbol n = (if isSymbol n then PP.parens else id) $ toDoc n
isSymbol (... | 566 | false | true | 0 | 9 | 100 | 177 | 89 | 88 | null | null |
ctford/Idris-Elba-dev | src/Idris/Core/Elaborate.hs | bsd-3-clause | initNextNameFrom :: [Name] -> Elab' aux ()
initNextNameFrom ns = do ES (p, a) s e <- get
let n' = maxName (nextname p) ns
put (ES (p { nextname = n' }, a) s e)
where
maxName m ((MN i _) : xs) = maxName (max m i) xs
maxName m (_ : xs) = maxName m xs
maxNam... | 334 | initNextNameFrom :: [Name] -> Elab' aux ()
initNextNameFrom ns = do ES (p, a) s e <- get
let n' = maxName (nextname p) ns
put (ES (p { nextname = n' }, a) s e)
where
maxName m ((MN i _) : xs) = maxName (max m i) xs
maxName m (_ : xs) = maxName m xs
maxNam... | 334 | initNextNameFrom ns = do ES (p, a) s e <- get
let n' = maxName (nextname p) ns
put (ES (p { nextname = n' }, a) s e)
where
maxName m ((MN i _) : xs) = maxName (max m i) xs
maxName m (_ : xs) = maxName m xs
maxName m [] = m + 1 | 291 | false | true | 0 | 12 | 130 | 183 | 88 | 95 | null | null |
vito/atomo | src/Atomo/Parser/Expand.hs | bsd-3-clause | -- | Defines a macro, given its pattern and expression.
addMacro :: Message Pattern -> Expr -> VM ()
addMacro p e =
modify $ \env -> env
{ parserState = (parserState env)
{ psMacros = withMacro (psMacros (parserState env))
}
}
where
withMacro ms =
case p of
... | 481 | addMacro :: Message Pattern -> Expr -> VM ()
addMacro p e =
modify $ \env -> env
{ parserState = (parserState env)
{ psMacros = withMacro (psMacros (parserState env))
}
}
where
withMacro ms =
case p of
Single {} ->
(addMethod (Macro p... | 425 | addMacro p e =
modify $ \env -> env
{ parserState = (parserState env)
{ psMacros = withMacro (psMacros (parserState env))
}
}
where
withMacro ms =
case p of
Single {} ->
(addMethod (Macro p e) (fst ms), snd ms)
Keyword {}... | 380 | true | true | 0 | 15 | 185 | 169 | 86 | 83 | null | null |
triplepointfive/soten | src/Codec/Soten/Parser/Md2Parser.hs | mit | -- | Parses a file content into model object.
load :: BS.ByteString -> Model
load fileContent = case decode (BS.take sizeOfHeader fileContent) of
Right header -> loadWithHeader (validateHeader header) fileContent
Left message -> throw $ DeadlyImporterError message
-- TODO: Validate offsetEnd with sizes * num +... | 372 | load :: BS.ByteString -> Model
load fileContent = case decode (BS.take sizeOfHeader fileContent) of
Right header -> loadWithHeader (validateHeader header) fileContent
Left message -> throw $ DeadlyImporterError message
-- TODO: Validate offsetEnd with sizes * num + offset of all structures
-- | Validates the h... | 326 | load fileContent = case decode (BS.take sizeOfHeader fileContent) of
Right header -> loadWithHeader (validateHeader header) fileContent
Left message -> throw $ DeadlyImporterError message
-- TODO: Validate offsetEnd with sizes * num + offset of all structures
-- | Validates the header. | 295 | true | true | 0 | 10 | 63 | 76 | 37 | 39 | null | null |
techtangents/ablist | src/Data/AbneList.hs | bsd-3-clause | aaneFromList :: [a] -> Maybe (AbneList a a)
aaneFromList = fromAbList . aaFromList | 82 | aaneFromList :: [a] -> Maybe (AbneList a a)
aaneFromList = fromAbList . aaFromList | 82 | aaneFromList = fromAbList . aaFromList | 38 | false | true | 0 | 8 | 12 | 33 | 17 | 16 | null | null |
fpoli/lambda | src/Lambda/Types/Bool.hs | gpl-3.0 | -- Elimination
ifthenelse :: Term -> Term -> Term -> Term
ifthenelse test ontrue onfalse = Apply (Apply test ontrue) onfalse | 124 | ifthenelse :: Term -> Term -> Term -> Term
ifthenelse test ontrue onfalse = Apply (Apply test ontrue) onfalse | 109 | ifthenelse test ontrue onfalse = Apply (Apply test ontrue) onfalse | 66 | true | true | 0 | 9 | 20 | 49 | 23 | 26 | null | null |
Noeda/Megaman | src/NetHack/Data/Level.hs | mit | featureByStr "staircase down" = Just $ DownStairs Nothing | 57 | featureByStr "staircase down" = Just $ DownStairs Nothing | 57 | featureByStr "staircase down" = Just $ DownStairs Nothing | 57 | false | false | 0 | 6 | 7 | 16 | 7 | 9 | null | null |
shlevy/ghc | compiler/cmm/PprCmm.hs | bsd-3-clause | ----------------------------------------------------------
-- Outputting blocks and graphs
pprBlock :: IndexedCO x SDoc SDoc ~ SDoc
=> Block CmmNode e x -> IndexedCO e SDoc SDoc
pprBlock block
= foldBlockNodesB3 ( ($$) . ppr
, ($$) . (nest 4) . ppr
, ($$) . (n... | 415 | pprBlock :: IndexedCO x SDoc SDoc ~ SDoc
=> Block CmmNode e x -> IndexedCO e SDoc SDoc
pprBlock block
= foldBlockNodesB3 ( ($$) . ppr
, ($$) . (nest 4) . ppr
, ($$) . (nest 4) . ppr
)
block
em... | 323 | pprBlock block
= foldBlockNodesB3 ( ($$) . ppr
, ($$) . (nest 4) . ppr
, ($$) . (nest 4) . ppr
)
block
empty | 227 | true | true | 0 | 10 | 177 | 104 | 55 | 49 | null | null |
emilaxelsson/open-typerep | src/Data/TypeRep/Types/Tuple.hs | bsd-3-clause | tupWidth Tup4_t = 4 | 20 | tupWidth Tup4_t = 4 | 20 | tupWidth Tup4_t = 4 | 20 | false | false | 1 | 5 | 4 | 13 | 4 | 9 | null | null |
brendanhay/gogol | gogol-healthcare/gen/Network/Google/Resource/Healthcare/Projects/Locations/DataSets/DicomStores/Studies/RetrieveStudy.hs | mpl-2.0 | -- | Creates a value of 'ProjectsLocationsDataSetsDicomStoresStudiesRetrieveStudy' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'pldsdssrsParent'
--
-- * 'pldsdssrsXgafv'
--
-- * 'pldsdssrsUploadProtocol'
--
-- * 'pldsdssrsAccessTok... | 1,058 | projectsLocationsDataSetsDicomStoresStudiesRetrieveStudy
:: Text -- ^ 'pldsdssrsParent'
-> Text -- ^ 'pldsdssrsDicomWebPath'
-> ProjectsLocationsDataSetsDicomStoresStudiesRetrieveStudy
projectsLocationsDataSetsDicomStoresStudiesRetrieveStudy pPldsdssrsParent_ pPldsdssrsDicomWebPath_ =
ProjectsLocationsDat... | 644 | projectsLocationsDataSetsDicomStoresStudiesRetrieveStudy pPldsdssrsParent_ pPldsdssrsDicomWebPath_ =
ProjectsLocationsDataSetsDicomStoresStudiesRetrieveStudy'
{ _pldsdssrsParent = pPldsdssrsParent_
, _pldsdssrsXgafv = Nothing
, _pldsdssrsUploadProtocol = Nothing
, _pldsdssrsAccessToken = Nothing
,... | 447 | true | true | 0 | 6 | 150 | 87 | 60 | 27 | null | null |
domenicosolazzo/practice-haskell | courses/cis194/01/01.hs | mit | foo n
| n < 0 = 0
| n `mod` 17 == 2 = -43
| otherwise = n + 3 | 89 | foo n
| n < 0 = 0
| n `mod` 17 == 2 = -43
| otherwise = n + 3 | 89 | foo n
| n < 0 = 0
| n `mod` 17 == 2 = -43
| otherwise = n + 3 | 89 | false | false | 1 | 9 | 49 | 57 | 27 | 30 | null | null |
holzensp/ghc | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | emitPrimOp dflags res ReadOffAddrOp_Word16 args = doIndexOffAddrOp (Just (mo_u_16ToWord dflags)) b16 res args | 121 | emitPrimOp dflags res ReadOffAddrOp_Word16 args = doIndexOffAddrOp (Just (mo_u_16ToWord dflags)) b16 res args | 121 | emitPrimOp dflags res ReadOffAddrOp_Word16 args = doIndexOffAddrOp (Just (mo_u_16ToWord dflags)) b16 res args | 121 | false | false | 0 | 9 | 24 | 36 | 17 | 19 | null | null |
jdimond/diplomarbeit | test/TestDictionary.hs | bsd-3-clause | test_doubleAdd :: IO ()
test_doubleAdd =
do let new = D.emptyWordMap
let (token1, map1) = D.addToken new "word"
assertBool $ isJust map1
let (token2, map2) = D.addToken (fromJust map1) "word"
assertEqual token1 token2
assertBool $ isNothing map2 | 284 | test_doubleAdd :: IO ()
test_doubleAdd =
do let new = D.emptyWordMap
let (token1, map1) = D.addToken new "word"
assertBool $ isJust map1
let (token2, map2) = D.addToken (fromJust map1) "word"
assertEqual token1 token2
assertBool $ isNothing map2 | 284 | test_doubleAdd =
do let new = D.emptyWordMap
let (token1, map1) = D.addToken new "word"
assertBool $ isJust map1
let (token2, map2) = D.addToken (fromJust map1) "word"
assertEqual token1 token2
assertBool $ isNothing map2 | 260 | false | true | 0 | 12 | 75 | 107 | 49 | 58 | null | null |
sboosali/commands-frontend-DragonNaturallySpeaking | sources/Commands/Mixins/DNS13OSX9/Types.hs | bsd-3-clause | -- ================================================================ --
liftLeaf p r = liftRHS (LeafRHS p r) | 108 | liftLeaf p r = liftRHS (LeafRHS p r) | 36 | liftLeaf p r = liftRHS (LeafRHS p r) | 36 | true | false | 0 | 7 | 11 | 23 | 11 | 12 | null | null |
martinnj/PMPH2015 | Assignment1/Task2+3/PrimesQuicksort.hs | mit | n =
if n <= 2 then [2]
else let sqrtN = floor (sqrt (fromIntegral n))
sqrt_primes = primesFlat sqrtN
num_primes = length sqrt_primes
mult_lens = map (\p -> (n `div` p) - 1) sqrt_primes
mult_scan = scanExc (+) 0 mult_lens
mult_tot_len= (last m... | 1,131 | n =
if n <= 2 then [2]
else let sqrtN = floor (sqrt (fromIntegral n))
sqrt_primes = primesFlat sqrtN
num_primes = length sqrt_primes
mult_lens = map (\p -> (n `div` p) - 1) sqrt_primes
mult_scan = scanExc (+) 0 mult_lens
mult_tot_len= (last m... | 1,131 | n =
if n <= 2 then [2]
else let sqrtN = floor (sqrt (fromIntegral n))
sqrt_primes = primesFlat sqrtN
num_primes = length sqrt_primes
mult_lens = map (\p -> (n `div` p) - 1) sqrt_primes
mult_scan = scanExc (+) 0 mult_lens
mult_tot_len= (last m... | 1,131 | false | false | 1 | 18 | 390 | 410 | 213 | 197 | null | null |
jmct/IterativeCompiler | frontend/GMachine.hs | mit | compileAlts :: (Int -> GMCompiler) --compiler for alternates
-> [CoreAlt] --the list of alternates
-> GMEnvironment --the current environment
-> Int --current stack depth
-> [(Int, GMCode)] --the output list of alternats sequences
compi... | 497 | compileAlts :: (Int -> GMCompiler) --compiler for alternates
-> [CoreAlt] --the list of alternates
-> GMEnvironment --the current environment
-> Int --current stack depth
-> [(Int, GMCode)]
compileAlts comp alts env d
= [(tag,
... | 455 | compileAlts comp alts env d
= [(tag,
comp (length names) body (zip names [0..] ++ argOffset (length names) env) (d + (length names)))
| (tag, names, body) <- alts] | 182 | true | true | 0 | 12 | 164 | 140 | 78 | 62 | null | null |
expipiplus1/orbit | test/Test.hs | mit | test_stateVectors :: [TestTree]
test_stateVectors = [Test.StateVectors.tests] | 77 | test_stateVectors :: [TestTree]
test_stateVectors = [Test.StateVectors.tests] | 77 | test_stateVectors = [Test.StateVectors.tests] | 45 | false | true | 0 | 6 | 5 | 20 | 12 | 8 | null | null |
CindyLinz/Haskell-Perl | src/Perl/Accessor.hs | mit | cap :: (MonadCatch m, MonadIO m) => String -> PerlT s m PerlVar
cap code =
Call.eval ('\\' : code) >>= Ref.deRef >>= return . PerlVarSV | 137 | cap :: (MonadCatch m, MonadIO m) => String -> PerlT s m PerlVar
cap code =
Call.eval ('\\' : code) >>= Ref.deRef >>= return . PerlVarSV | 137 | cap code =
Call.eval ('\\' : code) >>= Ref.deRef >>= return . PerlVarSV | 73 | false | true | 2 | 8 | 27 | 69 | 34 | 35 | null | null |
sdiehl/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | -- Typeable representation types
trModuleTyConName
, trModuleDataConName
, trNameTyConName
, trNameSDataConName
, trNameDDataConName
, trTyConTyConName
, trTyConDataConName
:: Name
trModuleTyConName = tcQual gHC_TYPES (fsLit "Module") trModuleTyConKey | 286 | trModuleTyConName
, trModuleDataConName
, trNameTyConName
, trNameSDataConName
, trNameDDataConName
, trTyConTyConName
, trTyConDataConName
:: Name
trModuleTyConName = tcQual gHC_TYPES (fsLit "Module") trModuleTyConKey | 253 | trModuleTyConName = tcQual gHC_TYPES (fsLit "Module") trModuleTyConKey | 91 | true | true | 0 | 7 | 60 | 37 | 25 | 12 | null | null |
jcristovao/enclosed-exceptions | test/main.hs | mit | -- A handler that fails the test if it catches the wrong type of exception.
catchAssert :: forall e. Exception e => e -> IO () -> SomeException -> IO ()
catchAssert _ act se = case fromException se of
Just (_ :: e) -> act
Nothing -> expectationFailure "Caught an unexpected exception"
-- Block a thread | 311 | catchAssert :: forall e. Exception e => e -> IO () -> SomeException -> IO ()
catchAssert _ act se = case fromException se of
Just (_ :: e) -> act
Nothing -> expectationFailure "Caught an unexpected exception"
-- Block a thread | 235 | catchAssert _ act se = case fromException se of
Just (_ :: e) -> act
Nothing -> expectationFailure "Caught an unexpected exception"
-- Block a thread | 158 | true | true | 3 | 11 | 65 | 85 | 42 | 43 | null | null |
D4r1/project-euler | Euler/E17.hs | mit | tens :: [String]
tens = [zero,ten,twenty,thirty,forty,fifty,sixty,seventy,eighty,ninety] | 88 | tens :: [String]
tens = [zero,ten,twenty,thirty,forty,fifty,sixty,seventy,eighty,ninety] | 88 | tens = [zero,ten,twenty,thirty,forty,fifty,sixty,seventy,eighty,ninety] | 71 | false | true | 0 | 5 | 5 | 44 | 28 | 16 | null | null |
ghcjs/jsaddle-dom | src/JSDOM/Generated/TreeWalker.hs | mit | -- | <https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker.nextSibling Mozilla TreeWalker.nextSibling documentation>
nextSibling_ :: (MonadDOM m) => TreeWalker -> m ()
nextSibling_ self = liftDOM (void (self ^. jsf "nextSibling" ())) | 241 | nextSibling_ :: (MonadDOM m) => TreeWalker -> m ()
nextSibling_ self = liftDOM (void (self ^. jsf "nextSibling" ())) | 116 | nextSibling_ self = liftDOM (void (self ^. jsf "nextSibling" ())) | 65 | true | true | 0 | 11 | 25 | 60 | 29 | 31 | null | null |
jwiegley/github | src/GitHub/Data/Options.hs | bsd-3-clause | optionsBase :: Text -> PullRequestMod
optionsBase x = PRMod $ \opts ->
opts { pullRequestOptionsBase = Just x } | 115 | optionsBase :: Text -> PullRequestMod
optionsBase x = PRMod $ \opts ->
opts { pullRequestOptionsBase = Just x } | 115 | optionsBase x = PRMod $ \opts ->
opts { pullRequestOptionsBase = Just x } | 77 | false | true | 2 | 8 | 22 | 48 | 22 | 26 | null | null |
mcschroeder/ghc | compiler/typecheck/TcRnTypes.hs | bsd-3-clause | pprCtO (TypeEqOrigin t1 t2 _)= text "a type equality" <+> sep [ppr t1, char '~', ppr t2] | 88 | pprCtO (TypeEqOrigin t1 t2 _)= text "a type equality" <+> sep [ppr t1, char '~', ppr t2] | 88 | pprCtO (TypeEqOrigin t1 t2 _)= text "a type equality" <+> sep [ppr t1, char '~', ppr t2] | 88 | false | false | 0 | 8 | 16 | 47 | 22 | 25 | null | null |
dimara/ganeti | src/Ganeti/OpParams.hs | bsd-2-clause | pOutputFields :: Field
pOutputFields =
withDoc "Selected output fields" $
simpleField "output_fields" [t| [NonEmptyString] |] | 129 | pOutputFields :: Field
pOutputFields =
withDoc "Selected output fields" $
simpleField "output_fields" [t| [NonEmptyString] |] | 129 | pOutputFields =
withDoc "Selected output fields" $
simpleField "output_fields" [t| [NonEmptyString] |] | 106 | false | true | 0 | 6 | 18 | 27 | 15 | 12 | null | null |
Concomitant/LambdaHack | Game/LambdaHack/Common/Flavour.hs | bsd-3-clause | colorToLiquidName Green = "moldy" | 37 | colorToLiquidName Green = "moldy" | 37 | colorToLiquidName Green = "moldy" | 37 | false | false | 0 | 5 | 7 | 9 | 4 | 5 | null | null |
beni55/ghcjs | test/ghc/perf/t4474c.hs | mit | flatDList (Leaf n) = (n :) | 28 | flatDList (Leaf n) = (n :) | 28 | flatDList (Leaf n) = (n :) | 28 | false | false | 0 | 7 | 7 | 19 | 10 | 9 | null | null |
triplepointfive/fecklessbar | src/Graphics/UI/Feckless.hs | mit | newBar :: String -> IO FlBar
newBar name = return FlBar | 55 | newBar :: String -> IO FlBar
newBar name = return FlBar | 55 | newBar name = return FlBar | 26 | false | true | 0 | 6 | 10 | 24 | 11 | 13 | null | null |
Happy0/snowdrift | Data/Order.hs | agpl-3.0 | tagP :: Parser (Orderable -> Double)
tagP = (\ x y -> if hasTag y x then 1 else 0) <$> takeWhile1 (inClass "a-z-") | 114 | tagP :: Parser (Orderable -> Double)
tagP = (\ x y -> if hasTag y x then 1 else 0) <$> takeWhile1 (inClass "a-z-") | 114 | tagP = (\ x y -> if hasTag y x then 1 else 0) <$> takeWhile1 (inClass "a-z-") | 77 | false | true | 1 | 9 | 23 | 60 | 30 | 30 | null | null |
nevrenato/Hets_Fork | Common/Token.hs | gpl-2.0 | -- * parser for mixfix and compound 'Id's
-- | parsing a compound list
comps :: ([String], [String]) -> GenParser Char st ([Id], Range)
comps keys = do
o <- oBracketT
(ts, ps) <- mixId keys keys `separatedBy` commaT
c <- cBracketT
return (ts, toRange o ps c)
{- | parse mixfix components ('start') and an optio... | 530 | comps :: ([String], [String]) -> GenParser Char st ([Id], Range)
comps keys = do
o <- oBracketT
(ts, ps) <- mixId keys keys `separatedBy` commaT
c <- cBracketT
return (ts, toRange o ps c)
{- | parse mixfix components ('start') and an optional compound list ('comps')
if the last token was no place. Accept po... | 458 | comps keys = do
o <- oBracketT
(ts, ps) <- mixId keys keys `separatedBy` commaT
c <- cBracketT
return (ts, toRange o ps c)
{- | parse mixfix components ('start') and an optional compound list ('comps')
if the last token was no place. Accept possibly further places.
Key strings (second argument) within co... | 393 | true | true | 0 | 10 | 105 | 111 | 58 | 53 | null | null |
snoyberg/ghc | compiler/stgSyn/StgLint.hs | bsd-3-clause | lintStgBinds :: StgBinding -> LintM [Id] -- Returns the binders
lintStgBinds (StgNonRec binder rhs) = do
lint_binds_help (binder,rhs)
return [binder] | 157 | lintStgBinds :: StgBinding -> LintM [Id]
lintStgBinds (StgNonRec binder rhs) = do
lint_binds_help (binder,rhs)
return [binder] | 134 | lintStgBinds (StgNonRec binder rhs) = do
lint_binds_help (binder,rhs)
return [binder] | 93 | true | true | 0 | 9 | 27 | 59 | 28 | 31 | null | null |
DanielWaterworth/Idris-dev | src/Idris/IdrisDoc.hs | bsd-3-clause | wrapper :: Maybe NsName -- ^ Namespace name, unless it is the index
-> H.Html -- ^ Inner HTML
-> H.Html
wrapper ns inner =
let (index, str) = extract ns
base = if index then "" else "../"
styles = base ++ "styles.css" :: String
indexPage = base ++ "index.html" :: S... | 1,109 | wrapper :: Maybe NsName -- ^ Namespace name, unless it is the index
-> H.Html -- ^ Inner HTML
-> H.Html
wrapper ns inner =
let (index, str) = extract ns
base = if index then "" else "../"
styles = base ++ "styles.css" :: String
indexPage = base ++ "index.html" :: S... | 1,109 | wrapper ns inner =
let (index, str) = extract ns
base = if index then "" else "../"
styles = base ++ "styles.css" :: String
indexPage = base ++ "index.html" :: String
in H.docTypeHtml $ do
H.head $ do
H.title $ do
"IdrisDoc"
if index then " Index" else do
... | 981 | false | true | 0 | 23 | 407 | 359 | 171 | 188 | null | null |
ingemaradahl/bilder | src/Compiler/Simple/Utils.hs | lgpl-3.0 | mapExpM f (EMemberCall el cid es) = EMemberCall <$> f el <*> pure cid <*> mapM f es | 83 | mapExpM f (EMemberCall el cid es) = EMemberCall <$> f el <*> pure cid <*> mapM f es | 83 | mapExpM f (EMemberCall el cid es) = EMemberCall <$> f el <*> pure cid <*> mapM f es | 83 | false | false | 0 | 8 | 17 | 44 | 20 | 24 | null | null |
Helkafen/cabal | cabal-install/Distribution/Client/Setup.hs | bsd-3-clause | allSolvers :: String
allSolvers = intercalate ", " (map display ([minBound .. maxBound] :: [PreSolver])) | 104 | allSolvers :: String
allSolvers = intercalate ", " (map display ([minBound .. maxBound] :: [PreSolver])) | 104 | allSolvers = intercalate ", " (map display ([minBound .. maxBound] :: [PreSolver])) | 83 | false | true | 0 | 9 | 14 | 47 | 23 | 24 | null | null |
owainlewis/bmcs-haskell-sdk | src/Network/Oracle/OCI/Common/Signatures/OpenSSL.hs | bsd-3-clause | signWithPrivateKey :: FilePath -> String -> IO BS.ByteString
signWithPrivateKey privateKeyPath input = doCommand cmd
where cmd = concat [ "printf '%b' "
, quoted input
, " | openssl dgst -sha256 -sign "
, privateKeyPath
, " | openssl ... | 371 | signWithPrivateKey :: FilePath -> String -> IO BS.ByteString
signWithPrivateKey privateKeyPath input = doCommand cmd
where cmd = concat [ "printf '%b' "
, quoted input
, " | openssl dgst -sha256 -sign "
, privateKeyPath
, " | openssl ... | 371 | signWithPrivateKey privateKeyPath input = doCommand cmd
where cmd = concat [ "printf '%b' "
, quoted input
, " | openssl dgst -sha256 -sign "
, privateKeyPath
, " | openssl enc -e -base64 | tr -d '\n'"
] | 310 | false | true | 0 | 8 | 153 | 61 | 31 | 30 | null | null |
bvdelft/parac2 | src/Language/Java/Paragon/ErrorTxt.hs | bsd-3-clause | errorTxt' WrongCastT =
"Wrong type at cast" | 45 | errorTxt' WrongCastT =
"Wrong type at cast" | 45 | errorTxt' WrongCastT =
"Wrong type at cast" | 45 | false | false | 0 | 5 | 8 | 9 | 4 | 5 | null | null |
gencer/bond | compiler/IO.hs | mit | parseAliasMappings :: [String] -> IO [AliasMapping]
parseAliasMappings = mapM $
\ s -> case parseAliasMapping s of
Left err -> fail $ show err
Right m -> return m | 182 | parseAliasMappings :: [String] -> IO [AliasMapping]
parseAliasMappings = mapM $
\ s -> case parseAliasMapping s of
Left err -> fail $ show err
Right m -> return m | 182 | parseAliasMappings = mapM $
\ s -> case parseAliasMapping s of
Left err -> fail $ show err
Right m -> return m | 130 | false | true | 2 | 10 | 48 | 74 | 34 | 40 | null | null |
solvery/lang-features | haskell/high_order_function_3.hs | gpl-2.0 | reverse' :: [a] -> [a]
reverse' = foldl (\acc x -> x : acc) [] | 65 | reverse' :: [a] -> [a]
reverse' = foldl (\acc x -> x : acc) [] | 62 | reverse' = foldl (\acc x -> x : acc) [] | 39 | false | true | 0 | 8 | 17 | 42 | 23 | 19 | null | null |
byorgey/Idris-dev | src/Idris/REPL.hs | bsd-3-clause | edit f orig
= do i <- getIState
env <- liftIO $ getEnvironment
let editor = getEditor env
let line = case errLine i of
Just l -> " +" ++ show l ++ " "
Nothing -> " "
let cmd = editor ++ line ++ f
liftIO $ system cmd
... | 614 | edit f orig
= do i <- getIState
env <- liftIO $ getEnvironment
let editor = getEditor env
let line = case errLine i of
Just l -> " +" ++ show l ++ " "
Nothing -> " "
let cmd = editor ++ line ++ f
liftIO $ system cmd
... | 614 | edit f orig
= do i <- getIState
env <- liftIO $ getEnvironment
let editor = getEditor env
let line = case errLine i of
Just l -> " +" ++ show l ++ " "
Nothing -> " "
let cmd = editor ++ line ++ f
liftIO $ system cmd
... | 614 | false | false | 1 | 15 | 281 | 213 | 91 | 122 | null | null |
brendanhay/gogol | gogol-bigtableadmin/gen/Network/Google/BigtableAdmin/Types/Product.hs | mpl-2.0 | -- | Required. The number of nodes allocated to this cluster. More nodes
-- enable higher throughput and more consistent performance.
cServeNodes :: Lens' Cluster (Maybe Int32)
cServeNodes
= lens _cServeNodes (\ s a -> s{_cServeNodes = a}) .
mapping _Coerce | 265 | cServeNodes :: Lens' Cluster (Maybe Int32)
cServeNodes
= lens _cServeNodes (\ s a -> s{_cServeNodes = a}) .
mapping _Coerce | 131 | cServeNodes
= lens _cServeNodes (\ s a -> s{_cServeNodes = a}) .
mapping _Coerce | 88 | true | true | 0 | 10 | 48 | 56 | 29 | 27 | null | null |
zachsully/hakaru | haskell/Tests/TestSuite.hs | bsd-3-clause | simplifyTests :: Test -> Maybe String -> Test
simplifyTests t env =
case env of
Just _ -> t
Nothing -> test ignored | 126 | simplifyTests :: Test -> Maybe String -> Test
simplifyTests t env =
case env of
Just _ -> t
Nothing -> test ignored | 126 | simplifyTests t env =
case env of
Just _ -> t
Nothing -> test ignored | 80 | false | true | 0 | 8 | 33 | 49 | 23 | 26 | null | null |
keqh/lens-time | Data/Time/Lens.hs | mit | day :: HasDate a => Lens' a Int
day = dateLens _3 T.addDays | 59 | day :: HasDate a => Lens' a Int
day = dateLens _3 T.addDays | 59 | day = dateLens _3 T.addDays | 27 | false | true | 0 | 6 | 12 | 30 | 14 | 16 | null | null |
eniac314/aquarium | dist/build/autogen/Paths_aquarium.hs | gpl-3.0 | version :: Version
version = Version [0,1,0,0] [] | 49 | version :: Version
version = Version [0,1,0,0] [] | 49 | version = Version [0,1,0,0] [] | 30 | false | true | 0 | 6 | 7 | 30 | 17 | 13 | null | null |
wizzup/advent_of_code | 2019/haskell/src/IntCode.hs | mit | readJnz :: ReadP Operation
readJnz = read2 "5" Jnz | 50 | readJnz :: ReadP Operation
readJnz = read2 "5" Jnz | 50 | readJnz = read2 "5" Jnz | 23 | false | true | 1 | 5 | 8 | 22 | 9 | 13 | null | null |
msullivan/advent-of-code | 2015/A16b.hs | mit | main = answer solve | 19 | main = answer solve | 19 | main = answer solve | 19 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
jacekszymanski/wxHaskell | wx/src/Graphics/UI/WX/Events.hs | lgpl-2.1 | ightKey = key KeyRight
| 24 | rightKey = key KeyRight | 24 | rightKey = key KeyRight | 24 | false | false | 0 | 5 | 5 | 9 | 4 | 5 | null | null |
emilaxelsson/open-typerep | benchmarks/Dynamic.hs | bsd-3-clause | dynSum2 :: [Dynamic Types2] -> Int
dynSum2 ds = sum [i | d <- ds, Right i <- [fromDyn d]] | 89 | dynSum2 :: [Dynamic Types2] -> Int
dynSum2 ds = sum [i | d <- ds, Right i <- [fromDyn d]] | 89 | dynSum2 ds = sum [i | d <- ds, Right i <- [fromDyn d]] | 54 | false | true | 0 | 10 | 19 | 61 | 28 | 33 | null | null |
shlevy/ghc | compiler/hsSyn/HsTypes.hs | bsd-3-clause | -- Two wild cards are the same when they have the same location
sameWildCard :: Located (HsWildCardInfo pass)
-> Located (HsWildCardInfo pass) -> Bool
sameWildCard (L l1 (AnonWildCard _)) (L l2 (AnonWildCard _)) = l1 == l2 | 239 | sameWildCard :: Located (HsWildCardInfo pass)
-> Located (HsWildCardInfo pass) -> Bool
sameWildCard (L l1 (AnonWildCard _)) (L l2 (AnonWildCard _)) = l1 == l2 | 175 | sameWildCard (L l1 (AnonWildCard _)) (L l2 (AnonWildCard _)) = l1 == l2 | 75 | true | true | 0 | 9 | 53 | 75 | 37 | 38 | null | null |
liangcun/ConceptsOfSpatialInformation | CoreConceptsHs/Location.hs | apache-2.0 | -- could do manhattan, but wait for geometry package
-- converting positions to coordinate pairs (only needed as long as we use regular arrays)
-- spatial reference system dropped
pos2pair :: Position -> (Coord, Coord)
pos2pair (Position c 2 s) = (c!!0,c!!1) | 260 | pos2pair :: Position -> (Coord, Coord)
pos2pair (Position c 2 s) = (c!!0,c!!1) | 78 | pos2pair (Position c 2 s) = (c!!0,c!!1) | 39 | true | true | 0 | 7 | 43 | 51 | 29 | 22 | null | null |
gergoerdi/brainfuck | language-registermachine/src/Language/RegisterMachine/Syntax/Macros.hs | bsd-3-clause | instantiateMacroStmt :: MacroStmt -> Inst [Directive Reg Label]
instantiateMacroStmt (PrimitiveStmt s) = do
s' <- instantiateStmt s
return [Stmt s'] | 152 | instantiateMacroStmt :: MacroStmt -> Inst [Directive Reg Label]
instantiateMacroStmt (PrimitiveStmt s) = do
s' <- instantiateStmt s
return [Stmt s'] | 152 | instantiateMacroStmt (PrimitiveStmt s) = do
s' <- instantiateStmt s
return [Stmt s'] | 88 | false | true | 0 | 9 | 23 | 57 | 26 | 31 | null | null |
fehu/haskell-java-bridge-fork | hs2j/Haskell2Java.hs | mit | hs2j :: Options -> [String] -> IO ()
hs2j opts args = putStrLn "hs2j" | 69 | hs2j :: Options -> [String] -> IO ()
hs2j opts args = putStrLn "hs2j" | 69 | hs2j opts args = putStrLn "hs2j" | 32 | false | true | 0 | 8 | 13 | 35 | 17 | 18 | null | null |
supki/libstackexchange | src/Network/StackExchange/Response.hs | mit | se :: (Functor f, Profunctor p) => p (SE a) (f (SE t)) -> p (Maybe Value) (f (Maybe Value))
se = dimap sa (fmap bt)
where
sa = SE . fromMaybe Null
bt (SE Null) = Nothing
bt (SE x) = Just x | 196 | se :: (Functor f, Profunctor p) => p (SE a) (f (SE t)) -> p (Maybe Value) (f (Maybe Value))
se = dimap sa (fmap bt)
where
sa = SE . fromMaybe Null
bt (SE Null) = Nothing
bt (SE x) = Just x | 196 | se = dimap sa (fmap bt)
where
sa = SE . fromMaybe Null
bt (SE Null) = Nothing
bt (SE x) = Just x | 104 | false | true | 1 | 12 | 51 | 143 | 66 | 77 | null | null |
kmate/HaRe | old/tools/base/AST/HasBaseStruct.hs | bsd-3-clause | hsExpTypeSig sloc e c t = base $ HsExpTypeSig sloc e c t | 60 | hsExpTypeSig sloc e c t = base $ HsExpTypeSig sloc e c t | 60 | hsExpTypeSig sloc e c t = base $ HsExpTypeSig sloc e c t | 60 | false | false | 0 | 6 | 16 | 31 | 13 | 18 | null | null |
yuanchuan/fractal-div | src/golden-spiral/generator.hs | mit | generator :: [Char] -> [Char]
generator seed = cell ((cell "") ++ seed) | 75 | generator :: [Char] -> [Char]
generator seed = cell ((cell "") ++ seed) | 71 | generator seed = cell ((cell "") ++ seed) | 41 | false | true | 0 | 9 | 16 | 40 | 21 | 19 | null | null |
Erdwolf/autotool-bonn | src/Hilbert/Axioms.hs | gpl-2.0 | halle :: Env ( Exp Bool )
halle = Hilbert.Env.make
[ read "(H1 , A -> (B -> A) )"
, read "(H2 , (A -> (B -> C)) -> ((A -> B) -> (A -> C)) )"
, read "(H3 , (not A -> not B) -> ((not A -> B) -> A) )"
] | 224 | halle :: Env ( Exp Bool )
halle = Hilbert.Env.make
[ read "(H1 , A -> (B -> A) )"
, read "(H2 , (A -> (B -> C)) -> ((A -> B) -> (A -> C)) )"
, read "(H3 , (not A -> not B) -> ((not A -> B) -> A) )"
] | 224 | halle = Hilbert.Env.make
[ read "(H1 , A -> (B -> A) )"
, read "(H2 , (A -> (B -> C)) -> ((A -> B) -> (A -> C)) )"
, read "(H3 , (not A -> not B) -> ((not A -> B) -> A) )"
] | 198 | false | true | 0 | 7 | 80 | 44 | 22 | 22 | null | null |
johnbcoughlin/mucalc | src/GRSynth/Formulas.hs | gpl-2.0 | doRealize (Negation f) = do rf <- doRealize f
return $ setNot rf | 92 | doRealize (Negation f) = do rf <- doRealize f
return $ setNot rf | 92 | doRealize (Negation f) = do rf <- doRealize f
return $ setNot rf | 92 | false | false | 0 | 8 | 40 | 36 | 15 | 21 | null | null |
yiannist/ganeti | src/Ganeti/OpParams.hs | bsd-2-clause | pAllowFailover :: Field
pAllowFailover =
withDoc "Whether we can fallback to failover if migration is not possible" $
defaultFalse "allow_failover" | 151 | pAllowFailover :: Field
pAllowFailover =
withDoc "Whether we can fallback to failover if migration is not possible" $
defaultFalse "allow_failover" | 151 | pAllowFailover =
withDoc "Whether we can fallback to failover if migration is not possible" $
defaultFalse "allow_failover" | 127 | false | true | 0 | 6 | 23 | 21 | 10 | 11 | null | null |
kig/tomtegebra | Tomtegebra/Algebra.hs | gpl-3.0 | applyBinding (Binding (_,_,Just c,_,_,_)) C = c | 47 | applyBinding (Binding (_,_,Just c,_,_,_)) C = c | 47 | applyBinding (Binding (_,_,Just c,_,_,_)) C = c | 47 | false | false | 0 | 9 | 6 | 38 | 21 | 17 | null | null |
osa1/chsc | Termination/Generaliser.hs | bsd-3-clause | generaliseNothing :: Generaliser
generaliseNothing = Generaliser (\_ -> False) (\_ _ -> False) | 94 | generaliseNothing :: Generaliser
generaliseNothing = Generaliser (\_ -> False) (\_ _ -> False) | 94 | generaliseNothing = Generaliser (\_ -> False) (\_ _ -> False) | 61 | false | true | 0 | 7 | 12 | 34 | 19 | 15 | null | null |
thomasjm/IHaskell | ipython-kernel/src/IHaskell/IPython/Message/Parser.hs | mit | parser OutputMessage = outputMessageParser | 42 | parser OutputMessage = outputMessageParser | 42 | parser OutputMessage = outputMessageParser | 42 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
mariefarrell/Hets | Common/MathLink.hs | gpl-2.0 | mlErrorMessage :: ML String
mlErrorMessage = liftMLIO (cMlErrorMessage >=> peekCString) | 87 | mlErrorMessage :: ML String
mlErrorMessage = liftMLIO (cMlErrorMessage >=> peekCString) | 87 | mlErrorMessage = liftMLIO (cMlErrorMessage >=> peekCString) | 59 | false | true | 0 | 7 | 9 | 24 | 12 | 12 | null | null |
brsunter/AdventOfCodeHaskell | src/Day1/Day1.hs | mit | step :: Int -> Char -> Int
step fl x = if x == '(' then fl + 1 else fl - 1 | 74 | step :: Int -> Char -> Int
step fl x = if x == '(' then fl + 1 else fl - 1 | 74 | step fl x = if x == '(' then fl + 1 else fl - 1 | 47 | false | true | 0 | 7 | 22 | 49 | 24 | 25 | null | null |
thomie/vector | Data/Vector.hs | bsd-3-clause | scanl1' = G.scanl1' | 19 | scanl1' = G.scanl1' | 19 | scanl1' = G.scanl1' | 19 | false | false | 0 | 5 | 2 | 8 | 4 | 4 | null | null |
kallisti-dev/hs-webdriver | src/Test/WebDriver/Common/Keys.hs | bsd-3-clause | f8 :: Text
f8 = "\xe038" | 24 | f8 :: Text
f8 = "\xe038" | 24 | f8 = "\xe038" | 13 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.