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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fpco/cabal | Cabal/Distribution/System.hs | bsd-3-clause | --TODO: probably should disallow starting with a number
lowercase :: String -> String
lowercase = map Char.toLower | 115 | lowercase :: String -> String
lowercase = map Char.toLower | 58 | lowercase = map Char.toLower | 28 | true | true | 0 | 6 | 17 | 21 | 11 | 10 | null | null |
haslab/SecreC | src/Language/SecreC/Prover/Base.hs | gpl-3.0 | iExprTy (IBinOp ILeq e1 e2) = BaseT bool | 40 | iExprTy (IBinOp ILeq e1 e2) = BaseT bool | 40 | iExprTy (IBinOp ILeq e1 e2) = BaseT bool | 40 | false | false | 0 | 6 | 7 | 23 | 10 | 13 | null | null |
GrandArchTemplar/FunctionalProgramming | src/HW6.hs | mit | add e t = merge [BinTree { value = e, trees = [], deep = 0 }] t | 65 | add e t = merge [BinTree { value = e, trees = [], deep = 0 }] t | 65 | add e t = merge [BinTree { value = e, trees = [], deep = 0 }] t | 65 | false | false | 0 | 9 | 19 | 42 | 23 | 19 | null | null |
supermitch/learn-haskell | real-world-haskell/ch04/Fold.hs | mit | map' :: (a -> b) -> [a] -> [b]
map' f xs = foldr step [] xs
where step x ys = f x : ys
-- we can even write foldl in terms of foldr: | 137 | map' :: (a -> b) -> [a] -> [b]
map' f xs = foldr step [] xs
where step x ys = f x : ys
-- we can even write foldl in terms of foldr: | 137 | map' f xs = foldr step [] xs
where step x ys = f x : ys
-- we can even write foldl in terms of foldr: | 106 | false | true | 0 | 7 | 40 | 71 | 35 | 36 | null | null |
t4sk/upenn-cis194 | hw-08/Party.hs | mit | mappendMax :: (GuestList, GuestList) -> GuestList -> GuestList
mappendMax (g1, g2) g3 = mappend (moreFun g1 g2) g3 | 114 | mappendMax :: (GuestList, GuestList) -> GuestList -> GuestList
mappendMax (g1, g2) g3 = mappend (moreFun g1 g2) g3 | 114 | mappendMax (g1, g2) g3 = mappend (moreFun g1 g2) g3 | 51 | false | true | 0 | 7 | 17 | 49 | 26 | 23 | null | null |
573/leksah | src/IDE/Debug.hs | gpl-2.0 | logTraceOutput debugPackage = do
logOutputForLiveContextDefault debugPackage
lift $ triggerEventIDE TraceChanged
return () | 134 | logTraceOutput debugPackage = do
logOutputForLiveContextDefault debugPackage
lift $ triggerEventIDE TraceChanged
return () | 134 | logTraceOutput debugPackage = do
logOutputForLiveContextDefault debugPackage
lift $ triggerEventIDE TraceChanged
return () | 134 | false | false | 0 | 8 | 23 | 33 | 13 | 20 | null | null |
massysett/penny | penny/lib/Penny/Copper/Copperize.hs | bsd-3-clause | cNine :: Nine Char ()
cNine = Nine ('9', ()) | 44 | cNine :: Nine Char ()
cNine = Nine ('9', ()) | 44 | cNine = Nine ('9', ()) | 22 | false | true | 0 | 7 | 9 | 29 | 15 | 14 | null | null |
ozgurakgun/Idris-dev | src/Idris/Parser/Helpers.hs | bsd-3-clause | -- | Less-than indent property
ltProp :: IndentProperty
ltProp = IndentProperty (<) "should be less than context indentation" | 125 | ltProp :: IndentProperty
ltProp = IndentProperty (<) "should be less than context indentation" | 94 | ltProp = IndentProperty (<) "should be less than context indentation" | 69 | true | true | 0 | 6 | 17 | 25 | 12 | 13 | null | null |
plneappl/HasKlax | src/Config.hs | bsd-3-clause | displayMode :: Display
displayMode = InWindow "HasKlax" (screenWidth, screenHeight) (0, 0) | 90 | displayMode :: Display
displayMode = InWindow "HasKlax" (screenWidth, screenHeight) (0, 0) | 90 | displayMode = InWindow "HasKlax" (screenWidth, screenHeight) (0, 0) | 67 | false | true | 0 | 6 | 10 | 30 | 17 | 13 | null | null |
thomie/vector | Data/Vector/Unboxed/Mutable.hs | bsd-3-clause | read = G.read | 13 | read = G.read | 13 | read = G.read | 13 | false | false | 1 | 6 | 2 | 12 | 4 | 8 | null | null |
FranklinChen/Idris-dev | src/Idris/Core/TT.hs | bsd-3-clause | termSmallerThan x Erased = True | 31 | termSmallerThan x Erased = True | 31 | termSmallerThan x Erased = True | 31 | false | false | 0 | 5 | 4 | 12 | 5 | 7 | null | null |
green-haskell/ghc | compiler/utils/Outputable.hs | bsd-3-clause | codeStyle _ = False | 33 | codeStyle _ = False | 33 | codeStyle _ = False | 33 | false | false | 0 | 5 | 17 | 9 | 4 | 5 | null | null |
gnn/Hets | OWL2/Keywords.hs | gpl-2.0 | decimalS :: String
decimalS = "decimal" | 39 | decimalS :: String
decimalS = "decimal" | 39 | decimalS = "decimal" | 20 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
NucHorseStudios/HaskellDevBot | HaskellBot.hs | mit | writeFeedData :: IConnection c => c -> TVar [String] -> [FeedData] -> IO [()]
writeFeedData dbh mv f
= do
writeItem `mapM` f
where
writeItem x
= do
usrs <- notifiedUsers dbh (feedItemSource x)
mapM (\u -> (sendTo (nick u) x)) usrs
s... | 709 | writeFeedData :: IConnection c => c -> TVar [String] -> [FeedData] -> IO [()]
writeFeedData dbh mv f
= do
writeItem `mapM` f
where
writeItem x
= do
usrs <- notifiedUsers dbh (feedItemSource x)
mapM (\u -> (sendTo (nick u) x)) usrs
s... | 709 | writeFeedData dbh mv f
= do
writeItem `mapM` f
where
writeItem x
= do
usrs <- notifiedUsers dbh (feedItemSource x)
mapM (\u -> (sendTo (nick u) x)) usrs
sendTo ircChannel x
m w x = w ++ " : " ++ name x ++ ": " ++ text... | 631 | false | true | 9 | 14 | 286 | 339 | 151 | 188 | null | null |
gianlucagiorgolo/glue-tp | TP.hs | mit | alphaEquivalent (FirstProjection a) (FirstProjection b) m = alphaEquivalent a b m | 81 | alphaEquivalent (FirstProjection a) (FirstProjection b) m = alphaEquivalent a b m | 81 | alphaEquivalent (FirstProjection a) (FirstProjection b) m = alphaEquivalent a b m | 81 | false | false | 0 | 7 | 10 | 32 | 15 | 17 | null | null |
justinethier/husk-scheme | hs-src/Language/Scheme/Core.hs | mit | eval env cont args@(List (Atom "lambda" : DottedList fparams varargs : fbody)) = do
bound <- liftIO $ isRecBound env "lambda"
if bound
then prepareApply env cont args -- if is bound to a variable in this scope; call into it
else do
_ <- validateFuncParams (fparams ++ [varargs]) Nothing
ebody <- mapM ... | 481 | eval env cont args@(List (Atom "lambda" : DottedList fparams varargs : fbody)) = do
bound <- liftIO $ isRecBound env "lambda"
if bound
then prepareApply env cont args -- if is bound to a variable in this scope; call into it
else do
_ <- validateFuncParams (fparams ++ [varargs]) Nothing
ebody <- mapM ... | 481 | eval env cont args@(List (Atom "lambda" : DottedList fparams varargs : fbody)) = do
bound <- liftIO $ isRecBound env "lambda"
if bound
then prepareApply env cont args -- if is bound to a variable in this scope; call into it
else do
_ <- validateFuncParams (fparams ++ [varargs]) Nothing
ebody <- mapM ... | 481 | false | false | 0 | 15 | 103 | 157 | 76 | 81 | null | null |
woodsjc/hackerrank-challenges | jumping-bunnies.hs | gpl-3.0 | jump :: String -> Int
jump str = foldl lcm 1 $ map read $ words str | 68 | jump :: String -> Int
jump str = foldl lcm 1 $ map read $ words str | 67 | jump str = foldl lcm 1 $ map read $ words str | 45 | false | true | 2 | 7 | 17 | 44 | 18 | 26 | null | null |
pepeiborra/yices | Math/SMT/Yices/Parser.hs | bsd-3-clause | not_ = tok "not" >> liftM NOT expY | 34 | not_ = tok "not" >> liftM NOT expY | 34 | not_ = tok "not" >> liftM NOT expY | 34 | false | false | 3 | 5 | 7 | 23 | 8 | 15 | null | null |
Peaker/FreeTypeGL | src/Graphics/FreetypeGL/TextureFont.hs | bsd-3-clause | setRenderMode :: RenderMode -> Ptr TF.C'texture_font_t -> IO ()
setRenderMode mode ptr =
do
poke (TF.p'texture_font_t'rendermode ptr) cRenderMode
poke (TF.p'texture_font_t'outline_thickness ptr) (realToFrac outline)
where
(cRenderMode, outline) = c'renderMode mode | 296 | setRenderMode :: RenderMode -> Ptr TF.C'texture_font_t -> IO ()
setRenderMode mode ptr =
do
poke (TF.p'texture_font_t'rendermode ptr) cRenderMode
poke (TF.p'texture_font_t'outline_thickness ptr) (realToFrac outline)
where
(cRenderMode, outline) = c'renderMode mode | 296 | setRenderMode mode ptr =
do
poke (TF.p'texture_font_t'rendermode ptr) cRenderMode
poke (TF.p'texture_font_t'outline_thickness ptr) (realToFrac outline)
where
(cRenderMode, outline) = c'renderMode mode | 232 | false | true | 0 | 10 | 60 | 94 | 43 | 51 | null | null |
gspindles/mj-score-eval | src/Game/Mahjong/Static/Melds.hs | mit | c111, c222, c333, c444, c555, c666, c777, c888, c999 :: Meld
c111 = fromJust $ mkMeld Revealed Triplet [c1, c1, c1] | 116 | c111, c222, c333, c444, c555, c666, c777, c888, c999 :: Meld
c111 = fromJust $ mkMeld Revealed Triplet [c1, c1, c1] | 115 | c111 = fromJust $ mkMeld Revealed Triplet [c1, c1, c1] | 54 | false | true | 5 | 7 | 21 | 58 | 33 | 25 | null | null |
d0kt0r0/estuary | client/src/Estuary/Types/Context.hs | gpl-3.0 | setClientCount :: Int -> ContextChange
setClientCount x c = c { clientCount = x } | 81 | setClientCount :: Int -> ContextChange
setClientCount x c = c { clientCount = x } | 81 | setClientCount x c = c { clientCount = x } | 42 | false | true | 0 | 6 | 14 | 28 | 15 | 13 | null | null |
beni55/cps-core | CPS/Syntax.hs | bsd-3-clause | renameCallArgs _ Unbox = Unbox | 41 | renameCallArgs _ Unbox = Unbox | 41 | renameCallArgs _ Unbox = Unbox | 41 | false | false | 1 | 5 | 15 | 13 | 5 | 8 | null | null |
Ericson2314/clash-prelude | src/CLaSH/Signal/Internal.hs | bsd-2-clause | -- | The above type is a generalisation for:
--
-- @
-- __sampleN__ :: Int -> 'CLaSH.Signal.Signal' a -> [a]
-- @
--
-- Get a list of @n@ samples from a 'CLaSH.Signal.Signal'
--
-- The elements in the list correspond to the values of the 'CLaSH.Signal.Signal'
-- at consecutive clock cycles
--
-- > sampleN 3 s == [s0, s... | 446 | sampleN :: Foldable f => Int -> f a -> [a]
sampleN n = take n . sample | 70 | sampleN n = take n . sample | 27 | true | true | 0 | 10 | 88 | 62 | 35 | 27 | null | null |
ganeti/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | cvEinstanceunsuitablenode :: (String, String, String)
cvEinstanceunsuitablenode =
("instance",
Types.cVErrorCodeToRaw CvEINSTANCEUNSUITABLENODE,
"Instance running on nodes that are not suitable for it") | 210 | cvEinstanceunsuitablenode :: (String, String, String)
cvEinstanceunsuitablenode =
("instance",
Types.cVErrorCodeToRaw CvEINSTANCEUNSUITABLENODE,
"Instance running on nodes that are not suitable for it") | 210 | cvEinstanceunsuitablenode =
("instance",
Types.cVErrorCodeToRaw CvEINSTANCEUNSUITABLENODE,
"Instance running on nodes that are not suitable for it") | 156 | false | true | 0 | 7 | 27 | 34 | 20 | 14 | null | null |
ksaveljev/hake-2 | src/Client/MenuGlobals.hs | bsd-3-clause | keysStepLeftActionRef :: Ref MenuActionS
keysStepLeftActionRef = Ref 18 | 71 | keysStepLeftActionRef :: Ref MenuActionS
keysStepLeftActionRef = Ref 18 | 71 | keysStepLeftActionRef = Ref 18 | 30 | false | true | 0 | 5 | 7 | 17 | 8 | 9 | null | null |
ribag/ganeti-experiments | src/Ganeti/OpParams.hs | gpl-2.0 | pReadd :: Field
pReadd =
withDoc "Whether node is re-added to cluster" $
defaultFalse "readd" | 97 | pReadd :: Field
pReadd =
withDoc "Whether node is re-added to cluster" $
defaultFalse "readd" | 97 | pReadd =
withDoc "Whether node is re-added to cluster" $
defaultFalse "readd" | 81 | false | true | 0 | 6 | 18 | 27 | 11 | 16 | null | null |
YoEight/machines | src/Data/Machine/Process.hs | bsd-3-clause | fold :: Category k => (a -> b -> a) -> a -> Machine (k b) a
fold func seed = construct $ go seed where
go cur = do
next <- await <|> yield cur *> stop
go (func cur next)
-- | Break each input into pieces that are fed downstream
-- individually. | 255 | fold :: Category k => (a -> b -> a) -> a -> Machine (k b) a
fold func seed = construct $ go seed where
go cur = do
next <- await <|> yield cur *> stop
go (func cur next)
-- | Break each input into pieces that are fed downstream
-- individually. | 255 | fold func seed = construct $ go seed where
go cur = do
next <- await <|> yield cur *> stop
go (func cur next)
-- | Break each input into pieces that are fed downstream
-- individually. | 195 | false | true | 0 | 12 | 65 | 104 | 50 | 54 | null | null |
diku-dk/futhark | src/Futhark/CodeGen/Backends/GenericC.hs | isc | -- | Compile imperative program to a C program. Always uses the
-- function named "main" as entry point, so make sure it is defined.
compileProg ::
MonadFreshNames m =>
T.Text ->
T.Text ->
Operations op () ->
CompilerM op () () ->
T.Text ->
[Space] ->
[Option] ->
Definitions op ->
m CParts
compileP... | 3,379 | compileProg ::
MonadFreshNames m =>
T.Text ->
T.Text ->
Operations op () ->
CompilerM op () () ->
T.Text ->
[Space] ->
[Option] ->
Definitions op ->
m CParts
compileProg backend version ops extra header_extra spaces options prog = do
src <- getNameSource
let ((prototypes, definitions, entry_poin... | 3,245 | compileProg backend version ops extra header_extra spaces options prog = do
src <- getNameSource
let ((prototypes, definitions, entry_point_decls, manifest), endstate) =
runCompilerM ops src () compileProg'
initdecls = initDecls endstate
entrydecls = entryDecls endstate
arraydecls = arrayD... | 3,067 | true | true | 2 | 14 | 785 | 678 | 343 | 335 | null | null |
Bodigrim/arithmoi | Math/NumberTheory/Moduli/Cbrt.hs | mit | cubicSymbol :: EisensteinInteger -> EisensteinInteger -> CubicSymbol
cubicSymbol alpha beta = case beta `A.rem` (1 - ω) of
-- This checks whether beta is coprime to 3, i.e. divisible by @1 - ω@
-- In particular, it returns an error if @beta == 0@
0 -> error "Math.NumberTheory.Moduli.Cbrt: denominator is not copri... | 365 | cubicSymbol :: EisensteinInteger -> EisensteinInteger -> CubicSymbol
cubicSymbol alpha beta = case beta `A.rem` (1 - ω) of
-- This checks whether beta is coprime to 3, i.e. divisible by @1 - ω@
-- In particular, it returns an error if @beta == 0@
0 -> error "Math.NumberTheory.Moduli.Cbrt: denominator is not copri... | 365 | cubicSymbol alpha beta = case beta `A.rem` (1 - ω) of
-- This checks whether beta is coprime to 3, i.e. divisible by @1 - ω@
-- In particular, it returns an error if @beta == 0@
0 -> error "Math.NumberTheory.Moduli.Cbrt: denominator is not coprime to 3."
_ -> cubicSymbolHelper alpha beta | 296 | false | true | 2 | 8 | 66 | 66 | 34 | 32 | null | null |
bell-kelly/courseography | app/Database/CourseQueries.hs | gpl-3.0 | allCourses :: IO Response
allCourses = do
response <- runSqlite databasePath $ do
courses :: [Entity Courses] <- selectList [] []
let codes = map (coursesCode . entityVal) courses
return $ T.unlines codes
return $ toResponse response
-- | Returns all course info for a given department. | 309 | allCourses :: IO Response
allCourses = do
response <- runSqlite databasePath $ do
courses :: [Entity Courses] <- selectList [] []
let codes = map (coursesCode . entityVal) courses
return $ T.unlines codes
return $ toResponse response
-- | Returns all course info for a given department. | 309 | allCourses = do
response <- runSqlite databasePath $ do
courses :: [Entity Courses] <- selectList [] []
let codes = map (coursesCode . entityVal) courses
return $ T.unlines codes
return $ toResponse response
-- | Returns all course info for a given department. | 283 | false | true | 0 | 16 | 69 | 98 | 45 | 53 | null | null |
snapframework/snap-core | src/Snap/Types/Headers.hs | bsd-3-clause | ------------------------------------------------------------------------------
-- | Does this collection of HTTP header fields contain a given field?
--
-- Example:
--
-- @
-- ghci> :set -XOverloadedStrings
-- ghci> H.'member' \"host\" $ H.'fromList' [(\"Host\", \"localhost\")]
-- True
-- ghci> H.'member' \"Accept\" $ ... | 509 | member :: CI ByteString -> Headers -> Bool
member k0 = f . unH
where
k = CI.foldedCase k0
f m = List.any ((k ==) . fst) m
| 134 | member k0 = f . unH
where
k = CI.foldedCase k0
f m = List.any ((k ==) . fst) m
| 91 | true | true | 1 | 8 | 86 | 79 | 46 | 33 | null | null |
yliu120/K3 | src/Language/K3/Utils/Pretty/Syntax.hs | apache-2.0 | spliceValue :: SpliceValue -> SyntaxPrinter
spliceValue = \case
SVar i -> return $ text i
SLabel i -> return $ text i
SType t -> typ t
SExpr e -> expr e
SDecl d -> decl d
SLiteral l -> literal l
SRecord nsvs -> mapM spliceField (recordElemsAsList nsvs) >>= ... | 528 | spliceValue :: SpliceValue -> SyntaxPrinter
spliceValue = \case
SVar i -> return $ text i
SLabel i -> return $ text i
SType t -> typ t
SExpr e -> expr e
SDecl d -> decl d
SLiteral l -> literal l
SRecord nsvs -> mapM spliceField (recordElemsAsList nsvs) >>= ... | 528 | spliceValue = \case
SVar i -> return $ text i
SLabel i -> return $ text i
SType t -> typ t
SExpr e -> expr e
SDecl d -> decl d
SLiteral l -> literal l
SRecord nsvs -> mapM spliceField (recordElemsAsList nsvs) >>= return . braces . cat . punctuate comma
... | 484 | false | true | 0 | 14 | 160 | 210 | 98 | 112 | null | null |
johan1a/haskell-go | src/Eval.hs | gpl-2.0 | add :: Object -> Object -> Object
add (O1 _ (IntVal l)) (O1 _ (IntVal r)) = (O1 intType (IntVal (l + r))) | 105 | add :: Object -> Object -> Object
add (O1 _ (IntVal l)) (O1 _ (IntVal r)) = (O1 intType (IntVal (l + r))) | 105 | add (O1 _ (IntVal l)) (O1 _ (IntVal r)) = (O1 intType (IntVal (l + r))) | 71 | false | true | 0 | 12 | 22 | 79 | 38 | 41 | null | null |
FranklinChen/hugs98-plus-Sep2006 | packages/HaXml/src/Text/XML/HaXml/Html/Pretty.hs | bsd-3-clause | reference (RefEntity er) = entityref er | 45 | reference (RefEntity er) = entityref er | 45 | reference (RefEntity er) = entityref er | 45 | false | false | 0 | 7 | 11 | 18 | 8 | 10 | null | null |
tidalcycles/tidal-midi | Sound/Tidal/MIDI/Ambika.hs | gpl-3.0 | (xmodtype, xmodtype_p) = pF "xmodtype" (Just 0) | 47 | (xmodtype, xmodtype_p) = pF "xmodtype" (Just 0) | 47 | (xmodtype, xmodtype_p) = pF "xmodtype" (Just 0) | 47 | false | false | 0 | 7 | 6 | 24 | 12 | 12 | null | null |
emwap/feldspar-compiler | lib/Feldspar/Compiler/Imperative/ExternalProgram.hs | bsd-3-clause | patchHdefs (_:t) = patchHdefs t | 31 | patchHdefs (_:t) = patchHdefs t | 31 | patchHdefs (_:t) = patchHdefs t | 31 | false | false | 0 | 7 | 4 | 19 | 9 | 10 | null | null |
lennart/tidal-midi | Sound/Tidal/Tetra.hs | gpl-3.0 | mcr1 = makeF oscPolysynth "mcr1" | 37 | mcr1 = makeF oscPolysynth "mcr1" | 37 | mcr1 = makeF oscPolysynth "mcr1" | 37 | false | false | 0 | 5 | 9 | 11 | 5 | 6 | null | null |
clarissalittler/randomimages | PhrasesToShapes.hs | gpl-2.0 | charToShape 'N' = charToShape 'Z' | 33 | charToShape 'N' = charToShape 'Z' | 33 | charToShape 'N' = charToShape 'Z' | 33 | false | false | 0 | 5 | 4 | 12 | 5 | 7 | null | null |
codemac/yi-editor | src/Yi/Verifier/JavaScript.hs | gpl-2.0 | funName _ = undefined | 37 | funName _ = undefined | 37 | funName _ = undefined | 37 | false | false | 0 | 4 | 19 | 10 | 4 | 6 | null | null |
snowleopard/shaking-up-ghc | src/Rules/Documentation.hs | bsd-3-clause | buildSphinxHtml :: FilePath -> Rules ()
buildSphinxHtml path = do
root <- buildRootRules
root -/- htmlRoot -/- path -/- "index.html" %> \file -> do
need [root -/- haddockHtmlLib]
let dest = takeDirectory file
build $ target docContext (Sphinx Html) [pathPath path] [dest]
---------------... | 431 | buildSphinxHtml :: FilePath -> Rules ()
buildSphinxHtml path = do
root <- buildRootRules
root -/- htmlRoot -/- path -/- "index.html" %> \file -> do
need [root -/- haddockHtmlLib]
let dest = takeDirectory file
build $ target docContext (Sphinx Html) [pathPath path] [dest]
---------------... | 431 | buildSphinxHtml path = do
root <- buildRootRules
root -/- htmlRoot -/- path -/- "index.html" %> \file -> do
need [root -/- haddockHtmlLib]
let dest = takeDirectory file
build $ target docContext (Sphinx Html) [pathPath path] [dest]
------------------------------------ Haddock ----------... | 391 | false | true | 0 | 14 | 86 | 112 | 54 | 58 | null | null |
travitch/llvm-tools | tools/ViewIRGraph.hs | bsd-3-clause | mkPDTs :: Module -> [(String, PostdominatorTree)]
mkPDTs m = map (getFuncName &&& toTree) fs
where
fs = moduleDefinedFunctions m
toTree = postdominatorTree . controlFlowGraph | 184 | mkPDTs :: Module -> [(String, PostdominatorTree)]
mkPDTs m = map (getFuncName &&& toTree) fs
where
fs = moduleDefinedFunctions m
toTree = postdominatorTree . controlFlowGraph | 184 | mkPDTs m = map (getFuncName &&& toTree) fs
where
fs = moduleDefinedFunctions m
toTree = postdominatorTree . controlFlowGraph | 134 | false | true | 1 | 7 | 33 | 60 | 31 | 29 | null | null |
oldmanmike/ghc | compiler/nativeGen/X86/Ppr.hs | bsd-3-clause | pprInstr (POP format op) = pprFormatOp (sLit "pop") format op | 61 | pprInstr (POP format op) = pprFormatOp (sLit "pop") format op | 61 | pprInstr (POP format op) = pprFormatOp (sLit "pop") format op | 61 | false | false | 0 | 7 | 9 | 30 | 14 | 16 | null | null |
oden-lang/oden | src/Oden/Compiler/NameEncoder.hs | mit | paddedTo :: TypeEncoder ()
paddedTo = padded "to" | 49 | paddedTo :: TypeEncoder ()
paddedTo = padded "to" | 49 | paddedTo = padded "to" | 22 | false | true | 0 | 6 | 7 | 19 | 9 | 10 | null | null |
co-dan/NPNTool | src/NPNTool/NPNet.hs | bsd-3-clause | fromTokens :: (Ord v) => MultiSet PTPlace -> SArc v Int PTPlace
fromTokens = SArc . Set.fromList
. map (\(pl,n) -> (exprMult (Const 1) n,pl))
. MSet.toOccurList | 186 | fromTokens :: (Ord v) => MultiSet PTPlace -> SArc v Int PTPlace
fromTokens = SArc . Set.fromList
. map (\(pl,n) -> (exprMult (Const 1) n,pl))
. MSet.toOccurList | 186 | fromTokens = SArc . Set.fromList
. map (\(pl,n) -> (exprMult (Const 1) n,pl))
. MSet.toOccurList | 122 | false | true | 0 | 13 | 52 | 84 | 44 | 40 | null | null |
tolysz/prepare-ghcjs | spec-lts8/base/GHC/IO/Handle/Internals.hs | bsd-3-clause | flushCharReadBuffer :: Handle__ -> IO ()
flushCharReadBuffer Handle__{..} = do
cbuf <- readIORef haCharBuffer
if isWriteBuffer cbuf || isEmptyBuffer cbuf then return () else do
-- haLastDecode is the byte buffer just before we did our last batch of
-- decoding. We're going to re-decode the bytes up to the cur... | 1,687 | flushCharReadBuffer :: Handle__ -> IO ()
flushCharReadBuffer Handle__{..} = do
cbuf <- readIORef haCharBuffer
if isWriteBuffer cbuf || isEmptyBuffer cbuf then return () else do
-- haLastDecode is the byte buffer just before we did our last batch of
-- decoding. We're going to re-decode the bytes up to the cur... | 1,687 | flushCharReadBuffer Handle__{..} = do
cbuf <- readIORef haCharBuffer
if isWriteBuffer cbuf || isEmptyBuffer cbuf then return () else do
-- haLastDecode is the byte buffer just before we did our last batch of
-- decoding. We're going to re-decode the bytes up to the current char,
-- to find out where we shou... | 1,646 | false | true | 0 | 23 | 428 | 324 | 159 | 165 | null | null |
zsol/visual-graphrewrite | GraphRewrite/Main.hs | bsd-3-clause | configureBindings :: G.GladeXML -> MVar State -> IO ()
configureBindings xml mstate = do
window <- G.xmlGetWidget xml G.castToWindow "visual-graphrewrite"
quitbutton <- G.xmlGetWidget xml G.castToButton "quitbutton"
leftbutton <- G.xmlGetWidget xml G.castToButton "leftbutton"
rightbutton <- G.xmlGetWidget xml ... | 829 | configureBindings :: G.GladeXML -> MVar State -> IO ()
configureBindings xml mstate = do
window <- G.xmlGetWidget xml G.castToWindow "visual-graphrewrite"
quitbutton <- G.xmlGetWidget xml G.castToButton "quitbutton"
leftbutton <- G.xmlGetWidget xml G.castToButton "leftbutton"
rightbutton <- G.xmlGetWidget xml ... | 829 | configureBindings xml mstate = do
window <- G.xmlGetWidget xml G.castToWindow "visual-graphrewrite"
quitbutton <- G.xmlGetWidget xml G.castToButton "quitbutton"
leftbutton <- G.xmlGetWidget xml G.castToButton "leftbutton"
rightbutton <- G.xmlGetWidget xml G.castToButton "rightbutton"
upbutton <- G.xmlGetWidg... | 774 | false | true | 0 | 11 | 128 | 291 | 126 | 165 | null | null |
urbanslug/ghc | compiler/main/DynFlags.hs | bsd-3-clause | setPackageKey :: String -> DynFlags -> DynFlags
setPackageKey p s = s{ thisPackage = stringToPackageKey p } | 108 | setPackageKey :: String -> DynFlags -> DynFlags
setPackageKey p s = s{ thisPackage = stringToPackageKey p } | 108 | setPackageKey p s = s{ thisPackage = stringToPackageKey p } | 60 | false | true | 0 | 8 | 17 | 45 | 20 | 25 | null | null |
izimbra/webapa | src/Server.hs | gpl-2.0 | servePage :: Handle -> IO ()
servePage h = do
hSetBuffering h NoBuffering
request <- hGetContents h
printf "Received request:\n %s\n" request
hPutStrLn h "HTTP/1.0 200 OK\r\nContent-Length: 5\r\n\r\nPong!\r\n" | 217 | servePage :: Handle -> IO ()
servePage h = do
hSetBuffering h NoBuffering
request <- hGetContents h
printf "Received request:\n %s\n" request
hPutStrLn h "HTTP/1.0 200 OK\r\nContent-Length: 5\r\n\r\nPong!\r\n" | 217 | servePage h = do
hSetBuffering h NoBuffering
request <- hGetContents h
printf "Received request:\n %s\n" request
hPutStrLn h "HTTP/1.0 200 OK\r\nContent-Length: 5\r\n\r\nPong!\r\n" | 188 | false | true | 0 | 9 | 35 | 62 | 25 | 37 | null | null |
aartifact/aartifact-verifier | src/ExpSQL.hs | mit | cnvAll e p o l vs (n:ns) = cnvAll e' p (o+1) min1 vs1 ns
where (vs1, e', min1) = cnv (e+1) p o (l+1) vs n | 108 | cnvAll e p o l vs (n:ns) = cnvAll e' p (o+1) min1 vs1 ns
where (vs1, e', min1) = cnv (e+1) p o (l+1) vs n | 108 | cnvAll e p o l vs (n:ns) = cnvAll e' p (o+1) min1 vs1 ns
where (vs1, e', min1) = cnv (e+1) p o (l+1) vs n | 108 | false | false | 0 | 7 | 29 | 90 | 47 | 43 | null | null |
seL4/capDL-tool | CapDL/State.hs | bsd-2-clause | flattenPD :: KernelObject Word -> Model Word -> KernelObject [Word]
flattenPD obj m =
let newSlots = capSpace (slots obj) pdSlots m
origSlots = Map.mapKeys singleton (slots obj)
in obj { slots = Map.difference newSlots origSlots } | 246 | flattenPD :: KernelObject Word -> Model Word -> KernelObject [Word]
flattenPD obj m =
let newSlots = capSpace (slots obj) pdSlots m
origSlots = Map.mapKeys singleton (slots obj)
in obj { slots = Map.difference newSlots origSlots } | 246 | flattenPD obj m =
let newSlots = capSpace (slots obj) pdSlots m
origSlots = Map.mapKeys singleton (slots obj)
in obj { slots = Map.difference newSlots origSlots } | 178 | false | true | 0 | 11 | 52 | 101 | 47 | 54 | null | null |
f1ori/hadcc | TTH.hs | gpl-3.0 | sqlbla conn path = quickQuery' conn "SELECT tth, modtime FROM tthcache WHERE path=?;"
[SqlString $ T.unpack path] | 132 | sqlbla conn path = quickQuery' conn "SELECT tth, modtime FROM tthcache WHERE path=?;"
[SqlString $ T.unpack path] | 132 | sqlbla conn path = quickQuery' conn "SELECT tth, modtime FROM tthcache WHERE path=?;"
[SqlString $ T.unpack path] | 132 | false | false | 0 | 9 | 35 | 30 | 14 | 16 | null | null |
jacekszymanski/wxHaskell | samples/wx/Process.hs | lgpl-2.1 | gui :: IO ()
gui
= do f <- frame [text := "Process test"]
p <- panel f [] -- panel for tab-management etc.
input <- comboBox p [processEnter := True, text := "cmd"]
output <- textCtrlRich p [bgcolor := black, textColor := red, font := fontFixed{ _fontSize = 12 }]
... | 2,060 | gui :: IO ()
gui
= do f <- frame [text := "Process test"]
p <- panel f [] -- panel for tab-management etc.
input <- comboBox p [processEnter := True, text := "cmd"]
output <- textCtrlRich p [bgcolor := black, textColor := red, font := fontFixed{ _fontSize = 12 }]
... | 2,060 | gui
= do f <- frame [text := "Process test"]
p <- panel f [] -- panel for tab-management etc.
input <- comboBox p [processEnter := True, text := "cmd"]
output <- textCtrlRich p [bgcolor := black, textColor := red, font := fontFixed{ _fontSize = 12 }]
stop_ ... | 2,047 | false | true | 3 | 16 | 752 | 685 | 320 | 365 | null | null |
hvr/vector | Data/Vector/Storable.hs | bsd-3-clause | span = G.span | 13 | span = G.span | 13 | span = G.span | 13 | false | false | 1 | 6 | 2 | 12 | 4 | 8 | null | null |
frantisekfarka/ghc-dsi | compiler/cmm/CmmSink.hs | bsd-3-clause | regAddr _ (CmmGlobal Hp) _ _ = HeapMem | 43 | regAddr _ (CmmGlobal Hp) _ _ = HeapMem | 43 | regAddr _ (CmmGlobal Hp) _ _ = HeapMem | 43 | false | false | 0 | 7 | 12 | 21 | 10 | 11 | null | null |
ml9951/ghc | utils/ghctags/Main.hs | bsd-3-clause | e_dumpfiledata :: FileData -> String
e_dumpfiledata (FileData filename things line_map) =
"\x0c\n" ++ filename ++ "," ++ (show thingslength) ++ "\n" ++ thingsdump
where
thingsdump = concat $ map (e_dumpthing line_map) things
thingslength = length thingsdump | 305 | e_dumpfiledata :: FileData -> String
e_dumpfiledata (FileData filename things line_map) =
"\x0c\n" ++ filename ++ "," ++ (show thingslength) ++ "\n" ++ thingsdump
where
thingsdump = concat $ map (e_dumpthing line_map) things
thingslength = length thingsdump | 305 | e_dumpfiledata (FileData filename things line_map) =
"\x0c\n" ++ filename ++ "," ++ (show thingslength) ++ "\n" ++ thingsdump
where
thingsdump = concat $ map (e_dumpthing line_map) things
thingslength = length thingsdump | 268 | false | true | 3 | 9 | 83 | 94 | 43 | 51 | null | null |
kdungs/adventofcode2016 | 05.hs | mit | findPassword' :: Builder -> String
findPassword' b = mapToString $ buildMap M.empty (allHashes b) | 97 | findPassword' :: Builder -> String
findPassword' b = mapToString $ buildMap M.empty (allHashes b) | 97 | findPassword' b = mapToString $ buildMap M.empty (allHashes b) | 62 | false | true | 0 | 8 | 13 | 35 | 17 | 18 | null | null |
antalsz/hs-to-coq | examples/ghc/gen-files/Lexer.hs | mit | alex_action_22 = do_layout_left | 32 | alex_action_22 = do_layout_left | 32 | alex_action_22 = do_layout_left | 32 | false | false | 0 | 4 | 3 | 6 | 3 | 3 | null | null |
Pnom/haskell-ast-pretty | Test/examples/Attributes.hs | mit | usedByGraphs MaxIter{} = True | 40 | usedByGraphs MaxIter{} = True | 40 | usedByGraphs MaxIter{} = True | 40 | false | false | 0 | 6 | 14 | 13 | 6 | 7 | null | null |
BartAdv/Idris-dev | src/Idris/Core/ProofState.hs | bsd-3-clause | -- When solving something in the 'dont unify' set, we should check
-- that the guess we are solving it with unifies with the thing unification
-- found for it, if anything.
solve :: RunTactic
solve ctxt env (Bind x (Guess ty val) sc)
= do ps <- get
let (uh, uns) = unified ps
dropdots <-
... | 2,659 | solve :: RunTactic
solve ctxt env (Bind x (Guess ty val) sc)
= do ps <- get
let (uh, uns) = unified ps
dropdots <-
case lookup x (notunified ps) of
Just tm -> -- trace ("NEED MATCH: " ++ show (x, tm, val) ++ "\nIN " ++ show (pterm ps)) $
do mat... | 2,485 | solve ctxt env (Bind x (Guess ty val) sc)
= do ps <- get
let (uh, uns) = unified ps
dropdots <-
case lookup x (notunified ps) of
Just tm -> -- trace ("NEED MATCH: " ++ show (x, tm, val) ++ "\nIN " ++ show (pterm ps)) $
do match_unify' ctxt env ... | 2,466 | true | true | 14 | 19 | 1,177 | 966 | 504 | 462 | null | null |
nushio3/ghc | compiler/basicTypes/OccName.hs | bsd-3-clause | filterOccEnv x (A y) = A $ filterUFM x y | 46 | filterOccEnv x (A y) = A $ filterUFM x y | 46 | filterOccEnv x (A y) = A $ filterUFM x y | 46 | false | false | 0 | 7 | 15 | 26 | 12 | 14 | null | null |
mzini/termlib | Termlib/Problem/TpdbParser.hs | gpl-3.0 | astring :: TPDBParser String
astring = do _ <- char '"'
res <- many (noneOf "\"")
_ <- char '"'
return res | 149 | astring :: TPDBParser String
astring = do _ <- char '"'
res <- many (noneOf "\"")
_ <- char '"'
return res | 149 | astring = do _ <- char '"'
res <- many (noneOf "\"")
_ <- char '"'
return res | 120 | false | true | 1 | 11 | 64 | 60 | 24 | 36 | null | null |
ekmett/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxFDIAGONAL_HATCH :: Int
wxFDIAGONAL_HATCH = 113 | 48 | wxFDIAGONAL_HATCH :: Int
wxFDIAGONAL_HATCH = 113 | 48 | wxFDIAGONAL_HATCH = 113 | 23 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
lifengsun/haskell-exercise | scheme/03/evaluator3.hs | gpl-3.0 | showVal (String contents) = concat ["\"", contents, "\""] | 57 | showVal (String contents) = concat ["\"", contents, "\""] | 57 | showVal (String contents) = concat ["\"", contents, "\""] | 57 | false | false | 0 | 7 | 7 | 27 | 14 | 13 | null | null |
Loveice/PFAD | ch3/ch3.hs | mit | invert3 f z = find3 (0,m) (n,0) f z
where m = bsearch (\y -> f (0,y)) (-1,z+1) z
n = bsearch (\x -> f (x,0)) (-1,z+1) z | 133 | invert3 f z = find3 (0,m) (n,0) f z
where m = bsearch (\y -> f (0,y)) (-1,z+1) z
n = bsearch (\x -> f (x,0)) (-1,z+1) z | 133 | invert3 f z = find3 (0,m) (n,0) f z
where m = bsearch (\y -> f (0,y)) (-1,z+1) z
n = bsearch (\x -> f (x,0)) (-1,z+1) z | 133 | false | false | 1 | 9 | 41 | 117 | 64 | 53 | null | null |
kazu-yamamoto/rpf | LogMsg.hs | bsd-3-clause | toFacility :: String -> Facility
toFacility str = fromMaybe (error $ "Unknown facility " ++ show str) (lookup str facilityDB) | 125 | toFacility :: String -> Facility
toFacility str = fromMaybe (error $ "Unknown facility " ++ show str) (lookup str facilityDB) | 125 | toFacility str = fromMaybe (error $ "Unknown facility " ++ show str) (lookup str facilityDB) | 92 | false | true | 0 | 8 | 19 | 45 | 22 | 23 | null | null |
mstksg/write-you-a-haskell | chapter3/parsec.hs | mit | spaces :: Parser String
spaces = many $ oneOf " \n\r" | 53 | spaces :: Parser String
spaces = many $ oneOf " \n\r" | 53 | spaces = many $ oneOf " \n\r" | 29 | false | true | 0 | 6 | 10 | 21 | 10 | 11 | null | null |
esengie/fpl-exploration-tool | src/specLang/SortCheck/Term.hs | bsd-3-clause | checkTerm :: MetaCtx -> Ctx -> Term -> SortCheckM (Term, Sort)
checkTerm meta ctx tm = do
tm' <- fixTerm meta tm
srt <- checkTerm' meta ctx tm'
return (tm', srt)
-- Need this as a second pass parser stage, as all identifiers are parsed as vars initially | 260 | checkTerm :: MetaCtx -> Ctx -> Term -> SortCheckM (Term, Sort)
checkTerm meta ctx tm = do
tm' <- fixTerm meta tm
srt <- checkTerm' meta ctx tm'
return (tm', srt)
-- Need this as a second pass parser stage, as all identifiers are parsed as vars initially | 260 | checkTerm meta ctx tm = do
tm' <- fixTerm meta tm
srt <- checkTerm' meta ctx tm'
return (tm', srt)
-- Need this as a second pass parser stage, as all identifiers are parsed as vars initially | 197 | false | true | 0 | 9 | 54 | 78 | 38 | 40 | null | null |
bitemyapp/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | validSsHvparamsKeys :: FrozenSet String
validSsHvparamsKeys =
ConstantUtils.mkSet [ssHvparamsXenChroot,
ssHvparamsXenLxc,
ssHvparamsXenFake,
ssHvparamsXenHvm,
ssHvparamsXenKvm,
ssHvparamsXenPvm] | 311 | validSsHvparamsKeys :: FrozenSet String
validSsHvparamsKeys =
ConstantUtils.mkSet [ssHvparamsXenChroot,
ssHvparamsXenLxc,
ssHvparamsXenFake,
ssHvparamsXenHvm,
ssHvparamsXenKvm,
ssHvparamsXenPvm] | 311 | validSsHvparamsKeys =
ConstantUtils.mkSet [ssHvparamsXenChroot,
ssHvparamsXenLxc,
ssHvparamsXenFake,
ssHvparamsXenHvm,
ssHvparamsXenKvm,
ssHvparamsXenPvm] | 271 | false | true | 1 | 5 | 129 | 40 | 21 | 19 | null | null |
knsd/crypto-pubkey-openssh | src/Crypto/PubKey/OpenSsh/Encode.hs | mit | keyTypePutter :: Putter OpenSshKeyType
keyTypePutter OpenSshKeyTypeRsa = putByteString "ssh-rsa" | 96 | keyTypePutter :: Putter OpenSshKeyType
keyTypePutter OpenSshKeyTypeRsa = putByteString "ssh-rsa" | 96 | keyTypePutter OpenSshKeyTypeRsa = putByteString "ssh-rsa" | 57 | false | true | 0 | 5 | 8 | 20 | 9 | 11 | null | null |
thiagorp/deployments-web | app/LibUtils.hs | bsd-3-clause | mapAppError :: AppError -> ServantErr
mapAppError _ = err500 | 60 | mapAppError :: AppError -> ServantErr
mapAppError _ = err500 | 60 | mapAppError _ = err500 | 22 | false | true | 0 | 5 | 8 | 18 | 9 | 9 | null | null |
FranklinChen/hugs98-plus-Sep2006 | packages/xhtml/Text/XHtml/Strict/Attributes.hs | bsd-3-clause | identifier = strAttr "id" | 36 | identifier = strAttr "id" | 36 | identifier = strAttr "id" | 36 | false | false | 1 | 5 | 14 | 12 | 4 | 8 | null | null |
fmapfmapfmap/amazonka | amazonka-ec2/test/Test/AWS/Gen/EC2.hs | mpl-2.0 | testCancelExportTaskResponse :: CancelExportTaskResponse -> TestTree
testCancelExportTaskResponse = res
"CancelExportTaskResponse"
"fixture/CancelExportTaskResponse.proto"
eC2
(Proxy :: Proxy CancelExportTask) | 225 | testCancelExportTaskResponse :: CancelExportTaskResponse -> TestTree
testCancelExportTaskResponse = res
"CancelExportTaskResponse"
"fixture/CancelExportTaskResponse.proto"
eC2
(Proxy :: Proxy CancelExportTask) | 225 | testCancelExportTaskResponse = res
"CancelExportTaskResponse"
"fixture/CancelExportTaskResponse.proto"
eC2
(Proxy :: Proxy CancelExportTask) | 156 | false | true | 0 | 7 | 30 | 33 | 17 | 16 | null | null |
chpatrick/hmidi | System/MIDI.hs | bsd-3-clause | - |Sends a system exclusive message. You should /not/ include the starting \/ trailing bytes 0xF0 and 0xF7.
--
-- Note: On Win32, the connection must be a `Destination`
sendSysEx :: Connection -> [Word8] -> IO ()
sendSysEx = S.sendSysEx
| 238 | sendSysEx :: Connection -> [Word8] -> IO ()
sendSysEx = S.sendSysEx | 67 | sendSysEx = S.sendSysEx | 23 | true | true | 1 | 13 | 41 | 76 | 40 | 36 | null | null |
bitrauser/cybnopsis | app/Main.hs | bsd-3-clause | main :: IO ()
main = putStrLn "Cybnopsis" | 41 | main :: IO ()
main = putStrLn "Cybnopsis" | 41 | main = putStrLn "Cybnopsis" | 27 | false | true | 0 | 7 | 7 | 24 | 10 | 14 | null | null |
GaloisInc/saw-script | saw-core-coq/src/Verifier/SAW/Translation/Coq/SAWModule.hs | bsd-3-clause | dropPi t = t | 29 | dropPi t = t | 29 | dropPi t = t | 29 | false | false | 0 | 4 | 20 | 9 | 4 | 5 | null | null |
CindyLinz/Haskell.js | trans/src/BasicTrans.hs | mit | transDecl :: Show l => Decl l -> String
transDecl (PatBind l (PVar l2 name) (UnGuardedRhs l3 expr) Nothing) =
"env[" ++ transName name ++ "] = {env: env, expr: " ++ transExpr expr ++ "};\n\n" | 193 | transDecl :: Show l => Decl l -> String
transDecl (PatBind l (PVar l2 name) (UnGuardedRhs l3 expr) Nothing) =
"env[" ++ transName name ++ "] = {env: env, expr: " ++ transExpr expr ++ "};\n\n" | 193 | transDecl (PatBind l (PVar l2 name) (UnGuardedRhs l3 expr) Nothing) =
"env[" ++ transName name ++ "] = {env: env, expr: " ++ transExpr expr ++ "};\n\n" | 153 | false | true | 0 | 9 | 37 | 78 | 37 | 41 | null | null |
RossOgilvie/MathPrelude | MathPrelude/Classes/Transcendental.hs | gpl-3.0 | cot x = 1/tan x | 15 | cot x = 1/tan x | 15 | cot x = 1/tan x | 15 | false | false | 0 | 6 | 4 | 16 | 7 | 9 | null | null |
iblumenfeld/saw-core | src/Verifier/SAW/Change.hs | bsd-3-clause | commitChangeT :: Monad m => ChangeT m a -> m a
commitChangeT (ChangeT m) = liftM commitChange m | 95 | commitChangeT :: Monad m => ChangeT m a -> m a
commitChangeT (ChangeT m) = liftM commitChange m | 95 | commitChangeT (ChangeT m) = liftM commitChange m | 48 | false | true | 0 | 7 | 17 | 44 | 20 | 24 | null | null |
profan/mal | haskell/step4_if_fn_do.hs | mpl-2.0 | eval_ast ast env = return ast | 29 | eval_ast ast env = return ast | 29 | eval_ast ast env = return ast | 29 | false | false | 1 | 5 | 5 | 18 | 6 | 12 | null | null |
tanishiking/hscc | src/ProgGenerator.hs | mit | convExpr (Minus _ e1 e2) = concat [convExpr e1, " - ", convExpr e2] | 73 | convExpr (Minus _ e1 e2) = concat [convExpr e1, " - ", convExpr e2] | 73 | convExpr (Minus _ e1 e2) = concat [convExpr e1, " - ", convExpr e2] | 73 | false | false | 0 | 7 | 19 | 38 | 18 | 20 | null | null |
Frefreak/hearthstone-cardsearch | client/src/JavaScript/JQuery.hs | bsd-3-clause | closestSelector :: Selector -> JQuery -> IO JQuery
closestSelector s = jq_closest (textToJSString s) | 100 | closestSelector :: Selector -> JQuery -> IO JQuery
closestSelector s = jq_closest (textToJSString s) | 100 | closestSelector s = jq_closest (textToJSString s) | 49 | false | true | 0 | 8 | 13 | 39 | 17 | 22 | null | null |
snoyberg/ghc | compiler/basicTypes/BasicTypes.hs | bsd-3-clause | -- | Turn a positive number into an 'IntWithInf', where 0 represents infinity
treatZeroAsInf :: Int -> IntWithInf
treatZeroAsInf 0 = Infinity | 141 | treatZeroAsInf :: Int -> IntWithInf
treatZeroAsInf 0 = Infinity | 63 | treatZeroAsInf 0 = Infinity | 27 | true | true | 0 | 7 | 21 | 25 | 11 | 14 | null | null |
gcampax/ghc | compiler/typecheck/TcType.hs | bsd-3-clause | vanillaSkolemTv, superSkolemTv :: TcTyVarDetails
-- See Note [Binding when looking up instances] in InstEnv
vanillaSkolemTv = SkolemTv False | 140 | vanillaSkolemTv, superSkolemTv :: TcTyVarDetails
vanillaSkolemTv = SkolemTv False | 81 | vanillaSkolemTv = SkolemTv False | 32 | true | true | 0 | 5 | 17 | 17 | 10 | 7 | null | null |
music-suite/music-parts | src/Music/Parts/Internal/Data.hs | bsd-3-clause | splitBy x xs = splitBy1 x xs
where
splitBy1 delimiter = foldr f [[]]
where f c l@(x:xs) | c == delimiter = []:l
| otherwise = (c:x):xs | 175 | splitBy x xs = splitBy1 x xs
where
splitBy1 delimiter = foldr f [[]]
where f c l@(x:xs) | c == delimiter = []:l
| otherwise = (c:x):xs | 175 | splitBy x xs = splitBy1 x xs
where
splitBy1 delimiter = foldr f [[]]
where f c l@(x:xs) | c == delimiter = []:l
| otherwise = (c:x):xs | 175 | false | false | 0 | 10 | 68 | 94 | 46 | 48 | null | null |
spirom/haskell-monads | ValueOrDetails.hs | mit | 1 = [11,12,10,17,13]
| 21 | l1 = [11,12,10,17,13] | 21 | l1 = [11,12,10,17,13] | 21 | false | false | 1 | 5 | 3 | 24 | 13 | 11 | null | null |
nevrenato/HetsAlloy | ExtModal/ExtModalSign.hs | gpl-2.0 | nomPId :: Token -> Id
nomPId t = mkId [t] | 41 | nomPId :: Token -> Id
nomPId t = mkId [t] | 41 | nomPId t = mkId [t] | 19 | false | true | 0 | 6 | 9 | 24 | 12 | 12 | null | null |
michalkonecny/aern2 | aern2-fun-univariate/src/AERN2/PPoly/Division.hs | bsd-3-clause | lsSnd :: LineSegment -> (Dyadic, MPBall)
lsSnd (LineSegment _ b) = b | 68 | lsSnd :: LineSegment -> (Dyadic, MPBall)
lsSnd (LineSegment _ b) = b | 68 | lsSnd (LineSegment _ b) = b | 27 | false | true | 0 | 9 | 11 | 38 | 18 | 20 | null | null |
cutsea110/aop | src/DualityOfSorts.hs | bsd-3-clause | split [a] = ([a], []) | 26 | split [a] = ([a], []) | 26 | split [a] = ([a], []) | 26 | false | false | 0 | 6 | 9 | 23 | 13 | 10 | null | null |
CarmineM74/haskell_craft3e | ExChap7.hs | mit | drop :: Int -> [a] -> [a]
drop _ [] = [] | 67 | drop :: Int -> [a] -> [a]
drop _ [] = [] | 67 | drop _ [] = [] | 22 | false | true | 0 | 7 | 38 | 34 | 18 | 16 | null | null |
christiaanb/ghc | compiler/typecheck/TcType.hs | bsd-3-clause | tcSplitTyConApp_maybe (FunTy arg res) = Just (funTyCon, [arg,res]) | 68 | tcSplitTyConApp_maybe (FunTy arg res) = Just (funTyCon, [arg,res]) | 68 | tcSplitTyConApp_maybe (FunTy arg res) = Just (funTyCon, [arg,res]) | 68 | false | false | 0 | 7 | 9 | 33 | 17 | 16 | null | null |
XDU-PurpleBear/database | pb-spider/src/Spider/Book/Kind.hs | gpl-3.0 | fetchBookInfo :: Int -> IO (Maybe (BookKind String))
fetchBookInfo isbn = do
let url = "http://www.openisbn.com/download/" ++ printf "%010d" isbn ++ ".txt"
rsp <- HTTP.simpleHTTP $ HTTP.getRequest url
HTTP.getResponseCode rsp >>=
(\code -> case code of
(2,0,0) -> do
txt <- HTTP.getResponseBo... | 505 | fetchBookInfo :: Int -> IO (Maybe (BookKind String))
fetchBookInfo isbn = do
let url = "http://www.openisbn.com/download/" ++ printf "%010d" isbn ++ ".txt"
rsp <- HTTP.simpleHTTP $ HTTP.getRequest url
HTTP.getResponseCode rsp >>=
(\code -> case code of
(2,0,0) -> do
txt <- HTTP.getResponseBo... | 505 | fetchBookInfo isbn = do
let url = "http://www.openisbn.com/download/" ++ printf "%010d" isbn ++ ".txt"
rsp <- HTTP.simpleHTTP $ HTTP.getRequest url
HTTP.getResponseCode rsp >>=
(\code -> case code of
(2,0,0) -> do
txt <- HTTP.getResponseBody rsp
return $ case runParser parseBookKin... | 452 | false | true | 0 | 19 | 151 | 176 | 83 | 93 | null | null |
tomjefferys/fuligite | src/Scripting/Fuligite/Literal.hs | mit | boolValue (F f) = f /= 0.0 | 26 | boolValue (F f) = f /= 0.0 | 26 | boolValue (F f) = f /= 0.0 | 26 | false | false | 0 | 7 | 6 | 19 | 9 | 10 | null | null |
gcampax/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | readPrec_RDR = varQual_RDR gHC_READ (fsLit "readPrec") | 65 | readPrec_RDR = varQual_RDR gHC_READ (fsLit "readPrec") | 65 | readPrec_RDR = varQual_RDR gHC_READ (fsLit "readPrec") | 65 | false | false | 0 | 7 | 16 | 17 | 8 | 9 | null | null |
comraq/scheme-interpreter | src/Core.hs | bsd-3-clause | evalDeep var@(LString _) = return var | 43 | evalDeep var@(LString _) = return var | 43 | evalDeep var@(LString _) = return var | 43 | false | false | 0 | 8 | 11 | 21 | 10 | 11 | null | null |
mightymoose/liquidhaskell | benchmarks/containers-0.5.0.0/Data/Sequence.hs | bsd-3-clause | viewLTree (Deep s (One a) m sf) = Just2 a (pullL (s - size a) m sf) | 67 | viewLTree (Deep s (One a) m sf) = Just2 a (pullL (s - size a) m sf) | 67 | viewLTree (Deep s (One a) m sf) = Just2 a (pullL (s - size a) m sf) | 67 | false | false | 0 | 10 | 16 | 53 | 25 | 28 | null | null |
eyeinsky/m5 | M5/Parse.hs | mit | stream = Stream
<$> ((asks pcStream >>= string) *> many spaceP *> (abstract <|> path))
<*> body
<?> "stream"
where abstract = Abstract <$> (word <* eol)
path = Path <$> (many1 (noneOf "\n\r") <* eol)
-- | Hardcoded parser configuration. | 260 | stream = Stream
<$> ((asks pcStream >>= string) *> many spaceP *> (abstract <|> path))
<*> body
<?> "stream"
where abstract = Abstract <$> (word <* eol)
path = Path <$> (many1 (noneOf "\n\r") <* eol)
-- | Hardcoded parser configuration. | 260 | stream = Stream
<$> ((asks pcStream >>= string) *> many spaceP *> (abstract <|> path))
<*> body
<?> "stream"
where abstract = Abstract <$> (word <* eol)
path = Path <$> (many1 (noneOf "\n\r") <* eol)
-- | Hardcoded parser configuration. | 260 | false | false | 12 | 10 | 64 | 110 | 51 | 59 | null | null |
unknownloner/calccomp | Asm/InstrBytes.hs | mit | instrBytes IN (Reg8 A:AddrIndir port:_) = w8l [0xDB, port] | 58 | instrBytes IN (Reg8 A:AddrIndir port:_) = w8l [0xDB, port] | 58 | instrBytes IN (Reg8 A:AddrIndir port:_) = w8l [0xDB, port] | 58 | false | false | 0 | 9 | 8 | 37 | 18 | 19 | null | null |
tolysz/prepare-ghcjs | spec-lts8/cabal/Cabal/tests/UnitTests/Distribution/Version.hs | bsd-3-clause | prop_from_to_intervals' :: VersionRange -> Version -> Bool
prop_from_to_intervals' range version =
withinRange version range' == withinRange version range
where
range' = fromVersionIntervals (toVersionIntervals range)
-- | The semantics of 'unionVersionIntervals' is (||).
-- | 284 | prop_from_to_intervals' :: VersionRange -> Version -> Bool
prop_from_to_intervals' range version =
withinRange version range' == withinRange version range
where
range' = fromVersionIntervals (toVersionIntervals range)
-- | The semantics of 'unionVersionIntervals' is (||).
-- | 284 | prop_from_to_intervals' range version =
withinRange version range' == withinRange version range
where
range' = fromVersionIntervals (toVersionIntervals range)
-- | The semantics of 'unionVersionIntervals' is (||).
-- | 225 | false | true | 0 | 7 | 41 | 57 | 28 | 29 | null | null |
elitak/forest | Language/Forest/Parser.hs | epl-1.0 | parse :: PS.Parser a -> SourceName -> Line -> Column -> String -> Either ParseError a
parse p fileName line column input
= PP.parse (do { setPosition (newPos fileName line column)
; whiteSpace
; x <- p
; eof
; return x
}) file... | 330 | parse :: PS.Parser a -> SourceName -> Line -> Column -> String -> Either ParseError a
parse p fileName line column input
= PP.parse (do { setPosition (newPos fileName line column)
; whiteSpace
; x <- p
; eof
; return x
}) file... | 330 | parse p fileName line column input
= PP.parse (do { setPosition (newPos fileName line column)
; whiteSpace
; x <- p
; eof
; return x
}) fileName input | 244 | false | true | 0 | 11 | 138 | 105 | 51 | 54 | null | null |
brendanhay/gogol | gogol-games-configuration/gen/Network/Google/GamesConfiguration/Types/Product.hs | mpl-2.0 | -- | An optional suffix for the NUMERIC format type. These strings follow the
-- same plural rules as all Android string resources.
gnfcSuffix :: Lens' GamesNumberFormatConfiguration (Maybe GamesNumberAffixConfiguration)
gnfcSuffix
= lens _gnfcSuffix (\ s a -> s{_gnfcSuffix = a}) | 282 | gnfcSuffix :: Lens' GamesNumberFormatConfiguration (Maybe GamesNumberAffixConfiguration)
gnfcSuffix
= lens _gnfcSuffix (\ s a -> s{_gnfcSuffix = a}) | 150 | gnfcSuffix
= lens _gnfcSuffix (\ s a -> s{_gnfcSuffix = a}) | 61 | true | true | 0 | 9 | 41 | 49 | 26 | 23 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.