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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
christiaanb/Idris-dev | src/IRTS/Defunctionalise.hs | bsd-3-clause | mkApplyCase fname n ar | n == ar = [] | 37 | mkApplyCase fname n ar | n == ar = [] | 37 | mkApplyCase fname n ar | n == ar = [] | 37 | false | false | 0 | 8 | 9 | 25 | 11 | 14 | null | null |
DavidAlphaFox/bittorrent | tests/Data/TorrentSpec.hs | bsd-3-clause | spec :: Spec
spec = do
describe "info hash" $ do
mapM_ infohashSpec torrentList
describe "accumPosition" $ do
it "" $ property $ \ p1 p2 p3 s1 s2 s3 ->
accumPositions [(p1, s1), (p2, s2), (p3, s3)]
`shouldBe` [(p1, (0, s1)), (p2, (s1, s2)), (p3, (s1 + s2, s3))]
describe "FileInfo" $ do
... | 1,155 | spec :: Spec
spec = do
describe "info hash" $ do
mapM_ infohashSpec torrentList
describe "accumPosition" $ do
it "" $ property $ \ p1 p2 p3 s1 s2 s3 ->
accumPositions [(p1, s1), (p2, s2), (p3, s3)]
`shouldBe` [(p1, (0, s1)), (p2, (s1, s2)), (p3, (s1 + s2, s3))]
describe "FileInfo" $ do
... | 1,155 | spec = do
describe "info hash" $ do
mapM_ infohashSpec torrentList
describe "accumPosition" $ do
it "" $ property $ \ p1 p2 p3 s1 s2 s3 ->
accumPositions [(p1, s1), (p2, s2), (p3, s3)]
`shouldBe` [(p1, (0, s1)), (p2, (s1, s2)), (p3, (s1 + s2, s3))]
describe "FileInfo" $ do
it "proper... | 1,142 | false | true | 0 | 17 | 265 | 398 | 193 | 205 | null | null |
ptitfred/slidecoding | app/Slider.hs | gpl-3.0 | describeModules :: [Description] -> IO ()
describeModules [] = putStrLn " No modules" | 89 | describeModules :: [Description] -> IO ()
describeModules [] = putStrLn " No modules" | 89 | describeModules [] = putStrLn " No modules" | 47 | false | true | 0 | 7 | 16 | 31 | 15 | 16 | null | null |
Lykos/Sara | tests/Sara/TestUtils/AstGenUtils.hs | gpl-3.0 | arbitraryCall :: (MonadGen g, MonadReader GeneratorEnv g) => Type -> g (Maybe IncompleteExpression)
arbitraryCall t = do
calls <- asks $ M.lookup t . callables
case calls of
Nothing -> return Nothing
Just [] -> return Nothing
Just calls -> do
PartialSignature{..} <- elements calls
as <... | 564 | arbitraryCall :: (MonadGen g, MonadReader GeneratorEnv g) => Type -> g (Maybe IncompleteExpression)
arbitraryCall t = do
calls <- asks $ M.lookup t . callables
case calls of
Nothing -> return Nothing
Just [] -> return Nothing
Just calls -> do
PartialSignature{..} <- elements calls
as <... | 564 | arbitraryCall t = do
calls <- asks $ M.lookup t . callables
case calls of
Nothing -> return Nothing
Just [] -> return Nothing
Just calls -> do
PartialSignature{..} <- elements calls
as <- arbitraryArgs args
return $ Just $ Call sigName as ()
-- | Generates expressions as argumen... | 464 | false | true | 0 | 14 | 128 | 151 | 70 | 81 | null | null |
leshchevds/ganeti | src/Ganeti/Confd/Server.hs | bsd-2-clause | prepMain :: PrepFn (S.Family, S.SockAddr) PrepResult
prepMain _ (af_family, bindaddr) = do
s <- S.socket af_family S.Datagram S.defaultProtocol
S.setSocketOption s S.ReuseAddr 1
S.bindSocket s bindaddr
cref <- newIORef (Bad "Configuration not yet loaded")
return (s, cref)
-- | Main function. | 303 | prepMain :: PrepFn (S.Family, S.SockAddr) PrepResult
prepMain _ (af_family, bindaddr) = do
s <- S.socket af_family S.Datagram S.defaultProtocol
S.setSocketOption s S.ReuseAddr 1
S.bindSocket s bindaddr
cref <- newIORef (Bad "Configuration not yet loaded")
return (s, cref)
-- | Main function. | 303 | prepMain _ (af_family, bindaddr) = do
s <- S.socket af_family S.Datagram S.defaultProtocol
S.setSocketOption s S.ReuseAddr 1
S.bindSocket s bindaddr
cref <- newIORef (Bad "Configuration not yet loaded")
return (s, cref)
-- | Main function. | 250 | false | true | 0 | 10 | 50 | 110 | 53 | 57 | null | null |
mydaum/cabal | cabal-install/Distribution/Solver/Modular/Tree.hs | bsd-3-clause | innM (FChoiceF p s i b m d ts) = liftM (FChoice p s i b m d) (sequence ts) | 80 | innM (FChoiceF p s i b m d ts) = liftM (FChoice p s i b m d) (sequence ts) | 80 | innM (FChoiceF p s i b m d ts) = liftM (FChoice p s i b m d) (sequence ts) | 80 | false | false | 0 | 7 | 25 | 55 | 26 | 29 | null | null |
ianoc/jt | src/Jt/Net.hs | mit | queryUrl :: String -> IO(Either String BL.ByteString)
queryUrl = queryUrlWith QP.defaultsQP | 91 | queryUrl :: String -> IO(Either String BL.ByteString)
queryUrl = queryUrlWith QP.defaultsQP | 91 | queryUrl = queryUrlWith QP.defaultsQP | 37 | false | true | 0 | 10 | 10 | 38 | 17 | 21 | null | null |
snoyberg/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | typeable2ClassKey = mkPreludeClassUnique 22 | 49 | typeable2ClassKey = mkPreludeClassUnique 22 | 49 | typeable2ClassKey = mkPreludeClassUnique 22 | 49 | false | false | 0 | 5 | 9 | 9 | 4 | 5 | null | null |
ony/LibClang | src/Clang/Comment.hs | bsd-3-clause | getTagCommentAsString (HTMLEndTagComment c _) = Just <$> FFI.hTMLTagComment_getAsString c | 95 | getTagCommentAsString (HTMLEndTagComment c _) = Just <$> FFI.hTMLTagComment_getAsString c | 95 | getTagCommentAsString (HTMLEndTagComment c _) = Just <$> FFI.hTMLTagComment_getAsString c | 95 | false | false | 0 | 7 | 14 | 26 | 12 | 14 | null | null |
awagner83/identifiers | src/Data/Identifiers/ListLike.hs | bsd-3-clause | -- | Items inserted are given ids
prop_hasId :: String -> Bool
prop_hasId x = isJust . lookupId (insert (empty :: Identifiers Int String Char) x) $ x | 149 | prop_hasId :: String -> Bool
prop_hasId x = isJust . lookupId (insert (empty :: Identifiers Int String Char) x) $ x | 115 | prop_hasId x = isJust . lookupId (insert (empty :: Identifiers Int String Char) x) $ x | 86 | true | true | 0 | 11 | 27 | 51 | 26 | 25 | null | null |
trianglesphere/hcas | src/Lexer.hs | agpl-3.0 | -- | Checks if a char is part of a number.
isNum :: Char -> Bool
isNum x = isNumber x || x == '.' | 97 | isNum :: Char -> Bool
isNum x = isNumber x || x == '.' | 54 | isNum x = isNumber x || x == '.' | 32 | true | true | 1 | 7 | 24 | 41 | 18 | 23 | null | null |
cfgrok/dotfiles | provision/roles/xmonad/files/xmonad.hs | apache-2.0 | isRhythmbox = className =? "Rhythmbox" | 38 | isRhythmbox = className =? "Rhythmbox" | 38 | isRhythmbox = className =? "Rhythmbox" | 38 | false | false | 0 | 5 | 4 | 10 | 5 | 5 | null | null |
yairchu/ad | src/Numeric/AD/Internal/Chain.hs | bsd-3-clause | -- | This is used to create a new entry on the chain given a binary function, its derivatives with respect to its inputs,
-- their variable IDs and values. Used by 'binary' internally.
binarily :: forall s a. Reifies s Tape => (a -> a -> a) -> a -> a -> Int -> a -> Int -> a -> Chain s a
binarily f di dj i b j c = Chain... | 395 | binarily :: forall s a. Reifies s Tape => (a -> a -> a) -> a -> a -> Int -> a -> Int -> a -> Chain s a
binarily f di dj i b j c = Chain (unsafePerformIO (modifyTape (Proxy :: Proxy s) (bin i j di dj))) $! f b c | 210 | binarily f di dj i b j c = Chain (unsafePerformIO (modifyTape (Proxy :: Proxy s) (bin i j di dj))) $! f b c | 107 | true | true | 0 | 14 | 88 | 140 | 69 | 71 | null | null |
mLuby/triviaskell | src/Server.hs | mit | getQuestionText :: Int -> String
getQuestionText id = questionText . head $ filter (\q -> questionId q == id) allQuestions | 122 | getQuestionText :: Int -> String
getQuestionText id = questionText . head $ filter (\q -> questionId q == id) allQuestions | 122 | getQuestionText id = questionText . head $ filter (\q -> questionId q == id) allQuestions | 89 | false | true | 0 | 10 | 19 | 46 | 23 | 23 | null | null |
firefrorefiddle/songmaker | src/SongMaker/Read/Header.hs | gpl-2.0 | knownHeaders = ["title",
"original",
"author",
"lyricsBy",
"musicBy",
"translationBy",
"key",
"copyright",
"reference",
"output",
"license",
"ex... | 424 | knownHeaders = ["title",
"original",
"author",
"lyricsBy",
"musicBy",
"translationBy",
"key",
"copyright",
"reference",
"output",
"license",
"ex... | 424 | knownHeaders = ["title",
"original",
"author",
"lyricsBy",
"musicBy",
"translationBy",
"key",
"copyright",
"reference",
"output",
"license",
"ex... | 424 | false | false | 0 | 5 | 240 | 51 | 33 | 18 | null | null |
headprogrammingczar/cabal | cabal-install/Distribution/Client/Freeze.hs | bsd-3-clause | planPackages :: Verbosity
-> Compiler
-> Platform
-> Maybe SandboxPackageInfo
-> FreezeFlags
-> InstalledPackageIndex
-> SourcePackageDb
-> PkgConfigDb
-> [PackageSpecifier UnresolvedSourcePackage]
-> IO... | 2,722 | planPackages :: Verbosity
-> Compiler
-> Platform
-> Maybe SandboxPackageInfo
-> FreezeFlags
-> InstalledPackageIndex
-> SourcePackageDb
-> PkgConfigDb
-> [PackageSpecifier UnresolvedSourcePackage]
-> IO... | 2,722 | planPackages verbosity comp platform mSandboxPkgInfo freezeFlags
installedPkgIndex sourcePkgDb pkgConfigDb pkgSpecifiers = do
solver <- chooseSolver verbosity
(fromFlag (freezeSolver freezeFlags)) (compilerInfo comp)
notice verbosity "Resolving dependencies..."
installPlan <- foldProgre... | 2,381 | false | true | 19 | 16 | 760 | 487 | 222 | 265 | null | null |
hvr/lens | src/Control/Lens/Internal/Deque.hs | bsd-3-clause | -- | /O(n)/ amortized. Construct a 'Deque' from a list of values.
--
-- >>> fromList [1,2]
-- BD 1 [1] 1 [2]
fromList :: [a] -> Deque a
fromList = Prelude.foldr cons empty | 171 | fromList :: [a] -> Deque a
fromList = Prelude.foldr cons empty | 62 | fromList = Prelude.foldr cons empty | 35 | true | true | 0 | 6 | 33 | 32 | 18 | 14 | null | null |
mkeeter/spacewar | Game/Spacewar/Actors.hs | mit | isPresent (DeadShip fs) = not $ null fs | 39 | isPresent (DeadShip fs) = not $ null fs | 39 | isPresent (DeadShip fs) = not $ null fs | 39 | false | false | 0 | 7 | 7 | 22 | 10 | 12 | null | null |
brendanhay/gogol | gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/EventTags/Update.hs | mpl-2.0 | -- | Creates a value of 'EventTagsUpdate' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'etuXgafv'
--
-- * 'etuUploadProtocol'
--
-- * 'etuAccessToken'
--
-- * 'etuUploadType'
--
-- * 'etuProFileId'
--
-- * 'etuPayload'
--
-- * 'etuC... | 738 | eventTagsUpdate
:: Int64 -- ^ 'etuProFileId'
-> EventTag -- ^ 'etuPayload'
-> EventTagsUpdate
eventTagsUpdate pEtuProFileId_ pEtuPayload_ =
EventTagsUpdate'
{ _etuXgafv = Nothing
, _etuUploadProtocol = Nothing
, _etuAccessToken = Nothing
, _etuUploadType = Nothing
, _etuProFileId = _Co... | 409 | eventTagsUpdate pEtuProFileId_ pEtuPayload_ =
EventTagsUpdate'
{ _etuXgafv = Nothing
, _etuUploadProtocol = Nothing
, _etuAccessToken = Nothing
, _etuUploadType = Nothing
, _etuProFileId = _Coerce # pEtuProFileId_
, _etuPayload = pEtuPayload_
, _etuCallback = Nothing
} | 303 | true | true | 0 | 8 | 152 | 100 | 64 | 36 | null | null |
peddie/pipes-zeromq4 | src/Pipes/ZMQ4.hs | bsd-3-clause | -- |
-- This is a low-level function for passing all messages received on
-- the socket upstream and sending the responses out on the same
-- socket.
--
-- @
-- clientLoop sock = forever $
-- liftIO (Z.receiveMulti sock) >>=
-- request >>=
-- liftIO . Z.sendMulti sock
-- @
clientLoop :: (Z.Receiver sockty, Z.Send... | 593 | clientLoop :: (Z.Receiver sockty, Z.Sender sockty, MonadIO m) =>
Z.Socket sockty
-> Client' [B.ByteString] (NonEmpty B.ByteString) m ()
clientLoop sock = forever $
liftIO (Z.receiveMulti sock) >>=
request >>=
liftIO . Z.sendMulti sock | 313 | clientLoop sock = forever $
liftIO (Z.receiveMulti sock) >>=
request >>=
liftIO . Z.sendMulti sock | 152 | true | true | 0 | 12 | 169 | 115 | 62 | 53 | null | null |
funktionale-programmierung/haskell-for-beginners | src/ViewAscii.hs | bsd-3-clause | _SPECIAL_CODES_ :: [(BS.ByteString, String)]
_SPECIAL_CODES_ =
[(p1 0xE4 , "<iso-8859-1: a with diaresis>")
,(p1 0xF6 , "<iso-8859-1: o with diaresis>")
,(p1 0xFC , "<iso-8859-1: u with diaresis>")
,(p1 0xC4 , "<iso-8859-1: A with diaresis>")
,(p1 0xD6 , "<iso-8859-1: O with... | 836 | _SPECIAL_CODES_ :: [(BS.ByteString, String)]
_SPECIAL_CODES_ =
[(p1 0xE4 , "<iso-8859-1: a with diaresis>")
,(p1 0xF6 , "<iso-8859-1: o with diaresis>")
,(p1 0xFC , "<iso-8859-1: u with diaresis>")
,(p1 0xC4 , "<iso-8859-1: A with diaresis>")
,(p1 0xD6 , "<iso-8859-1: O with... | 836 | _SPECIAL_CODES_ =
[(p1 0xE4 , "<iso-8859-1: a with diaresis>")
,(p1 0xF6 , "<iso-8859-1: o with diaresis>")
,(p1 0xFC , "<iso-8859-1: u with diaresis>")
,(p1 0xC4 , "<iso-8859-1: A with diaresis>")
,(p1 0xD6 , "<iso-8859-1: O with diaresis>")
,(p1 0xDC , "<iso-8859-... | 791 | false | true | 1 | 7 | 226 | 235 | 134 | 101 | null | null |
tomgr/webcspm | src/Main.hs | bsd-3-clause | getConf :: IO (Config Snap ())
getConf = commandLineConfig defaultConfig | 72 | getConf :: IO (Config Snap ())
getConf = commandLineConfig defaultConfig | 72 | getConf = commandLineConfig defaultConfig | 41 | false | true | 2 | 7 | 9 | 34 | 13 | 21 | null | null |
gridaphobe/ghc | compiler/deSugar/DsUtils.hs | bsd-3-clause | mkSelectorBinds is_strict ticks pat val_expr
| null binders, not is_strict
= return (Nothing, [])
| isSingleton binders || is_simple_lpat pat
-- See Note [mkSelectorBinds]
= do { let pat_ty = hsLPatType pat
; val_var <- newSysLocalDs pat_ty
-- Make up 'v' in Note [mkSelectorBinds]
-- ... | 4,120 | mkSelectorBinds is_strict ticks pat val_expr
| null binders, not is_strict
= return (Nothing, [])
| isSingleton binders || is_simple_lpat pat
-- See Note [mkSelectorBinds]
= do { let pat_ty = hsLPatType pat
; val_var <- newSysLocalDs pat_ty
-- Make up 'v' in Note [mkSelectorBinds]
-- ... | 4,120 | mkSelectorBinds is_strict ticks pat val_expr
| null binders, not is_strict
= return (Nothing, [])
| isSingleton binders || is_simple_lpat pat
-- See Note [mkSelectorBinds]
= do { let pat_ty = hsLPatType pat
; val_var <- newSysLocalDs pat_ty
-- Make up 'v' in Note [mkSelectorBinds]
-- ... | 4,120 | false | false | 13 | 15 | 1,351 | 834 | 394 | 440 | null | null |
brendanhay/gogol | gogol-logging/gen/Network/Google/Logging/Types/Product.hs | mpl-2.0 | -- | The size of the HTTP request message in bytes, including the request
-- headers and the request body.
httprRequestSize :: Lens' HTTPRequest (Maybe Int64)
httprRequestSize
= lens _httprRequestSize
(\ s a -> s{_httprRequestSize = a})
. mapping _Coerce | 268 | httprRequestSize :: Lens' HTTPRequest (Maybe Int64)
httprRequestSize
= lens _httprRequestSize
(\ s a -> s{_httprRequestSize = a})
. mapping _Coerce | 161 | httprRequestSize
= lens _httprRequestSize
(\ s a -> s{_httprRequestSize = a})
. mapping _Coerce | 109 | true | true | 0 | 10 | 53 | 56 | 29 | 27 | null | null |
bb010g/aura | aura/lib/Aura/Logo.hs | gpl-3.0 | takeABite :: Settings -> Int -> IO ()
takeABite ss pad = drawMouth Closed *> drawMouth Open
where
drawMouth :: MouthState -> IO ()
drawMouth mouth = do
traverse_ putTextLn $ renderPacmanHead ss pad mouth
raiseCursorBy 4
hFlush stdout
threadDelay 125000 | 286 | takeABite :: Settings -> Int -> IO ()
takeABite ss pad = drawMouth Closed *> drawMouth Open
where
drawMouth :: MouthState -> IO ()
drawMouth mouth = do
traverse_ putTextLn $ renderPacmanHead ss pad mouth
raiseCursorBy 4
hFlush stdout
threadDelay 125000 | 286 | takeABite ss pad = drawMouth Closed *> drawMouth Open
where
drawMouth :: MouthState -> IO ()
drawMouth mouth = do
traverse_ putTextLn $ renderPacmanHead ss pad mouth
raiseCursorBy 4
hFlush stdout
threadDelay 125000 | 248 | false | true | 0 | 9 | 74 | 108 | 45 | 63 | null | null |
fumieval/boundingboxes | Data/BoundingBox.hs | bsd-3-clause | -- | Calculate an union between two boundingboxes.
union :: (Applicative f, Ord a) => Box f a -> Box f a -> Box f a
union (Box p q) (Box r s) = Box (liftA2 min p r) (liftA2 max q s) | 181 | union :: (Applicative f, Ord a) => Box f a -> Box f a -> Box f a
union (Box p q) (Box r s) = Box (liftA2 min p r) (liftA2 max q s) | 130 | union (Box p q) (Box r s) = Box (liftA2 min p r) (liftA2 max q s) | 65 | true | true | 0 | 8 | 42 | 101 | 48 | 53 | null | null |
cgswords/Grift | Compiler/EnforceConventions.hs | mit | effects (s@(SetB _ _):es) tail binds = effects es (s `effCons` tail) binds | 80 | effects (s@(SetB _ _):es) tail binds = effects es (s `effCons` tail) binds | 80 | effects (s@(SetB _ _):es) tail binds = effects es (s `effCons` tail) binds | 80 | false | false | 0 | 10 | 18 | 47 | 25 | 22 | null | null |
ellchow/pgrep | src/ParsecTree.hs | apache-2.0 | sequential [] = error "sequential requires > 0 parsers" | 55 | sequential [] = error "sequential requires > 0 parsers" | 55 | sequential [] = error "sequential requires > 0 parsers" | 55 | false | false | 1 | 5 | 8 | 18 | 6 | 12 | null | null |
olsner/ghc | compiler/basicTypes/VarEnv.hs | bsd-3-clause | delBndrL, delBndrR :: RnEnv2 -> Var -> RnEnv2
delBndrL rn@(RV2 { envL = env, in_scope = in_scope }) v
= rn { envL = env `delVarEnv` v, in_scope = in_scope `extendInScopeSet` v } | 179 | delBndrL, delBndrR :: RnEnv2 -> Var -> RnEnv2
delBndrL rn@(RV2 { envL = env, in_scope = in_scope }) v
= rn { envL = env `delVarEnv` v, in_scope = in_scope `extendInScopeSet` v } | 179 | delBndrL rn@(RV2 { envL = env, in_scope = in_scope }) v
= rn { envL = env `delVarEnv` v, in_scope = in_scope `extendInScopeSet` v } | 133 | false | true | 0 | 10 | 34 | 77 | 45 | 32 | null | null |
TomMD/cryptol | src/Cryptol/Transform/Specialize.hs | bsd-3-clause | allLoadedModules :: M.ModuleEnv -> [M.LoadedModule]
allLoadedModules =
M.getLoadedModules
. M.meLoadedModules | 115 | allLoadedModules :: M.ModuleEnv -> [M.LoadedModule]
allLoadedModules =
M.getLoadedModules
. M.meLoadedModules | 115 | allLoadedModules =
M.getLoadedModules
. M.meLoadedModules | 63 | false | true | 1 | 7 | 15 | 32 | 16 | 16 | null | null |
da-x/lamdu | bottlelib/Data/ByteString/Utils.hs | gpl-3.0 | xorBS :: SBS.ByteString -> SBS.ByteString -> SBS.ByteString
xorBS x y =
SBS.pack $ on (SBS.zipWith xor) (ljust l 0) x y
where
l = on max SBS.length x y | 167 | xorBS :: SBS.ByteString -> SBS.ByteString -> SBS.ByteString
xorBS x y =
SBS.pack $ on (SBS.zipWith xor) (ljust l 0) x y
where
l = on max SBS.length x y | 167 | xorBS x y =
SBS.pack $ on (SBS.zipWith xor) (ljust l 0) x y
where
l = on max SBS.length x y | 107 | false | true | 3 | 9 | 44 | 94 | 40 | 54 | null | null |
joelburget/graphreduction | tests/Tests.hs | bsd-3-clause | execTests :: [Test]
execTests =
[ testCase "exec 1" exec_example_1
, testCase "exec 2" exec_example_2
, testCase "exec 3" exec_example_3
, testCase "exec 4" exec_example_4
, testCase "exec 5" exec_example_5
, testCase "exec 6" exec_example_6
, testCase "exec 7" exec_example_7
, testCase ... | 757 | execTests :: [Test]
execTests =
[ testCase "exec 1" exec_example_1
, testCase "exec 2" exec_example_2
, testCase "exec 3" exec_example_3
, testCase "exec 4" exec_example_4
, testCase "exec 5" exec_example_5
, testCase "exec 6" exec_example_6
, testCase "exec 7" exec_example_7
, testCase ... | 757 | execTests =
[ testCase "exec 1" exec_example_1
, testCase "exec 2" exec_example_2
, testCase "exec 3" exec_example_3
, testCase "exec 4" exec_example_4
, testCase "exec 5" exec_example_5
, testCase "exec 6" exec_example_6
, testCase "exec 7" exec_example_7
, testCase "exec 8" exec_exampl... | 737 | false | true | 0 | 7 | 171 | 165 | 81 | 84 | null | null |
JacquesCarette/literate-scientific-software | People/Dan/Presentations/CommitteeMeeting4/BodyNew.hs | bsd-2-clause | trace_table3 = Table (EmptyS:trace_row_header_t3)
(makeTMatrix trace_col_header_t3 trace_columns_t3 trace_row_t3)
(showingCxnBw (traceyMatrix) (titleize' assumption `sAnd` S "Other"
+:+ titleize' item)) True "TraceyAssumpsOthers" | 235 | trace_table3 = Table (EmptyS:trace_row_header_t3)
(makeTMatrix trace_col_header_t3 trace_columns_t3 trace_row_t3)
(showingCxnBw (traceyMatrix) (titleize' assumption `sAnd` S "Other"
+:+ titleize' item)) True "TraceyAssumpsOthers" | 235 | trace_table3 = Table (EmptyS:trace_row_header_t3)
(makeTMatrix trace_col_header_t3 trace_columns_t3 trace_row_t3)
(showingCxnBw (traceyMatrix) (titleize' assumption `sAnd` S "Other"
+:+ titleize' item)) True "TraceyAssumpsOthers" | 235 | false | false | 0 | 11 | 25 | 70 | 34 | 36 | null | null |
tomahawkins/trs | attic/PIC/Simulator.hs | bsd-3-clause | run :: String -> Configuration -> Maybe Int -> State -> IO (Either Violation State)
run _ _ (Just cycles) state | cycles <= 0 = return $ Right state | 169 | run :: String -> Configuration -> Maybe Int -> State -> IO (Either Violation State)
run _ _ (Just cycles) state | cycles <= 0 = return $ Right state | 169 | run _ _ (Just cycles) state | cycles <= 0 = return $ Right state | 85 | false | true | 0 | 11 | 50 | 73 | 34 | 39 | null | null |
guillaume-nargeot/codecov-haskell | src/Trace/Hpc/Codecov.hs | bsd-3-clause | defaultConverter :: LixConverter
defaultConverter = map $ \lix -> case lix of
Full -> Number 1
Partial -> Bool True
None -> Number 0
Irrelevant -> Null | 182 | defaultConverter :: LixConverter
defaultConverter = map $ \lix -> case lix of
Full -> Number 1
Partial -> Bool True
None -> Number 0
Irrelevant -> Null | 182 | defaultConverter = map $ \lix -> case lix of
Full -> Number 1
Partial -> Bool True
None -> Number 0
Irrelevant -> Null | 149 | false | true | 0 | 10 | 57 | 57 | 28 | 29 | null | null |
Proclivis/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxINVERT :: Int
wxINVERT = 2 | 28 | wxINVERT :: Int
wxINVERT = 2 | 28 | wxINVERT = 2 | 12 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
dmp1ce/Haskell-Programming-Exercises | Chapter 17/Exercises3.hs | unlicense | max' :: Int -> Int -> Int
max' = max | 36 | max' :: Int -> Int -> Int
max' = max | 36 | max' = max | 10 | false | true | 0 | 8 | 9 | 26 | 11 | 15 | null | null |
M42/mikrokosmos | source/Lambda.hs | gpl-3.0 | simplify_cbn (Inl m) = Inl (simplify_cbn m) | 56 | simplify_cbn (Inl m) = Inl (simplify_cbn m) | 56 | simplify_cbn (Inl m) = Inl (simplify_cbn m) | 56 | false | false | 0 | 7 | 19 | 24 | 11 | 13 | null | null |
MaxGabriel/yesod | yesod-bin/Keter.hs | mit | keter :: String -- ^ cabal command
-> Bool -- ^ no build?
-> Bool -- ^ no copy to?
-> [String] -- ^ build args
-> IO ()
keter cabal noBuild noCopyTo buildArgs = do
ketercfg <- keterConfig
mvalue <- decodeFile ketercfg
value <-
case mvalue of
Nothing -> error "No c... | 3,443 | keter :: String -- ^ cabal command
-> Bool -- ^ no build?
-> Bool -- ^ no copy to?
-> [String] -- ^ build args
-> IO ()
keter cabal noBuild noCopyTo buildArgs = do
ketercfg <- keterConfig
mvalue <- decodeFile ketercfg
value <-
case mvalue of
Nothing -> error "No c... | 3,443 | keter cabal noBuild noCopyTo buildArgs = do
ketercfg <- keterConfig
mvalue <- decodeFile ketercfg
value <-
case mvalue of
Nothing -> error "No config/keter.yaml found"
Just (Object value) ->
case Map.lookup "host" value of
Just (String s) |... | 3,299 | false | true | 0 | 21 | 1,366 | 980 | 469 | 511 | null | null |
karshan/language-java | Language/Java/Pretty.hs | bsd-3-clause | escapeGeneral '\n' = "\\n" | 26 | escapeGeneral '\n' = "\\n" | 26 | escapeGeneral '\n' = "\\n" | 26 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
tidalcycles/Tidal | src/Sound/Tidal/UI.hs | gpl-3.0 | {- | `rangex` is an exponential version of `range`, good for using with
frequencies. Do *not* use negative numbers or zero as arguments! -}
rangex :: (Functor f, Floating b) => b -> b -> f b -> f b
rangex from to p = exp <$> _range (log from) (log to) p | 254 | rangex :: (Functor f, Floating b) => b -> b -> f b -> f b
rangex from to p = exp <$> _range (log from) (log to) p | 113 | rangex from to p = exp <$> _range (log from) (log to) p | 55 | true | true | 0 | 9 | 53 | 79 | 38 | 41 | null | null |
anton-dessiatov/stack | src/Stack/Constants.hs | bsd-3-clause | -- | The maximum allowed terminal width. Used for pretty-printing.
maxTerminalWidth :: Int
maxTerminalWidth = 200 | 113 | maxTerminalWidth :: Int
maxTerminalWidth = 200 | 46 | maxTerminalWidth = 200 | 22 | true | true | 0 | 6 | 15 | 19 | 8 | 11 | null | null |
rahulmutt/ghcvm | compiler/Eta/Main/HscStats.hs | bsd-3-clause | -- | Source Statistics
ppSourceStats :: Bool -> Located (HsModule RdrName) -> SDoc
ppSourceStats short (L _ (HsModule _ exports imports ldecls _ _))
= (if short then hcat else vcat)
(map pp_val
[("ExportAll ", export_all), -- 1 if no export list
("ExportDecls ", export_ds)... | 7,045 | ppSourceStats :: Bool -> Located (HsModule RdrName) -> SDoc
ppSourceStats short (L _ (HsModule _ exports imports ldecls _ _))
= (if short then hcat else vcat)
(map pp_val
[("ExportAll ", export_all), -- 1 if no export list
("ExportDecls ", export_ds),
("Export... | 7,022 | ppSourceStats short (L _ (HsModule _ exports imports ldecls _ _))
= (if short then hcat else vcat)
(map pp_val
[("ExportAll ", export_all), -- 1 if no export list
("ExportDecls ", export_ds),
("ExportModules ", export_ms),
("Imports ",... | 6,962 | true | true | 178 | 14 | 2,480 | 2,017 | 1,278 | 739 | null | null |
AlexeyRaga/eta | compiler/ETA/Prelude/PrimOp.hs | bsd-3-clause | primOpHasSideEffects Check = True | 33 | primOpHasSideEffects Check = True | 33 | primOpHasSideEffects Check = True | 33 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
jrockway/c2hs | src/C2HS/Gen/Bind.hs | gpl-2.0 | applyBin _ _ _ _ =
interr "GenBind.applyBinOp: Illegal combination!" | 90 | applyBin _ _ _ _ =
interr "GenBind.applyBinOp: Illegal combination!" | 90 | applyBin _ _ _ _ =
interr "GenBind.applyBinOp: Illegal combination!" | 90 | false | false | 0 | 5 | 31 | 18 | 8 | 10 | null | null |
tonicebrian/sgf | Data/SGF/Parse/Util.hs | bsd-3-clause | none :: PTranslator ()
none (Property { values = [[]] }) = return () | 68 | none :: PTranslator ()
none (Property { values = [[]] }) = return () | 68 | none (Property { values = [[]] }) = return () | 45 | false | true | 1 | 10 | 13 | 45 | 21 | 24 | null | null |
sherwoodwang/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/Events.hs | lgpl-2.1 | evtHandlerSetClientData :: EvtHandler a -> IO () -> b -> IO ()
evtHandlerSetClientData evtHandler onDelete x
= do closure <- createClosure x (const onDelete) (const (return ()))
evtHandlerSetClientClosure evtHandler closure
return ()
-- | Retrieve an attached Haskell value, previously attached with 'ev... | 343 | evtHandlerSetClientData :: EvtHandler a -> IO () -> b -> IO ()
evtHandlerSetClientData evtHandler onDelete x
= do closure <- createClosure x (const onDelete) (const (return ()))
evtHandlerSetClientClosure evtHandler closure
return ()
-- | Retrieve an attached Haskell value, previously attached with 'ev... | 343 | evtHandlerSetClientData evtHandler onDelete x
= do closure <- createClosure x (const onDelete) (const (return ()))
evtHandlerSetClientClosure evtHandler closure
return ()
-- | Retrieve an attached Haskell value, previously attached with 'evtHandlerSetClientData'. | 280 | false | true | 0 | 13 | 59 | 94 | 43 | 51 | null | null |
onponomarev/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | htKvmSpiceValidLossyImgComprOptions :: FrozenSet String
htKvmSpiceValidLossyImgComprOptions =
ConstantUtils.mkSet [htKvmSpiceLossyImgComprAlways,
htKvmSpiceLossyImgComprAuto,
htKvmSpiceLossyImgComprNever] | 252 | htKvmSpiceValidLossyImgComprOptions :: FrozenSet String
htKvmSpiceValidLossyImgComprOptions =
ConstantUtils.mkSet [htKvmSpiceLossyImgComprAlways,
htKvmSpiceLossyImgComprAuto,
htKvmSpiceLossyImgComprNever] | 252 | htKvmSpiceValidLossyImgComprOptions =
ConstantUtils.mkSet [htKvmSpiceLossyImgComprAlways,
htKvmSpiceLossyImgComprAuto,
htKvmSpiceLossyImgComprNever] | 196 | false | true | 0 | 5 | 57 | 28 | 15 | 13 | null | null |
jozefg/cooked-pi | src/LambdaPi/HOAS.hs | mit | inferType (Annot l r) = do
checkType r Star
let r' = nf r
r' <$ checkType l r' | 84 | inferType (Annot l r) = do
checkType r Star
let r' = nf r
r' <$ checkType l r' | 84 | inferType (Annot l r) = do
checkType r Star
let r' = nf r
r' <$ checkType l r' | 84 | false | false | 0 | 10 | 24 | 50 | 21 | 29 | null | null |
bitemyapp/ghc | compiler/typecheck/TcType.hs | bsd-3-clause | tcTyVarsOfType (ForAllTy tyvar ty) = tcTyVarsOfType ty `delVarSet` tyvar | 73 | tcTyVarsOfType (ForAllTy tyvar ty) = tcTyVarsOfType ty `delVarSet` tyvar | 73 | tcTyVarsOfType (ForAllTy tyvar ty) = tcTyVarsOfType ty `delVarSet` tyvar | 73 | false | false | 0 | 6 | 9 | 27 | 13 | 14 | null | null |
alexander-at-github/eta | compiler/ETA/SimplCore/CoreMonad.hs | bsd-3-clause | tickToTag (CaseElim _) = 11 | 44 | tickToTag (CaseElim _) = 11 | 44 | tickToTag (CaseElim _) = 11 | 44 | false | false | 0 | 6 | 21 | 16 | 7 | 9 | null | null |
lukexi/ghc-7.8-arm64 | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | emitPrimOp dflags res IndexByteArrayOp_WideChar args = doIndexByteArrayOp (Just (mo_u_32ToWord dflags)) b32 res args | 126 | emitPrimOp dflags res IndexByteArrayOp_WideChar args = doIndexByteArrayOp (Just (mo_u_32ToWord dflags)) b32 res args | 126 | emitPrimOp dflags res IndexByteArrayOp_WideChar args = doIndexByteArrayOp (Just (mo_u_32ToWord dflags)) b32 res args | 126 | false | false | 0 | 9 | 22 | 40 | 17 | 23 | null | null |
fmthoma/ghc | compiler/typecheck/TcType.hs | bsd-3-clause | isFFIPrimArgumentTy :: DynFlags -> Type -> Validity
-- Checks for valid argument type for a 'foreign import prim'
-- Currently they must all be simple unlifted types, or the well-known type
-- Any, which can be used to pass the address to a Haskell object on the heap to
-- the foreign function.
isFFIPrimArgumentTy dfla... | 419 | isFFIPrimArgumentTy :: DynFlags -> Type -> Validity
isFFIPrimArgumentTy dflags ty
| isAnyTy ty = IsValid
| otherwise = checkRepTyCon (legalFIPrimArgTyCon dflags) ty empty | 175 | isFFIPrimArgumentTy dflags ty
| isAnyTy ty = IsValid
| otherwise = checkRepTyCon (legalFIPrimArgTyCon dflags) ty empty | 123 | true | true | 0 | 8 | 73 | 65 | 31 | 34 | null | null |
ghcjs/ghcjs | lib/ghc/includes/CodeGen.Platform.hs | mit | callerSaves (VanillaReg 4 _) = True | 36 | callerSaves (VanillaReg 4 _) = True | 36 | callerSaves (VanillaReg 4 _) = True | 36 | false | false | 0 | 6 | 6 | 18 | 8 | 10 | null | null |
turion/haskell-asteroids | src/Graphics.hs | mit | -- Game functions: drawGameObjectType, drawGameObject, drawListOfGameObjects, drawGameLevel --
drawGameObjectType :: GameObjectType -> IORef GameState -> IO ()
drawGameObjectType Ship gameState = do
state <- readIORef gameState
drawPolygon (0.75, 0.75, 0.75) $ getShipForm shipSize
drawPolygon (0.1, 0.3, 0.... | 896 | drawGameObjectType :: GameObjectType -> IORef GameState -> IO ()
drawGameObjectType Ship gameState = do
state <- readIORef gameState
drawPolygon (0.75, 0.75, 0.75) $ getShipForm shipSize
drawPolygon (0.1, 0.3, 0.9) $ getWindowForm shipSize
drawPolygon (0.1, 0.6, 0.2) $ getRightWingForm shipSize
draw... | 800 | drawGameObjectType Ship gameState = do
state <- readIORef gameState
drawPolygon (0.75, 0.75, 0.75) $ getShipForm shipSize
drawPolygon (0.1, 0.3, 0.9) $ getWindowForm shipSize
drawPolygon (0.1, 0.6, 0.2) $ getRightWingForm shipSize
drawPolygon (0.1, 0.6, 0.2) $ getLeftWingForm shipSize
if (shield... | 735 | true | true | 0 | 13 | 185 | 325 | 163 | 162 | null | null |
eryx67/haskell-libtorrent | src/Network/Libtorrent/FileStorage.hs | bsd-3-clause | getSize :: MonadIO m => FileEntry -> m C.CSize
getSize ho =
liftIO . withPtr ho $ \hoPtr ->
[CU.exp| size_t { $(file_entry * hoPtr)->size } |] | 147 | getSize :: MonadIO m => FileEntry -> m C.CSize
getSize ho =
liftIO . withPtr ho $ \hoPtr ->
[CU.exp| size_t { $(file_entry * hoPtr)->size } |] | 147 | getSize ho =
liftIO . withPtr ho $ \hoPtr ->
[CU.exp| size_t { $(file_entry * hoPtr)->size } |] | 99 | false | true | 0 | 8 | 31 | 52 | 27 | 25 | null | null |
nevrenato/HetsAlloy | Temporal/Morphism.hs | gpl-2.0 | -- | Inclusion map of a subsig into a supersig
inclusionMap :: Sign.Sign -> Sign.Sign -> Morphism
inclusionMap s1 s2 = Morphism
{ source = s1
, target = s2
, propMap = Map.empty } | 185 | inclusionMap :: Sign.Sign -> Sign.Sign -> Morphism
inclusionMap s1 s2 = Morphism
{ source = s1
, target = s2
, propMap = Map.empty } | 138 | inclusionMap s1 s2 = Morphism
{ source = s1
, target = s2
, propMap = Map.empty } | 87 | true | true | 0 | 8 | 40 | 59 | 31 | 28 | null | null |
siddhanathan/ghc | compiler/utils/Outputable.hs | bsd-3-clause | speakNth 3 = ptext (sLit "third") | 33 | speakNth 3 = ptext (sLit "third") | 33 | speakNth 3 = ptext (sLit "third") | 33 | false | false | 0 | 7 | 5 | 18 | 8 | 10 | null | null |
haskell-pkg-janitors/feed | Text/Atom/Feed.hs | bsd-3-clause | nullGenerator :: Text -- ^genText
-> Generator
nullGenerator t = Generator
{ genURI = Nothing
, genVersion = Nothing
, genText = t
} | 161 | nullGenerator :: Text -- ^genText
-> Generator
nullGenerator t = Generator
{ genURI = Nothing
, genVersion = Nothing
, genText = t
} | 161 | nullGenerator t = Generator
{ genURI = Nothing
, genVersion = Nothing
, genText = t
} | 100 | false | true | 0 | 7 | 52 | 43 | 24 | 19 | null | null |
brendanhay/gogol | gogol-analytics/gen/Network/Google/Analytics/Types/Product.hs | mpl-2.0 | -- | Link to previous page for this custom metric collection.
cmPreviousLink :: Lens' CustomMetrics (Maybe Text)
cmPreviousLink
= lens _cmPreviousLink
(\ s a -> s{_cmPreviousLink = a}) | 192 | cmPreviousLink :: Lens' CustomMetrics (Maybe Text)
cmPreviousLink
= lens _cmPreviousLink
(\ s a -> s{_cmPreviousLink = a}) | 130 | cmPreviousLink
= lens _cmPreviousLink
(\ s a -> s{_cmPreviousLink = a}) | 79 | true | true | 0 | 9 | 35 | 48 | 25 | 23 | null | null |
ikirill/ComputationalMathematics | Cube/CubeSearch.hs | gpl-3.0 | -- | Any permutation requiring more elementary operations than
-- 'operationLimit' will be ignored.
operationLimit = maxBound :: Int | 132 | operationLimit = maxBound :: Int | 32 | operationLimit = maxBound :: Int | 32 | true | false | 0 | 4 | 18 | 11 | 7 | 4 | null | null |
theNerd247/ariaRacer | src/Aria/RaceHistory.hs | bsd-3-clause | racerIds :: Getter RaceHistoryData [RacerId]
racerIds = to $ \hd -> _rdRId <$> (hd ^. histRaceData) | 99 | racerIds :: Getter RaceHistoryData [RacerId]
racerIds = to $ \hd -> _rdRId <$> (hd ^. histRaceData) | 99 | racerIds = to $ \hd -> _rdRId <$> (hd ^. histRaceData) | 54 | false | true | 0 | 9 | 15 | 39 | 21 | 18 | null | null |
NorfairKing/the-notes | src/Statistics/Main.hs | gpl-2.0 | modifiedMeasuresDefinition :: Note
modifiedMeasuresDefinition = de $ do
s ["Let", m parmod_, "be a", parametricModel, "and let", m par_, "be a", parameter]
let c = cdot "" ""
s [m $ probm par_ c, "is the probability, given", m par_]
s ["Similarly we write", m $ evm par_ c, "to mean the", expectedValue, ... | 576 | modifiedMeasuresDefinition :: Note
modifiedMeasuresDefinition = de $ do
s ["Let", m parmod_, "be a", parametricModel, "and let", m par_, "be a", parameter]
let c = cdot "" ""
s [m $ probm par_ c, "is the probability, given", m par_]
s ["Similarly we write", m $ evm par_ c, "to mean the", expectedValue, ... | 576 | modifiedMeasuresDefinition = de $ do
s ["Let", m parmod_, "be a", parametricModel, "and let", m par_, "be a", parameter]
let c = cdot "" ""
s [m $ probm par_ c, "is the probability, given", m par_]
s ["Similarly we write", m $ evm par_ c, "to mean the", expectedValue, "given", m par_]
s ["This is no... | 541 | false | true | 0 | 11 | 124 | 206 | 107 | 99 | null | null |
ruuda/hoff | src/Git.hs | apache-2.0 | fetchBranch :: Branch -> GitOperation ()
fetchBranch remoteBranch = liftF $ FetchBranch remoteBranch () | 103 | fetchBranch :: Branch -> GitOperation ()
fetchBranch remoteBranch = liftF $ FetchBranch remoteBranch () | 103 | fetchBranch remoteBranch = liftF $ FetchBranch remoteBranch () | 62 | false | true | 0 | 7 | 13 | 34 | 16 | 18 | null | null |
mindriot101/pandoc | src/Text/Pandoc/Readers/LaTeX.hs | gpl-2.0 | umlaut c = [c] | 16 | umlaut c = [c] | 16 | umlaut c = [c] | 16 | false | false | 0 | 5 | 5 | 12 | 6 | 6 | null | null |
vdweegen/UvA-Software_Testing | Lab1/Bauke/Exercise8.hs | gpl-3.0 | main = print $ "honest boys: " ++ (show honest) ++ ", guilty boy: " ++ (show $ head $ guilty) | 93 | main = print $ "honest boys: " ++ (show honest) ++ ", guilty boy: " ++ (show $ head $ guilty) | 93 | main = print $ "honest boys: " ++ (show honest) ++ ", guilty boy: " ++ (show $ head $ guilty) | 93 | false | false | 3 | 9 | 20 | 44 | 20 | 24 | null | null |
alexander-at-github/eta | compiler/ETA/DeSugar/Coverage.hs | bsd-3-clause | addTickHsExpr (HsTickPragma _ _ (L pos e0)) = do
e2 <- allocTickBox (ExpBox False) False False pos $
addTickHsExpr e0
return $ unLoc e2 | 159 | addTickHsExpr (HsTickPragma _ _ (L pos e0)) = do
e2 <- allocTickBox (ExpBox False) False False pos $
addTickHsExpr e0
return $ unLoc e2 | 159 | addTickHsExpr (HsTickPragma _ _ (L pos e0)) = do
e2 <- allocTickBox (ExpBox False) False False pos $
addTickHsExpr e0
return $ unLoc e2 | 159 | false | false | 0 | 11 | 47 | 67 | 30 | 37 | null | null |
hsyl20/ViperVM | haskus-system-tools/src/system-info/CmdLine.hs | bsd-3-clause | getOptions :: IO Options
getOptions = execParser opts
where
opts = info (helper <*> options)
( fullDesc
<> progDesc "Haskus system info"
<> header "Haskus System Info" ) | 191 | getOptions :: IO Options
getOptions = execParser opts
where
opts = info (helper <*> options)
( fullDesc
<> progDesc "Haskus system info"
<> header "Haskus System Info" ) | 191 | getOptions = execParser opts
where
opts = info (helper <*> options)
( fullDesc
<> progDesc "Haskus system info"
<> header "Haskus System Info" ) | 166 | false | true | 0 | 8 | 49 | 55 | 26 | 29 | null | null |
gltronred/issue-recommendation-crawler | src/UserInfo.hs | gpl-3.0 | userInfo :: (?verbose :: Int) => BS.ByteString -> BS.ByteString -> IO (Maybe User)
userInfo owner token = do
mrs <- userRepos owner token
case mrs of
Nothing -> return Nothing
Just rs -> do
res <- forM rs $ \r -> do
l <- projectLangs owner r
f <- frameworksFor owner r
return (m... | 432 | userInfo :: (?verbose :: Int) => BS.ByteString -> BS.ByteString -> IO (Maybe User)
userInfo owner token = do
mrs <- userRepos owner token
case mrs of
Nothing -> return Nothing
Just rs -> do
res <- forM rs $ \r -> do
l <- projectLangs owner r
f <- frameworksFor owner r
return (m... | 432 | userInfo owner token = do
mrs <- userRepos owner token
case mrs of
Nothing -> return Nothing
Just rs -> do
res <- forM rs $ \r -> do
l <- projectLangs owner r
f <- frameworksFor owner r
return (maybe S.empty M.keysSet l,f)
let (ls,fs) = unzip res
return $ Just $ Use... | 349 | false | true | 0 | 22 | 124 | 206 | 95 | 111 | null | null |
lunaris/hindent | src/HIndent/Styles/ChrisDone.hs | bsd-3-clause | types e = prettyNoExt e | 23 | types e = prettyNoExt e | 23 | types e = prettyNoExt e | 23 | false | false | 0 | 5 | 4 | 12 | 5 | 7 | null | null |
alexander-at-github/eta | compiler/ETA/DeSugar/DsBinds.hs | bsd-3-clause | dsEvTerm (EvTypeable ev) = dsEvTypeable ev | 42 | dsEvTerm (EvTypeable ev) = dsEvTypeable ev | 42 | dsEvTerm (EvTypeable ev) = dsEvTypeable ev | 42 | false | false | 0 | 7 | 5 | 18 | 8 | 10 | null | null |
dmp1ce/DMSS | src-bin/dmss.hs | unlicense | main :: IO ()
main = cliMain | 28 | main :: IO ()
main = cliMain | 28 | main = cliMain | 14 | false | true | 0 | 6 | 6 | 16 | 8 | 8 | null | null |
alekar/hugs | packages/base/Data/Map.hs | bsd-3-clause | -- | /O(log n)/. Delete the maximal key.
deleteMax :: Map k a -> Map k a
deleteMax (Bin _ kx x l Tip) = l | 106 | deleteMax :: Map k a -> Map k a
deleteMax (Bin _ kx x l Tip) = l | 65 | deleteMax (Bin _ kx x l Tip) = l | 33 | true | true | 0 | 7 | 26 | 43 | 21 | 22 | null | null |
tphyahoo/haskoin | haskoin-core/Network/Haskoin/Block/Types.hs | unlicense | hexToBlockHash :: ByteString -> Maybe BlockHash
hexToBlockHash hex = do
bs <- BS.reverse <$> decodeHex hex
h <- bsToHash256 bs
return $ BlockHash h
-- | Compute the hash of a block header | 200 | hexToBlockHash :: ByteString -> Maybe BlockHash
hexToBlockHash hex = do
bs <- BS.reverse <$> decodeHex hex
h <- bsToHash256 bs
return $ BlockHash h
-- | Compute the hash of a block header | 200 | hexToBlockHash hex = do
bs <- BS.reverse <$> decodeHex hex
h <- bsToHash256 bs
return $ BlockHash h
-- | Compute the hash of a block header | 152 | false | true | 0 | 9 | 45 | 58 | 26 | 32 | null | null |
Min-/DropSeq | src/MyText.hs | bsd-3-clause | chop :: T.Text -> T.Text
chop "" = "" | 37 | chop :: T.Text -> T.Text
chop "" = "" | 37 | chop "" = "" | 12 | false | true | 0 | 6 | 8 | 22 | 11 | 11 | null | null |
snoyberg/ghc | compiler/simplCore/OccurAnal.hs | bsd-3-clause | -- Both branches are at least One
-- (Argument is never IAmDead)
-- (orOccInfo orig new) is used
-- when combining occurrence info from branches of a case
orOccInfo (OneOcc in_lam1 _ int_cxt1)
(OneOcc in_lam2 _ int_cxt2)
= OneOcc (in_lam1 || in_lam2)
False ... | 399 | orOccInfo (OneOcc in_lam1 _ int_cxt1)
(OneOcc in_lam2 _ int_cxt2)
= OneOcc (in_lam1 || in_lam2)
False -- False, because it occurs in both branches
(int_cxt1 && int_cxt2) | 210 | orOccInfo (OneOcc in_lam1 _ int_cxt1)
(OneOcc in_lam2 _ int_cxt2)
= OneOcc (in_lam1 || in_lam2)
False -- False, because it occurs in both branches
(int_cxt1 && int_cxt2) | 210 | true | false | 0 | 7 | 128 | 57 | 31 | 26 | null | null |
JustusAdam/haxl-local-test | src/DataSources/Movies.hs | bsd-3-clause | getActorForMovie :: Key -> GenHaxl u (Maybe Value)
getActorForMovie = dataFetch . GetActor | 90 | getActorForMovie :: Key -> GenHaxl u (Maybe Value)
getActorForMovie = dataFetch . GetActor | 90 | getActorForMovie = dataFetch . GetActor | 39 | false | true | 0 | 8 | 12 | 30 | 15 | 15 | null | null |
wouteroostervld/snell | app/snell.hs | mit | --light = DirectionalLight (V3 1 1 1) 0.2e5
Camera _ rays = camera | 67 | Camera _ rays = camera | 22 | Camera _ rays = camera | 22 | true | false | 1 | 5 | 13 | 13 | 6 | 7 | null | null |
JoeyEremondi/utrecht-apa-p1 | src/Parse/Module.hs | bsd-3-clause | import' :: IParser (Module.Name, Module.ImportMethod)
import' =
do try (reserved "import")
whitespace
names <- dotSep1 capVar
(,) names <$> option (Module.As (intercalate "." names)) method
where
method :: IParser Module.ImportMethod
method = as' <|> importing'
as' :: IParser Module.... | 546 | import' :: IParser (Module.Name, Module.ImportMethod)
import' =
do try (reserved "import")
whitespace
names <- dotSep1 capVar
(,) names <$> option (Module.As (intercalate "." names)) method
where
method :: IParser Module.ImportMethod
method = as' <|> importing'
as' :: IParser Module.... | 546 | import' =
do try (reserved "import")
whitespace
names <- dotSep1 capVar
(,) names <$> option (Module.As (intercalate "." names)) method
where
method :: IParser Module.ImportMethod
method = as' <|> importing'
as' :: IParser Module.ImportMethod
as' = do
try (whitespace >> res... | 492 | false | true | 5 | 12 | 131 | 200 | 90 | 110 | null | null |
harendra-kumar/asyncly | src/Streamly/Streams/Async.hs | bsd-3-clause | -- | Fix the type of a polymorphic stream as 'AsyncT'.
--
-- @since 0.1.0
asyncly :: IsStream t => AsyncT m a -> t m a
asyncly = adapt | 134 | asyncly :: IsStream t => AsyncT m a -> t m a
asyncly = adapt | 60 | asyncly = adapt | 15 | true | true | 0 | 7 | 29 | 35 | 18 | 17 | null | null |
bergmark/clay | src/Clay/Elements.hs | bsd-3-clause | thead = "thead" | 15 | thead = "thead" | 15 | thead = "thead" | 15 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
raventid/coursera_learning | haskell/will_kurt/capstone_time_series.hs | mit | -- After applying this will get 36 values instead of 35, due to first Nothing.
-- Right now it looks wrong to me.
diffTS :: (Num a) => TS a -> TS a
diffTS (TS [] []) = TS [] [] | 176 | diffTS :: (Num a) => TS a -> TS a
diffTS (TS [] []) = TS [] [] | 62 | diffTS (TS [] []) = TS [] [] | 28 | true | true | 0 | 8 | 40 | 56 | 28 | 28 | null | null |
uduki/hsQt | Qtc/Opengl/QGLPixelBuffer.hs | bsd-2-clause | qGLPixelBuffer_delete1 :: QGLPixelBuffer a -> IO ()
qGLPixelBuffer_delete1 x0
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QGLPixelBuffer_delete1 cobj_x0 | 151 | qGLPixelBuffer_delete1 :: QGLPixelBuffer a -> IO ()
qGLPixelBuffer_delete1 x0
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QGLPixelBuffer_delete1 cobj_x0 | 151 | qGLPixelBuffer_delete1 x0
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QGLPixelBuffer_delete1 cobj_x0 | 99 | false | true | 0 | 7 | 22 | 41 | 19 | 22 | null | null |
urv/fixhs | src/Data/FIX/Spec/FIX40.hs | lgpl-2.1 | tSignatureLength :: FIXTag
tSignatureLength = FIXTag
{ tName = "SignatureLength"
, tnum = 93
, tparser = toFIXInt
, arbitraryValue = FIXInt <$> arbitrary } | 168 | tSignatureLength :: FIXTag
tSignatureLength = FIXTag
{ tName = "SignatureLength"
, tnum = 93
, tparser = toFIXInt
, arbitraryValue = FIXInt <$> arbitrary } | 168 | tSignatureLength = FIXTag
{ tName = "SignatureLength"
, tnum = 93
, tparser = toFIXInt
, arbitraryValue = FIXInt <$> arbitrary } | 141 | false | true | 0 | 8 | 37 | 51 | 27 | 24 | null | null |
nobsun/icfpc2017 | hs/src/Punter.hs | bsd-3-clause | play (P.PrevMoves _moves Nothing) = return $ error "Punter.play: no state is available" | 87 | play (P.PrevMoves _moves Nothing) = return $ error "Punter.play: no state is available" | 87 | play (P.PrevMoves _moves Nothing) = return $ error "Punter.play: no state is available" | 87 | false | false | 0 | 7 | 12 | 27 | 12 | 15 | null | null |
adarqui/ghcjs-jquery | JavaScript/JQuery.hs | mit | delegateTarget :: Event -> IO Element
delegateTarget ev = Element <$> jq_delegateTarget ev | 90 | delegateTarget :: Event -> IO Element
delegateTarget ev = Element <$> jq_delegateTarget ev | 90 | delegateTarget ev = Element <$> jq_delegateTarget ev | 52 | false | true | 0 | 6 | 12 | 28 | 13 | 15 | null | null |
facebookincubator/duckling | Duckling/Time/EL/Rules.hs | bsd-3-clause | ruleTheCycleBeforeTime :: Rule
ruleTheCycleBeforeTime = Rule
{ name = "the <cycle> before <time>"
, pattern =
[ dimension TimeGrain
, regex "πριν τ(ον?|ην?|α|ους)"
, dimension Time
]
, prod = \tokens -> case tokens of
(Token TimeGrain grain:_:Token Time td:_) ->
tt $ cycleNthAfter Fa... | 360 | ruleTheCycleBeforeTime :: Rule
ruleTheCycleBeforeTime = Rule
{ name = "the <cycle> before <time>"
, pattern =
[ dimension TimeGrain
, regex "πριν τ(ον?|ην?|α|ους)"
, dimension Time
]
, prod = \tokens -> case tokens of
(Token TimeGrain grain:_:Token Time td:_) ->
tt $ cycleNthAfter Fa... | 360 | ruleTheCycleBeforeTime = Rule
{ name = "the <cycle> before <time>"
, pattern =
[ dimension TimeGrain
, regex "πριν τ(ον?|ην?|α|ους)"
, dimension Time
]
, prod = \tokens -> case tokens of
(Token TimeGrain grain:_:Token Time td:_) ->
tt $ cycleNthAfter False grain (-1) td
_ -> No... | 329 | false | true | 0 | 16 | 95 | 117 | 61 | 56 | null | null |
mightymoose/liquidhaskell | benchmarks/xmonad-0.10/XMonad/Core.hs | bsd-3-clause | runQuery :: Query a -> Window -> X a
runQuery (Query m) w = runReaderT m w | 74 | runQuery :: Query a -> Window -> X a
runQuery (Query m) w = runReaderT m w | 74 | runQuery (Query m) w = runReaderT m w | 37 | false | true | 0 | 7 | 16 | 41 | 19 | 22 | null | null |
conal/shady-gen | src/Shady/Language/GLSL.hs | agpl-3.0 | -- | Assignment statement
(=:) :: HasType a => Pat a -> E a -> Statement
p =: e = p <-- cse e | 93 | (=:) :: HasType a => Pat a -> E a -> Statement
p =: e = p <-- cse e | 67 | p =: e = p <-- cse e | 20 | true | true | 0 | 10 | 23 | 52 | 24 | 28 | null | null |
ony/hledger | hledger-lib/Hledger/Utils/Debug.hs | gpl-3.0 | -- | Trace (print to stderr) a showable value using a custom show function.
traceWith :: (a -> String) -> a -> a
traceWith f a = trace (f a) a | 142 | traceWith :: (a -> String) -> a -> a
traceWith f a = trace (f a) a | 66 | traceWith f a = trace (f a) a | 29 | true | true | 0 | 7 | 30 | 43 | 22 | 21 | null | null |
satai/FrozenBeagle | Simulation/Lib/src/Simulation/Internal.hs | bsd-3-clause | randomDnaString :: Double -> Double -> Int -> RVar DnaString
randomDnaString ratioOfNegativeDominance ratioPleiotropic baseCount = DnaString <$> replicateM baseCount (randomInitAllele ratioOfNegativeDominance ratioPleiotropic ) | 227 | randomDnaString :: Double -> Double -> Int -> RVar DnaString
randomDnaString ratioOfNegativeDominance ratioPleiotropic baseCount = DnaString <$> replicateM baseCount (randomInitAllele ratioOfNegativeDominance ratioPleiotropic ) | 227 | randomDnaString ratioOfNegativeDominance ratioPleiotropic baseCount = DnaString <$> replicateM baseCount (randomInitAllele ratioOfNegativeDominance ratioPleiotropic ) | 166 | false | true | 0 | 9 | 22 | 54 | 25 | 29 | null | null |
phischu/fragnix | tests/packages/scotty/Data.Text.Read.hs | bsd-3-clause | hex txt
| T.null h = Left "input does not start with a hexadecimal digit"
| otherwise = Right (T.foldl' go 0 h, t)
where (# h,t #) = span_ isHexDigit txt
go n d = (n * 16 + fromIntegral (hexDigitToInt d))
-- | Read an optional leading sign character (@\'-\'@ or @\'+\'@) and
-- apply it to the resul... | 351 | hex txt
| T.null h = Left "input does not start with a hexadecimal digit"
| otherwise = Right (T.foldl' go 0 h, t)
where (# h,t #) = span_ isHexDigit txt
go n d = (n * 16 + fromIntegral (hexDigitToInt d))
-- | Read an optional leading sign character (@\'-\'@ or @\'+\'@) and
-- apply it to the resul... | 351 | hex txt
| T.null h = Left "input does not start with a hexadecimal digit"
| otherwise = Right (T.foldl' go 0 h, t)
where (# h,t #) = span_ isHexDigit txt
go n d = (n * 16 + fromIntegral (hexDigitToInt d))
-- | Read an optional leading sign character (@\'-\'@ or @\'+\'@) and
-- apply it to the resul... | 351 | false | false | 2 | 10 | 86 | 101 | 49 | 52 | null | null |
ghc-android/ghc | testsuite/tests/ghci/should_run/ghcirun004.hs | bsd-3-clause | 1019 = 1018 | 11 | 1019 = 1018 | 11 | 1019 = 1018 | 11 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
Cortlandd/haskell-opencv | test/test.hs | bsd-3-clause | testMatToM33
:: (Eq e, Show e, Storable e)
=> Mat (ShapeT [3, 3]) ('S 1) ('S e)
-> V3 (V3 e)
-> HU.Assertion
testMatToM33 m v = assertEqual "" v $ fromMat m | 172 | testMatToM33
:: (Eq e, Show e, Storable e)
=> Mat (ShapeT [3, 3]) ('S 1) ('S e)
-> V3 (V3 e)
-> HU.Assertion
testMatToM33 m v = assertEqual "" v $ fromMat m | 172 | testMatToM33 m v = assertEqual "" v $ fromMat m | 47 | false | true | 0 | 10 | 48 | 103 | 51 | 52 | null | null |
ezyang/ghc | compiler/rename/RnFixity.hs | bsd-3-clause | lookupTyFixityRn :: Located Name -> RnM Fixity
lookupTyFixityRn (L _ n) = lookupFixityRn n | 90 | lookupTyFixityRn :: Located Name -> RnM Fixity
lookupTyFixityRn (L _ n) = lookupFixityRn n | 90 | lookupTyFixityRn (L _ n) = lookupFixityRn n | 43 | false | true | 0 | 7 | 13 | 35 | 16 | 19 | null | null |
cdepillabout/coursera | algorithms1/week1/tests/MyQuickCheck.hs | gpl-3.0 | findShowsCorrectUnionAfterBeingUnionedBad :: (WeightedQuickUnion, Index, Index) -> Bool
findShowsCorrectUnionAfterBeingUnionedBad (wqu, indexA, indexB) =
--(indexA /= indexB) ==>
let wquAfterUnion = union wqu indexA indexB
in isConnected wquAfterUnion indexA indexB | 289 | findShowsCorrectUnionAfterBeingUnionedBad :: (WeightedQuickUnion, Index, Index) -> Bool
findShowsCorrectUnionAfterBeingUnionedBad (wqu, indexA, indexB) =
--(indexA /= indexB) ==>
let wquAfterUnion = union wqu indexA indexB
in isConnected wquAfterUnion indexA indexB | 289 | findShowsCorrectUnionAfterBeingUnionedBad (wqu, indexA, indexB) =
--(indexA /= indexB) ==>
let wquAfterUnion = union wqu indexA indexB
in isConnected wquAfterUnion indexA indexB | 201 | false | true | 0 | 9 | 51 | 62 | 33 | 29 | null | null |
pparkkin/eta | compiler/ETA/DeSugar/Check.hs | bsd-3-clause | all_vars _ = False | 31 | all_vars _ = False | 31 | all_vars _ = False | 31 | false | false | 0 | 5 | 16 | 9 | 4 | 5 | null | null |
mwotton/ctkl | src/Text/CTK/Pretty.hs | bsd-3-clause | -- vertical composition of documents (EXPORTED)
--
($$) :: Doc -> Doc -> Doc
(Nest _ [] ) $$ doc = doc | 118 | ($$) :: Doc -> Doc -> Doc
(Nest _ [] ) $$ doc = doc | 67 | (Nest _ [] ) $$ doc = doc | 26 | true | true | 0 | 12 | 37 | 44 | 22 | 22 | null | null |
grnet/snf-ganeti | src/Ganeti/Constants.hs | bsd-2-clause | locksReplace :: String
locksReplace = "replace" | 47 | locksReplace :: String
locksReplace = "replace" | 47 | locksReplace = "replace" | 24 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
pront/nemo-mpi | src/api/autogen/API.hs | gpl-2.0 | setWriteOnlySynapses =
ApiFunction
"setWriteOnlySynapses"
"Specify that synapses will not be read back at run-time"
(Just "By default synapse state can be read back at run-time. This may require setting up data structures of considerable size before starting the simulation. If the synapse st... | 503 | setWriteOnlySynapses =
ApiFunction
"setWriteOnlySynapses"
"Specify that synapses will not be read back at run-time"
(Just "By default synapse state can be read back at run-time. This may require setting up data structures of considerable size before starting the simulation. If the synapse st... | 503 | setWriteOnlySynapses =
ApiFunction
"setWriteOnlySynapses"
"Specify that synapses will not be read back at run-time"
(Just "By default synapse state can be read back at run-time. This may require setting up data structures of considerable size before starting the simulation. If the synapse st... | 503 | false | false | 0 | 7 | 114 | 37 | 18 | 19 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.