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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
shlevy/ghc | compiler/prelude/THNames.hs | bsd-3-clause | overlapsDataConName = thCon (fsLit "Overlaps") overlapsDataConKey | 73 | overlapsDataConName = thCon (fsLit "Overlaps") overlapsDataConKey | 73 | overlapsDataConName = thCon (fsLit "Overlaps") overlapsDataConKey | 73 | false | false | 0 | 7 | 13 | 17 | 8 | 9 | null | null |
beni55/LambdaHack | Game/LambdaHack/Common/ItemStrongest.hs | bsd-3-clause | totalRange :: Item -> Int
totalRange item = snd $ snd $ itemTrajectory item [] | 78 | totalRange :: Item -> Int
totalRange item = snd $ snd $ itemTrajectory item [] | 78 | totalRange item = snd $ snd $ itemTrajectory item [] | 52 | false | true | 0 | 7 | 14 | 33 | 16 | 17 | null | null |
alexander-at-github/eta | compiler/ETA/Utils/Serialized.hs | bsd-3-clause | deserializeWithData' :: forall a. Data a => [Word8] -> ([Word8], a)
deserializeWithData' bytes = deserializeConstr bytes $ \constr_rep bytes ->
gunfold (\(bytes, b_to_r) -> let (bytes', b) = deserializeWithData' bytes in (bytes', b_to_r b))
(\x -> (bytes... | 415 | deserializeWithData' :: forall a. Data a => [Word8] -> ([Word8], a)
deserializeWithData' bytes = deserializeConstr bytes $ \constr_rep bytes ->
gunfold (\(bytes, b_to_r) -> let (bytes', b) = deserializeWithData' bytes in (bytes', b_to_r b))
(\x -> (bytes... | 415 | deserializeWithData' bytes = deserializeConstr bytes $ \constr_rep bytes ->
gunfold (\(bytes, b_to_r) -> let (bytes', b) = deserializeWithData' bytes in (bytes', b_to_r b))
(\x -> (bytes, x))
(repConstr (dataTypeOf (u... | 347 | false | true | 0 | 14 | 146 | 141 | 77 | 64 | null | null |
jprider63/aeson-ios-0.8.0.2 | tests/Properties/Deprecated.hs | bsd-3-clause | regress_gh72 :: [(String, Maybe String)] -> Bool
regress_gh72 ys = G.decode (G.encode m) == Just m
where m = Map.fromList ys | 128 | regress_gh72 :: [(String, Maybe String)] -> Bool
regress_gh72 ys = G.decode (G.encode m) == Just m
where m = Map.fromList ys | 128 | regress_gh72 ys = G.decode (G.encode m) == Just m
where m = Map.fromList ys | 79 | false | true | 0 | 9 | 24 | 62 | 31 | 31 | null | null |
rueshyna/gogol | gogol-doubleclick-search/gen/Network/Google/Resource/DoubleClickSearch/SavedColumns/List.hs | mpl-2.0 | -- | DS ID of the advertiser.
sclAdvertiserId :: Lens' SavedColumnsList Int64
sclAdvertiserId
= lens _sclAdvertiserId
(\ s a -> s{_sclAdvertiserId = a})
. _Coerce | 176 | sclAdvertiserId :: Lens' SavedColumnsList Int64
sclAdvertiserId
= lens _sclAdvertiserId
(\ s a -> s{_sclAdvertiserId = a})
. _Coerce | 146 | sclAdvertiserId
= lens _sclAdvertiserId
(\ s a -> s{_sclAdvertiserId = a})
. _Coerce | 98 | true | true | 2 | 8 | 38 | 50 | 24 | 26 | null | null |
aristidb/GameOfLife | Test.hs | bsd-3-clause | printCoord :: Coord -> String
printCoord (Coord x y) = show x ++ "/" ++ show y | 78 | printCoord :: Coord -> String
printCoord (Coord x y) = show x ++ "/" ++ show y | 78 | printCoord (Coord x y) = show x ++ "/" ++ show y | 48 | false | true | 0 | 7 | 16 | 40 | 19 | 21 | null | null |
TK009/loyly | RemindHelpers.hs | mit | prettyRemindI :: Text -> WidgetT site IO ()
prettyRemindI txt = case T.words txt of
date : _ : _ : _ : _ : time : msg -> [whamlet|<i>#{date} #{time} - #{T.unwords msg}|]
_ -> [whamlet|error: no parse: #{txt}|]
-- | <li> entries for next reminders. | 256 | prettyRemindI :: Text -> WidgetT site IO ()
prettyRemindI txt = case T.words txt of
date : _ : _ : _ : _ : time : msg -> [whamlet|<i>#{date} #{time} - #{T.unwords msg}|]
_ -> [whamlet|error: no parse: #{txt}|]
-- | <li> entries for next reminders. | 256 | prettyRemindI txt = case T.words txt of
date : _ : _ : _ : _ : time : msg -> [whamlet|<i>#{date} #{time} - #{T.unwords msg}|]
_ -> [whamlet|error: no parse: #{txt}|]
-- | <li> entries for next reminders. | 212 | false | true | 0 | 13 | 55 | 81 | 44 | 37 | null | null |
joelburget/daily-typecheckers | src/Day19.hs | bsd-3-clause | eval :: Hoas -> Hoas
eval t = case t of
HBase _ -> t
HApp (HLam _ f) x -> f x
_ -> t | 90 | eval :: Hoas -> Hoas
eval t = case t of
HBase _ -> t
HApp (HLam _ f) x -> f x
_ -> t | 90 | eval t = case t of
HBase _ -> t
HApp (HLam _ f) x -> f x
_ -> t | 69 | false | true | 0 | 10 | 31 | 65 | 29 | 36 | null | null |
josejuan/rememe | Rememe/Business.hs | gpl-3.0 | updateUserInfo :: (PersistQuery m, PersistMonadBackend m ~ PersistEntityBackend User) => User -> BusinessRun m ()
updateUserInfo newUserInfo = do
ukey <- getUserKey
update ukey [ UserName =. userName newUserInfo ] | 219 | updateUserInfo :: (PersistQuery m, PersistMonadBackend m ~ PersistEntityBackend User) => User -> BusinessRun m ()
updateUserInfo newUserInfo = do
ukey <- getUserKey
update ukey [ UserName =. userName newUserInfo ] | 219 | updateUserInfo newUserInfo = do
ukey <- getUserKey
update ukey [ UserName =. userName newUserInfo ] | 105 | false | true | 0 | 10 | 35 | 73 | 34 | 39 | null | null |
mavenraven/github | samples/Repos/Forks/ListForks.hs | bsd-3-clause | main = do
possibleForks <- Github.forksFor "thoughtbot" "paperclip"
putStrLn $ either (("Error: "++) . show)
(intercalate "\n\n" . map formatFork)
possibleForks | 204 | main = do
possibleForks <- Github.forksFor "thoughtbot" "paperclip"
putStrLn $ either (("Error: "++) . show)
(intercalate "\n\n" . map formatFork)
possibleForks | 204 | main = do
possibleForks <- Github.forksFor "thoughtbot" "paperclip"
putStrLn $ either (("Error: "++) . show)
(intercalate "\n\n" . map formatFork)
possibleForks | 204 | false | false | 1 | 12 | 64 | 62 | 28 | 34 | null | null |
tmielcza/demiurge | test/Parse/Test.hs | apache-2.0 | parseSuite = testGroup "Parsing tests"
[
testGroup "Expression"
[
exprTest "A+B+C" "((A+B)+C)",
exprTest "A^B|C+D" "(A^(B|(C+D)))",
exprTest "A^B|C|D" "(A^((B|C)|D))",
exprTest "A^B|C^D" "((A^(B|C))^D)",
... | 4,339 | parseSuite = testGroup "Parsing tests"
[
testGroup "Expression"
[
exprTest "A+B+C" "((A+B)+C)",
exprTest "A^B|C+D" "(A^(B|(C+D)))",
exprTest "A^B|C|D" "(A^((B|C)|D))",
exprTest "A^B|C^D" "((A^(B|C))^D)",
... | 4,339 | parseSuite = testGroup "Parsing tests"
[
testGroup "Expression"
[
exprTest "A+B+C" "((A+B)+C)",
exprTest "A^B|C+D" "(A^(B|(C+D)))",
exprTest "A^B|C|D" "(A^((B|C)|D))",
exprTest "A^B|C^D" "((A^(B|C))^D)",
... | 4,339 | false | false | 0 | 9 | 1,821 | 482 | 241 | 241 | null | null |
projectorhq/haskell-liquid | test/Text/Liquid/ParserTests.hs | bsd-3-clause | --------------------------------------------------------------------------------
-- * VarIndexSection
--------------------------------------------------------------------------------
case_varIndexSection_1 = parseOnly varIndexSection "a" @?=
Right (ObjectIndex "a" :| []) | 274 | case_varIndexSection_1 = parseOnly varIndexSection "a" @?=
Right (ObjectIndex "a" :| []) | 90 | case_varIndexSection_1 = parseOnly varIndexSection "a" @?=
Right (ObjectIndex "a" :| []) | 90 | true | false | 1 | 7 | 18 | 37 | 17 | 20 | null | null |
AlexanderPankiv/ghc | compiler/nativeGen/X86/CodeGen.hs | bsd-3-clause | iselExpr64 (CmmMachOp (MO_UU_Conv _ W64) [expr]) = do
fn <- getAnyReg expr
r_dst_lo <- getNewRegNat II32
let r_dst_hi = getHiVRegFromLo r_dst_lo
code = fn r_dst_lo
return (
ChildCode64 (code `snocOL`
MOV II32 (OpImm (ImmInt 0)) (OpReg r_dst_hi))
... | 363 | iselExpr64 (CmmMachOp (MO_UU_Conv _ W64) [expr]) = do
fn <- getAnyReg expr
r_dst_lo <- getNewRegNat II32
let r_dst_hi = getHiVRegFromLo r_dst_lo
code = fn r_dst_lo
return (
ChildCode64 (code `snocOL`
MOV II32 (OpImm (ImmInt 0)) (OpReg r_dst_hi))
... | 363 | iselExpr64 (CmmMachOp (MO_UU_Conv _ W64) [expr]) = do
fn <- getAnyReg expr
r_dst_lo <- getNewRegNat II32
let r_dst_hi = getHiVRegFromLo r_dst_lo
code = fn r_dst_lo
return (
ChildCode64 (code `snocOL`
MOV II32 (OpImm (ImmInt 0)) (OpReg r_dst_hi))
... | 363 | false | false | 0 | 16 | 145 | 117 | 55 | 62 | null | null |
DougBurke/swish | tests/GraphTest.hs | lgpl-2.1 | p410 = LV "p410" | 17 | p410 = LV "p410" | 17 | p410 = LV "p410" | 17 | false | false | 1 | 5 | 4 | 12 | 4 | 8 | null | null |
takagi/SimulationDSL | SimulationDSL/SimulationDSL/Language/Equations.hs | bsd-3-clause | dependency _ _ (Constant _) = [] | 37 | dependency _ _ (Constant _) = [] | 37 | dependency _ _ (Constant _) = [] | 37 | false | false | 0 | 7 | 11 | 21 | 10 | 11 | null | null |
paul-rouse/persistent | persistent-sqlite/Database/Persist/Sqlite.hs | mit | -- | A convenience helper which creates a new database connection and runs the
-- given block, handling @MonadResource@ and @MonadLogger@ requirements. Note
-- that all log messages are discarded.
--
-- @since 2.6.2
runSqliteInfo :: (MonadUnliftIO m)
=> SqliteConnectionInfo
-> ReaderT SqlBac... | 556 | runSqliteInfo :: (MonadUnliftIO m)
=> SqliteConnectionInfo
-> ReaderT SqlBackend (NoLoggingT (ResourceT m)) a -- ^ database action
-> m a
runSqliteInfo conInfo = runResourceT
. runNoLoggingT
. withSqliteConnInfo conInfo
... | 340 | runSqliteInfo conInfo = runResourceT
. runNoLoggingT
. withSqliteConnInfo conInfo
. runSqlConn | 160 | true | true | 0 | 12 | 172 | 74 | 39 | 35 | null | null |
lukemaurer/sequent-core | src/Language/SequentCore/Inspect.hs | bsd-3-clause | install :: [CommandLineOption] -> [CoreToDo] -> CoreM [CoreToDo]
install cmdLine todos =
do reinitializeGlobals
let opts = parseOpts cmdLine
newPass = mkPass opts
todos' = case opt_where opts of
AtStart -> newPass : todos
AtEnd -> todos ++ [newPas... | 846 | install :: [CommandLineOption] -> [CoreToDo] -> CoreM [CoreToDo]
install cmdLine todos =
do reinitializeGlobals
let opts = parseOpts cmdLine
newPass = mkPass opts
todos' = case opt_where opts of
AtStart -> newPass : todos
AtEnd -> todos ++ [newPas... | 846 | install cmdLine todos =
do reinitializeGlobals
let opts = parseOpts cmdLine
newPass = mkPass opts
todos' = case opt_where opts of
AtStart -> newPass : todos
AtEnd -> todos ++ [newPass]
AtBoth -> newPass : todos ++ [newPass]
... | 781 | false | true | 1 | 15 | 268 | 232 | 112 | 120 | null | null |
romanb/amazonka | gen/src/Gen/AST.hs | mpl-2.0 | operation :: Abbrev
-> Protocol
-> Text
-> [NS]
-> HashSet Text
-> HashMap Text (Pager ())
-> Text
-> Input.Operation
-> State (HashMap Text Data) Operation
operation a proto base ns ss pgs n o = do
inp <- request (o ^. oInput)
out... | 2,422 | operation :: Abbrev
-> Protocol
-> Text
-> [NS]
-> HashSet Text
-> HashMap Text (Pager ())
-> Text
-> Input.Operation
-> State (HashMap Text Data) Operation
operation a proto base ns ss pgs n o = do
inp <- request (o ^. oInput)
out... | 2,422 | operation a proto base ns ss pgs n o = do
inp <- request (o ^. oInput)
out <- response (o ^. oOutput)
op inp out <$> pager inp out (Map.lookup n pgs)
where
op rq rs pg = Operation
{ _opName = n
, _opUrl = base <> n <> ".html"
, _opService = a
... | 2,185 | false | true | 14 | 17 | 1,031 | 878 | 417 | 461 | null | null |
ambiata/mafia | src/Mafia/Script.hs | bsd-3-clause | pPragma :: Text -> Atto.Parser a -> Atto.Parser a
pPragma pragma parser = do
_ <- Atto.string "{-#" *> Atto.skipSpace *> Atto.string pragma
x <- Atto.skipSpace *> parser <* Atto.skipSpace
_ <- Atto.string "#-}"
pure x | 225 | pPragma :: Text -> Atto.Parser a -> Atto.Parser a
pPragma pragma parser = do
_ <- Atto.string "{-#" *> Atto.skipSpace *> Atto.string pragma
x <- Atto.skipSpace *> parser <* Atto.skipSpace
_ <- Atto.string "#-}"
pure x | 225 | pPragma pragma parser = do
_ <- Atto.string "{-#" *> Atto.skipSpace *> Atto.string pragma
x <- Atto.skipSpace *> parser <* Atto.skipSpace
_ <- Atto.string "#-}"
pure x | 175 | false | true | 0 | 12 | 43 | 103 | 45 | 58 | null | null |
geophf/1HaskellADay | exercises/HAD/Y2017/M01/D12/Solution.hs | mit | {--
*Y2017.M01.D12.Solution> [minimumOr 314159, maximumOr 0] <*> [nada,soma] ~>
[314159,1,0,99]
--}
zumbo, jumbo :: Set Int
zumbo = Set.empty | 142 | zumbo, jumbo :: Set Int
zumbo = Set.empty | 41 | zumbo = Set.empty | 17 | true | true | 2 | 6 | 19 | 29 | 12 | 17 | null | null |
mudphone/HaskellBook | src/TwentyThree.hs | mit | fizzbuzzList :: [Integer] -> [String]
fizzbuzzList list = execState (mapM_ addResult list) [] | 93 | fizzbuzzList :: [Integer] -> [String]
fizzbuzzList list = execState (mapM_ addResult list) [] | 93 | fizzbuzzList list = execState (mapM_ addResult list) [] | 55 | false | true | 0 | 8 | 12 | 44 | 21 | 23 | null | null |
joeyadams/haskell-iocp | IOCP/PSQ.hs | bsd-3-clause | maxKey (Winner _ _ m) = m | 25 | maxKey (Winner _ _ m) = m | 25 | maxKey (Winner _ _ m) = m | 25 | false | false | 0 | 7 | 6 | 19 | 9 | 10 | null | null |
wdanilo/haskell-language-c | src/Language/C/Syntax/Constants.hs | bsd-3-clause | setFlag :: (Enum f) => f -> Flags f -> Flags f
setFlag flag (Flags k) = Flags$ k `setBit` fromEnum flag | 106 | setFlag :: (Enum f) => f -> Flags f -> Flags f
setFlag flag (Flags k) = Flags$ k `setBit` fromEnum flag | 106 | setFlag flag (Flags k) = Flags$ k `setBit` fromEnum flag | 59 | false | true | 0 | 11 | 24 | 62 | 30 | 32 | null | null |
brendanhay/gogol | gogol-logging/gen/Network/Google/Logging/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'ListExclusionsResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'lerNextPageToken'
--
-- * 'lerExclusions'
listExclusionsResponse
:: ListExclusionsResponse
listExclusionsResponse =
ListExclusionsR... | 388 | listExclusionsResponse
:: ListExclusionsResponse
listExclusionsResponse =
ListExclusionsResponse'
{_lerNextPageToken = Nothing, _lerExclusions = Nothing} | 163 | listExclusionsResponse =
ListExclusionsResponse'
{_lerNextPageToken = Nothing, _lerExclusions = Nothing} | 110 | true | true | 1 | 7 | 59 | 39 | 23 | 16 | null | null |
rahulmutt/ghcvm | tests/suite/codegen/run/RecursiveFib2.hs | bsd-3-clause | fibrecursive n presum sum = fibrecursive (n-1) sum (sum+presum) | 64 | fibrecursive n presum sum = fibrecursive (n-1) sum (sum+presum) | 64 | fibrecursive n presum sum = fibrecursive (n-1) sum (sum+presum) | 64 | false | false | 0 | 7 | 9 | 34 | 17 | 17 | null | null |
zepto-lang/zepto | src/Zepto/Types/Export.hs | gpl-2.0 | isSuffixOfBVec = B.isSuffixOf | 29 | isSuffixOfBVec = B.isSuffixOf | 29 | isSuffixOfBVec = B.isSuffixOf | 29 | false | false | 0 | 5 | 2 | 8 | 4 | 4 | null | null |
pparkkin/eta | compiler/ETA/Utils/OrdList.hs | bsd-3-clause | foldlOL k z (Two b1 b2) = foldlOL k (foldlOL k z b1) b2 | 55 | foldlOL k z (Two b1 b2) = foldlOL k (foldlOL k z b1) b2 | 55 | foldlOL k z (Two b1 b2) = foldlOL k (foldlOL k z b1) b2 | 55 | false | false | 0 | 7 | 13 | 41 | 18 | 23 | null | null |
fmapfmapfmap/amazonka | amazonka-sns/gen/Network/AWS/SNS/ConfirmSubscription.hs | mpl-2.0 | -- | The ARN of the created subscription.
csrsSubscriptionARN :: Lens' ConfirmSubscriptionResponse (Maybe Text)
csrsSubscriptionARN = lens _csrsSubscriptionARN (\ s a -> s{_csrsSubscriptionARN = a}) | 198 | csrsSubscriptionARN :: Lens' ConfirmSubscriptionResponse (Maybe Text)
csrsSubscriptionARN = lens _csrsSubscriptionARN (\ s a -> s{_csrsSubscriptionARN = a}) | 156 | csrsSubscriptionARN = lens _csrsSubscriptionARN (\ s a -> s{_csrsSubscriptionARN = a}) | 86 | true | true | 0 | 9 | 24 | 46 | 25 | 21 | null | null |
Saulzar/Ants | Ant/Square.hs | bsd-3-clause | foodFlag = 8 | 15 | foodFlag = 8 | 15 | foodFlag = 8 | 15 | false | false | 0 | 4 | 5 | 6 | 3 | 3 | null | null |
da-x/lamdu | bottlelib/Graphics/UI/Bottle/Widgets/TextEdit.hs | gpl-3.0 | makeDisplayStr _ str = str | 30 | makeDisplayStr _ str = str | 30 | makeDisplayStr _ str = str | 30 | false | false | 0 | 5 | 8 | 11 | 5 | 6 | null | null |
mcmaniac/ghc | compiler/llvmGen/Llvm/Types.hs | bsd-3-clause | getLit (LMUndefLit _ ) = "undef" | 35 | getLit (LMUndefLit _ ) = "undef" | 35 | getLit (LMUndefLit _ ) = "undef" | 35 | false | false | 0 | 7 | 8 | 15 | 7 | 8 | null | null |
andir/ganeti | src/Ganeti/WConfd/TempRes.hs | bsd-2-clause | -- | Embeds a state-modifying computation in a stateful monad.
modifyM :: (MonadState s m) => (s -> m s) -> m ()
modifyM f = get >>= f >>= put | 142 | modifyM :: (MonadState s m) => (s -> m s) -> m ()
modifyM f = get >>= f >>= put | 79 | modifyM f = get >>= f >>= put | 29 | true | true | 0 | 9 | 30 | 53 | 27 | 26 | null | null |
rueshyna/gogol | gogol-customsearch/gen/Network/Google/CustomSearch/Types/Product.hs | mpl-2.0 | rHTMLTitle :: Lens' Result (Maybe Text)
rHTMLTitle
= lens _rHTMLTitle (\ s a -> s{_rHTMLTitle = a}) | 101 | rHTMLTitle :: Lens' Result (Maybe Text)
rHTMLTitle
= lens _rHTMLTitle (\ s a -> s{_rHTMLTitle = a}) | 101 | rHTMLTitle
= lens _rHTMLTitle (\ s a -> s{_rHTMLTitle = a}) | 61 | false | true | 0 | 9 | 18 | 47 | 24 | 23 | null | null |
olorin/git-vogue | tests/unit.hs | bsd-3-clause | testLEDiscovery :: FilePath -> PluginDiscoverer IO -> Spec
testLEDiscovery fixtures PluginDiscoverer{..} = do
it "discovers plugins in the libexec dir" . withSetup $ do
ps <- discoverPlugins
fmap pluginName ps `shouldBe`
["(non-executable) ./plugins/git-vogue/non-executable"
... | 1,618 | testLEDiscovery :: FilePath -> PluginDiscoverer IO -> Spec
testLEDiscovery fixtures PluginDiscoverer{..} = do
it "discovers plugins in the libexec dir" . withSetup $ do
ps <- discoverPlugins
fmap pluginName ps `shouldBe`
["(non-executable) ./plugins/git-vogue/non-executable"
... | 1,618 | testLEDiscovery fixtures PluginDiscoverer{..} = do
it "discovers plugins in the libexec dir" . withSetup $ do
ps <- discoverPlugins
fmap pluginName ps `shouldBe`
["(non-executable) ./plugins/git-vogue/non-executable"
,"exploding"
,"failing"
,"succeedi... | 1,559 | false | true | 1 | 16 | 492 | 431 | 213 | 218 | null | null |
Numberartificial/workflow | snipets/src/Craft/Chapter17.hs | mit | -- Another definition of listSums which uses scanl1', a generalisation of the
-- original function.
listSums' = scanl' (+) 0 | 125 | listSums' = scanl' (+) 0 | 24 | listSums' = scanl' (+) 0 | 24 | true | false | 1 | 5 | 20 | 20 | 9 | 11 | null | null |
othercriteria/blaze | packaging/Math/Statistics/Inference/Blaze.hs | mit | zeroProb :: Prob
zeroProb = logFloat (0.0 :: Double) | 52 | zeroProb :: Prob
zeroProb = logFloat (0.0 :: Double) | 52 | zeroProb = logFloat (0.0 :: Double) | 35 | false | true | 0 | 6 | 8 | 20 | 11 | 9 | null | null |
rmcmaho/Haskell_OpenGL_Examples | TriSelect/TriSelect_Display.hs | gpl-3.0 | -- | Display callback
display :: TriObjectList -- ^ List of TriObject to display
-> IO ()
display objectList = do
myObjectList <- get objectList
preservingMatrix $ do
matrixMode $= Projection
loadIdentity
ortho2D (-175) 175 (-175) 175
matrixMode $= Modelview 0
clear [ColorBuffer]
... | 642 | display :: TriObjectList -- ^ List of TriObject to display
-> IO ()
display objectList = do
myObjectList <- get objectList
preservingMatrix $ do
matrixMode $= Projection
loadIdentity
ortho2D (-175) 175 (-175) 175
matrixMode $= Modelview 0
clear [ColorBuffer]
scale zoom zoom zoom
... | 620 | display objectList = do
myObjectList <- get objectList
preservingMatrix $ do
matrixMode $= Projection
loadIdentity
ortho2D (-175) 175 (-175) 175
matrixMode $= Modelview 0
clear [ColorBuffer]
scale zoom zoom zoom
rotate zRotation $ Vector3 0 0 (1::GLfloat)
render Render myObjectList
... | 541 | true | true | 0 | 12 | 144 | 142 | 65 | 77 | null | null |
dmwit/pi-eta-epsilon | src/Language/PiEtaEpsilon/Parser/Value.hs | bsd-3-clause | toP :: (Particle a) => Value -> a
toP (Fix ( Tuple x y)) = tuple (toP x) (toP y) | 81 | toP :: (Particle a) => Value -> a
toP (Fix ( Tuple x y)) = tuple (toP x) (toP y) | 81 | toP (Fix ( Tuple x y)) = tuple (toP x) (toP y) | 47 | false | true | 0 | 9 | 20 | 58 | 29 | 29 | null | null |
romanb/amazonka | amazonka-dynamodb/gen/Network/AWS/DynamoDB/PutItem.hs | mpl-2.0 | piReturnConsumedCapacity :: Lens' PutItem (Maybe ReturnConsumedCapacity)
piReturnConsumedCapacity =
lens _piReturnConsumedCapacity
(\s a -> s { _piReturnConsumedCapacity = a }) | 188 | piReturnConsumedCapacity :: Lens' PutItem (Maybe ReturnConsumedCapacity)
piReturnConsumedCapacity =
lens _piReturnConsumedCapacity
(\s a -> s { _piReturnConsumedCapacity = a }) | 188 | piReturnConsumedCapacity =
lens _piReturnConsumedCapacity
(\s a -> s { _piReturnConsumedCapacity = a }) | 115 | false | true | 0 | 9 | 30 | 45 | 24 | 21 | null | null |
ideas-edu/ideas | src/Ideas/Common/Rewriting/Unification.hs | apache-2.0 | products :: [[Substitution]] -> [Substitution]
products = foldr op [emptySubst]
where
op xs ys = catMaybes [ x @+@ y | x <- xs, y <- ys ] | 144 | products :: [[Substitution]] -> [Substitution]
products = foldr op [emptySubst]
where
op xs ys = catMaybes [ x @+@ y | x <- xs, y <- ys ] | 143 | products = foldr op [emptySubst]
where
op xs ys = catMaybes [ x @+@ y | x <- xs, y <- ys ] | 96 | false | true | 1 | 8 | 34 | 81 | 38 | 43 | null | null |
DavidAlphaFox/ghc | compiler/basicTypes/BasicTypes.hs | bsd-3-clause | isOneOcc :: OccInfo -> Bool
isOneOcc (OneOcc {}) = True | 55 | isOneOcc :: OccInfo -> Bool
isOneOcc (OneOcc {}) = True | 55 | isOneOcc (OneOcc {}) = True | 27 | false | true | 0 | 7 | 9 | 25 | 13 | 12 | null | null |
olsner/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | integerToIntName = varQual gHC_INTEGER_TYPE (fsLit "integerToInt") integerToIntIdKey | 94 | integerToIntName = varQual gHC_INTEGER_TYPE (fsLit "integerToInt") integerToIntIdKey | 94 | integerToIntName = varQual gHC_INTEGER_TYPE (fsLit "integerToInt") integerToIntIdKey | 94 | false | false | 0 | 7 | 16 | 19 | 9 | 10 | null | null |
xmonad/xmonad-contrib | XMonad/Hooks/Place.hs | bsd-3-clause | screenInfo :: S.Screen i l a sid ScreenDetail -> (S.Workspace i l a, Rectangle)
screenInfo S.Screen{ S.workspace = ws, S.screenDetail = (SD s)} = (ws, s) | 153 | screenInfo :: S.Screen i l a sid ScreenDetail -> (S.Workspace i l a, Rectangle)
screenInfo S.Screen{ S.workspace = ws, S.screenDetail = (SD s)} = (ws, s) | 153 | screenInfo S.Screen{ S.workspace = ws, S.screenDetail = (SD s)} = (ws, s) | 73 | false | true | 3 | 10 | 25 | 83 | 42 | 41 | null | null |
Helkafen/cabal | cabal-install/Distribution/Client/Dependency/Modular/Preference.hs | bsd-3-clause | -- | Traversal that tries to establish various kinds of user constraints. Works
-- by selectively disabling choices that have been ruled out by global user
-- constraints.
enforcePackageConstraints :: M.Map PN [PackageConstraint] -> Tree QGoalReasonChain -> Tree QGoalReasonChain
enforcePackageConstraints pcs = trav go
... | 1,794 | enforcePackageConstraints :: M.Map PN [PackageConstraint] -> Tree QGoalReasonChain -> Tree QGoalReasonChain
enforcePackageConstraints pcs = trav go
where
go (PChoiceF qpn@(Q _ pn) gr ts) =
let c = toConflictSet (Goal (P qpn) gr)
-- compose the transformation functions for each o... | 1,622 | enforcePackageConstraints pcs = trav go
where
go (PChoiceF qpn@(Q _ pn) gr ts) =
let c = toConflictSet (Goal (P qpn) gr)
-- compose the transformation functions for each of the relevant constraint
g = \ (POption i _) -> foldl (\ h pc -> h . processPackageConstraintP ... | 1,514 | true | true | 0 | 14 | 512 | 497 | 252 | 245 | null | null |
nevrenato/Hets_Fork | GUI/GraphAbstraction.hs | gpl-2.0 | applyChanges' :: AbstractionGraph -- ^ The graph
-> [DGChange] -- ^ List of changes
-> [NodeId] -- ^ IDs of the nodes to hide
-> [EdgeId] -- ^ IDs of the edges to hide
-> [(NodeId, NodeId, DGEdgeType, Bool)] -- ^ A list of new edges
-> IO Abstraction... | 3,020 | applyChanges' :: AbstractionGraph -- ^ The graph
-> [DGChange] -- ^ List of changes
-> [NodeId] -- ^ IDs of the nodes to hide
-> [EdgeId] -- ^ IDs of the edges to hide
-> [(NodeId, NodeId, DGEdgeType, Bool)] -- ^ A list of new edges
-> IO Abstraction... | 3,020 | applyChanges' g dgchanges hnIds heIds' ce = do
let
-- split and convert changes
(an', dn, cnt', ae', de) = foldr splitChange ([], [], [], [], []) dgchanges
-- get Ids
anIds = map (\ ~(AddNode nId _ _ _) -> nId) an'
dnIds = map (\ ~(DelNode nId) -> nId) dn
aeIds = map (\ ~(AddEdge eId _ _ _ _ _... | 2,694 | false | true | 0 | 23 | 971 | 1,061 | 551 | 510 | null | null |
paulolieuthier/haskell-concurrent-lists | src/CoarseGrained.hs | lgpl-2.1 | toPureList :: Eq a => CoarseGrainedList a -> IO [a]
toPureList (CoarseGrainedList mvar) =
let
go prevPtr xs = do
prevNode <- readIORef prevPtr
let currPtr = next prevNode
currNode <- readIORef currPtr
case currNode of
Node { val = ... | 454 | toPureList :: Eq a => CoarseGrainedList a -> IO [a]
toPureList (CoarseGrainedList mvar) =
let
go prevPtr xs = do
prevNode <- readIORef prevPtr
let currPtr = next prevNode
currNode <- readIORef currPtr
case currNode of
Node { val = ... | 454 | toPureList (CoarseGrainedList mvar) =
let
go prevPtr xs = do
prevNode <- readIORef prevPtr
let currPtr = next prevNode
currNode <- readIORef currPtr
case currNode of
Node { val = val, next = nextNode } -> go currPtr (val:xs)
... | 402 | false | true | 2 | 16 | 173 | 167 | 77 | 90 | null | null |
liskin/strive | library/Strive/Internal/TH.hs | mit | capitalize :: String -> String
capitalize "" = "" | 49 | capitalize :: String -> String
capitalize "" = "" | 49 | capitalize "" = "" | 18 | false | true | 0 | 5 | 8 | 18 | 9 | 9 | null | null |
iquiw/hsbin | src/Hsbin/Routine.hs | mit | filterContents :: [String] -> FilePath -> IO [FilePath]
filterContents names dir = map (dir </>)
<$> filter (`notElem` ([".", ".."] ++ names))
<$> getDirectoryContents dir | 225 | filterContents :: [String] -> FilePath -> IO [FilePath]
filterContents names dir = map (dir </>)
<$> filter (`notElem` ([".", ".."] ++ names))
<$> getDirectoryContents dir | 225 | filterContents names dir = map (dir </>)
<$> filter (`notElem` ([".", ".."] ++ names))
<$> getDirectoryContents dir | 169 | false | true | 0 | 11 | 78 | 73 | 40 | 33 | null | null |
tjakway/ghcjvm | compiler/cmm/CLabel.hs | bsd-3-clause | pprCLbl (CC_Label cc) = ppr cc | 40 | pprCLbl (CC_Label cc) = ppr cc | 40 | pprCLbl (CC_Label cc) = ppr cc | 40 | false | false | 0 | 6 | 15 | 19 | 8 | 11 | null | null |
mdsteele/fallback | src/Fallback/Draw/Base.hs | gpl-3.0 | alterMinimap :: Minimap -> [(IPoint, Color)] -> IO ()
alterMinimap (Minimap texture) pixels = withTexture texture $ do
allocaBytes 4 $ \pixelPtr -> do
pokeElemOff pixelPtr 3 255
forM_ pixels $ \(Point x y, Color r g b) -> do
pokeElemOff pixelPtr 0 r
pokeElemOff pixelPtr 1 g
pokeElemOff pixel... | 525 | alterMinimap :: Minimap -> [(IPoint, Color)] -> IO ()
alterMinimap (Minimap texture) pixels = withTexture texture $ do
allocaBytes 4 $ \pixelPtr -> do
pokeElemOff pixelPtr 3 255
forM_ pixels $ \(Point x y, Color r g b) -> do
pokeElemOff pixelPtr 0 r
pokeElemOff pixelPtr 1 g
pokeElemOff pixel... | 525 | alterMinimap (Minimap texture) pixels = withTexture texture $ do
allocaBytes 4 $ \pixelPtr -> do
pokeElemOff pixelPtr 3 255
forM_ pixels $ \(Point x y, Color r g b) -> do
pokeElemOff pixelPtr 0 r
pokeElemOff pixelPtr 1 g
pokeElemOff pixelPtr 2 b
GL.texSubImage2D Nothing 0 (GL.TexturePo... | 471 | false | true | 0 | 20 | 118 | 204 | 97 | 107 | null | null |
mmn80/feed-reader | src/FeedReader/Types.hs | bsd-3-clause | unpack :: Text -> String
unpack = T.unpack . unText | 51 | unpack :: Text -> String
unpack = T.unpack . unText | 51 | unpack = T.unpack . unText | 26 | false | true | 0 | 6 | 9 | 21 | 11 | 10 | null | null |
mrmonday/Idris-dev | src/Idris/Primitives.hs | bsd-3-clause | zext ITNative to [I x] = Just $ toInt to (fromIntegral x :: Word) | 65 | zext ITNative to [I x] = Just $ toInt to (fromIntegral x :: Word) | 65 | zext ITNative to [I x] = Just $ toInt to (fromIntegral x :: Word) | 65 | false | false | 0 | 8 | 13 | 37 | 18 | 19 | null | null |
fmthoma/ghc | compiler/coreSyn/CoreUtils.hs | bsd-3-clause | mergeAlts :: [(AltCon, a, b)] -> [(AltCon, a, b)] -> [(AltCon, a, b)]
-- ^ Merge alternatives preserving order; alternatives in
-- the first argument shadow ones in the second
mergeAlts [] as2 = as2 | 198 | mergeAlts :: [(AltCon, a, b)] -> [(AltCon, a, b)] -> [(AltCon, a, b)]
mergeAlts [] as2 = as2 | 92 | mergeAlts [] as2 = as2 | 22 | true | true | 0 | 10 | 34 | 70 | 40 | 30 | null | null |
abooij/cubicaltt | Resolver.hs | mit | resolveExp :: Exp -> Resolver Ter
resolveExp e = case e of
U -> return CTT.U
Var x -> resolveVar x
App t s -> resolveApps x xs
where (x,xs) = unApps t [s]
Sigma ptele b -> do
tele <- flattenPTele ptele
binds CTT.Sigma tele (resolveExp b)
Pi ptele b -> do
tele <- fl... | 1,875 | resolveExp :: Exp -> Resolver Ter
resolveExp e = case e of
U -> return CTT.U
Var x -> resolveVar x
App t s -> resolveApps x xs
where (x,xs) = unApps t [s]
Sigma ptele b -> do
tele <- flattenPTele ptele
binds CTT.Sigma tele (resolveExp b)
Pi ptele b -> do
tele <- fl... | 1,875 | resolveExp e = case e of
U -> return CTT.U
Var x -> resolveVar x
App t s -> resolveApps x xs
where (x,xs) = unApps t [s]
Sigma ptele b -> do
tele <- flattenPTele ptele
binds CTT.Sigma tele (resolveExp b)
Pi ptele b -> do
tele <- flattenPTele ptele
binds CTT.Pi ... | 1,841 | false | true | 0 | 18 | 541 | 809 | 367 | 442 | null | null |
brendanhay/gogol | gogol-securitycenter/gen/Network/Google/SecurityCenter/Types/Product.hs | mpl-2.0 | -- | Optional. String indicating the location of the expression for error
-- reporting, e.g. a file name and a position in the file.
eLocation :: Lens' Expr (Maybe Text)
eLocation
= lens _eLocation (\ s a -> s{_eLocation = a}) | 228 | eLocation :: Lens' Expr (Maybe Text)
eLocation
= lens _eLocation (\ s a -> s{_eLocation = a}) | 95 | eLocation
= lens _eLocation (\ s a -> s{_eLocation = a}) | 58 | true | true | 0 | 9 | 42 | 49 | 26 | 23 | null | null |
BioHaskell/hRosetta | tests/test_Restraints.hs | bsd-3-clause | pairs (b:c:cs) = (b,c):pairs (c:cs) | 35 | pairs (b:c:cs) = (b,c):pairs (c:cs) | 35 | pairs (b:c:cs) = (b,c):pairs (c:cs) | 35 | false | false | 0 | 8 | 4 | 40 | 21 | 19 | null | null |
li-zhirui/EoplLangs | src/InferredLang/TypeChecker.hs | bsd-3-clause | typeOfLetExpr :: [(String, Expression)] -> Expression -> TypeEnvironment
-> TypeResult
typeOfLetExpr binds body tenv = do
typeBinds <- foldr func (return []) binds
typeOf body (extendMany typeBinds tenv)
where
func (name, expr) acc = do
typ <- typeOf expr tenv
typeBinds <- acc
... | 352 | typeOfLetExpr :: [(String, Expression)] -> Expression -> TypeEnvironment
-> TypeResult
typeOfLetExpr binds body tenv = do
typeBinds <- foldr func (return []) binds
typeOf body (extendMany typeBinds tenv)
where
func (name, expr) acc = do
typ <- typeOf expr tenv
typeBinds <- acc
... | 352 | typeOfLetExpr binds body tenv = do
typeBinds <- foldr func (return []) binds
typeOf body (extendMany typeBinds tenv)
where
func (name, expr) acc = do
typ <- typeOf expr tenv
typeBinds <- acc
return $ (name, typ) : typeBinds | 251 | false | true | 1 | 11 | 90 | 142 | 66 | 76 | null | null |
olorin/amazonka | amazonka-ec2/gen/Network/AWS/EC2/Types/Product.hs | mpl-2.0 | -- | Indicates whether the volume is deleted on instance termination.
eibdDeleteOnTermination :: Lens' EBSInstanceBlockDevice (Maybe Bool)
eibdDeleteOnTermination = lens _eibdDeleteOnTermination (\ s a -> s{_eibdDeleteOnTermination = a}) | 237 | eibdDeleteOnTermination :: Lens' EBSInstanceBlockDevice (Maybe Bool)
eibdDeleteOnTermination = lens _eibdDeleteOnTermination (\ s a -> s{_eibdDeleteOnTermination = a}) | 167 | eibdDeleteOnTermination = lens _eibdDeleteOnTermination (\ s a -> s{_eibdDeleteOnTermination = a}) | 98 | true | true | 0 | 9 | 27 | 46 | 25 | 21 | null | null |
mrakgr/futhark | src/Futhark/CodeGen/ImpGen/Kernels/ToOpenCL.hs | bsd-3-clause | kernelArgs (AnyKernel kernel) =
map (SharedMemoryArg . memSizeToExp . localMemorySize)
(kernelLocalMemory kernel) ++
map useToArg (kernelUses kernel)
where localMemorySize (_, size, _) = size | 203 | kernelArgs (AnyKernel kernel) =
map (SharedMemoryArg . memSizeToExp . localMemorySize)
(kernelLocalMemory kernel) ++
map useToArg (kernelUses kernel)
where localMemorySize (_, size, _) = size | 203 | kernelArgs (AnyKernel kernel) =
map (SharedMemoryArg . memSizeToExp . localMemorySize)
(kernelLocalMemory kernel) ++
map useToArg (kernelUses kernel)
where localMemorySize (_, size, _) = size | 203 | false | false | 2 | 7 | 35 | 78 | 36 | 42 | null | null |
cchalmers/geometry | src/Geometry/TwoD/Size.hs | bsd-3-clause | -- | Make a 'SizeSpec' with only height defined.
mkHeight :: Num n => n -> SizeSpec V2 n
mkHeight h = dims (V2 0 h) | 115 | mkHeight :: Num n => n -> SizeSpec V2 n
mkHeight h = dims (V2 0 h) | 66 | mkHeight h = dims (V2 0 h) | 26 | true | true | 0 | 7 | 25 | 42 | 20 | 22 | null | null |
greenrd/wpfixcites | src/Text/Mediawiki/Wikipedia.hs | bsd-3-clause | handleMixedContent :: [LocatedTree] -> Maybe (Path, String)
handleMixedContent [LocatedTree { path, tree = NTree (XText s) _ }] = Just (path, s) | 144 | handleMixedContent :: [LocatedTree] -> Maybe (Path, String)
handleMixedContent [LocatedTree { path, tree = NTree (XText s) _ }] = Just (path, s) | 144 | handleMixedContent [LocatedTree { path, tree = NTree (XText s) _ }] = Just (path, s) | 84 | false | true | 4 | 8 | 21 | 67 | 36 | 31 | null | null |
luzhuomi/cpp-obs | Language/C/Obfuscate/ASTUtils.hs | apache-2.0 | isVoidDeclSpec _ = False | 24 | isVoidDeclSpec _ = False | 24 | isVoidDeclSpec _ = False | 24 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
juodaspaulius/clafer | src/Language/Clafer/Generator/Graph.hs | mit | graphCVLCard (CardSome _) _ _ = "1..*" | 40 | graphCVLCard (CardSome _) _ _ = "1..*" | 40 | graphCVLCard (CardSome _) _ _ = "1..*" | 40 | false | false | 0 | 7 | 8 | 19 | 9 | 10 | null | null |
snoyberg/ghc | libraries/compact/tests/compact_simple_array.hs | bsd-3-clause | assertEquals :: (Eq a, Show a) => a -> a -> IO ()
assertEquals expected actual =
if expected == actual then return ()
else assertFail $ "expected " ++ (show expected)
++ ", got " ++ (show actual) | 206 | assertEquals :: (Eq a, Show a) => a -> a -> IO ()
assertEquals expected actual =
if expected == actual then return ()
else assertFail $ "expected " ++ (show expected)
++ ", got " ++ (show actual) | 206 | assertEquals expected actual =
if expected == actual then return ()
else assertFail $ "expected " ++ (show expected)
++ ", got " ++ (show actual) | 156 | false | true | 0 | 10 | 49 | 89 | 45 | 44 | null | null |
karamellpelle/grid | designer/source/LevelTools/Helpers.hs | gpl-3.0 | editModifyGrid edit f =
edit { editGrid = f (editGrid edit) } | 65 | editModifyGrid edit f =
edit { editGrid = f (editGrid edit) } | 65 | editModifyGrid edit f =
edit { editGrid = f (editGrid edit) } | 65 | false | false | 0 | 9 | 15 | 28 | 14 | 14 | null | null |
nbloomf/st-haskell | src/STH/Lib/Read/IntSet.hs | gpl-3.0 | readIntSet :: String -> Maybe (Int -> Bool)
readIntSet xs = do
cs <- readIntSet' xs
return (\k -> inIntSet k cs) | 116 | readIntSet :: String -> Maybe (Int -> Bool)
readIntSet xs = do
cs <- readIntSet' xs
return (\k -> inIntSet k cs) | 116 | readIntSet xs = do
cs <- readIntSet' xs
return (\k -> inIntSet k cs) | 72 | false | true | 0 | 10 | 25 | 57 | 27 | 30 | null | null |
GaloisInc/elf | src/Data/ElfEdit/Types.hs | bsd-3-clause | -- | Return the header information about the elf
elfHeader :: Elf w -> ElfHeader w
elfHeader e = ElfHeader { headerData = elfData e
, headerClass = elfClass e
, headerOSABI = elfOSABI e
, headerABIVersion = elfABIVersion e
... | 561 | elfHeader :: Elf w -> ElfHeader w
elfHeader e = ElfHeader { headerData = elfData e
, headerClass = elfClass e
, headerOSABI = elfOSABI e
, headerABIVersion = elfABIVersion e
, headerType = elfType e
... | 512 | elfHeader e = ElfHeader { headerData = elfData e
, headerClass = elfClass e
, headerOSABI = elfOSABI e
, headerABIVersion = elfABIVersion e
, headerType = elfType e
, headerMachi... | 478 | true | true | 0 | 7 | 287 | 99 | 53 | 46 | null | null |
sarangj/eulerhs | src/Problems/Problem10.hs | bsd-3-clause | getSolution :: Int
getSolution = sum $ filter isPrime [1 .. 2000000] | 69 | getSolution :: Int
getSolution = sum $ filter isPrime [1 .. 2000000] | 68 | getSolution = sum $ filter isPrime [1 .. 2000000] | 49 | false | true | 0 | 7 | 12 | 26 | 14 | 12 | null | null |
TOSPIO/yi | src/library/Yi/Buffer/Region.hs | gpl-2.0 | -- | Extend the right bound of a region to include it.
inclusiveRegionB :: Region -> BufferM Region
inclusiveRegionB r =
if regionStart r <= regionEnd r
then mkRegion (regionStart r) <$> pointAfterCursorB (regionEnd r)
else mkRegion <$> pointAfterCursorB (regionStart r) <*> pure (r... | 331 | inclusiveRegionB :: Region -> BufferM Region
inclusiveRegionB r =
if regionStart r <= regionEnd r
then mkRegion (regionStart r) <$> pointAfterCursorB (regionEnd r)
else mkRegion <$> pointAfterCursorB (regionStart r) <*> pure (regionEnd r) | 276 | inclusiveRegionB r =
if regionStart r <= regionEnd r
then mkRegion (regionStart r) <$> pointAfterCursorB (regionEnd r)
else mkRegion <$> pointAfterCursorB (regionStart r) <*> pure (regionEnd r) | 231 | true | true | 0 | 10 | 82 | 88 | 42 | 46 | null | null |
sjfloat/dnngraph | NN/Backend/Torch/Flat.hs | bsd-3-clause | flatten' :: Net -> Maybe (Flat LayerParameter)
flatten' gr = do
flattened <- flattenStructure gr
return $ (lab' . context gr) <$> flattened | 143 | flatten' :: Net -> Maybe (Flat LayerParameter)
flatten' gr = do
flattened <- flattenStructure gr
return $ (lab' . context gr) <$> flattened | 143 | flatten' gr = do
flattened <- flattenStructure gr
return $ (lab' . context gr) <$> flattened | 96 | false | true | 0 | 11 | 26 | 58 | 27 | 31 | null | null |
Booster2/Booster2 | Workflow_Precond/impl_nondisjoint/Workflows.hs | bsd-3-clause | exParWf6 = Par [exSeqWfSingle12,exSeqWfMixed21] | 50 | exParWf6 = Par [exSeqWfSingle12,exSeqWfMixed21] | 50 | exParWf6 = Par [exSeqWfSingle12,exSeqWfMixed21] | 50 | false | false | 0 | 6 | 6 | 15 | 8 | 7 | null | null |
kadena-io/pact | src-ghc/Pact/GasModel/GasTests.hs | bsd-3-clause | intToStrTests :: NativeDefName -> GasUnitTests
intToStrTests = defGasUnitTests allExprs
where
int2strExpr (valInt,baseInt) =
defPactExpression [text| (int-to-str $base $val) |]
where base = intToStr baseInt
val = intToStr valInt
baseList :: NonEmpty Integer
baseList = 64 :| [2..16... | 570 | intToStrTests :: NativeDefName -> GasUnitTests
intToStrTests = defGasUnitTests allExprs
where
int2strExpr (valInt,baseInt) =
defPactExpression [text| (int-to-str $base $val) |]
where base = intToStr baseInt
val = intToStr valInt
baseList :: NonEmpty Integer
baseList = 64 :| [2..16... | 570 | intToStrTests = defGasUnitTests allExprs
where
int2strExpr (valInt,baseInt) =
defPactExpression [text| (int-to-str $base $val) |]
where base = intToStr baseInt
val = intToStr valInt
baseList :: NonEmpty Integer
baseList = 64 :| [2..16]
-- TODO is foldr1 the best thing to do he... | 523 | false | true | 3 | 12 | 133 | 163 | 87 | 76 | null | null |
ComputationWithBoundedResources/tct-trs | src/Tct/Trs/Data/Rewriting.hs | bsd-3-clause | toPairs :: [CP f v v] -> [(Term f (Either v v), Term f (Either v v))]
toPairs = map (left &&& right) | 100 | toPairs :: [CP f v v] -> [(Term f (Either v v), Term f (Either v v))]
toPairs = map (left &&& right) | 100 | toPairs = map (left &&& right) | 30 | false | true | 0 | 10 | 22 | 70 | 36 | 34 | null | null |
olsner/ghc | compiler/nativeGen/SPARC/CodeGen.hs | bsd-3-clause | generateJumpTableForInstr :: DynFlags -> Instr
-> Maybe (NatCmmDecl CmmStatics Instr)
generateJumpTableForInstr dflags (JMP_TBL _ ids label) =
let jumpTable = map (jumpTableEntry dflags) ids
in Just (CmmData (Section ReadOnlyData label) (Statics label jumpTable)) | 293 | generateJumpTableForInstr :: DynFlags -> Instr
-> Maybe (NatCmmDecl CmmStatics Instr)
generateJumpTableForInstr dflags (JMP_TBL _ ids label) =
let jumpTable = map (jumpTableEntry dflags) ids
in Just (CmmData (Section ReadOnlyData label) (Statics label jumpTable)) | 293 | generateJumpTableForInstr dflags (JMP_TBL _ ids label) =
let jumpTable = map (jumpTableEntry dflags) ids
in Just (CmmData (Section ReadOnlyData label) (Statics label jumpTable)) | 181 | false | true | 0 | 11 | 62 | 94 | 45 | 49 | null | null |
stefan-j/ProjectEuler | q57.hs | mit | toIntegerList :: Integer -> [Integer]
toIntegerList n = map toInt (show n)
where toInt c = read (c:"") :: Integer | 116 | toIntegerList :: Integer -> [Integer]
toIntegerList n = map toInt (show n)
where toInt c = read (c:"") :: Integer | 115 | toIntegerList n = map toInt (show n)
where toInt c = read (c:"") :: Integer | 77 | false | true | 0 | 7 | 22 | 56 | 28 | 28 | null | null |
mfpi/OpenGL | Graphics/Rendering/OpenGL/GL/Evaluators.hs | bsd-3-clause | evalMesh2 :: PolygonMode -> (GLint, GLint) -> (GLint, GLint) -> IO ()
evalMesh2 m (p1, p2) (q1, q2) = glEvalMesh2 (marshalPolygonMode m) p1 p2 q1 q2 | 148 | evalMesh2 :: PolygonMode -> (GLint, GLint) -> (GLint, GLint) -> IO ()
evalMesh2 m (p1, p2) (q1, q2) = glEvalMesh2 (marshalPolygonMode m) p1 p2 q1 q2 | 148 | evalMesh2 m (p1, p2) (q1, q2) = glEvalMesh2 (marshalPolygonMode m) p1 p2 q1 q2 | 78 | false | true | 0 | 9 | 25 | 76 | 41 | 35 | null | null |
Peaker/keyvaluehash | src/Database/KeyValueHash.hs | bsd-3-clause | deleteKey :: Database -> Key -> IO ()
deleteKey db key = do
mResult <- findKey db key
case mResult of
Just (valuePtrRef, valueHeader) ->
-- The old value now becomes unreachable
vprSet valuePtrRef $ vhNextCollision valueHeader
Nothing ->
-- TODO: Throw exception?
return () | 309 | deleteKey :: Database -> Key -> IO ()
deleteKey db key = do
mResult <- findKey db key
case mResult of
Just (valuePtrRef, valueHeader) ->
-- The old value now becomes unreachable
vprSet valuePtrRef $ vhNextCollision valueHeader
Nothing ->
-- TODO: Throw exception?
return () | 309 | deleteKey db key = do
mResult <- findKey db key
case mResult of
Just (valuePtrRef, valueHeader) ->
-- The old value now becomes unreachable
vprSet valuePtrRef $ vhNextCollision valueHeader
Nothing ->
-- TODO: Throw exception?
return () | 271 | false | true | 0 | 12 | 80 | 91 | 42 | 49 | null | null |
ktvoelker/auth-proxy | src/Session.hs | bsd-3-clause | setCookie :: Config.T -> T -> IO Header
setCookie c session = do
bytes <- CS.encryptIO (view Config.authKey c) . toStrict $ encode session
return
$ ( "Set-Cookie"
, toStrict
. toLazyByteString
. renderSetCookie
$ def
{ setCookieName = view Config.authCookie c
, ... | 436 | setCookie :: Config.T -> T -> IO Header
setCookie c session = do
bytes <- CS.encryptIO (view Config.authKey c) . toStrict $ encode session
return
$ ( "Set-Cookie"
, toStrict
. toLazyByteString
. renderSetCookie
$ def
{ setCookieName = view Config.authCookie c
, ... | 436 | setCookie c session = do
bytes <- CS.encryptIO (view Config.authKey c) . toStrict $ encode session
return
$ ( "Set-Cookie"
, toStrict
. toLazyByteString
. renderSetCookie
$ def
{ setCookieName = view Config.authCookie c
, setCookieValue = bytes
, setCo... | 396 | false | true | 0 | 13 | 150 | 123 | 63 | 60 | null | null |
Daniel-Diaz/binary-list | Data/BinaryList/Serialize.hs | bsd-3-clause | - | Decode a binary list using the 'Binary' instance of
-- its elements. It returns a 'String' in case of
-- decoding failure.
decode :: Binary a => ByteString -> Either String (BinList a)
decode input = encodedFromByteString input >>= fromDecoded . decData . decodeBinList get
| 282 | decode :: Binary a => ByteString -> Either String (BinList a)
decode input = encodedFromByteString input >>= fromDecoded . decData . decodeBinList get | 150 | decode input = encodedFromByteString input >>= fromDecoded . decData . decodeBinList get | 88 | true | true | 1 | 9 | 51 | 65 | 35 | 30 | null | null |
fhaust/aer-utils | src/VanRossumError.hs | mit | errFun :: S.Vector (V4 Double) -> V3 Double -> Double
errFun gs (V3 x y z) = S.sum $ S.map (\(V4 a b c d) -> gauss (V4 a (x-b) (y-c) (z-d))) gs | 143 | errFun :: S.Vector (V4 Double) -> V3 Double -> Double
errFun gs (V3 x y z) = S.sum $ S.map (\(V4 a b c d) -> gauss (V4 a (x-b) (y-c) (z-d))) gs | 143 | errFun gs (V3 x y z) = S.sum $ S.map (\(V4 a b c d) -> gauss (V4 a (x-b) (y-c) (z-d))) gs | 89 | false | true | 0 | 13 | 32 | 122 | 60 | 62 | null | null |
frontrowed/stratosphere | library-gen/Stratosphere/ResourceProperties/S3BucketReplicationRule.hs | mit | s3BucketReplicationRule
:: S3BucketReplicationDestination -- ^ 'sbrrDestination'
-> Val Text -- ^ 'sbrrPrefix'
-> Val Text -- ^ 'sbrrStatus'
-> S3BucketReplicationRule
s3BucketReplicationRule destinationarg prefixarg statusarg =
S3BucketReplicationRule
{ _s3BucketReplicationRuleDestination = destinationarg
... | 520 | s3BucketReplicationRule
:: S3BucketReplicationDestination -- ^ 'sbrrDestination'
-> Val Text -- ^ 'sbrrPrefix'
-> Val Text -- ^ 'sbrrStatus'
-> S3BucketReplicationRule
s3BucketReplicationRule destinationarg prefixarg statusarg =
S3BucketReplicationRule
{ _s3BucketReplicationRuleDestination = destinationarg
... | 520 | s3BucketReplicationRule destinationarg prefixarg statusarg =
S3BucketReplicationRule
{ _s3BucketReplicationRuleDestination = destinationarg
, _s3BucketReplicationRuleId = Nothing
, _s3BucketReplicationRulePrefix = prefixarg
, _s3BucketReplicationRuleSourceSelectionCriteria = Nothing
, _s3BucketReplicationRu... | 344 | false | true | 0 | 9 | 68 | 80 | 43 | 37 | null | null |
Denommus/stack | src/Stack/Dot.hs | bsd-3-clause | printLocalNodes :: (F.Foldable t, MonadIO m)
=> DotOpts
-> t PackageName
-> m ()
printLocalNodes dotOpts locals = liftIO $ Text.putStrLn (Text.intercalate "\n" lpNodes)
where applyStyle :: Text -> Text
applyStyle n = if dotIncludeExternal dotOpts
... | 540 | printLocalNodes :: (F.Foldable t, MonadIO m)
=> DotOpts
-> t PackageName
-> m ()
printLocalNodes dotOpts locals = liftIO $ Text.putStrLn (Text.intercalate "\n" lpNodes)
where applyStyle :: Text -> Text
applyStyle n = if dotIncludeExternal dotOpts
... | 540 | printLocalNodes dotOpts locals = liftIO $ Text.putStrLn (Text.intercalate "\n" lpNodes)
where applyStyle :: Text -> Text
applyStyle n = if dotIncludeExternal dotOpts
then n <> " [style=dashed];"
else n <> " [style=solid];"
lpNodes :: [Text]
lpN... | 411 | false | true | 0 | 10 | 187 | 157 | 75 | 82 | null | null |
mapinguari/SC_HS_Proxy | src/Proxy/Math/DeltaGraph.hs | mit | applyAddEdgeU :: ED -> Upsilon -> Upsilon
applyAddEdgeU (e, v, _, n') = (:) (e, v, n') | 86 | applyAddEdgeU :: ED -> Upsilon -> Upsilon
applyAddEdgeU (e, v, _, n') = (:) (e, v, n') | 86 | applyAddEdgeU (e, v, _, n') = (:) (e, v, n') | 44 | false | true | 0 | 6 | 16 | 48 | 28 | 20 | null | null |
josuf107/Fizzckle | src/Fizz/Store.hs | gpl-3.0 | save :: MaybeTimestamped ExpenseEntry -> IO ()
save = record . withSecond Save | 78 | save :: MaybeTimestamped ExpenseEntry -> IO ()
save = record . withSecond Save | 78 | save = record . withSecond Save | 31 | false | true | 0 | 7 | 12 | 30 | 14 | 16 | null | null |
colymore/Uned | Tlp-Skyline-Haskell/src/Skyline.hs | apache-2.0 | resuelveSkyline xs = combina (resuelveSkyline(fst(divide(xs))),resuelveSkyline(snd(divide(xs)))) | 96 | resuelveSkyline xs = combina (resuelveSkyline(fst(divide(xs))),resuelveSkyline(snd(divide(xs)))) | 96 | resuelveSkyline xs = combina (resuelveSkyline(fst(divide(xs))),resuelveSkyline(snd(divide(xs)))) | 96 | false | false | 0 | 12 | 4 | 54 | 27 | 27 | null | null |
dpatti/coverbot | Main.hs | mit | stateFile :: String
stateFile = ".state" | 40 | stateFile :: String
stateFile = ".state" | 40 | stateFile = ".state" | 20 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
asztal/transact-sql | Language/TransactSql/Parser.hs | bsd-3-clause | -- TODO: Dotted notation (figure out least ugly way)
objectName :: P ObjectName
objectName = try (ObjectName <$> part
<*> (period *> opt)
<*> (period *> opt)
<*> (period *> loc rawIdent)) -- server.database?.schema?.obj
... | 778 | objectName :: P ObjectName
objectName = try (ObjectName <$> part
<*> (period *> opt)
<*> (period *> opt)
<*> (period *> loc rawIdent)) -- server.database?.schema?.obj
<|> try (ObjectName Nothing <$> part
... | 725 | objectName = try (ObjectName <$> part
<*> (period *> opt)
<*> (period *> opt)
<*> (period *> loc rawIdent)) -- server.database?.schema?.obj
<|> try (ObjectName Nothing <$> part
<*... | 698 | true | true | 1 | 16 | 316 | 189 | 95 | 94 | null | null |
spechub/Hets | Maude/Language.hs | gpl-2.0 | -- * Generic Parser combinators
-- | Run the argument but return 'Nothing'
ignore :: (Monad m) => m a -> m (Maybe b)
ignore parser = parser >> return Nothing | 158 | ignore :: (Monad m) => m a -> m (Maybe b)
ignore parser = parser >> return Nothing | 82 | ignore parser = parser >> return Nothing | 40 | true | true | 0 | 9 | 31 | 48 | 24 | 24 | null | null |
headprogrammingczar/cabal | Cabal/Distribution/Simple/Utils.hs | bsd-3-clause | findFile :: [FilePath] -- ^search locations
-> FilePath -- ^File Name
-> IO FilePath
findFile searchPath fileName =
findFirstFile id
[ path </> fileName
| path <- nub searchPath]
>>= maybe (die $ fileName ++ " doesn't exist") return | 270 | findFile :: [FilePath] -- ^search locations
-> FilePath -- ^File Name
-> IO FilePath
findFile searchPath fileName =
findFirstFile id
[ path </> fileName
| path <- nub searchPath]
>>= maybe (die $ fileName ++ " doesn't exist") return | 270 | findFile searchPath fileName =
findFirstFile id
[ path </> fileName
| path <- nub searchPath]
>>= maybe (die $ fileName ++ " doesn't exist") return | 159 | false | true | 2 | 8 | 76 | 78 | 39 | 39 | null | null |
kRITZCREEK/psc-ide | test/PureScript/Ide/ReexportsSpec.hs | mit | decl1 = FunctionDecl "filter" "asdasd" | 38 | decl1 = FunctionDecl "filter" "asdasd" | 38 | decl1 = FunctionDecl "filter" "asdasd" | 38 | false | false | 1 | 5 | 4 | 14 | 5 | 9 | null | null |
geocurnoff/nikki | src/Object/Types.hs | lgpl-3.0 | mkEditorObject :: Sort_ -> EditorPosition -> EditorObject Sort_
mkEditorObject sort pos =
EditorObject sort pos oemState
where
oemState = fmap (\ methods -> oemInitialize methods pos) $ objectEditMode sort | 215 | mkEditorObject :: Sort_ -> EditorPosition -> EditorObject Sort_
mkEditorObject sort pos =
EditorObject sort pos oemState
where
oemState = fmap (\ methods -> oemInitialize methods pos) $ objectEditMode sort | 215 | mkEditorObject sort pos =
EditorObject sort pos oemState
where
oemState = fmap (\ methods -> oemInitialize methods pos) $ objectEditMode sort | 151 | false | true | 0 | 9 | 38 | 65 | 31 | 34 | null | null |
105424/cis194 | src/Cis194/Hw/Golf.hs | bsd-3-clause | histogram :: [Integer] -> String
histogram _ = "" | 49 | histogram :: [Integer] -> String
histogram _ = "" | 49 | histogram _ = "" | 16 | false | true | 0 | 7 | 8 | 27 | 12 | 15 | null | null |
iblumenfeld/saw-core | src/Verifier/SAW/Rewriter.hs | bsd-3-clause | asRecordRedex :: (Monad m, Termlike t) => R.Recognizer m t (Map FieldName t, FieldName)
asRecordRedex t =
do (x, i) <- R.asRecordSelector t
ts <- R.asRecordValue x
return (ts, i)
----------------------------------------------------------------------
-- Bottom-up rewriting | 291 | asRecordRedex :: (Monad m, Termlike t) => R.Recognizer m t (Map FieldName t, FieldName)
asRecordRedex t =
do (x, i) <- R.asRecordSelector t
ts <- R.asRecordValue x
return (ts, i)
----------------------------------------------------------------------
-- Bottom-up rewriting | 291 | asRecordRedex t =
do (x, i) <- R.asRecordSelector t
ts <- R.asRecordValue x
return (ts, i)
----------------------------------------------------------------------
-- Bottom-up rewriting | 203 | false | true | 0 | 9 | 52 | 93 | 47 | 46 | null | null |
markflorisson/hpack | testrepo/bytestring-0.10.2.0/Data/ByteString/Internal.hs | bsd-3-clause | mallocByteString :: Int -> IO (ForeignPtr a)
mallocByteString l = do
#ifdef __GLASGOW_HASKELL__
mallocPlainForeignPtrBytes l
#else
mallocForeignPtrBytes l
#endif
| 170 | mallocByteString :: Int -> IO (ForeignPtr a)
mallocByteString l = do
#ifdef __GLASGOW_HASKELL__
mallocPlainForeignPtrBytes l
#else
mallocForeignPtrBytes l
#endif
| 170 | mallocByteString l = do
#ifdef __GLASGOW_HASKELL__
mallocPlainForeignPtrBytes l
#else
mallocForeignPtrBytes l
#endif
| 125 | false | true | 0 | 9 | 27 | 40 | 19 | 21 | null | null |
tjhunter/karps | haskell/src/Spark/Core/Internal/OpFunctions.hs | apache-2.0 | nameLocalStructuredTransform :: T.Text
nameLocalStructuredTransform = "org.spark.LocalStructuredTransform" | 106 | nameLocalStructuredTransform :: T.Text
nameLocalStructuredTransform = "org.spark.LocalStructuredTransform" | 106 | nameLocalStructuredTransform = "org.spark.LocalStructuredTransform" | 67 | false | true | 0 | 5 | 5 | 13 | 7 | 6 | null | null |
rueshyna/gogol | gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Subscriptions/Acknowledge.hs | mpl-2.0 | -- | OAuth bearer token.
psaBearerToken :: Lens' ProjectsSubscriptionsAcknowledge (Maybe Text)
psaBearerToken
= lens _psaBearerToken
(\ s a -> s{_psaBearerToken = a}) | 174 | psaBearerToken :: Lens' ProjectsSubscriptionsAcknowledge (Maybe Text)
psaBearerToken
= lens _psaBearerToken
(\ s a -> s{_psaBearerToken = a}) | 149 | psaBearerToken
= lens _psaBearerToken
(\ s a -> s{_psaBearerToken = a}) | 79 | true | true | 1 | 9 | 29 | 52 | 25 | 27 | null | null |
osa1/Idris-dev | src/Idris/Core/TT.hs | bsd-3-clause | arity :: TT n -> Int
arity (Bind n (Pi _ t _) sc) = 1 + arity sc | 64 | arity :: TT n -> Int
arity (Bind n (Pi _ t _) sc) = 1 + arity sc | 64 | arity (Bind n (Pi _ t _) sc) = 1 + arity sc | 43 | false | true | 0 | 11 | 18 | 53 | 24 | 29 | null | null |
shlevy/ghc | compiler/cmm/PprCmm.hs | bsd-3-clause | pprConvention Slow = text "<slow-convention>" | 62 | pprConvention Slow = text "<slow-convention>" | 62 | pprConvention Slow = text "<slow-convention>" | 62 | false | false | 0 | 5 | 21 | 12 | 5 | 7 | null | null |
neongreen/hat | src/DB.hs | bsd-3-clause | getGlobalState :: Acid.Query GlobalState GlobalState
getGlobalState = view id | 77 | getGlobalState :: Acid.Query GlobalState GlobalState
getGlobalState = view id | 77 | getGlobalState = view id | 24 | false | true | 1 | 6 | 8 | 25 | 10 | 15 | null | null |
pgj/bead | src/Bead/View/RouteOf.hs | bsd-3-clause | profilePath :: RoutePath
profilePath = "/profile" | 49 | profilePath :: RoutePath
profilePath = "/profile" | 49 | profilePath = "/profile" | 24 | 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.