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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
dorchard/pde-specs | Output.hs | bsd-2-clause | parensL t = (fromString "(") <> t <> (fromString ")") | 53 | parensL t = (fromString "(") <> t <> (fromString ")") | 53 | parensL t = (fromString "(") <> t <> (fromString ")") | 53 | false | false | 0 | 8 | 9 | 29 | 14 | 15 | null | null |
ben-schulz/Idris-dev | src/IRTS/JavaScript/AST.hs | bsd-3-clause | compileJS' indent (JSSeq seq) =
T.intercalate ";\n" (
map (
(T.replicate indent " " `T.append`) . (compileJS' indent)
) $ filter (/= JSNoop) seq
) `T.append` ";" | 179 | compileJS' indent (JSSeq seq) =
T.intercalate ";\n" (
map (
(T.replicate indent " " `T.append`) . (compileJS' indent)
) $ filter (/= JSNoop) seq
) `T.append` ";" | 179 | compileJS' indent (JSSeq seq) =
T.intercalate ";\n" (
map (
(T.replicate indent " " `T.append`) . (compileJS' indent)
) $ filter (/= JSNoop) seq
) `T.append` ";" | 179 | false | false | 0 | 12 | 44 | 86 | 43 | 43 | null | null |
ibabushkin/hweather | Main.hs | gpl-3.0 | defaultOptions :: Options
defaultOptions = Options { optUnit = Fetch.Default
, optNumIntervals = 8
, optSkipIntervals = 0
, optAPIKey = ""
, optLocation = Fetch.City "Berlin" "de"
, optOutput = p... | 398 | defaultOptions :: Options
defaultOptions = Options { optUnit = Fetch.Default
, optNumIntervals = 8
, optSkipIntervals = 0
, optAPIKey = ""
, optLocation = Fetch.City "Berlin" "de"
, optOutput = p... | 398 | defaultOptions = Options { optUnit = Fetch.Default
, optNumIntervals = 8
, optSkipIntervals = 0
, optAPIKey = ""
, optLocation = Fetch.City "Berlin" "de"
, optOutput = putStrLn
... | 372 | false | true | 0 | 8 | 211 | 64 | 39 | 25 | null | null |
fibsifan/pandoc | src/Text/Pandoc/Readers/HTML.hs | gpl-2.0 | pListItem :: TagParser a -> TagParser Blocks
pListItem nonItem = do
TagOpen _ attr <- lookAhead $ pSatisfy (~== TagOpen "li" [])
let liDiv = maybe mempty (\x -> B.divWith (x, [], []) mempty) (lookup "id" attr)
(liDiv <>) <$> pInTags "li" block <* skipMany nonItem | 269 | pListItem :: TagParser a -> TagParser Blocks
pListItem nonItem = do
TagOpen _ attr <- lookAhead $ pSatisfy (~== TagOpen "li" [])
let liDiv = maybe mempty (\x -> B.divWith (x, [], []) mempty) (lookup "id" attr)
(liDiv <>) <$> pInTags "li" block <* skipMany nonItem | 269 | pListItem nonItem = do
TagOpen _ attr <- lookAhead $ pSatisfy (~== TagOpen "li" [])
let liDiv = maybe mempty (\x -> B.divWith (x, [], []) mempty) (lookup "id" attr)
(liDiv <>) <$> pInTags "li" block <* skipMany nonItem | 224 | false | true | 0 | 16 | 51 | 134 | 64 | 70 | null | null |
ashgti/DTI | src/Language/Perl/Types.hs | mit | showVal (String contents) = "\"" ++ contents ++ "\"" | 52 | showVal (String contents) = "\"" ++ contents ++ "\"" | 52 | showVal (String contents) = "\"" ++ contents ++ "\"" | 52 | false | false | 0 | 7 | 8 | 23 | 11 | 12 | null | null |
ideas-edu/ideas | src/Ideas/Common/Rewriting/Confluence.hs | apache-2.0 | rewriteTerm :: RewriteRule a -> Term -> [Term]
rewriteTerm r t = do
let lhs :~> rhs = ruleSpecTerm $
renumberRewriteRule (nextMetaVar t) r
sub <- match lhs t
return (sub |-> rhs)
-- uniplate-like helper-functions | 239 | rewriteTerm :: RewriteRule a -> Term -> [Term]
rewriteTerm r t = do
let lhs :~> rhs = ruleSpecTerm $
renumberRewriteRule (nextMetaVar t) r
sub <- match lhs t
return (sub |-> rhs)
-- uniplate-like helper-functions | 238 | rewriteTerm r t = do
let lhs :~> rhs = ruleSpecTerm $
renumberRewriteRule (nextMetaVar t) r
sub <- match lhs t
return (sub |-> rhs)
-- uniplate-like helper-functions | 191 | false | true | 0 | 14 | 62 | 91 | 41 | 50 | null | null |
GaloisInc/elf | src/Data/ElfEdit/Get.hs | bsd-3-clause | parseElfResult (Right (_,_,v)) = Right v | 40 | parseElfResult (Right (_,_,v)) = Right v | 40 | parseElfResult (Right (_,_,v)) = Right v | 40 | false | false | 0 | 7 | 5 | 28 | 14 | 14 | null | null |
juventietis/HLINQ | benchmark/HDB/Connect.hs | mit | withDB :: (Database -> IO a) -> IO a
withDB = sqliteConnect "test.db" | 69 | withDB :: (Database -> IO a) -> IO a
withDB = sqliteConnect "test.db" | 69 | withDB = sqliteConnect "test.db" | 32 | false | true | 0 | 9 | 12 | 36 | 16 | 20 | null | null |
Philonous/xml-picklers | tests/Tests.hs | bsd-3-clause | prop_flattenContent :: [(Node, Content)] -> Property
prop_flattenContent ncs =
hasContent (map fst ncs) ==>
let combined = map (\(n, c) -> case (n, c) of
(NodeContent (ContentText t), ContentText t')->
NodeContent (ContentText (Text.concat [t, t']))
... | 1,180 | prop_flattenContent :: [(Node, Content)] -> Property
prop_flattenContent ncs =
hasContent (map fst ncs) ==>
let combined = map (\(n, c) -> case (n, c) of
(NodeContent (ContentText t), ContentText t')->
NodeContent (ContentText (Text.concat [t, t']))
... | 1,180 | prop_flattenContent ncs =
hasContent (map fst ncs) ==>
let combined = map (\(n, c) -> case (n, c) of
(NodeContent (ContentText t), ContentText t')->
NodeContent (ContentText (Text.concat [t, t']))
(NodeContent (ContentEntity _), _)... | 1,127 | false | true | 4 | 16 | 483 | 374 | 188 | 186 | null | null |
strake/monad-classes.hs | Control/Monad/Classes/Reader.hs | mit | runReader :: r -> R.ReaderT r m a -> m a
runReader = flip R.runReaderT | 70 | runReader :: r -> R.ReaderT r m a -> m a
runReader = flip R.runReaderT | 70 | runReader = flip R.runReaderT | 29 | false | true | 0 | 9 | 14 | 42 | 18 | 24 | null | null |
CodaFi/language-swift | src/Language/Swift/Lexer.hs | mit | braces = P.braces lexer | 28 | braces = P.braces lexer | 28 | braces = P.braces lexer | 28 | false | false | 0 | 6 | 8 | 11 | 5 | 6 | null | null |
ganeti/ganeti | src/Ganeti/OpParams.hs | bsd-2-clause | pFileDriver :: Field
pFileDriver =
withDoc "Driver for file-backed disks" .
optionalField $ simpleField "file_driver" [t| FileDriver |] | 139 | pFileDriver :: Field
pFileDriver =
withDoc "Driver for file-backed disks" .
optionalField $ simpleField "file_driver" [t| FileDriver |] | 139 | pFileDriver =
withDoc "Driver for file-backed disks" .
optionalField $ simpleField "file_driver" [t| FileDriver |] | 118 | false | true | 2 | 6 | 21 | 39 | 18 | 21 | null | null |
Icelandjack/lens | src/Control/Lens/Fold.hs | bsd-3-clause | -- | Obtain an 'Fold' that can be composed with to filter another 'Lens', 'Iso', 'Getter', 'Fold' (or 'Traversal').
--
-- Note: This is /not/ a legal 'Traversal', unless you are very careful not to invalidate the predicate on the target.
--
-- Note: This is also /not/ a legal 'Prism', unless you are very careful not to... | 1,039 | filtered :: (Choice p, Applicative f) => (a -> Bool) -> Optic' p f a a
filtered p = dimap (\x -> if p x then Right x else Left x) (either pure id) . right' | 155 | filtered p = dimap (\x -> if p x then Right x else Left x) (either pure id) . right' | 84 | true | true | 0 | 10 | 183 | 115 | 65 | 50 | null | null |
olsner/ghc | compiler/utils/Bag.hs | bsd-3-clause | foldrBagM k z (ListBag xs) = foldrM k z xs | 45 | foldrBagM k z (ListBag xs) = foldrM k z xs | 45 | foldrBagM k z (ListBag xs) = foldrM k z xs | 45 | false | false | 0 | 7 | 12 | 26 | 12 | 14 | null | null |
matterhorn-chat/matterhorn | src/Matterhorn/State/ThemeListOverlay.hs | bsd-3-clause | -- | Transform the user list results in some way, e.g. by moving the
-- cursor, and then check to see whether the modification warrants a
-- prefetch of more search results.
themeListMove :: (L.List Name InternalTheme -> L.List Name InternalTheme) -> MH ()
themeListMove = listOverlayMove (csCurrentTeam.tsThemeListOverl... | 323 | themeListMove :: (L.List Name InternalTheme -> L.List Name InternalTheme) -> MH ()
themeListMove = listOverlayMove (csCurrentTeam.tsThemeListOverlay) | 149 | themeListMove = listOverlayMove (csCurrentTeam.tsThemeListOverlay) | 66 | true | true | 0 | 9 | 47 | 52 | 27 | 25 | null | null |
danr/hipspec | src/HipSpec/Property.hs | gpl-3.0 | -- | Maybe the QuickSpec equation this originated from
propEquation :: Property eq -> Maybe eq
propEquation p = case prop_origin p of
Equation eq -> Just eq
_ -> Nothing
-- | Lint pass on a property | 217 | propEquation :: Property eq -> Maybe eq
propEquation p = case prop_origin p of
Equation eq -> Just eq
_ -> Nothing
-- | Lint pass on a property | 162 | propEquation p = case prop_origin p of
Equation eq -> Just eq
_ -> Nothing
-- | Lint pass on a property | 122 | true | true | 0 | 8 | 56 | 56 | 25 | 31 | null | null |
technogeeky/centered | src/Pearl/GaDtTLHT/Section03.hs | gpl-3.0 | -- ^
-- @
-- ('p05') 'splits' . 'k' = 'map' ('id' '><' k) . 'unfoldrp' ('||>')
-- @
p06 :: property
p06 = undefined | 130 | p06 :: property
p06 = undefined | 31 | p06 = undefined | 15 | true | true | 0 | 6 | 39 | 22 | 11 | 11 | null | null |
michalkonecny/aern2 | aern2-mfun/src/AERN2/BoxFunMinMax/Expressions/DeriveBounds.hs | bsd-3-clause | scanHypothesis (FComp Ge e1 e2) True intervals =
scanHypothesis (FComp Lt e1 e2) False intervals | 99 | scanHypothesis (FComp Ge e1 e2) True intervals =
scanHypothesis (FComp Lt e1 e2) False intervals | 99 | scanHypothesis (FComp Ge e1 e2) True intervals =
scanHypothesis (FComp Lt e1 e2) False intervals | 99 | false | false | 0 | 7 | 17 | 40 | 19 | 21 | null | null |
seckcoder/lang-learn | haskell/algo/src/Leetcode/AddTwoNumbers.hs | unlicense | zipWithPadding :: a -> b -> [a] -> [b] -> [(a,b)]
zipWithPadding a b (x:xs) (y:ys) = (x,y) : zipWithPadding a b xs ys | 117 | zipWithPadding :: a -> b -> [a] -> [b] -> [(a,b)]
zipWithPadding a b (x:xs) (y:ys) = (x,y) : zipWithPadding a b xs ys | 117 | zipWithPadding a b (x:xs) (y:ys) = (x,y) : zipWithPadding a b xs ys | 67 | false | true | 0 | 10 | 23 | 84 | 46 | 38 | null | null |
cutsea110/aop | src/Infinity.hs | bsd-3-clause | idList = foldr (Nil, Cons) | 26 | idList = foldr (Nil, Cons) | 26 | idList = foldr (Nil, Cons) | 26 | false | false | 0 | 6 | 4 | 15 | 8 | 7 | null | null |
SamirTalwar/advent-of-code | 2015/AOC_03_1.hs | mit | parseInput :: String -> [Direction]
parseInput = map parseChar
where
parseChar '^' = North
parseChar '>' = East
parseChar 'v' = South
parseChar '<' = West | 172 | parseInput :: String -> [Direction]
parseInput = map parseChar
where
parseChar '^' = North
parseChar '>' = East
parseChar 'v' = South
parseChar '<' = West | 172 | parseInput = map parseChar
where
parseChar '^' = North
parseChar '>' = East
parseChar 'v' = South
parseChar '<' = West | 136 | false | true | 4 | 8 | 43 | 75 | 29 | 46 | null | null |
JPMoresmau/leksah | src/IDE/ImportTool.hs | gpl-2.0 | selectModuleDialog :: Window -> [Descr] -> Text -> Maybe Text -> Maybe Descr -> IO (Maybe Descr)
selectModuleDialog parentWindow list id mbQual mbDescr =
let selectionList = (nub . sort) $ map (T.pack . render . disp . modu . fromJust . dsMbModu) list
in if length selectionList == 1
then return (... | 2,586 | selectModuleDialog :: Window -> [Descr] -> Text -> Maybe Text -> Maybe Descr -> IO (Maybe Descr)
selectModuleDialog parentWindow list id mbQual mbDescr =
let selectionList = (nub . sort) $ map (T.pack . render . disp . modu . fromJust . dsMbModu) list
in if length selectionList == 1
then return (... | 2,586 | selectModuleDialog parentWindow list id mbQual mbDescr =
let selectionList = (nub . sort) $ map (T.pack . render . disp . modu . fromJust . dsMbModu) list
in if length selectionList == 1
then return (Just (head list))
else do
let mbSelectedString = case mbDescr of
... | 2,489 | false | true | 0 | 31 | 1,281 | 602 | 284 | 318 | null | null |
keera-studios/hsQt | Qtc/Gui/QDialogButtonBox.hs | bsd-2-clause | qDialogButtonBox_deleteLater :: QDialogButtonBox a -> IO ()
qDialogButtonBox_deleteLater x0
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QDialogButtonBox_deleteLater cobj_x0 | 171 | qDialogButtonBox_deleteLater :: QDialogButtonBox a -> IO ()
qDialogButtonBox_deleteLater x0
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QDialogButtonBox_deleteLater cobj_x0 | 171 | qDialogButtonBox_deleteLater x0
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QDialogButtonBox_deleteLater cobj_x0 | 111 | false | true | 0 | 7 | 22 | 41 | 19 | 22 | null | null |
a143753/AOJ | 0101.hs | apache-2.0 | ans :: [String] -> [String]
ans inputs =
map (replace "Hoshino" "Hoshina") inputs | 83 | ans :: [String] -> [String]
ans inputs =
map (replace "Hoshino" "Hoshina") inputs | 83 | ans inputs =
map (replace "Hoshino" "Hoshina") inputs | 55 | false | true | 0 | 7 | 14 | 40 | 20 | 20 | null | null |
jwiegley/ghc-release | libraries/process/System/Process.hs | gpl-3.0 | readProcess
:: FilePath -- ^ Filename of the executable (see 'proc' for details)
-> [String] -- ^ any arguments
-> String -- ^ standard input
-> IO String -- ^ stdout
readProcess cmd args input = do
let cp_opts = (proc cmd args) {
... | 2,046 | readProcess
:: FilePath -- ^ Filename of the executable (see 'proc' for details)
-> [String] -- ^ any arguments
-> String -- ^ standard input
-> IO String
readProcess cmd args input = do
let cp_opts = (proc cmd args) {
std_in = C... | 2,019 | readProcess cmd args input = do
let cp_opts = (proc cmd args) {
std_in = CreatePipe,
std_out = CreatePipe,
std_err = Inherit
}
(ex, output) <- withCreateProcess_ "readProcess" cp_opts $
\(Just inh) (Just outh) _ ph -> do
... | 1,798 | true | true | 0 | 20 | 601 | 265 | 132 | 133 | null | null |
sdiehl/ghc | hadrian/src/Rules/SimpleTargets.hs | bsd-3-clause | -- | A phony @autocomplete@ rule that prints all valid setting keys
-- completions of the value specified in the @--complete-setting=...@ flag,
-- or simply all valid setting keys if no such argument is passed to Hadrian.
--
-- It is based on the 'completeSetting' function, from the "Settings" module.
completionR... | 625 | completionRule :: Rules ()
completionRule =
"autocomplete" ~> do
partialStr <- fromMaybe "" <$> cmdCompleteSetting
case completeSetting (splitOn "." partialStr) of
[] -> fail $ "No valid completion found for " ++ partialStr
cs -> forM_ cs $ \ks ->
liftIO . putStrLn $ intercalate "." ks | 316 | completionRule =
"autocomplete" ~> do
partialStr <- fromMaybe "" <$> cmdCompleteSetting
case completeSetting (splitOn "." partialStr) of
[] -> fail $ "No valid completion found for " ++ partialStr
cs -> forM_ cs $ \ks ->
liftIO . putStrLn $ intercalate "." ks | 289 | true | true | 0 | 14 | 132 | 104 | 52 | 52 | null | null |
mb21/qua-kit | apps/hs/qua-server/src/Handler/Mooc/Admin/ScenarioEditor.hs | mit | postScenarioProblemAttachCriterionR ::
ScenarioProblemId -> CriterionId -> Handler ()
postScenarioProblemAttachCriterionR s c = do
void $
runDB $ do
mr <-
selectFirst
[ ProblemCriterionProblemId P.==. s
, ProblemCriterionCriterionId ... | 703 | postScenarioProblemAttachCriterionR ::
ScenarioProblemId -> CriterionId -> Handler ()
postScenarioProblemAttachCriterionR s c = do
void $
runDB $ do
mr <-
selectFirst
[ ProblemCriterionProblemId P.==. s
, ProblemCriterionCriterionId ... | 703 | postScenarioProblemAttachCriterionR s c = do
void $
runDB $ do
mr <-
selectFirst
[ ProblemCriterionProblemId P.==. s
, ProblemCriterionCriterionId P.==. c
]
[]
case mr of
N... | 610 | false | true | 0 | 15 | 346 | 126 | 61 | 65 | null | null |
geophf/1HaskellADay | exercises/HAD/Y2017/M03/D14/Exercise.hs | mit | {--
Show the first 5 partial values for √2
>>> nthConvergent 1 sqrt2
1 % 1
>>> nthConvergent 2 sqrt2
3 % 2
>>> nthConvergent 3 sqrt2
7 % 5
>>> nthConvergent 4 sqrt2
17 % 12
>>> nthConvergent 5 sqrt2
41 % 29
--}
-- define e as a continued fraction:
e :: ContinuedFraction
e = undefined | 287 | e :: ContinuedFraction
e = undefined | 36 | e = undefined | 13 | true | true | 0 | 6 | 60 | 20 | 9 | 11 | null | null |
tjakway/ghcjvm | compiler/prelude/PrelNames.hs | bsd-3-clause | mconcatClassOpKey = mkPreludeMiscIdUnique 516 | 45 | mconcatClassOpKey = mkPreludeMiscIdUnique 516 | 45 | mconcatClassOpKey = mkPreludeMiscIdUnique 516 | 45 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
takayuki/natume | ScmParse.hs | gpl-2.0 | leftparen :: Parser Token ()
leftparen = MkParser f
where
f [] = []
f ((TokenLeftParen):ts) = [((),ts)]
f (_:_) = [] | 205 | leftparen :: Parser Token ()
leftparen = MkParser f
where
f [] = []
f ((TokenLeftParen):ts) = [((),ts)]
f (_:_) = [] | 205 | leftparen = MkParser f
where
f [] = []
f ((TokenLeftParen):ts) = [((),ts)]
f (_:_) = [] | 175 | false | true | 0 | 10 | 110 | 81 | 43 | 38 | null | null |
siddhanathan/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | randomClassName = clsQual rANDOM (fsLit "Random") randomClassKey | 75 | randomClassName = clsQual rANDOM (fsLit "Random") randomClassKey | 75 | randomClassName = clsQual rANDOM (fsLit "Random") randomClassKey | 75 | false | false | 0 | 7 | 17 | 19 | 9 | 10 | null | null |
ezyang/ghc | testsuite/tests/codeGen/should_run/T12433.hs | bsd-3-clause | main = f 8 | 10 | main = f 8 | 10 | main = f 8 | 10 | false | false | 1 | 5 | 3 | 12 | 4 | 8 | null | null |
plietar/super-user-spark | src/Compiler.hs | mit | done :: SparkCompiler Bool
done = fmap null $ gets state_declarations_left | 74 | done :: SparkCompiler Bool
done = fmap null $ gets state_declarations_left | 74 | done = fmap null $ gets state_declarations_left | 47 | false | true | 0 | 6 | 10 | 24 | 11 | 13 | null | null |
travitch/dalvik | src/Dalvik/Printer.hs | bsd-3-clause | dfmt :: Double -> PP.Doc
dfmt d | isNaN d = "nan"
| otherwise = PP.text $ fshowFFloat (Just 6) (FD d) "" | 111 | dfmt :: Double -> PP.Doc
dfmt d | isNaN d = "nan"
| otherwise = PP.text $ fshowFFloat (Just 6) (FD d) "" | 111 | dfmt d | isNaN d = "nan"
| otherwise = PP.text $ fshowFFloat (Just 6) (FD d) "" | 86 | false | true | 0 | 9 | 29 | 63 | 29 | 34 | null | null |
expipiplus1/vulkan | generate-new/vma/VMA/RenderParams.hs | bsd-3-clause | dropPrefix
:: Text
-- ^ Prefix
-> Text
-- ^ body
-> Maybe Text
-- ^ Nothing if 'body' didn't begin with 'prefix'
dropPrefix p t = if p `T.isPrefixOf` T.toLower t
then Just . T.dropWhile (== '_') . T.drop (T.length p) $ t
else Nothing | 249 | dropPrefix
:: Text
-- ^ Prefix
-> Text
-- ^ body
-> Maybe Text
dropPrefix p t = if p `T.isPrefixOf` T.toLower t
then Just . T.dropWhile (== '_') . T.drop (T.length p) $ t
else Nothing | 197 | dropPrefix p t = if p `T.isPrefixOf` T.toLower t
then Just . T.dropWhile (== '_') . T.drop (T.length p) $ t
else Nothing | 124 | true | true | 0 | 11 | 61 | 90 | 46 | 44 | null | null |
urbanslug/ghc | compiler/utils/Util.hs | bsd-3-clause | zipWith3Equal _ = zipWith3 | 26 | zipWith3Equal _ = zipWith3 | 26 | zipWith3Equal _ = zipWith3 | 26 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
monte-language/masque | Masque/AST.hs | gpl-3.0 | getVarInt :: StateT MASTContext Get Integer
getVarInt = do
b <- lift getWord8
let rv = toInteger $ b .&. 0x7f
if b .&. 0x80 == 0x00
then return rv
else do
vi <- getVarInt
return $ rv .|. vi `shiftL` 7 | 252 | getVarInt :: StateT MASTContext Get Integer
getVarInt = do
b <- lift getWord8
let rv = toInteger $ b .&. 0x7f
if b .&. 0x80 == 0x00
then return rv
else do
vi <- getVarInt
return $ rv .|. vi `shiftL` 7 | 252 | getVarInt = do
b <- lift getWord8
let rv = toInteger $ b .&. 0x7f
if b .&. 0x80 == 0x00
then return rv
else do
vi <- getVarInt
return $ rv .|. vi `shiftL` 7 | 208 | false | true | 1 | 12 | 93 | 95 | 44 | 51 | null | null |
brendanhay/gogol | gogol-iap/gen/Network/Google/IAP/Types/Product.hs | mpl-2.0 | -- | Brands existing in the project.
lbrBrands :: Lens' ListBrandsResponse [Brand]
lbrBrands
= lens _lbrBrands (\ s a -> s{_lbrBrands = a}) .
_Default
. _Coerce | 174 | lbrBrands :: Lens' ListBrandsResponse [Brand]
lbrBrands
= lens _lbrBrands (\ s a -> s{_lbrBrands = a}) .
_Default
. _Coerce | 137 | lbrBrands
= lens _lbrBrands (\ s a -> s{_lbrBrands = a}) .
_Default
. _Coerce | 91 | true | true | 0 | 11 | 40 | 53 | 28 | 25 | null | null |
brendanhay/gogol | gogol-cloudshell/gen/Network/Google/Resource/CloudShell/Operations/Delete.hs | mpl-2.0 | -- | Upload protocol for media (e.g. \"raw\", \"multipart\").
odUploadProtocol :: Lens' OperationsDelete (Maybe Text)
odUploadProtocol
= lens _odUploadProtocol
(\ s a -> s{_odUploadProtocol = a}) | 203 | odUploadProtocol :: Lens' OperationsDelete (Maybe Text)
odUploadProtocol
= lens _odUploadProtocol
(\ s a -> s{_odUploadProtocol = a}) | 141 | odUploadProtocol
= lens _odUploadProtocol
(\ s a -> s{_odUploadProtocol = a}) | 85 | true | true | 1 | 9 | 33 | 51 | 25 | 26 | null | null |
tidalcycles/tidal-midi | Sound/Tidal/MIDI/Tetra.hs | gpl-3.0 | (btnvel, btnvel_p) = pF "btnvel" (Just 1) | 41 | (btnvel, btnvel_p) = pF "btnvel" (Just 1) | 41 | (btnvel, btnvel_p) = pF "btnvel" (Just 1) | 41 | false | false | 0 | 7 | 6 | 24 | 12 | 12 | null | null |
kylcarte/threepenny-extras | src/Foundation/Common.hs | bsd-3-clause | image :: String -> IO Element
image source = UI.img # set UI.src source | 71 | image :: String -> IO Element
image source = UI.img # set UI.src source | 71 | image source = UI.img # set UI.src source | 41 | false | true | 0 | 7 | 13 | 34 | 16 | 18 | null | null |
gbwey/persistent | persistent-sqlite/Database/Sqlite.hs | mit | decodeError 15 = ErrorProtocol | 30 | decodeError 15 = ErrorProtocol | 30 | decodeError 15 = ErrorProtocol | 30 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
osa1/Idris-dev | src/Idris/AbsSyntaxTree.hs | bsd-3-clause | defined (PParams _ _ ds) = concatMap defined ds | 47 | defined (PParams _ _ ds) = concatMap defined ds | 47 | defined (PParams _ _ ds) = concatMap defined ds | 47 | false | false | 0 | 6 | 8 | 25 | 11 | 14 | null | null |
brendanhay/gogol | gogol-drive/gen/Network/Google/Drive/Types/Product.hs | mpl-2.0 | -- | Declares a new parameter by name.
cpAddtional :: Lens' ChannelParams (HashMap Text Text)
cpAddtional
= lens _cpAddtional (\ s a -> s{_cpAddtional = a}) .
_Coerce | 174 | cpAddtional :: Lens' ChannelParams (HashMap Text Text)
cpAddtional
= lens _cpAddtional (\ s a -> s{_cpAddtional = a}) .
_Coerce | 135 | cpAddtional
= lens _cpAddtional (\ s a -> s{_cpAddtional = a}) .
_Coerce | 80 | true | true | 0 | 10 | 35 | 54 | 28 | 26 | null | null |
JustusAdam/schedule-planner | src/SchedulePlanner/Calculator/Scale.hs | lgpl-3.0 | calcMaps :: [Rule] -> WeightMap
calcMaps = flip calcMapsStep mempty | 67 | calcMaps :: [Rule] -> WeightMap
calcMaps = flip calcMapsStep mempty | 67 | calcMaps = flip calcMapsStep mempty | 35 | false | true | 0 | 7 | 9 | 29 | 13 | 16 | null | null |
green-haskell/ghc | compiler/utils/Outputable.hs | bsd-3-clause | pprPrefixVar :: Bool -> SDoc -> SDoc
pprPrefixVar is_operator pp_v
| is_operator = parens pp_v
| otherwise = pp_v | 119 | pprPrefixVar :: Bool -> SDoc -> SDoc
pprPrefixVar is_operator pp_v
| is_operator = parens pp_v
| otherwise = pp_v | 119 | pprPrefixVar is_operator pp_v
| is_operator = parens pp_v
| otherwise = pp_v | 82 | false | true | 1 | 7 | 24 | 41 | 19 | 22 | null | null |
plumlife/cabal | Cabal/Distribution/Simple/Program/GHC.hs | bsd-3-clause | ghcInvocation :: ConfiguredProgram -> Compiler -> GhcOptions -> ProgramInvocation
ghcInvocation prog comp opts =
programInvocation prog (renderGhcOptions comp opts) | 168 | ghcInvocation :: ConfiguredProgram -> Compiler -> GhcOptions -> ProgramInvocation
ghcInvocation prog comp opts =
programInvocation prog (renderGhcOptions comp opts) | 168 | ghcInvocation prog comp opts =
programInvocation prog (renderGhcOptions comp opts) | 86 | false | true | 0 | 7 | 22 | 43 | 21 | 22 | null | null |
awalterschulze/xhaskell-regex-deriv | Text/Regex/Deriv/ByteString/Posix.hs | bsd-3-clause | nub2Choice :: [[(Pat, Int -> SBinder -> SBinder)]] -> M.Map Pat (Int -> SBinder -> SBinder) -> [(Pat, Int -> SBinder -> SBinder)] -- the return type is a singleton list.
nub2Choice [] _ = return (PChoice [] Greedy, (\_ !sb -> {-# SCC "nubChoice/id0" #-} sb )) | 259 | nub2Choice :: [[(Pat, Int -> SBinder -> SBinder)]] -> M.Map Pat (Int -> SBinder -> SBinder) -> [(Pat, Int -> SBinder -> SBinder)]
nub2Choice [] _ = return (PChoice [] Greedy, (\_ !sb -> {-# SCC "nubChoice/id0" #-} sb )) | 219 | nub2Choice [] _ = return (PChoice [] Greedy, (\_ !sb -> {-# SCC "nubChoice/id0" #-} sb )) | 89 | true | true | 0 | 10 | 47 | 110 | 60 | 50 | null | null |
gonimo/gonimo-back | src/Gonimo/Server/Error.hs | agpl-3.0 | getServantErr AlreadyFamilyMember = err409 | 47 | getServantErr AlreadyFamilyMember = err409 | 47 | getServantErr AlreadyFamilyMember = err409 | 47 | false | false | 0 | 5 | 8 | 9 | 4 | 5 | null | null |
nightuser/parensprinter | src/PrinterParser.hs | mit | identifier :: Syntax delta => delta String
identifier = subset (`notElem` keywords) . cons <$> letter <*> many (letter <|> digit) | 129 | identifier :: Syntax delta => delta String
identifier = subset (`notElem` keywords) . cons <$> letter <*> many (letter <|> digit) | 129 | identifier = subset (`notElem` keywords) . cons <$> letter <*> many (letter <|> digit) | 86 | false | true | 0 | 9 | 20 | 52 | 27 | 25 | null | null |
vito/atomo | src/Atomo/Method.hs | bsd-3-clause | comparePrecision (PHeadTail _ _) _ = LT | 39 | comparePrecision (PHeadTail _ _) _ = LT | 39 | comparePrecision (PHeadTail _ _) _ = LT | 39 | false | false | 0 | 7 | 6 | 19 | 9 | 10 | null | null |
jtojnar/haste-compiler | libraries/ghc-7.10/base/GHC/Conc/Sync.hs | bsd-3-clause | {- | 'killThread' raises the 'ThreadKilled' exception in the given
thread (GHC only).
> killThread tid = throwTo tid ThreadKilled
-}
killThread :: ThreadId -> IO ()
killThread tid = throwTo tid ThreadKilled | 208 | killThread :: ThreadId -> IO ()
killThread tid = throwTo tid ThreadKilled | 73 | killThread tid = throwTo tid ThreadKilled | 41 | true | true | 0 | 7 | 34 | 29 | 14 | 15 | null | null |
gridaphobe/target | bench/RBTreeCoverage.hs | mit | mapPool max f xs = do
sem <- new max
mapConcurrently (with sem . f) xs
-- checkMany :: GhcSpec -> Handle -> IO [(Int, Double, Outcome)] | 140 | mapPool max f xs = do
sem <- new max
mapConcurrently (with sem . f) xs
-- checkMany :: GhcSpec -> Handle -> IO [(Int, Double, Outcome)] | 140 | mapPool max f xs = do
sem <- new max
mapConcurrently (with sem . f) xs
-- checkMany :: GhcSpec -> Handle -> IO [(Int, Double, Outcome)] | 140 | false | false | 0 | 10 | 31 | 42 | 19 | 23 | null | null |
spire/spire | src/Spire/Canonical/Evaluator.hs | bsd-3-clause | sub2 :: Bind Nom2 Value -> (Value , Value) -> SpireM Value
sub2 b (x1 , x2) = do
((nm1 , nm2) , f) <- unbind b
substsM [(nm1 , x1) , (nm2 , x2)] f | 150 | sub2 :: Bind Nom2 Value -> (Value , Value) -> SpireM Value
sub2 b (x1 , x2) = do
((nm1 , nm2) , f) <- unbind b
substsM [(nm1 , x1) , (nm2 , x2)] f | 150 | sub2 b (x1 , x2) = do
((nm1 , nm2) , f) <- unbind b
substsM [(nm1 , x1) , (nm2 , x2)] f | 91 | false | true | 0 | 9 | 39 | 92 | 50 | 42 | null | null |
harendra-kumar/unicode-transforms | unicode-data/UCD2Haskell.hs | bsd-3-clause | processFile :: FilePath -> FilePath -> IO ()
processFile src outdir = do
props <- (readSavedProps dst
`catch` \(_e::IOException) -> xmlToProps src dst)
-- print $ length props
emitFile "Decomposable" $ genDecomposable Canonical props
emitFile "DecomposableK" $ genDecomposable Komp... | 789 | processFile :: FilePath -> FilePath -> IO ()
processFile src outdir = do
props <- (readSavedProps dst
`catch` \(_e::IOException) -> xmlToProps src dst)
-- print $ length props
emitFile "Decomposable" $ genDecomposable Canonical props
emitFile "DecomposableK" $ genDecomposable Komp... | 789 | processFile src outdir = do
props <- (readSavedProps dst
`catch` \(_e::IOException) -> xmlToProps src dst)
-- print $ length props
emitFile "Decomposable" $ genDecomposable Canonical props
emitFile "DecomposableK" $ genDecomposable Kompat props
emitFile "Decompositions" ... | 744 | false | true | 1 | 12 | 203 | 209 | 95 | 114 | null | null |
ezyang/ghc | compiler/typecheck/TcRnTypes.hs | bsd-3-clause | exprCtOrigin (HsArrApp {}) = panic "exprCtOrigin HsArrApp" | 63 | exprCtOrigin (HsArrApp {}) = panic "exprCtOrigin HsArrApp" | 63 | exprCtOrigin (HsArrApp {}) = panic "exprCtOrigin HsArrApp" | 63 | false | false | 0 | 6 | 11 | 20 | 9 | 11 | null | null |
denibertovic/haskell | kubernetes/lib/Kubernetes/OpenAPI/ModelLens.hs | bsd-3-clause | -- | 'v1CSIPersistentVolumeSourceReadOnly' Lens
v1CSIPersistentVolumeSourceReadOnlyL :: Lens_' V1CSIPersistentVolumeSource (Maybe Bool)
v1CSIPersistentVolumeSourceReadOnlyL f V1CSIPersistentVolumeSource{..} = (\v1CSIPersistentVolumeSourceReadOnly -> V1CSIPersistentVolumeSource { v1CSIPersistentVolumeSourceReadOnly, ..}... | 364 | v1CSIPersistentVolumeSourceReadOnlyL :: Lens_' V1CSIPersistentVolumeSource (Maybe Bool)
v1CSIPersistentVolumeSourceReadOnlyL f V1CSIPersistentVolumeSource{..} = (\v1CSIPersistentVolumeSourceReadOnly -> V1CSIPersistentVolumeSource { v1CSIPersistentVolumeSourceReadOnly, ..} ) <$> f v1CSIPersistentVolumeSourceReadOnly | 316 | v1CSIPersistentVolumeSourceReadOnlyL f V1CSIPersistentVolumeSource{..} = (\v1CSIPersistentVolumeSourceReadOnly -> V1CSIPersistentVolumeSource { v1CSIPersistentVolumeSourceReadOnly, ..} ) <$> f v1CSIPersistentVolumeSourceReadOnly | 228 | true | true | 0 | 8 | 23 | 57 | 30 | 27 | null | null |
shlevy/ghc | compiler/basicTypes/Module.hs | bsd-3-clause | extendModuleEnv :: ModuleEnv a -> Module -> a -> ModuleEnv a
extendModuleEnv (ModuleEnv e) m x = ModuleEnv (Map.insert (NDModule m) x e) | 136 | extendModuleEnv :: ModuleEnv a -> Module -> a -> ModuleEnv a
extendModuleEnv (ModuleEnv e) m x = ModuleEnv (Map.insert (NDModule m) x e) | 136 | extendModuleEnv (ModuleEnv e) m x = ModuleEnv (Map.insert (NDModule m) x e) | 75 | false | true | 0 | 9 | 22 | 63 | 30 | 33 | null | null |
zeekay/lambdabot | Plugin/Quote/Text.hs | mit | --
-- Actual quotes from an asshat called Keal over Jan 12-14 2006.
--
-- Reappared as OrangeKid,
-- 06.10.18:19:44:00 --- join: OrangeKid -- (n=TRK@unaffiliated/Keal) joined #haskell
--
kealList :: [String]
kealList =
["endian mirrors the decimal"
,"primary elemental assumption of integer coefficients to roots... | 5,868 | kealList :: [String]
kealList =
["endian mirrors the decimal"
,"primary elemental assumption of integer coefficients to roots in counting sytem is wrong"
,"actually it bug in math"
,"b*(Floor[v/b^p]/b-Floor[Floor[v/b^p]/b])"
,"proofs are no longer sound"
,"my proof show math is broken right now"... | 5,681 | kealList =
["endian mirrors the decimal"
,"primary elemental assumption of integer coefficients to roots in counting sytem is wrong"
,"actually it bug in math"
,"b*(Floor[v/b^p]/b-Floor[Floor[v/b^p]/b])"
,"proofs are no longer sound"
,"my proof show math is broken right now"
,"doctor just gi... | 5,660 | true | true | 0 | 5 | 1,305 | 293 | 196 | 97 | null | null |
LinusU/fbthrift | thrift/compiler/test/fixtures/namespace/gen-hs/TestService_Fuzzer.hs | apache-2.0 | -- Fuzzers and exception handlers
init_fuzzer :: Options -> IO ()
init_fuzzer opts = do
a1 <- Applicative.ZipList <$> inf_Int_Int64
_ <- forM (Applicative.getZipList a1) init_fuzzFunc
return ()
where
init_fuzzFunc a1 = let param = (a1) in
if opt_framed opts
then withThriftDo opts (withFramedTransport ... | 474 | init_fuzzer :: Options -> IO ()
init_fuzzer opts = do
a1 <- Applicative.ZipList <$> inf_Int_Int64
_ <- forM (Applicative.getZipList a1) init_fuzzFunc
return ()
where
init_fuzzFunc a1 = let param = (a1) in
if opt_framed opts
then withThriftDo opts (withFramedTransport opts) (init_fuzzOnce param) (init_... | 440 | init_fuzzer opts = do
a1 <- Applicative.ZipList <$> inf_Int_Int64
_ <- forM (Applicative.getZipList a1) init_fuzzFunc
return ()
where
init_fuzzFunc a1 = let param = (a1) in
if opt_framed opts
then withThriftDo opts (withFramedTransport opts) (init_fuzzOnce param) (init_exceptionHandler param)
else... | 408 | true | true | 0 | 11 | 79 | 155 | 74 | 81 | null | null |
mathhun/stack | src/Stack/Types/Package.hs | bsd-3-clause | dotCabalModulePath _ = Nothing | 30 | dotCabalModulePath _ = Nothing | 30 | dotCabalModulePath _ = Nothing | 30 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
SonOfLilit/purewars | Game.hs | bsd-3-clause | screenHeight = 480 | 18 | screenHeight = 480 | 18 | screenHeight = 480 | 18 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
kmels/hledger | hledger-lib/Hledger/Data/Amount.hs | gpl-3.0 | maxprecision :: Int
maxprecision = 999998 | 41 | maxprecision :: Int
maxprecision = 999998 | 41 | maxprecision = 999998 | 21 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
bkoropoff/Idris-dev | src/Idris/Core/TT.hs | bsd-3-clause | discard :: Monad m => m a -> m ()
discard f = f >> return () | 60 | discard :: Monad m => m a -> m ()
discard f = f >> return () | 60 | discard f = f >> return () | 26 | false | true | 2 | 9 | 16 | 48 | 20 | 28 | null | null |
nitrix/lspace | legacy/World.hs | unlicense | -- TODO: higher-order "atObject" would be nice
worldAtObjectAddObject :: Link Object -> Link Object -> Game ()
worldAtObjectAddObject targetLink whatLink = do
worldCoord <- worldObjectLocation targetLink
worldAddObject whatLink worldCoord | 246 | worldAtObjectAddObject :: Link Object -> Link Object -> Game ()
worldAtObjectAddObject targetLink whatLink = do
worldCoord <- worldObjectLocation targetLink
worldAddObject whatLink worldCoord | 199 | worldAtObjectAddObject targetLink whatLink = do
worldCoord <- worldObjectLocation targetLink
worldAddObject whatLink worldCoord | 135 | true | true | 0 | 8 | 36 | 54 | 24 | 30 | null | null |
cbaatz/hamu8080 | src/Hamu8080/Compute.hs | mit | -- OR A, C
doOp 0xB2 = liftM2 (.|.) (getReg A) (getReg D) >>= setResult | 71 | doOp 0xB2 = liftM2 (.|.) (getReg A) (getReg D) >>= setResult | 60 | doOp 0xB2 = liftM2 (.|.) (getReg A) (getReg D) >>= setResult | 60 | true | false | 0 | 8 | 14 | 35 | 18 | 17 | null | null |
NorfairKing/the-notes | src/Cryptography/MACs.hs | gpl-2.0 | encryptThenMACDefinition :: Note
encryptThenMACDefinition = de $ do
lab encryptThenMACDefinitionLabel
s [the, encryptThenMAC', "(" <> etM' <> ")", "approach uses a", symmetricCryptosystem, m scs_, "with", messageSpace, m msp_ <> ",", keySpace, m ksp_, and, ciphertextSpace, m csp_, anda, mAC, m mfn_, "with", mes... | 722 | encryptThenMACDefinition :: Note
encryptThenMACDefinition = de $ do
lab encryptThenMACDefinitionLabel
s [the, encryptThenMAC', "(" <> etM' <> ")", "approach uses a", symmetricCryptosystem, m scs_, "with", messageSpace, m msp_ <> ",", keySpace, m ksp_, and, ciphertextSpace, m csp_, anda, mAC, m mfn_, "with", mes... | 722 | encryptThenMACDefinition = de $ do
lab encryptThenMACDefinitionLabel
s [the, encryptThenMAC', "(" <> etM' <> ")", "approach uses a", symmetricCryptosystem, m scs_, "with", messageSpace, m msp_ <> ",", keySpace, m ksp_, and, ciphertextSpace, m csp_, anda, mAC, m mfn_, "with", messageSpace, m csp_, and, keySpace,... | 689 | false | true | 0 | 11 | 143 | 243 | 132 | 111 | null | null |
nstott/GradeLevel | src/NLP/Syllables.hs | bsd-3-clause | isVowel (x:_) = x `elem` vowels | 31 | isVowel (x:_) = x `elem` vowels | 31 | isVowel (x:_) = x `elem` vowels | 31 | false | false | 0 | 6 | 5 | 26 | 13 | 13 | null | null |
joom/Guguk | src/Guguk/Tokenization/SentenceBoundary.hs | mit | squishBy :: (String -> String-> Bool) -> [String] -> [String]
squishBy _ [] = [] | 84 | squishBy :: (String -> String-> Bool) -> [String] -> [String]
squishBy _ [] = [] | 84 | squishBy _ [] = [] | 22 | false | true | 0 | 8 | 18 | 45 | 24 | 21 | null | null |
narurien/ganeti-ceph | src/Ganeti/Utils.hs | gpl-2.0 | -- | Resolves a numeric address.
resolveAddr :: Int -> String -> IO (Result (Family, SockAddr))
resolveAddr port str = do
resolved <- getAddrInfo resolveAddrHints (Just str) (Just (show port))
return $ case resolved of
[] -> Bad "Invalid results from lookup?"
best:_ -> Ok (addrFamily best,... | 416 | resolveAddr :: Int -> String -> IO (Result (Family, SockAddr))
resolveAddr port str = do
resolved <- getAddrInfo resolveAddrHints (Just str) (Just (show port))
return $ case resolved of
[] -> Bad "Invalid results from lookup?"
best:_ -> Ok (addrFamily best, addrAddress best)
-- | Set the ... | 383 | resolveAddr port str = do
resolved <- getAddrInfo resolveAddrHints (Just str) (Just (show port))
return $ case resolved of
[] -> Bad "Invalid results from lookup?"
best:_ -> Ok (addrFamily best, addrAddress best)
-- | Set the owner and the group of a file (given as names, not numeric id). | 320 | true | true | 0 | 13 | 96 | 120 | 59 | 61 | null | null |
GaloisInc/halvm-ghc | compiler/types/Type.hs | bsd-3-clause | -- | Take a forall type apart, or panics if that is not possible.
splitForAllTy :: Type -> (TyVar, Type)
splitForAllTy ty
| Just answer <- splitForAllTy_maybe ty = answer
| otherwise = pprPanic "splitForAllTy" (ppr ty) | 250 | splitForAllTy :: Type -> (TyVar, Type)
splitForAllTy ty
| Just answer <- splitForAllTy_maybe ty = answer
| otherwise = pprPanic "splitForAllTy" (ppr ty) | 184 | splitForAllTy ty
| Just answer <- splitForAllTy_maybe ty = answer
| otherwise = pprPanic "splitForAllTy" (ppr ty) | 145 | true | true | 1 | 9 | 68 | 64 | 30 | 34 | null | null |
bgold-cosmos/Tidal | src/Sound/Tidal/Params.hs | gpl-3.0 | delaybus :: Pattern Int -> Pattern Double -> ControlPattern
delaybus busid pat = (pF "delay" pat) # (pI "^delay" busid) | 119 | delaybus :: Pattern Int -> Pattern Double -> ControlPattern
delaybus busid pat = (pF "delay" pat) # (pI "^delay" busid) | 119 | delaybus busid pat = (pF "delay" pat) # (pI "^delay" busid) | 59 | false | true | 2 | 8 | 19 | 57 | 25 | 32 | null | null |
andyarvanitis/Idris-dev | src/Idris/Core/TT.hs | bsd-3-clause | showEnvDbg env t = showEnv' env t True | 38 | showEnvDbg env t = showEnv' env t True | 38 | showEnvDbg env t = showEnv' env t True | 38 | false | false | 1 | 5 | 7 | 25 | 8 | 17 | null | null |
stain/jdk8u | src/macosx/native/jobjc/src/core/PrimitiveCoder.hs | gpl-2.0 | capitalize s = [toUpper $ head s] ++ tail s | 43 | capitalize s = [toUpper $ head s] ++ tail s | 43 | capitalize s = [toUpper $ head s] ++ tail s | 43 | false | false | 1 | 8 | 9 | 29 | 12 | 17 | null | null |
dsorokin/aivika-experiment | Simulation/Aivika/Experiment/Base/ExperimentSpecsWriter.hs | bsd-3-clause | ethodName RungeKutta2 = experimentSpecsRungeKutta2Text
| 55 | methodName RungeKutta2 = experimentSpecsRungeKutta2Text | 55 | methodName RungeKutta2 = experimentSpecsRungeKutta2Text | 55 | false | false | 0 | 5 | 4 | 9 | 4 | 5 | null | null |
OpenXT/manager | xenmgr/Vm/Monitor.hs | gpl-2.0 | submitVmEvent :: VmMonitor -> VmEvent -> Rpc ()
submitVmEvent m e = liftIO $ (vmm_submit m) e | 93 | submitVmEvent :: VmMonitor -> VmEvent -> Rpc ()
submitVmEvent m e = liftIO $ (vmm_submit m) e | 93 | submitVmEvent m e = liftIO $ (vmm_submit m) e | 45 | false | true | 0 | 8 | 16 | 42 | 20 | 22 | null | null |
jfranklin9000/urbit | pkg/hs/proto/lib/Untyped/Parser.hs | mit | rune0 ∷ a → Parser a
rune0 = pure | 33 | rune0 ∷ a → Parser a
rune0 = pure | 33 | rune0 = pure | 12 | false | true | 0 | 6 | 8 | 18 | 9 | 9 | null | null |
spechub/Hets | Common/Keywords.hs | gpl-2.0 | lambdaS :: String
lambdaS = "lambda" | 36 | lambdaS :: String
lambdaS = "lambda" | 36 | lambdaS = "lambda" | 18 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
snoyberg/ghc | libraries/base/GHC/List.hs | bsd-3-clause | -- | Test whether a list is empty.
null :: [a] -> Bool
null [] = True | 105 | null :: [a] -> Bool
null [] = True | 70 | null [] = True | 31 | true | true | 0 | 6 | 52 | 24 | 13 | 11 | null | null |
siddhanathan/ghc | compiler/prelude/THNames.hs | bsd-3-clause | phantomRName = libFun (fsLit "phantomR") phantomRIdKey | 72 | phantomRName = libFun (fsLit "phantomR") phantomRIdKey | 72 | phantomRName = libFun (fsLit "phantomR") phantomRIdKey | 72 | false | false | 0 | 7 | 23 | 17 | 8 | 9 | null | null |
bordaigorl/jamesbound | src/Language/PiCalc/Parser.hs | gpl-2.0 | piLang = javaStyle
{ P.commentLine = "//"
, P.caseSensitive = True
, P.identStart = lower <|> oneOf "'_" -- identifiers are only names, process variables are treated separately
-- , P.identLetter = alphaNum <|> oneOf "_':"
, P.opLetter = oneOf ""... | 527 | piLang = javaStyle
{ P.commentLine = "//"
, P.caseSensitive = True
, P.identStart = lower <|> oneOf "'_" -- identifiers are only names, process variables are treated separately
-- , P.identLetter = alphaNum <|> oneOf "_':"
, P.opLetter = oneOf ""... | 527 | piLang = javaStyle
{ P.commentLine = "//"
, P.caseSensitive = True
, P.identStart = lower <|> oneOf "'_" -- identifiers are only names, process variables are treated separately
-- , P.identLetter = alphaNum <|> oneOf "_':"
, P.opLetter = oneOf ""... | 527 | false | false | 0 | 8 | 182 | 108 | 67 | 41 | null | null |
amar47shah/summer-2015-haskell-class | Lab1.hs | mit | -- Defining a function, `oneThirdRoundingUp`, that will be used later on.
oneThirdRoundingUp :: Int -> Int
oneThirdRoundingUp n = (n + 2) `quot` 3 | 147 | oneThirdRoundingUp :: Int -> Int
oneThirdRoundingUp n = (n + 2) `quot` 3 | 72 | oneThirdRoundingUp n = (n + 2) `quot` 3 | 39 | true | true | 0 | 7 | 24 | 32 | 18 | 14 | null | null |
kawu/factorized-tag-parser | tests/TestSet.hs | bsd-2-clause | gram2Tests :: [Test]
gram2Tests =
[ test "S" ("a b e a b") Yes
, test "S" ("a b e a a") No
, test "S" ("a b a b a b a b e a b a b a b a b") Yes
, test "S" ("a b a b a b a b e a b a b a b a") No
#ifdef NoAdjunctionRestriction
#else
-- Only fails if multiple adjunction is not allowed
, test "S" ("a b e b a") ... | 674 | gram2Tests :: [Test]
gram2Tests =
[ test "S" ("a b e a b") Yes
, test "S" ("a b e a a") No
, test "S" ("a b a b a b a b e a b a b a b a b") Yes
, test "S" ("a b a b a b a b e a b a b a b a") No
#ifdef NoAdjunctionRestriction
#else
-- Only fails if multiple adjunction is not allowed
, test "S" ("a b e b a") ... | 674 | gram2Tests =
[ test "S" ("a b e a b") Yes
, test "S" ("a b e a a") No
, test "S" ("a b a b a b a b e a b a b a b a b") Yes
, test "S" ("a b a b a b a b e a b a b a b a") No
#ifdef NoAdjunctionRestriction
#else
-- Only fails if multiple adjunction is not allowed
, test "S" ("a b e b a") No
#endif
, test "S... | 653 | false | true | 2 | 8 | 173 | 154 | 83 | 71 | null | null |
GaloisInc/halvm-ghc | compiler/utils/Outputable.hs | bsd-3-clause | primWordSuffix = text "##" | 28 | primWordSuffix = text "##" | 28 | primWordSuffix = text "##" | 28 | false | false | 0 | 5 | 5 | 9 | 4 | 5 | null | null |
ezyang/ghc | compiler/prelude/TysWiredIn.hs | bsd-3-clause | listTyCon :: TyCon
listTyCon = buildAlgTyCon listTyConName alpha_tyvar [Representational]
Nothing []
(DataTyCon [nilDataCon, consDataCon] False )
False
(VanillaAlgTyCon $ mkPrelTyConRepName listTyConName) | 308 | listTyCon :: TyCon
listTyCon = buildAlgTyCon listTyConName alpha_tyvar [Representational]
Nothing []
(DataTyCon [nilDataCon, consDataCon] False )
False
(VanillaAlgTyCon $ mkPrelTyConRepName listTyConName) | 308 | listTyCon = buildAlgTyCon listTyConName alpha_tyvar [Representational]
Nothing []
(DataTyCon [nilDataCon, consDataCon] False )
False
(VanillaAlgTyCon $ mkPrelTyConRepName listTyConName) | 289 | false | true | 0 | 8 | 124 | 57 | 30 | 27 | null | null |
dcreager/cabal | Distribution/Simple/PreProcess/Unlit.hs | bsd-3-clause | -- | 'unlit' takes a filename (for error reports), and transforms the
-- given string, to eliminate the literate comments from the program text.
unlit :: FilePath -> String -> Either String String
unlit file input =
let (usesBirdTracks, classified) = classifyAndCheckForBirdTracks
... | 2,411 | unlit :: FilePath -> String -> Either String String
unlit file input =
let (usesBirdTracks, classified) = classifyAndCheckForBirdTracks
. inlines
$ input
in either (Left . unlines . map (unclassify usesBirdTracks))
Right
. chec... | 2,264 | unlit file input =
let (usesBirdTracks, classified) = classifyAndCheckForBirdTracks
. inlines
$ input
in either (Left . unlines . map (unclassify usesBirdTracks))
Right
. checkErrors
. reclassify
$ classified
where
... | 2,212 | true | true | 10 | 13 | 674 | 425 | 210 | 215 | null | null |
d0kt0r0/estuary | client/src/Estuary/Widgets/Reflex.hs | gpl-3.0 | hideableWidgetWFlexColumn :: MonadWidget t m => Dynamic t Bool -> m a -> m a
hideableWidgetWFlexColumn b m = do
let attrs = fmap (bool (fromList [("hidden","true")]) (fromList [("style", "display: flex; flex-direction: column;")])) b
elDynAttr "div" attrs m | 262 | hideableWidgetWFlexColumn :: MonadWidget t m => Dynamic t Bool -> m a -> m a
hideableWidgetWFlexColumn b m = do
let attrs = fmap (bool (fromList [("hidden","true")]) (fromList [("style", "display: flex; flex-direction: column;")])) b
elDynAttr "div" attrs m | 262 | hideableWidgetWFlexColumn b m = do
let attrs = fmap (bool (fromList [("hidden","true")]) (fromList [("style", "display: flex; flex-direction: column;")])) b
elDynAttr "div" attrs m | 185 | false | true | 0 | 16 | 42 | 106 | 52 | 54 | null | null |
helino/wham | src/Wham/SignExc.hs | bsd-3-clause | _ `div` NonPositive = AnyS | 26 | _ `div` NonPositive = AnyS | 26 | _ `div` NonPositive = AnyS | 26 | false | false | 0 | 5 | 4 | 14 | 7 | 7 | null | null |
jlubi333/Camille | camille/hs/Parser.hs | mit | space :: Parser ()
space = oneOf [' ', '\t'] >> return () | 57 | space :: Parser ()
space = oneOf [' ', '\t'] >> return () | 57 | space = oneOf [' ', '\t'] >> return () | 38 | false | true | 1 | 7 | 12 | 37 | 17 | 20 | null | null |
urbanslug/ghc | compiler/typecheck/TcType.hs | bsd-3-clause | tcTyFamInsts (LitTy {}) = [] | 36 | tcTyFamInsts (LitTy {}) = [] | 36 | tcTyFamInsts (LitTy {}) = [] | 36 | false | false | 0 | 7 | 12 | 18 | 9 | 9 | null | null |
rueshyna/gogol | gogol-sqladmin/gen/Network/Google/SQLAdmin/Types/Product.hs | mpl-2.0 | -- | If the instance state is SUSPENDED, the reason for the suspension.
datSuspensionReason :: Lens' DatabaseInstance [Text]
datSuspensionReason
= lens _datSuspensionReason
(\ s a -> s{_datSuspensionReason = a})
. _Default
. _Coerce | 252 | datSuspensionReason :: Lens' DatabaseInstance [Text]
datSuspensionReason
= lens _datSuspensionReason
(\ s a -> s{_datSuspensionReason = a})
. _Default
. _Coerce | 180 | datSuspensionReason
= lens _datSuspensionReason
(\ s a -> s{_datSuspensionReason = a})
. _Default
. _Coerce | 127 | true | true | 3 | 8 | 52 | 58 | 28 | 30 | null | null |
dorchard/gram_lang | frontend/src/Language/Granule/Checker/KindsHelpers.hs | bsd-3-clause | isEffectKind _ = False | 22 | isEffectKind _ = False | 22 | isEffectKind _ = False | 22 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
printedheart/Dao | src/Dao/Text/Editor.hs | agpl-3.0 | -- | You can set a list of tab stops so every 'tab' operation steps to the next stop rather than the
-- default behavior of stepping forward to a column that is some multiple 'tabWidth'.
tabStops :: Monad m => Lens m PPrintState [Int]
tabStops = pPrintStateLens >>> tuple3 | 272 | tabStops :: Monad m => Lens m PPrintState [Int]
tabStops = pPrintStateLens >>> tuple3 | 85 | tabStops = pPrintStateLens >>> tuple3 | 37 | true | true | 0 | 7 | 49 | 34 | 18 | 16 | null | null |
olsner/ghc | compiler/types/Type.hs | bsd-3-clause | seqType :: Type -> ()
seqType (LitTy n) = n `seq` () | 70 | seqType :: Type -> ()
seqType (LitTy n) = n `seq` () | 70 | seqType (LitTy n) = n `seq` () | 48 | false | true | 0 | 7 | 29 | 34 | 18 | 16 | null | null |
brendanhay/gogol | gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Product.hs | mpl-2.0 | -- | DART ID of the country to which this mobile carrier belongs.
mcCountryDartId :: Lens' MobileCarrier (Maybe Int64)
mcCountryDartId
= lens _mcCountryDartId
(\ s a -> s{_mcCountryDartId = a})
. mapping _Coerce | 225 | mcCountryDartId :: Lens' MobileCarrier (Maybe Int64)
mcCountryDartId
= lens _mcCountryDartId
(\ s a -> s{_mcCountryDartId = a})
. mapping _Coerce | 159 | mcCountryDartId
= lens _mcCountryDartId
(\ s a -> s{_mcCountryDartId = a})
. mapping _Coerce | 106 | true | true | 2 | 8 | 46 | 59 | 28 | 31 | null | null |
m3mitsuppe/haskell | exercises/d_type.hs | unlicense | -- f5 :: Int
f5 = length [1, 2, 3, 4, 5] | 40 | f5 = length [1, 2, 3, 4, 5] | 27 | f5 = length [1, 2, 3, 4, 5] | 27 | true | false | 1 | 5 | 11 | 28 | 15 | 13 | null | null |
Hodapp87/ivory | ivory-serialize/src/Ivory/Serialize/Safe/LittleEndian.hs | bsd-3-clause | unpackFrom :: (Packable a, ANat len)
=> ConstRef s1 (Array len (Stored Uint8)) -- ^ buf
-> Uint32 -- ^ offset
-> Ref s2 a -- ^ value
-> Ivory ('Effects r b (Scope s3)) ()
unpackFrom = unpackFrom' packRep | 247 | unpackFrom :: (Packable a, ANat len)
=> ConstRef s1 (Array len (Stored Uint8)) -- ^ buf
-> Uint32 -- ^ offset
-> Ref s2 a -- ^ value
-> Ivory ('Effects r b (Scope s3)) ()
unpackFrom = unpackFrom' packRep | 247 | unpackFrom = unpackFrom' packRep | 32 | false | true | 0 | 13 | 83 | 93 | 47 | 46 | null | null |
patrikja/testing-feat | Test/Feat/Class.hs | bsd-3-clause | hared :: (Sized f, Enumerable a, Typeable f) => Shareable f a
shared = access
| 79 | shared :: (Sized f, Enumerable a, Typeable f) => Shareable f a
shared = access | 78 | shared = access | 15 | false | true | 0 | 7 | 16 | 43 | 20 | 23 | null | null |
agrafix/hackage-server | Distribution/Server/Features/Search/SearchIndex.hs | bsd-3-clause | getDocTermIds :: SearchIndex key field feature -> DocId -> DocTermIds field
getDocTermIds SearchIndex{docIdMap} docid =
case docIdMap IntMap.! fromEnum docid of
DocInfo _ doctermids _ -> doctermids
--------------------
-- Insert & delete
--
-- Procedure for adding a new doc...
-- (key, field -> [Term])
-- a... | 1,112 | getDocTermIds :: SearchIndex key field feature -> DocId -> DocTermIds field
getDocTermIds SearchIndex{docIdMap} docid =
case docIdMap IntMap.! fromEnum docid of
DocInfo _ doctermids _ -> doctermids
--------------------
-- Insert & delete
--
-- Procedure for adding a new doc...
-- (key, field -> [Term])
-- a... | 1,112 | getDocTermIds SearchIndex{docIdMap} docid =
case docIdMap IntMap.! fromEnum docid of
DocInfo _ doctermids _ -> doctermids
--------------------
-- Insert & delete
--
-- Procedure for adding a new doc...
-- (key, field -> [Term])
-- alloc docid for key
-- add term occurences for docid (include rev map for ter... | 1,036 | false | true | 1 | 8 | 204 | 99 | 58 | 41 | null | null |
isomorphism/webgl | src/Graphics/Rendering/WebGL/Constants.hs | mit | gl_TEXTURE_COMPRESSION_HINT :: GLenum
gl_TEXTURE_COMPRESSION_HINT = 0x84EF | 74 | gl_TEXTURE_COMPRESSION_HINT :: GLenum
gl_TEXTURE_COMPRESSION_HINT = 0x84EF | 74 | gl_TEXTURE_COMPRESSION_HINT = 0x84EF | 36 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.