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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Fuuzetsu/yi-emacs-colours | src/Yi/Style/EmacsColours.hs | gpl-2.0 | -- | Names: @["green4"]@
--
-- R0 G139 B0, 0x008b00
green4 :: Color
green4 = RGB 0 139 0 | 88 | green4 :: Color
green4 = RGB 0 139 0 | 36 | green4 = RGB 0 139 0 | 20 | true | true | 0 | 6 | 18 | 27 | 13 | 14 | null | null |
j-mueller/hldb | webapp/Graphics/Rendering/SVG.hs | bsd-3-clause | renderStyles :: SVGFloat n => Int -> Int -> Style v n -> [Attribute]
renderStyles fillId lineId s =
concatMap ($ s) $
[ renderLineTexture lineId
, renderFillTexture fillId
, renderLineWidth
, renderLineCap
, renderLineJoin
, renderFillRule
, renderDashing
, renderOpacity
, render... | 420 | renderStyles :: SVGFloat n => Int -> Int -> Style v n -> [Attribute]
renderStyles fillId lineId s =
concatMap ($ s) $
[ renderLineTexture lineId
, renderFillTexture fillId
, renderLineWidth
, renderLineCap
, renderLineJoin
, renderFillRule
, renderDashing
, renderOpacity
, render... | 420 | renderStyles fillId lineId s =
concatMap ($ s) $
[ renderLineTexture lineId
, renderFillTexture fillId
, renderLineWidth
, renderLineCap
, renderLineJoin
, renderFillRule
, renderDashing
, renderOpacity
, renderFontSize
, renderFontSlant
, renderFontWeight
, renderFon... | 351 | false | true | 0 | 9 | 106 | 101 | 56 | 45 | null | null |
nevrenato/HetsAlloy | Driver/ReadFn.hs | gpl-2.0 | guessXmlContent :: Bool -> String -> Either String InType
guessXmlContent isXml str = case dropWhile isSpace str of
'<' : _ -> case parseXMLDoc str of
Nothing -> Right GuessIn
Just e -> case elName e of
q | isDgXml q -> Right DgXml
| isRDF q -> Right
$ if any (isOWLOnto . elName) $ elChildren e ... | 622 | guessXmlContent :: Bool -> String -> Either String InType
guessXmlContent isXml str = case dropWhile isSpace str of
'<' : _ -> case parseXMLDoc str of
Nothing -> Right GuessIn
Just e -> case elName e of
q | isDgXml q -> Right DgXml
| isRDF q -> Right
$ if any (isOWLOnto . elName) $ elChildren e ... | 622 | guessXmlContent isXml str = case dropWhile isSpace str of
'<' : _ -> case parseXMLDoc str of
Nothing -> Right GuessIn
Just e -> case elName e of
q | isDgXml q -> Right DgXml
| isRDF q -> Right
$ if any (isOWLOnto . elName) $ elChildren e then OWLIn else RDFIn
| isDMU q -> Left "unexpected ... | 564 | false | true | 0 | 20 | 163 | 229 | 103 | 126 | null | null |
ezyang/ghc | compiler/profiling/CostCentre.hs | bsd-3-clause | costCentreUserNameFS (NormalCC {cc_name = name, cc_is_caf = is_caf})
= case is_caf of
CafCC -> mkFastString "CAF:" `appendFS` name
_ -> name | 159 | costCentreUserNameFS (NormalCC {cc_name = name, cc_is_caf = is_caf})
= case is_caf of
CafCC -> mkFastString "CAF:" `appendFS` name
_ -> name | 159 | costCentreUserNameFS (NormalCC {cc_name = name, cc_is_caf = is_caf})
= case is_caf of
CafCC -> mkFastString "CAF:" `appendFS` name
_ -> name | 159 | false | false | 0 | 9 | 39 | 53 | 28 | 25 | null | null |
kowey/GenI | geni-gui/src/NLP/GenI/Graphviz.hs | gpl-2.0 | toGraphviz :: GraphvizShow a => a
-> String -- ^ the 'dotFile'
-> String -> IO FilePath
toGraphviz x dotFile outputFile = do
T.writeFile dotFile (printIt g)
runGraphviz g Png outputFile
where
g = graphvizShowGraph x
-- ---------------------... | 469 | toGraphviz :: GraphvizShow a => a
-> String -- ^ the 'dotFile'
-> String -> IO FilePath
toGraphviz x dotFile outputFile = do
T.writeFile dotFile (printIt g)
runGraphviz g Png outputFile
where
g = graphvizShowGraph x
-- ---------------------... | 469 | toGraphviz x dotFile outputFile = do
T.writeFile dotFile (printIt g)
runGraphviz g Png outputFile
where
g = graphvizShowGraph x
-- ---------------------------------------------------------------------
-- useful utility functions
-- --------------------------------------------------------------------- | 311 | false | true | 1 | 10 | 123 | 89 | 40 | 49 | null | null |
zjhmale/HMF | src/FCP/Ast.hs | bsd-3-clause | simple expr = do
exprV <- complex expr
return $ "(" ++ exprV ++ ")" | 75 | simple expr = do
exprV <- complex expr
return $ "(" ++ exprV ++ ")" | 75 | simple expr = do
exprV <- complex expr
return $ "(" ++ exprV ++ ")" | 75 | false | false | 0 | 9 | 22 | 34 | 15 | 19 | null | null |
apunktbau/co4 | src/CO4/THUtil.hs | gpl-3.0 | typedWildcard :: TH.Type -> TH.Pat
typedWildcard = TH.SigP TH.WildP | 67 | typedWildcard :: TH.Type -> TH.Pat
typedWildcard = TH.SigP TH.WildP | 67 | typedWildcard = TH.SigP TH.WildP | 32 | false | true | 0 | 8 | 8 | 32 | 14 | 18 | null | null |
romanofski/codesnippets | binSearch/binsearch.hs | unlicense | binsearch x [y] = 0 | 20 | binsearch x [y] = 0 | 20 | binsearch x [y] = 0 | 20 | false | false | 0 | 6 | 5 | 14 | 7 | 7 | null | null |
GaloisInc/halvm-ghc | libraries/template-haskell/Language/Haskell/TH/Ppr.hs | bsd-3-clause | ppr_tySyn :: Doc -> Name -> Doc -> Type -> Doc
ppr_tySyn maybeInst t argsDoc rhs
= text "type" <+> maybeInst <+> ppr t <+> argsDoc <+> text "=" <+> ppr rhs | 157 | ppr_tySyn :: Doc -> Name -> Doc -> Type -> Doc
ppr_tySyn maybeInst t argsDoc rhs
= text "type" <+> maybeInst <+> ppr t <+> argsDoc <+> text "=" <+> ppr rhs | 157 | ppr_tySyn maybeInst t argsDoc rhs
= text "type" <+> maybeInst <+> ppr t <+> argsDoc <+> text "=" <+> ppr rhs | 110 | false | true | 2 | 10 | 33 | 74 | 33 | 41 | null | null |
Palmik/data-store | src/Data/Store/Internal/Function.hs | bsd-3-clause | indexDeleteID :: I.IKey krs ts
-> Int
-> I.Index irs ts
-> I.Index irs ts
indexDeleteID ik eid = zipD ik
where
zipD :: I.IKey krs ts -> I.Index irs ts -> I.Index irs ts
zipD (I.KN kd kt) (I.IN ixd it) = I.IN (combine kd ixd) $! zipD kt it
zipD (I.K1 kd) (I.I1 ixd)... | 1,476 | indexDeleteID :: I.IKey krs ts
-> Int
-> I.Index irs ts
-> I.Index irs ts
indexDeleteID ik eid = zipD ik
where
zipD :: I.IKey krs ts -> I.Index irs ts -> I.Index irs ts
zipD (I.KN kd kt) (I.IN ixd it) = I.IN (combine kd ixd) $! zipD kt it
zipD (I.K1 kd) (I.I1 ixd)... | 1,476 | indexDeleteID ik eid = zipD ik
where
zipD :: I.IKey krs ts -> I.Index irs ts -> I.Index irs ts
zipD (I.KN kd kt) (I.IN ixd it) = I.IN (combine kd ixd) $! zipD kt it
zipD (I.K1 kd) (I.I1 ixd) = I.I1 $! combine kd ixd
zipD _ _ = error $ moduleName <> ".indexDeleteID.zipD: The impossible happened."
{... | 1,360 | false | true | 0 | 13 | 410 | 589 | 293 | 296 | null | null |
phischu/fragnix | tests/packages/scotty/System.EasyFile.FilePath.hs | bsd-3-clause | -- | Is an element a drive
isDrive :: FilePath -> Bool
isDrive = null . dropDrive | 81 | isDrive :: FilePath -> Bool
isDrive = null . dropDrive | 54 | isDrive = null . dropDrive | 26 | true | true | 0 | 5 | 16 | 20 | 11 | 9 | null | null |
elieux/ghc | compiler/typecheck/TcEvidence.hs | bsd-3-clause | evTermCoercion :: EvTerm -> TcCoercion
-- Applied only to EvTerms of type (s~t)
-- See Note [Coercion evidence terms]
evTermCoercion (EvId v) = mkTcCoVarCo v | 164 | evTermCoercion :: EvTerm -> TcCoercion
evTermCoercion (EvId v) = mkTcCoVarCo v | 85 | evTermCoercion (EvId v) = mkTcCoVarCo v | 46 | true | true | 0 | 7 | 31 | 29 | 15 | 14 | null | null |
iamkingmaker/HLearn | src/HLearn/Data/Graph.hs | bsd-3-clause | h4 = edgeList2UndirectedGraph 3 $ [(1,1),(0,1),(0,2),(2,2)] | 59 | h4 = edgeList2UndirectedGraph 3 $ [(1,1),(0,1),(0,2),(2,2)] | 59 | h4 = edgeList2UndirectedGraph 3 $ [(1,1),(0,1),(0,2),(2,2)] | 59 | false | false | 1 | 8 | 5 | 53 | 30 | 23 | null | null |
TomMD/ghc | compiler/basicTypes/RdrName.hs | bsd-3-clause | extendLocalRdrEnv :: LocalRdrEnv -> Name -> LocalRdrEnv
-- The Name should be a non-top-level thing
extendLocalRdrEnv (LRE { lre_env = env, lre_in_scope = ns }) name
= WARN( isExternalName name, ppr name )
LRE { lre_env = extendOccEnv env (nameOccName name) name
, lre_in_scope = extendNameSet ns name... | 322 | extendLocalRdrEnv :: LocalRdrEnv -> Name -> LocalRdrEnv
extendLocalRdrEnv (LRE { lre_env = env, lre_in_scope = ns }) name
= WARN( isExternalName name, ppr name )
LRE { lre_env = extendOccEnv env (nameOccName name) name
, lre_in_scope = extendNameSet ns name } | 278 | extendLocalRdrEnv (LRE { lre_env = env, lre_in_scope = ns }) name
= WARN( isExternalName name, ppr name )
LRE { lre_env = extendOccEnv env (nameOccName name) name
, lre_in_scope = extendNameSet ns name } | 222 | true | true | 0 | 9 | 67 | 93 | 49 | 44 | null | null |
hnakamur/haskell-sandbox | sandbox-css/SandBox/Text/CSS/Types.hs | bsd-3-clause | getSubSelList (TypeSel _ ss) = ss | 33 | getSubSelList (TypeSel _ ss) = ss | 33 | getSubSelList (TypeSel _ ss) = ss | 33 | false | false | 0 | 7 | 5 | 17 | 8 | 9 | null | null |
ericmoritz/deps | src/Downloaders/Git.hs | bsd-3-clause | safeTail (_:xs) = Just xs | 25 | safeTail (_:xs) = Just xs | 25 | safeTail (_:xs) = Just xs | 25 | false | false | 0 | 6 | 4 | 20 | 9 | 11 | null | null |
L8D/yabi | lib/Yabi/Engine.hs | mit | unshift :: Word8 -> Lens' World (S.Stream Word8) -> VM ()
unshift x g = g %= S.Cons x | 85 | unshift :: Word8 -> Lens' World (S.Stream Word8) -> VM ()
unshift x g = g %= S.Cons x | 85 | unshift x g = g %= S.Cons x | 27 | false | true | 0 | 10 | 18 | 51 | 24 | 27 | null | null |
kindohm/Tidal | Sound/Tidal/Transition.hs | gpl-3.0 | -- Just stop for a bit before playing new pattern
wait :: Time -> Time -> [OscPattern] -> OscPattern
wait t _ [] = silence | 122 | wait :: Time -> Time -> [OscPattern] -> OscPattern
wait t _ [] = silence | 72 | wait t _ [] = silence | 21 | true | true | 0 | 8 | 24 | 41 | 20 | 21 | null | null |
JacquesCarette/literate-scientific-software | code/drasil-printers/Language/Drasil/HTML/Print.hs | bsd-2-clause | useStyleArtcl :: StyleGuide -> (CiteField -> Doc)
useStyleArtcl MLA = artclMLA | 82 | useStyleArtcl :: StyleGuide -> (CiteField -> Doc)
useStyleArtcl MLA = artclMLA | 82 | useStyleArtcl MLA = artclMLA | 32 | false | true | 0 | 9 | 14 | 31 | 14 | 17 | null | null |
merc1031/haskell-sonos-http-api | src/Sonos/Events.hs | bsd-3-clause | naiveToPlayMode modeStr
| modeStr == "NORMAL" = PlayMode { shuffle = False, repeat = False, crossfade = False }
| modeStr == "REPEAT_ALL" = PlayMode { shuffle = False, repeat = True, crossfade = False }
| modeStr == "SHUFFLE_NOREPEAT" = PlayMode { shuffle = True, repeat = False, crossfade = False }
| mo... | 402 | naiveToPlayMode modeStr
| modeStr == "NORMAL" = PlayMode { shuffle = False, repeat = False, crossfade = False }
| modeStr == "REPEAT_ALL" = PlayMode { shuffle = False, repeat = True, crossfade = False }
| modeStr == "SHUFFLE_NOREPEAT" = PlayMode { shuffle = True, repeat = False, crossfade = False }
| mo... | 402 | naiveToPlayMode modeStr
| modeStr == "NORMAL" = PlayMode { shuffle = False, repeat = False, crossfade = False }
| modeStr == "REPEAT_ALL" = PlayMode { shuffle = False, repeat = True, crossfade = False }
| modeStr == "SHUFFLE_NOREPEAT" = PlayMode { shuffle = True, repeat = False, crossfade = False }
| mo... | 402 | false | false | 3 | 8 | 85 | 139 | 78 | 61 | null | null |
hachibu/project-euler | src/ProjectEuler/Problem009.hs | mit | solveMN :: Int -> Maybe (Int, Int)
solveMN x
| null ys = Nothing
| otherwise = Just $ head ys
where
ys = [(fromJust m, n) | n <- [1..x], let m = solveM (n, x), isJust m] | 181 | solveMN :: Int -> Maybe (Int, Int)
solveMN x
| null ys = Nothing
| otherwise = Just $ head ys
where
ys = [(fromJust m, n) | n <- [1..x], let m = solveM (n, x), isJust m] | 181 | solveMN x
| null ys = Nothing
| otherwise = Just $ head ys
where
ys = [(fromJust m, n) | n <- [1..x], let m = solveM (n, x), isJust m] | 146 | false | true | 1 | 12 | 50 | 110 | 55 | 55 | null | null |
sidraval/pusher-haskell | src/Network/Pusher/Channel.hs | mit | queryParamFromInfo xs = "&info=" ++ intercalate "," (map show xs) | 65 | queryParamFromInfo xs = "&info=" ++ intercalate "," (map show xs) | 65 | queryParamFromInfo xs = "&info=" ++ intercalate "," (map show xs) | 65 | false | false | 0 | 8 | 9 | 26 | 12 | 14 | null | null |
ben-schulz/Idris-dev | src/Idris/Core/Evaluate.hs | bsd-3-clause | reinstate = fnCount (-1) | 24 | reinstate = fnCount (-1) | 24 | reinstate = fnCount (-1) | 24 | false | false | 1 | 7 | 3 | 17 | 7 | 10 | null | null |
ChrisCoffey/rwh | src/RW/Chap3.hs | bsd-3-clause | mid = (div 2) . len | 19 | mid = (div 2) . len | 19 | mid = (div 2) . len | 19 | false | false | 1 | 7 | 5 | 20 | 8 | 12 | null | null |
IreneKnapp/Faction | libfaction/Distribution/Simple/Compiler.hs | bsd-3-clause | -- | Return the package that we should register into. This is the package db at
-- the top of the stack.
--
registrationPackageDB :: PackageDBStack -> PackageDB
registrationPackageDB [] = error "internal error: empty package db set" | 233 | registrationPackageDB :: PackageDBStack -> PackageDB
registrationPackageDB [] = error "internal error: empty package db set" | 125 | registrationPackageDB [] = error "internal error: empty package db set" | 72 | true | true | 0 | 6 | 38 | 26 | 14 | 12 | null | null |
olorin/amazonka | amazonka-rds/gen/Network/AWS/RDS/DescribeReservedDBInstancesOfferings.hs | mpl-2.0 | -- | The response status code.
drdiorsResponseStatus :: Lens' DescribeReservedDBInstancesOfferingsResponse Int
drdiorsResponseStatus = lens _drdiorsResponseStatus (\ s a -> s{_drdiorsResponseStatus = a}) | 203 | drdiorsResponseStatus :: Lens' DescribeReservedDBInstancesOfferingsResponse Int
drdiorsResponseStatus = lens _drdiorsResponseStatus (\ s a -> s{_drdiorsResponseStatus = a}) | 172 | drdiorsResponseStatus = lens _drdiorsResponseStatus (\ s a -> s{_drdiorsResponseStatus = a}) | 92 | true | true | 0 | 9 | 21 | 40 | 22 | 18 | null | null |
grnet/snf-ganeti | src/Ganeti/Constants.hs | bsd-2-clause | -- * Dynamic device modification
ddmAdd :: String
ddmAdd = Types.ddmFullToRaw DdmFullAdd | 89 | ddmAdd :: String
ddmAdd = Types.ddmFullToRaw DdmFullAdd | 55 | ddmAdd = Types.ddmFullToRaw DdmFullAdd | 38 | true | true | 0 | 6 | 12 | 23 | 10 | 13 | null | null |
ayberkt/TAPL | src/FullSimple/Main.hs | bsd-3-clause | parens ∷ String → String
parens s = "(" ++ s ++ ")" | 51 | parens ∷ String → String
parens s = "(" ++ s ++ ")" | 51 | parens s = "(" ++ s ++ ")" | 26 | false | true | 0 | 6 | 12 | 26 | 13 | 13 | null | null |
Chase-C/Octree | src/Octree.hs | gpl-2.0 | ---------------------------------------------------------
prettyPrint :: (Show a) => Octree a -> String
prettyPrint (Node cen l a b c d e f g h) = "Node {\n\tcenter: " ++ (show cen) ++ "\n\tlength: " ++ (show l) ++ "\n" ++
(concat $ L.intersperse "\n" $ map prettyPrint [a, b, c, d, e, f, g, h]) ++ "\n}" | 309 | prettyPrint :: (Show a) => Octree a -> String
prettyPrint (Node cen l a b c d e f g h) = "Node {\n\tcenter: " ++ (show cen) ++ "\n\tlength: " ++ (show l) ++ "\n" ++
(concat $ L.intersperse "\n" $ map prettyPrint [a, b, c, d, e, f, g, h]) ++ "\n}" | 250 | prettyPrint (Node cen l a b c d e f g h) = "Node {\n\tcenter: " ++ (show cen) ++ "\n\tlength: " ++ (show l) ++ "\n" ++
(concat $ L.intersperse "\n" $ map prettyPrint [a, b, c, d, e, f, g, h]) ++ "\n}" | 204 | true | true | 0 | 12 | 59 | 136 | 72 | 64 | null | null |
ivokosir/cogh | src/Graphics/Cogh/Event/Keyboard.hs | mit | showCode :: Int -> String
showCode = unsafePerformIO . peekCString . cShowCode . fromIntegral | 93 | showCode :: Int -> String
showCode = unsafePerformIO . peekCString . cShowCode . fromIntegral | 93 | showCode = unsafePerformIO . peekCString . cShowCode . fromIntegral | 67 | false | true | 0 | 7 | 13 | 27 | 14 | 13 | null | null |
FPtje/GLuaFixer | src/GLua/PSLexer.hs | lgpl-2.1 | -- | SourcePos to LineColPos
sp2lcp :: SourcePos -> LineColPos
sp2lcp pos = LineColPos (sourceLine pos - 1) (sourceColumn pos - 1) 0 | 132 | sp2lcp :: SourcePos -> LineColPos
sp2lcp pos = LineColPos (sourceLine pos - 1) (sourceColumn pos - 1) 0 | 103 | sp2lcp pos = LineColPos (sourceLine pos - 1) (sourceColumn pos - 1) 0 | 69 | true | true | 0 | 8 | 22 | 46 | 23 | 23 | null | null |
brendanhay/gogol | gogol-translate/gen/Network/Google/Translate/Types/Product.hs | mpl-2.0 | -- | The normal response of the operation in case of success. If the original
-- method returns no data on success, such as \`Delete\`, the response is
-- \`google.protobuf.Empty\`. If the original method is standard
-- \`Get\`\/\`Create\`\/\`Update\`, the response should be the resource.
-- For other methods, the resp... | 648 | oResponse :: Lens' Operation (Maybe OperationResponse)
oResponse
= lens _oResponse (\ s a -> s{_oResponse = a}) | 113 | oResponse
= lens _oResponse (\ s a -> s{_oResponse = a}) | 58 | true | true | 0 | 9 | 98 | 55 | 32 | 23 | null | null |
bredelings/BAli-Phy | haskell/MCMC.hs | gpl-2.0 | sample_SPR_all tree c = IOAction (pair_from_c . builtin_sample_SPR_all tree c) | 78 | sample_SPR_all tree c = IOAction (pair_from_c . builtin_sample_SPR_all tree c) | 78 | sample_SPR_all tree c = IOAction (pair_from_c . builtin_sample_SPR_all tree c) | 78 | false | false | 0 | 8 | 9 | 26 | 12 | 14 | null | null |
svenssonjoel/ObsidianGFX | Obsidian/Array.hs | bsd-3-clause | pushApp (MkPush _ p) a = p a | 28 | pushApp (MkPush _ p) a = p a | 28 | pushApp (MkPush _ p) a = p a | 28 | false | false | 1 | 6 | 7 | 22 | 10 | 12 | null | null |
bgwines/pb-next | test/Spec.hs | bsd-3-clause | testProtoObjParsing14 :: Assertion
testProtoObjParsing14 = do
let proto = "message WorkerLoop {\n // DEPRECATED: optional string name = 1;\n}"
let expected = Right $ Internal [] $ Message "WorkerLoop" [MessageField Optional "string" "name" 1]
let actual = Parsec.parse PP.protoTreeParser "" proto
actual... | 333 | testProtoObjParsing14 :: Assertion
testProtoObjParsing14 = do
let proto = "message WorkerLoop {\n // DEPRECATED: optional string name = 1;\n}"
let expected = Right $ Internal [] $ Message "WorkerLoop" [MessageField Optional "string" "name" 1]
let actual = Parsec.parse PP.protoTreeParser "" proto
actual... | 333 | testProtoObjParsing14 = do
let proto = "message WorkerLoop {\n // DEPRECATED: optional string name = 1;\n}"
let expected = Right $ Internal [] $ Message "WorkerLoop" [MessageField Optional "string" "name" 1]
let actual = Parsec.parse PP.protoTreeParser "" proto
actual @?= expected | 298 | false | true | 0 | 13 | 60 | 86 | 40 | 46 | null | null |
Helium4Haskell/helium | src/Helium/Syntax/UHA_Utils.hs | gpl-3.0 | getNameName (Name_Operator _ qs _ name) = intercalate "." (qs ++ [name]) | 74 | getNameName (Name_Operator _ qs _ name) = intercalate "." (qs ++ [name]) | 74 | getNameName (Name_Operator _ qs _ name) = intercalate "." (qs ++ [name]) | 74 | false | false | 0 | 8 | 13 | 37 | 18 | 19 | null | null |
candide-guevara/programming_challenges | haskell_learning/slow_append.hs | gpl-2.0 | (<>) (DList x) (DList y) = DList (x . y) | 40 | (<>) (DList x) (DList y) = DList (x . y) | 40 | (<>) (DList x) (DList y) = DList (x . y) | 40 | false | false | 0 | 7 | 9 | 35 | 18 | 17 | null | null |
clarkcb/xsearch | haskell/hssearch/src/HsSearch/Color.hs | mit | green :: String
green = "\x1b[32m" | 34 | green :: String
green = "\x1b[32m" | 34 | green = "\x1b[32m" | 18 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
forste/haReFork | refactorer/RefacUnGuard.hs | bsd-3-clause | -- the name is not important
unfoldPat (Pat (HsPTuple _ lst))
= (Pat $ HsPId $ HsCon $ nameToPNT "(tup)"):lst | 114 | unfoldPat (Pat (HsPTuple _ lst))
= (Pat $ HsPId $ HsCon $ nameToPNT "(tup)"):lst | 85 | unfoldPat (Pat (HsPTuple _ lst))
= (Pat $ HsPId $ HsCon $ nameToPNT "(tup)"):lst | 85 | true | false | 0 | 9 | 24 | 46 | 23 | 23 | null | null |
silky/csound-expression | src/Csound/Tuning.hs | bsd-3-clause | toTemp = tempC | 14 | toTemp = tempC | 14 | toTemp = tempC | 14 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
rvion/stack | src/Network/HTTP/Download/Verified.hs | bsd-3-clause | verifiedDownload :: (MonadReader env m, HasHttpManager env, MonadIO m)
=> DownloadRequest
-> Path Abs File -- ^ destination
-> (Maybe Integer -> Sink ByteString (ReaderT env IO) ()) -- ^ custom hook to observe progress
-> m Bool -- ^ Whether a download was performed
verifiedDownload ... | 4,074 | verifiedDownload :: (MonadReader env m, HasHttpManager env, MonadIO m)
=> DownloadRequest
-> Path Abs File -- ^ destination
-> (Maybe Integer -> Sink ByteString (ReaderT env IO) ()) -- ^ custom hook to observe progress
-> m Bool
verifiedDownload DownloadRequest{..} destpath progressS... | 4,036 | verifiedDownload DownloadRequest{..} destpath progressSink = do
let req = drRequest
env <- ask
liftIO $ whenM' getShouldDownload $ do
createDirectoryIfMissing True dir
withBinaryFile fptmp WriteMode $ \h ->
#if MIN_VERSION_retry(0,7,0)
recovering drRetryPolicy handlers $ const $
... | 3,771 | true | true | 0 | 18 | 1,381 | 937 | 452 | 485 | null | null |
brendanhay/gogol | gogol-sqladmin/gen/Network/Google/Resource/SQL/Instances/TruncateLog.hs | mpl-2.0 | -- | Multipart request metadata.
itlPayload :: Lens' InstancesTruncateLog InstancesTruncateLogRequest
itlPayload
= lens _itlPayload (\ s a -> s{_itlPayload = a}) | 163 | itlPayload :: Lens' InstancesTruncateLog InstancesTruncateLogRequest
itlPayload
= lens _itlPayload (\ s a -> s{_itlPayload = a}) | 130 | itlPayload
= lens _itlPayload (\ s a -> s{_itlPayload = a}) | 61 | true | true | 0 | 9 | 22 | 42 | 22 | 20 | null | null |
martomi/AI-Reversi | Reversi_AI.hs | mit | staticWeightedBoard :: Array Coordinates Int
staticWeightedBoard = listArray ((0,0),(7,7))
[10000,-3000,1000,800,800,1000,-3000,10000,
-3000,-5000,-450,-500,-500,-450,-5000,-3000,
1000,-450,30,10,10,30,-450,1000,
800,-500,10,50,50,10,-500,800,
800,-500,10,50,50,10,-500,800,
1000,-450,30,10,10,30,-450,1000,
... | 411 | staticWeightedBoard :: Array Coordinates Int
staticWeightedBoard = listArray ((0,0),(7,7))
[10000,-3000,1000,800,800,1000,-3000,10000,
-3000,-5000,-450,-500,-500,-450,-5000,-3000,
1000,-450,30,10,10,30,-450,1000,
800,-500,10,50,50,10,-500,800,
800,-500,10,50,50,10,-500,800,
1000,-450,30,10,10,30,-450,1000,
... | 411 | staticWeightedBoard = listArray ((0,0),(7,7))
[10000,-3000,1000,800,800,1000,-3000,10000,
-3000,-5000,-450,-500,-500,-450,-5000,-3000,
1000,-450,30,10,10,30,-450,1000,
800,-500,10,50,50,10,-500,800,
800,-500,10,50,50,10,-500,800,
1000,-450,30,10,10,30,-450,1000,
-3000,-5000,-450,-500,-500,-450,-5000,-3000... | 366 | false | true | 1 | 7 | 32 | 291 | 178 | 113 | null | null |
anton-k/sharc-timbre | src/Sharc/Instruments/ViolaPizzicato.hs | bsd-3-clause | note7 :: Note
note7 = Note
(Pitch 195.998 43 "g3")
8
(Range
(NoteRange
(NoteRangeAmplitude 7447.92 38 0.23)
(NoteRangeHarmonicFreq 1 195.99))
(NoteRange
(NoteRangeAmplitude 391.99 2 2466.0)
(NoteRangeHarmonicFreq 51 9995.89)))
[Harmonic 1 (... | 1,816 | note7 :: Note
note7 = Note
(Pitch 195.998 43 "g3")
8
(Range
(NoteRange
(NoteRangeAmplitude 7447.92 38 0.23)
(NoteRangeHarmonicFreq 1 195.99))
(NoteRange
(NoteRangeAmplitude 391.99 2 2466.0)
(NoteRangeHarmonicFreq 51 9995.89)))
[Harmonic 1 (... | 1,816 | note7 = Note
(Pitch 195.998 43 "g3")
8
(Range
(NoteRange
(NoteRangeAmplitude 7447.92 38 0.23)
(NoteRangeHarmonicFreq 1 195.99))
(NoteRange
(NoteRangeAmplitude 391.99 2 2466.0)
(NoteRangeHarmonicFreq 51 9995.89)))
[Harmonic 1 (-2.547) 1340.9... | 1,802 | false | true | 0 | 10 | 511 | 739 | 379 | 360 | null | null |
mgold/Elm | src/Canonicalize/Setup.hs | bsd-3-clause | -- EFFECTS TO PATCHES
effectsToPatches :: ModuleName.Canonical -> Effects.Raw -> [Env.Patch]
effectsToPatches moduleName effects =
case effects of
Effects.None ->
[]
Effects.Port ports ->
let
toPatch (A.A _ (Effects.PortRaw name _)) =
Env.Value name (Var.topLevel moduleName na... | 745 | effectsToPatches :: ModuleName.Canonical -> Effects.Raw -> [Env.Patch]
effectsToPatches moduleName effects =
case effects of
Effects.None ->
[]
Effects.Port ports ->
let
toPatch (A.A _ (Effects.PortRaw name _)) =
Env.Value name (Var.topLevel moduleName name)
in
map... | 721 | effectsToPatches moduleName effects =
case effects of
Effects.None ->
[]
Effects.Port ports ->
let
toPatch (A.A _ (Effects.PortRaw name _)) =
Env.Value name (Var.topLevel moduleName name)
in
map toPatch ports
Effects.Manager _ info ->
map (\name -> Env.V... | 650 | true | true | 7 | 14 | 230 | 193 | 101 | 92 | null | null |
rgaiacs/pandoc | src/Text/Pandoc/Writers/Docx.hs | gpl-2.0 | blockToOpenXML opts (Para lst) = do
paraProps <- getParaProps $ case lst of
[Math DisplayMath _] -> True
_ -> False
contents <- inlinesToOpenXML opts lst
return [mknode "w:p" [] (paraProps ++ contents)] | 307 | blockToOpenXML opts (Para lst) = do
paraProps <- getParaProps $ case lst of
[Math DisplayMath _] -> True
_ -> False
contents <- inlinesToOpenXML opts lst
return [mknode "w:p" [] (paraProps ++ contents)] | 307 | blockToOpenXML opts (Para lst) = do
paraProps <- getParaProps $ case lst of
[Math DisplayMath _] -> True
_ -> False
contents <- inlinesToOpenXML opts lst
return [mknode "w:p" [] (paraProps ++ contents)] | 307 | false | false | 0 | 13 | 137 | 89 | 42 | 47 | null | null |
danr/hipspec | testsuite/prod/zeno_version/PropT35.hs | gpl-3.0 | exp x (S n) = x * exp x n | 25 | exp x (S n) = x * exp x n | 25 | exp x (S n) = x * exp x n | 25 | false | false | 1 | 6 | 9 | 31 | 12 | 19 | null | null |
Sokal21/GoblinBurner | src/Mannager.hs | bsd-3-clause | replaceAllbool v (Gt x y) = (Gt (replaceAllInt v x) (replaceAllInt v y)) | 72 | replaceAllbool v (Gt x y) = (Gt (replaceAllInt v x) (replaceAllInt v y)) | 72 | replaceAllbool v (Gt x y) = (Gt (replaceAllInt v x) (replaceAllInt v y)) | 72 | false | false | 0 | 8 | 12 | 43 | 21 | 22 | null | null |
AlexeyRaga/eta | compiler/ETA/Prelude/PrimOp.hs | bsd-3-clause | tagOf_PrimOp NewJIntArrayOp = _ILIT(1125) | 41 | tagOf_PrimOp NewJIntArrayOp = _ILIT(1125) | 41 | tagOf_PrimOp NewJIntArrayOp = _ILIT(1125) | 41 | false | false | 0 | 6 | 3 | 16 | 7 | 9 | null | null |
nevrenato/Hets_Fork | DFOL/Tests/Test_Structuring.hs | gpl-2.0 | cTok = mkTok "c" | 16 | cTok = mkTok "c" | 16 | cTok = mkTok "c" | 16 | false | false | 1 | 5 | 3 | 12 | 4 | 8 | null | null |
brendanhay/gogol | gogol-deploymentmanager/gen/Network/Google/Resource/DeploymentManager/Deployments/Delete.hs | mpl-2.0 | -- | The project ID for this request.
ddProject :: Lens' DeploymentsDelete Text
ddProject
= lens _ddProject (\ s a -> s{_ddProject = a}) | 138 | ddProject :: Lens' DeploymentsDelete Text
ddProject
= lens _ddProject (\ s a -> s{_ddProject = a}) | 100 | ddProject
= lens _ddProject (\ s a -> s{_ddProject = a}) | 58 | true | true | 0 | 9 | 25 | 42 | 22 | 20 | null | null |
urbanslug/ghc | testsuite/tests/partial-sigs/should_compile/ExtraConstraints3.hs | bsd-3-clause | asTypeOf :: _ => _
asTypeOf = P.asTypeOf | 40 | asTypeOf :: _ => _
asTypeOf = P.asTypeOf | 40 | asTypeOf = P.asTypeOf | 21 | false | true | 0 | 7 | 7 | 25 | 10 | 15 | null | null |
IndraVikas/postgrest | src/PostgREST/PgQuery.hs | mit | update :: QualifiedTable -> [T.Text] -> [JSON.Value] -> PStmt
update t cols vals = B.Stmt
("update " <> fromQt t <> " set ("
<> T.intercalate ", " (map pgFmtIdent cols)
<> ") = ("
<> T.intercalate ", " (map insertableValue vals)
<> ")")
empty True | 267 | update :: QualifiedTable -> [T.Text] -> [JSON.Value] -> PStmt
update t cols vals = B.Stmt
("update " <> fromQt t <> " set ("
<> T.intercalate ", " (map pgFmtIdent cols)
<> ") = ("
<> T.intercalate ", " (map insertableValue vals)
<> ")")
empty True | 267 | update t cols vals = B.Stmt
("update " <> fromQt t <> " set ("
<> T.intercalate ", " (map pgFmtIdent cols)
<> ") = ("
<> T.intercalate ", " (map insertableValue vals)
<> ")")
empty True | 205 | false | true | 0 | 12 | 65 | 111 | 54 | 57 | null | null |
AlexeyRaga/eta | libraries/base/GHC/IO/Handle/Internals.hs | bsd-3-clause | openTextEncoding
:: Maybe TextEncoding
-> HandleType
-> (forall es ds . Maybe (TextEncoder es) -> Maybe (TextDecoder ds) -> IO a)
-> IO a
openTextEncoding Nothing ha_type cont = cont Nothing Nothing | 213 | openTextEncoding
:: Maybe TextEncoding
-> HandleType
-> (forall es ds . Maybe (TextEncoder es) -> Maybe (TextDecoder ds) -> IO a)
-> IO a
openTextEncoding Nothing ha_type cont = cont Nothing Nothing | 212 | openTextEncoding Nothing ha_type cont = cont Nothing Nothing | 62 | false | true | 0 | 14 | 46 | 79 | 38 | 41 | null | null |
ndmitchell/qed | src/Proof/Exp/Core.hs | bsd-3-clause | fromLets (Let x y z) = ((x,y):a, b)
where (a,b) = fromLets z | 64 | fromLets (Let x y z) = ((x,y):a, b)
where (a,b) = fromLets z | 64 | fromLets (Let x y z) = ((x,y):a, b)
where (a,b) = fromLets z | 64 | false | false | 0 | 7 | 16 | 52 | 28 | 24 | null | null |
krgn/hamdrill | src/Network/API/Mandrill/Ips.hs | mit | -- | Creates a pool and returns it. If a pool already exists with this
-- name, no action will be performed.
createPool :: (MonadIO m) =>
Name ->
MandrillT m (Either ApiError IpPool)
createPool p = performRequest "/ips/create-pool.json" [ "pool" .= p ] | 279 | createPool :: (MonadIO m) =>
Name ->
MandrillT m (Either ApiError IpPool)
createPool p = performRequest "/ips/create-pool.json" [ "pool" .= p ] | 169 | createPool p = performRequest "/ips/create-pool.json" [ "pool" .= p ] | 69 | true | true | 0 | 9 | 70 | 54 | 28 | 26 | null | null |
thomie/cabal | cabal-install/Distribution/Client/Setup.hs | bsd-3-clause | defaultSandboxLocation :: FilePath
defaultSandboxLocation = ".cabal-sandbox" | 76 | defaultSandboxLocation :: FilePath
defaultSandboxLocation = ".cabal-sandbox" | 76 | defaultSandboxLocation = ".cabal-sandbox" | 41 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
chaosim/peasy | coffee/samples/latex.hs | mit | circ 'g' = "ĝ" | 14 | circ 'g' = "ĝ" | 14 | circ 'g' = "ĝ" | 14 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
gridaphobe/cabal2nix | hackage2nix/src/Main.hs | bsd-3-clause | resolveConstraint :: Constraint -> Hackage -> Version
resolveConstraint c = fromMaybe (error msg) . resolveConstraint' c
where msg = "constraint " ++ display c ++ " cannot be resolved in Hackage" | 197 | resolveConstraint :: Constraint -> Hackage -> Version
resolveConstraint c = fromMaybe (error msg) . resolveConstraint' c
where msg = "constraint " ++ display c ++ " cannot be resolved in Hackage" | 197 | resolveConstraint c = fromMaybe (error msg) . resolveConstraint' c
where msg = "constraint " ++ display c ++ " cannot be resolved in Hackage" | 143 | false | true | 3 | 8 | 32 | 67 | 28 | 39 | null | null |
spechub/Hets | Comorphisms/QVTR2CASL.hs | gpl-2.0 | findRelVarFromName (v : restV) nam = if QVTRAs.varName v == nam
then Just v
else findRelVarFromName restV nam | 183 | findRelVarFromName (v : restV) nam = if QVTRAs.varName v == nam
then Just v
else findRelVarFromName restV nam | 183 | findRelVarFromName (v : restV) nam = if QVTRAs.varName v == nam
then Just v
else findRelVarFromName restV nam | 183 | false | false | 0 | 8 | 91 | 43 | 21 | 22 | null | null |
gitpan/SMOP | m0ld/M0ld/Parser.hs | artistic-2.0 | tok r = do
res <- r
opt_ws
return res | 49 | tok r = do
res <- r
opt_ws
return res | 49 | tok r = do
res <- r
opt_ws
return res | 49 | false | false | 0 | 7 | 21 | 25 | 10 | 15 | null | null |
adinapoli/xmonad-contrib | XMonad/Layout/Mosaic.hs | bsd-3-clause | makeTree f xs = Branch (makeTree f a) (makeTree f b)
where ((a,b),_) = foldr go (([],[]),(0,0)) xs
go n ((ls,rs),(l,r))
| l > r = ((ls,n:rs),(l,f n+r))
| otherwise = ((n:ls,rs),(f n+l,r)) | 229 | makeTree f xs = Branch (makeTree f a) (makeTree f b)
where ((a,b),_) = foldr go (([],[]),(0,0)) xs
go n ((ls,rs),(l,r))
| l > r = ((ls,n:rs),(l,f n+r))
| otherwise = ((n:ls,rs),(f n+l,r)) | 229 | makeTree f xs = Branch (makeTree f a) (makeTree f b)
where ((a,b),_) = foldr go (([],[]),(0,0)) xs
go n ((ls,rs),(l,r))
| l > r = ((ls,n:rs),(l,f n+r))
| otherwise = ((n:ls,rs),(f n+l,r)) | 229 | false | false | 2 | 9 | 74 | 192 | 103 | 89 | null | null |
adamschoenemann/asa-analysis | src/Anal/ConstProp.hs | bsd-3-clause | cpLatIntToBoolCombine _ (CPBool x) _ = error "type error" | 65 | cpLatIntToBoolCombine _ (CPBool x) _ = error "type error" | 65 | cpLatIntToBoolCombine _ (CPBool x) _ = error "type error" | 65 | false | false | 1 | 6 | 16 | 26 | 10 | 16 | null | null |
MasseR/introitu | Foundation.hs | bsd-2-clause | (Entity userId _) `hasPermissionTo` (Edit note) = do
note' <- select $ from $ \n -> do
where_ (n ^. NoteOwner ==. val userId &&. n ^. NoteId ==. val note)
return n
case note' of
[] -> return $ Unauthorized "You have no permission to edit this note"
_ -> return Authorized | 297 | (Entity userId _) `hasPermissionTo` (Edit note) = do
note' <- select $ from $ \n -> do
where_ (n ^. NoteOwner ==. val userId &&. n ^. NoteId ==. val note)
return n
case note' of
[] -> return $ Unauthorized "You have no permission to edit this note"
_ -> return Authorized | 297 | (Entity userId _) `hasPermissionTo` (Edit note) = do
note' <- select $ from $ \n -> do
where_ (n ^. NoteOwner ==. val userId &&. n ^. NoteId ==. val note)
return n
case note' of
[] -> return $ Unauthorized "You have no permission to edit this note"
_ -> return Authorized | 297 | false | false | 0 | 18 | 78 | 120 | 56 | 64 | null | null |
tkasu/haskellbook-adventure | app/Chap5Sign.hs | bsd-3-clause | --fstString :: [Char] ++ [Char]
fstString :: [Char] -> [Char]
fstString x = x ++ " in the rain" | 95 | fstString :: [Char] -> [Char]
fstString x = x ++ " in the rain" | 63 | fstString x = x ++ " in the rain" | 33 | true | true | 0 | 6 | 18 | 29 | 16 | 13 | null | null |
bjpop/berp | interpreter/src/Berp/Interpreter/Input.hs | bsd-3-clause | lastTokenIsColon :: [Token] -> Bool
lastTokenIsColon [] = False | 63 | lastTokenIsColon :: [Token] -> Bool
lastTokenIsColon [] = False | 63 | lastTokenIsColon [] = False | 27 | false | true | 0 | 8 | 8 | 29 | 13 | 16 | null | null |
chemist/hf | src/HfArgs.hs | apache-2.0 | strFormat :: Maybe String -> Flag
strFormat f = SFormat $ fromMaybe "{0}" f | 75 | strFormat :: Maybe String -> Flag
strFormat f = SFormat $ fromMaybe "{0}" f | 75 | strFormat f = SFormat $ fromMaybe "{0}" f | 41 | false | true | 2 | 7 | 13 | 36 | 15 | 21 | null | null |
travitch/language-python-builder | src/Language/Python/Common/Builder.hs | bsd-3-clause | shiftRightAO :: annot -> OpQ annot
shiftRightAO = return . ShiftRight | 69 | shiftRightAO :: annot -> OpQ annot
shiftRightAO = return . ShiftRight | 69 | shiftRightAO = return . ShiftRight | 34 | false | true | 0 | 6 | 10 | 22 | 11 | 11 | null | null |
bjornbm/astro | src/Astro/Time.hs | bsd-3-clause | -- | The difference in seconds between the given epoch and J2000.0. Will
-- be negative if the given epoch preceeds J2000.0.
sinceJ2000 :: Fractional a => E TT a -> Time a
sinceJ2000 = flip diffEpoch j2000 | 205 | sinceJ2000 :: Fractional a => E TT a -> Time a
sinceJ2000 = flip diffEpoch j2000 | 80 | sinceJ2000 = flip diffEpoch j2000 | 33 | true | true | 0 | 7 | 37 | 37 | 18 | 19 | null | null |
romanb/amazonka | amazonka-iam/gen/Network/AWS/IAM/Types.hs | mpl-2.0 | -- | The date when the MFA device was enabled for the user.
mfadEnableDate :: Lens' MFADevice UTCTime
mfadEnableDate = lens _mfadEnableDate (\s a -> s { _mfadEnableDate = a }) . _Time | 183 | mfadEnableDate :: Lens' MFADevice UTCTime
mfadEnableDate = lens _mfadEnableDate (\s a -> s { _mfadEnableDate = a }) . _Time | 123 | mfadEnableDate = lens _mfadEnableDate (\s a -> s { _mfadEnableDate = a }) . _Time | 81 | true | true | 0 | 9 | 32 | 51 | 25 | 26 | null | null |
jjl/ctaas | src/Main.hs | gpl-3.0 | post' a = method POST a | 23 | post' a = method POST a | 23 | post' a = method POST a | 23 | false | false | 0 | 5 | 5 | 14 | 6 | 8 | null | null |
rodrigo-machado/verigraph | src/library/Data/Graphs/Morphism.hs | gpl-3.0 | -- | Add a mapping between both nodes into the morphism. If @ln@ is already
-- mapped, or neither nodes are in their respective graphs, return the original
-- morphism.
updateNodes :: NodeId -> NodeId -> GraphMorphism a b -> GraphMorphism a b
updateNodes ln gn morphism@(GraphMorphism l g nm em)
| G.isNodeOf l ln &&... | 661 | updateNodes :: NodeId -> NodeId -> GraphMorphism a b -> GraphMorphism a b
updateNodes ln gn morphism@(GraphMorphism l g nm em)
| G.isNodeOf l ln && G.isNodeOf g gn && notMapped morphism ln = GraphMorphism l g (R.updateRelation ln gn nm) em
| otherwise = morphism
where
notMapped m = isNothing . applyNodeId... | 492 | updateNodes ln gn morphism@(GraphMorphism l g nm em)
| G.isNodeOf l ln && G.isNodeOf g gn && notMapped morphism ln = GraphMorphism l g (R.updateRelation ln gn nm) em
| otherwise = morphism
where
notMapped m = isNothing . applyNodeId m
-- | Add a mapping between both edges into the morphism. If @le@ is al... | 418 | true | true | 1 | 11 | 128 | 153 | 71 | 82 | null | null |
tanakh/commando | System/Console/CmdLine.hs | bsd-3-clause | parse :: Command -> [String] -> Either String Args
parse = subp where
subp _ [] =
return $ Args [] [] []
subp DispatchExternal xs =
return $ External [] xs
subp c (x:xs) =
case find ((== x) . cmdName) (cmdSubs c) of
Just subCmd -> do
e <- subp subCmd xs
case e of
Args... | 1,665 | parse :: Command -> [String] -> Either String Args
parse = subp where
subp _ [] =
return $ Args [] [] []
subp DispatchExternal xs =
return $ External [] xs
subp c (x:xs) =
case find ((== x) . cmdName) (cmdSubs c) of
Just subCmd -> do
e <- subp subCmd xs
case e of
Args... | 1,665 | parse = subp where
subp _ [] =
return $ Args [] [] []
subp DispatchExternal xs =
return $ External [] xs
subp c (x:xs) =
case find ((== x) . cmdName) (cmdSubs c) of
Just subCmd -> do
e <- subp subCmd xs
case e of
Args subs args rest ->
return $ Args (x:sub... | 1,614 | false | true | 0 | 22 | 635 | 712 | 355 | 357 | null | null |
jleahred/katas | langs/haskell/sambamba/src/Lib.hs | gpl-3.0 | int2idadi :: Int -> Idadi
int2idadi int = int2idadi' int []
where int2idadi' 0 acc = acc
int2idadi' int acc = int2idadi' (int-1) (():acc) | 151 | int2idadi :: Int -> Idadi
int2idadi int = int2idadi' int []
where int2idadi' 0 acc = acc
int2idadi' int acc = int2idadi' (int-1) (():acc) | 151 | int2idadi int = int2idadi' int []
where int2idadi' 0 acc = acc
int2idadi' int acc = int2idadi' (int-1) (():acc) | 125 | false | true | 0 | 8 | 37 | 74 | 35 | 39 | null | null |
ian-mi/interval-set | Data/IntervalSet.hs | bsd-3-clause | pivotT i@(Interval a b) (TNode l m@(Interval c d) r)
| ul + um + 1 < ur,
Just (rl, rm@(Interval e f), rr) <- pivotT i r,
e - a < ur = Just (TNode l m rl, rm, rr)
| ur + um + 1 < ul,
Just (ll, lm@(Interval e f), lr) <- pivotT i l,
b - f < ul = Just (ll, lm, TNode lr m r)
|... | 416 | pivotT i@(Interval a b) (TNode l m@(Interval c d) r)
| ul + um + 1 < ur,
Just (rl, rm@(Interval e f), rr) <- pivotT i r,
e - a < ur = Just (TNode l m rl, rm, rr)
| ur + um + 1 < ul,
Just (ll, lm@(Interval e f), lr) <- pivotT i l,
b - f < ul = Just (ll, lm, TNode lr m r)
|... | 416 | pivotT i@(Interval a b) (TNode l m@(Interval c d) r)
| ul + um + 1 < ur,
Just (rl, rm@(Interval e f), rr) <- pivotT i r,
e - a < ur = Just (TNode l m rl, rm, rr)
| ur + um + 1 < ul,
Just (ll, lm@(Interval e f), lr) <- pivotT i l,
b - f < ul = Just (ll, lm, TNode lr m r)
|... | 416 | false | false | 3 | 13 | 172 | 272 | 138 | 134 | null | null |
jystic/river | src/River/Core/Annotation.hs | bsd-3-clause | annotOfTail :: Tail p n a -> a
annotOfTail = \case
Copy a _ ->
a
Call a _ _ ->
a
Prim a _ _ ->
a | 114 | annotOfTail :: Tail p n a -> a
annotOfTail = \case
Copy a _ ->
a
Call a _ _ ->
a
Prim a _ _ ->
a | 114 | annotOfTail = \case
Copy a _ ->
a
Call a _ _ ->
a
Prim a _ _ ->
a | 83 | false | true | 4 | 6 | 45 | 59 | 29 | 30 | null | null |
jespino/haskell-validate | Validate/ES.hs | bsd-3-clause | cifStrict :: String -> Bool
cifStrict code = controlCode == (intToDigit d) || controlCode == (letters !! d)
where letters = "ABCDEFGHIJ"
letter = code !! 0
odd_numbers = map digitToInt [code !! 1, code !! 3, code !! 5, code !! 7]
even_numbers = map digitToInt [code !! 2... | 784 | cifStrict :: String -> Bool
cifStrict code = controlCode == (intToDigit d) || controlCode == (letters !! d)
where letters = "ABCDEFGHIJ"
letter = code !! 0
odd_numbers = map digitToInt [code !! 1, code !! 3, code !! 5, code !! 7]
even_numbers = map digitToInt [code !! 2... | 784 | cifStrict code = controlCode == (intToDigit d) || controlCode == (letters !! d)
where letters = "ABCDEFGHIJ"
letter = code !! 0
odd_numbers = map digitToInt [code !! 1, code !! 3, code !! 5, code !! 7]
even_numbers = map digitToInt [code !! 2, code !! 4, code !! 6]
... | 756 | false | true | 13 | 12 | 363 | 314 | 151 | 163 | null | null |
jwoudenberg/elm-editor-tools | src/ElmTools/ParseModule.hs | bsd-3-clause | topFunction :: DefParser Definition
topFunction =
try $ infixOperator <|> variable <* whitespace <* arguments <* char '=' | 123 | topFunction :: DefParser Definition
topFunction =
try $ infixOperator <|> variable <* whitespace <* arguments <* char '=' | 123 | topFunction =
try $ infixOperator <|> variable <* whitespace <* arguments <* char '=' | 87 | false | true | 0 | 9 | 19 | 37 | 18 | 19 | null | null |
rueshyna/gogol | gogol-monitoring/gen/Network/Google/Resource/Monitoring/Projects/Groups/Get.hs | mpl-2.0 | -- | Creates a value of 'ProjectsGroupsGet' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'pggXgafv'
--
-- * 'pggUploadProtocol'
--
-- * 'pggPp'
--
-- * 'pggAccessToken'
--
-- * 'pggUploadType'
--
-- * 'pggBearerToken'
--
-- * 'pggNa... | 706 | projectsGroupsGet
:: Text -- ^ 'pggName'
-> ProjectsGroupsGet
projectsGroupsGet pPggName_ =
ProjectsGroupsGet'
{ _pggXgafv = Nothing
, _pggUploadProtocol = Nothing
, _pggPp = True
, _pggAccessToken = Nothing
, _pggUploadType = Nothing
, _pggBearerToken = Nothing
, _pggName = pPgg... | 360 | projectsGroupsGet pPggName_ =
ProjectsGroupsGet'
{ _pggXgafv = Nothing
, _pggUploadProtocol = Nothing
, _pggPp = True
, _pggAccessToken = Nothing
, _pggUploadType = Nothing
, _pggBearerToken = Nothing
, _pggName = pPggName_
, _pggCallback = Nothing
} | 290 | true | true | 0 | 7 | 154 | 97 | 64 | 33 | null | null |
fpco/cabal | Cabal/Distribution/ParseUtils.hs | bsd-3-clause | layout i a (Span n l:OpenBracket n':ss) = do
(sub, ss') <- braces n' [] ss
layout i (Node (n,False,l) sub:a) ss'
-- look ahead to see if following lines are more indented, giving a sub-tree | 202 | layout i a (Span n l:OpenBracket n':ss) = do
(sub, ss') <- braces n' [] ss
layout i (Node (n,False,l) sub:a) ss'
-- look ahead to see if following lines are more indented, giving a sub-tree | 202 | layout i a (Span n l:OpenBracket n':ss) = do
(sub, ss') <- braces n' [] ss
layout i (Node (n,False,l) sub:a) ss'
-- look ahead to see if following lines are more indented, giving a sub-tree | 202 | false | false | 0 | 11 | 48 | 86 | 43 | 43 | null | null |
UCSD-PL/RefScript | src/Language/Rsc/Typecheck/Types.hs | bsd-3-clause | toplevel f (TRef n r ) = TRef n (f r) | 39 | toplevel f (TRef n r ) = TRef n (f r) | 39 | toplevel f (TRef n r ) = TRef n (f r) | 39 | false | false | 0 | 7 | 12 | 30 | 14 | 16 | null | null |
nevrenato/Hets_Fork | GMP/versioning/gmp-coloss-0.0.3/GMP/Logics/SysS.hs | gpl-2.0 | biggerInds :: ([Int],[(Int,Int)],[Formula (SysS a)]) -> Int -> [Int]
biggerInds struc@(worlds,rel,seq) i = [ j | j <- [0..(length seq)], ((i,j)`elem`rel)&& (not((j,i)`elem`rel)) ] | 179 | biggerInds :: ([Int],[(Int,Int)],[Formula (SysS a)]) -> Int -> [Int]
biggerInds struc@(worlds,rel,seq) i = [ j | j <- [0..(length seq)], ((i,j)`elem`rel)&& (not((j,i)`elem`rel)) ] | 179 | biggerInds struc@(worlds,rel,seq) i = [ j | j <- [0..(length seq)], ((i,j)`elem`rel)&& (not((j,i)`elem`rel)) ] | 110 | false | true | 0 | 12 | 22 | 138 | 81 | 57 | null | null |
lwchkg/sunlight-x | test/code-snippets/haskell.hs | apache-2.0 | mkNest k NoDoc = NoDoc | 34 | mkNest k NoDoc = NoDoc | 34 | mkNest k NoDoc = NoDoc | 34 | false | false | 0 | 5 | 16 | 11 | 5 | 6 | null | null |
HalosGhost/hs | numbers/collatz.hs | isc | main :: IO ()
main = getArgs >>= parse >>= putStrLn | 51 | main :: IO ()
main = getArgs >>= parse >>= putStrLn | 51 | main = getArgs >>= parse >>= putStrLn | 37 | false | true | 0 | 6 | 10 | 24 | 12 | 12 | null | null |
ice1000/OI-codes | codewars/authoring/haskell/TypeTranspiler.hs | agpl-3.0 | tokenLP = (newLines0P <++>) | 27 | tokenLP = (newLines0P <++>) | 27 | tokenLP = (newLines0P <++>) | 27 | false | false | 1 | 6 | 3 | 14 | 6 | 8 | null | null |
geophf/1HaskellADay | exercises/HAD/Y2018/M08/D03/Exercise.hs | mit | -- 1. read in the JSON (unprettified) and write it out as pretty JSON
prettify :: FilePath -> FilePath -> IO ()
prettify unprettyIn prettyOut = undefined | 154 | prettify :: FilePath -> FilePath -> IO ()
prettify unprettyIn prettyOut = undefined | 83 | prettify unprettyIn prettyOut = undefined | 41 | true | true | 0 | 8 | 27 | 30 | 15 | 15 | null | null |
brendanhay/gogol | gogol-cloudprivatecatalog/gen/Network/Google/Resource/CloudPrivateCatalog/Projects/Catalogs/Search.hs | mpl-2.0 | -- | The maximum number of entries that are requested.
pcsPageSize :: Lens' ProjectsCatalogsSearch (Maybe Int32)
pcsPageSize
= lens _pcsPageSize (\ s a -> s{_pcsPageSize = a}) .
mapping _Coerce | 201 | pcsPageSize :: Lens' ProjectsCatalogsSearch (Maybe Int32)
pcsPageSize
= lens _pcsPageSize (\ s a -> s{_pcsPageSize = a}) .
mapping _Coerce | 146 | pcsPageSize
= lens _pcsPageSize (\ s a -> s{_pcsPageSize = a}) .
mapping _Coerce | 88 | true | true | 1 | 10 | 37 | 58 | 28 | 30 | null | null |
39aldo39/klfc | src/Xkb/Parse.hs | gpl-3.0 | parseLetter "VoidSymbol" = pure (Just LNothing) | 47 | parseLetter "VoidSymbol" = pure (Just LNothing) | 47 | parseLetter "VoidSymbol" = pure (Just LNothing) | 47 | false | false | 0 | 7 | 5 | 18 | 8 | 10 | null | null |
brendanhay/gogol | gogol-dataflow/gen/Network/Google/Resource/Dataflow/Projects/Locations/Jobs/WorkItems/ReportStatus.hs | mpl-2.0 | -- | JSONP
pljwirsCallback :: Lens' ProjectsLocationsJobsWorkItemsReportStatus (Maybe Text)
pljwirsCallback
= lens _pljwirsCallback
(\ s a -> s{_pljwirsCallback = a}) | 174 | pljwirsCallback :: Lens' ProjectsLocationsJobsWorkItemsReportStatus (Maybe Text)
pljwirsCallback
= lens _pljwirsCallback
(\ s a -> s{_pljwirsCallback = a}) | 163 | pljwirsCallback
= lens _pljwirsCallback
(\ s a -> s{_pljwirsCallback = a}) | 82 | true | true | 1 | 9 | 27 | 52 | 25 | 27 | null | null |
timtylin/scholdoc-texmath | src/Text/TeXMath/Writers/OMML.hs | gpl-2.0 | showFraction :: [Element] -> FractionType -> Exp -> Exp -> Element
showFraction props ft x y =
case ft of
NormalFrac -> mnode "f" [ mnode "fPr" $
mnodeA "type" "bar" ()
, mnode "num" x'
, mnode "den" y']
DisplayFra... | 907 | showFraction :: [Element] -> FractionType -> Exp -> Exp -> Element
showFraction props ft x y =
case ft of
NormalFrac -> mnode "f" [ mnode "fPr" $
mnodeA "type" "bar" ()
, mnode "num" x'
, mnode "den" y']
DisplayFra... | 907 | showFraction props ft x y =
case ft of
NormalFrac -> mnode "f" [ mnode "fPr" $
mnodeA "type" "bar" ()
, mnode "num" x'
, mnode "den" y']
DisplayFrac -> showFraction props NormalFrac x y
InlineFrac -> mnode "... | 840 | false | true | 0 | 12 | 506 | 219 | 106 | 113 | null | null |
jwiegley/hnix | src/Nix/Lint.hs | bsd-3-clause | compareTypes TPath TPath = EQ | 47 | compareTypes TPath TPath = EQ | 47 | compareTypes TPath TPath = EQ | 47 | false | false | 0 | 5 | 22 | 11 | 5 | 6 | null | null |
fmapfmapfmap/amazonka | amazonka-cloudfront/gen/Network/AWS/CloudFront/ListStreamingDistributions.hs | mpl-2.0 | -- | The maximum number of streaming distributions you want in the response
-- body.
lsdMaxItems :: Lens' ListStreamingDistributions (Maybe Text)
lsdMaxItems = lens _lsdMaxItems (\ s a -> s{_lsdMaxItems = a}) | 208 | lsdMaxItems :: Lens' ListStreamingDistributions (Maybe Text)
lsdMaxItems = lens _lsdMaxItems (\ s a -> s{_lsdMaxItems = a}) | 123 | lsdMaxItems = lens _lsdMaxItems (\ s a -> s{_lsdMaxItems = a}) | 62 | true | true | 0 | 9 | 31 | 47 | 26 | 21 | null | null |
yuvallanger/threepenny-gui | src/Graphics/UI/Threepenny/Core.hs | bsd-3-clause | -- | Build attribute from a getter.
mkReadAttr :: (x -> UI o) -> ReadAttr x o
mkReadAttr get = mkReadWriteAttr get (\_ _ -> return ()) | 134 | mkReadAttr :: (x -> UI o) -> ReadAttr x o
mkReadAttr get = mkReadWriteAttr get (\_ _ -> return ()) | 98 | mkReadAttr get = mkReadWriteAttr get (\_ _ -> return ()) | 56 | true | true | 0 | 9 | 26 | 54 | 27 | 27 | null | null |
GaloisInc/galua | galua/src/Galua/Overloading.hs | mit | m__bor :: Meth2
m__bor = valueInt2 str__bor (.|.) | 49 | m__bor :: Meth2
m__bor = valueInt2 str__bor (.|.) | 49 | m__bor = valueInt2 str__bor (.|.) | 33 | false | true | 0 | 5 | 7 | 18 | 10 | 8 | null | null |
alexbaluta/courseography | dependencies/HaXml-1.25.3/src/Text/XML/HaXml/ShowXmlLazy.hs | gpl-3.0 | --markupdecl (MarkupPE p m) = peref p
-- _ (ExtSubset t ds) = maybe textdecl t $$
-- vcat (map extsubsetdecl ds)
-- _ (ExtMarkupDecl m) = markupdecl m
-- extsubsetdecl (ExtConditionalSect c) = conditionalsect c
--extsubsetdecl (ExtPEReference p e) = peref p
element (Elem n as []) =... | 406 | element (Elem n as []) = text "<" <> qname n <+>
fsep (map attribute as) <> text "/>" | 110 | element (Elem n as []) = text "<" <> qname n <+>
fsep (map attribute as) <> text "/>" | 110 | true | false | 0 | 9 | 124 | 59 | 30 | 29 | null | null |
dolio/vector | Data/Vector/Primitive/Mutable.hs | bsd-3-clause | unsafeModify = G.unsafeModify | 29 | unsafeModify = G.unsafeModify | 29 | unsafeModify = G.unsafeModify | 29 | false | false | 0 | 5 | 2 | 8 | 4 | 4 | null | null |
alexander-at-github/eta | compiler/ETA/Main/HscTypes.hs | bsd-3-clause | tyThingTyCon :: TyThing -> TyCon
tyThingTyCon (ATyCon tc) = tc | 62 | tyThingTyCon :: TyThing -> TyCon
tyThingTyCon (ATyCon tc) = tc | 62 | tyThingTyCon (ATyCon tc) = tc | 29 | false | true | 0 | 6 | 9 | 28 | 13 | 15 | null | null |
markflorisson/hpack | src/HPack/Monads.hs | bsd-3-clause | modify :: Monad m => (s -> s) -> HPackT e s m ()
modify = HPackT . M.lift . M.modify | 84 | modify :: Monad m => (s -> s) -> HPackT e s m ()
modify = HPackT . M.lift . M.modify | 84 | modify = HPackT . M.lift . M.modify | 35 | false | true | 0 | 8 | 20 | 52 | 26 | 26 | null | null |
timtylin/scholdoc-texmath | src/Text/TeXMath/Writers/OMML.hs | gpl-2.0 | isNary :: Exp -> Bool
isNary (ESymbol Op _) = True | 50 | isNary :: Exp -> Bool
isNary (ESymbol Op _) = True | 50 | isNary (ESymbol Op _) = True | 28 | false | true | 0 | 6 | 10 | 30 | 14 | 16 | null | null |
jaspervdj/what-morphism | src/WhatMorphism/TemplateHaskell.hs | bsd-3-clause | conName (InfixC _ n _) = n | 27 | conName (InfixC _ n _) = n | 27 | conName (InfixC _ n _) = n | 27 | false | false | 0 | 7 | 7 | 19 | 9 | 10 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.