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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Vlix/facebookmessenger | test/UnitTest/ProfileRequest.hs | mit | testGetStarted :: TestTree
testGetStarted = testCase "Get started takes last" $
getStarted "first" <> secondGetStarted
@?= secondGetStarted
where secondGetStarted = getStarted "second" | 198 | testGetStarted :: TestTree
testGetStarted = testCase "Get started takes last" $
getStarted "first" <> secondGetStarted
@?= secondGetStarted
where secondGetStarted = getStarted "second" | 198 | testGetStarted = testCase "Get started takes last" $
getStarted "first" <> secondGetStarted
@?= secondGetStarted
where secondGetStarted = getStarted "second" | 171 | false | true | 0 | 8 | 35 | 40 | 19 | 21 | null | null |
dysinger/amazonka | amazonka-ecs/gen/Network/AWS/ECS/RunTask.hs | mpl-2.0 | -- | A full description of the tasks that were run. Each task that was
-- successfully placed on your cluster will be described here.
rtrTasks :: Lens' RunTaskResponse [Task]
rtrTasks = lens _rtrTasks (\s a -> s { _rtrTasks = a }) . _List | 238 | rtrTasks :: Lens' RunTaskResponse [Task]
rtrTasks = lens _rtrTasks (\s a -> s { _rtrTasks = a }) . _List | 104 | rtrTasks = lens _rtrTasks (\s a -> s { _rtrTasks = a }) . _List | 63 | true | true | 0 | 9 | 44 | 55 | 28 | 27 | null | null |
mheinzel/Rome | src/CommandParsers.hs | mit | udcPayloadParser :: Opts.Parser RomeUDCPayload
udcPayloadParser = RomeUDCPayload <$> reposParser <*> platformsParser <*> cachePrefixParser <*> skipLocalCacheParser | 163 | udcPayloadParser :: Opts.Parser RomeUDCPayload
udcPayloadParser = RomeUDCPayload <$> reposParser <*> platformsParser <*> cachePrefixParser <*> skipLocalCacheParser | 163 | udcPayloadParser = RomeUDCPayload <$> reposParser <*> platformsParser <*> cachePrefixParser <*> skipLocalCacheParser | 116 | false | true | 0 | 8 | 14 | 32 | 16 | 16 | null | null |
kim/amazonka | amazonka-cloudhsm/gen/Network/AWS/CloudHSM/ListLunaClients.hs | mpl-2.0 | -- | If not null, more results are available. Pass this to 'ListLunaClients' to
-- retrieve the next set of items.
llcrNextToken :: Lens' ListLunaClientsResponse (Maybe Text)
llcrNextToken = lens _llcrNextToken (\s a -> s { _llcrNextToken = a }) | 245 | llcrNextToken :: Lens' ListLunaClientsResponse (Maybe Text)
llcrNextToken = lens _llcrNextToken (\s a -> s { _llcrNextToken = a }) | 130 | llcrNextToken = lens _llcrNextToken (\s a -> s { _llcrNextToken = a }) | 70 | true | true | 0 | 9 | 39 | 47 | 26 | 21 | null | null |
barrucadu/cabal-info | cabal-info/Describe.hs | mit | getFields :: [String] -> (String -> a -> String) -> a -> [(String, String)]
getFields fields get a = [(f, v) | f <- fields, let v = get f a, not (null v)] | 154 | getFields :: [String] -> (String -> a -> String) -> a -> [(String, String)]
getFields fields get a = [(f, v) | f <- fields, let v = get f a, not (null v)] | 154 | getFields fields get a = [(f, v) | f <- fields, let v = get f a, not (null v)] | 78 | false | true | 0 | 11 | 33 | 104 | 53 | 51 | null | null |
conal/hermit | src/HERMIT/Dictionary/Reasoning.hs | bsd-2-clause | trueDisjLR :: Monad m => Rewrite c m Clause
trueDisjLR = do
Disj CTrue _ <- idR
return CTrue | 100 | trueDisjLR :: Monad m => Rewrite c m Clause
trueDisjLR = do
Disj CTrue _ <- idR
return CTrue | 100 | trueDisjLR = do
Disj CTrue _ <- idR
return CTrue | 56 | false | true | 0 | 8 | 26 | 43 | 19 | 24 | null | null |
spechub/Hets | OWL2/ProfilesAndSublogics.hs | gpl-2.0 | bottomS :: ProfSub
bottomS = ProfSub topProfile slBottom | 56 | bottomS :: ProfSub
bottomS = ProfSub topProfile slBottom | 56 | bottomS = ProfSub topProfile slBottom | 37 | false | true | 0 | 5 | 7 | 16 | 8 | 8 | null | null |
bkoropoff/Idris-dev | src/Idris/ParseHelpers.hs | bsd-3-clause | -- | Applies parser to get a block (which has possibly indented statements)
indentedBlock :: IdrisParser a -> IdrisParser [a]
indentedBlock p = do openBlock
pushIndent
res <- many (indented p)
popIndent
closeBlock
r... | 434 | indentedBlock :: IdrisParser a -> IdrisParser [a]
indentedBlock p = do openBlock
pushIndent
res <- many (indented p)
popIndent
closeBlock
return res
-- | Applies parser to get a block with at least one statement (w... | 358 | indentedBlock p = do openBlock
pushIndent
res <- many (indented p)
popIndent
closeBlock
return res
-- | Applies parser to get a block with at least one statement (which has possibly indented statements) | 308 | true | true | 0 | 10 | 158 | 63 | 28 | 35 | null | null |
copumpkin/macho | src/Data/Macho/Types.hs | bsd-3-clause | r_type 1 CPU_TYPE_ARM = ARM_RELOC_PAIR | 45 | r_type 1 CPU_TYPE_ARM = ARM_RELOC_PAIR | 45 | r_type 1 CPU_TYPE_ARM = ARM_RELOC_PAIR | 45 | false | false | 0 | 5 | 11 | 11 | 5 | 6 | null | null |
cem3394/haskell | tensorflow-ops/tests/OpsTest.hs | apache-2.0 | eval :: TF.Fetchable t a => t -> IO a
eval = TF.runSession . TF.run | 67 | eval :: TF.Fetchable t a => t -> IO a
eval = TF.runSession . TF.run | 67 | eval = TF.runSession . TF.run | 29 | false | true | 0 | 7 | 14 | 37 | 18 | 19 | null | null |
unthingable/Tidal | vis/Sound/Tidal/Vis.hs | gpl-3.0 | vSVG = v C.withSVGSurface | 25 | vSVG = v C.withSVGSurface | 25 | vSVG = v C.withSVGSurface | 25 | false | false | 0 | 6 | 3 | 11 | 5 | 6 | null | null |
gcross/habit-of-fate | sources/library/HabitOfFate/Quests/DarkLord/Part2/Mage.hs | agpl-3.0 | boss_stories = [stories|
= The Ceiling Collapses =
The ceiling collapses above the mage, but the shield repels the stone.
|] | 124 | boss_stories = [stories|
= The Ceiling Collapses =
The ceiling collapses above the mage, but the shield repels the stone.
|] | 124 | boss_stories = [stories|
= The Ceiling Collapses =
The ceiling collapses above the mage, but the shield repels the stone.
|] | 124 | false | false | 0 | 4 | 20 | 10 | 7 | 3 | null | null |
reenberg/XMonadContrib | XMonad/Hooks/UrgencyHook.hs | bsd-3-clause | cleanupUrgents :: SuppressWhen -> X ()
cleanupUrgents sw = do
sw' <- suppressibleWindows sw
adjustUrgents (\\ sw') >> adjustReminders (filter $ ((`notElem` sw') . window)) | 179 | cleanupUrgents :: SuppressWhen -> X ()
cleanupUrgents sw = do
sw' <- suppressibleWindows sw
adjustUrgents (\\ sw') >> adjustReminders (filter $ ((`notElem` sw') . window)) | 179 | cleanupUrgents sw = do
sw' <- suppressibleWindows sw
adjustUrgents (\\ sw') >> adjustReminders (filter $ ((`notElem` sw') . window)) | 140 | false | true | 0 | 13 | 32 | 70 | 36 | 34 | null | null |
ksallberg/adventofcode | 2015/src/Day3_2.hs | bsd-2-clause | nextHouse :: Char -> House -> House
nextHouse '^' (x, y) = (x, y-1) | 67 | nextHouse :: Char -> House -> House
nextHouse '^' (x, y) = (x, y-1) | 67 | nextHouse '^' (x, y) = (x, y-1) | 31 | false | true | 0 | 6 | 13 | 40 | 22 | 18 | null | null |
khajavi/pandoc | src/Text/Pandoc/Writers/MediaWiki.hs | gpl-2.0 | listAttribsToString :: ListAttributes -> String
listAttribsToString (startnum, numstyle, _) =
let numstyle' = camelCaseToHyphenated $ show numstyle
in (if startnum /= 1
then " start=\"" ++ show startnum ++ "\""
else "") ++
(if numstyle /= DefaultStyle
then " style=\"list-style-t... | 367 | listAttribsToString :: ListAttributes -> String
listAttribsToString (startnum, numstyle, _) =
let numstyle' = camelCaseToHyphenated $ show numstyle
in (if startnum /= 1
then " start=\"" ++ show startnum ++ "\""
else "") ++
(if numstyle /= DefaultStyle
then " style=\"list-style-t... | 367 | listAttribsToString (startnum, numstyle, _) =
let numstyle' = camelCaseToHyphenated $ show numstyle
in (if startnum /= 1
then " start=\"" ++ show startnum ++ "\""
else "") ++
(if numstyle /= DefaultStyle
then " style=\"list-style-type: " ++ numstyle' ++ ";\""
else "") | 319 | false | true | 0 | 12 | 97 | 98 | 52 | 46 | null | null |
ian-mi/haskell-riak-client | Network/Riak/Message.hs | apache-2.0 | getMessage :: Get Message
getMessage = getMessageCode >>= getMessageByCode | 74 | getMessage :: Get Message
getMessage = getMessageCode >>= getMessageByCode | 74 | getMessage = getMessageCode >>= getMessageByCode | 48 | false | true | 0 | 6 | 8 | 24 | 10 | 14 | null | null |
tidalcycles/Tidal | src/Sound/Tidal/UI.hs | gpl-3.0 | euclidOffBool :: Pattern Int -> Pattern Int -> Pattern Int -> Pattern Bool -> Pattern Bool
euclidOffBool = tParam3 _euclidOffBool | 129 | euclidOffBool :: Pattern Int -> Pattern Int -> Pattern Int -> Pattern Bool -> Pattern Bool
euclidOffBool = tParam3 _euclidOffBool | 129 | euclidOffBool = tParam3 _euclidOffBool | 38 | false | true | 0 | 9 | 19 | 45 | 20 | 25 | null | null |
harlanhaskins/hasm | src/Hasm/Parser.hs | mit | parseUnary inst = do
symbol inst
arg <- parseArg
return arg | 71 | parseUnary inst = do
symbol inst
arg <- parseArg
return arg | 71 | parseUnary inst = do
symbol inst
arg <- parseArg
return arg | 71 | false | false | 1 | 8 | 22 | 32 | 11 | 21 | null | null |
judah/tensorflow-haskell | tensorflow-ops/src/TensorFlow/Gradient.hs | apache-2.0 | opGrad "Div" _ [toT -> x, toT -> y] [dz] =
-- TODO(fmayle): Handle complex numbers.
-- TODO(gnezdo): Provide Fractional instance and use '/' instead of div.
[ Just $ reshape (sum (dz `CoreOps.div` y) rx) sx
, Just $ reshape (sum (dz `CoreOps.mul` (negate x `CoreOps.div` (y * y)))
... | 475 | opGrad "Div" _ [toT -> x, toT -> y] [dz] =
-- TODO(fmayle): Handle complex numbers.
-- TODO(gnezdo): Provide Fractional instance and use '/' instead of div.
[ Just $ reshape (sum (dz `CoreOps.div` y) rx) sx
, Just $ reshape (sum (dz `CoreOps.mul` (negate x `CoreOps.div` (y * y)))
... | 475 | opGrad "Div" _ [toT -> x, toT -> y] [dz] =
-- TODO(fmayle): Handle complex numbers.
-- TODO(gnezdo): Provide Fractional instance and use '/' instead of div.
[ Just $ reshape (sum (dz `CoreOps.div` y) rx) sx
, Just $ reshape (sum (dz `CoreOps.mul` (negate x `CoreOps.div` (y * y)))
... | 475 | false | false | 0 | 15 | 150 | 175 | 95 | 80 | null | null |
kazu-yamamoto/http2 | bench-priority/Heap.hs | bsd-3-clause | weightToDeficit :: Weight -> Deficit
weightToDeficit w = deficitTable ! w | 73 | weightToDeficit :: Weight -> Deficit
weightToDeficit w = deficitTable ! w | 73 | weightToDeficit w = deficitTable ! w | 36 | false | true | 0 | 7 | 10 | 28 | 12 | 16 | null | null |
gbaz/cabal | Cabal/Distribution/Simple/Utils.hs | bsd-3-clause | shortRelativePath :: FilePath -> FilePath -> FilePath
shortRelativePath from to =
case dropCommonPrefix (splitDirectories from) (splitDirectories to) of
(stuff, path) -> joinPath (map (const "..") stuff ++ path)
where
dropCommonPrefix :: Eq a => [a] -> [a] -> ([a],[a])
dropCommonPrefix (x:xs) (y:y... | 494 | shortRelativePath :: FilePath -> FilePath -> FilePath
shortRelativePath from to =
case dropCommonPrefix (splitDirectories from) (splitDirectories to) of
(stuff, path) -> joinPath (map (const "..") stuff ++ path)
where
dropCommonPrefix :: Eq a => [a] -> [a] -> ([a],[a])
dropCommonPrefix (x:xs) (y:y... | 494 | shortRelativePath from to =
case dropCommonPrefix (splitDirectories from) (splitDirectories to) of
(stuff, path) -> joinPath (map (const "..") stuff ++ path)
where
dropCommonPrefix :: Eq a => [a] -> [a] -> ([a],[a])
dropCommonPrefix (x:xs) (y:ys)
| x == y = dropCommonPrefix xs ys
dr... | 440 | false | true | 5 | 13 | 108 | 175 | 92 | 83 | null | null |
beni55/attoparsec | Data/Attoparsec/ByteString/Internal.hs | bsd-3-clause | -- | The parser @skip p@ succeeds for any byte for which the predicate
-- @p@ returns 'True'.
--
-- >skipDigit = skip isDigit
-- > where isDigit w = w >= 48 && w <= 57
skip :: (Word8 -> Bool) -> Parser ()
skip p = do
h <- peekWord8'
if p h
then advance 1
else fail "skip"
-- | The parser @satisfyWith f p... | 478 | skip :: (Word8 -> Bool) -> Parser ()
skip p = do
h <- peekWord8'
if p h
then advance 1
else fail "skip"
-- | The parser @satisfyWith f p@ transforms a byte, and succeeds if
-- the predicate @p@ returns 'True' on the transformed value. The
-- parser returns the transformed byte that was parsed. | 307 | skip p = do
h <- peekWord8'
if p h
then advance 1
else fail "skip"
-- | The parser @satisfyWith f p@ transforms a byte, and succeeds if
-- the predicate @p@ returns 'True' on the transformed value. The
-- parser returns the transformed byte that was parsed. | 270 | true | true | 0 | 8 | 109 | 65 | 35 | 30 | null | null |
nevrenato/HetsAlloy | DFOL/AS_DFOL.hs | gpl-2.0 | eqType Form Form = True | 23 | eqType Form Form = True | 23 | eqType Form Form = True | 23 | false | false | 1 | 5 | 4 | 16 | 5 | 11 | null | null |
noughtmare/yi | example-configs/yi-all-static/Main.hs | gpl-2.0 | myConfig :: Maybe String -> Maybe String -> ConfigM ()
myConfig f k = do
-- Lookup f in the frontends list or pick the first element of the frontends list if
-- f is nothing or do nothing if f is not found in the frontends list.
case f of
Nothing -> snd (head frontends)
Just f' -> fromMaybe (return ()) (l... | 560 | myConfig :: Maybe String -> Maybe String -> ConfigM ()
myConfig f k = do
-- Lookup f in the frontends list or pick the first element of the frontends list if
-- f is nothing or do nothing if f is not found in the frontends list.
case f of
Nothing -> snd (head frontends)
Just f' -> fromMaybe (return ()) (l... | 560 | myConfig f k = do
-- Lookup f in the frontends list or pick the first element of the frontends list if
-- f is nothing or do nothing if f is not found in the frontends list.
case f of
Nothing -> snd (head frontends)
Just f' -> fromMaybe (return ()) (lookup f' frontends)
-- Same as above, but then with k... | 505 | false | true | 0 | 13 | 126 | 156 | 71 | 85 | null | null |
monostable/haskell-kicad-data | Data/Kicad/PcbnewExpr/PcbnewExpr.hs | mit | fpPadShapeToStr :: PcbnewPadShapeT -> String
fpPadShapeToStr t = fromMaybe "" $ lookup t $ map swap strToPadShapeMap | 116 | fpPadShapeToStr :: PcbnewPadShapeT -> String
fpPadShapeToStr t = fromMaybe "" $ lookup t $ map swap strToPadShapeMap | 116 | fpPadShapeToStr t = fromMaybe "" $ lookup t $ map swap strToPadShapeMap | 71 | false | true | 0 | 7 | 16 | 37 | 17 | 20 | null | null |
mankyKitty/leesp | src/Main.hs | mit | makeNormalFunc :: Env -> [LispVal] -> [LispVal] -> ErrorT LispError IO LispVal
makeNormalFunc = makeFunc Nothing | 112 | makeNormalFunc :: Env -> [LispVal] -> [LispVal] -> ErrorT LispError IO LispVal
makeNormalFunc = makeFunc Nothing | 112 | makeNormalFunc = makeFunc Nothing | 33 | false | true | 0 | 9 | 15 | 45 | 21 | 24 | null | null |
duplode/stack | src/Stack/Fetch.hs | bsd-3-clause | unpackPackages :: (MonadIO m, MonadBaseControl IO m, MonadReader env m, HasHttpManager env, HasConfig env, MonadThrow m, MonadLogger m, MonadCatch m)
=> EnvOverride
-> FilePath -- ^ destination
-> [String] -- ^ names or identifiers
-> m ()
unpackPackages menv ... | 1,616 | unpackPackages :: (MonadIO m, MonadBaseControl IO m, MonadReader env m, HasHttpManager env, HasConfig env, MonadThrow m, MonadLogger m, MonadCatch m)
=> EnvOverride
-> FilePath -- ^ destination
-> [String] -- ^ names or identifiers
-> m ()
unpackPackages menv ... | 1,616 | unpackPackages menv dest input = do
dest' <- liftIO (canonicalizePath dest) >>= parseAbsDir
(names, idents) <- case partitionEithers $ map parse input of
([], x) -> return $ partitionEithers x
(errs, _) -> throwM $ CouldNotParsePackageSelectors errs
resolved <- resolvePackages menv (Set.from... | 1,316 | false | true | 0 | 15 | 458 | 433 | 210 | 223 | null | null |
jacekszymanski/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/Types.hs | lgpl-2.1 | colorSystem :: SystemColor -> Color
colorSystem systemColor
= unsafePerformIO $
wxcSystemSettingsGetColour (fromEnum systemColor) | 136 | colorSystem :: SystemColor -> Color
colorSystem systemColor
= unsafePerformIO $
wxcSystemSettingsGetColour (fromEnum systemColor) | 136 | colorSystem systemColor
= unsafePerformIO $
wxcSystemSettingsGetColour (fromEnum systemColor) | 100 | false | true | 0 | 8 | 19 | 31 | 15 | 16 | null | null |
cjp256/manager | xenmgr/Vm/Queries.hs | gpl-2.0 | getVmDownloadProgress uuid = fromMaybe (0::Int) <$> dbRead ("/vm/"++show uuid++"/download-progress") | 100 | getVmDownloadProgress uuid = fromMaybe (0::Int) <$> dbRead ("/vm/"++show uuid++"/download-progress") | 100 | getVmDownloadProgress uuid = fromMaybe (0::Int) <$> dbRead ("/vm/"++show uuid++"/download-progress") | 100 | false | false | 0 | 10 | 8 | 39 | 19 | 20 | null | null |
noraesae/euler | src/Problem32.hs | bsd-3-clause | diff :: Eq a => [a] -> [a] -> [a]
diff = foldl (flip removeElement) | 67 | diff :: Eq a => [a] -> [a] -> [a]
diff = foldl (flip removeElement) | 67 | diff = foldl (flip removeElement) | 33 | false | true | 0 | 8 | 14 | 44 | 23 | 21 | null | null |
aztek/voogie | src/Voogie/Pretty/Boogie/FOOL.hs | gpl-3.0 | prettyUnary :: Term -> Doc
prettyUnary = prettyParens isInfix | 61 | prettyUnary :: Term -> Doc
prettyUnary = prettyParens isInfix | 61 | prettyUnary = prettyParens isInfix | 34 | false | true | 0 | 5 | 8 | 18 | 9 | 9 | null | null |
nurpax/hstodo | test/ModelTests.hs | bsd-3-clause | testTagNote :: Test
testTagNote = testCase "tag a note" $
withNewDb $ \c -> do
let note = M.Note Nothing "test1 title" "test1 body" []
note' <- M.saveNote c defaultUser note
let noteId_ = fromJust . M.noteId $ note'
t1 <- M.addNoteTag c defaultUser noteId_ "foo"
t2 <- M.addNoteTag c defaultUser no... | 404 | testTagNote :: Test
testTagNote = testCase "tag a note" $
withNewDb $ \c -> do
let note = M.Note Nothing "test1 title" "test1 body" []
note' <- M.saveNote c defaultUser note
let noteId_ = fromJust . M.noteId $ note'
t1 <- M.addNoteTag c defaultUser noteId_ "foo"
t2 <- M.addNoteTag c defaultUser no... | 404 | testTagNote = testCase "tag a note" $
withNewDb $ \c -> do
let note = M.Note Nothing "test1 title" "test1 body" []
note' <- M.saveNote c defaultUser note
let noteId_ = fromJust . M.noteId $ note'
t1 <- M.addNoteTag c defaultUser noteId_ "foo"
t2 <- M.addNoteTag c defaultUser noteId_ "bar"
["fo... | 384 | false | true | 0 | 14 | 93 | 157 | 74 | 83 | null | null |
leepike/copilot-language | src/Copilot/Language/Operators/Extern.hs | bsd-3-clause | externFun :: Typed a => String -> [Arg] -> Maybe (Stream a) -> Stream a
externFun = ExternFun | 93 | externFun :: Typed a => String -> [Arg] -> Maybe (Stream a) -> Stream a
externFun = ExternFun | 93 | externFun = ExternFun | 21 | false | true | 0 | 11 | 17 | 45 | 22 | 23 | null | null |
pseudonom/persistent | persistent-mongoDB/Database/Persist/MongoDB.hs | mit | keyFrom_id :: (PersistEntity record) => DB.Value -> Either Text (Key record)
keyFrom_id idVal = case cast idVal of
(PersistMap m) -> keyFromValues $ map snd m
pv -> keyFromValues [pv]
-- | It would make sense to define the instance for ObjectId
-- and then use newtype deriving
-- however, that would create an ... | 335 | keyFrom_id :: (PersistEntity record) => DB.Value -> Either Text (Key record)
keyFrom_id idVal = case cast idVal of
(PersistMap m) -> keyFromValues $ map snd m
pv -> keyFromValues [pv]
-- | It would make sense to define the instance for ObjectId
-- and then use newtype deriving
-- however, that would create an ... | 335 | keyFrom_id idVal = case cast idVal of
(PersistMap m) -> keyFromValues $ map snd m
pv -> keyFromValues [pv]
-- | It would make sense to define the instance for ObjectId
-- and then use newtype deriving
-- however, that would create an orphan instance | 258 | false | true | 0 | 10 | 64 | 87 | 43 | 44 | null | null |
bergey/plots | src/Plots/API.hs | bsd-3-clause | -- Minors
-- | Add minor grid lines for all axes.
setMinorGridLines :: (Functor v, MonadState (Axis b v n) m) => m ()
setMinorGridLines = axisGridLines . mapped . minorGridF .= tickGridF | 187 | setMinorGridLines :: (Functor v, MonadState (Axis b v n) m) => m ()
setMinorGridLines = axisGridLines . mapped . minorGridF .= tickGridF | 136 | setMinorGridLines = axisGridLines . mapped . minorGridF .= tickGridF | 68 | true | true | 0 | 8 | 33 | 57 | 30 | 27 | null | null |
brendanhay/gogol | gogol-dataflow/gen/Network/Google/Resource/Dataflow/Projects/Jobs/WorkItems/ReportStatus.hs | mpl-2.0 | -- | Upload protocol for media (e.g. \"raw\", \"multipart\").
pjwirsUploadProtocol :: Lens' ProjectsJobsWorkItemsReportStatus (Maybe Text)
pjwirsUploadProtocol
= lens _pjwirsUploadProtocol
(\ s a -> s{_pjwirsUploadProtocol = a}) | 236 | pjwirsUploadProtocol :: Lens' ProjectsJobsWorkItemsReportStatus (Maybe Text)
pjwirsUploadProtocol
= lens _pjwirsUploadProtocol
(\ s a -> s{_pjwirsUploadProtocol = a}) | 174 | pjwirsUploadProtocol
= lens _pjwirsUploadProtocol
(\ s a -> s{_pjwirsUploadProtocol = a}) | 97 | true | true | 0 | 9 | 33 | 48 | 25 | 23 | null | null |
genos/online_problems | advent_of_code_2018/day13/src/Main.hs | mit | step :: Monad m => (YX -> m ()) -> Track -> Carts -> m Carts
step collide track = tick M.empty
where
tick past (M.minViewWithKey -> Just ((k, (o, n)), future))
| M.member k' past || M.member k' future
= collide k' >> (tick `on` M.delete k') past future
| otherwise
= tick (M.insert k' v past) future
... | 686 | step :: Monad m => (YX -> m ()) -> Track -> Carts -> m Carts
step collide track = tick M.empty
where
tick past (M.minViewWithKey -> Just ((k, (o, n)), future))
| M.member k' past || M.member k' future
= collide k' >> (tick `on` M.delete k') past future
| otherwise
= tick (M.insert k' v past) future
... | 686 | step collide track = tick M.empty
where
tick past (M.minViewWithKey -> Just ((k, (o, n)), future))
| M.member k' past || M.member k' future
= collide k' >> (tick `on` M.delete k') past future
| otherwise
= tick (M.insert k' v past) future
where
k' = move o k
v = case M.lookup k' track of
... | 625 | false | true | 4 | 15 | 255 | 354 | 167 | 187 | null | null |
ItsLastDay/academic_university_2016-2018 | subjects/Haskell/5/homework.hs | gpl-3.0 | repeatEveryElem :: Int -> [a] -> [a]
repeatEveryElem k [] = [] | 62 | repeatEveryElem :: Int -> [a] -> [a]
repeatEveryElem k [] = [] | 62 | repeatEveryElem k [] = [] | 25 | false | true | 0 | 9 | 11 | 40 | 19 | 21 | null | null |
Cortlandd/haskell-opencv | src/OpenCV/Internal/ImgProc/MiscImgTransform/ColorCodes.hs | bsd-3-clause | gray_YVYU :: Proxy 'GRAY_YVYU; gray_YVYU = Proxy | 50 | gray_YVYU :: Proxy 'GRAY_YVYU
gray_YVYU = Proxy | 49 | gray_YVYU = Proxy | 18 | false | true | 0 | 6 | 8 | 17 | 9 | 8 | null | null |
edsko/cabal | cabal-install/Distribution/Client/Targets.hs | bsd-3-clause | localPackageError :: FilePath -> String
localPackageError dir =
"Error reading local package.\nCouldn't find .cabal file in: " ++ dir | 137 | localPackageError :: FilePath -> String
localPackageError dir =
"Error reading local package.\nCouldn't find .cabal file in: " ++ dir | 137 | localPackageError dir =
"Error reading local package.\nCouldn't find .cabal file in: " ++ dir | 97 | false | true | 0 | 5 | 22 | 22 | 11 | 11 | null | null |
solidsnack/bytestring-nums | Data/ByteString/Nums/Careless/Int.hs | bsd-3-clause | positive :: (Num n) => n -> Word8 -> n
positive acc byte = (acc * 10) + fromIntegral (byte - c2w '0') | 133 | positive :: (Num n) => n -> Word8 -> n
positive acc byte = (acc * 10) + fromIntegral (byte - c2w '0') | 133 | positive acc byte = (acc * 10) + fromIntegral (byte - c2w '0') | 74 | false | true | 0 | 9 | 54 | 57 | 29 | 28 | null | null |
rahulmutt/ghcvm | compiler/Eta/SimplCore/OccurAnal.hs | bsd-3-clause | loopBreakNodes :: Int
-> VarSet -- All binders
-> VarSet -- Binders whose dependencies may be "missing"
-- See Note [Weak loop breakers]
-> [Node Details]
-> [Binding] -- Append these to the end
... | 893 | loopBreakNodes :: Int
-> VarSet -- All binders
-> VarSet -- Binders whose dependencies may be "missing"
-- See Note [Weak loop breakers]
-> [Node Details]
-> [Binding] -- Append these to the end
... | 808 | loopBreakNodes depth bndr_set weak_fvs nodes binds
= go (stronglyConnCompFromEdgedVerticesR nodes) binds
where
go [] binds = binds
go (scc:sccs) binds = loop_break_scc scc (go sccs binds)
loop_break_scc scc binds
= case scc of
AcyclicSCC node -> mk_non_loop_breaker weak_fvs nod... | 467 | true | true | 0 | 10 | 302 | 186 | 93 | 93 | null | null |
siddhanathan/ghc | compiler/cmm/CmmSwitch.hs | bsd-3-clause | createSwitchPlan (SwitchTargets signed range mbdef m) =
-- pprTrace "createSwitchPlan" (text (show ids) $$ text (show (range,m)) $$ text (show pieces) $$ text (show flatPlan) $$ text (show plan)) $
plan
where
pieces = concatMap breakTooSmall $ splitAtHoles maxJumpTableHole m
flatPlan = findSingleValue... | 452 | createSwitchPlan (SwitchTargets signed range mbdef m) =
-- pprTrace "createSwitchPlan" (text (show ids) $$ text (show (range,m)) $$ text (show pieces) $$ text (show flatPlan) $$ text (show plan)) $
plan
where
pieces = concatMap breakTooSmall $ splitAtHoles maxJumpTableHole m
flatPlan = findSingleValue... | 452 | createSwitchPlan (SwitchTargets signed range mbdef m) =
-- pprTrace "createSwitchPlan" (text (show ids) $$ text (show (range,m)) $$ text (show pieces) $$ text (show flatPlan) $$ text (show plan)) $
plan
where
pieces = concatMap breakTooSmall $ splitAtHoles maxJumpTableHole m
flatPlan = findSingleValue... | 452 | false | false | 0 | 7 | 87 | 75 | 38 | 37 | null | null |
samscott89/tamarin-prover | lib/term/src/Term/Maude/Process.hs | gpl-3.0 | unifyCmd :: [Equal MTerm] -> ByteString
unifyCmd [] = error "unifyCmd: cannot create cmd for empty list of equations." | 119 | unifyCmd :: [Equal MTerm] -> ByteString
unifyCmd [] = error "unifyCmd: cannot create cmd for empty list of equations." | 119 | unifyCmd [] = error "unifyCmd: cannot create cmd for empty list of equations." | 79 | false | true | 0 | 7 | 19 | 29 | 14 | 15 | null | null |
eklavya/Idris-dev | src/Idris/ElabDecls.hs | bsd-3-clause | elabDecl' what info (PProvider doc syn fc nfc provWhat n)
| what /= EDefns
= do logElab 1 $ "Elaborating type provider " ++ show n
elabProvider doc info syn fc nfc provWhat n | 189 | elabDecl' what info (PProvider doc syn fc nfc provWhat n)
| what /= EDefns
= do logElab 1 $ "Elaborating type provider " ++ show n
elabProvider doc info syn fc nfc provWhat n | 189 | elabDecl' what info (PProvider doc syn fc nfc provWhat n)
| what /= EDefns
= do logElab 1 $ "Elaborating type provider " ++ show n
elabProvider doc info syn fc nfc provWhat n | 189 | false | false | 0 | 10 | 48 | 74 | 33 | 41 | null | null |
tek/proteome | packages/proteome/lib/Proteome/Filename.hs | mit | maybeDir ::
MonadIO m =>
Path Abs Dir ->
Text ->
m Bool
maybeDir cwd spec =
fromMaybe False <$> traverse doesDirExist (absoluteParseDir cwd spec) | 155 | maybeDir ::
MonadIO m =>
Path Abs Dir ->
Text ->
m Bool
maybeDir cwd spec =
fromMaybe False <$> traverse doesDirExist (absoluteParseDir cwd spec) | 155 | maybeDir cwd spec =
fromMaybe False <$> traverse doesDirExist (absoluteParseDir cwd spec) | 91 | false | true | 0 | 8 | 34 | 59 | 27 | 32 | null | null |
orchid-hybrid/WHILE | Parser.hs | gpl-2.0 | brackets p = between (char '(' <* skipSpaces) (char ')') p | 58 | brackets p = between (char '(' <* skipSpaces) (char ')') p | 58 | brackets p = between (char '(' <* skipSpaces) (char ')') p | 58 | false | false | 0 | 8 | 10 | 32 | 15 | 17 | null | null |
spechub/Hets | CASL/Overload.hs | gpl-2.0 | showSort :: [SORT] -> String
showSort s = case s of
[ft] -> "a term of sort '" ++ shows ft "' was "
_ -> "terms of sorts " ++ showDoc s " were " | 162 | showSort :: [SORT] -> String
showSort s = case s of
[ft] -> "a term of sort '" ++ shows ft "' was "
_ -> "terms of sorts " ++ showDoc s " were " | 162 | showSort s = case s of
[ft] -> "a term of sort '" ++ shows ft "' was "
_ -> "terms of sorts " ++ showDoc s " were " | 133 | false | true | 0 | 9 | 53 | 63 | 30 | 33 | null | null |
fmapfmapfmap/amazonka | amazonka-opsworks/gen/Network/AWS/OpsWorks/SetPermission.hs | mpl-2.0 | -- | Creates a value of 'SetPermissionResponse' with the minimum fields required to make a request.
--
setPermissionResponse
:: SetPermissionResponse
setPermissionResponse = SetPermissionResponse' | 200 | setPermissionResponse
:: SetPermissionResponse
setPermissionResponse = SetPermissionResponse' | 97 | setPermissionResponse = SetPermissionResponse' | 46 | true | true | 1 | 5 | 26 | 17 | 8 | 9 | null | null |
forked-upstream-packages-for-ghcjs/ghc | utils/genprimopcode/Main.hs | bsd-3-clause | mkPOI_LHS_text :: Entry -> String
mkPOI_LHS_text i
= "primOpInfo " ++ cons i ++ " = " | 88 | mkPOI_LHS_text :: Entry -> String
mkPOI_LHS_text i
= "primOpInfo " ++ cons i ++ " = " | 88 | mkPOI_LHS_text i
= "primOpInfo " ++ cons i ++ " = " | 54 | false | true | 0 | 7 | 19 | 35 | 15 | 20 | null | null |
ctford/Idris-Elba-dev | src/Idris/ParseHelpers.hs | bsd-3-clause | -- Taken from Parsec (c) Daan Leijen 1999-2001, (c) Paolo Martini 2007
-- | Parses a reserved operator
reservedOp :: MonadicParsing m => String -> m ()
reservedOp name = token $ try $
do string name
notFollowedBy (operatorLetter) <?> ("end of " ++ show name)
-- | Parses an identifier as a token | 303 | reservedOp :: MonadicParsing m => String -> m ()
reservedOp name = token $ try $
do string name
notFollowedBy (operatorLetter) <?> ("end of " ++ show name)
-- | Parses an identifier as a token | 200 | reservedOp name = token $ try $
do string name
notFollowedBy (operatorLetter) <?> ("end of " ++ show name)
-- | Parses an identifier as a token | 151 | true | true | 0 | 11 | 61 | 70 | 34 | 36 | null | null |
uduki/hsQt | Qtc/Gui/QTextCharFormat.hs | bsd-2-clause | anchorName :: QTextCharFormat a -> (()) -> IO (String)
anchorName x0 ()
= withStringResult $
withObjectPtr x0 $ \cobj_x0 ->
qtc_QTextCharFormat_anchorName cobj_x0 | 172 | anchorName :: QTextCharFormat a -> (()) -> IO (String)
anchorName x0 ()
= withStringResult $
withObjectPtr x0 $ \cobj_x0 ->
qtc_QTextCharFormat_anchorName cobj_x0 | 172 | anchorName x0 ()
= withStringResult $
withObjectPtr x0 $ \cobj_x0 ->
qtc_QTextCharFormat_anchorName cobj_x0 | 117 | false | true | 0 | 8 | 31 | 59 | 29 | 30 | null | null |
afroisalreadyinu/LogAnalyzer | daemon/Regular.hs | gpl-2.0 | costFuncRE Number = 5 | 21 | costFuncRE Number = 5 | 21 | costFuncRE Number = 5 | 21 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
forked-upstream-packages-for-ghcjs/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | stablePtrTyConKey = mkPreludeTyConUnique 36 | 65 | stablePtrTyConKey = mkPreludeTyConUnique 36 | 65 | stablePtrTyConKey = mkPreludeTyConUnique 36 | 65 | false | false | 0 | 5 | 25 | 9 | 4 | 5 | null | null |
michalkonecny/aern | aern-fnreps/src/FnReps/Polynomial/UnaryChebSparse/DCTMultiplication.hs | bsd-3-clause | tSDCT_III_reference ::
[RA] {-^ h a vector of validated real numbers -} ->
[RA] {-^ h~ a vector of validated real numbers -}
tSDCT_III_reference h =
-- trace (
-- "rPi = " ++ show rPi
-- ++ "\ncN = " ++ show cN
-- ++ "\ncN1 = " ++ show cN1
-- ++ "\n( (((4*3+1)*3 :: Int) |* rPi) ... | 1,012 | tSDCT_III_reference ::
[RA] {-^ h a vector of validated real numbers -} ->
[RA]
tSDCT_III_reference h =
-- trace (
-- "rPi = " ++ show rPi
-- ++ "\ncN = " ++ show cN
-- ++ "\ncN1 = " ++ show cN1
-- ++ "\n( (((4*3+1)*3 :: Int) |* rPi) /| cN) = " ++ show (( (((4*3+1)*3 :: Int) |* ... | 967 | tSDCT_III_reference h =
-- trace (
-- "rPi = " ++ show rPi
-- ++ "\ncN = " ++ show cN
-- ++ "\ncN1 = " ++ show cN1
-- ++ "\n( (((4*3+1)*3 :: Int) |* rPi) /| cN) = " ++ show (( (((4*3+1)*3 :: Int) |* rPi) /| cN))
-- ++ "\ncos ( (((4*3+1)*3 :: Int) |* rPi) /| cN) = " ++ show (cos ( (... | 877 | true | true | 0 | 18 | 329 | 156 | 90 | 66 | null | null |
spechub/Hets | OWL2/ShipSyntax.hs | gpl-2.0 | eqOrLess :: CharParser st EqOrLess
eqOrLess = (equalP >> return Eq) <|> (skipChar '<' >> return Less) | 101 | eqOrLess :: CharParser st EqOrLess
eqOrLess = (equalP >> return Eq) <|> (skipChar '<' >> return Less) | 101 | eqOrLess = (equalP >> return Eq) <|> (skipChar '<' >> return Less) | 66 | false | true | 0 | 8 | 16 | 43 | 21 | 22 | null | null |
awakenetworks/gRPC-haskell | src/Network/GRPC/HighLevel/Server.hs | apache-2.0 | convertGeneratedServerHandler ::
(ServerRequest 'Normal request response -> IO (ServerResponse 'Normal response))
-> ServerHandler request response
convertGeneratedServerHandler handler call =
do let call' = call { payload = () }
ServerNormalResponse rsp meta stsCode stsDetails <-
handler (ServerNorma... | 395 | convertGeneratedServerHandler ::
(ServerRequest 'Normal request response -> IO (ServerResponse 'Normal response))
-> ServerHandler request response
convertGeneratedServerHandler handler call =
do let call' = call { payload = () }
ServerNormalResponse rsp meta stsCode stsDetails <-
handler (ServerNorma... | 395 | convertGeneratedServerHandler handler call =
do let call' = call { payload = () }
ServerNormalResponse rsp meta stsCode stsDetails <-
handler (ServerNormalRequest call' (payload call))
return (rsp, meta, stsCode, stsDetails) | 243 | false | true | 0 | 12 | 67 | 125 | 61 | 64 | null | null |
nyaxt/dmix | nkmd/as/Mnemonic.hs | mit | memSelBits MR = 0x1 | 19 | memSelBits MR = 0x1 | 19 | memSelBits MR = 0x1 | 19 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
dreamcodez/m2haskell | M2Handler.hs | bsd-2-clause | getCodeDescription :: Int -> String
getCodeDescription 200 = "OK" | 65 | getCodeDescription :: Int -> String
getCodeDescription 200 = "OK" | 65 | getCodeDescription 200 = "OK" | 29 | false | true | 0 | 7 | 8 | 24 | 10 | 14 | null | null |
wxwxwwxxx/ghc | testsuite/tests/typecheck/should_fail/T7453.hs | bsd-3-clause | cast3' :: a -> b
cast3' = cast3 | 31 | cast3' :: a -> b
cast3' = cast3 | 31 | cast3' = cast3 | 14 | false | true | 0 | 5 | 7 | 15 | 8 | 7 | null | null |
DylanSp/zmachine-interpreter | src/Instruction.hs | mit | decodeBranchTarget :: ByteAddress -> Word8 -> Int -> BranchAddress
decodeBranchTarget branchCodeAddress high offset = BranchTargetAddress branchTarget
where branchLength = if fetchBit bit6 high then 1 else 2
(ByteAddress addressAfter) = incByteAddrBy branchCodeAddress branchLength
branchTarget =... | 367 | decodeBranchTarget :: ByteAddress -> Word8 -> Int -> BranchAddress
decodeBranchTarget branchCodeAddress high offset = BranchTargetAddress branchTarget
where branchLength = if fetchBit bit6 high then 1 else 2
(ByteAddress addressAfter) = incByteAddrBy branchCodeAddress branchLength
branchTarget =... | 367 | decodeBranchTarget branchCodeAddress high offset = BranchTargetAddress branchTarget
where branchLength = if fetchBit bit6 high then 1 else 2
(ByteAddress addressAfter) = incByteAddrBy branchCodeAddress branchLength
branchTarget = InstructionAddress (addressAfter + offset - 2) | 300 | false | true | 2 | 8 | 64 | 100 | 46 | 54 | null | null |
tel/haskell-maia | maia/src/Maia/Language.hs | mpl-2.0 | fieldsSing :: HasApi t => Proxy t -> Sing (Fields t)
fieldsSing _ = sing | 72 | fieldsSing :: HasApi t => Proxy t -> Sing (Fields t)
fieldsSing _ = sing | 72 | fieldsSing _ = sing | 19 | false | true | 0 | 9 | 14 | 37 | 17 | 20 | null | null |
jtojnar/haste-compiler | libraries/ghc-7.10/ghc-prim/GHC/PrimopWrappers.hs | bsd-3-clause | myThreadId# :: State# (RealWorld) -> (# State# (RealWorld),ThreadId# #)
myThreadId# a1 = (GHC.Prim.myThreadId#) a1 | 114 | myThreadId# :: State# (RealWorld) -> (# State# (RealWorld),ThreadId# #)
myThreadId# a1 = (GHC.Prim.myThreadId#) a1 | 114 | myThreadId# a1 = (GHC.Prim.myThreadId#) a1 | 42 | false | true | 0 | 10 | 13 | 49 | 24 | 25 | null | null |
romanb/amazonka | amazonka-storagegateway/gen/Network/AWS/StorageGateway/Types.hs | mpl-2.0 | cscsivVolumeStatus :: Lens' CachediSCSIVolume (Maybe Text)
cscsivVolumeStatus =
lens _cscsivVolumeStatus (\s a -> s { _cscsivVolumeStatus = a }) | 148 | cscsivVolumeStatus :: Lens' CachediSCSIVolume (Maybe Text)
cscsivVolumeStatus =
lens _cscsivVolumeStatus (\s a -> s { _cscsivVolumeStatus = a }) | 148 | cscsivVolumeStatus =
lens _cscsivVolumeStatus (\s a -> s { _cscsivVolumeStatus = a }) | 89 | false | true | 0 | 9 | 22 | 45 | 24 | 21 | null | null |
redongjun/haskellschool | parsec/json_parser.hs | unlicense | bool :: Parser Bool
bool = boolTrue <|> boolFalse | 49 | bool :: Parser Bool
bool = boolTrue <|> boolFalse | 49 | bool = boolTrue <|> boolFalse | 29 | false | true | 3 | 6 | 8 | 27 | 12 | 15 | null | null |
zebbo/stack-machine | src/StackMachine/SMAssembler.hs | gpl-3.0 | transition (c,l) _ Invalid = ((c,l), Invalid) | 45 | transition (c,l) _ Invalid = ((c,l), Invalid) | 45 | transition (c,l) _ Invalid = ((c,l), Invalid) | 45 | false | false | 0 | 6 | 6 | 31 | 18 | 13 | null | null |
brendanhay/gogol | gogol-debugger/gen/Network/Google/Debugger/Types/Product.hs | mpl-2.0 | -- | If set to \`true\`, indicates that Controller service does not detect
-- any activity from the debuggee agents and the application is possibly
-- stopped.
dIsInactive :: Lens' Debuggee (Maybe Bool)
dIsInactive
= lens _dIsInactive (\ s a -> s{_dIsInactive = a}) | 267 | dIsInactive :: Lens' Debuggee (Maybe Bool)
dIsInactive
= lens _dIsInactive (\ s a -> s{_dIsInactive = a}) | 107 | dIsInactive
= lens _dIsInactive (\ s a -> s{_dIsInactive = a}) | 64 | true | true | 0 | 9 | 45 | 50 | 27 | 23 | null | null |
ziman/idris-py | src/IRTS/CodegenPython.hs | bsd-3-clause | cgConst (Ch c) = text $ pyShowStr [c] | 37 | cgConst (Ch c) = text $ pyShowStr [c] | 37 | cgConst (Ch c) = text $ pyShowStr [c] | 37 | false | false | 2 | 6 | 7 | 27 | 12 | 15 | null | null |
keithodulaigh/Hets | Proofs/SimpleTheoremHideShift.hs | gpl-2.0 | {- | apply the theorem hide shift with a list of hiding definition links.
it calls the function for one hiding edge at a time and fills the history
if necessary.
-}
theoremHideShiftFromList :: DGraph -> LEdge DGLinkLab -> DGraph
theoremHideShiftFromList dgraph e = let
newDGraph = theoremHideShiftWithOneHi... | 390 | theoremHideShiftFromList :: DGraph -> LEdge DGLinkLab -> DGraph
theoremHideShiftFromList dgraph e = let
newDGraph = theoremHideShiftWithOneHidingDefEdge dgraph e
in groupHistory dgraph thmHideShift newDGraph | 215 | theoremHideShiftFromList dgraph e = let
newDGraph = theoremHideShiftWithOneHidingDefEdge dgraph e
in groupHistory dgraph thmHideShift newDGraph | 151 | true | true | 0 | 9 | 72 | 52 | 24 | 28 | null | null |
ezyang/ghc | compiler/profiling/CostCentre.hs | bsd-3-clause | isCafCC :: CostCentre -> Bool
isCafCC (AllCafsCC {}) = True | 75 | isCafCC :: CostCentre -> Bool
isCafCC (AllCafsCC {}) = True | 75 | isCafCC (AllCafsCC {}) = True | 45 | false | true | 1 | 8 | 25 | 30 | 14 | 16 | null | null |
haraldsteinlechner/lambdaWolf | src/Test.hs | gpl-3.0 | -- prevent divide by zero
resizeScene width height = do
glViewport 0 0 (fromIntegral width) (fromIntegral height)
glMatrixMode gl_PROJECTION
glLoadIdentity
gluPerspective 45 (fromIntegral width/fromIntegral height) 1 5000
glMatrixMode gl_MODELVIEW
glLoadIdentity
glFlush | 284 | resizeScene width height = do
glViewport 0 0 (fromIntegral width) (fromIntegral height)
glMatrixMode gl_PROJECTION
glLoadIdentity
gluPerspective 45 (fromIntegral width/fromIntegral height) 1 5000
glMatrixMode gl_MODELVIEW
glLoadIdentity
glFlush | 258 | resizeScene width height = do
glViewport 0 0 (fromIntegral width) (fromIntegral height)
glMatrixMode gl_PROJECTION
glLoadIdentity
gluPerspective 45 (fromIntegral width/fromIntegral height) 1 5000
glMatrixMode gl_MODELVIEW
glLoadIdentity
glFlush | 258 | true | false | 1 | 10 | 44 | 87 | 35 | 52 | null | null |
juriad/Cardguess | src/Main.hs | mit | {- | Guesses the given answer.
Gets initial response from guesser and accumulates list of responses. -}
guessCards :: Selection -> Result
guessCards ans =
let
answer = sort ans -- we need sorted selections only
initial = initialGuess $ length answer
in initial : guessLoop answer initial | 315 | guessCards :: Selection -> Result
guessCards ans =
let
answer = sort ans -- we need sorted selections only
initial = initialGuess $ length answer
in initial : guessLoop answer initial | 207 | guessCards ans =
let
answer = sort ans -- we need sorted selections only
initial = initialGuess $ length answer
in initial : guessLoop answer initial | 173 | true | true | 0 | 10 | 75 | 55 | 27 | 28 | null | null |
mgrabmueller/waddle | Game/Waddle/Load.hs | bsd-3-clause | getTexture :: Get Texture
getTexture = do
n <- trimNUL <$> getByteString 8
0 <- getWord16le
0 <- getWord16le
w <- fromIntegral <$> getWord16le
h <- fromIntegral <$> getWord16le
0 <- getWord16le
0 <- getWord16le
pdCnt <- fromIntegral <$> getWord16le
pDescs <- sequence (replicate pdCnt getPatchDescripto... | 450 | getTexture :: Get Texture
getTexture = do
n <- trimNUL <$> getByteString 8
0 <- getWord16le
0 <- getWord16le
w <- fromIntegral <$> getWord16le
h <- fromIntegral <$> getWord16le
0 <- getWord16le
0 <- getWord16le
pdCnt <- fromIntegral <$> getWord16le
pDescs <- sequence (replicate pdCnt getPatchDescripto... | 450 | getTexture = do
n <- trimNUL <$> getByteString 8
0 <- getWord16le
0 <- getWord16le
w <- fromIntegral <$> getWord16le
h <- fromIntegral <$> getWord16le
0 <- getWord16le
0 <- getWord16le
pdCnt <- fromIntegral <$> getWord16le
pDescs <- sequence (replicate pdCnt getPatchDescriptor)
return Texture {
... | 424 | false | true | 0 | 10 | 101 | 139 | 67 | 72 | null | null |
michaelficarra/purescript | src/Language/PureScript/Pretty/Types.hs | mit | typeLiterals :: Pattern () Type Box
typeLiterals = mkPattern match
where
match TypeWildcard = Just $ text "_"
match (TypeVar var) = Just $ text var
match (PrettyPrintObject row) = Just $ prettyPrintRowWith '{' '}' row
match (TypeConstructor ctor) = Just $ text $ runProperName $ disqualify ctor
match (TUnkno... | 525 | typeLiterals :: Pattern () Type Box
typeLiterals = mkPattern match
where
match TypeWildcard = Just $ text "_"
match (TypeVar var) = Just $ text var
match (PrettyPrintObject row) = Just $ prettyPrintRowWith '{' '}' row
match (TypeConstructor ctor) = Just $ text $ runProperName $ disqualify ctor
match (TUnkno... | 525 | typeLiterals = mkPattern match
where
match TypeWildcard = Just $ text "_"
match (TypeVar var) = Just $ text var
match (PrettyPrintObject row) = Just $ prettyPrintRowWith '{' '}' row
match (TypeConstructor ctor) = Just $ text $ runProperName $ disqualify ctor
match (TUnknown u) = Just $ text $ '_' : show u
... | 489 | false | true | 0 | 7 | 113 | 236 | 109 | 127 | null | null |
openbrainsrc/http-test | src/Test/HTTP.hs | mit | -- | Post a JSON value
postJSON :: (Ae.ToJSON a, Ae.FromJSON b) => Url -> a -> Session b
postJSON url x = do str <- post url $ T.unpack $ decodeUtf8 $ BL.toStrict $ Ae.encode x
case Ae.eitherDecode' $ BL.fromStrict $ encodeUtf8 $ T.pack str of
Right x -> return x
... | 436 | postJSON :: (Ae.ToJSON a, Ae.FromJSON b) => Url -> a -> Session b
postJSON url x = do str <- post url $ T.unpack $ decodeUtf8 $ BL.toStrict $ Ae.encode x
case Ae.eitherDecode' $ BL.fromStrict $ encodeUtf8 $ T.pack str of
Right x -> return x
Left err -> thr... | 413 | postJSON url x = do str <- post url $ T.unpack $ decodeUtf8 $ BL.toStrict $ Ae.encode x
case Ae.eitherDecode' $ BL.fromStrict $ encodeUtf8 $ T.pack str of
Right x -> return x
Left err -> throwError $ strMsg $ "POST "++url ++ " JSON decoding failure: "++ e... | 347 | true | true | 0 | 15 | 139 | 158 | 74 | 84 | null | null |
rahulmutt/ghcvm | compiler/Eta/BasicTypes/Lexeme.hs | bsd-3-clause | -- Ordinary type constructors and data constructors
startsVarSymASCII :: Char -> Bool
startsVarSymASCII c = c `elem` "!#$%&*+./<=>?@\\^|~-" | 140 | startsVarSymASCII :: Char -> Bool
startsVarSymASCII c = c `elem` "!#$%&*+./<=>?@\\^|~-" | 87 | startsVarSymASCII c = c `elem` "!#$%&*+./<=>?@\\^|~-" | 53 | true | true | 0 | 7 | 18 | 31 | 15 | 16 | null | null |
HairyDude/heal | EveApi/Values.hs | bsd-2-clause | ----------------------------------------------
-- List of calls by valid set of arguments. --
----------------------------------------------
apiCalls :: Map (Call, Scope) CallParams
apiCalls = M.fromList $
-- Public calls that need no auth and take no arguments
[((CallList, APIScope), CallParams APIScope CallL... | 7,622 | apiCalls :: Map (Call, Scope) CallParams
apiCalls = M.fromList $
-- Public calls that need no auth and take no arguments
[((CallList, APIScope), CallParams APIScope CallList NoKey [])] ++
map (\name -> ((name, EVEScope), CallParams EVEScope name NoKey []))
[CertificateTree -- static
,... | 7,480 | apiCalls = M.fromList $
-- Public calls that need no auth and take no arguments
[((CallList, APIScope), CallParams APIScope CallList NoKey [])] ++
map (\name -> ((name, EVEScope), CallParams EVEScope name NoKey []))
[CertificateTree -- static
,ErrorList -- static
... | 7,439 | true | true | 0 | 17 | 2,088 | 1,634 | 922 | 712 | null | null |
sherwoodwang/wxHaskell | wx/src/Graphics/UI/WX/Menu.hs | lgpl-2.1 | -- | Get a menu by name from a menu loaded from a resource file,
-- given the frame which owns the menu. You
-- can directly set properties on the item as part of the call, which
-- enables simple connection of event handlers (e.g. on command).
menuRes :: Window a -> String -> [Prop (Menu ())] -> IO (Menu ())
me... | 446 | menuRes :: Window a -> String -> [Prop (Menu ())] -> IO (Menu ())
menuRes parent menu_name props =
do
menu <- xmlResourceGetMenu parent menu_name
set menu props
return menu | 194 | menuRes parent menu_name props =
do
menu <- xmlResourceGetMenu parent menu_name
set menu props
return menu | 128 | true | true | 0 | 12 | 106 | 88 | 42 | 46 | null | null |
m4rw3r/warframe-dmg-hs | src/armor.hs | mit | modifierForDamageOnArmor Damage.Magnetic Shield = 0.75 | 65 | modifierForDamageOnArmor Damage.Magnetic Shield = 0.75 | 65 | modifierForDamageOnArmor Damage.Magnetic Shield = 0.75 | 65 | false | false | 0 | 6 | 15 | 15 | 6 | 9 | null | null |
adarqui/github | Github/PullRequests.hs | bsd-3-clause | -- | All pull requests for the repo, by owner, repo name, and pull request state.
-- | With authentification
--
-- > pullRequestsFor' (Just ("github-username", "github-password")) "rails" "rails" (Just "open")
--
-- State can be one of @all@, @open@, or @closed@. Default is @open@.
--
pullRequestsFor'' :: Maybe GithubA... | 556 | pullRequestsFor'' :: Maybe GithubAuth -> Maybe String -> String -> String -> IO (Either Error [PullRequest])
pullRequestsFor'' auth state userName reqRepoName =
githubGetWithQueryString' auth ["repos", userName, reqRepoName, "pulls"] $
maybe "" ("state=" ++) state | 270 | pullRequestsFor'' auth state userName reqRepoName =
githubGetWithQueryString' auth ["repos", userName, reqRepoName, "pulls"] $
maybe "" ("state=" ++) state | 161 | true | true | 0 | 12 | 85 | 95 | 52 | 43 | null | null |
romac/mental | src/Mental/Annotate.hs | bsd-3-clause | annotateM :: (Traversable f, Monad m)
=> (Cofree f b -> m a)
-> Cofree f b
-> m (Cofree f a)
annotateM f x = sequence (extend f x) | 160 | annotateM :: (Traversable f, Monad m)
=> (Cofree f b -> m a)
-> Cofree f b
-> m (Cofree f a)
annotateM f x = sequence (extend f x) | 160 | annotateM f x = sequence (extend f x) | 37 | false | true | 0 | 10 | 59 | 81 | 39 | 42 | null | null |
kishoredbn/barrelfish | hake/RuleDefs.hs | mit | kernelLdFlags "armv8" = ARMv8.kernelLdFlags | 43 | kernelLdFlags "armv8" = ARMv8.kernelLdFlags | 43 | kernelLdFlags "armv8" = ARMv8.kernelLdFlags | 43 | false | false | 0 | 5 | 3 | 11 | 5 | 6 | null | null |
zeniuseducation/poly-euler | haskell/next/one.hs | epl-1.0 | euler28 lim = succ $ sum $ map (\x -> 2 * (x^2 + (x^2 - (3 * (x - 1))))) [3,5..lim] | 83 | euler28 lim = succ $ sum $ map (\x -> 2 * (x^2 + (x^2 - (3 * (x - 1))))) [3,5..lim] | 83 | euler28 lim = succ $ sum $ map (\x -> 2 * (x^2 + (x^2 - (3 * (x - 1))))) [3,5..lim] | 83 | false | false | 1 | 17 | 21 | 81 | 42 | 39 | null | null |
ribag/ganeti-experiments | src/Ganeti/Objects.hs | gpl-2.0 | formatUidRange :: UidRange -> String
formatUidRange (lower, higher)
| lower == higher = show lower
| otherwise = show lower ++ "-" ++ show higher | 155 | formatUidRange :: UidRange -> String
formatUidRange (lower, higher)
| lower == higher = show lower
| otherwise = show lower ++ "-" ++ show higher | 155 | formatUidRange (lower, higher)
| lower == higher = show lower
| otherwise = show lower ++ "-" ++ show higher | 118 | false | true | 1 | 8 | 34 | 58 | 28 | 30 | null | null |
kumasento/accelerate | Data/Array/Accelerate/AST.hs | bsd-3-clause | showPreExpOp PrimConst{} = "PrimConst" | 45 | showPreExpOp PrimConst{} = "PrimConst" | 45 | showPreExpOp PrimConst{} = "PrimConst" | 45 | false | false | 0 | 6 | 10 | 13 | 6 | 7 | null | null |
rueshyna/gogol | gogol-compute/gen/Network/Google/Compute/Types/Product.hs | mpl-2.0 | -- | [Output Only] The array of errors encountered while processing this
-- operation.
oeErrors :: Lens' OperationError [OperationErrorErrorsItem]
oeErrors
= lens _oeErrors (\ s a -> s{_oeErrors = a}) .
_Default
. _Coerce | 235 | oeErrors :: Lens' OperationError [OperationErrorErrorsItem]
oeErrors
= lens _oeErrors (\ s a -> s{_oeErrors = a}) .
_Default
. _Coerce | 148 | oeErrors
= lens _oeErrors (\ s a -> s{_oeErrors = a}) .
_Default
. _Coerce | 88 | true | true | 1 | 9 | 47 | 60 | 30 | 30 | null | null |
joom/herbrand-prolog | src/Prolog/Parser.hs | mit | parseTerms :: Parser [H.Term]
parseTerms = do
optional spaces
first <- parseTerm
optional spaces
next <- (char ',' >> parseTerms) <|> (return [])
optional spaces
return (first:next) | 205 | parseTerms :: Parser [H.Term]
parseTerms = do
optional spaces
first <- parseTerm
optional spaces
next <- (char ',' >> parseTerms) <|> (return [])
optional spaces
return (first:next) | 205 | parseTerms = do
optional spaces
first <- parseTerm
optional spaces
next <- (char ',' >> parseTerms) <|> (return [])
optional spaces
return (first:next) | 175 | false | true | 0 | 12 | 50 | 92 | 40 | 52 | null | null |
rueshyna/gogol | gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/Products/Search.hs | mpl-2.0 | -- | The pql query used to query for products.
psPqlQuery :: Lens' ProductsSearch (Maybe Text)
psPqlQuery
= lens _psPqlQuery (\ s a -> s{_psPqlQuery = a}) | 156 | psPqlQuery :: Lens' ProductsSearch (Maybe Text)
psPqlQuery
= lens _psPqlQuery (\ s a -> s{_psPqlQuery = a}) | 109 | psPqlQuery
= lens _psPqlQuery (\ s a -> s{_psPqlQuery = a}) | 61 | true | true | 1 | 9 | 28 | 52 | 25 | 27 | null | null |
CodaFi/language-swift | src/Language/Swift/Lexer.hs | mit | whiteSpace = P.whiteSpace lexer | 32 | whiteSpace = P.whiteSpace lexer | 32 | whiteSpace = P.whiteSpace lexer | 32 | false | false | 0 | 6 | 4 | 11 | 5 | 6 | null | null |
ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/readOct_1.hs | mit | psMyInt :: MyInt -> MyInt -> MyInt
psMyInt = primPlusInt | 60 | psMyInt :: MyInt -> MyInt -> MyInt
psMyInt = primPlusInt | 60 | psMyInt = primPlusInt | 21 | false | true | 0 | 8 | 13 | 26 | 11 | 15 | null | null |
kmate/HaRe | old/tools/base/Modules/AST4ModSys.hs | bsd-3-clause | hsIdentToHsName (HsCon pnt) =pNTtoHsName pnt | 44 | hsIdentToHsName (HsCon pnt) =pNTtoHsName pnt | 44 | hsIdentToHsName (HsCon pnt) =pNTtoHsName pnt | 44 | false | false | 0 | 6 | 4 | 19 | 8 | 11 | null | null |
bogwonch/SecPAL | src/SecPAL.hs | gpl-3.0 | options :: [OptDescr (Options -> IO Options)]
options =
[ Option "f" ["file"]
(ReqArg (\f opts -> return opts{optACFile = Just f}) "FILE")
"assertion context file"
, Option "d" ["debug"]
(NoArg (\opts -> return opts{optDebug = True}))
"debug mode"
, Option "h" ["help"]
(NoArg (\... | 759 | options :: [OptDescr (Options -> IO Options)]
options =
[ Option "f" ["file"]
(ReqArg (\f opts -> return opts{optACFile = Just f}) "FILE")
"assertion context file"
, Option "d" ["debug"]
(NoArg (\opts -> return opts{optDebug = True}))
"debug mode"
, Option "h" ["help"]
(NoArg (\o... | 758 | options =
[ Option "f" ["file"]
(ReqArg (\f opts -> return opts{optACFile = Just f}) "FILE")
"assertion context file"
, Option "d" ["debug"]
(NoArg (\opts -> return opts{optDebug = True}))
"debug mode"
, Option "h" ["help"]
(NoArg (\opts -> return opts{optHelp = True}))
"sh... | 712 | false | true | 0 | 14 | 194 | 274 | 149 | 125 | null | null |
xenog/haskoin | test/regtest/Main.hs | unlicense | myTime :: Timestamp
myTime = 1499083075 | 39 | myTime :: Timestamp
myTime = 1499083075 | 39 | myTime = 1499083075 | 19 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
isido/functional-morphology-for-koine-greek | greek/RulesGreek.hs | gpl-3.0 | {-- Nouns --}
-- First declension
decl1time :: DictForm -> Noun
decl1time time (NounForm n c) =
mkStr $
case n of
Singular -> case c of
Nominative -> time
Accusative -> tim ++ "ην"
Genitive -> tim ++ "ηs"
... | 719 | decl1time :: DictForm -> Noun
decl1time time (NounForm n c) =
mkStr $
case n of
Singular -> case c of
Nominative -> time
Accusative -> tim ++ "ην"
Genitive -> tim ++ "ηs"
Dative -> tim ++ "ῃ... | 683 | decl1time time (NounForm n c) =
mkStr $
case n of
Singular -> case c of
Nominative -> time
Accusative -> tim ++ "ην"
Genitive -> tim ++ "ηs"
Dative -> tim ++ "ῃ"
Vo... | 653 | true | true | 0 | 15 | 395 | 164 | 82 | 82 | null | null |
bryce-anderson/binfix | src/Main.hs | apache-2.0 | avgCorr :: [(FilePath, Integer)] -> Integer
avgCorr xs = go xs 0 0 where
go [] 0 _ = 0
go [] acc c = round $ (fromIntegral acc) / (fromIntegral c)
go ((_,0):xs) acc c = go xs acc c -- drop zeros
go ((_,x):xs) acc c = go xs (acc+x) (c+1) | 262 | avgCorr :: [(FilePath, Integer)] -> Integer
avgCorr xs = go xs 0 0 where
go [] 0 _ = 0
go [] acc c = round $ (fromIntegral acc) / (fromIntegral c)
go ((_,0):xs) acc c = go xs acc c -- drop zeros
go ((_,x):xs) acc c = go xs (acc+x) (c+1) | 262 | avgCorr xs = go xs 0 0 where
go [] 0 _ = 0
go [] acc c = round $ (fromIntegral acc) / (fromIntegral c)
go ((_,0):xs) acc c = go xs acc c -- drop zeros
go ((_,x):xs) acc c = go xs (acc+x) (c+1) | 218 | false | true | 0 | 10 | 78 | 163 | 86 | 77 | null | null |
goldfirere/singletons | singletons-th/src/Data/Singletons/TH/Util.hs | bsd-3-clause | filterInvisTvbArgs :: DFunArgs -> [DTyVarBndrSpec]
filterInvisTvbArgs DFANil = [] | 91 | filterInvisTvbArgs :: DFunArgs -> [DTyVarBndrSpec]
filterInvisTvbArgs DFANil = [] | 91 | filterInvisTvbArgs DFANil = [] | 40 | false | true | 0 | 6 | 18 | 23 | 12 | 11 | null | null |
rasata/iyql | src/main/haskell/Yql/Data/PPrint.hs | gpl-3.0 | style _ Nil = Nil | 30 | style _ Nil = Nil | 30 | style _ Nil = Nil | 30 | false | false | 0 | 5 | 17 | 11 | 5 | 6 | null | null |
fmthoma/ghc | compiler/hsSyn/HsPat.hs | bsd-3-clause | hsPatNeedsParens (SplicePat {}) = False | 44 | hsPatNeedsParens (SplicePat {}) = False | 44 | hsPatNeedsParens (SplicePat {}) = False | 44 | false | false | 0 | 7 | 9 | 16 | 8 | 8 | null | null |
alexbiehl/hoop | hadoop-protos/src/Hadoop/Protos/YarnServerResourceManagerRecoveryProtos/RMAppAttemptStateProto.hs | mit | toMaybe'Enum 9 = Prelude'.Just RMATTEMPT_FINISHED | 49 | toMaybe'Enum 9 = Prelude'.Just RMATTEMPT_FINISHED | 49 | toMaybe'Enum 9 = Prelude'.Just RMATTEMPT_FINISHED | 49 | false | false | 1 | 6 | 4 | 17 | 6 | 11 | null | null |
dotnetCarpenter/haskell1 | ch05/more_recursion.hs | isc | zip' :: [a] -> [b] -> [(a,b)]
zip' _ [] = [] | 44 | zip' :: [a] -> [b] -> [(a,b)]
zip' _ [] = [] | 44 | zip' _ [] = [] | 14 | false | true | 0 | 8 | 11 | 43 | 24 | 19 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.