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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
kylcarte/finally-logical | src/Data/Logic/CNF.hs | bsd-3-clause | p1 :: StrProp r => r
p1 = atom "C" .|. (atom "A" .&. atom "B") | 62 | p1 :: StrProp r => r
p1 = atom "C" .|. (atom "A" .&. atom "B") | 62 | p1 = atom "C" .|. (atom "A" .&. atom "B") | 41 | false | true | 1 | 8 | 15 | 47 | 20 | 27 | null | null |
Southern-Exposure-Seed-Exchange/southernexposure.com | server/scripts/ExportOddWeights.hs | gpl-3.0 | -- | Get Active Products join with any Active Variants.
getMassVariants :: SqlWriteT IO [ProductAndVariants]
getMassVariants = do
products <- selectList [] [Asc ProductBaseSku]
fmap catMaybes . forM products $ \e@(Entity pId _) -> do
vs <- filter (isMass . productVariantLotSize . entityVal) <$> selectLi... | 713 | getMassVariants :: SqlWriteT IO [ProductAndVariants]
getMassVariants = do
products <- selectList [] [Asc ProductBaseSku]
fmap catMaybes . forM products $ \e@(Entity pId _) -> do
vs <- filter (isMass . productVariantLotSize . entityVal) <$> selectList
[ ProductVariantProductId ==. pId
... | 657 | getMassVariants = do
products <- selectList [] [Asc ProductBaseSku]
fmap catMaybes . forM products $ \e@(Entity pId _) -> do
vs <- filter (isMass . productVariantLotSize . entityVal) <$> selectList
[ ProductVariantProductId ==. pId
, ProductVariantIsActive ==. True
]
... | 604 | true | true | 0 | 16 | 228 | 179 | 88 | 91 | null | null |
postgres-haskell/postgres-wire | src/Database/PostgreSQL/Protocol/Codecs/Encoders.hs | mit | uuid :: UUID -> Encode
uuid v = let (a, b, c, d) = toWords v
in putWord32BE a <> putWord32BE b <> putWord32BE c <> putWord32BE d | 138 | uuid :: UUID -> Encode
uuid v = let (a, b, c, d) = toWords v
in putWord32BE a <> putWord32BE b <> putWord32BE c <> putWord32BE d | 138 | uuid v = let (a, b, c, d) = toWords v
in putWord32BE a <> putWord32BE b <> putWord32BE c <> putWord32BE d | 115 | false | true | 0 | 10 | 37 | 72 | 34 | 38 | null | null |
shouya/projz | emulator/Processor.hs | bsd-2-clause | mem_inst :: (Word8 -> State -> State) -> State -> State
mem_inst f st = f (st ^. regMem HL) st | 94 | mem_inst :: (Word8 -> State -> State) -> State -> State
mem_inst f st = f (st ^. regMem HL) st | 94 | mem_inst f st = f (st ^. regMem HL) st | 38 | false | true | 0 | 9 | 20 | 56 | 26 | 30 | null | null |
ddssff/rdf4h | src/Data/RDF/MGraph.hs | bsd-3-clause | sel1 :: NodeSelector -> NodeSelector -> NodeSelector -> TMap -> HashSet (Node, Node, Node)
sel1 (Just subjFn) p o spoMap =
Set.unions $ map (sel2 p o) $ filter (\(x,_) -> subjFn x) $ HashMap.toList spoMap | 206 | sel1 :: NodeSelector -> NodeSelector -> NodeSelector -> TMap -> HashSet (Node, Node, Node)
sel1 (Just subjFn) p o spoMap =
Set.unions $ map (sel2 p o) $ filter (\(x,_) -> subjFn x) $ HashMap.toList spoMap | 206 | sel1 (Just subjFn) p o spoMap =
Set.unions $ map (sel2 p o) $ filter (\(x,_) -> subjFn x) $ HashMap.toList spoMap | 115 | false | true | 0 | 10 | 37 | 104 | 53 | 51 | null | null |
beni55/text | Data/Text/Lazy.hs | bsd-2-clause | equal _ Empty = False | 25 | equal _ Empty = False | 25 | equal _ Empty = False | 25 | false | false | 1 | 5 | 8 | 13 | 5 | 8 | null | null |
rueshyna/gogol | gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Product.hs | mpl-2.0 | -- | Site-wide settings.
sitiSiteSettings :: Lens' Site (Maybe SiteSettings)
sitiSiteSettings
= lens _sitiSiteSettings
(\ s a -> s{_sitiSiteSettings = a}) | 162 | sitiSiteSettings :: Lens' Site (Maybe SiteSettings)
sitiSiteSettings
= lens _sitiSiteSettings
(\ s a -> s{_sitiSiteSettings = a}) | 137 | sitiSiteSettings
= lens _sitiSiteSettings
(\ s a -> s{_sitiSiteSettings = a}) | 85 | true | true | 1 | 9 | 28 | 51 | 25 | 26 | null | null |
bacchanalia/KitchenSink | KitchenSink/Qualified.hs | gpl-3.0 | -- |'BC.hPut'
bc_hPut = BC.hPut | 31 | bc_hPut = BC.hPut | 17 | bc_hPut = BC.hPut | 17 | true | false | 0 | 5 | 4 | 9 | 5 | 4 | null | null |
dalaing/sdl2 | examples/lazyfoo/Lesson20.hs | bsd-3-clause | loadTexture :: SDL.Renderer -> FilePath -> IO Texture
loadTexture r filePath = do
surface <- getDataFileName filePath >>= SDL.loadBMP
size <- SDL.surfaceDimensions surface
format <- SDL.surfaceFormat surface
key <- SDL.mapRGB format (V3 0 maxBound maxBound)
SDL.colorKey surface $= Just key
t <- SDL.createTe... | 398 | loadTexture :: SDL.Renderer -> FilePath -> IO Texture
loadTexture r filePath = do
surface <- getDataFileName filePath >>= SDL.loadBMP
size <- SDL.surfaceDimensions surface
format <- SDL.surfaceFormat surface
key <- SDL.mapRGB format (V3 0 maxBound maxBound)
SDL.colorKey surface $= Just key
t <- SDL.createTe... | 398 | loadTexture r filePath = do
surface <- getDataFileName filePath >>= SDL.loadBMP
size <- SDL.surfaceDimensions surface
format <- SDL.surfaceFormat surface
key <- SDL.mapRGB format (V3 0 maxBound maxBound)
SDL.colorKey surface $= Just key
t <- SDL.createTextureFromSurface r surface
SDL.freeSurface surface
... | 344 | false | true | 0 | 10 | 66 | 144 | 63 | 81 | null | null |
pascalpoizat/vecahaskell | src/Veca/Operations.hs | apache-2.0 | {-|
Index an operation by a name.
-}
indexBy :: VName -> Operation -> Operation
indexBy i (Operation n) = Operation (i <> n) | 124 | indexBy :: VName -> Operation -> Operation
indexBy i (Operation n) = Operation (i <> n) | 87 | indexBy i (Operation n) = Operation (i <> n) | 44 | true | true | 0 | 10 | 23 | 46 | 22 | 24 | null | null |
mhwombat/creatur-audio-wains | src/ALife/Creatur/Wain/Audio/Object.hs | bsd-3-clause | objectId :: Object a rt -> String
objectId (PObject _ s) = "Audio " ++ s | 72 | objectId :: Object a rt -> String
objectId (PObject _ s) = "Audio " ++ s | 72 | objectId (PObject _ s) = "Audio " ++ s | 38 | false | true | 0 | 9 | 15 | 41 | 18 | 23 | null | null |
micknelso/language-c | src/Language/CFamily/Data/Position.hs | bsd-3-clause | retPos p = p | 38 | retPos p = p | 38 | retPos p = p | 38 | false | false | 0 | 5 | 29 | 9 | 4 | 5 | null | null |
d0kt0r0/Tidal | src/Sound/Tidal/old/Params.hs | gpl-3.0 | -- | a pattern of numbers from 0 to 1. Sets the center frequency of the band-pass filter.
(bandf, bandf_p) = pF "bandf" (Just 0) | 144 | (bandf, bandf_p) = pF "bandf" (Just 0) | 54 | (bandf, bandf_p) = pF "bandf" (Just 0) | 54 | true | false | 0 | 7 | 40 | 25 | 13 | 12 | null | null |
phischu/fragnix | tests/packages/scotty/Text.PrettyPrint.HughesPJ.hs | bsd-3-clause | -- | Default TextDetails printer.
txtPrinter :: TextDetails -> String -> String
txtPrinter (Chr c) s = c:s | 109 | txtPrinter :: TextDetails -> String -> String
txtPrinter (Chr c) s = c:s | 75 | txtPrinter (Chr c) s = c:s | 29 | true | true | 0 | 7 | 20 | 35 | 18 | 17 | null | null |
mreid/papersite | src/lib/Paper.hs | mit | getT :: Entry -> BibTex.T
getT (Entry t) = t | 44 | getT :: Entry -> BibTex.T
getT (Entry t) = t | 44 | getT (Entry t) = t | 18 | false | true | 0 | 9 | 9 | 32 | 14 | 18 | null | null |
sarahn/ganeti | src/Ganeti/OpCodes.hs | gpl-2.0 | opSummaryVal OpInstanceMigrate { opInstanceName = s } = Just s | 62 | opSummaryVal OpInstanceMigrate { opInstanceName = s } = Just s | 62 | opSummaryVal OpInstanceMigrate { opInstanceName = s } = Just s | 62 | false | false | 1 | 7 | 9 | 25 | 11 | 14 | null | null |
lpeterse/koka | src/Interpreter/Command.hs | apache-2.0 | -- | Parse a command without the preceeding colon.
cmdeval :: Parser Command
cmdeval
= do{ symbol "l" <|> symbol "load"; fpaths <- filenames; return (Load fpaths) }
<|> do{ symbol "r" <|> symbol "reload"; return Reload }
<|> do{ symbol "q" <|> symbol "quit"; return Quit }
-- external
<|> do{ symbol "e" <|> ... | 1,446 | cmdeval :: Parser Command
cmdeval
= do{ symbol "l" <|> symbol "load"; fpaths <- filenames; return (Load fpaths) }
<|> do{ symbol "r" <|> symbol "reload"; return Reload }
<|> do{ symbol "q" <|> symbol "quit"; return Quit }
-- external
<|> do{ symbol "e" <|> symbol "edit"; fpath <- option "" filename; return ... | 1,395 | cmdeval
= do{ symbol "l" <|> symbol "load"; fpaths <- filenames; return (Load fpaths) }
<|> do{ symbol "r" <|> symbol "reload"; return Reload }
<|> do{ symbol "q" <|> symbol "quit"; return Quit }
-- external
<|> do{ symbol "e" <|> symbol "edit"; fpath <- option "" filename; return (Edit fpath) }
<|> do{ s... | 1,369 | true | true | 41 | 19 | 341 | 667 | 324 | 343 | null | null |
smobs/Ratscrew | tests/Ratscrew/Game/Internal/Snapping/Tests.hs | mit | darkQueen :: Int -> [Card] -> Bool
darkQueen i cs = fut i $ Card Queen Spades : cs | 82 | darkQueen :: Int -> [Card] -> Bool
darkQueen i cs = fut i $ Card Queen Spades : cs | 82 | darkQueen i cs = fut i $ Card Queen Spades : cs | 47 | false | true | 0 | 7 | 18 | 43 | 21 | 22 | null | null |
mcschroeder/ghc | compiler/typecheck/TcRnTypes.hs | bsd-3-clause | isCFunEqCan :: Ct -> Bool
isCFunEqCan (CFunEqCan {}) = True | 59 | isCFunEqCan :: Ct -> Bool
isCFunEqCan (CFunEqCan {}) = True | 59 | isCFunEqCan (CFunEqCan {}) = True | 33 | false | true | 0 | 7 | 9 | 25 | 13 | 12 | null | null |
Pnom/haskell-ast-pretty | Test/examples/Attributes.hs | mit | usedByEdges Comment{} = True | 35 | usedByEdges Comment{} = True | 35 | usedByEdges Comment{} = True | 35 | false | false | 0 | 6 | 10 | 13 | 6 | 7 | null | null |
Rathcke/uni | ap/advanced programming/assignment2/ParserTest.hs | gpl-3.0 | --test = TestCase (assertEqual "description" "expected" actual)
testSucc1 :: Test
testSucc1 = TestCase (do parsedFile <- parseFile "tests/simple"
assertEqual "simple test file"
simpleAST $ show parsedFile) | 270 | testSucc1 :: Test
testSucc1 = TestCase (do parsedFile <- parseFile "tests/simple"
assertEqual "simple test file"
simpleAST $ show parsedFile) | 205 | testSucc1 = TestCase (do parsedFile <- parseFile "tests/simple"
assertEqual "simple test file"
simpleAST $ show parsedFile) | 187 | true | true | 0 | 10 | 90 | 43 | 20 | 23 | null | null |
dylanaraps/pywal | pywal/templates/colors.hs | mit | -- Shell variables
-- Generated by 'wal'
wallpaper="{wallpaper}" | 64 | wallpaper="{wallpaper}" | 23 | wallpaper="{wallpaper}" | 23 | true | false | 1 | 5 | 7 | 13 | 5 | 8 | null | null |
elliottt/llvm-pretty-lint | src/Text/LLVM/Lint.hs | bsd-3-clause | withRetType :: Type -> Lint a -> Lint a
withRetType ty body = Lint $ do
ro <- ask
local (ro { roRetType = Just ty }) (unLint body) | 134 | withRetType :: Type -> Lint a -> Lint a
withRetType ty body = Lint $ do
ro <- ask
local (ro { roRetType = Just ty }) (unLint body) | 134 | withRetType ty body = Lint $ do
ro <- ask
local (ro { roRetType = Just ty }) (unLint body) | 94 | false | true | 0 | 12 | 32 | 69 | 33 | 36 | null | null |
mattias-lundell/timber-llvm | src/Common.hs | bsd-3-clause | newEnv x ts = do vs <- mapM (const (newName x)) ts
return (vs `zip` ts) | 128 | newEnv x ts = do vs <- mapM (const (newName x)) ts
return (vs `zip` ts) | 128 | newEnv x ts = do vs <- mapM (const (newName x)) ts
return (vs `zip` ts) | 128 | false | false | 0 | 12 | 72 | 50 | 24 | 26 | null | null |
kawu/french-tag | src/NLP/Partage4Xmg/Grammar.hs | bsd-2-clause | symQ :: Q Sym
symQ = joinR (named "f" *> hasAttrVal "name" "cat") $
first $ node (named "sym" *> (L.toStrict <$> attr "value")) | 131 | symQ :: Q Sym
symQ = joinR (named "f" *> hasAttrVal "name" "cat") $
first $ node (named "sym" *> (L.toStrict <$> attr "value")) | 131 | symQ = joinR (named "f" *> hasAttrVal "name" "cat") $
first $ node (named "sym" *> (L.toStrict <$> attr "value")) | 117 | false | true | 0 | 11 | 27 | 65 | 31 | 34 | null | null |
christinem/courseography | app/DynamicGraphs/GraphGenerator.hs | gpl-3.0 | reqToStmtsHelper :: (StmtsWithCounter, [Text]) -> Req -> (StmtsWithCounter, [Text])
-- TODO: update function
reqToStmtsHelper ((stmtslst, counter), roots) (J string1 _) = (([makeNode (pack string1) counter 0]
++ stmtslst, counter + 1),
... | 414 | reqToStmtsHelper :: (StmtsWithCounter, [Text]) -> Req -> (StmtsWithCounter, [Text])
reqToStmtsHelper ((stmtslst, counter), roots) (J string1 _) = (([makeNode (pack string1) counter 0]
++ stmtslst, counter + 1),
... | 388 | reqToStmtsHelper ((stmtslst, counter), roots) (J string1 _) = (([makeNode (pack string1) counter 0]
++ stmtslst, counter + 1),
[mappendTextWithCounter (pack string1) counter] ++ roots) | 304 | true | true | 0 | 11 | 157 | 117 | 66 | 51 | null | null |
haskell-infra/git-haskell-org-hooks | src/Common.hs | gpl-3.0 | gitCatBlob :: FilePath -> GitRef -> Sh Text
gitCatBlob d ref = do
tmpl <- liftM tread $ runGit d "cat-file" ["-s", ref] -- workaround shelly adding EOLs
tmp <- runGit d "cat-file" ["blob", ref]
return (T.take tmpl tmp)
where
tread = read . T.unpack
-- | Wrapper around @git rev-parse --verify@
--
-- N... | 351 | gitCatBlob :: FilePath -> GitRef -> Sh Text
gitCatBlob d ref = do
tmpl <- liftM tread $ runGit d "cat-file" ["-s", ref] -- workaround shelly adding EOLs
tmp <- runGit d "cat-file" ["blob", ref]
return (T.take tmpl tmp)
where
tread = read . T.unpack
-- | Wrapper around @git rev-parse --verify@
--
-- N... | 351 | gitCatBlob d ref = do
tmpl <- liftM tread $ runGit d "cat-file" ["-s", ref] -- workaround shelly adding EOLs
tmp <- runGit d "cat-file" ["blob", ref]
return (T.take tmpl tmp)
where
tread = read . T.unpack
-- | Wrapper around @git rev-parse --verify@
--
-- Normalise git ref to commit sha1 | 307 | false | true | 2 | 10 | 78 | 117 | 55 | 62 | null | null |
damianfral/clay | src/Clay/Elements.hs | bsd-3-clause | li = "li" | 9 | li = "li" | 9 | li = "li" | 9 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
CulpaBS/wbBach | src/Futhark/CodeGen/Backends/GenericC.hs | bsd-3-clause | compileCode (Allocate name (Count e) space) = do
size <- compileExp e
allocMem name size space | 98 | compileCode (Allocate name (Count e) space) = do
size <- compileExp e
allocMem name size space | 98 | compileCode (Allocate name (Count e) space) = do
size <- compileExp e
allocMem name size space | 98 | false | false | 0 | 9 | 19 | 45 | 20 | 25 | null | null |
kadena-io/pact | src/Pact/Types/Util.hs | bsd-3-clause | -- | Re-wrapping lens.
rewrapping :: (Profunctor p, Functor f, Wrapped b, Wrapped a,
Unwrapped a ~ Unwrapped b) =>
p a (f a) -> p b (f b)
rewrapping = _Wrapped' . _Unwrapped' | 203 | rewrapping :: (Profunctor p, Functor f, Wrapped b, Wrapped a,
Unwrapped a ~ Unwrapped b) =>
p a (f a) -> p b (f b)
rewrapping = _Wrapped' . _Unwrapped' | 180 | rewrapping = _Wrapped' . _Unwrapped' | 36 | true | true | 0 | 9 | 62 | 83 | 41 | 42 | null | null |
mfpi/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/Core31/Tokens.hs | bsd-3-clause | gl_RED :: GLenum
gl_RED = 0x1903 | 32 | gl_RED :: GLenum
gl_RED = 0x1903 | 32 | gl_RED = 0x1903 | 15 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
rueshyna/gogol | gogol-games/gen/Network/Google/Games/Types/Product.hs | mpl-2.0 | -- | Uniquely identifies the type of this resource. Value is always the fixed
-- string games#roomClientAddress.
rcaKind :: Lens' RoomClientAddress Text
rcaKind = lens _rcaKind (\ s a -> s{_rcaKind = a}) | 203 | rcaKind :: Lens' RoomClientAddress Text
rcaKind = lens _rcaKind (\ s a -> s{_rcaKind = a}) | 90 | rcaKind = lens _rcaKind (\ s a -> s{_rcaKind = a}) | 50 | true | true | 0 | 9 | 32 | 41 | 23 | 18 | null | null |
stefan-j/ProjectEuler | q17.hs | mit | wordnames 13 = "thirteen" | 25 | wordnames 13 = "thirteen" | 25 | wordnames 13 = "thirteen" | 25 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
sdiehl/ghc | compiler/main/CmdLineParser.hs | bsd-3-clause | defFlag :: String -> OptKind m -> Flag m
defFlag name optKind = Flag name optKind AllModes | 90 | defFlag :: String -> OptKind m -> Flag m
defFlag name optKind = Flag name optKind AllModes | 90 | defFlag name optKind = Flag name optKind AllModes | 49 | false | true | 0 | 7 | 16 | 37 | 17 | 20 | null | null |
diku-kmc/repg | src/KMC/RangeSet.hs | mit | member :: (Ord a) => a -> RangeSet a -> Bool
member w (RangeSet rs) = any (\(l, h) -> l <= w && w <= h) rs | 106 | member :: (Ord a) => a -> RangeSet a -> Bool
member w (RangeSet rs) = any (\(l, h) -> l <= w && w <= h) rs | 106 | member w (RangeSet rs) = any (\(l, h) -> l <= w && w <= h) rs | 61 | false | true | 0 | 10 | 27 | 73 | 38 | 35 | null | null |
mrmonday/Idris-dev | src/Idris/IBC.hs | bsd-3-clause | pOptimise :: [(Name, OptInfo)] -> Idris ()
pOptimise cs = mapM_ (\ (n, c) -> updateIState (\i ->
i { idris_optimisation = addDef n c (idris_optimisation i) })) cs | 186 | pOptimise :: [(Name, OptInfo)] -> Idris ()
pOptimise cs = mapM_ (\ (n, c) -> updateIState (\i ->
i { idris_optimisation = addDef n c (idris_optimisation i) })) cs | 186 | pOptimise cs = mapM_ (\ (n, c) -> updateIState (\i ->
i { idris_optimisation = addDef n c (idris_optimisation i) })) cs | 143 | false | true | 0 | 15 | 52 | 88 | 46 | 42 | null | null |
svenssonjoel/ObsidianGFX | Obsidian/CodeGen/Program.hs | bsd-3-clause | cs i (P.Declare id t) = return ((),out (SDeclare id t)) | 58 | cs i (P.Declare id t) = return ((),out (SDeclare id t)) | 58 | cs i (P.Declare id t) = return ((),out (SDeclare id t)) | 58 | false | false | 0 | 8 | 13 | 45 | 21 | 24 | null | null |
romanb/amazonka | amazonka-elb/gen/Network/AWS/ELB/SetLoadBalancerListenerSSLCertificate.hs | mpl-2.0 | -- | The name of the load balancer.
slblsslcLoadBalancerName :: Lens' SetLoadBalancerListenerSSLCertificate Text
slblsslcLoadBalancerName =
lens _slblsslcLoadBalancerName
(\s a -> s { _slblsslcLoadBalancerName = a }) | 228 | slblsslcLoadBalancerName :: Lens' SetLoadBalancerListenerSSLCertificate Text
slblsslcLoadBalancerName =
lens _slblsslcLoadBalancerName
(\s a -> s { _slblsslcLoadBalancerName = a }) | 192 | slblsslcLoadBalancerName =
lens _slblsslcLoadBalancerName
(\s a -> s { _slblsslcLoadBalancerName = a }) | 115 | true | true | 1 | 9 | 37 | 46 | 22 | 24 | null | null |
lexml/lexml-linker | src/main/haskell/MakeMunicipios.hs | gpl-2.0 | limpaChar 'ã' = 'a' | 19 | limpaChar 'ã' = 'a' | 19 | limpaChar 'ã' = 'a' | 19 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
garetxe/cabal | Cabal/Distribution/Simple/GHC/Internal.hs | bsd-3-clause | showOsString OSX = "darwin" | 31 | showOsString OSX = "darwin" | 31 | showOsString OSX = "darwin" | 31 | false | false | 0 | 5 | 7 | 9 | 4 | 5 | null | null |
tjakway/ghcjvm | compiler/nativeGen/X86/CodeGen.hs | bsd-3-clause | getRegister' _ is32Bit (CmmMachOp (MO_SS_Conv W16 W64) [CmmLoad addr _])
| not is32Bit = do
code <- intLoadCode (MOVSxL II16) addr
return (Any II64 code) | 158 | getRegister' _ is32Bit (CmmMachOp (MO_SS_Conv W16 W64) [CmmLoad addr _])
| not is32Bit = do
code <- intLoadCode (MOVSxL II16) addr
return (Any II64 code) | 158 | getRegister' _ is32Bit (CmmMachOp (MO_SS_Conv W16 W64) [CmmLoad addr _])
| not is32Bit = do
code <- intLoadCode (MOVSxL II16) addr
return (Any II64 code) | 158 | false | false | 1 | 12 | 29 | 82 | 35 | 47 | null | null |
JoeyEremondi/elm-type-effect | src/Type/Effect/Pattern.hs | bsd-3-clause | --Group patterns by their constructors, since we might match on more/less specific versions
sortByCtor :: [P.CanonicalPattern] -> [(String, [[P.CanonicalPattern]])]
sortByCtor patList =
let
--TODO sort other than by CTOR?
allNames = (List.nub $ map (ctorName) patList)
maybeAddName name pa@(A.A _ pat) subP... | 877 | sortByCtor :: [P.CanonicalPattern] -> [(String, [[P.CanonicalPattern]])]
sortByCtor patList =
let
--TODO sort other than by CTOR?
allNames = (List.nub $ map (ctorName) patList)
maybeAddName name pa@(A.A _ pat) subPatList = case pat of
P.Data name2 pats -> if (name == ctorName pa) then (pats : subPat... | 785 | sortByCtor patList =
let
--TODO sort other than by CTOR?
allNames = (List.nub $ map (ctorName) patList)
maybeAddName name pa@(A.A _ pat) subPatList = case pat of
P.Data name2 pats -> if (name == ctorName pa) then (pats : subPatList) else subPatList
(P.Record e) -> subPatList
(P.Alias e1 ... | 712 | true | true | 0 | 15 | 187 | 272 | 143 | 129 | null | null |
burz/sonada | Model.hs | apache-2.0 | discardEmptyString (Just s) = if s == "" then Nothing else Just s | 65 | discardEmptyString (Just s) = if s == "" then Nothing else Just s | 65 | discardEmptyString (Just s) = if s == "" then Nothing else Just s | 65 | false | false | 0 | 7 | 12 | 30 | 15 | 15 | null | null |
colinba/tip-toi-reveng | src/PrettyPrint.hs | mit | ppConditional :: Conditional ResReg -> String
ppConditional (Cond v1 o v2) = printf "%s%s%s?" (ppTVal v1) (ppCondOp o) (ppTVal v2) | 130 | ppConditional :: Conditional ResReg -> String
ppConditional (Cond v1 o v2) = printf "%s%s%s?" (ppTVal v1) (ppCondOp o) (ppTVal v2) | 130 | ppConditional (Cond v1 o v2) = printf "%s%s%s?" (ppTVal v1) (ppCondOp o) (ppTVal v2) | 84 | false | true | 0 | 7 | 19 | 58 | 28 | 30 | null | null |
keera-studios/hsQt | Qtc/ClassTypes/Gui.hs | bsd-2-clause | qLayoutListFromPtrList :: [Ptr (TQLayout a)] -> IO [QLayout a]
qLayoutListFromPtrList p
= objectListFromPtrList_nf p | 118 | qLayoutListFromPtrList :: [Ptr (TQLayout a)] -> IO [QLayout a]
qLayoutListFromPtrList p
= objectListFromPtrList_nf p | 118 | qLayoutListFromPtrList p
= objectListFromPtrList_nf p | 55 | false | true | 0 | 9 | 15 | 42 | 20 | 22 | null | null |
dmvianna/haskellbook | src/Ch14Ex-tests.hs | unlicense | square x = x * x | 16 | square x = x * x | 16 | square x = x * x | 16 | false | false | 0 | 5 | 5 | 13 | 6 | 7 | null | null |
kawamuray/ganeti | src/Ganeti/Monitoring/Server.hs | gpl-2.0 | -- | Return the report of all the available collectors.
allReports :: MVar CollectorMap -> Snap ()
allReports mvar = do
reports <- mapM (liftIO . getReport mvar) collectors
writeBS . pack . J.encode $ reports
-- | Takes the CollectorMap and a DataCollector and returns the report for this
-- collector. | 307 | allReports :: MVar CollectorMap -> Snap ()
allReports mvar = do
reports <- mapM (liftIO . getReport mvar) collectors
writeBS . pack . J.encode $ reports
-- | Takes the CollectorMap and a DataCollector and returns the report for this
-- collector. | 251 | allReports mvar = do
reports <- mapM (liftIO . getReport mvar) collectors
writeBS . pack . J.encode $ reports
-- | Takes the CollectorMap and a DataCollector and returns the report for this
-- collector. | 208 | true | true | 0 | 11 | 56 | 68 | 33 | 35 | null | null |
graninas/Andromeda | src/Andromeda/Language/LogicControl/Translator.hs | bsd-3-clause | feedCreator :: Creator a -> [String] -> a
feedCreator (Arity0Cr cr) [] = cr | 83 | feedCreator :: Creator a -> [String] -> a
feedCreator (Arity0Cr cr) [] = cr | 83 | feedCreator (Arity0Cr cr) [] = cr | 41 | false | true | 0 | 7 | 21 | 38 | 19 | 19 | null | null |
li-zhirui/EoplLangs | src/SimpleModule/TypeChecker.hs | bsd-3-clause | typeOf :: Expression -> TypeEnvironment -> TypeResult
typeOf (ConstExpr val) _ = typeOfConstExpr val | 111 | typeOf :: Expression -> TypeEnvironment -> TypeResult
typeOf (ConstExpr val) _ = typeOfConstExpr val | 111 | typeOf (ConstExpr val) _ = typeOfConstExpr val | 57 | false | true | 0 | 7 | 24 | 33 | 16 | 17 | null | null |
palas/detparaminf | src/DetParamInf/AptaTree.hs | bsd-2-clause | remo n (h:t) = h:remo (n - 1) t | 31 | remo n (h:t) = h:remo (n - 1) t | 31 | remo n (h:t) = h:remo (n - 1) t | 31 | false | false | 2 | 6 | 8 | 40 | 17 | 23 | null | null |
ekmett/ermine | src/Ermine/Interpreter.hs | bsd-2-clause | sentinel :: a
sentinel = error "PANIC: access past end of stack" | 64 | sentinel :: a
sentinel = error "PANIC: access past end of stack" | 64 | sentinel = error "PANIC: access past end of stack" | 50 | false | true | 0 | 6 | 11 | 21 | 8 | 13 | null | null |
tekul/cryptonite | Crypto/MAC/CMAC.hs | bsd-3-clause | bxor :: ByteArray ba => ba -> ba -> ba
bxor = B.xor | 51 | bxor :: ByteArray ba => ba -> ba -> ba
bxor = B.xor | 51 | bxor = B.xor | 12 | false | true | 0 | 7 | 12 | 28 | 14 | 14 | null | null |
grandpascorpion/canon | Math/NumberTheory/Canon.hs | gpl-3.0 | a ~~~~|<<^>>|~~~~ b = cApplyHy (makeCanon 47) [a,b] True | 60 | a ~~~~|<<^>>|~~~~ b = cApplyHy (makeCanon 47) [a,b] True | 60 | a ~~~~|<<^>>|~~~~ b = cApplyHy (makeCanon 47) [a,b] True | 60 | false | false | 0 | 7 | 12 | 31 | 15 | 16 | null | null |
mstksg/jlebot2 | src/Util.hs | mit | sealRandom :: (Monad m, RandomGen g, Serialize g)
=> Auto (RandT g m) a b
-> g
-> Auto m a b
sealRandom = sealState . hoistA (StateT . runRandT) | 177 | sealRandom :: (Monad m, RandomGen g, Serialize g)
=> Auto (RandT g m) a b
-> g
-> Auto m a b
sealRandom = sealState . hoistA (StateT . runRandT) | 177 | sealRandom = sealState . hoistA (StateT . runRandT) | 51 | false | true | 0 | 9 | 62 | 76 | 38 | 38 | null | null |
OpenXT/manager | xenmgr/Vm/React.hs | gpl-2.0 | detectBsgDevStatusR =
whenE VmBsgDevNodeChange checkBsgDevStatus | 66 | detectBsgDevStatusR =
whenE VmBsgDevNodeChange checkBsgDevStatus | 66 | detectBsgDevStatusR =
whenE VmBsgDevNodeChange checkBsgDevStatus | 66 | false | false | 1 | 5 | 6 | 16 | 5 | 11 | null | null |
oldmanmike/ghc | compiler/prelude/TysWiredIn.hs | bsd-3-clause | pcNonRecDataTyCon :: Name -> Maybe CType -> [TyVar] -> [DataCon] -> TyCon
-- Not an enumeration
pcNonRecDataTyCon = pcTyCon False NonRecursive | 142 | pcNonRecDataTyCon :: Name -> Maybe CType -> [TyVar] -> [DataCon] -> TyCon
pcNonRecDataTyCon = pcTyCon False NonRecursive | 120 | pcNonRecDataTyCon = pcTyCon False NonRecursive | 46 | true | true | 0 | 10 | 20 | 50 | 23 | 27 | null | null |
schell/orion | src/Web/Orion/OAuth/Services.hs | bsd-3-clause | stringToService _ = Nothing | 37 | stringToService _ = Nothing | 37 | stringToService _ = Nothing | 37 | false | false | 0 | 4 | 13 | 10 | 4 | 6 | null | null |
jekor/vocabulink | hs/Vocabulink.hs | agpl-3.0 | frontPage = do
mainButton <- case ?member of
Nothing -> return buyButton
Just m -> do
row <- $(queryTuple "SELECT page_no \
\FROM member_reader \
\INNER JOIN reader USING (reader_no)... | 4,302 | frontPage = do
mainButton <- case ?member of
Nothing -> return buyButton
Just m -> do
row <- $(queryTuple "SELECT page_no \
\FROM member_reader \
\INNER JOIN reader USING (reader_no)... | 4,302 | frontPage = do
mainButton <- case ?member of
Nothing -> return buyButton
Just m -> do
row <- $(queryTuple "SELECT page_no \
\FROM member_reader \
\INNER JOIN reader USING (reader_no)... | 4,302 | false | false | 0 | 39 | 1,483 | 668 | 288 | 380 | null | null |
alios/geojson-types | src/Data/GeoJSON/Geometries.hs | bsd-3-clause | _LineStringObject :: (VectorStructureClass fv fc a) =>
Prism' (GeometryStructure LineString a fv fc) (GeometryObject a)
_LineStringObject = _LineString .
iso GeometryLineString (\(GeometryLineString a) -> a) | 211 | _LineStringObject :: (VectorStructureClass fv fc a) =>
Prism' (GeometryStructure LineString a fv fc) (GeometryObject a)
_LineStringObject = _LineString .
iso GeometryLineString (\(GeometryLineString a) -> a) | 211 | _LineStringObject = _LineString .
iso GeometryLineString (\(GeometryLineString a) -> a) | 89 | false | true | 0 | 10 | 28 | 70 | 36 | 34 | null | null |
kojiromike/Idris-dev | src/Idris/Docstrings.hs | bsd-3-clause | -- | Check whether a docstring is emtpy
nullDocstring :: Docstring a -> Bool
nullDocstring (DocString _ blocks) = S.null blocks | 127 | nullDocstring :: Docstring a -> Bool
nullDocstring (DocString _ blocks) = S.null blocks | 87 | nullDocstring (DocString _ blocks) = S.null blocks | 50 | true | true | 0 | 7 | 20 | 35 | 17 | 18 | null | null |
markuspf/Idris-dev | src/IRTS/CodegenC.hs | bsd-3-clause | bcc i (UPDATE l r) = indent i ++ creg l ++ " = " ++ creg r ++ ";\n" | 67 | bcc i (UPDATE l r) = indent i ++ creg l ++ " = " ++ creg r ++ ";\n" | 67 | bcc i (UPDATE l r) = indent i ++ creg l ++ " = " ++ creg r ++ ";\n" | 67 | false | false | 0 | 9 | 19 | 46 | 20 | 26 | null | null |
urbit/archaeology2 | outside/commonmark/specfilter.hs | mit | anchors x = x | 13 | anchors x = x | 13 | anchors x = x | 13 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
olsner/ghc | ghc/Main.hs | bsd-3-clause | -- ghc --frontend Plugin.Module
doMkDependHSMode, doMakeMode, doInteractiveMode,
doAbiHashMode, showPackagesMode :: Mode
doMkDependHSMode = mkPostLoadMode DoMkDependHS | 170 | doMkDependHSMode, doMakeMode, doInteractiveMode,
doAbiHashMode, showPackagesMode :: Mode
doMkDependHSMode = mkPostLoadMode DoMkDependHS | 137 | doMkDependHSMode = mkPostLoadMode DoMkDependHS | 46 | true | true | 0 | 5 | 17 | 23 | 16 | 7 | null | null |
exclipy/pdata | Data/BitUtil.hs | bsd-3-clause | bitCount8 24 = 2 | 16 | bitCount8 24 = 2 | 16 | bitCount8 24 = 2 | 16 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
ksaveljev/hake-2 | src/Game/Monsters/MBoss31.hs | bsd-3-clause | frameWalk05 :: Int
frameWalk05 = 167 | 36 | frameWalk05 :: Int
frameWalk05 = 167 | 36 | frameWalk05 = 167 | 17 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
djeik/fuckdown2 | src/Pretty.hs | mit | pretty_ :: Free FuckDSL a -> String
pretty_ = pretty (const "") | 63 | pretty_ :: Free FuckDSL a -> String
pretty_ = pretty (const "") | 63 | pretty_ = pretty (const "") | 27 | false | true | 0 | 7 | 11 | 29 | 14 | 15 | null | null |
PipocaQuemada/ermine | src/Ermine/Loader/Core.hs | bsd-2-clause | -- | Lift a cache key isomorphism.
xmapCacheKey :: Functor m =>
AnIso' e e2 -> Iso' (Loader e m a b) (Loader e2 m a b)
xmapCacheKey i = withIso i $ \t f -> iso (xf t f) (xf f t)
where xf t f (Loader l r) =
Loader (l & mapped.mapped._1 %~ t)
(r & fmap (over argument f
... | 462 | xmapCacheKey :: Functor m =>
AnIso' e e2 -> Iso' (Loader e m a b) (Loader e2 m a b)
xmapCacheKey i = withIso i $ \t f -> iso (xf t f) (xf f t)
where xf t f (Loader l r) =
Loader (l & mapped.mapped._1 %~ t)
(r & fmap (over argument f
. over (mapped... | 427 | xmapCacheKey i = withIso i $ \t f -> iso (xf t f) (xf f t)
where xf t f (Loader l r) =
Loader (l & mapped.mapped._1 %~ t)
(r & fmap (over argument f
. over (mapped.mapped.mapped._1) t))
-- | A loader without reloadability. This is the simplest way to make
-- a ... | 327 | true | true | 0 | 15 | 157 | 175 | 87 | 88 | null | null |
jparyani/capnproto-boostpython | compiler/src/Parser.hs | bsd-2-clause | tokenErrorString ConstKeyword = "keyword \"const\"" | 51 | tokenErrorString ConstKeyword = "keyword \"const\"" | 51 | tokenErrorString ConstKeyword = "keyword \"const\"" | 51 | false | false | 0 | 5 | 4 | 9 | 4 | 5 | null | null |
elliottt/pddl | src/Text/PDDL/Parse.hs | bsd-3-clause | runParser :: Parser a -> Either ParseError a
runParser m = runM (unParser m) NoLoc | 82 | runParser :: Parser a -> Either ParseError a
runParser m = runM (unParser m) NoLoc | 82 | runParser m = runM (unParser m) NoLoc | 37 | false | true | 0 | 7 | 14 | 43 | 18 | 25 | null | null |
alphaHeavy/cabal | cabal-install/Distribution/Client/Dependency/Modular/Explore.hs | bsd-3-clause | exploreTree :: Alternative m => Tree a -> m (Assignment, RevDepMap)
exploreTree t = explore t (A M.empty M.empty M.empty) | 121 | exploreTree :: Alternative m => Tree a -> m (Assignment, RevDepMap)
exploreTree t = explore t (A M.empty M.empty M.empty) | 121 | exploreTree t = explore t (A M.empty M.empty M.empty) | 53 | false | true | 0 | 8 | 19 | 58 | 28 | 30 | null | null |
haskell/haddock | haddock-api/src/Haddock.hs | bsd-2-clause | render :: Logger -> DynFlags -> UnitState -> [Flag] -> SinceQual -> QualOption -> [Interface]
-> [(FilePath, InstalledInterface)] -> Map Module FilePath -> IO ()
render logger dflags unit_state flags sinceQual qual ifaces installedIfaces extSrcMap = do
let
title = fromMaybe "" (optTitle fla... | 7,452 | render :: Logger -> DynFlags -> UnitState -> [Flag] -> SinceQual -> QualOption -> [Interface]
-> [(FilePath, InstalledInterface)] -> Map Module FilePath -> IO ()
render logger dflags unit_state flags sinceQual qual ifaces installedIfaces extSrcMap = do
let
title = fromMaybe "" (optTitle fla... | 7,452 | render logger dflags unit_state flags sinceQual qual ifaces installedIfaces extSrcMap = do
let
title = fromMaybe "" (optTitle flags)
unicode = Flag_UseUnicode `elem` flags
pretty = Flag_PrettyHtml `elem` flags
opt_wiki_urls = wikiUrls flags
... | 7,283 | false | true | 0 | 23 | 2,319 | 1,821 | 899 | 922 | null | null |
kawu/concraft | src/NLP/Concraft/DAG2.hs | bsd-2-clause | ----------------------
-- Best path
----------------------
-- | Find all optimal paths in the given annotation. Optimal paths are those
-- which go through tags with the assigned probability 1.
findOptimalPaths :: Anno t Double -> [[(EdgeID, t)]]
findOptimalPaths dag = do
edgeID <- DAG.dagEdges dag
guard $ DAG.is... | 879 | findOptimalPaths :: Anno t Double -> [[(EdgeID, t)]]
findOptimalPaths dag = do
edgeID <- DAG.dagEdges dag
guard $ DAG.isInitialEdge edgeID dag
doit edgeID
where
doit i = inside i ++ final i
inside i = do
(tagx, weight) <- M.toList (DAG.edgeLabel i dag)
guard $ weight >= 1.0 - eps
j <- ... | 683 | findOptimalPaths dag = do
edgeID <- DAG.dagEdges dag
guard $ DAG.isInitialEdge edgeID dag
doit edgeID
where
doit i = inside i ++ final i
inside i = do
(tagx, weight) <- M.toList (DAG.edgeLabel i dag)
guard $ weight >= 1.0 - eps
j <- DAG.nextEdges i dag
xs <- doit j
return $... | 630 | true | true | 0 | 11 | 224 | 272 | 134 | 138 | null | null |
kahless/netm | src/WPA/Start/Main.hs | mit | terminateBy :: PHANDLE -> [Signal] -> IO ()
terminateBy pid = mapM_ $ \ sig -> installHandler sig handler Nothing
where handler = Catch (signalProcess sigTERM pid) | 166 | terminateBy :: PHANDLE -> [Signal] -> IO ()
terminateBy pid = mapM_ $ \ sig -> installHandler sig handler Nothing
where handler = Catch (signalProcess sigTERM pid) | 166 | terminateBy pid = mapM_ $ \ sig -> installHandler sig handler Nothing
where handler = Catch (signalProcess sigTERM pid) | 122 | false | true | 0 | 8 | 29 | 65 | 32 | 33 | null | null |
Helkafen/haddock | haddock-api/src/Haddock/Backends/LaTeX.hs | bsd-2-clause | ppBang _ = empty | 40 | ppBang _ = empty | 40 | ppBang _ = empty | 40 | false | false | 0 | 5 | 27 | 9 | 4 | 5 | null | null |
martomi/AI-Reversi | Reversi_AI.hs | mit | right = (1, 0) :: Direction | 32 | right = (1, 0) :: Direction | 32 | right = (1, 0) :: Direction | 32 | false | false | 1 | 5 | 10 | 16 | 9 | 7 | null | null |
Zoetermeer/latro | src/Latro/Reorder.hs | mit | rewriteInfix eImp@(ExpImport _ _) = eImp | 40 | rewriteInfix eImp@(ExpImport _ _) = eImp | 40 | rewriteInfix eImp@(ExpImport _ _) = eImp | 40 | false | false | 0 | 8 | 5 | 20 | 10 | 10 | null | null |
bjpop/lfg | test/uniform.hs | bsd-3-clause | main :: IO ()
main = do
putStrLn "100000 vals and 1000 bins"
let v1 = fill 10000 100 (head LFG.generators)
checkChi2 0.05 v1
checkChi2 0.01 v1
putStrLn "" | 164 | main :: IO ()
main = do
putStrLn "100000 vals and 1000 bins"
let v1 = fill 10000 100 (head LFG.generators)
checkChi2 0.05 v1
checkChi2 0.01 v1
putStrLn "" | 164 | main = do
putStrLn "100000 vals and 1000 bins"
let v1 = fill 10000 100 (head LFG.generators)
checkChi2 0.05 v1
checkChi2 0.01 v1
putStrLn "" | 150 | false | true | 0 | 13 | 38 | 68 | 29 | 39 | null | null |
haraldsteinlechner/lambdaWolf | src/Bench.hs | gpl-3.0 | mkGeometries n = replicateM n mkRandomGeometry | 46 | mkGeometries n = replicateM n mkRandomGeometry | 46 | mkGeometries n = replicateM n mkRandomGeometry | 46 | false | false | 1 | 5 | 5 | 18 | 6 | 12 | null | null |
isomorphism/webgl | src/Graphics/Rendering/WebGL/Constants.hs | mit | gl_SAMPLER_1D_SHADOW :: GLenum
gl_SAMPLER_1D_SHADOW = 0x8B61 | 60 | gl_SAMPLER_1D_SHADOW :: GLenum
gl_SAMPLER_1D_SHADOW = 0x8B61 | 60 | gl_SAMPLER_1D_SHADOW = 0x8B61 | 29 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
mettekou/ghc | compiler/prelude/TysWiredIn.hs | bsd-3-clause | -- Interesting: polymorphic recursion would help here.
-- We can't use (mkListTy alphaTy) in the defn of consDataCon, else mkListTy
-- gets the over-specific type (Type -> Type)
-- Wired-in type Maybe
maybeTyCon :: TyCon
maybeTyCon = pcTyCon False maybeTyConName Nothing alpha_tyvar
[nothingDataCo... | 335 | maybeTyCon :: TyCon
maybeTyCon = pcTyCon False maybeTyConName Nothing alpha_tyvar
[nothingDataCon, justDataCon] | 132 | maybeTyCon = pcTyCon False maybeTyConName Nothing alpha_tyvar
[nothingDataCon, justDataCon] | 112 | true | true | 0 | 6 | 66 | 32 | 19 | 13 | null | null |
mmisamore/directed-cubical | Examples/bigCube.hs | bsd-3-clause | cx = vsCmplx $ vsCoordsUnsafe (replicate 5 1) (replicate 5 6) | 61 | cx = vsCmplx $ vsCoordsUnsafe (replicate 5 1) (replicate 5 6) | 61 | cx = vsCmplx $ vsCoordsUnsafe (replicate 5 1) (replicate 5 6) | 61 | false | false | 3 | 7 | 10 | 35 | 15 | 20 | null | null |
daherb/Haskell-Muste | ajax-backend/Database.hs | artistic-2.0 | addUser :: Connection -> String -> String -> Int -> IO ()
addUser conn user pass enabled =
do
-- Create a salted password
salt <- createSalt
let safePw = hashPasswd (B.pack pass) salt
-- Remove user if they already exists
let deleteQuery = "DELETE FROM User WHERE Username = ?;" :: Query
execut... | 525 | addUser :: Connection -> String -> String -> Int -> IO ()
addUser conn user pass enabled =
do
-- Create a salted password
salt <- createSalt
let safePw = hashPasswd (B.pack pass) salt
-- Remove user if they already exists
let deleteQuery = "DELETE FROM User WHERE Username = ?;" :: Query
execut... | 525 | addUser conn user pass enabled =
do
-- Create a salted password
salt <- createSalt
let safePw = hashPasswd (B.pack pass) salt
-- Remove user if they already exists
let deleteQuery = "DELETE FROM User WHERE Username = ?;" :: Query
execute conn deleteQuery [user]
-- Add new user
let inse... | 467 | false | true | 0 | 14 | 116 | 137 | 67 | 70 | null | null |
sdiehl/ghc | testsuite/tests/typecheck/should_run/tcrun041.hs | bsd-3-clause | g = (# , True || False #) | 25 | g = (# , True || False #) | 25 | g = (# , True || False #) | 25 | false | false | 1 | 7 | 7 | 17 | 7 | 10 | null | null |
michalkonecny/aern | aern-real/src/Numeric/AERN/RealArithmetic/NumericOrderRounding/MixedFieldOps.hs | bsd-3-clause | mixedAddDn :: (RoundedMixedAdd t tn) => t -> tn -> t
mixedAddDn a b = mixedAddDnEff (mixedAddDefaultEffort a b) a b | 115 | mixedAddDn :: (RoundedMixedAdd t tn) => t -> tn -> t
mixedAddDn a b = mixedAddDnEff (mixedAddDefaultEffort a b) a b | 115 | mixedAddDn a b = mixedAddDnEff (mixedAddDefaultEffort a b) a b | 62 | false | true | 0 | 7 | 20 | 50 | 25 | 25 | null | null |
ghc-android/cabal | Cabal/Distribution/Simple/Utils.hs | bsd-3-clause | currentDir :: FilePath
currentDir = "." | 39 | currentDir :: FilePath
currentDir = "." | 39 | currentDir = "." | 16 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
sinelaw/infernu | src/Infernu/Types.hs | gpl-2.0 | schemeEmpty :: t -> TScheme t
schemeEmpty t = TScheme [] $ qualEmpty t | 70 | schemeEmpty :: t -> TScheme t
schemeEmpty t = TScheme [] $ qualEmpty t | 70 | schemeEmpty t = TScheme [] $ qualEmpty t | 40 | false | true | 2 | 7 | 13 | 39 | 16 | 23 | null | null |
siddhanathan/ghc | compiler/coreSyn/CoreUnfold.hs | bsd-3-clause | -- Ditto (augment t (\cn -> e) ys) should cost only the cost of
-- e plus ys. The -2 accounts for the \cn
-- When we return a lambda, give a discount if it's used (applied)
lamScrutDiscount :: DynFlags -> ExprSize -> ExprSize
lamScrutDiscount dflags (SizeIs n vs _) = SizeIs n vs (ufFunAppDiscount dflags) | 314 | lamScrutDiscount :: DynFlags -> ExprSize -> ExprSize
lamScrutDiscount dflags (SizeIs n vs _) = SizeIs n vs (ufFunAppDiscount dflags) | 132 | lamScrutDiscount dflags (SizeIs n vs _) = SizeIs n vs (ufFunAppDiscount dflags) | 79 | true | true | 0 | 7 | 64 | 50 | 26 | 24 | null | null |
anton-dessiatov/Win32-security | tests/get-process-sid/Main.hs | mit | printMaybeAcct :: Maybe LookedUpAccount -> IO ()
printMaybeAcct maybel = case maybel of
Just l -> do
print (lookedUpAccountName l)
print (lookedUpReferencedDomainName l)
print (lookedUpUse l)
s <- convertSidToStringSid (lookedUpSid l)
print s
Nothing ->
putStrLn "Nothing found" | 306 | printMaybeAcct :: Maybe LookedUpAccount -> IO ()
printMaybeAcct maybel = case maybel of
Just l -> do
print (lookedUpAccountName l)
print (lookedUpReferencedDomainName l)
print (lookedUpUse l)
s <- convertSidToStringSid (lookedUpSid l)
print s
Nothing ->
putStrLn "Nothing found" | 306 | printMaybeAcct maybel = case maybel of
Just l -> do
print (lookedUpAccountName l)
print (lookedUpReferencedDomainName l)
print (lookedUpUse l)
s <- convertSidToStringSid (lookedUpSid l)
print s
Nothing ->
putStrLn "Nothing found" | 257 | false | true | 2 | 10 | 65 | 107 | 46 | 61 | null | null |
emilaxelsson/ag-graph | examples/RepminPAG.hs | bsd-3-clause | it2 :: Tree IntTreeF
it2 = iNode x (iNode (iLeaf 5) x)
where x = iNode (iNode (iLeaf 24) (iLeaf 3)) (iLeaf 4) | 113 | it2 :: Tree IntTreeF
it2 = iNode x (iNode (iLeaf 5) x)
where x = iNode (iNode (iLeaf 24) (iLeaf 3)) (iLeaf 4) | 113 | it2 = iNode x (iNode (iLeaf 5) x)
where x = iNode (iNode (iLeaf 24) (iLeaf 3)) (iLeaf 4) | 92 | false | true | 0 | 11 | 26 | 71 | 35 | 36 | null | null |
ben-schulz/Idris-dev | src/Idris/Reflection.hs | bsd-3-clause | reflectBinderQuotePattern q ty unq (Hole t)
= do t' <- claimTy (sMN 0 "ty") ty; movelast t'
fill $ reflCall "Hole" [ty, Var t']
solve
focus t'; q unq t | 178 | reflectBinderQuotePattern q ty unq (Hole t)
= do t' <- claimTy (sMN 0 "ty") ty; movelast t'
fill $ reflCall "Hole" [ty, Var t']
solve
focus t'; q unq t | 178 | reflectBinderQuotePattern q ty unq (Hole t)
= do t' <- claimTy (sMN 0 "ty") ty; movelast t'
fill $ reflCall "Hole" [ty, Var t']
solve
focus t'; q unq t | 178 | false | false | 0 | 10 | 56 | 87 | 39 | 48 | null | null |
DaMSL/K3 | src/Language/K3/Codegen/Haskell.hs | apache-2.0 | prefixDoE context (action &&& getCGEmbed -> (Just (HS.Do stmts), m)) =
return $ mkCG (HB.doE $ context ++ stmts) m | 116 | prefixDoE context (action &&& getCGEmbed -> (Just (HS.Do stmts), m)) =
return $ mkCG (HB.doE $ context ++ stmts) m | 116 | prefixDoE context (action &&& getCGEmbed -> (Just (HS.Do stmts), m)) =
return $ mkCG (HB.doE $ context ++ stmts) m | 116 | false | false | 0 | 12 | 21 | 61 | 31 | 30 | null | null |
massysett/penny | penny/lib/Penny/Copper/Decopperize.hs | bsd-3-clause | dPostingList
:: PostingList Char a
-> NonEmptySeq (a, Trio.Trio, Seq (PostingFieldDecop a))
dPostingList (PostingList _ p1 ps)
= NE.NonEmptySeq (dPosting p1) (dNextPosting'Star ps) | 186 | dPostingList
:: PostingList Char a
-> NonEmptySeq (a, Trio.Trio, Seq (PostingFieldDecop a))
dPostingList (PostingList _ p1 ps)
= NE.NonEmptySeq (dPosting p1) (dNextPosting'Star ps) | 186 | dPostingList (PostingList _ p1 ps)
= NE.NonEmptySeq (dPosting p1) (dNextPosting'Star ps) | 90 | false | true | 0 | 11 | 28 | 79 | 38 | 41 | null | null |
dataember/docker-control | src/API.hs | bsd-3-clause | endpointIdGet :: Int -> ReaderT PoolConfig IO (Maybe Endpoint)
endpointIdGet key = do
poolCfg <- ask
lift $ do
connPool <- pool poolCfg
maybeEp <- getEndpointByKey connPool key
return maybeEp | 223 | endpointIdGet :: Int -> ReaderT PoolConfig IO (Maybe Endpoint)
endpointIdGet key = do
poolCfg <- ask
lift $ do
connPool <- pool poolCfg
maybeEp <- getEndpointByKey connPool key
return maybeEp | 223 | endpointIdGet key = do
poolCfg <- ask
lift $ do
connPool <- pool poolCfg
maybeEp <- getEndpointByKey connPool key
return maybeEp | 160 | false | true | 0 | 12 | 61 | 78 | 33 | 45 | null | null |
mtlstats/mtlstats | src/Mtlstats/Control/EditGoalie.hs | gpl-3.0 | ytdMinsC :: Bool -> Action () -> Controller
ytdMinsC = curry $ promptController .
uncurry editGoalieYtdMinsPrompt | 115 | ytdMinsC :: Bool -> Action () -> Controller
ytdMinsC = curry $ promptController .
uncurry editGoalieYtdMinsPrompt | 115 | ytdMinsC = curry $ promptController .
uncurry editGoalieYtdMinsPrompt | 71 | false | true | 2 | 9 | 17 | 43 | 18 | 25 | null | null |
fmapfmapfmap/amazonka | gen/src/Gen/AST/Data.hs | mpl-2.0 | waiterFields :: HasMetadata a Identity
=> a
-> Operation Identity Ref b
-> Waiter Id
-> Either Error (Waiter Field)
waiterFields m o = traverseOf (waitAcceptors . each) go
where
out = o ^. opOutput . _Identity . refAnn
go :: Accept Id -> Either Error (Accep... | 445 | waiterFields :: HasMetadata a Identity
=> a
-> Operation Identity Ref b
-> Waiter Id
-> Either Error (Waiter Field)
waiterFields m o = traverseOf (waitAcceptors . each) go
where
out = o ^. opOutput . _Identity . refAnn
go :: Accept Id -> Either Error (Accep... | 445 | waiterFields m o = traverseOf (waitAcceptors . each) go
where
out = o ^. opOutput . _Identity . refAnn
go :: Accept Id -> Either Error (Accept Field)
go x = do
n <- traverse (notation m out) (x ^. acceptArgument)
return $! x & acceptArgument .~ n | 277 | false | true | 0 | 11 | 150 | 163 | 78 | 85 | null | null |
ku-fpg/kansas-amber | tests/ExprTests/ExprList8.hs | bsd-3-clause | prop_cons :: ArduinoConnection -> RemoteRef [Word8] -> Word8 -> [Word8] -> Property
prop_cons c r x xs = monadicIO $ do
let local = x : xs
remote <- run $ send c $ do
writeRemoteRefE r $ (lit x) *: (lit xs)
v <- readRemoteRefE r
return v
assert (local == litEvalL remote) | 308 | prop_cons :: ArduinoConnection -> RemoteRef [Word8] -> Word8 -> [Word8] -> Property
prop_cons c r x xs = monadicIO $ do
let local = x : xs
remote <- run $ send c $ do
writeRemoteRefE r $ (lit x) *: (lit xs)
v <- readRemoteRefE r
return v
assert (local == litEvalL remote) | 308 | prop_cons c r x xs = monadicIO $ do
let local = x : xs
remote <- run $ send c $ do
writeRemoteRefE r $ (lit x) *: (lit xs)
v <- readRemoteRefE r
return v
assert (local == litEvalL remote) | 223 | false | true | 0 | 15 | 90 | 138 | 64 | 74 | null | null |
onponomarev/ganeti | src/Ganeti/Types.hs | bsd-2-clause | roleDescription NRMaster = "master" | 38 | roleDescription NRMaster = "master" | 38 | roleDescription NRMaster = "master" | 38 | false | false | 0 | 5 | 6 | 9 | 4 | 5 | null | null |
peterhurford/DMatrix.hs | src/DMatrix.hs | mit | --TODO: I ended up not needing this, but I don't want to get rid of it.
which :: [Bool] -> [Int]
which bools = (map fst) . (filter snd) $ zip [0..] bools | 153 | which :: [Bool] -> [Int]
which bools = (map fst) . (filter snd) $ zip [0..] bools | 81 | which bools = (map fst) . (filter snd) $ zip [0..] bools | 56 | true | true | 0 | 8 | 32 | 53 | 28 | 25 | null | null |
momomimachli/Hedsql-SQLite-simple | src/Database/Hedsql/Connection/SqLite/Simple.hs | gpl-3.0 | --------------------------------------------------------------------------------
-- PUBLIC
--------------------------------------------------------------------------------
-- | Create a table.
createTable :: S.Connection -> H.CreateStmt H.SqLite -> IO ()
createTable = execute | 277 | createTable :: S.Connection -> H.CreateStmt H.SqLite -> IO ()
createTable = execute | 83 | createTable = execute | 21 | true | true | 0 | 8 | 21 | 37 | 20 | 17 | null | null |
wtanaka/graphql-schema | tests/Spec.hs | gpl-2.0 | qcProps :: TestTree
qcProps = testGroup "(checked by QuickCheck)"
[ QC.testProperty "sort == sort . reverse" $
\list -> sort (list :: [Int]) == sort (reverse list)
, QC.testProperty "Fermat's little theorem" $
\x -> ((x :: Integer)^(7 :: Integer) - x) `mod` 7 == 0
-- the following property does not ho... | 464 | qcProps :: TestTree
qcProps = testGroup "(checked by QuickCheck)"
[ QC.testProperty "sort == sort . reverse" $
\list -> sort (list :: [Int]) == sort (reverse list)
, QC.testProperty "Fermat's little theorem" $
\x -> ((x :: Integer)^(7 :: Integer) - x) `mod` 7 == 0
-- the following property does not ho... | 464 | qcProps = testGroup "(checked by QuickCheck)"
[ QC.testProperty "sort == sort . reverse" $
\list -> sort (list :: [Int]) == sort (reverse list)
, QC.testProperty "Fermat's little theorem" $
\x -> ((x :: Integer)^(7 :: Integer) - x) `mod` 7 == 0
-- the following property does not hold
-- , QC.testPro... | 444 | false | true | 0 | 14 | 116 | 120 | 64 | 56 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.