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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ganeti-github-testing/ganeti-test-1 | src/Ganeti/Constants.hs | bsd-2-clause | vClusterVpathWhitelist :: FrozenSet String
vClusterVpathWhitelist = ConstantUtils.mkSet [ vClusterEtcHosts ] | 108 | vClusterVpathWhitelist :: FrozenSet String
vClusterVpathWhitelist = ConstantUtils.mkSet [ vClusterEtcHosts ] | 108 | vClusterVpathWhitelist = ConstantUtils.mkSet [ vClusterEtcHosts ] | 65 | false | true | 0 | 6 | 9 | 22 | 11 | 11 | null | null |
google-research/dex-lang | src/lib/JIT.hs | bsd-3-clause | gep :: LLVMBuilder m => Operand -> Operand -> m Operand
gep ptr i = emitInstr (typeOf ptr) $ L.GetElementPtr False ptr [i] [] | 125 | gep :: LLVMBuilder m => Operand -> Operand -> m Operand
gep ptr i = emitInstr (typeOf ptr) $ L.GetElementPtr False ptr [i] [] | 125 | gep ptr i = emitInstr (typeOf ptr) $ L.GetElementPtr False ptr [i] [] | 69 | false | true | 0 | 8 | 23 | 67 | 31 | 36 | null | null |
sheganinans/plugins | src/System/Plugins/Utils.hs | lgpl-2.1 | decode_lower 'z' = 'z' | 22 | decode_lower 'z' = 'z' | 22 | decode_lower 'z' = 'z' | 22 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
chrisdone/ace | src/ACE/Types/Tokens.hs | bsd-3-clause | -- | Get the position of the token.
tokenPos :: Token -> (Int, Int)
tokenPos t =
case t of
Word pos _ -> pos
QuotedString pos _ -> pos
Period pos -> pos
Comma pos -> pos
QuestionMark pos -> pos
Genitive pos _ -> pos
Number pos _ -> pos | 302 | tokenPos :: Token -> (Int, Int)
tokenPos t =
case t of
Word pos _ -> pos
QuotedString pos _ -> pos
Period pos -> pos
Comma pos -> pos
QuestionMark pos -> pos
Genitive pos _ -> pos
Number pos _ -> pos | 266 | tokenPos t =
case t of
Word pos _ -> pos
QuotedString pos _ -> pos
Period pos -> pos
Comma pos -> pos
QuestionMark pos -> pos
Genitive pos _ -> pos
Number pos _ -> pos | 234 | true | true | 8 | 6 | 118 | 94 | 48 | 46 | null | null |
headprogrammingczar/cabal | cabal-install/tests/UnitTests/Distribution/Solver/Modular/QuickCheck.hs | bsd-3-clause | getName :: TestPackage -> PN
getName = PN . either exInstName exAvName | 70 | getName :: TestPackage -> PN
getName = PN . either exInstName exAvName | 70 | getName = PN . either exInstName exAvName | 41 | false | true | 0 | 6 | 11 | 24 | 12 | 12 | null | null |
snoyberg/photosorter | fay/Language/Fay/JQuery.hs | bsd-2-clause | toggleAllClasses :: Bool -> JQuery -> Fay JQuery
toggleAllClasses = ffi "%2['toggleClass'](%1)" | 95 | toggleAllClasses :: Bool -> JQuery -> Fay JQuery
toggleAllClasses = ffi "%2['toggleClass'](%1)" | 95 | toggleAllClasses = ffi "%2['toggleClass'](%1)" | 46 | false | true | 0 | 7 | 11 | 25 | 12 | 13 | null | null |
bhamrick/htwitch | Twitch.hs | mit | getMyChannel :: APICall TwitchChannel
getMyChannel = APICall
{ request = R.getMyChannel
, parser = unpackJSON . C.responseBody
} | 134 | getMyChannel :: APICall TwitchChannel
getMyChannel = APICall
{ request = R.getMyChannel
, parser = unpackJSON . C.responseBody
} | 134 | getMyChannel = APICall
{ request = R.getMyChannel
, parser = unpackJSON . C.responseBody
} | 96 | false | true | 1 | 9 | 23 | 43 | 21 | 22 | null | null |
recursion-ninja/megaparsec | Text/Megaparsec/Byte.hs | bsd-2-clause | -- | Parse a hexadecimal digit, i.e. between “0” and “9”, or “a” and “f”, or
-- “A” and “F”.
hexDigitChar :: (MonadParsec e s m, Token s ~ Word8) => m (Token s)
hexDigitChar = C.satisfy (isHexDigit . toChar) <?> "hexadecimal digit" | 232 | hexDigitChar :: (MonadParsec e s m, Token s ~ Word8) => m (Token s)
hexDigitChar = C.satisfy (isHexDigit . toChar) <?> "hexadecimal digit" | 138 | hexDigitChar = C.satisfy (isHexDigit . toChar) <?> "hexadecimal digit" | 70 | true | true | 0 | 8 | 43 | 62 | 32 | 30 | null | null |
nejla/auth-service | service/test/Test.hs | bsd-3-clause | case_checkToken_bogus :: Case ()
case_checkToken_bogus = withUser testUser $ \_uid run -> do
let tok = B64Token "bogus"
res <- run $ checkToken tok
res `shouldBe` Nothing | 176 | case_checkToken_bogus :: Case ()
case_checkToken_bogus = withUser testUser $ \_uid run -> do
let tok = B64Token "bogus"
res <- run $ checkToken tok
res `shouldBe` Nothing | 176 | case_checkToken_bogus = withUser testUser $ \_uid run -> do
let tok = B64Token "bogus"
res <- run $ checkToken tok
res `shouldBe` Nothing | 143 | false | true | 0 | 12 | 32 | 65 | 31 | 34 | null | null |
rfw/entrustor | entrustor.hs | mit | readIRC :: BotResult (Maybe Message)
readIRC = do
h <- gets handle
s <- liftIO $ hGetLine h
return $ decode s | 121 | readIRC :: BotResult (Maybe Message)
readIRC = do
h <- gets handle
s <- liftIO $ hGetLine h
return $ decode s | 121 | readIRC = do
h <- gets handle
s <- liftIO $ hGetLine h
return $ decode s | 84 | false | true | 2 | 10 | 33 | 61 | 24 | 37 | null | null |
llelf/prose | Prose/Internal/Katakana.hs | bsd-3-clause | katakana = [
['\x3031'..'\x3035'],
['\x309B'..'\x309C'],
['\x30A0'],
['\x30A1'..'\x30FA'],
['\x30FC'..'\x30FE'],
['\x30FF'],
['\x31F0'..'\x31FF'],
['\x32D0'..'\x32FE'],
['\x3300'..'\x3357'],
['\xFF66'..'\xFF6F'],
['\xFF70'],
['\xFF71'..'\xFF9D'],
['\x1B000'] ] | 312 | katakana = [
['\x3031'..'\x3035'],
['\x309B'..'\x309C'],
['\x30A0'],
['\x30A1'..'\x30FA'],
['\x30FC'..'\x30FE'],
['\x30FF'],
['\x31F0'..'\x31FF'],
['\x32D0'..'\x32FE'],
['\x3300'..'\x3357'],
['\xFF66'..'\xFF6F'],
['\xFF70'],
['\xFF71'..'\xFF9D'],
['\x1B000'] ] | 312 | katakana = [
['\x3031'..'\x3035'],
['\x309B'..'\x309C'],
['\x30A0'],
['\x30A1'..'\x30FA'],
['\x30FC'..'\x30FE'],
['\x30FF'],
['\x31F0'..'\x31FF'],
['\x32D0'..'\x32FE'],
['\x3300'..'\x3357'],
['\xFF66'..'\xFF6F'],
['\xFF70'],
['\xFF71'..'\xFF9D'],
['\x1B000'] ] | 312 | false | false | 0 | 6 | 68 | 84 | 55 | 29 | null | null |
olsner/ghc | compiler/coreSyn/CoreTidy.hs | bsd-3-clause | -- NoUnfolding or OtherCon
{-
Note [Tidy IdInfo]
~~~~~~~~~~~~~~~~~~
All nested Ids now have the same IdInfo, namely vanillaIdInfo, which
should save some space; except that we preserve occurrence info for
two reasons:
(a) To make printing tidy core nicer
(b) Because we tidy RULES and InlineRules, which may then ... | 1,702 | (=:) :: a -> (a -> b) -> b
m =: k = m `seq` k m | 47 | m =: k = m `seq` k m | 20 | true | true | 0 | 9 | 367 | 53 | 27 | 26 | null | null |
ingemaradahl/bilder | src/TypeChecker/Utils.hs | lgpl-3.0 | returns (SFor _ _ _ _ s) = returns s | 36 | returns (SFor _ _ _ _ s) = returns s | 36 | returns (SFor _ _ _ _ s) = returns s | 36 | false | false | 0 | 7 | 9 | 26 | 12 | 14 | null | null |
zaxtax/hakaru | haskell/Tests/Sample.hs | bsd-3-clause | testMeasure :: String
-> Value ('HMeasure a)
-> Value 'HProb
-> Value a
-> Assertion
testMeasure p (VMeasure m) w v = do
g <- MWC.initialize seed
Just (v', w') <- m (VProb 1) g
assertEqual p v' v
assertEqual p w' w | 262 | testMeasure :: String
-> Value ('HMeasure a)
-> Value 'HProb
-> Value a
-> Assertion
testMeasure p (VMeasure m) w v = do
g <- MWC.initialize seed
Just (v', w') <- m (VProb 1) g
assertEqual p v' v
assertEqual p w' w | 262 | testMeasure p (VMeasure m) w v = do
g <- MWC.initialize seed
Just (v', w') <- m (VProb 1) g
assertEqual p v' v
assertEqual p w' w | 137 | false | true | 0 | 10 | 90 | 120 | 55 | 65 | null | null |
polygonhell/textEditor | src/TTYRender.hs | bsd-3-clause | normal :: String
normal = "\ESC[0m" | 35 | normal :: String
normal = "\ESC[0m" | 35 | normal = "\ESC[0m" | 18 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
authchir/mini-ml | src/Compiler.hs | isc | atExprGetType (ACVarEnv ty _) = ty | 37 | atExprGetType (ACVarEnv ty _) = ty | 37 | atExprGetType (ACVarEnv ty _) = ty | 37 | false | false | 0 | 7 | 8 | 17 | 8 | 9 | null | null |
tonyfloatersu/solution-haskell-craft-of-FP | ExpressionAnalysis.hs | mit | cleanToSubStr :: Parse Char [String]
cleanToSubStr [] = [([], [])] | 69 | cleanToSubStr :: Parse Char [String]
cleanToSubStr [] = [([], [])] | 69 | cleanToSubStr [] = [([], [])] | 32 | false | true | 0 | 7 | 12 | 37 | 20 | 17 | null | null |
haskell-opengl/OpenGLRaw | src/Graphics/GL/Functions/F25.hs | bsd-3-clause | -- glTexCoord1sv ---------------------------------------------------------------
-- | Manual page for <https://www.opengl.org/sdk/docs/man2/xhtml/glTexCoord.xml OpenGL 2.x>.
glTexCoord1sv
:: MonadIO m
=> Ptr GLshort -- ^ @v@ pointing to @1@ element of type @CoordS@.
-> m ()
glTexCoord1sv v1 = liftIO $ dyn48 ptr_... | 336 | glTexCoord1sv
:: MonadIO m
=> Ptr GLshort -- ^ @v@ pointing to @1@ element of type @CoordS@.
-> m ()
glTexCoord1sv v1 = liftIO $ dyn48 ptr_glTexCoord1sv v1 | 161 | glTexCoord1sv v1 = liftIO $ dyn48 ptr_glTexCoord1sv v1 | 54 | true | true | 0 | 9 | 45 | 49 | 23 | 26 | null | null |
well-typed/generics-sop | sop-core/src/Data/SOP/NP.hs | bsd-3-clause | -- | Specialization of 'hcliftA2'.
cliftA2_POP :: All2 c xss => proxy c -> (forall a. c a => f a -> g a -> h a) -> POP f xss -> POP g xss -> POP h xss
cliftA2_NP = hcliftA2 | 174 | cliftA2_POP :: All2 c xss => proxy c -> (forall a. c a => f a -> g a -> h a) -> POP f xss -> POP g xss -> POP h xss
cliftA2_NP = hcliftA2 | 138 | cliftA2_NP = hcliftA2 | 22 | true | true | 0 | 13 | 43 | 87 | 41 | 46 | null | null |
Philonous/d-bus | src/DBus/Signature.hs | mit | structSignature :: AP.Parser DBusType
structSignature = do
_ <- AP.char '('
TypeStruct <$> AP.manyTill signature (AP.char ')') | 134 | structSignature :: AP.Parser DBusType
structSignature = do
_ <- AP.char '('
TypeStruct <$> AP.manyTill signature (AP.char ')') | 134 | structSignature = do
_ <- AP.char '('
TypeStruct <$> AP.manyTill signature (AP.char ')') | 96 | false | true | 0 | 12 | 24 | 56 | 24 | 32 | null | null |
AlexeyRaga/eta | compiler/ETA/Prelude/PrimOp.hs | bsd-3-clause | primOpInfo WriteJBooleanArrayOp =
mkGenPrimOp (fsLit "writeJBooleanArray#") [alphaTyVar, betaTyVar]
[ mkObjectPrimTy alphaTy, intPrimTy, intPrimTy, mkStatePrimTy betaTy ]
$ mkStatePrimTy betaTy | 199 | primOpInfo WriteJBooleanArrayOp =
mkGenPrimOp (fsLit "writeJBooleanArray#") [alphaTyVar, betaTyVar]
[ mkObjectPrimTy alphaTy, intPrimTy, intPrimTy, mkStatePrimTy betaTy ]
$ mkStatePrimTy betaTy | 199 | primOpInfo WriteJBooleanArrayOp =
mkGenPrimOp (fsLit "writeJBooleanArray#") [alphaTyVar, betaTyVar]
[ mkObjectPrimTy alphaTy, intPrimTy, intPrimTy, mkStatePrimTy betaTy ]
$ mkStatePrimTy betaTy | 199 | false | false | 2 | 7 | 24 | 58 | 27 | 31 | null | null |
nikki-and-the-robots/nikki | src/Base/Polling.hs | lgpl-3.0 | toAppEvent _ (Left (KeyRelease key string mods)) = Release $ KeyboardButton key string mods | 91 | toAppEvent _ (Left (KeyRelease key string mods)) = Release $ KeyboardButton key string mods | 91 | toAppEvent _ (Left (KeyRelease key string mods)) = Release $ KeyboardButton key string mods | 91 | false | false | 0 | 9 | 13 | 38 | 18 | 20 | null | null |
icyfork/shellcheck | ShellCheck/Analytics.hs | gpl-3.0 | prop_checkCommarrays1 = verify checkCommarrays "a=(1, 2)" | 57 | prop_checkCommarrays1 = verify checkCommarrays "a=(1, 2)" | 57 | prop_checkCommarrays1 = verify checkCommarrays "a=(1, 2)" | 57 | false | false | 1 | 5 | 5 | 14 | 5 | 9 | null | null |
chadbrewbaker/combinat | Math/Combinat/ASCII.hs | bsd-3-clause | epString :: VSep -> [Char]
vSepString vsep = case vsep of
VSepEmpty -> []
VSepSpaces k -> replicate k ' '
VSepString s -> s
--------------------------------------------------------------------------------
-- * Padding
-- | Horizontally pads with the given number of spaces, on both sides
| 309 | vSepString :: VSep -> [Char]
vSepString vsep = case vsep of
VSepEmpty -> []
VSepSpaces k -> replicate k ' '
VSepString s -> s
--------------------------------------------------------------------------------
-- * Padding
-- | Horizontally pads with the given number of spaces, on both sides | 308 | vSepString vsep = case vsep of
VSepEmpty -> []
VSepSpaces k -> replicate k ' '
VSepString s -> s
--------------------------------------------------------------------------------
-- * Padding
-- | Horizontally pads with the given number of spaces, on both sides | 279 | false | true | 4 | 6 | 63 | 59 | 30 | 29 | null | null |
ulricha/dsh-example-queries | Queries/TPCH/Standard/Q19.hs | bsd-3-clause | between :: Q Integer -> Q Integer -> Q Integer -> Q Bool
between x l r = x >= l && x <= r | 89 | between :: Q Integer -> Q Integer -> Q Integer -> Q Bool
between x l r = x >= l && x <= r | 89 | between x l r = x >= l && x <= r | 32 | false | true | 0 | 8 | 24 | 54 | 25 | 29 | null | null |
rodrigo-machado/verigraph | src/library/GrLang/Parser.hs | gpl-3.0 | parseRule :: (Monad m, Stream s Identity Char) => SourceName -> s -> ExceptT Error m [RuleDeclaration]
parseRule = parseGrLang (many ruleDecl) | 142 | parseRule :: (Monad m, Stream s Identity Char) => SourceName -> s -> ExceptT Error m [RuleDeclaration]
parseRule = parseGrLang (many ruleDecl) | 142 | parseRule = parseGrLang (many ruleDecl) | 39 | false | true | 0 | 9 | 21 | 57 | 29 | 28 | null | null |
ezyang/ghc | compiler/basicTypes/VarSet.hs | bsd-3-clause | mapVarSet :: Uniquable b => (a -> b) -> UniqSet a -> UniqSet b
mapVarSet = mapUniqSet | 85 | mapVarSet :: Uniquable b => (a -> b) -> UniqSet a -> UniqSet b
mapVarSet = mapUniqSet | 85 | mapVarSet = mapUniqSet | 22 | false | true | 0 | 8 | 16 | 39 | 19 | 20 | null | null |
spechub/Hets | Maude/Sign.hs | gpl-2.0 | -- | Insert an 'Operator' declaration into a 'Sign'ature.
insertOp :: Operator -> Sign -> Sign
insertOp op sign = let
subrel = subsorts sign
insert (Op _ _ _ as) = insertOpDecl subrel (asSymbol op) as
in sign {ops = insert op $ ops sign} | 249 | insertOp :: Operator -> Sign -> Sign
insertOp op sign = let
subrel = subsorts sign
insert (Op _ _ _ as) = insertOpDecl subrel (asSymbol op) as
in sign {ops = insert op $ ops sign} | 191 | insertOp op sign = let
subrel = subsorts sign
insert (Op _ _ _ as) = insertOpDecl subrel (asSymbol op) as
in sign {ops = insert op $ ops sign} | 154 | true | true | 0 | 11 | 57 | 99 | 46 | 53 | null | null |
ekmett/ermine | src/Ermine/Inference/Kind.hs | bsd-2-clause | matchFunKind (HardKind _) = fail "not a fun kind" | 49 | matchFunKind (HardKind _) = fail "not a fun kind" | 49 | matchFunKind (HardKind _) = fail "not a fun kind" | 49 | false | false | 0 | 6 | 8 | 19 | 8 | 11 | null | null |
phischu/fragnix | benchmarks/containers/Data.Map.Strict.hs | bsd-3-clause | -- | /O(n+m)/.
-- Union with a combining function. The implementation uses the efficient /hedge-union/ algorithm.
--
-- > let f key left_value right_value = (show key) ++ ":" ++ left_value ++ "|" ++ right_value
-- > unionWithKey f (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) == fromList [(3, "b"), (5... | 498 | unionWithKey :: Ord k => (k -> a -> a -> a) -> Map k a -> Map k a -> Map k a
unionWithKey f t1 t2 = mergeWithKey (\k x1 x2 -> Just $ f k x1 x2) id id t1 t2 | 155 | unionWithKey f t1 t2 = mergeWithKey (\k x1 x2 -> Just $ f k x1 x2) id id t1 t2 | 78 | true | true | 0 | 11 | 101 | 111 | 55 | 56 | null | null |
JPMoresmau/leksah | src/IDE/Session.hs | gpl-2.0 | asPaneState s = error "SaveSession>>asPaneState incomplete cast" | 112 | asPaneState s = error "SaveSession>>asPaneState incomplete cast" | 112 | asPaneState s = error "SaveSession>>asPaneState incomplete cast" | 112 | false | false | 0 | 5 | 54 | 12 | 5 | 7 | null | null |
fpoli/lambda | src/Lambda/Types/Pair.hs | gpl-3.0 | showPair :: (Term -> String) -> (Term -> String) -> Term -> String
showPair showA showB t =
let
onpair = Variable "onpair"
term = reduceAll $ Apply t (VarTerm onpair)
in
case explode term of
(VarTerm x, args) | x == onpair ->
let
a = applyA... | 532 | showPair :: (Term -> String) -> (Term -> String) -> Term -> String
showPair showA showB t =
let
onpair = Variable "onpair"
term = reduceAll $ Apply t (VarTerm onpair)
in
case explode term of
(VarTerm x, args) | x == onpair ->
let
a = applyA... | 532 | showPair showA showB t =
let
onpair = Variable "onpair"
term = reduceAll $ Apply t (VarTerm onpair)
in
case explode term of
(VarTerm x, args) | x == onpair ->
let
a = applyArgs (parseRaw "λa.λb.a") args
b = applyArgs (pa... | 465 | false | true | 0 | 17 | 237 | 179 | 86 | 93 | null | null |
frantisekfarka/ghc-dsi | compiler/main/DynFlags.hs | bsd-3-clause | setPackageTrust :: DynP ()
setPackageTrust = do
setGeneralFlag Opt_PackageTrust
l <- getCurLoc
upd $ \d -> d { pkgTrustOnLoc = l } | 142 | setPackageTrust :: DynP ()
setPackageTrust = do
setGeneralFlag Opt_PackageTrust
l <- getCurLoc
upd $ \d -> d { pkgTrustOnLoc = l } | 142 | setPackageTrust = do
setGeneralFlag Opt_PackageTrust
l <- getCurLoc
upd $ \d -> d { pkgTrustOnLoc = l } | 115 | false | true | 1 | 11 | 33 | 53 | 24 | 29 | null | null |
alexbiehl/hoop | hadoop-protos/src/Hadoop/Protos/DatanodeProtocolProtos/DatanodeProtocolService.hs | mit | blockReceivedAndDeleted :: BlockReceivedAndDeleted
blockReceivedAndDeleted = P'.Method | 86 | blockReceivedAndDeleted :: BlockReceivedAndDeleted
blockReceivedAndDeleted = P'.Method | 86 | blockReceivedAndDeleted = P'.Method | 35 | false | true | 0 | 6 | 5 | 20 | 8 | 12 | null | null |
justanotherdot/advent-linguist | 2016/Haskell/AdventOfCode/src/Day04.hs | mit | break' :: String -> ([String], String)
break' s = (takeWhile (not . isDigit . head) ss, last ss)
where ss = splitOn "-" s | 123 | break' :: String -> ([String], String)
break' s = (takeWhile (not . isDigit . head) ss, last ss)
where ss = splitOn "-" s | 123 | break' s = (takeWhile (not . isDigit . head) ss, last ss)
where ss = splitOn "-" s | 84 | false | true | 0 | 9 | 25 | 65 | 34 | 31 | null | null |
fffej/HS-Poker | LookupPatternMatch.hs | bsd-3-clause | getValueFromProduct 81466 = 4418 | 32 | getValueFromProduct 81466 = 4418 | 32 | getValueFromProduct 81466 = 4418 | 32 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
m-alvarez/jhc | src/Grin/Grin.hs | mit | -- random utility values
lamExp (_ :-> e) = e | 46 | lamExp (_ :-> e) = e | 20 | lamExp (_ :-> e) = e | 20 | true | false | 0 | 6 | 10 | 18 | 9 | 9 | null | null |
legoscia/hsxmpp | Translate.hs | bsd-3-clause | nullLanguage :: IO Language
nullLanguage = new (==) hashString | 62 | nullLanguage :: IO Language
nullLanguage = new (==) hashString | 62 | nullLanguage = new (==) hashString | 34 | false | true | 0 | 6 | 8 | 27 | 12 | 15 | null | null |
beni55/haste-compiler | libraries/ghc-7.10/base/Data/OldList.hs | bsd-3-clause | genericSplitAt n (x:xs) = (x:xs',xs'') where
(xs',xs'') = genericSplitAt (n-1) xs
-- | The 'genericIndex' function is an overloaded version of '!!', which
-- accepts any 'Integral' value as the index. | 206 | genericSplitAt n (x:xs) = (x:xs',xs'') where
(xs',xs'') = genericSplitAt (n-1) xs
-- | The 'genericIndex' function is an overloaded version of '!!', which
-- accepts any 'Integral' value as the index. | 206 | genericSplitAt n (x:xs) = (x:xs',xs'') where
(xs',xs'') = genericSplitAt (n-1) xs
-- | The 'genericIndex' function is an overloaded version of '!!', which
-- accepts any 'Integral' value as the index. | 206 | false | false | 0 | 9 | 36 | 56 | 31 | 25 | null | null |
kindohm/Tidal | Sound/Tidal/Pattern.hs | gpl-3.0 | segment' :: [Event a] -> [Event a]
segment' es = foldr split es pts
where pts = nub $ points es | 97 | segment' :: [Event a] -> [Event a]
segment' es = foldr split es pts
where pts = nub $ points es | 97 | segment' es = foldr split es pts
where pts = nub $ points es | 62 | false | true | 0 | 7 | 22 | 52 | 25 | 27 | null | null |
urbanslug/ghc | testsuite/tests/rename/should_compile/timing003.hs | bsd-3-clause | a377 = [] | 9 | a377 = [] | 9 | a377 = [] | 9 | false | false | 1 | 6 | 2 | 12 | 4 | 8 | null | null |
btipling/machine-vm | src/Machine/Gates.hs | bsd-3-clause | and :: Bool -> Bool -> Bool
and a b = not (nand a b) | 52 | and :: Bool -> Bool -> Bool
and a b = not (nand a b) | 52 | and a b = not (nand a b) | 24 | false | true | 0 | 8 | 14 | 41 | 18 | 23 | null | null |
dequbed/blog | src/Blog/Post.hs | mpl-2.0 | readMarkdown' :: String -> Pandoc
readMarkdown' = handleError . readMarkdown def | 80 | readMarkdown' :: String -> Pandoc
readMarkdown' = handleError . readMarkdown def | 80 | readMarkdown' = handleError . readMarkdown def | 46 | false | true | 1 | 7 | 10 | 29 | 12 | 17 | null | null |
synsem/texhs | src/Text/Bib/Reader/BibTeX/Reference.hs | gpl-3.0 | -- | Test whether a TeX word starts with a lower-case letter.
--
-- This is used by BibTeX to detect prefix name parts.
isLowerCase :: TeX -> Bool
isLowerCase [] = True | 168 | isLowerCase :: TeX -> Bool
isLowerCase [] = True | 48 | isLowerCase [] = True | 21 | true | true | 0 | 6 | 32 | 23 | 13 | 10 | null | null |
nevrenato/Hets_Fork | Common/Lib/Rel.hs | gpl-2.0 | {- | checks if a given relation is locally filtered
* precondition: the relation must already be closed by transitive closure
-}
locallyFiltered :: Ord a => Rel a -> Bool
locallyFiltered rel = check . flatSet . partSet iso $ mostRight rel
where iso x y = member x y rel && member y x rel
check s = Set.nu... | 517 | locallyFiltered :: Ord a => Rel a -> Bool
locallyFiltered rel = check . flatSet . partSet iso $ mostRight rel
where iso x y = member x y rel && member y x rel
check s = Set.null s ||
Set.fold (\ y ->
(&& not (haveCommonLeftElem x y rel))) True s'
... | 386 | locallyFiltered rel = check . flatSet . partSet iso $ mostRight rel
where iso x y = member x y rel && member y x rel
check s = Set.null s ||
Set.fold (\ y ->
(&& not (haveCommonLeftElem x y rel))) True s'
&& check s'
where (x, s... | 344 | true | true | 1 | 13 | 177 | 153 | 75 | 78 | null | null |
luzhuomi/xhaskell-regex-deriv | Text/Regex/Deriv/ByteString/BitCode.hs | bsd-3-clause | decode :: RE -> Path -> U
decode r bs = let (u,p) = decode2 r bs
in if nullP p
then u
else error $ "invalid bit coding u=" ++ show u ++ " p=" ++ show p | 200 | decode :: RE -> Path -> U
decode r bs = let (u,p) = decode2 r bs
in if nullP p
then u
else error $ "invalid bit coding u=" ++ show u ++ " p=" ++ show p | 200 | decode r bs = let (u,p) = decode2 r bs
in if nullP p
then u
else error $ "invalid bit coding u=" ++ show u ++ " p=" ++ show p | 174 | false | true | 0 | 11 | 87 | 80 | 39 | 41 | null | null |
gallais/potpourri | haskell/nurules/NormalForms.hs | gpl-3.0 | eraseNf Set = TM.Set | 27 | eraseNf Set = TM.Set | 27 | eraseNf Set = TM.Set | 27 | false | false | 0 | 5 | 10 | 12 | 5 | 7 | null | null |
FPtje/GLuaParser | src/GLua/Parser.hs | lgpl-2.1 | -- | Field separator
parseFieldSep :: AParser MToken
parseFieldSep = pMTok Comma <<|> pMTok Semicolon | 101 | parseFieldSep :: AParser MToken
parseFieldSep = pMTok Comma <<|> pMTok Semicolon | 80 | parseFieldSep = pMTok Comma <<|> pMTok Semicolon | 48 | true | true | 0 | 6 | 14 | 25 | 12 | 13 | null | null |
fryguybob/LaTeXGrapher | src/LaTeXGrapher/Diagrams.hs | bsd-3-clause | ntRadius :: Double
pointRadius = 5 | 34 | pointRadius :: Double
pointRadius = 5 | 37 | pointRadius = 5 | 15 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
jchl/jtrace | src/Operators.hs | mit | lessf ((VReal n2):(VReal n1):xs) = ((VBool (n1 < n2)):xs) | 57 | lessf ((VReal n2):(VReal n1):xs) = ((VBool (n1 < n2)):xs) | 57 | lessf ((VReal n2):(VReal n1):xs) = ((VBool (n1 < n2)):xs) | 57 | false | false | 0 | 10 | 8 | 52 | 27 | 25 | null | null |
ezyang/ghc | utils/genapply/Main.hs | bsd-3-clause | argRep _ = text "W_" | 22 | argRep _ = text "W_" | 22 | argRep _ = text "W_" | 22 | false | false | 0 | 4 | 6 | 13 | 5 | 8 | null | null |
wavewave/EventAnalysis | lib/HEP/Automation/EventAnalysis/Command.hs | bsd-2-clause | commandLineProcess (JsonTest fp) = do
putStrLn "jsontest called"
startJsonTest fp | 86 | commandLineProcess (JsonTest fp) = do
putStrLn "jsontest called"
startJsonTest fp | 86 | commandLineProcess (JsonTest fp) = do
putStrLn "jsontest called"
startJsonTest fp | 86 | false | false | 0 | 7 | 14 | 28 | 11 | 17 | null | null |
input-output-hk/pos-haskell-prototype | wallet/test/unit/Test/Spec/CoinSelection/Generators.hs | mit | genGroupedUtxo :: Int
-- ^ The number of groups to generate
-> InitialBalance
-> Gen Core.Utxo
genGroupedUtxo groups balance = do
let toHave = toLovelaces balance
-- This is the 'sink address' all of the Utxo entries have "paid into".
sinkAddress <- arbitrary `s... | 1,174 | genGroupedUtxo :: Int
-- ^ The number of groups to generate
-> InitialBalance
-> Gen Core.Utxo
genGroupedUtxo groups balance = do
let toHave = toLovelaces balance
-- This is the 'sink address' all of the Utxo entries have "paid into".
sinkAddress <- arbitrary `s... | 1,174 | genGroupedUtxo groups balance = do
let toHave = toLovelaces balance
-- This is the 'sink address' all of the Utxo entries have "paid into".
sinkAddress <- arbitrary `suchThat` (not . Core.isRedeemAddress)
-- Generate entries such that the unspent output has all the same address,
-- i.e. the 'sinkA... | 1,034 | false | true | 0 | 22 | 329 | 199 | 101 | 98 | null | null |
christiaanb/vhdl | Language/VHDL/AST.hs | bsd-3-clause | unsafeVHDLBasicId :: String -> VHDLId
unsafeVHDLBasicId str = Basic str | 71 | unsafeVHDLBasicId :: String -> VHDLId
unsafeVHDLBasicId str = Basic str | 71 | unsafeVHDLBasicId str = Basic str | 33 | false | true | 0 | 5 | 9 | 21 | 10 | 11 | null | null |
mosigo/haskell-sandbox | app/FastaParser.hs | bsd-3-clause | result :: (Show a) => Either a [FastaSequence] -> IO ()
result (Left err) = putStr "Parse error: " >> print err | 118 | result :: (Show a) => Either a [FastaSequence] -> IO ()
result (Left err) = putStr "Parse error: " >> print err | 118 | result (Left err) = putStr "Parse error: " >> print err | 62 | false | true | 0 | 8 | 28 | 56 | 27 | 29 | null | null |
micknelso/language-c | src/Language/CFamily/C/Syntax/Utils.hs | bsd-3-clause | getSubStmts (CSwitch _ s _) = [s] | 39 | getSubStmts (CSwitch _ s _) = [s] | 39 | getSubStmts (CSwitch _ s _) = [s] | 39 | false | false | 0 | 7 | 12 | 22 | 11 | 11 | null | null |
kawu/feature-structure | src/NLP/FeatureStructure/Parse.hs | bsd-2-clause | -- | A smart rule constructur.
mkRule :: ID -> [ID] -> Graph f a -> Rule f a
mkRule x xs g = Rule
{ root = x
, right = xs
, left = []
, graph = g } | 165 | mkRule :: ID -> [ID] -> Graph f a -> Rule f a
mkRule x xs g = Rule
{ root = x
, right = xs
, left = []
, graph = g } | 134 | mkRule x xs g = Rule
{ root = x
, right = xs
, left = []
, graph = g } | 88 | true | true | 0 | 8 | 59 | 72 | 40 | 32 | null | null |
dkensinger/haskell | haskell-primes/ONeillPrimesTest.hs | gpl-3.0 | --- The largest prime we can safely calculate with Int arithmetic is the
--- 105,095,435th prime, which is 2,147,437,291 (prime closest to
--- 2**31 - sqrt(2**31), but our nThPrimeApprox function overestimates,
--- so we have to limit choosing an the Int specializaton over the Integer
--- one at 103,945,550.
printNthP... | 481 | printNthPrime :: Int -> IO ()
printNthPrime n
| n < 103945550 = print (n, (primes !! (n - 1)) :: Int)
| otherwise = print (n, (primes !! (n - 1)) :: Integer) | 170 | printNthPrime n
| n < 103945550 = print (n, (primes !! (n - 1)) :: Int)
| otherwise = print (n, (primes !! (n - 1)) :: Integer) | 140 | true | true | 1 | 11 | 96 | 101 | 55 | 46 | null | null |
mcschroeder/ghc | compiler/prelude/THNames.hs | bsd-3-clause | funDepTyConKey = mkPreludeTyConUnique 222 | 50 | funDepTyConKey = mkPreludeTyConUnique 222 | 50 | funDepTyConKey = mkPreludeTyConUnique 222 | 50 | false | false | 0 | 5 | 12 | 9 | 4 | 5 | null | null |
ml9951/ghc | compiler/main/HscTypes.hs | bsd-3-clause | numToTrustInfo :: Word8 -> IfaceTrustInfo
numToTrustInfo 0 = setSafeMode Sf_None | 80 | numToTrustInfo :: Word8 -> IfaceTrustInfo
numToTrustInfo 0 = setSafeMode Sf_None | 80 | numToTrustInfo 0 = setSafeMode Sf_None | 38 | false | true | 0 | 7 | 9 | 26 | 11 | 15 | null | null |
geophf/1HaskellADay | exercises/HAD/Rosalind/Traits.hs | mit | -- And we also guarantee that a genotype crosses with a genotype of the same
-- characteristic. How? We'll develop that below.
-- 'Below' meaning now.
-- Given two parents each with a set of traits, write a function that proves
-- they both have the same signature
sameSignature :: Traits -> Traits -> Bool
sameSignat... | 367 | sameSignature :: Traits -> Traits -> Bool
sameSignature = uncurry (==) <<- curry (adjoin signature) | 99 | sameSignature = uncurry (==) <<- curry (adjoin signature) | 57 | true | true | 0 | 8 | 65 | 48 | 25 | 23 | null | null |
dselsam/tc | src/Kernel/TypeChecker/Internal.hs | gpl-3.0 | deqTryOr (deqFn:deqFns) = do
success <- lift $ runExceptT deqFn
case success of
Left True -> throwE True
_ -> deqTryOr deqFns
-- This exception means we know if they are equal or not | 195 | deqTryOr (deqFn:deqFns) = do
success <- lift $ runExceptT deqFn
case success of
Left True -> throwE True
_ -> deqTryOr deqFns
-- This exception means we know if they are equal or not | 195 | deqTryOr (deqFn:deqFns) = do
success <- lift $ runExceptT deqFn
case success of
Left True -> throwE True
_ -> deqTryOr deqFns
-- This exception means we know if they are equal or not | 195 | false | false | 0 | 10 | 46 | 60 | 27 | 33 | null | null |
yuroyoro/stashh | src/Stashh/AnsiColor.hs | bsd-3-clause | ansi :: String -> String -> String -> String
ansi on off txt = esc [on] ++ txt ++ esc [off] | 91 | ansi :: String -> String -> String -> String
ansi on off txt = esc [on] ++ txt ++ esc [off] | 91 | ansi on off txt = esc [on] ++ txt ++ esc [off] | 46 | false | true | 0 | 8 | 20 | 50 | 25 | 25 | null | null |
lennart96/printer | path/Path.hs | mit | getPos :: Pos (Int,Int)
getPos = lift $ gets $ \(x,y,_) -> (x,y) | 64 | getPos :: Pos (Int,Int)
getPos = lift $ gets $ \(x,y,_) -> (x,y) | 64 | getPos = lift $ gets $ \(x,y,_) -> (x,y) | 40 | false | true | 0 | 7 | 12 | 48 | 28 | 20 | null | null |
tomwadeson/cis194 | week7/JoinList.hs | mit | indexJ :: (Sized b, Monoid b) => Int -> JoinList b a -> Maybe a
indexJ _ Empty = Nothing | 88 | indexJ :: (Sized b, Monoid b) => Int -> JoinList b a -> Maybe a
indexJ _ Empty = Nothing | 88 | indexJ _ Empty = Nothing | 24 | false | true | 0 | 9 | 19 | 52 | 24 | 28 | null | null |
yesodweb/persistent | persistent/Database/Persist/Sql/Util.hs | mit | -- | Make a list 'PersistValue' suitable for database inserts. Pairs nicely
-- with the function 'mkInsertPlaceholders'.
--
-- Does not include generated columns.
--
-- @since 2.11.0.0
mkInsertValues
:: PersistEntity rec
=> rec
-> [PersistValue]
mkInsertValues entity =
Maybe.catMaybes
. zipWith ... | 791 | mkInsertValues
:: PersistEntity rec
=> rec
-> [PersistValue]
mkInsertValues entity =
Maybe.catMaybes
. zipWith redactGeneratedCol (getEntityFields . entityDef $ Just entity)
. map toPersistValue
$ toPersistFields entity
where
redactGeneratedCol fd pv = case fieldGenerated f... | 606 | mkInsertValues entity =
Maybe.catMaybes
. zipWith redactGeneratedCol (getEntityFields . entityDef $ Just entity)
. map toPersistValue
$ toPersistFields entity
where
redactGeneratedCol fd pv = case fieldGenerated fd of
Nothing ->
Just pv
Just _ ->
... | 533 | true | true | 0 | 11 | 192 | 123 | 62 | 61 | null | null |
kvelicka/Fizz | PictureDSL.hs | lgpl-2.1 | evalPicture :: (Enum a, Interp a, InvInterp a, Dataset d) => View d a -> IO HsScene
evalPicture (source :> (Surface pal level)) =
do field <- readData source
let values = datastream field
(dx,dy,dz) = dimensions $ samplings field
mkGrid = cubicGrid (dx, dy, dz)
points ... | 656 | evalPicture :: (Enum a, Interp a, InvInterp a, Dataset d) => View d a -> IO HsScene
evalPicture (source :> (Surface pal level)) =
do field <- readData source
let values = datastream field
(dx,dy,dz) = dimensions $ samplings field
mkGrid = cubicGrid (dx, dy, dz)
points ... | 656 | evalPicture (source :> (Surface pal level)) =
do field <- readData source
let values = datastream field
(dx,dy,dz) = dimensions $ samplings field
mkGrid = cubicGrid (dx, dy, dz)
points = mkGrid $ cubicPoints field
vcells = mkGrid $ values
tVa... | 572 | false | true | 0 | 11 | 219 | 226 | 114 | 112 | null | null |
kawamuray/ganeti | src/Ganeti/HTools/Cluster.hs | gpl-2.0 | availableGroupNodes :: [(Gdx, [Ndx])] -- ^ Group index/node index assoc list
-> IntSet.IntSet -- ^ Nodes that are excluded
-> Gdx -- ^ The group for which we
-- query the nodes
-> Result [Ndx] -- ^ List of av... | 684 | availableGroupNodes :: [(Gdx, [Ndx])] -- ^ Group index/node index assoc list
-> IntSet.IntSet -- ^ Nodes that are excluded
-> Gdx -- ^ The group for which we
-- query the nodes
-> Result [Ndx]
availableGroupNod... | 646 | availableGroupNodes group_nodes excl_ndx gdx = do
local_nodes <- maybe (Bad $ "Can't find group with index " ++ show gdx)
Ok (lookup gdx group_nodes)
let avail_nodes = filter (not . flip IntSet.member excl_ndx) local_nodes
return avail_nodes
-- | Updates the evac solution with the results of an ... | 343 | true | true | 0 | 14 | 227 | 127 | 66 | 61 | null | null |
jqpeterson/roc-translator | src/Protocol/ROC/FullyDefinedPointType.hs | bsd-3-clause | fbUnit107PT8 :: FB107PT8
fbUnit107PT8 = FDPT 107 pt8 60 0 defaultRxProtocol' | 77 | fbUnit107PT8 :: FB107PT8
fbUnit107PT8 = FDPT 107 pt8 60 0 defaultRxProtocol' | 76 | fbUnit107PT8 = FDPT 107 pt8 60 0 defaultRxProtocol' | 51 | false | true | 0 | 6 | 11 | 28 | 12 | 16 | null | null |
csabahruska/GFXDemo | GLBackend.hs | bsd-3-clause | --setUniform _ _ _ = return False
checkUniform' :: ByteString -> GLProgram -> UniformType -> (GLint -> IO ()) -> IO Bool
checkUniform' name p t f = case T.lookup name $ glpUniforms p of
Nothing -> return False
Just (i,t') -> if t /= t' then return False else f (fromIntegral i) >> return True | 301 | checkUniform' :: ByteString -> GLProgram -> UniformType -> (GLint -> IO ()) -> IO Bool
checkUniform' name p t f = case T.lookup name $ glpUniforms p of
Nothing -> return False
Just (i,t') -> if t /= t' then return False else f (fromIntegral i) >> return True | 266 | checkUniform' name p t f = case T.lookup name $ glpUniforms p of
Nothing -> return False
Just (i,t') -> if t /= t' then return False else f (fromIntegral i) >> return True | 179 | true | true | 0 | 12 | 64 | 123 | 60 | 63 | null | null |
sifisifi/jpsubreddits | src/JPSubreddits/Source/Newsokur.hs | mit | extract :: XML.Document -> [(CategoryName, [(Title, Url)])]
extract doc = map category tables
where
c = XML.fromDocument doc
tables = c $// XML.attributeIs "class" "md wiki" &// XML.element "table"
-- | tableへのCursorを渡す | 230 | extract :: XML.Document -> [(CategoryName, [(Title, Url)])]
extract doc = map category tables
where
c = XML.fromDocument doc
tables = c $// XML.attributeIs "class" "md wiki" &// XML.element "table"
-- | tableへのCursorを渡す | 230 | extract doc = map category tables
where
c = XML.fromDocument doc
tables = c $// XML.attributeIs "class" "md wiki" &// XML.element "table"
-- | tableへのCursorを渡す | 170 | false | true | 4 | 11 | 42 | 94 | 44 | 50 | null | null |
ddssff/pandoc | src/Text/Pandoc/Readers/Org.hs | gpl-2.0 | divWithClass :: String -> Blocks -> Blocks
divWithClass cls = B.divWith ("", [cls], []) | 87 | divWithClass :: String -> Blocks -> Blocks
divWithClass cls = B.divWith ("", [cls], []) | 87 | divWithClass cls = B.divWith ("", [cls], []) | 44 | false | true | 0 | 7 | 13 | 41 | 22 | 19 | null | null |
brendanhay/gogol | gogol-slides/gen/Network/Google/Slides/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'DuplicateObjectRequestObjectIds' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'doroiAddtional'
duplicateObjectRequestObjectIds
:: HashMap Text Text -- ^ 'doroiAddtional'
-> DuplicateObjectRequestObje... | 462 | duplicateObjectRequestObjectIds
:: HashMap Text Text -- ^ 'doroiAddtional'
-> DuplicateObjectRequestObjectIds
duplicateObjectRequestObjectIds pDoroiAddtional_ =
DuplicateObjectRequestObjectIds'
{_doroiAddtional = _Coerce # pDoroiAddtional_} | 254 | duplicateObjectRequestObjectIds pDoroiAddtional_ =
DuplicateObjectRequestObjectIds'
{_doroiAddtional = _Coerce # pDoroiAddtional_} | 136 | true | true | 0 | 7 | 66 | 41 | 24 | 17 | null | null |
leshchevds/ganeti | src/Ganeti/HTools/ExtLoader.hs | bsd-2-clause | maybeSaveData :: Maybe FilePath -- ^ The file prefix to save to
-> String -- ^ The suffix (extension) to add
-> String -- ^ Informational message
-> ClusterData -- ^ The cluster data
-> IO ()
maybeSaveData Nothing _ _ _ = return () | 306 | maybeSaveData :: Maybe FilePath -- ^ The file prefix to save to
-> String -- ^ The suffix (extension) to add
-> String -- ^ Informational message
-> ClusterData -- ^ The cluster data
-> IO ()
maybeSaveData Nothing _ _ _ = return () | 306 | maybeSaveData Nothing _ _ _ = return () | 39 | false | true | 0 | 10 | 119 | 53 | 27 | 26 | null | null |
nevrenato/HetsAlloy | HolLight/Helper.hs | gpl-2.0 | fromRight :: Either t t1 -> t1
fromRight e = case e of
Right t -> t
Left _ -> error "fromRight" | 99 | fromRight :: Either t t1 -> t1
fromRight e = case e of
Right t -> t
Left _ -> error "fromRight" | 99 | fromRight e = case e of
Right t -> t
Left _ -> error "fromRight" | 68 | false | true | 3 | 6 | 25 | 46 | 22 | 24 | null | null |
binesiyu/ifl | examples/ch06/ClassResult.hs | mit | result :: JValue
result = toJValue (jobject [
("query", toJValue "awkward squad haskell"),
("estimatedCount", toJValue (3920::Int)),
("moreResults", toJValue True)
]) | 245 | result :: JValue
result = toJValue (jobject [
("query", toJValue "awkward squad haskell"),
("estimatedCount", toJValue (3920::Int)),
("moreResults", toJValue True)
]) | 245 | result = toJValue (jobject [
("query", toJValue "awkward squad haskell"),
("estimatedCount", toJValue (3920::Int)),
("moreResults", toJValue True)
]) | 228 | false | true | 0 | 11 | 98 | 62 | 35 | 27 | null | null |
iljakuklic/eel-proto | src/Backend/Runtime.hs | bsd-3-clause | unPair _ _ _ = error "unPair: wrong type" | 41 | unPair _ _ _ = error "unPair: wrong type" | 41 | unPair _ _ _ = error "unPair: wrong type" | 41 | false | false | 0 | 5 | 8 | 16 | 7 | 9 | null | null |
yuttie/ghc-mod | Language/Haskell/GhcMod/Doc.hs | bsd-3-clause | -- Not used
showQualifiedOneLine :: DynFlags -> SDoc -> String
showQualifiedOneLine dflag = showDocWith OneLineMode . withStyle dflag styleQualified | 148 | showQualifiedOneLine :: DynFlags -> SDoc -> String
showQualifiedOneLine dflag = showDocWith OneLineMode . withStyle dflag styleQualified | 136 | showQualifiedOneLine dflag = showDocWith OneLineMode . withStyle dflag styleQualified | 85 | true | true | 0 | 6 | 18 | 35 | 17 | 18 | null | null |
diffusionkinetics/open | stanhs/lib/Stan/AST.hs | mit | normal :: (Expr , Expr) -> (String, [Expr])
normal (mn, sd) = ("normal", [mn,sd]) | 81 | normal :: (Expr , Expr) -> (String, [Expr])
normal (mn, sd) = ("normal", [mn,sd]) | 81 | normal (mn, sd) = ("normal", [mn,sd]) | 37 | false | true | 0 | 7 | 13 | 51 | 31 | 20 | null | null |
LinusU/fbthrift | thrift/lib/hs/Thrift/Protocol/JSON.hs | apache-2.0 | parseJSONStruct :: TypeMap -> Parser (Map.HashMap Int16 (LT.Text, ThriftVal))
parseJSONStruct _ = Map.fromList <$> parseField `sepBy` lexeme (PC.char8 ',')
where
parseField = do
fid <- lexeme (between '"' '"' decimal) <* lexeme (PC.char8 ':')
between '{' '}' $ do
ty <- fromTypeName <$> lexeme ... | 432 | parseJSONStruct :: TypeMap -> Parser (Map.HashMap Int16 (LT.Text, ThriftVal))
parseJSONStruct _ = Map.fromList <$> parseField `sepBy` lexeme (PC.char8 ',')
where
parseField = do
fid <- lexeme (between '"' '"' decimal) <* lexeme (PC.char8 ':')
between '{' '}' $ do
ty <- fromTypeName <$> lexeme ... | 432 | parseJSONStruct _ = Map.fromList <$> parseField `sepBy` lexeme (PC.char8 ',')
where
parseField = do
fid <- lexeme (between '"' '"' decimal) <* lexeme (PC.char8 ':')
between '{' '}' $ do
ty <- fromTypeName <$> lexeme escapedString <* lexeme (PC.char8 ':')
val <- lexeme (parseJSONValue t... | 354 | false | true | 0 | 15 | 99 | 180 | 87 | 93 | null | null |
rvion/lamdu | Lamdu/Data/Anchors.hs | gpl-3.0 | makePane :: DefI m -> Pane m
makePane = id | 42 | makePane :: DefI m -> Pane m
makePane = id | 42 | makePane = id | 13 | false | true | 0 | 6 | 9 | 21 | 10 | 11 | null | null |
randen/haddock | haddock-api/src/Haddock/Interface/Rename.hs | bsd-2-clause | renameLSigWcType :: LHsSigWcType Name -> RnM (LHsSigWcType DocName)
renameLSigWcType = renameImplicit (renameWc renameLType) | 124 | renameLSigWcType :: LHsSigWcType Name -> RnM (LHsSigWcType DocName)
renameLSigWcType = renameImplicit (renameWc renameLType) | 124 | renameLSigWcType = renameImplicit (renameWc renameLType) | 56 | false | true | 0 | 9 | 12 | 42 | 18 | 24 | null | null |
roman/Haskell-Reactive-Extensions | rx-core/src/Rx/Observable/Merge.hs | mit | mergeList :: [Observable Async a] -> Observable Async a
mergeList =
merge . Observable.fromList currentThread | 111 | mergeList :: [Observable Async a] -> Observable Async a
mergeList =
merge . Observable.fromList currentThread | 111 | mergeList =
merge . Observable.fromList currentThread | 55 | false | true | 0 | 7 | 16 | 37 | 18 | 19 | null | null |
ayachigin/DeepLearningFromScratch | src/Optimizer.hs | bsd-3-clause | updateMomentum :: Double -> Double -> Momentum -> NN -> Gradients ->
(NN, Momentum)
updateMomentum m lr vs n gs = (newNN, m')
where
newNN = zipWith f n m'
f (w, b, fn) (mw, mb) = ( computeS $ w +^ mw
, computeS $ b +^ mb
, fn)
m' = zi... | 646 | updateMomentum :: Double -> Double -> Momentum -> NN -> Gradients ->
(NN, Momentum)
updateMomentum m lr vs n gs = (newNN, m')
where
newNN = zipWith f n m'
f (w, b, fn) (mw, mb) = ( computeS $ w +^ mw
, computeS $ b +^ mb
, fn)
m' = zi... | 646 | updateMomentum m lr vs n gs = (newNN, m')
where
newNN = zipWith f n m'
f (w, b, fn) (mw, mb) = ( computeS $ w +^ mw
, computeS $ b +^ mb
, fn)
m' = zipWith g vs gs
g :: (Weight, Bias) -> ([Double], [Double]) -> (Weight, Bias)
g (vw, vb) (gw, gb... | 544 | false | true | 4 | 12 | 247 | 325 | 166 | 159 | null | null |
k-bx/riak-haskell-client | src/Network/Riak/Request.hs | apache-2.0 | -- | Create a get-bucket-type request. The bucket type is URL-escaped.
getBucketType :: BucketType -> GetBucketType.GetBucketTypeRequest
getBucketType t = GetBucketType.GetBucketTypeRequest (escape t) | 201 | getBucketType :: BucketType -> GetBucketType.GetBucketTypeRequest
getBucketType t = GetBucketType.GetBucketTypeRequest (escape t) | 129 | getBucketType t = GetBucketType.GetBucketTypeRequest (escape t) | 63 | true | true | 0 | 8 | 22 | 37 | 17 | 20 | null | null |
forste/haReFork | refactorer/RefacFunDef.hs | bsd-3-clause | zipHighlightedMatch b pats w (exp1@(Exp (HsExpTypeSig _ e1 c1 t1))::HsExpP)
(exp2::HsExpP)
= return [Nothing] | 125 | zipHighlightedMatch b pats w (exp1@(Exp (HsExpTypeSig _ e1 c1 t1))::HsExpP)
(exp2::HsExpP)
= return [Nothing] | 125 | zipHighlightedMatch b pats w (exp1@(Exp (HsExpTypeSig _ e1 c1 t1))::HsExpP)
(exp2::HsExpP)
= return [Nothing] | 125 | false | false | 0 | 12 | 29 | 58 | 30 | 28 | null | null |
fmapfmapfmap/amazonka | amazonka-datapipeline/test/Test/AWS/Gen/DataPipeline.hs | mpl-2.0 | testPutPipelineDefinitionResponse :: PutPipelineDefinitionResponse -> TestTree
testPutPipelineDefinitionResponse = res
"PutPipelineDefinitionResponse"
"fixture/PutPipelineDefinitionResponse.proto"
dataPipeline
(Proxy :: Proxy PutPipelineDefinition) | 264 | testPutPipelineDefinitionResponse :: PutPipelineDefinitionResponse -> TestTree
testPutPipelineDefinitionResponse = res
"PutPipelineDefinitionResponse"
"fixture/PutPipelineDefinitionResponse.proto"
dataPipeline
(Proxy :: Proxy PutPipelineDefinition) | 264 | testPutPipelineDefinitionResponse = res
"PutPipelineDefinitionResponse"
"fixture/PutPipelineDefinitionResponse.proto"
dataPipeline
(Proxy :: Proxy PutPipelineDefinition) | 185 | false | true | 0 | 6 | 30 | 36 | 17 | 19 | null | null |
AlexeyRaga/eta | compiler/ETA/CodeGen/Prim.hs | bsd-3-clause | ctzOp = invokestatic $ mkMethodRef "java/lang/Integer" "numberOfTrailingZeros" [jint] (ret jint) | 96 | ctzOp = invokestatic $ mkMethodRef "java/lang/Integer" "numberOfTrailingZeros" [jint] (ret jint) | 96 | ctzOp = invokestatic $ mkMethodRef "java/lang/Integer" "numberOfTrailingZeros" [jint] (ret jint) | 96 | false | false | 1 | 8 | 9 | 31 | 14 | 17 | null | null |
elieux/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | eqName = varQual gHC_CLASSES (fsLit "==") eqClassOpKey | 70 | eqName = varQual gHC_CLASSES (fsLit "==") eqClassOpKey | 70 | eqName = varQual gHC_CLASSES (fsLit "==") eqClassOpKey | 70 | false | false | 0 | 7 | 22 | 19 | 9 | 10 | null | null |
changlinli/tictactoe-haskell | Tictactoe.hs | gpl-3.0 | evalFunc _ = error "evalFunc: Called evalFunc on a state which has no board to evaluate!" | 89 | evalFunc _ = error "evalFunc: Called evalFunc on a state which has no board to evaluate!" | 89 | evalFunc _ = error "evalFunc: Called evalFunc on a state which has no board to evaluate!" | 89 | false | false | 0 | 5 | 15 | 12 | 5 | 7 | null | null |
tomtitchener/Canon | tests/Canon/UtilsTest.hs | cc0-1.0 | writeFJScalesCanon :: (Score -> a) -> [Instrument] -> [Scale] -> [Int] -> Rational -> a
writeFJScalesCanon scoreWriter instruments scales octaveInts dur =
scoreWriter score
where
octaves = map Octave octaveInts
scalesCanon = createFJScalesCanon instruments scales octaves dur
score = scalesCano... | 494 | writeFJScalesCanon :: (Score -> a) -> [Instrument] -> [Scale] -> [Int] -> Rational -> a
writeFJScalesCanon scoreWriter instruments scales octaveInts dur =
scoreWriter score
where
octaves = map Octave octaveInts
scalesCanon = createFJScalesCanon instruments scales octaves dur
score = scalesCano... | 494 | writeFJScalesCanon scoreWriter instruments scales octaveInts dur =
scoreWriter score
where
octaves = map Octave octaveInts
scalesCanon = createFJScalesCanon instruments scales octaves dur
score = scalesCanonToScore scalesCanon
-- | Generate test data for scales canon
-- writeFJScalesCan... | 406 | false | true | 0 | 9 | 96 | 98 | 51 | 47 | null | null |
sixohsix/hmidi | examples/playmidi.hs | bsd-3-clause | - player thread
player :: Connection -> MVar [MidiEvent] -> IO ()
player conn mv = do
t <- currentTime conn
evs <- readMVar mv
case evs of
[] -> do
putStrLn "the song ended."
return ()
(MidiEvent s ev):evs' -> do
when (s<=t) $ do
swapMVar mv evs'
case ev of
Sys... | 462 | player :: Connection -> MVar [MidiEvent] -> IO ()
player conn mv = do
t <- currentTime conn
evs <- readMVar mv
case evs of
[] -> do
putStrLn "the song ended."
return ()
(MidiEvent s ev):evs' -> do
when (s<=t) $ do
swapMVar mv evs'
case ev of
SysEx _ -> return ... | 444 | player conn mv = do
t <- currentTime conn
evs <- readMVar mv
case evs of
[] -> do
putStrLn "the song ended."
return ()
(MidiEvent s ev):evs' -> do
when (s<=t) $ do
swapMVar mv evs'
case ev of
SysEx _ -> return ()
Undefined -> return ()
_ ... | 394 | true | true | 0 | 19 | 175 | 197 | 86 | 111 | null | null |
hguenther/smtlib2 | extras/composite/Language/SMTLib2/Composite/Container.hs | gpl-3.0 | updateList' (AccFun f g acc) x = do
lst <- updateList' acc (f x)
return $ fmap (\(path,cond,el,upd)
-> (PathFun f g path,cond,el,
\cx nel -> do
ny <- upd (f cx) nel
return $ g ny)
) lst | 289 | updateList' (AccFun f g acc) x = do
lst <- updateList' acc (f x)
return $ fmap (\(path,cond,el,upd)
-> (PathFun f g path,cond,el,
\cx nel -> do
ny <- upd (f cx) nel
return $ g ny)
) lst | 289 | updateList' (AccFun f g acc) x = do
lst <- updateList' acc (f x)
return $ fmap (\(path,cond,el,upd)
-> (PathFun f g path,cond,el,
\cx nel -> do
ny <- upd (f cx) nel
return $ g ny)
) lst | 289 | false | false | 0 | 18 | 142 | 125 | 63 | 62 | null | null |
enolan/cabal | Cabal/tests/PackageTests/PackageTester.hs | bsd-3-clause | cabal_test :: SuiteConfig -> PackageSpec -> [(String, Maybe String)]
-> [String] -> IO Result
cabal_test config spec envOverrides extraArgs = do
res <- cabal config spec envOverrides ("test" : extraArgs)
let r = recordRun res TestSuccess nullResult
record spec r
return r | 298 | cabal_test :: SuiteConfig -> PackageSpec -> [(String, Maybe String)]
-> [String] -> IO Result
cabal_test config spec envOverrides extraArgs = do
res <- cabal config spec envOverrides ("test" : extraArgs)
let r = recordRun res TestSuccess nullResult
record spec r
return r | 298 | cabal_test config spec envOverrides extraArgs = do
res <- cabal config spec envOverrides ("test" : extraArgs)
let r = recordRun res TestSuccess nullResult
record spec r
return r | 193 | false | true | 0 | 10 | 68 | 107 | 51 | 56 | null | null |
mcschroeder/ghc | compiler/basicTypes/DataCon.hs | bsd-3-clause | -- | Was this tycon promotable before GHC 8.0? That is, is it promotable
-- without -XTypeInType
isLegacyPromotableTyCon :: TyCon -> Bool
isLegacyPromotableTyCon tc
= isVanillaAlgTyCon tc ||
-- This returns True more often than it should, but it's quite painful
-- to make this fully accurate. And no harm ... | 528 | isLegacyPromotableTyCon :: TyCon -> Bool
isLegacyPromotableTyCon tc
= isVanillaAlgTyCon tc ||
-- This returns True more often than it should, but it's quite painful
-- to make this fully accurate. And no harm is caused; we just don't
-- require -XTypeInType every time we need to. (We'll always requi... | 431 | isLegacyPromotableTyCon tc
= isVanillaAlgTyCon tc ||
-- This returns True more often than it should, but it's quite painful
-- to make this fully accurate. And no harm is caused; we just don't
-- require -XTypeInType every time we need to. (We'll always require
-- -XDataKinds, though, so there... | 390 | true | true | 0 | 7 | 108 | 41 | 22 | 19 | null | null |
mamapanda/8-Puzzle-Solver | src/Search.hs | bsd-3-clause | solvePuzzleThreaded::[[Int]] -> IO Node
solvePuzzleThreaded state =
do let node = Node state 0 EmptyNode
children = Node.children node
solution <- newEmptyMVar
explored <- newMVar $ Set.insert node Set.empty
let searchThreaded' n =
forkIO $ searchThreaded n explored solution
th... | 513 | solvePuzzleThreaded::[[Int]] -> IO Node
solvePuzzleThreaded state =
do let node = Node state 0 EmptyNode
children = Node.children node
solution <- newEmptyMVar
explored <- newMVar $ Set.insert node Set.empty
let searchThreaded' n =
forkIO $ searchThreaded n explored solution
th... | 513 | solvePuzzleThreaded state =
do let node = Node state 0 EmptyNode
children = Node.children node
solution <- newEmptyMVar
explored <- newMVar $ Set.insert node Set.empty
let searchThreaded' n =
forkIO $ searchThreaded n explored solution
threadIds <- mapM searchThreaded' children... | 473 | false | true | 0 | 11 | 124 | 140 | 63 | 77 | null | null |
coolhacks/scripts-hacks | examples/shellcheck-master/ShellCheck/Analytics.hs | mit | prop_checkConstantIfs2a= verify checkConstantIfs "[ n -le 4 ]" | 62 | prop_checkConstantIfs2a= verify checkConstantIfs "[ n -le 4 ]" | 62 | prop_checkConstantIfs2a= verify checkConstantIfs "[ n -le 4 ]" | 62 | false | false | 0 | 5 | 7 | 11 | 5 | 6 | null | null |
keera-studios/hsQt | Qtc/Enums/Gui/QImage.hs | bsd-2-clause | eQImageFormat_RGB444 :: QImageFormat
eQImageFormat_RGB444
= ieQImageFormat $ 14 | 81 | eQImageFormat_RGB444 :: QImageFormat
eQImageFormat_RGB444
= ieQImageFormat $ 14 | 81 | eQImageFormat_RGB444
= ieQImageFormat $ 14 | 44 | false | true | 0 | 6 | 9 | 18 | 8 | 10 | null | null |
NCrashed/hjass | src/library/Language/Jass/Codegen/Expression.hs | mit | genBinaryOp AST.Reminder rest left right
| isIntegralType rest = LLVM.SRem (LocalReference rest left) (LocalReference rest right) []
| otherwise = LLVM.FRem fastMathflags (LocalReference rest left) (LocalReference rest right) [] | 232 | genBinaryOp AST.Reminder rest left right
| isIntegralType rest = LLVM.SRem (LocalReference rest left) (LocalReference rest right) []
| otherwise = LLVM.FRem fastMathflags (LocalReference rest left) (LocalReference rest right) [] | 232 | genBinaryOp AST.Reminder rest left right
| isIntegralType rest = LLVM.SRem (LocalReference rest left) (LocalReference rest right) []
| otherwise = LLVM.FRem fastMathflags (LocalReference rest left) (LocalReference rest right) [] | 232 | false | false | 0 | 8 | 32 | 102 | 44 | 58 | null | null |
nikmikov/hpbf | app/Main.hs | gpl-3.0 | createLinks :: IO Int
createLinks = do
links <- mmapLinks
nodes <- mmapNodes
linkNodes <- mmapOsmWayNodes
junctions <- mmapJunctions
nodeRefCounter <- mmapNodesRefCounter
runResourceT $
osmWaysWithNodeIds links linkNodes
$$ RG.sinkExportLinks nodes nodeRefCounter junctions | 293 | createLinks :: IO Int
createLinks = do
links <- mmapLinks
nodes <- mmapNodes
linkNodes <- mmapOsmWayNodes
junctions <- mmapJunctions
nodeRefCounter <- mmapNodesRefCounter
runResourceT $
osmWaysWithNodeIds links linkNodes
$$ RG.sinkExportLinks nodes nodeRefCounter junctions | 293 | createLinks = do
links <- mmapLinks
nodes <- mmapNodes
linkNodes <- mmapOsmWayNodes
junctions <- mmapJunctions
nodeRefCounter <- mmapNodesRefCounter
runResourceT $
osmWaysWithNodeIds links linkNodes
$$ RG.sinkExportLinks nodes nodeRefCounter junctions | 271 | false | true | 0 | 9 | 51 | 74 | 33 | 41 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.