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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
brendanhay/gogol | gogol-youtube/gen/Network/Google/YouTube/Types/Product.hs | mpl-2.0 | -- | The video\'s INCAA (Instituto Nacional de Cine y Artes Audiovisuales -
-- Argentina) rating.
crIncaaRating :: Lens' ContentRating (Maybe ContentRatingIncaaRating)
crIncaaRating
= lens _crIncaaRating
(\ s a -> s{_crIncaaRating = a}) | 244 | crIncaaRating :: Lens' ContentRating (Maybe ContentRatingIncaaRating)
crIncaaRating
= lens _crIncaaRating
(\ s a -> s{_crIncaaRating = a}) | 146 | crIncaaRating
= lens _crIncaaRating
(\ s a -> s{_crIncaaRating = a}) | 76 | true | true | 0 | 9 | 40 | 49 | 26 | 23 | null | null |
rCEx/feldspar-lang-small | src/Feldspar/Lattice.hs | bsd-3-clause | -- | Accumulated meet
intersections :: Lattice a => [a] -> a
intersections = foldr (/\) top | 91 | intersections :: Lattice a => [a] -> a
intersections = foldr (/\) top | 69 | intersections = foldr (/\) top | 30 | true | true | 0 | 7 | 16 | 33 | 18 | 15 | null | null |
rueshyna/gogol | gogol-compute/gen/Network/Google/Resource/Compute/Autoscalers/List.hs | mpl-2.0 | -- | Creates a value of 'AutoscalersList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'aOrderBy'
--
-- * 'aProject'
--
-- * 'aZone'
--
-- * 'aFilter'
--
-- * 'aPageToken'
--
-- * 'aMaxResults'
autoscalersList
:: Text -- ^ 'aPro... | 593 | autoscalersList
:: Text -- ^ 'aProject'
-> Text -- ^ 'aZone'
-> AutoscalersList
autoscalersList pAProject_ pAZone_ =
AutoscalersList'
{ _aOrderBy = Nothing
, _aProject = pAProject_
, _aZone = pAZone_
, _aFilter = Nothing
, _aPageToken = Nothing
, _aMaxResults = 500
} | 311 | autoscalersList pAProject_ pAZone_ =
AutoscalersList'
{ _aOrderBy = Nothing
, _aProject = pAProject_
, _aZone = pAZone_
, _aFilter = Nothing
, _aPageToken = Nothing
, _aMaxResults = 500
} | 219 | true | true | 0 | 8 | 140 | 88 | 56 | 32 | null | null |
DavidAlphaFox/bittorrent | src/Network/BitTorrent/Internal/Progress.hs | bsd-3-clause | -- | Check global /download/ limit by uploaded \/ downloaded ratio.
canDownload :: Ratio Int -> Progress -> Bool
canDownload limit Progress {..} = _uploaded % _downloaded > ri2rw64 limit | 186 | canDownload :: Ratio Int -> Progress -> Bool
canDownload limit Progress {..} = _uploaded % _downloaded > ri2rw64 limit | 118 | canDownload limit Progress {..} = _uploaded % _downloaded > ri2rw64 limit | 73 | true | true | 0 | 7 | 29 | 49 | 23 | 26 | null | null |
patyoon/haskell-genetic-algorithm | Helper.hs | gpl-2.0 | swap :: Int -> Int -> [a] -> [a]
swap i j xs
| i == j = xs
| otherwise = take l xs ++ [xs !! u] ++
(take (u-l-1) $ drop (l+1) xs) ++ [xs !! l] ++ drop (u+1) xs
where l = if i < j then i else j
u = if i > j then i else j
-- | Converts a character into its b... | 368 | swap :: Int -> Int -> [a] -> [a]
swap i j xs
| i == j = xs
| otherwise = take l xs ++ [xs !! u] ++
(take (u-l-1) $ drop (l+1) xs) ++ [xs !! l] ++ drop (u+1) xs
where l = if i < j then i else j
u = if i > j then i else j
-- | Converts a character into its b... | 368 | swap i j xs
| i == j = xs
| otherwise = take l xs ++ [xs !! u] ++
(take (u-l-1) $ drop (l+1) xs) ++ [xs !! l] ++ drop (u+1) xs
where l = if i < j then i else j
u = if i > j then i else j
-- | Converts a character into its binary represenation
-- reference ... | 335 | false | true | 4 | 13 | 141 | 190 | 93 | 97 | null | null |
massysett/penny | penny/lib/Penny/Copper/Decopperize.hs | bsd-3-clause | e'NilUngroupedRadCom (NUZeroRadCom _ (RadixZeroesRadCom'Opt
(Just (RadixZeroesRadCom _ (Zero'Star sq))))) = length sq | 119 | e'NilUngroupedRadCom (NUZeroRadCom _ (RadixZeroesRadCom'Opt
(Just (RadixZeroesRadCom _ (Zero'Star sq))))) = length sq | 119 | e'NilUngroupedRadCom (NUZeroRadCom _ (RadixZeroesRadCom'Opt
(Just (RadixZeroesRadCom _ (Zero'Star sq))))) = length sq | 119 | false | false | 0 | 15 | 13 | 46 | 22 | 24 | null | null |
edsko/hackage-server | Distribution/Server/Util/ParseSpecVer.hs | bsd-3-clause | scanSpecVersionLazy :: BSL.ByteString -> Maybe Version
scanSpecVersionLazy bs = do
fstline':_ <- pure (BC8L.lines bs)
scanSpecVersion (BSL.toStrict fstline')
-- | Version of 'parseGenericPackageDescription' which also validates spec-version heuristics
--
-- * Result of 'parseSpecVerLazy' must agree with 'pars... | 604 | scanSpecVersionLazy :: BSL.ByteString -> Maybe Version
scanSpecVersionLazy bs = do
fstline':_ <- pure (BC8L.lines bs)
scanSpecVersion (BSL.toStrict fstline')
-- | Version of 'parseGenericPackageDescription' which also validates spec-version heuristics
--
-- * Result of 'parseSpecVerLazy' must agree with 'pars... | 604 | scanSpecVersionLazy bs = do
fstline':_ <- pure (BC8L.lines bs)
scanSpecVersion (BSL.toStrict fstline')
-- | Version of 'parseGenericPackageDescription' which also validates spec-version heuristics
--
-- * Result of 'parseSpecVerLazy' must agree with 'parseGenericPackageDescription'
-- * If 'scanSpecVersionLaz... | 549 | false | true | 0 | 11 | 83 | 66 | 34 | 32 | null | null |
OS2World/DEV-UTIL-HUGS | libraries/Graphics/Rendering/OpenGL/GLU/Quadrics.hs | bsd-3-clause | withQuadricObj :: IO a -> (QuadricObj -> IO a) -> IO a
withQuadricObj failure success = do
quadricObj <- gluNewQuadric
if quadricObj == QuadricObj nullPtr
then failure
else success quadricObj `finally` gluDeleteQuadric quadricObj | 247 | withQuadricObj :: IO a -> (QuadricObj -> IO a) -> IO a
withQuadricObj failure success = do
quadricObj <- gluNewQuadric
if quadricObj == QuadricObj nullPtr
then failure
else success quadricObj `finally` gluDeleteQuadric quadricObj | 247 | withQuadricObj failure success = do
quadricObj <- gluNewQuadric
if quadricObj == QuadricObj nullPtr
then failure
else success quadricObj `finally` gluDeleteQuadric quadricObj | 192 | false | true | 0 | 9 | 50 | 77 | 37 | 40 | null | null |
tsbattman/havro | src/Data/Avro/Generic.hs | apache-2.0 | getAvroComplex (MapSchema s) = AvroMap <$> getAvroBlocks (getAvroKV $ toTypeSchema s) | 85 | getAvroComplex (MapSchema s) = AvroMap <$> getAvroBlocks (getAvroKV $ toTypeSchema s) | 85 | getAvroComplex (MapSchema s) = AvroMap <$> getAvroBlocks (getAvroKV $ toTypeSchema s) | 85 | false | false | 0 | 9 | 10 | 33 | 15 | 18 | null | null |
wstrinz/school-of-haskell | cis194/homework-1/test/HW1/TowersOfHanoiSpec.hs | mit | spec :: Spec
spec =
describe "hanoi" $
it "returns a list of moves required to stack pegs in order" $
hanoi 2 'a' 'b' 'c' `shouldBe` [('a','c'), ('a','b'), ('c','b')] | 180 | spec :: Spec
spec =
describe "hanoi" $
it "returns a list of moves required to stack pegs in order" $
hanoi 2 'a' 'b' 'c' `shouldBe` [('a','c'), ('a','b'), ('c','b')] | 180 | spec =
describe "hanoi" $
it "returns a list of moves required to stack pegs in order" $
hanoi 2 'a' 'b' 'c' `shouldBe` [('a','c'), ('a','b'), ('c','b')] | 167 | false | true | 0 | 8 | 43 | 76 | 39 | 37 | null | null |
Lupino/dispatch-article | src/Article/RawAPI.hs | bsd-3-clause | getTimelineListById :: HasMySQL u => ID -> GenHaxl u w [String]
getTimelineListById aid = dataFetch (GetTimelineListById aid) | 125 | getTimelineListById :: HasMySQL u => ID -> GenHaxl u w [String]
getTimelineListById aid = dataFetch (GetTimelineListById aid) | 125 | getTimelineListById aid = dataFetch (GetTimelineListById aid) | 61 | false | true | 0 | 8 | 16 | 44 | 21 | 23 | null | null |
shlevy/ghc | compiler/utils/Outputable.hs | bsd-3-clause | -- This shows an SDoc, but on one line only. It's cheaper than a full
-- showSDoc, designed for when we're getting results like "Foo.bar"
-- and "foo{uniq strictness}" so we don't want fancy layout anyway.
showSDocOneLine :: DynFlags -> SDoc -> String
showSDocOneLine dflags d
= let s = Pretty.style{ Pretty.mode = OneL... | 486 | showSDocOneLine :: DynFlags -> SDoc -> String
showSDocOneLine dflags d
= let s = Pretty.style{ Pretty.mode = OneLineMode,
Pretty.lineLength = pprCols dflags } in
Pretty.renderStyle s $
runSDoc d (initSDocContext dflags (defaultUserStyle dflags)) | 280 | showSDocOneLine dflags d
= let s = Pretty.style{ Pretty.mode = OneLineMode,
Pretty.lineLength = pprCols dflags } in
Pretty.renderStyle s $
runSDoc d (initSDocContext dflags (defaultUserStyle dflags)) | 234 | true | true | 0 | 12 | 103 | 89 | 46 | 43 | null | null |
haskell-opengl/OpenGLRaw | src/Graphics/GL/Functions/F19.hs | bsd-3-clause | ptr_glNormalStream3sATI :: FunPtr (GLenum -> GLshort -> GLshort -> GLshort -> IO ())
ptr_glNormalStream3sATI = unsafePerformIO $ getCommand "glNormalStream3sATI" | 161 | ptr_glNormalStream3sATI :: FunPtr (GLenum -> GLshort -> GLshort -> GLshort -> IO ())
ptr_glNormalStream3sATI = unsafePerformIO $ getCommand "glNormalStream3sATI" | 161 | ptr_glNormalStream3sATI = unsafePerformIO $ getCommand "glNormalStream3sATI" | 76 | false | true | 1 | 12 | 18 | 48 | 22 | 26 | null | null |
GaloisInc/pads-haskell | Examples/First.hs | bsd-3-clause | test_hp_data = mkTestCase "HP Data" expect_hp_data result_hp_data | 65 | test_hp_data = mkTestCase "HP Data" expect_hp_data result_hp_data | 65 | test_hp_data = mkTestCase "HP Data" expect_hp_data result_hp_data | 65 | false | false | 0 | 5 | 6 | 13 | 6 | 7 | null | null |
nickng/gong | PrettyGoTypes.hs | apache-2.0 | pprintType :: GoType -> String
pprintType t = render . runLFreshM . ppr $ t | 75 | pprintType :: GoType -> String
pprintType t = render . runLFreshM . ppr $ t | 75 | pprintType t = render . runLFreshM . ppr $ t | 44 | false | true | 0 | 7 | 14 | 30 | 15 | 15 | null | null |
mbrock/HBEAM | src/Language/Erlang/BEAM/Opcodes.hs | gpl-3.0 | opcodeInfo 150 = ("recv_mark", 1) | 33 | opcodeInfo 150 = ("recv_mark", 1) | 33 | opcodeInfo 150 = ("recv_mark", 1) | 33 | false | false | 0 | 5 | 4 | 15 | 8 | 7 | null | null |
quickdudley/sokosolve | Grid.hs | gpl-3.0 | solved g = gridBoxes g == gridTargets g | 39 | solved g = gridBoxes g == gridTargets g | 39 | solved g = gridBoxes g == gridTargets g | 39 | false | false | 0 | 6 | 7 | 19 | 8 | 11 | null | null |
intolerable/GroupProject | src/Emulator/CPU/Instructions/ARM/Parser.hs | bsd-2-clause | readLoadStore :: MWord -> ARMInstruction
readLoadStore instr =
SingleDataTransfer prePost upDown granularity writeBack loadStore base dest offset
where
prePost = if instr `testBit` 24 then Pre else Post
upDown = if instr `testBit` 23 then Up else Down
granularity = if instr `testBit` 22 then Byt... | 686 | readLoadStore :: MWord -> ARMInstruction
readLoadStore instr =
SingleDataTransfer prePost upDown granularity writeBack loadStore base dest offset
where
prePost = if instr `testBit` 24 then Pre else Post
upDown = if instr `testBit` 23 then Up else Down
granularity = if instr `testBit` 22 then Byt... | 686 | readLoadStore instr =
SingleDataTransfer prePost upDown granularity writeBack loadStore base dest offset
where
prePost = if instr `testBit` 24 then Pre else Post
upDown = if instr `testBit` 23 then Up else Down
granularity = if instr `testBit` 22 then Byte else Word
writeBack = testBit ins... | 645 | false | true | 17 | 7 | 170 | 247 | 118 | 129 | null | null |
shlevy/ghc | compiler/llvmGen/Llvm/Types.hs | bsd-3-clause | llvmWidthInBits _ LMVoid = 0 | 42 | llvmWidthInBits _ LMVoid = 0 | 42 | llvmWidthInBits _ LMVoid = 0 | 42 | false | false | 0 | 5 | 18 | 11 | 5 | 6 | null | null |
trskop/spock-http-auth | src/Web/Spock/HttpAuth/Internal.hs | bsd-3-clause | -- | Parse value of @Authorization@ header. In example, if we have header like
-- this:
--
-- @
-- Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
-- @
--
-- this function parses the value portion of the above HTTP header:
--
-- >>> parseAuthorizationHeaderValue "Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=="
-- Just (AuthBasic... | 3,005 | parseAuthorizationHeaderValue :: Text -> Maybe (AuthScheme, Text)
parseAuthorizationHeaderValue input = (,credentials) <$> maybeScheme
where
(maybeScheme, credentials) = parseAuthScheme *** Text.dropWhile (== ' ')
<<< Text.break (== ' ') $ input
-- | Parse authentication scheme portion of @Authorization@... | 1,722 | parseAuthorizationHeaderValue input = (,credentials) <$> maybeScheme
where
(maybeScheme, credentials) = parseAuthScheme *** Text.dropWhile (== ' ')
<<< Text.break (== ' ') $ input
-- | Parse authentication scheme portion of @Authorization@ header. In example,
-- if we have header like this:
--
-- @
-- Au... | 1,656 | true | true | 0 | 9 | 618 | 148 | 112 | 36 | null | null |
dmalikov/lambdabot | Plugin/Pl/Optimize.hs | mit | -- | Apply a single rewrite rule
--
rewrite :: (?first :: Bool) => RewriteRule -> Expr -> [Expr]
rewrite rl e = case rl of
Up r1 r2 -> let e' = cut $ rewrite r1 e
e'' = rewrite r2 =<< e'
in if null e'' then e' else e''
OrElse r1 r2 -> let e' = rewrite r1 e
... | 746 | rewrite :: (?first :: Bool) => RewriteRule -> Expr -> [Expr]
rewrite rl e = case rl of
Up r1 r2 -> let e' = cut $ rewrite r1 e
e'' = rewrite r2 =<< e'
in if null e'' then e' else e''
OrElse r1 r2 -> let e' = rewrite r1 e
in if null e' then re... | 710 | rewrite rl e = case rl of
Up r1 r2 -> let e' = cut $ rewrite r1 e
e'' = rewrite r2 =<< e'
in if null e'' then e' else e''
OrElse r1 r2 -> let e' = rewrite r1 e
in if null e' then rewrite r2 e else e'
Then r1 r2 -> rewrite r2 =<< nub (re... | 649 | true | true | 0 | 13 | 303 | 323 | 155 | 168 | null | null |
fmapfmapfmap/amazonka | amazonka-swf/gen/Network/AWS/SWF/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'RequestCancelActivityTaskDecisionAttributes' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rcatdaActivityId'
requestCancelActivityTaskDecisionAttributes
:: Text -- ^ 'rcatdaActivityId'
-> RequestCanc... | 505 | requestCancelActivityTaskDecisionAttributes
:: Text -- ^ 'rcatdaActivityId'
-> RequestCancelActivityTaskDecisionAttributes
requestCancelActivityTaskDecisionAttributes pActivityId_ =
RequestCancelActivityTaskDecisionAttributes'
{ _rcatdaActivityId = pActivityId_
} | 283 | requestCancelActivityTaskDecisionAttributes pActivityId_ =
RequestCancelActivityTaskDecisionAttributes'
{ _rcatdaActivityId = pActivityId_
} | 152 | true | true | 0 | 6 | 70 | 32 | 20 | 12 | null | null |
kuribas/hmetafont | Typography/HMetafont.hs | bsd-3-clause | y16r = var "y16r" | 17 | y16r = var "y16r" | 17 | y16r = var "y16r" | 17 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
mgrabmueller/harpy | Harpy/X86Assembler.hs | bsd-3-clause | ch = Reg8 5 | 11 | ch = Reg8 5 | 11 | ch = Reg8 5 | 11 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
karamellpelle/grid | source/Game/Values.hs | gpl-3.0 | valueMemoryPathSpeed :: Float
valueMemoryPathSpeed =
1.5 | 60 | valueMemoryPathSpeed :: Float
valueMemoryPathSpeed =
1.5 | 60 | valueMemoryPathSpeed =
1.5 | 30 | false | true | 0 | 4 | 9 | 11 | 6 | 5 | null | null |
dysinger/amazonka | amazonka-rds/gen/Network/AWS/RDS/Types.hs | mpl-2.0 | -- | Provides the name of the DB parameter group family that this DB parameter
-- group is compatible with.
dbpgDBParameterGroupFamily :: Lens' DBParameterGroup (Maybe Text)
dbpgDBParameterGroupFamily =
lens _dbpgDBParameterGroupFamily
(\s a -> s { _dbpgDBParameterGroupFamily = a }) | 295 | dbpgDBParameterGroupFamily :: Lens' DBParameterGroup (Maybe Text)
dbpgDBParameterGroupFamily =
lens _dbpgDBParameterGroupFamily
(\s a -> s { _dbpgDBParameterGroupFamily = a }) | 187 | dbpgDBParameterGroupFamily =
lens _dbpgDBParameterGroupFamily
(\s a -> s { _dbpgDBParameterGroupFamily = a }) | 121 | true | true | 0 | 9 | 50 | 47 | 26 | 21 | null | null |
green-haskell/ghc | compiler/main/StaticFlags.hs | bsd-3-clause | addOptEwM :: String -> StaticP ()
addOptEwM = liftEwM . addOpt | 62 | addOptEwM :: String -> StaticP ()
addOptEwM = liftEwM . addOpt | 62 | addOptEwM = liftEwM . addOpt | 28 | false | true | 0 | 7 | 10 | 24 | 12 | 12 | null | null |
li-zhirui/EoplLangs | src/ImplicitRefs/Evaluator.hs | bsd-3-clause | evalCondExpr :: [(Expression, Expression)] -> Environment -> Store
-> EvaluateResult
evalCondExpr [] _ _ = throwError $ RuntimeError "No predicate is true." | 169 | evalCondExpr :: [(Expression, Expression)] -> Environment -> Store
-> EvaluateResult
evalCondExpr [] _ _ = throwError $ RuntimeError "No predicate is true." | 169 | evalCondExpr [] _ _ = throwError $ RuntimeError "No predicate is true." | 71 | false | true | 0 | 10 | 34 | 53 | 26 | 27 | null | null |
luzhuomi/xhaskell-regex-deriv | Text/Regex/Deriv/ByteString/BitCode.hs | bsd-3-clause | p2 = PVar 0 [] (PPair (PE [Empty]) (PPair
(PVar 1 [] (PChoice [PPair (PVar 2 [] (PChoice [PPair (PVar 3 [] (PE [Choice [L 'A',Seq (L 'A') (L 'B')] Greedy ])) (PVar 4 [] (PE [Choice [Seq (Seq (L 'B') (L 'A')) (L 'A'),L 'A'] Greedy ]))] Greedy)) (PVar 5 [] (PE [Choice [Seq ... | 470 | p2 = PVar 0 [] (PPair (PE [Empty]) (PPair
(PVar 1 [] (PChoice [PPair (PVar 2 [] (PChoice [PPair (PVar 3 [] (PE [Choice [L 'A',Seq (L 'A') (L 'B')] Greedy ])) (PVar 4 [] (PE [Choice [Seq (Seq (L 'B') (L 'A')) (L 'A'),L 'A'] Greedy ]))] Greedy)) (PVar 5 [] (PE [Choice [Seq ... | 470 | p2 = PVar 0 [] (PPair (PE [Empty]) (PPair
(PVar 1 [] (PChoice [PPair (PVar 2 [] (PChoice [PPair (PVar 3 [] (PE [Choice [L 'A',Seq (L 'A') (L 'B')] Greedy ])) (PVar 4 [] (PE [Choice [Seq (Seq (L 'B') (L 'A')) (L 'A'),L 'A'] Greedy ]))] Greedy)) (PVar 5 [] (PE [Choice [Seq ... | 470 | false | false | 1 | 32 | 204 | 280 | 138 | 142 | null | null |
ikirill/ComputationalMathematics | Cube/Nifty.hs | gpl-3.0 | memoizeList :: forall a b . Ix a => (a,a) -> [b] -> (a -> b)
memoizeList bounds elts = (!) memo
where memo = listArray bounds elts :: Array a b | 145 | memoizeList :: forall a b . Ix a => (a,a) -> [b] -> (a -> b)
memoizeList bounds elts = (!) memo
where memo = listArray bounds elts :: Array a b | 145 | memoizeList bounds elts = (!) memo
where memo = listArray bounds elts :: Array a b | 84 | false | true | 0 | 10 | 33 | 79 | 42 | 37 | null | null |
phadej/psqueues | src/Data/OrdPSQ/Internal.hs | bsd-3-clause | right (RLoser _ _ _ _ tr) = tr | 31 | right (RLoser _ _ _ _ tr) = tr | 31 | right (RLoser _ _ _ _ tr) = tr | 31 | false | false | 0 | 7 | 9 | 23 | 11 | 12 | null | null |
avieth/diplomacy | Diplomacy/SVGMap.hs | bsd-3-clause | provinceText HelgolandBright = S.text_ "HEL" ! A.x "220" ! A.y "265" | 68 | provinceText HelgolandBright = S.text_ "HEL" ! A.x "220" ! A.y "265" | 68 | provinceText HelgolandBright = S.text_ "HEL" ! A.x "220" ! A.y "265" | 68 | false | false | 1 | 8 | 10 | 35 | 14 | 21 | null | null |
grodin/yacc | debug/src/main/haskell/generate-currencies.hs | apache-2.0 | empty :: CurrData
empty = CD [] $ CL [] | 39 | empty :: CurrData
empty = CD [] $ CL [] | 39 | empty = CD [] $ CL [] | 21 | false | true | 0 | 7 | 9 | 25 | 12 | 13 | null | null |
aquatir/remember_java_api | code-sample-haskell/hello_world/basics/stuff.hs | mit | devilNumber :: (Integral a) => a -> String
devilNumber 666 = "HELL" | 67 | devilNumber :: (Integral a) => a -> String
devilNumber 666 = "HELL" | 67 | devilNumber 666 = "HELL" | 24 | false | true | 0 | 6 | 11 | 27 | 14 | 13 | null | null |
nevrenato/HetsAlloy | LF/Sign.hs | gpl-2.0 | printExp (Appl e es) =
let f = printExpWithPrec (precAppl + 1) e
as = map (printExpWithPrec precAppl) es
in hsep (f : as) | 135 | printExp (Appl e es) =
let f = printExpWithPrec (precAppl + 1) e
as = map (printExpWithPrec precAppl) es
in hsep (f : as) | 135 | printExp (Appl e es) =
let f = printExpWithPrec (precAppl + 1) e
as = map (printExpWithPrec precAppl) es
in hsep (f : as) | 135 | false | false | 0 | 11 | 37 | 66 | 32 | 34 | null | null |
chreekat/snowdrift | Model/Settings.hs | agpl-3.0 | defaultUserSettings :: UserSettings
defaultUserSettings = UserSettings { userSettingsShowTagVotes = False } | 107 | defaultUserSettings :: UserSettings
defaultUserSettings = UserSettings { userSettingsShowTagVotes = False } | 107 | defaultUserSettings = UserSettings { userSettingsShowTagVotes = False } | 71 | false | true | 0 | 6 | 10 | 19 | 11 | 8 | null | null |
sonyandy/logicst | src/Data/STRef/Logic.hs | bsd-3-clause | modifySTRef :: STRef s a -> (a -> a) -> LogicST s ()
modifySTRef = modifyRef | 76 | modifySTRef :: STRef s a -> (a -> a) -> LogicST s ()
modifySTRef = modifyRef | 76 | modifySTRef = modifyRef | 23 | false | true | 0 | 9 | 15 | 44 | 20 | 24 | null | null |
yiannist/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | htDiskScsiCd :: String
htDiskScsiCd = "scsi-cd" | 47 | htDiskScsiCd :: String
htDiskScsiCd = "scsi-cd" | 47 | htDiskScsiCd = "scsi-cd" | 24 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
rimmington/cabal | Cabal/Distribution/Simple/Setup.hs | bsd-3-clause | -- | Like 'programConfigurationPaths', but allows to customise the option name.
programConfigurationPaths'
:: (String -> String)
-> ProgramConfiguration
-> ShowOrParseArgs
-> (flags -> [(String, FilePath)])
-> ([(String, FilePath)] -> (flags -> flags))
-> [OptionField flags]
programConfigurationPaths' mkNam... | 942 | programConfigurationPaths'
:: (String -> String)
-> ProgramConfiguration
-> ShowOrParseArgs
-> (flags -> [(String, FilePath)])
-> ([(String, FilePath)] -> (flags -> flags))
-> [OptionField flags]
programConfigurationPaths' mkName progConf showOrParseArgs get set =
case showOrParseArgs of
-- we don't w... | 862 | programConfigurationPaths' mkName progConf showOrParseArgs get set =
case showOrParseArgs of
-- we don't want a verbose help text list so we just show a generic one:
ShowArgs -> [withProgramPath "PROG"]
ParseArgs -> map (withProgramPath . programName . fst)
(knownPrograms progConf)
whe... | 654 | true | true | 2 | 14 | 213 | 246 | 132 | 114 | null | null |
brendanhay/gogol | gogol-sheets/gen/Network/Google/Sheets/Types/Product.hs | mpl-2.0 | -- | The foreground color of the text.
tfForegRoundColor :: Lens' TextFormat (Maybe Color)
tfForegRoundColor
= lens _tfForegRoundColor
(\ s a -> s{_tfForegRoundColor = a}) | 179 | tfForegRoundColor :: Lens' TextFormat (Maybe Color)
tfForegRoundColor
= lens _tfForegRoundColor
(\ s a -> s{_tfForegRoundColor = a}) | 140 | tfForegRoundColor
= lens _tfForegRoundColor
(\ s a -> s{_tfForegRoundColor = a}) | 88 | true | true | 1 | 9 | 32 | 52 | 25 | 27 | null | null |
jeffreyrosenbluth/flourine | src/Fluorine/HTML.hs | bsd-3-clause | wbr :: [A.Attr i] -> [HTML i] -> HTML i
wbr xs = element (tagName "wbr") xs | 75 | wbr :: [A.Attr i] -> [HTML i] -> HTML i
wbr xs = element (tagName "wbr") xs | 75 | wbr xs = element (tagName "wbr") xs | 35 | false | true | 0 | 9 | 16 | 56 | 25 | 31 | null | null |
FranklinChen/Idris-dev | src/IRTS/CodegenC.hs | bsd-3-clause | doOp v (LSRem (ATInt ITBig)) [l, r] = v ++ "idris_bigMod(vm, " ++ creg l ++ ", " ++ creg r ++ ")" | 97 | doOp v (LSRem (ATInt ITBig)) [l, r] = v ++ "idris_bigMod(vm, " ++ creg l ++ ", " ++ creg r ++ ")" | 97 | doOp v (LSRem (ATInt ITBig)) [l, r] = v ++ "idris_bigMod(vm, " ++ creg l ++ ", " ++ creg r ++ ")" | 97 | false | false | 1 | 14 | 22 | 62 | 28 | 34 | null | null |
AlexanderPankiv/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | staticPtrInfoDataConName :: Name
staticPtrInfoDataConName =
dcQual gHC_STATICPTR (fsLit "StaticPtrInfo") staticPtrInfoDataConKey | 132 | staticPtrInfoDataConName :: Name
staticPtrInfoDataConName =
dcQual gHC_STATICPTR (fsLit "StaticPtrInfo") staticPtrInfoDataConKey | 132 | staticPtrInfoDataConName =
dcQual gHC_STATICPTR (fsLit "StaticPtrInfo") staticPtrInfoDataConKey | 99 | false | true | 0 | 7 | 13 | 24 | 12 | 12 | null | null |
elbrujohalcon/wxhnotepad | src/Step5.hs | bsd-3-clause | copy GUICtx{guiEditor = editor} = textCtrlCopy editor | 53 | copy GUICtx{guiEditor = editor} = textCtrlCopy editor | 53 | copy GUICtx{guiEditor = editor} = textCtrlCopy editor | 53 | false | false | 0 | 8 | 6 | 21 | 10 | 11 | null | null |
beni55/ghcjs | src/Gen2/Optimizer.hs | mit | intInfixOp BXorOp i1 i2 = bitwiseInt xor i1 i2 | 55 | intInfixOp BXorOp i1 i2 = bitwiseInt xor i1 i2 | 55 | intInfixOp BXorOp i1 i2 = bitwiseInt xor i1 i2 | 55 | false | false | 0 | 5 | 17 | 20 | 9 | 11 | null | null |
kim/amazonka | amazonka-opsworks/gen/Network/AWS/OpsWorks/Types.hs | mpl-2.0 | -- | The number of instances with 'pending' status.
icPending :: Lens' InstancesCount (Maybe Int)
icPending = lens _icPending (\s a -> s { _icPending = a }) | 156 | icPending :: Lens' InstancesCount (Maybe Int)
icPending = lens _icPending (\s a -> s { _icPending = a }) | 104 | icPending = lens _icPending (\s a -> s { _icPending = a }) | 58 | true | true | 0 | 9 | 27 | 46 | 25 | 21 | null | null |
jamesdarcy/DicomH | src/Data/Dicom.hs | bsd-3-clause | hasMoreFragments :: Get Bool
hasMoreFragments = do
empty <- isEmpty
if empty
then return False
else do
endFrag <- isFragmentEndAhead
if endFrag
then do
skip 8
return False
else isFragmentAhead | 252 | hasMoreFragments :: Get Bool
hasMoreFragments = do
empty <- isEmpty
if empty
then return False
else do
endFrag <- isFragmentEndAhead
if endFrag
then do
skip 8
return False
else isFragmentAhead | 252 | hasMoreFragments = do
empty <- isEmpty
if empty
then return False
else do
endFrag <- isFragmentEndAhead
if endFrag
then do
skip 8
return False
else isFragmentAhead | 223 | false | true | 0 | 13 | 89 | 65 | 30 | 35 | null | null |
grandpascorpion/canon | Math/NumberTheory/Canon.hs | gpl-3.0 | gcrToD :: GCR_ -> Double
gcrToD g = product $ map (\(p,e) -> (fromIntegral p) ** cToD e) g | 90 | gcrToD :: GCR_ -> Double
gcrToD g = product $ map (\(p,e) -> (fromIntegral p) ** cToD e) g | 90 | gcrToD g = product $ map (\(p,e) -> (fromIntegral p) ** cToD e) g | 65 | false | true | 0 | 11 | 18 | 54 | 28 | 26 | null | null |
shlevy/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | shiftRIntegerIdKey = mkPreludeMiscIdUnique 96 | 56 | shiftRIntegerIdKey = mkPreludeMiscIdUnique 96 | 56 | shiftRIntegerIdKey = mkPreludeMiscIdUnique 96 | 56 | false | false | 0 | 5 | 14 | 9 | 4 | 5 | null | null |
sashabu/libcspm | src/CSPM/Renamer.hs | bsd-3-clause | newScope :: RenamerMonad ()
newScope = do
env <- gets environment
let env' = HM.newLayer env
modify (\ st -> st { environment = env' }) | 147 | newScope :: RenamerMonad ()
newScope = do
env <- gets environment
let env' = HM.newLayer env
modify (\ st -> st { environment = env' }) | 147 | newScope = do
env <- gets environment
let env' = HM.newLayer env
modify (\ st -> st { environment = env' }) | 119 | false | true | 0 | 12 | 37 | 68 | 31 | 37 | null | null |
sopvop/cabal | cabal-install/Distribution/Client/InstallPlan.hs | bsd-3-clause | showPlanPackageTag (Configured _) = "Configured" | 51 | showPlanPackageTag (Configured _) = "Configured" | 51 | showPlanPackageTag (Configured _) = "Configured" | 51 | false | false | 0 | 7 | 7 | 15 | 7 | 8 | null | null |
phadej/psqueues | tests/Data/IntPSQ/Tests.hs | bsd-3-clause | --------------------------------------------------------------------------------
-- Unit tests
--------------------------------------------------------------------------------
-- 100% test coverage...
test_hasBadNils :: Assertion
test_hasBadNils =
assert $ hasBadNils (Bin 1 (2 :: Int) 'x' 0 Nil Nil) | 305 | test_hasBadNils :: Assertion
test_hasBadNils =
assert $ hasBadNils (Bin 1 (2 :: Int) 'x' 0 Nil Nil) | 103 | test_hasBadNils =
assert $ hasBadNils (Bin 1 (2 :: Int) 'x' 0 Nil Nil) | 74 | true | true | 0 | 9 | 30 | 44 | 25 | 19 | null | null |
uduki/hsQt | demos/Glome/imageviewer.hs | bsd-2-clause | adjustScrollBar :: Double -> QScrollBar () -> IO ()
adjustScrollBar f sb
=
do
v <- value sb ()
ps <- pageStep sb ()
setValue sb (round ((f * (fromIntegral v)) + ((f - 1.0) * ((fromIntegral ps) / 2.0)))::Int) | 217 | adjustScrollBar :: Double -> QScrollBar () -> IO ()
adjustScrollBar f sb
=
do
v <- value sb ()
ps <- pageStep sb ()
setValue sb (round ((f * (fromIntegral v)) + ((f - 1.0) * ((fromIntegral ps) / 2.0)))::Int) | 217 | adjustScrollBar f sb
=
do
v <- value sb ()
ps <- pageStep sb ()
setValue sb (round ((f * (fromIntegral v)) + ((f - 1.0) * ((fromIntegral ps) / 2.0)))::Int) | 165 | false | true | 0 | 17 | 49 | 126 | 62 | 64 | null | null |
De-Narm/NGramPredict | main.hs | bsd-3-clause | write xs = putStr (head xs !! 1) >> putStr "\n" >> write (tail xs) | 66 | write xs = putStr (head xs !! 1) >> putStr "\n" >> write (tail xs) | 66 | write xs = putStr (head xs !! 1) >> putStr "\n" >> write (tail xs) | 66 | false | false | 0 | 10 | 14 | 42 | 19 | 23 | null | null |
kovach/web2 | src/Update.hs | mit | updateDB (MT Negative t) db = db { tuples = removeTuple t (tuples db)
, removed_tuples = t : removed_tuples db } | 145 | updateDB (MT Negative t) db = db { tuples = removeTuple t (tuples db)
, removed_tuples = t : removed_tuples db } | 145 | updateDB (MT Negative t) db = db { tuples = removeTuple t (tuples db)
, removed_tuples = t : removed_tuples db } | 145 | false | false | 1 | 10 | 54 | 54 | 26 | 28 | null | null |
armoredsoftware/protocol | tpm/mainline/shared/protocolprotocol/TestIPMain.hs | bsd-3-clause | main = T.main | 13 | main = T.main | 13 | main = T.main | 13 | false | false | 0 | 5 | 2 | 8 | 4 | 4 | null | null |
WraithM/notescript | src/NoteScript/LendingClub.hs | bsd-3-clause | interpretLendingClub _ i _ (LogS lvl s) = void . forkLC $ logM (show i) lvl s | 77 | interpretLendingClub _ i _ (LogS lvl s) = void . forkLC $ logM (show i) lvl s | 77 | interpretLendingClub _ i _ (LogS lvl s) = void . forkLC $ logM (show i) lvl s | 77 | false | false | 0 | 8 | 16 | 44 | 21 | 23 | null | null |
cessationoftime/leksah | src/IDE/TextEditor/CodeMirror.hs | gpl-2.0 | cmIter :: CodeMirrorRef -> Int -> Int -> CM (EditorIter CodeMirror)
cmIter cm l c = do
lift $ do
i <- obj
i ^. line <# (fromIntegral l :: Double)
i ^. ch <# (fromIntegral c :: Double)
return $ CMIter cm i | 242 | cmIter :: CodeMirrorRef -> Int -> Int -> CM (EditorIter CodeMirror)
cmIter cm l c = do
lift $ do
i <- obj
i ^. line <# (fromIntegral l :: Double)
i ^. ch <# (fromIntegral c :: Double)
return $ CMIter cm i | 242 | cmIter cm l c = do
lift $ do
i <- obj
i ^. line <# (fromIntegral l :: Double)
i ^. ch <# (fromIntegral c :: Double)
return $ CMIter cm i | 174 | false | true | 0 | 12 | 81 | 105 | 50 | 55 | null | null |
cdepillabout/haskell-github-updater | Main.hs | gpl-3.0 | updateRepo :: String -> String -> IO ()
updateRepo mylog repo = do
let path = repoPath repo
let remoteBranch = repoRemoteBranch repo
let localBranch = repoLocalBranch repo
case (path, remoteBranch, localBranch) of
(Just path', Just remoteBranch', Just localBranch') -> do
-- lock on t... | 1,062 | updateRepo :: String -> String -> IO ()
updateRepo mylog repo = do
let path = repoPath repo
let remoteBranch = repoRemoteBranch repo
let localBranch = repoLocalBranch repo
case (path, remoteBranch, localBranch) of
(Just path', Just remoteBranch', Just localBranch') -> do
-- lock on t... | 1,062 | updateRepo mylog repo = do
let path = repoPath repo
let remoteBranch = repoRemoteBranch repo
let localBranch = repoLocalBranch repo
case (path, remoteBranch, localBranch) of
(Just path', Just remoteBranch', Just localBranch') -> do
-- lock on the directory's index.php file
... | 1,022 | false | true | 8 | 14 | 286 | 294 | 141 | 153 | null | null |
pushkinma/frag | lib/BitSet.hs | gpl-2.0 | setBS :: BitSet -> Int -> IO ()
setBS (BitSet bs) i = writeArray bs i True | 74 | setBS :: BitSet -> Int -> IO ()
setBS (BitSet bs) i = writeArray bs i True | 74 | setBS (BitSet bs) i = writeArray bs i True | 42 | false | true | 0 | 10 | 16 | 46 | 21 | 25 | null | null |
docopt/docopt.hs | System/Console/Docopt/ParseUtils.hs | mit | alphanumSpecial = alphanumerics ++ specialChars | 47 | alphanumSpecial = alphanumerics ++ specialChars | 47 | alphanumSpecial = alphanumerics ++ specialChars | 47 | false | false | 0 | 5 | 4 | 10 | 5 | 5 | null | null |
cdepillabout/coursera | algorithms1/week1/Percolation.hs | gpl-3.0 | xyToActualIndex :: Percolation -> (X, Y) -> Int
xyToActualIndex (Percolation _ _ sideLength _) xy =
xyLowLevel sideLength xy | 132 | xyToActualIndex :: Percolation -> (X, Y) -> Int
xyToActualIndex (Percolation _ _ sideLength _) xy =
xyLowLevel sideLength xy | 132 | xyToActualIndex (Percolation _ _ sideLength _) xy =
xyLowLevel sideLength xy | 84 | false | true | 0 | 7 | 26 | 47 | 24 | 23 | null | null |
chadbrewbaker/combinat | Math/Combinat/Partitions/Integer.hs | bsd-3-clause | -sum [ countPartitions' (h,w) i | i <- [0..d] ] where d = h*w
countAllPartitions :: Int -> Integer
countAllPartitions d = sum' [ countPartitions i | i <- [0..d] ]
| 164 | countAllPartitions :: Int -> Integer
countAllPartitions d = sum' [ countPartitions i | i <- [0..d] ] | 100 | countAllPartitions d = sum' [ countPartitions i | i <- [0..d] ] | 63 | true | true | 1 | 10 | 32 | 83 | 43 | 40 | null | null |
nickbart1980/pandoc | src/Text/Pandoc/Templates.hs | gpl-2.0 | lit :: Text -> Template
lit = Template . const | 46 | lit :: Text -> Template
lit = Template . const | 46 | lit = Template . const | 22 | false | true | 1 | 7 | 9 | 27 | 11 | 16 | null | null |
krakrjak/haskell-playground | TypeFunctions/PromotedDataTypes.hs | gpl-2.0 | concatVec (Cons a v1) v2 = Cons a $ concatVec v1 v2 | 51 | concatVec (Cons a v1) v2 = Cons a $ concatVec v1 v2 | 51 | concatVec (Cons a v1) v2 = Cons a $ concatVec v1 v2 | 51 | false | false | 0 | 7 | 11 | 31 | 14 | 17 | null | null |
AntonXue/SSTG | src/SSTG/Utils/Printing.hs | bsd-3-clause | pprLocalsStr :: Locals -> String
pprLocalsStr locals = injIntoList acc_strs
where
llist = localsToList locals
name_strs = map (pprNameStr . fst) llist
val_strs = map (pprValStr . snd) llist
zipd_strs = zip name_strs val_strs
acc_strs = map (\(n, v) -> sub (n ++ ", " ++ v)) zipd_strs
-- | Print `V... | 324 | pprLocalsStr :: Locals -> String
pprLocalsStr locals = injIntoList acc_strs
where
llist = localsToList locals
name_strs = map (pprNameStr . fst) llist
val_strs = map (pprValStr . snd) llist
zipd_strs = zip name_strs val_strs
acc_strs = map (\(n, v) -> sub (n ++ ", " ++ v)) zipd_strs
-- | Print `V... | 324 | pprLocalsStr locals = injIntoList acc_strs
where
llist = localsToList locals
name_strs = map (pprNameStr . fst) llist
val_strs = map (pprValStr . snd) llist
zipd_strs = zip name_strs val_strs
acc_strs = map (\(n, v) -> sub (n ++ ", " ++ v)) zipd_strs
-- | Print `Val`. | 291 | false | true | 0 | 11 | 74 | 115 | 60 | 55 | null | null |
Teaspot-Studio/GPipe-Core | src/Graphics/GPipe/Internal/Texture.hs | mit | newTextureCube f s mx | s < 0 = error "newTextureCube, negative size"
| mx <= 0 = error "newTextureCube, non-positive MaxLevels"
| otherwise = do
mxSize <- getGlValue GL_MAX_CUBE_MAP_TEXTURE_SIZE
if s > mxSize
th... | 1,626 | newTextureCube f s mx | s < 0 = error "newTextureCube, negative size"
| mx <= 0 = error "newTextureCube, non-positive MaxLevels"
| otherwise = do
mxSize <- getGlValue GL_MAX_CUBE_MAP_TEXTURE_SIZE
if s > mxSize
th... | 1,626 | newTextureCube f s mx | s < 0 = error "newTextureCube, negative size"
| mx <= 0 = error "newTextureCube, non-positive MaxLevels"
| otherwise = do
mxSize <- getGlValue GL_MAX_CUBE_MAP_TEXTURE_SIZE
if s > mxSize
th... | 1,626 | false | false | 0 | 21 | 734 | 323 | 153 | 170 | null | null |
ComputationWithBoundedResources/tct-config-mischel | tct-trs-comp15/RC.hs | bsd-3-clause | --- * rc -------------------------------------------------------------------------------------------------------------
runtime :: CombineBy -> Maybe Int -> TrsStrategy
runtime combineBy mto =
let
?timeoutRel = timeoutRelative mto
?combine = case combineBy of { Best -> best cmpTimeUB; Fastest -> fastest }
... | 577 | runtime :: CombineBy -> Maybe Int -> TrsStrategy
runtime combineBy mto =
let
?timeoutRel = timeoutRelative mto
?combine = case combineBy of { Best -> best cmpTimeUB; Fastest -> fastest }
?ua = UArgs
?ur = URules
?gr = NoGreedy
?sel = Just $ selAny
in
mayb... | 457 | runtime combineBy mto =
let
?timeoutRel = timeoutRelative mto
?combine = case combineBy of { Best -> best cmpTimeUB; Fastest -> fastest }
?ua = UArgs
?ur = URules
?gr = NoGreedy
?sel = Just $ selAny
in
maybe id timeoutIn mto $ withProblem $ \ prob ->
... | 408 | true | true | 0 | 12 | 151 | 133 | 69 | 64 | null | null |
bordaigorl/jamesbound | src/Language/PiCalc/Pretty.hs | gpl-2.0 | par1 _ _ [] = empty | 19 | par1 _ _ [] = empty | 19 | par1 _ _ [] = empty | 19 | false | false | 0 | 6 | 5 | 15 | 7 | 8 | null | null |
dmcclean/HaTeX | Text/LaTeX/Packages/AMSMath.hs | bsd-3-clause | -- | Infinity symbol.
infty :: LaTeXC l => l
infty = comm0 "infty" | 66 | infty :: LaTeXC l => l
infty = comm0 "infty" | 44 | infty = comm0 "infty" | 21 | true | true | 0 | 7 | 13 | 29 | 12 | 17 | null | null |
Shou/KawaiiBot-hs | KawaiiBot/Utils.hs | gpl-2.0 | readableVar se ch ni na (Reminder se' ch' ni' na' _) =
se == se' && ch `insEq` ch' && ni `insEq` ni' && na == na' | 118 | readableVar se ch ni na (Reminder se' ch' ni' na' _) =
se == se' && ch `insEq` ch' && ni `insEq` ni' && na == na' | 118 | readableVar se ch ni na (Reminder se' ch' ni' na' _) =
se == se' && ch `insEq` ch' && ni `insEq` ni' && na == na' | 118 | false | false | 0 | 11 | 31 | 63 | 33 | 30 | null | null |
mrakgr/futhark | src/Futhark/Optimise/InPlaceLowering/SubstituteIndices.hs | bsd-3-clause | substituteIndicesInPattern :: (MonadBinder m, SetType attr,
Aliased (Lore m),
LetAttr (Lore m) ~ attr) =>
IndexSubstitutions (LetAttr (Lore m))
-> PatternT attr
-> m (IndexSu... | 1,011 | substituteIndicesInPattern :: (MonadBinder m, SetType attr,
Aliased (Lore m),
LetAttr (Lore m) ~ attr) =>
IndexSubstitutions (LetAttr (Lore m))
-> PatternT attr
-> m (IndexSu... | 1,011 | substituteIndicesInPattern substs pat = do
(substs', context) <- mapAccumLM sub substs $ patternContextElements pat
(substs'', values) <- mapAccumLM sub substs' $ patternValueElements pat
return (substs'', Pattern context values)
where sub substs' (PatElem name (BindInPlace cs src is) attr)
| Just (cs... | 644 | false | true | 0 | 14 | 341 | 346 | 171 | 175 | null | null |
smithhmark/dice-game | src/DiceGame.hs | bsd-3-clause | addPassingMoves brd plyr srdc False mvs = do
bs <- mvs
nb <- addNewDice brd plyr (srdc - 1)
np <- nxtPlyr plyr
n <- buildTree nb np 0 True Nothing
return $ n : bs
-- | creates a [Board] with necessary dice added | 222 | addPassingMoves brd plyr srdc False mvs = do
bs <- mvs
nb <- addNewDice brd plyr (srdc - 1)
np <- nxtPlyr plyr
n <- buildTree nb np 0 True Nothing
return $ n : bs
-- | creates a [Board] with necessary dice added | 222 | addPassingMoves brd plyr srdc False mvs = do
bs <- mvs
nb <- addNewDice brd plyr (srdc - 1)
np <- nxtPlyr plyr
n <- buildTree nb np 0 True Nothing
return $ n : bs
-- | creates a [Board] with necessary dice added | 222 | false | false | 0 | 10 | 55 | 85 | 39 | 46 | null | null |
gcampax/ghc | compiler/coreSyn/CoreSyn.hs | bsd-3-clause | -- | Returns @True@ for value arguments, false for type args
-- NB: coercions are value arguments (zero width, to be sure,
-- like State#, but still value args).
isValArg :: Expr b -> Bool
isValArg e = not (isTypeArg e) | 219 | isValArg :: Expr b -> Bool
isValArg e = not (isTypeArg e) | 57 | isValArg e = not (isTypeArg e) | 30 | true | true | 0 | 7 | 40 | 33 | 17 | 16 | null | null |
urbanslug/ghc | compiler/coreSyn/CoreSyn.hs | bsd-3-clause | -- | A "counting tick" (where tickishCounts is True) is one that
-- counts evaluations in some way. We cannot discard a counting tick,
-- and the compiler should preserve the number of counting ticks as
-- far as possible.
--
-- However, we still allow the simplifier to increase or decrease
-- sharing, so in practice ... | 515 | tickishCounts :: Tickish id -> Bool
tickishCounts n@ProfNote{} = profNoteCount n | 80 | tickishCounts n@ProfNote{} = profNoteCount n | 44 | true | true | 3 | 5 | 90 | 41 | 24 | 17 | null | null |
ssanj/babyloncandle | site.hs | mit | siteSEOCtx :: Context String
siteSEOCtx = constField "siteSEO" "The personal blog of sanjiv sahayam." | 101 | siteSEOCtx :: Context String
siteSEOCtx = constField "siteSEO" "The personal blog of sanjiv sahayam." | 101 | siteSEOCtx = constField "siteSEO" "The personal blog of sanjiv sahayam." | 72 | false | true | 0 | 5 | 13 | 19 | 9 | 10 | null | null |
beni55/attoparsec | Data/Attoparsec/Text/Internal.hs | bsd-3-clause | -- | Run a parser that cannot be resupplied via a 'Partial' result.
--
-- This function does not force a parser to consume all of its input.
-- Instead, any residual input will be discarded. To force a parser
-- to consume all of its input, use something like this:
--
-- @
--'parseOnly' (myParser 'Control.Applicative.... | 712 | parseOnly :: Parser a -> Text -> Either String a
parseOnly m s = case runParser m (buffer s) 0 Complete failK successK of
Fail _ [] err -> Left err
Fail _ ctxs err -> Left (intercalate " > " ctxs ++ ": " ++ err)
Done _ a -> Right a
_ ... | 369 | parseOnly m s = case runParser m (buffer s) 0 Complete failK successK of
Fail _ [] err -> Left err
Fail _ ctxs err -> Left (intercalate " > " ctxs ++ ": " ++ err)
Done _ a -> Right a
_ -> error "parseOnly: impossible error!"
| 320 | true | true | 0 | 12 | 215 | 137 | 68 | 69 | null | null |
rueshyna/gogol | gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Sizes/Get.hs | mpl-2.0 | -- | Creates a value of 'SizesGet' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'sgProFileId'
--
-- * 'sgId'
sizesGet
:: Int64 -- ^ 'sgProFileId'
-> Int64 -- ^ 'sgId'
-> SizesGet
sizesGet pSgProFileId_ pSgId_ =
Sizes... | 406 | sizesGet
:: Int64 -- ^ 'sgProFileId'
-> Int64 -- ^ 'sgId'
-> SizesGet
sizesGet pSgProFileId_ pSgId_ =
SizesGet'
{ _sgProFileId = _Coerce # pSgProFileId_
, _sgId = _Coerce # pSgId_
} | 209 | sizesGet pSgProFileId_ pSgId_ =
SizesGet'
{ _sgProFileId = _Coerce # pSgProFileId_
, _sgId = _Coerce # pSgId_
} | 127 | true | true | 0 | 7 | 96 | 55 | 34 | 21 | null | null |
haskell-streaming/streaming | benchmarks/old/Stream/Prelude/SPEC.hs | bsd-3-clause | {-| Write 'String's to 'IO.stdout' using 'putStrLn'
Unlike 'toHandle', 'stdoutLn' gracefully terminates on a broken output pipe
-}
stdoutLn :: MonadIO m => Stream (Of String) m () -> m ()
stdoutLn = loop
where
loop stream = case stream of
Return _ -> return ()
Delay m -> m >>= ... | 675 | stdoutLn :: MonadIO m => Stream (Of String) m () -> m ()
stdoutLn = loop
where
loop stream = case stream of
Return _ -> return ()
Delay m -> m >>= loop
Step (s :> rest) -> do
x <- liftIO $ try (putStrLn s)
case x of
Left (G.IOError { G.ioe_type = ... | 539 | stdoutLn = loop
where
loop stream = case stream of
Return _ -> return ()
Delay m -> m >>= loop
Step (s :> rest) -> do
x <- liftIO $ try (putStrLn s)
case x of
Left (G.IOError { G.ioe_type = G.ResourceVanished
, G.ioe_err... | 482 | true | true | 0 | 18 | 264 | 215 | 101 | 114 | null | null |
sumitsahrawat/calculator | src/Math/REPL/Evaluator/Expr.hs | gpl-2.0 | evalExpr b (Variable s) =
case getVar s b of
Nothing -> Message ["Unknown variable " ++ show s]
Just v -> Constant v | 129 | evalExpr b (Variable s) =
case getVar s b of
Nothing -> Message ["Unknown variable " ++ show s]
Just v -> Constant v | 129 | evalExpr b (Variable s) =
case getVar s b of
Nothing -> Message ["Unknown variable " ++ show s]
Just v -> Constant v | 129 | false | false | 0 | 11 | 36 | 59 | 26 | 33 | null | null |
netom/haskell-ray | src/Vector.hs | lgpl-3.0 | translate :: Double -> Double -> Double -> Transformation
translate x y z = Transformation
1 0 0 x
0 1 0 y
0 0 1 z
0 0 0 1
1 0 0 (-x)
0 1 0 (-y)
0 0 1 (-z)
0 0 0 1 | 196 | translate :: Double -> Double -> Double -> Transformation
translate x y z = Transformation
1 0 0 x
0 1 0 y
0 0 1 z
0 0 0 1
1 0 0 (-x)
0 1 0 (-y)
0 0 1 (-z)
0 0 0 1 | 196 | translate x y z = Transformation
1 0 0 x
0 1 0 y
0 0 1 z
0 0 0 1
1 0 0 (-x)
0 1 0 (-y)
0 0 1 (-z)
0 0 0 1 | 138 | false | true | 0 | 9 | 79 | 147 | 57 | 90 | null | null |
gscalzo/HaskellTheHardWay | cis194/week2/LogAnalysis.hs | mit | inOrder :: MessageTree -> [LogMessage]
inOrder Leaf = [] | 56 | inOrder :: MessageTree -> [LogMessage]
inOrder Leaf = [] | 56 | inOrder Leaf = [] | 17 | false | true | 0 | 8 | 8 | 29 | 13 | 16 | null | null |
simpleigh/change.hs | src/Data/Change/Row.hs | lgpl-2.1 | -- | Is the row a plain bob lead head?
isPlainBobLeadhead :: Row -> Maybe (Length, Int)
isPlainBobLeadhead _ = error "Not implemented" | 136 | isPlainBobLeadhead :: Row -> Maybe (Length, Int)
isPlainBobLeadhead _ = error "Not implemented" | 97 | isPlainBobLeadhead _ = error "Not implemented" | 46 | true | true | 0 | 7 | 24 | 31 | 16 | 15 | null | null |
SKA-ScienceDataProcessor/RC | MS6/dna/core/DNA/DSL.hs | apache-2.0 | -- | Like 'gather', but allows us to execute an 'IO' action for every
-- chunk of data we receive.
gatherM
:: Serializable a
=> Group a -- ^ Promise to use.
-> (b -> a -> DNA b) -- ^ Stepper function (called for each message)
-> b -- ^ Initial value
-> ... | 373 | gatherM
:: Serializable a
=> Group a -- ^ Promise to use.
-> (b -> a -> DNA b) -- ^ Stepper function (called for each message)
-> b -- ^ Initial value
-> DNA b
gatherM g f b = DNA $ singleton $ GatherM g f b | 274 | gatherM g f b = DNA $ singleton $ GatherM g f b | 47 | true | true | 0 | 11 | 135 | 77 | 39 | 38 | null | null |
bobgru/tree-derivations | src/LSystem4.hs | mit | rotateBranch t (p, v) = (p, rotateBy t v) | 41 | rotateBranch t (p, v) = (p, rotateBy t v) | 41 | rotateBranch t (p, v) = (p, rotateBy t v) | 41 | false | false | 0 | 6 | 8 | 28 | 15 | 13 | null | null |
cwmunn/logman | src/LogMan/Filters.hs | bsd-3-clause | sessionFilter :: (MonadState Options m) => [LogData] -> m [LogData]
sessionFilter es = do
o <- get
case optSessionId o of
Nothing -> return es
f -> return $ filter (\(e, r) -> (logSessionId e) == f) es | 221 | sessionFilter :: (MonadState Options m) => [LogData] -> m [LogData]
sessionFilter es = do
o <- get
case optSessionId o of
Nothing -> return es
f -> return $ filter (\(e, r) -> (logSessionId e) == f) es | 221 | sessionFilter es = do
o <- get
case optSessionId o of
Nothing -> return es
f -> return $ filter (\(e, r) -> (logSessionId e) == f) es | 153 | false | true | 0 | 17 | 57 | 108 | 53 | 55 | null | null |
beni55/fay | tests/guards.hs | bsd-3-clause | f :: Int -> Int
f n | n <= 0 = 0
| n >= 10 = 11 | 52 | f :: Int -> Int
f n | n <= 0 = 0
| n >= 10 = 11 | 52 | f n | n <= 0 = 0
| n >= 10 = 11 | 36 | false | true | 1 | 8 | 23 | 47 | 20 | 27 | null | null |
bixuanzju/fcore | lib/Examples.hs | bsd-2-clause | tailFact :: Expr t e
tailFact
= fix (\tail_fact acc ->
lam javaInt (\n ->
If (var n `eq` zero)
(var acc)
(var tail_fact `App` (var acc `mult` var n) `App` (var n `sub` one))))
javaInt (javaInt `Fun` javaInt) | 249 | tailFact :: Expr t e
tailFact
= fix (\tail_fact acc ->
lam javaInt (\n ->
If (var n `eq` zero)
(var acc)
(var tail_fact `App` (var acc `mult` var n) `App` (var n `sub` one))))
javaInt (javaInt `Fun` javaInt) | 249 | tailFact
= fix (\tail_fact acc ->
lam javaInt (\n ->
If (var n `eq` zero)
(var acc)
(var tail_fact `App` (var acc `mult` var n) `App` (var n `sub` one))))
javaInt (javaInt `Fun` javaInt) | 228 | false | true | 0 | 17 | 80 | 129 | 69 | 60 | null | null |
helino/wham | src/Wham/SignExc.hs | bsd-3-clause | AnyS `eq` _ = ret AnyT | 22 | AnyS `eq` _ = ret AnyT | 22 | AnyS `eq` _ = ret AnyT | 22 | false | false | 0 | 5 | 5 | 17 | 8 | 9 | null | null |
TomMD/ghc | compiler/main/DriverMkDepend.hs | bsd-3-clause | processDeps :: DynFlags
-> HscEnv
-> [ModuleName]
-> FilePath
-> Handle -- Write dependencies to here
-> SCC ModSummary
-> IO ()
-- Write suitable dependencies to handle
-- Always:
-- this.o : this.hs
--
-- If the dep... | 881 | processDeps :: DynFlags
-> HscEnv
-> [ModuleName]
-> FilePath
-> Handle -- Write dependencies to here
-> SCC ModSummary
-> IO ()
processDeps dflags _ _ _ _ (CyclicSCC nodes)
= -- There shouldn't be any cycles; report them
throwG... | 394 | processDeps dflags _ _ _ _ (CyclicSCC nodes)
= -- There shouldn't be any cycles; report them
throwGhcExceptionIO (ProgramError (showSDoc dflags $ GHC.cyclicModuleErr nodes)) | 183 | true | true | 0 | 12 | 318 | 105 | 59 | 46 | null | null |
neglectedvalue/xmobar-freebsd | scripts/xmonadpropwrite.hs | bsd-3-clause | encodeCChar :: B.ByteString -> [CChar]
encodeCChar = map fromIntegral . B.unpack | 80 | encodeCChar :: B.ByteString -> [CChar]
encodeCChar = map fromIntegral . B.unpack | 80 | encodeCChar = map fromIntegral . B.unpack | 41 | false | true | 0 | 6 | 10 | 29 | 15 | 14 | null | null |
kim/amazonka | amazonka-ec2/gen/Network/AWS/EC2/ResetImageAttribute.hs | mpl-2.0 | -- | The ID of the AMI.
ria1ImageId :: Lens' ResetImageAttribute Text
ria1ImageId = lens _ria1ImageId (\s a -> s { _ria1ImageId = a }) | 134 | ria1ImageId :: Lens' ResetImageAttribute Text
ria1ImageId = lens _ria1ImageId (\s a -> s { _ria1ImageId = a }) | 110 | ria1ImageId = lens _ria1ImageId (\s a -> s { _ria1ImageId = a }) | 64 | true | true | 0 | 9 | 24 | 40 | 22 | 18 | null | null |
samcal/rasa | rasa-ext-vim/src/Rasa/Ext/Vim.hs | gpl-3.0 | setMode :: VimMode -> BufAction ()
setMode = setBufExt | 54 | setMode :: VimMode -> BufAction ()
setMode = setBufExt | 54 | setMode = setBufExt | 19 | false | true | 0 | 7 | 8 | 20 | 10 | 10 | null | null |
marcinmrotek/repa-linear-algebra | src/Numeric/LinearAlgebra/Repa.hs | bsd-3-clause | linearSolvePIO :: (Field t, Numeric t) => Array D DIM2 t -> Array D DIM2 t -> IO (Maybe (Array F DIM2 t))
-- ^Solve a linear system using the LU decomposition. Arguments computed in parallel inside the IO monad.
linearSolvePIO m n = (hm2repa <$>) <$> (H.linearSolve <$> repa2hmPIO m <*> repa2hmPIO n) | 300 | linearSolvePIO :: (Field t, Numeric t) => Array D DIM2 t -> Array D DIM2 t -> IO (Maybe (Array F DIM2 t))
linearSolvePIO m n = (hm2repa <$>) <$> (H.linearSolve <$> repa2hmPIO m <*> repa2hmPIO n) | 194 | linearSolvePIO m n = (hm2repa <$>) <$> (H.linearSolve <$> repa2hmPIO m <*> repa2hmPIO n) | 88 | true | true | 0 | 13 | 53 | 105 | 51 | 54 | null | null |
tjakway/ghcjvm | compiler/typecheck/TcGenDeriv.hs | bsd-3-clause | primOrdOps :: String -- The class involved
-> TyCon -- The tycon involved
-> Type -- The type
-> (RdrName, RdrName, RdrName, RdrName, RdrName) -- (lt,le,eq,ge,gt)
-- See Note [Deriving and unboxed types] in TcDeriv
primOrdOps str tycon ty = assoc_ty_id str tycon ordOpTbl ty | 320 | primOrdOps :: String -- The class involved
-> TyCon -- The tycon involved
-> Type -- The type
-> (RdrName, RdrName, RdrName, RdrName, RdrName)
primOrdOps str tycon ty = assoc_ty_id str tycon ordOpTbl ty | 247 | primOrdOps str tycon ty = assoc_ty_id str tycon ordOpTbl ty | 59 | true | true | 0 | 10 | 90 | 64 | 35 | 29 | null | null |
konn/pandoc-japanese-docx | src/Text/Pandoc/Readers/Docx/Parse.hs | gpl-2.0 | elemToRunStyle _ _ _ = defaultRunStyle | 38 | elemToRunStyle _ _ _ = defaultRunStyle | 38 | elemToRunStyle _ _ _ = defaultRunStyle | 38 | false | false | 0 | 5 | 5 | 13 | 6 | 7 | null | null |
markflorisson/hpack | testrepo/bytestring-0.10.4.1/tests/Regressions.hs | bsd-3-clause | tests :: [F.Test]
tests = [
F.testCase "concat_overflow" concat_overflow
] | 80 | tests :: [F.Test]
tests = [
F.testCase "concat_overflow" concat_overflow
] | 80 | tests = [
F.testCase "concat_overflow" concat_overflow
] | 62 | false | true | 0 | 7 | 15 | 26 | 14 | 12 | null | null |
andregr/bot | lib/Bot/Action/Action.hs | bsd-3-clause | maxProjectNameLength :: [Project] -> Int
maxProjectNameLength ps = maximum $ map (T.length . projectName) ps | 108 | maxProjectNameLength :: [Project] -> Int
maxProjectNameLength ps = maximum $ map (T.length . projectName) ps | 108 | maxProjectNameLength ps = maximum $ map (T.length . projectName) ps | 67 | false | true | 2 | 8 | 14 | 45 | 21 | 24 | null | null |
codemac/yi-editor | src/Yi/String.hs | gpl-2.0 | isBlank :: String -> Bool
isBlank = all isSpace | 47 | isBlank :: String -> Bool
isBlank = all isSpace | 47 | isBlank = all isSpace | 21 | false | true | 0 | 7 | 8 | 25 | 10 | 15 | null | null |
iand675/hiker | Tests.hs | bsd-3-clause | deleteSpecs = describe "Database.Riak.delete" $ do
return () | 62 | deleteSpecs = describe "Database.Riak.delete" $ do
return () | 62 | deleteSpecs = describe "Database.Riak.delete" $ do
return () | 62 | false | false | 1 | 10 | 9 | 25 | 9 | 16 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.