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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
DavidAlphaFox/ghc | utils/haddock/haddock-library/vendor/attoparsec-0.12.1.1/Data/Attoparsec/ByteString/Char8.hs | bsd-3-clause | -- | Match a letter, in the ISO-8859-15 encoding.
letter_iso8859_15 :: Parser Char
letter_iso8859_15 = satisfy isAlpha_iso8859_15 <?> "letter_iso8859_15" | 153 | letter_iso8859_15 :: Parser Char
letter_iso8859_15 = satisfy isAlpha_iso8859_15 <?> "letter_iso8859_15" | 103 | letter_iso8859_15 = satisfy isAlpha_iso8859_15 <?> "letter_iso8859_15" | 70 | true | true | 0 | 6 | 18 | 22 | 11 | 11 | null | null |
elieux/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | traverse_RDR = varQual_RDR dATA_TRAVERSABLE (fsLit "traverse") | 76 | traverse_RDR = varQual_RDR dATA_TRAVERSABLE (fsLit "traverse") | 76 | traverse_RDR = varQual_RDR dATA_TRAVERSABLE (fsLit "traverse") | 76 | false | false | 0 | 7 | 19 | 17 | 8 | 9 | null | null |
adamse/haddock | haddock-api/src/Haddock/Interface/LexParseRn.hs | bsd-2-clause | outOfScope :: DynFlags -> RdrName -> Doc a
outOfScope dflags x =
case x of
Unqual occ -> monospaced occ
Qual mdl occ -> DocIdentifierUnchecked (mdl, occ)
Orig _ occ -> monospaced occ
Exact name -> monospaced name -- Shouldn't happen since x is out of scope
where
monospaced a = DocMonospaced (Do... | 347 | outOfScope :: DynFlags -> RdrName -> Doc a
outOfScope dflags x =
case x of
Unqual occ -> monospaced occ
Qual mdl occ -> DocIdentifierUnchecked (mdl, occ)
Orig _ occ -> monospaced occ
Exact name -> monospaced name -- Shouldn't happen since x is out of scope
where
monospaced a = DocMonospaced (Do... | 347 | outOfScope dflags x =
case x of
Unqual occ -> monospaced occ
Qual mdl occ -> DocIdentifierUnchecked (mdl, occ)
Orig _ occ -> monospaced occ
Exact name -> monospaced name -- Shouldn't happen since x is out of scope
where
monospaced a = DocMonospaced (DocString (showPpr dflags a)) | 304 | false | true | 0 | 9 | 80 | 118 | 55 | 63 | null | null |
conal/reification-rules | src/ReificationRules/Misc.hs | bsd-3-clause | unknown :: a -> b
unknown _ = error "unknown: not implemented" | 62 | unknown :: a -> b
unknown _ = error "unknown: not implemented" | 62 | unknown _ = error "unknown: not implemented" | 44 | false | true | 0 | 5 | 11 | 21 | 10 | 11 | null | null |
GaloisInc/saw-script | saw/SAWScript/REPL/Command.hs | bsd-3-clause | quitCmd :: REPL ()
quitCmd = stop | 34 | quitCmd :: REPL ()
quitCmd = stop | 34 | quitCmd = stop | 15 | false | true | 1 | 6 | 7 | 20 | 8 | 12 | null | null |
Philonous/pontarius-xmpp | tests/Tests/Picklers.hs | bsd-3-clause | prop_xpIQRequestType_invertibe :: IQRequestType -> Bool
prop_xpMessageType_invertibe = tpsi xpMessageType | 114 | prop_xpIQRequestType_invertibe :: IQRequestType -> Bool
prop_xpMessageType_invertibe = tpsi xpMessageType | 114 | prop_xpMessageType_invertibe = tpsi xpMessageType | 58 | false | true | 0 | 5 | 17 | 18 | 9 | 9 | null | null |
ninedotnine/bugfree-computing-machine | src/AsmParser.hs | gpl-3.0 | mulop :: MyParser (Integer -> Integer -> Integer)
mulop = spaces *> char '*' *> spaces *> return (*)
<|> spaces *> char '/' *> spaces *> return div
<|> spaces *> char '%' *> spaces *> return rem | 203 | mulop :: MyParser (Integer -> Integer -> Integer)
mulop = spaces *> char '*' *> spaces *> return (*)
<|> spaces *> char '/' *> spaces *> return div
<|> spaces *> char '%' *> spaces *> return rem | 203 | mulop = spaces *> char '*' *> spaces *> return (*)
<|> spaces *> char '/' *> spaces *> return div
<|> spaces *> char '%' *> spaces *> return rem | 153 | false | true | 6 | 8 | 47 | 95 | 47 | 48 | null | null |
gridaphobe/ghc | compiler/deSugar/PmExpr.hs | bsd-3-clause | -- | Expression `True'
truePmExpr :: PmExpr
truePmExpr = PmExprCon trueDataCon [] | 81 | truePmExpr :: PmExpr
truePmExpr = PmExprCon trueDataCon [] | 58 | truePmExpr = PmExprCon trueDataCon [] | 37 | true | true | 0 | 6 | 11 | 19 | 10 | 9 | null | null |
joelburget/react-haskell | src/React/DOM.hs | mit | output_ :: [AttrOrHandler sig] -> ReactNode sig -> ReactNode sig
output_ = domParent "output" | 93 | output_ :: [AttrOrHandler sig] -> ReactNode sig -> ReactNode sig
output_ = domParent "output" | 93 | output_ = domParent "output" | 28 | false | true | 0 | 8 | 13 | 39 | 17 | 22 | null | null |
noraesae/euler | src/Problem19.hs | bsd-3-clause | getDayOfWeek year month day = ((getDayOfWeek year 1 day) + (foldl1 (+) $ map (daysOfMonth year) [1..(month-1)])) `mod` 7 | 120 | getDayOfWeek year month day = ((getDayOfWeek year 1 day) + (foldl1 (+) $ map (daysOfMonth year) [1..(month-1)])) `mod` 7 | 120 | getDayOfWeek year month day = ((getDayOfWeek year 1 day) + (foldl1 (+) $ map (daysOfMonth year) [1..(month-1)])) `mod` 7 | 120 | false | false | 0 | 13 | 18 | 71 | 38 | 33 | null | null |
ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/encodeFloat_1.hs | mit | encodeFloatFloat :: Integer -> MyInt -> Float
encodeFloatFloat = primFloatEncode | 84 | encodeFloatFloat :: Integer -> MyInt -> Float
encodeFloatFloat = primFloatEncode | 84 | encodeFloatFloat = primFloatEncode | 34 | false | true | 0 | 6 | 13 | 19 | 10 | 9 | null | null |
kolmodin/cabal | cabal-install/tests/UnitTests/Distribution/Client/JobControl.hs | bsd-3-clause | prop_cancel_parallel :: Positive (Small Int) -> [Int] -> [Int] -> Property
prop_cancel_parallel (Positive (Small maxJobLimit)) xs ys = do
ioProperty $ do
jobCtl <- newParallelJobControl maxJobLimit
mapM_ (\x -> spawnJob jobCtl (threadDelay 100 >> return x)) (xs++ys)
xs' <- mapM (\_ -> collectJob jobCtl) ... | 459 | prop_cancel_parallel :: Positive (Small Int) -> [Int] -> [Int] -> Property
prop_cancel_parallel (Positive (Small maxJobLimit)) xs ys = do
ioProperty $ do
jobCtl <- newParallelJobControl maxJobLimit
mapM_ (\x -> spawnJob jobCtl (threadDelay 100 >> return x)) (xs++ys)
xs' <- mapM (\_ -> collectJob jobCtl) ... | 459 | prop_cancel_parallel (Positive (Small maxJobLimit)) xs ys = do
ioProperty $ do
jobCtl <- newParallelJobControl maxJobLimit
mapM_ (\x -> spawnJob jobCtl (threadDelay 100 >> return x)) (xs++ys)
xs' <- mapM (\_ -> collectJob jobCtl) xs
cancelJobs jobCtl
ys' <- collectRemainingJobs jobCtl
return ... | 384 | false | true | 0 | 17 | 84 | 199 | 94 | 105 | null | null |
cordawyn/rdf4h | testsuite/tests/W3C/Manifest.hs | bsd-3-clause | lnodeText _ = error "Not a literal node" | 40 | lnodeText _ = error "Not a literal node" | 40 | lnodeText _ = error "Not a literal node" | 40 | false | false | 0 | 5 | 7 | 13 | 5 | 8 | null | null |
zepto-lang/zepto | src/Zepto/Types/Export.hs | gpl-2.0 | isInfixOfBVec = B.isInfixOf | 27 | isInfixOfBVec = B.isInfixOf | 27 | isInfixOfBVec = B.isInfixOf | 27 | false | false | 0 | 5 | 2 | 8 | 4 | 4 | null | null |
imuli/gitit | Network/Gitit/ContentTransformer.hs | gpl-2.0 | pageToWikiPandoc :: Page -> ContentTransformer Pandoc
pageToWikiPandoc page' =
pageToWikiPandoc' page' >>= addPageTitleToPandoc (pageTitle page') | 147 | pageToWikiPandoc :: Page -> ContentTransformer Pandoc
pageToWikiPandoc page' =
pageToWikiPandoc' page' >>= addPageTitleToPandoc (pageTitle page') | 147 | pageToWikiPandoc page' =
pageToWikiPandoc' page' >>= addPageTitleToPandoc (pageTitle page') | 93 | false | true | 0 | 8 | 16 | 37 | 17 | 20 | null | null |
gbaz/cabal | Cabal/Distribution/Simple/Setup.hs | bsd-3-clause | defaultSDistFlags :: SDistFlags
defaultSDistFlags = SDistFlags {
sDistSnapshot = Flag False,
sDistDirectory = mempty,
sDistDistPref = NoFlag,
sDistListSources = mempty,
sDistVerbosity = Flag normal
} | 231 | defaultSDistFlags :: SDistFlags
defaultSDistFlags = SDistFlags {
sDistSnapshot = Flag False,
sDistDirectory = mempty,
sDistDistPref = NoFlag,
sDistListSources = mempty,
sDistVerbosity = Flag normal
} | 231 | defaultSDistFlags = SDistFlags {
sDistSnapshot = Flag False,
sDistDirectory = mempty,
sDistDistPref = NoFlag,
sDistListSources = mempty,
sDistVerbosity = Flag normal
} | 199 | false | true | 0 | 7 | 56 | 49 | 29 | 20 | null | null |
laser/haste-experiment | demos/todomvc/todo.hs | mit | onTodoKeyUp tsRef input todoList k = case k of
13 -> do
Just v <- getValue input
if v == "" then
return ()
else do
modifyIORef tsRef (\ts -> addTodo ts v)
ts <- readIORef tsRef
todoElems <- mapM renderTodo ts
mapM (bindTodoEvents tsRef todoList) todoElems
setChildren to... | 402 | onTodoKeyUp tsRef input todoList k = case k of
13 -> do
Just v <- getValue input
if v == "" then
return ()
else do
modifyIORef tsRef (\ts -> addTodo ts v)
ts <- readIORef tsRef
todoElems <- mapM renderTodo ts
mapM (bindTodoEvents tsRef todoList) todoElems
setChildren to... | 402 | onTodoKeyUp tsRef input todoList k = case k of
13 -> do
Just v <- getValue input
if v == "" then
return ()
else do
modifyIORef tsRef (\ts -> addTodo ts v)
ts <- readIORef tsRef
todoElems <- mapM renderTodo ts
mapM (bindTodoEvents tsRef todoList) todoElems
setChildren to... | 402 | false | false | 0 | 16 | 119 | 153 | 68 | 85 | null | null |
alexander-at-github/eta | compiler/ETA/Prelude/PrimOp.hs | bsd-3-clause | tagOf_PrimOp IndexByteArrayOp_Int64 = _ILIT(192) | 48 | tagOf_PrimOp IndexByteArrayOp_Int64 = _ILIT(192) | 48 | tagOf_PrimOp IndexByteArrayOp_Int64 = _ILIT(192) | 48 | false | false | 0 | 6 | 3 | 15 | 7 | 8 | null | null |
sdiehl/ghc | libraries/template-haskell/Language/Haskell/TH/Lib/Internal.hs | bsd-3-clause | viewP :: Quote m => m Exp -> m Pat -> m Pat
viewP e p = do e' <- e
p' <- p
pure (ViewP e' p') | 123 | viewP :: Quote m => m Exp -> m Pat -> m Pat
viewP e p = do e' <- e
p' <- p
pure (ViewP e' p') | 123 | viewP e p = do e' <- e
p' <- p
pure (ViewP e' p') | 79 | false | true | 0 | 10 | 57 | 73 | 31 | 42 | null | null |
buckie/juno | src/Schwifty/Swift/M105/Parser.hs | bsd-3-clause | partyId :: Parser PartyId
partyId = do
code <- idType
_ <- char '/'
countryCode <- count 2 letterChar
_ <- char '/'
identifier <- someTill anyChar newline
return $ PartyId code (T.pack countryCode) (T.pack identifier) | 229 | partyId :: Parser PartyId
partyId = do
code <- idType
_ <- char '/'
countryCode <- count 2 letterChar
_ <- char '/'
identifier <- someTill anyChar newline
return $ PartyId code (T.pack countryCode) (T.pack identifier) | 229 | partyId = do
code <- idType
_ <- char '/'
countryCode <- count 2 letterChar
_ <- char '/'
identifier <- someTill anyChar newline
return $ PartyId code (T.pack countryCode) (T.pack identifier) | 203 | false | true | 0 | 12 | 47 | 101 | 43 | 58 | null | null |
gafiatulin/codewars | src/7 kyu/NumberRect.hs | mit | numberOfRectangles :: Int -> Int -> Int
numberOfRectangles m n = n*m*(n+1)*(m+1) `div` 4 | 88 | numberOfRectangles :: Int -> Int -> Int
numberOfRectangles m n = n*m*(n+1)*(m+1) `div` 4 | 88 | numberOfRectangles m n = n*m*(n+1)*(m+1) `div` 4 | 48 | false | true | 0 | 9 | 13 | 56 | 30 | 26 | null | null |
sanjoy/hLLVM | src/Llvm/Pass/Optimizer.hs | bsd-3-clause | opt _ _ (ToplevelTypeDef a) = return $ ToplevelTypeDef a | 56 | opt _ _ (ToplevelTypeDef a) = return $ ToplevelTypeDef a | 56 | opt _ _ (ToplevelTypeDef a) = return $ ToplevelTypeDef a | 56 | false | false | 1 | 6 | 9 | 26 | 11 | 15 | null | null |
snowmantw/Frag | src/BSP.hs | gpl-2.0 | withBinaryFile :: FilePath -> (Handle -> IO a) -> IO a
withBinaryFile filePath = bracket (openBinaryFile filePath ReadMode) hClose | 131 | withBinaryFile :: FilePath -> (Handle -> IO a) -> IO a
withBinaryFile filePath = bracket (openBinaryFile filePath ReadMode) hClose | 130 | withBinaryFile filePath = bracket (openBinaryFile filePath ReadMode) hClose | 75 | false | true | 0 | 9 | 19 | 48 | 23 | 25 | null | null |
Rydgel/Brainfokt | src/Evaluator.hs | mit | seekLoopL b dataTape source@(Tape _ LoopR _) = seekLoopL (b+1) dataTape (moveLeft source) | 89 | seekLoopL b dataTape source@(Tape _ LoopR _) = seekLoopL (b+1) dataTape (moveLeft source) | 89 | seekLoopL b dataTape source@(Tape _ LoopR _) = seekLoopL (b+1) dataTape (moveLeft source) | 89 | false | false | 0 | 8 | 12 | 46 | 23 | 23 | null | null |
sherwoodwang/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxMAXIMIZE :: Int
wxMAXIMIZE = 8192 | 35 | wxMAXIMIZE :: Int
wxMAXIMIZE = 8192 | 35 | wxMAXIMIZE = 8192 | 17 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
k0001/tisch | src/lib/Tisch/Internal/Aggregation.hs | apache-2.0 | -- | Add the values in input columns.
sumgg :: AggSum a b => O.Aggregator (Kol a) (Kol b)
sumgg = unsafeMakeAggr HDB.AggrSum | 124 | sumgg :: AggSum a b => O.Aggregator (Kol a) (Kol b)
sumgg = unsafeMakeAggr HDB.AggrSum | 86 | sumgg = unsafeMakeAggr HDB.AggrSum | 34 | true | true | 0 | 9 | 22 | 50 | 23 | 27 | null | null |
fmapfmapfmap/amazonka | amazonka-glacier/gen/Network/AWS/Glacier/ListMultipartUploads.hs | mpl-2.0 | -- | An opaque string used for pagination. This value specifies the upload at
-- which the listing of uploads should begin. Get the marker value from a
-- previous List Uploads response. You need only include the marker if you
-- are continuing the pagination of results started in a previous List
-- Uploads request.
lm... | 427 | lmuMarker :: Lens' ListMultipartUploads (Maybe Text)
lmuMarker = lens _lmuMarker (\ s a -> s{_lmuMarker = a}) | 109 | lmuMarker = lens _lmuMarker (\ s a -> s{_lmuMarker = a}) | 56 | true | true | 1 | 9 | 72 | 54 | 29 | 25 | null | null |
keera-studios/hsQt | Qtc/ClassTypes/Gui.hs | bsd-2-clause | withQBoxLayoutResult :: IO (Ptr (TQBoxLayout a)) -> IO (QBoxLayout a)
withQBoxLayoutResult f
= withObjectResult qtc_QBoxLayout_getFinalizer f | 143 | withQBoxLayoutResult :: IO (Ptr (TQBoxLayout a)) -> IO (QBoxLayout a)
withQBoxLayoutResult f
= withObjectResult qtc_QBoxLayout_getFinalizer f | 143 | withQBoxLayoutResult f
= withObjectResult qtc_QBoxLayout_getFinalizer f | 73 | false | true | 0 | 10 | 17 | 47 | 22 | 25 | null | null |
holdenlee/fluidity | GraphUtils.hs | mit | newNode :: G.Gr a b -> Node
newNode g = (newNodes 1 g)!!0 | 58 | newNode :: G.Gr a b -> Node
newNode g = (newNodes 1 g)!!0 | 57 | newNode g = (newNodes 1 g)!!0 | 29 | false | true | 0 | 8 | 13 | 43 | 19 | 24 | null | null |
rodrigo-machado/ufrgs-grt | src/Graph/Builder/Instance.hs | gpl-3.0 | addRuleEdge :: Monad m => RuleOp -> TypeId -> (Int, Int) -> b -> InstanceBuilder a b m Int
addRuleEdge o t c p = do eid <- newEdge Rule t c p
setRuleOperation o E eid
return eid
-- | Sets the operation on the selected rule node. | 279 | addRuleEdge :: Monad m => RuleOp -> TypeId -> (Int, Int) -> b -> InstanceBuilder a b m Int
addRuleEdge o t c p = do eid <- newEdge Rule t c p
setRuleOperation o E eid
return eid
-- | Sets the operation on the selected rule node. | 279 | addRuleEdge o t c p = do eid <- newEdge Rule t c p
setRuleOperation o E eid
return eid
-- | Sets the operation on the selected rule node. | 188 | false | true | 0 | 11 | 99 | 96 | 44 | 52 | null | null |
scott-fleischman/greek-grammar | haskell/greek-grammar/executables/sblgnt.hs | mit | bookToAgda :: Book -> Text
bookToAgda (Book i t ss) = format' "module Text.Greek.SBLGNT.{} where\n\
\\n\
\open import Data.List\n\
\open import Text.Greek.Bible\n\
\open import Text.Greek.Script\n\
\open import Text.Greek.Script.Unicode\n\
\\n\
\{} : List (Word)\n\
\{} =\n\
\ {}\n\
\ ∷ []\n\
\" (i, agdaBook, agdaBo... | 443 | bookToAgda :: Book -> Text
bookToAgda (Book i t ss) = format' "module Text.Greek.SBLGNT.{} where\n\
\\n\
\open import Data.List\n\
\open import Text.Greek.Bible\n\
\open import Text.Greek.Script\n\
\open import Text.Greek.Script.Unicode\n\
\\n\
\{} : List (Word)\n\
\{} =\n\
\ {}\n\
\ ∷ []\n\
\" (i, agdaBook, agdaBo... | 443 | bookToAgda (Book i t ss) = format' "module Text.Greek.SBLGNT.{} where\n\
\\n\
\open import Data.List\n\
\open import Text.Greek.Bible\n\
\open import Text.Greek.Script\n\
\open import Text.Greek.Script.Unicode\n\
\\n\
\{} : List (Word)\n\
\{} =\n\
\ {}\n\
\ ∷ []\n\
\" (i, agdaBook, agdaBook, wt) where
wt = (T.con... | 416 | false | true | 0 | 12 | 73 | 87 | 45 | 42 | null | null |
sgillespie/ghc | compiler/basicTypes/Id.hs | bsd-3-clause | realIdUnfolding :: Id -> Unfolding
-- Expose the unfolding if there is one, including for loop breakers
realIdUnfolding id = unfoldingInfo (idInfo id) | 150 | realIdUnfolding :: Id -> Unfolding
realIdUnfolding id = unfoldingInfo (idInfo id) | 81 | realIdUnfolding id = unfoldingInfo (idInfo id) | 46 | true | true | 0 | 7 | 22 | 28 | 14 | 14 | null | null |
joozek78/stack | src/Stack/Types/Config.hs | bsd-3-clause | -- | Get the URL to request the information on the latest snapshots
askLatestSnapshotUrl :: (MonadReader env m, HasConfig env) => m Text
askLatestSnapshotUrl = asks (configLatestSnapshotUrl . getConfig) | 202 | askLatestSnapshotUrl :: (MonadReader env m, HasConfig env) => m Text
askLatestSnapshotUrl = asks (configLatestSnapshotUrl . getConfig) | 134 | askLatestSnapshotUrl = asks (configLatestSnapshotUrl . getConfig) | 65 | true | true | 0 | 7 | 28 | 42 | 22 | 20 | null | null |
luinix/haskell_snail | .cabal-sandbox/share/x86_64-osx-ghc-7.6.3/hlint-1.8.59/Default.hs | gpl-3.0 | error = zip (map f x) (map g x) ==> map (f Control.Arrow.&&& g) x | 65 | error = zip (map f x) (map g x) ==> map (f Control.Arrow.&&& g) x | 65 | error = zip (map f x) (map g x) ==> map (f Control.Arrow.&&& g) x | 65 | false | false | 3 | 6 | 14 | 49 | 23 | 26 | null | null |
kim/amazonka | amazonka-ecs/gen/Network/AWS/ECS/Types.hs | mpl-2.0 | -- | 'ContainerInstance' constructor.
--
-- The fields accessible through corresponding lenses are:
--
-- * 'ciAgentConnected' @::@ 'Maybe' 'Bool'
--
-- * 'ciContainerInstanceArn' @::@ 'Maybe' 'Text'
--
-- * 'ciEc2InstanceId' @::@ 'Maybe' 'Text'
--
-- * 'ciPendingTasksCount' @::@ 'Maybe' 'Int'
--
-- * 'ciRegisteredReso... | 885 | containerInstance :: ContainerInstance
containerInstance = ContainerInstance
{ _ciContainerInstanceArn = Nothing
, _ciEc2InstanceId = Nothing
, _ciRemainingResources = mempty
, _ciRegisteredResources = mempty
, _ciStatus = Nothing
, _ciAgentConnected = Nothing
,... | 400 | containerInstance = ContainerInstance
{ _ciContainerInstanceArn = Nothing
, _ciEc2InstanceId = Nothing
, _ciRemainingResources = mempty
, _ciRegisteredResources = mempty
, _ciStatus = Nothing
, _ciAgentConnected = Nothing
, _ciRunningTasksCount = Nothing
... | 361 | true | true | 0 | 6 | 178 | 81 | 59 | 22 | null | null |
Pieterjaninfo/PP | FP/block2s4.hs | unlicense | -- Exercise 5
val "x" = 20 | 26 | val "x" = 20 | 12 | val "x" = 20 | 12 | true | false | 0 | 4 | 6 | 11 | 5 | 6 | null | null |
wavewave/lhc-analysis-collection | lib/HEP/Physics/Analysis/ATLAS/Exotic/Leptoquark.hs | gpl-3.0 | isEvJJ _ = False | 16 | isEvJJ _ = False | 16 | isEvJJ _ = False | 16 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
hvr/text | Data/Text.hs | bsd-2-clause | -- | /O(n)/ 'scanr' is the right-to-left dual of 'scanl'. Performs
-- replacement on invalid scalar values.
--
-- > scanr f v == reverse . scanl (flip f) v . reverse
scanr :: (Char -> Char -> Char) -> Char -> Text -> Text
scanr f z = S.reverse . S.reverseScanr g z . reverseStream
where g a b = safe (f a b)
| 313 | scanr :: (Char -> Char -> Char) -> Char -> Text -> Text
scanr f z = S.reverse . S.reverseScanr g z . reverseStream
where g a b = safe (f a b)
| 146 | scanr f z = S.reverse . S.reverseScanr g z . reverseStream
where g a b = safe (f a b)
| 90 | true | true | 0 | 8 | 70 | 83 | 43 | 40 | null | null |
geophf/1HaskellADay | exercises/HAD/Data/Graphics/SVG.hs | mit | -- http://lpaste.net/113385
svgDoctype :: String
svgDoctype = "<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' " ++
"'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'>" | 171 | svgDoctype :: String
svgDoctype = "<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' " ++
"'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'>" | 142 | svgDoctype = "<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' " ++
"'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'>" | 121 | true | true | 0 | 6 | 18 | 23 | 10 | 13 | null | null |
iteloo/tsuru-sample | myiteratee/src/Data/MyIteratee.hs | bsd-3-clause | take = handleGetS f
where f h 0 k = h 0 (k NoData)
f h n k = get >>= k .> h (n-1)
-- filter :: (i -> Bool) -> Iter (Sum3 (Get (Data i)) x y) a
-- -> Iter (Sum3 (Get (Data i)) x y) a | 214 | take = handleGetS f
where f h 0 k = h 0 (k NoData)
f h n k = get >>= k .> h (n-1)
-- filter :: (i -> Bool) -> Iter (Sum3 (Get (Data i)) x y) a
-- -> Iter (Sum3 (Get (Data i)) x y) a | 214 | take = handleGetS f
where f h 0 k = h 0 (k NoData)
f h n k = get >>= k .> h (n-1)
-- filter :: (i -> Bool) -> Iter (Sum3 (Get (Data i)) x y) a
-- -> Iter (Sum3 (Get (Data i)) x y) a | 214 | false | false | 7 | 7 | 82 | 85 | 35 | 50 | null | null |
adnelson/Idris-dev | src/Idris/Reflection.hs | bsd-3-clause | rawNil :: Raw -> Raw
rawNil ty = raw_apply (Var (sNS (sUN "Nil") ["List", "Prelude"])) [ty] | 91 | rawNil :: Raw -> Raw
rawNil ty = raw_apply (Var (sNS (sUN "Nil") ["List", "Prelude"])) [ty] | 91 | rawNil ty = raw_apply (Var (sNS (sUN "Nil") ["List", "Prelude"])) [ty] | 70 | false | true | 0 | 11 | 15 | 55 | 28 | 27 | null | null |
MichielDerhaeg/stack | test/integration/lib/StackTest.hs | bsd-3-clause | repl :: [String] -> Repl () -> IO ()
repl args action = do
stackExe <- getEnv "STACK_EXE"
ec <- runRepl stackExe ("repl":args) action
unless (ec == ExitSuccess) $ return ()
-- TODO: Understand why the exit code is 1 despite running GHCi tests
-- successfully.
-- else error $ "Exited ... | 457 | repl :: [String] -> Repl () -> IO ()
repl args action = do
stackExe <- getEnv "STACK_EXE"
ec <- runRepl stackExe ("repl":args) action
unless (ec == ExitSuccess) $ return ()
-- TODO: Understand why the exit code is 1 despite running GHCi tests
-- successfully.
-- else error $ "Exited ... | 457 | repl args action = do
stackExe <- getEnv "STACK_EXE"
ec <- runRepl stackExe ("repl":args) action
unless (ec == ExitSuccess) $ return ()
-- TODO: Understand why the exit code is 1 despite running GHCi tests
-- successfully.
-- else error $ "Exited with exit code: " ++ show ec
-- | Ru... | 420 | false | true | 0 | 11 | 114 | 100 | 48 | 52 | null | null |
seinokatsuhiro/koshu-java-tool | koshu-java-class.hs | bsd-3-clause | accessFlagText J.ACC_VOLATILE = "volatile" | 47 | accessFlagText J.ACC_VOLATILE = "volatile" | 47 | accessFlagText J.ACC_VOLATILE = "volatile" | 47 | false | false | 0 | 6 | 8 | 11 | 5 | 6 | null | null |
AlexanderPankiv/ghc | compiler/prelude/PrelInfo.hs | bsd-3-clause | {-
************************************************************************
* *
\subsection{Class predicates}
* *
********************************************************************... | 445 | isNumericClass, isStandardClass :: Class -> Bool
isNumericClass clas = classKey clas `is_elem` numericClassKeys | 115 | isNumericClass clas = classKey clas `is_elem` numericClassKeys | 66 | true | true | 2 | 7 | 166 | 39 | 18 | 21 | null | null |
benekastah/ebitor | src/Ebitor/Server.hs | bsd-3-clause | baseInsertMode update [EvKey (KChar c) []] = returnClear . update (insertChar c) | 80 | baseInsertMode update [EvKey (KChar c) []] = returnClear . update (insertChar c) | 80 | baseInsertMode update [EvKey (KChar c) []] = returnClear . update (insertChar c) | 80 | false | false | 0 | 9 | 11 | 41 | 19 | 22 | null | null |
wginolas/playground | euler/euler_flymake.hs | lgpl-3.0 | fibs = 1:1:(h 1 1)
where
h a b = s:(h b s)
where
s = a+b | 80 | fibs = 1:1:(h 1 1)
where
h a b = s:(h b s)
where
s = a+b | 80 | fibs = 1:1:(h 1 1)
where
h a b = s:(h b s)
where
s = a+b | 80 | false | false | 0 | 9 | 40 | 57 | 29 | 28 | null | null |
zeusdeux/sorts-and-more | haskell/sorts.hs | mit | -- recursion seems ugly. need to fix this
swapAlt :: Eq a => a -> [a] -> [a]
swapAlt x [] = [x] | 95 | swapAlt :: Eq a => a -> [a] -> [a]
swapAlt x [] = [x] | 53 | swapAlt x [] = [x] | 18 | true | true | 0 | 10 | 22 | 49 | 24 | 25 | null | null |
ezyang/ghc | compiler/types/OptCoercion.hs | bsd-3-clause | {-
Note [Eta for AppCo]
~~~~~~~~~~~~~~~~~~~~
Suppose we have
g :: s1 t1 ~ s2 t2
Then we can't necessarily make
left g :: s1 ~ s2
right g :: t1 ~ t2
because it's possible that
s1 :: * -> * t1 :: *
s2 :: (*->*) -> * t2 :: * -> *
and in that case (left g) does not have the same
kind on either s... | 696 | optForAllCoBndr :: LiftingContext -> Bool
-> TyVar -> Coercion -> (LiftingContext, TyVar, Coercion)
optForAllCoBndr env sym
= substForAllCoBndrCallbackLC sym (opt_co4_wrap env sym False Nominal) env | 216 | optForAllCoBndr env sym
= substForAllCoBndrCallbackLC sym (opt_co4_wrap env sym False Nominal) env | 100 | true | true | 0 | 9 | 182 | 61 | 32 | 29 | null | null |
NightRa/Idris-dev | src/Idris/Delaborate.hs | bsd-3-clause | fancifyAnnots _ _ annot = annot | 31 | fancifyAnnots _ _ annot = annot | 31 | fancifyAnnots _ _ annot = annot | 31 | false | false | 0 | 5 | 5 | 13 | 6 | 7 | null | null |
jstolarek/lattice-structure-hs | tests/Signal/Wavelet/ReferenceITest.hs | bsd-3-clause | propDWTList2LikeEval1 :: DwtInputList -> Bool
propDWTList2LikeEval1 (DwtInputList (ls, sig)) =
E1.dwt ls sig =~ L2.dwt ls sig | 129 | propDWTList2LikeEval1 :: DwtInputList -> Bool
propDWTList2LikeEval1 (DwtInputList (ls, sig)) =
E1.dwt ls sig =~ L2.dwt ls sig | 129 | propDWTList2LikeEval1 (DwtInputList (ls, sig)) =
E1.dwt ls sig =~ L2.dwt ls sig | 83 | false | true | 0 | 8 | 20 | 48 | 24 | 24 | null | null |
ddssff/lens | tests/templates.hs | bsd-3-clause | checkFamRecView :: FamRec Int -> String
checkFamRecView = view thing | 68 | checkFamRecView :: FamRec Int -> String
checkFamRecView = view thing | 68 | checkFamRecView = view thing | 28 | false | true | 0 | 6 | 9 | 21 | 10 | 11 | null | null |
elieux/ghc | compiler/main/DynFlags.hs | bsd-3-clause | pgm_dll :: DynFlags -> (String,[Option])
pgm_dll dflags = sPgm_dll (settings dflags) | 98 | pgm_dll :: DynFlags -> (String,[Option])
pgm_dll dflags = sPgm_dll (settings dflags) | 98 | pgm_dll dflags = sPgm_dll (settings dflags) | 43 | false | true | 0 | 7 | 24 | 36 | 19 | 17 | null | null |
LambdaHack/LambdaHack | engine-src/Game/LambdaHack/Client/UI/Frontend/Dom.hs | bsd-3-clause | -- | Let each table cell handle mouse events inside.
handleMouse :: RawFrontend
-> (HTMLTableCellElement, CSSStyleDeclaration) -> PointUI
-> DOM ()
handleMouse rf (cell, _) pUI = do
let readMod :: IsMouseEvent e => EventM HTMLTableCellElement e K.Modifier
readMod = do
modCtrl <- ... | 1,719 | handleMouse :: RawFrontend
-> (HTMLTableCellElement, CSSStyleDeclaration) -> PointUI
-> DOM ()
handleMouse rf (cell, _) pUI = do
let readMod :: IsMouseEvent e => EventM HTMLTableCellElement e K.Modifier
readMod = do
modCtrl <- mouseCtrlKey
modShift <- mouseShiftKey
... | 1,666 | handleMouse rf (cell, _) pUI = do
let readMod :: IsMouseEvent e => EventM HTMLTableCellElement e K.Modifier
readMod = do
modCtrl <- mouseCtrlKey
modShift <- mouseShiftKey
modAlt <- mouseAltKey
modMeta <- mouseMetaKey
return $! modifierTranslate modCtrl modShift modAlt mod... | 1,547 | true | true | 0 | 20 | 544 | 406 | 196 | 210 | null | null |
tomleb/portfolio | src/Web/Routes.hs | mit | miscImagesR :: Path '[]
miscImagesR = imagesR <//> "/misc" | 58 | miscImagesR :: Path '[]
miscImagesR = imagesR <//> "/misc" | 58 | miscImagesR = imagesR <//> "/misc" | 34 | false | true | 2 | 8 | 8 | 29 | 12 | 17 | null | null |
phischu/gtk2hs | gtk/demo/notebook/Notebook.hs | lgpl-3.0 | notebookTabNew :: Maybe String -> Maybe Int -> IO NotebookTab
notebookTabNew name size = do
-- Init.
let iconSize = fromMaybe 12 size
box <- hBoxNew False 0
spinner <- spinnerNew
label <- labelNew name
image <- imageNewFromIcon "gtk-close" iconSize
closeButton <- toolButtonNew (Just image) Nothing
-- S... | 511 | notebookTabNew :: Maybe String -> Maybe Int -> IO NotebookTab
notebookTabNew name size = do
-- Init.
let iconSize = fromMaybe 12 size
box <- hBoxNew False 0
spinner <- spinnerNew
label <- labelNew name
image <- imageNewFromIcon "gtk-close" iconSize
closeButton <- toolButtonNew (Just image) Nothing
-- S... | 511 | notebookTabNew name size = do
-- Init.
let iconSize = fromMaybe 12 size
box <- hBoxNew False 0
spinner <- spinnerNew
label <- labelNew name
image <- imageNewFromIcon "gtk-close" iconSize
closeButton <- toolButtonNew (Just image) Nothing
-- Show.
boxPackStart box label PackNatural 0
boxPackStart box... | 449 | false | true | 0 | 10 | 99 | 157 | 69 | 88 | null | null |
apyrgio/ganeti | src/Ganeti/OpCodes.hs | bsd-2-clause | opSummaryVal _ = Nothing | 24 | opSummaryVal _ = Nothing | 24 | opSummaryVal _ = Nothing | 24 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
facebook/Haxl | Haxl/Core/Memo.hs | bsd-3-clause | execMemoNow :: Env u w -> GenHaxl u w a -> IVar u w a -> IO (Result u w a)
execMemoNow env cont ivar = do
wlogs <- newIORef NilWrites
let
!menv = env { writeLogsRef = wlogs }
-- use an env with empty writes, so we can memoize the extra
-- writes done as part of 'cont'
r <- Exception.try $ unHaxl cont ... | 1,437 | execMemoNow :: Env u w -> GenHaxl u w a -> IVar u w a -> IO (Result u w a)
execMemoNow env cont ivar = do
wlogs <- newIORef NilWrites
let
!menv = env { writeLogsRef = wlogs }
-- use an env with empty writes, so we can memoize the extra
-- writes done as part of 'cont'
r <- Exception.try $ unHaxl cont ... | 1,437 | execMemoNow env cont ivar = do
wlogs <- newIORef NilWrites
let
!menv = env { writeLogsRef = wlogs }
-- use an env with empty writes, so we can memoize the extra
-- writes done as part of 'cont'
r <- Exception.try $ unHaxl cont menv
case r of
Left e -> trace_ ("execMemoNow: Left " ++ show e) $ d... | 1,362 | false | true | 0 | 19 | 367 | 409 | 187 | 222 | null | null |
jfeltz/dash-haskell | src/Options/Cabal.hs | lgpl-3.0 | readPackages :: FilePath -> S.Set String -> M [C.Dependency]
readPackages cabal_path exclusions = do
parse_result <- liftIO $ C.parsePackageDescription <$> readFile cabal_path
case parse_result of
(C.ParseFailed fail_msg) ->
err . show $ fail_msg
(C.ParseOk warnings desc) -> do
unless (L.null w... | 1,010 | readPackages :: FilePath -> S.Set String -> M [C.Dependency]
readPackages cabal_path exclusions = do
parse_result <- liftIO $ C.parsePackageDescription <$> readFile cabal_path
case parse_result of
(C.ParseFailed fail_msg) ->
err . show $ fail_msg
(C.ParseOk warnings desc) -> do
unless (L.null w... | 1,010 | readPackages cabal_path exclusions = do
parse_result <- liftIO $ C.parsePackageDescription <$> readFile cabal_path
case parse_result of
(C.ParseFailed fail_msg) ->
err . show $ fail_msg
(C.ParseOk warnings desc) -> do
unless (L.null warnings) . warning $
preposition
"warning... | 949 | false | true | 0 | 17 | 266 | 325 | 155 | 170 | null | null |
strager/b-shake | examples/Ninja/Parse.hs | bsd-3-clause | word1 :: Str -> (Str, Str)
word1 x = (a, dropSpace b)
where (a,b) = BS.break isSpace x | 90 | word1 :: Str -> (Str, Str)
word1 x = (a, dropSpace b)
where (a,b) = BS.break isSpace x | 90 | word1 x = (a, dropSpace b)
where (a,b) = BS.break isSpace x | 63 | false | true | 0 | 6 | 21 | 54 | 29 | 25 | null | null |
pyrtsa/yampa-demos-template | src/Shapes.hs | bsd-3-clause | circle_ :: Double -> Object
circle_ n = def { objShape = Circle (round n) } | 75 | circle_ :: Double -> Object
circle_ n = def { objShape = Circle (round n) } | 75 | circle_ n = def { objShape = Circle (round n) } | 47 | false | true | 0 | 10 | 15 | 44 | 20 | 24 | null | null |
Lainepress/hledger | hledger-lib/Hledger/Utils.hs | gpl-3.0 | -- | A version of userError that's better at displaying unicode.
userError' :: String -> IOError
userError' = userError . toPlatformString | 138 | userError' :: String -> IOError
userError' = userError . toPlatformString | 73 | userError' = userError . toPlatformString | 41 | true | true | 1 | 7 | 20 | 28 | 12 | 16 | null | null |
dylanmc/cryptol | src/Cryptol/Parser/AST.hs | bsd-3-clause | ppNumLit :: Integer -> NumInfo -> Doc
ppNumLit n info =
case info of
DecLit -> integer n
CharLit -> text (show (toEnum (fromInteger n) :: Char))
BinLit w -> pad 2 "0b" w
OctLit w -> pad 8 "0o" w
HexLit w -> pad 16 "0x" w
PolyLit w -> text "<|" <+> poly w <+> text "|>"
where
pad b... | 1,062 | ppNumLit :: Integer -> NumInfo -> Doc
ppNumLit n info =
case info of
DecLit -> integer n
CharLit -> text (show (toEnum (fromInteger n) :: Char))
BinLit w -> pad 2 "0b" w
OctLit w -> pad 8 "0o" w
HexLit w -> pad 16 "0x" w
PolyLit w -> text "<|" <+> poly w <+> text "|>"
where
pad b... | 1,062 | ppNumLit n info =
case info of
DecLit -> integer n
CharLit -> text (show (toEnum (fromInteger n) :: Char))
BinLit w -> pad 2 "0b" w
OctLit w -> pad 8 "0o" w
HexLit w -> pad 16 "0x" w
PolyLit w -> text "<|" <+> poly w <+> text "|>"
where
pad base pref w =
let txt = showIntAtBa... | 1,024 | false | true | 15 | 14 | 363 | 588 | 263 | 325 | null | null |
barrucadu/spec | Test/CoCo/Util.hs | mit | cnil :: ChurchList a
cnil = CL (\_ n -> n) | 42 | cnil :: ChurchList a
cnil = CL (\_ n -> n) | 42 | cnil = CL (\_ n -> n) | 21 | false | true | 1 | 7 | 10 | 30 | 14 | 16 | null | null |
roman/Haskell-Reactive-Extensions | rx-core/src/Rx/Observable/Timeout.hs | mit | resetTimeoutWhen
:: (a -> Bool) -> TimeoutOptions a -> TimeoutOptions a
resetTimeoutWhen resetQuery opts
= opts { _resetTimeoutWhen = resetQuery } | 150 | resetTimeoutWhen
:: (a -> Bool) -> TimeoutOptions a -> TimeoutOptions a
resetTimeoutWhen resetQuery opts
= opts { _resetTimeoutWhen = resetQuery } | 150 | resetTimeoutWhen resetQuery opts
= opts { _resetTimeoutWhen = resetQuery } | 76 | false | true | 0 | 8 | 24 | 53 | 25 | 28 | null | null |
brendanhay/gogol | gogol-adexchangebuyer2/gen/Network/Google/AdExchangeBuyer2/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'CalloutStatusRow' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'cRowDimensions'
--
-- * 'cCalloutStatusId'
--
-- * 'cImpressionCount'
calloutStatusRow
:: CalloutStatusRow
calloutStatusRow =
CalloutStat... | 432 | calloutStatusRow
:: CalloutStatusRow
calloutStatusRow =
CalloutStatusRow'
{ _cRowDimensions = Nothing
, _cCalloutStatusId = Nothing
, _cImpressionCount = Nothing
} | 185 | calloutStatusRow =
CalloutStatusRow'
{ _cRowDimensions = Nothing
, _cCalloutStatusId = Nothing
, _cImpressionCount = Nothing
} | 144 | true | true | 0 | 7 | 82 | 50 | 30 | 20 | null | null |
vdweegen/UvA-Software_Testing | Lab6/Willem/Lecture6.hs | gpl-3.0 | mers 2 = 2^3-1 | 15 | mers 2 = 2^3-1 | 15 | mers 2 = 2^3-1 | 15 | false | false | 0 | 6 | 4 | 17 | 8 | 9 | null | null |
phaazon/vector | Data/Vector/Fusion/Stream/Monadic.hs | bsd-3-clause | scanl1M' f (Stream step t) = Stream step' (t, Nothing)
where
{-# INLINE_INNER step' #-}
step' (s, Nothing) = do
r <- step s
case r of
Yield x s' -> x `seq` return (Yield x (s', Just x))
Skip s' -... | 1,186 | scanl1M' f (Stream step t) = Stream step' (t, Nothing)
where
{-# INLINE_INNER step' #-}
step' (s, Nothing) = do
r <- step s
case r of
Yield x s' -> x `seq` return (Yield x (s', Just x))
Skip s' -... | 1,186 | scanl1M' f (Stream step t) = Stream step' (t, Nothing)
where
{-# INLINE_INNER step' #-}
step' (s, Nothing) = do
r <- step s
case r of
Yield x s' -> x `seq` return (Yield x (s', Just x))
Skip s' -... | 1,186 | false | false | 0 | 18 | 582 | 270 | 134 | 136 | null | null |
bordaigorl/jamesbound | src/Language/PiCalc/Infix.hs | gpl-2.0 | (p,pr) ⊕ (Alt l) = Alt $ MSet.insert (p,pr) l | 45 | (p,pr) ⊕ (Alt l) = Alt $ MSet.insert (p,pr) l | 45 | (p,pr) ⊕ (Alt l) = Alt $ MSet.insert (p,pr) l | 45 | false | false | 2 | 7 | 9 | 43 | 21 | 22 | null | null |
tnrangwi/haskellGames4iPad | Labyrinth3d.hs | mit | mainLoop :: MazeState -> IO ()
mainLoop st = do
mv <- getChar
if mv == 'x' then
return ()
else if mv == 'h' then
T.paint [ "h: This help",
"",
" I -> fwd",
"J K -> turn left / right",
" M -> bwd",
"",
... | 2,245 | mainLoop :: MazeState -> IO ()
mainLoop st = do
mv <- getChar
if mv == 'x' then
return ()
else if mv == 'h' then
T.paint [ "h: This help",
"",
" I -> fwd",
"J K -> turn left / right",
" M -> bwd",
"",
... | 2,245 | mainLoop st = do
mv <- getChar
if mv == 'x' then
return ()
else if mv == 'h' then
T.paint [ "h: This help",
"",
" I -> fwd",
"J K -> turn left / right",
" M -> bwd",
"",
"s: Switch to map ... | 2,214 | false | true | 0 | 24 | 980 | 584 | 292 | 292 | null | null |
rahulmutt/ghcvm | compiler/Eta/BasicTypes/UniqSupply.hs | bsd-3-clause | initUs :: UniqSupply -> UniqSM a -> (a, UniqSupply)
initUs init_us m = case unUSM m init_us of { (# r, us #) -> (r,us) } | 120 | initUs :: UniqSupply -> UniqSM a -> (a, UniqSupply)
initUs init_us m = case unUSM m init_us of { (# r, us #) -> (r,us) } | 120 | initUs init_us m = case unUSM m init_us of { (# r, us #) -> (r,us) } | 68 | false | true | 0 | 9 | 25 | 66 | 34 | 32 | null | null |
da-x/lamdu | test/InferAssert.hs | gpl-3.0 | expectLeft ::
String -> (l -> HUnit.Assertion) ->
Either l (Val Type) -> HUnit.Assertion
expectLeft _ handleLeft (Left x) = handleLeft x | 144 | expectLeft ::
String -> (l -> HUnit.Assertion) ->
Either l (Val Type) -> HUnit.Assertion
expectLeft _ handleLeft (Left x) = handleLeft x | 144 | expectLeft _ handleLeft (Left x) = handleLeft x | 47 | false | true | 0 | 10 | 29 | 61 | 30 | 31 | null | null |
siddhanathan/ghc | libraries/template-haskell/Language/Haskell/TH/Syntax.hs | bsd-3-clause | unboxedTupleTypeName 1 = error "unboxedTupleTypeName 1" | 55 | unboxedTupleTypeName 1 = error "unboxedTupleTypeName 1" | 55 | unboxedTupleTypeName 1 = error "unboxedTupleTypeName 1" | 55 | false | false | 1 | 5 | 5 | 16 | 5 | 11 | null | null |
leshchevds/ganeti | src/Ganeti/JQScheduler/ReasonRateLimiting.hs | bsd-2-clause | -- | Computes the bucket slots required by a job.
countMapFromJob :: QueuedJob -> CountMap AdHocReasonKey
countMapFromJob = Map.mapKeys (\(str, n) -> str ++ ":" ++ show n)
. labelCountMapFromJob | 214 | countMapFromJob :: QueuedJob -> CountMap AdHocReasonKey
countMapFromJob = Map.mapKeys (\(str, n) -> str ++ ":" ++ show n)
. labelCountMapFromJob | 164 | countMapFromJob = Map.mapKeys (\(str, n) -> str ++ ":" ++ show n)
. labelCountMapFromJob | 108 | true | true | 0 | 10 | 49 | 53 | 28 | 25 | null | null |
brendanhay/gogol | gogol-compute/gen/Network/Google/Resource/Compute/Instances/SetDiskAutoDelete.hs | mpl-2.0 | -- | An optional request ID to identify requests. Specify a unique request ID
-- so that if you must retry your request, the server will know to ignore
-- the request if it has already been completed. For example, consider a
-- situation where you make an initial request and the request times out.
-- If you make the re... | 840 | isdadRequestId :: Lens' InstancesSetDiskAutoDelete (Maybe Text)
isdadRequestId
= lens _isdadRequestId
(\ s a -> s{_isdadRequestId = a}) | 143 | isdadRequestId
= lens _isdadRequestId
(\ s a -> s{_isdadRequestId = a}) | 79 | true | true | 0 | 8 | 144 | 58 | 34 | 24 | null | null |
geggo98/backup-octo-wookie | src/Main.hs | unlicense | -- Problem 6
sumOfSquares n = (2*n*n*n + 3*n*n + n) / 6 | 55 | sumOfSquares n = (2*n*n*n + 3*n*n + n) / 6 | 42 | sumOfSquares n = (2*n*n*n + 3*n*n + n) / 6 | 42 | true | false | 1 | 13 | 12 | 49 | 23 | 26 | null | null |
nevrenato/Hets_Fork | OWL2/Parse.hs | gpl-2.0 | uriQ :: CharParser st QName
uriQ = fullIri <|> abbrIri | 54 | uriQ :: CharParser st QName
uriQ = fullIri <|> abbrIri | 54 | uriQ = fullIri <|> abbrIri | 26 | false | true | 0 | 5 | 9 | 20 | 10 | 10 | null | null |
kalouantonis/FileShortener | Shortener.hs | bsd-3-clause | preorder (File name x) = [x] | 37 | preorder (File name x) = [x] | 37 | preorder (File name x) = [x] | 37 | false | false | 0 | 7 | 14 | 20 | 10 | 10 | null | null |
AlexMckey/FP101x-ItFP_Haskell | Sources/unfold.hs | cc0-1.0 | int2bin :: Int -> [Bit]
int2bin 0 = [] | 38 | int2bin :: Int -> [Bit]
int2bin 0 = [] | 38 | int2bin 0 = [] | 14 | false | true | 0 | 8 | 8 | 29 | 13 | 16 | null | null |
llllllllll/doorman | doorman.hs | gpl-2.0 | -- | Backword fill any char that matches f.
-- If the last char matches, it starts filling with 'a'.
bfill :: (Char -> Bool) -> String -> String
bfill _ "" = "" | 160 | bfill :: (Char -> Bool) -> String -> String
bfill _ "" = "" | 59 | bfill _ "" = "" | 15 | true | true | 0 | 7 | 33 | 33 | 18 | 15 | null | null |
TOSPIO/yi | src/library/Yi/Keymap/Vim/StateUtils.hs | gpl-2.0 | getMaybeCountE :: EditorM (Maybe Int)
getMaybeCountE = fmap vsCount getEditorDyn | 80 | getMaybeCountE :: EditorM (Maybe Int)
getMaybeCountE = fmap vsCount getEditorDyn | 80 | getMaybeCountE = fmap vsCount getEditorDyn | 42 | false | true | 0 | 7 | 9 | 25 | 12 | 13 | null | null |
rueshyna/gogol | gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/CourseWork/Create.hs | mpl-2.0 | -- | Identifier of the course. This identifier can be either the
-- Classroom-assigned identifier or an alias.
ccwcCourseId :: Lens' CoursesCourseWorkCreate Text
ccwcCourseId
= lens _ccwcCourseId (\ s a -> s{_ccwcCourseId = a}) | 229 | ccwcCourseId :: Lens' CoursesCourseWorkCreate Text
ccwcCourseId
= lens _ccwcCourseId (\ s a -> s{_ccwcCourseId = a}) | 118 | ccwcCourseId
= lens _ccwcCourseId (\ s a -> s{_ccwcCourseId = a}) | 67 | true | true | 1 | 9 | 35 | 47 | 23 | 24 | null | null |
jarmar/change-instrument | src/Arguments.hs | bsd-3-clause | useSame :: Parser Bool
useSame = switch
( long "same"
<> short 's'
<> help "Foo bar baz quux" ) | 101 | useSame :: Parser Bool
useSame = switch
( long "same"
<> short 's'
<> help "Foo bar baz quux" ) | 101 | useSame = switch
( long "same"
<> short 's'
<> help "Foo bar baz quux" ) | 78 | false | true | 0 | 9 | 25 | 43 | 18 | 25 | null | null |
chreekat/snowdrift | Model/User.hs | agpl-3.0 | -- | Is the user eligible for establishment?
userIsEligibleEstablish :: User -> Bool
userIsEligibleEstablish = estIsEligible . userEstablished | 142 | userIsEligibleEstablish :: User -> Bool
userIsEligibleEstablish = estIsEligible . userEstablished | 97 | userIsEligibleEstablish = estIsEligible . userEstablished | 57 | true | true | 0 | 5 | 17 | 20 | 11 | 9 | null | null |
robstewart57/ripl | src/XDFNetwork.hs | bsd-3-clause | xmlFromProgramConnections :: CalProject -> [String] -> Int -> Int -> Int -> XML
-- xml actors conns = unlines $
xmlFromProgramConnections (CalProject actors connections) unusedActors fifoDepth {- outBitWidth -} inputColour outputColour =
unlines $
[ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
, "<XDF name=\"Prog... | 572 | xmlFromProgramConnections :: CalProject -> [String] -> Int -> Int -> Int -> XML
xmlFromProgramConnections (CalProject actors connections) unusedActors fifoDepth {- outBitWidth -} inputColour outputColour =
unlines $
[ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
, "<XDF name=\"ProgramNetwork\">"
, unlines (ioPo... | 540 | xmlFromProgramConnections (CalProject actors connections) unusedActors fifoDepth {- outBitWidth -} inputColour outputColour =
unlines $
[ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
, "<XDF name=\"ProgramNetwork\">"
, unlines (ioPorts {- outBitWidth -} inputColour outputColour)
, unlines (instances actors)
... | 460 | true | true | 0 | 9 | 91 | 111 | 60 | 51 | null | null |
jwiegley/ghc-release | libraries/Cabal/cabal/Distribution/Simple/Utils.hs | gpl-3.0 | ignoreBOM :: String -> String
ignoreBOM ('\xFEFF':string) = string | 66 | ignoreBOM :: String -> String
ignoreBOM ('\xFEFF':string) = string | 66 | ignoreBOM ('\xFEFF':string) = string | 36 | false | true | 0 | 7 | 8 | 25 | 13 | 12 | null | null |
andorp/bead | test/Test/Property/EntityGen.hs | bsd-3-clause | assignmentTypeGen = oneof [
(return emptyAspects)
, (return $ aspectsFromList [BallotBox])
, (do pwd <- word; return $ aspectsFromList [Password pwd])
, (do pwd <- word; return $ aspectsFromList [Password pwd, BallotBox])
] | 235 | assignmentTypeGen = oneof [
(return emptyAspects)
, (return $ aspectsFromList [BallotBox])
, (do pwd <- word; return $ aspectsFromList [Password pwd])
, (do pwd <- word; return $ aspectsFromList [Password pwd, BallotBox])
] | 235 | assignmentTypeGen = oneof [
(return emptyAspects)
, (return $ aspectsFromList [BallotBox])
, (do pwd <- word; return $ aspectsFromList [Password pwd])
, (do pwd <- word; return $ aspectsFromList [Password pwd, BallotBox])
] | 235 | false | false | 1 | 13 | 44 | 101 | 50 | 51 | null | null |
daleooo/barrelfish | tools/flounder/CAbsSyntax.hs | mit | pp_expr :: Expr -> String
pp_expr (NumConstant i) = printf "%d" i | 65 | pp_expr :: Expr -> String
pp_expr (NumConstant i) = printf "%d" i | 65 | pp_expr (NumConstant i) = printf "%d" i | 39 | false | true | 0 | 7 | 11 | 29 | 14 | 15 | null | null |
nevrenato/Hets_Fork | Syntax/Print_AS_Structured.hs | gpl-2.0 | {- |
specialized printing of 'FIT_ARG's
-}
print_fit_arg_list :: [Annoted FIT_ARG] -> Doc
print_fit_arg_list = cat . map (brackets . pretty) | 142 | print_fit_arg_list :: [Annoted FIT_ARG] -> Doc
print_fit_arg_list = cat . map (brackets . pretty) | 97 | print_fit_arg_list = cat . map (brackets . pretty) | 50 | true | true | 1 | 8 | 22 | 44 | 20 | 24 | null | null |
ghc-android/ghc | testsuite/tests/ghci/should_run/ghcirun004.hs | bsd-3-clause | 3151 = 3150 | 11 | 3151 = 3150 | 11 | 3151 = 3150 | 11 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
gspia/reflex-dom-htmlea | lib/src/Reflex/Dom/HTML5/Component/Common/StateInfo.hs | bsd-3-clause | listenWithFun ∷ forall t e r. (Ord e, Reflex t)
⇒ (e → [e]) → ActiveState t e r → ActiveState t e r
listenWithFun f me = me & \d → d {_activeStateListen = constDyn ag}
where
-- aeMe = view activeStateElemId me ∷ ActElem
aeMe = view activeStateElemId me ∷ e
ag = ActiveGroup $ Set.fromList $ a... | 1,010 | listenWithFun ∷ forall t e r. (Ord e, Reflex t)
⇒ (e → [e]) → ActiveState t e r → ActiveState t e r
listenWithFun f me = me & \d → d {_activeStateListen = constDyn ag}
where
-- aeMe = view activeStateElemId me ∷ ActElem
aeMe = view activeStateElemId me ∷ e
ag = ActiveGroup $ Set.fromList $ a... | 1,010 | listenWithFun f me = me & \d → d {_activeStateListen = constDyn ag}
where
-- aeMe = view activeStateElemId me ∷ ActElem
aeMe = view activeStateElemId me ∷ e
ag = ActiveGroup $ Set.fromList $ aeMe: f aeMe
{-
-- Use list of elements to listen with the function
-- given in the first param.
listenListWithFil... | 896 | false | true | 7 | 10 | 275 | 128 | 69 | 59 | null | null |
wjdhamilton/ig-haskell | src/IG/REST/Dealing.hs | bsd-3-clause | deleteWorkingOrder :: AuthHeaders -> Text -> IO (Either ApiError DealReference)
deleteWorkingOrder a@(AuthHeaders _ _ _ isDemo) id = do
let opts = v2 a
let url = cs $ otcWorkingOrderPath isDemo (Just id)
apiRequest $ deleteWith opts url
-- | Update a working order | 272 | deleteWorkingOrder :: AuthHeaders -> Text -> IO (Either ApiError DealReference)
deleteWorkingOrder a@(AuthHeaders _ _ _ isDemo) id = do
let opts = v2 a
let url = cs $ otcWorkingOrderPath isDemo (Just id)
apiRequest $ deleteWith opts url
-- | Update a working order | 272 | deleteWorkingOrder a@(AuthHeaders _ _ _ isDemo) id = do
let opts = v2 a
let url = cs $ otcWorkingOrderPath isDemo (Just id)
apiRequest $ deleteWith opts url
-- | Update a working order | 192 | false | true | 0 | 13 | 51 | 99 | 47 | 52 | null | null |
ezyang/ghc | hadrian/src/GHC.hs | bsd-3-clause | text = hsLib "text" | 35 | text = hsLib "text" | 35 | text = hsLib "text" | 35 | false | false | 0 | 5 | 19 | 9 | 4 | 5 | null | null |
ucla-pls/wiretap-tools | src/Wiretap/Data/History.hs | gpl-3.0 | onReads
:: PartialHistory h
=> (UE -> (Location, Value) -> a)
-> h
-> [a]
onReads = onEvent filter'
where filter' (Read l v) = Just (l, v)
filter' _ = Nothing
| 187 | onReads
:: PartialHistory h
=> (UE -> (Location, Value) -> a)
-> h
-> [a]
onReads = onEvent filter'
where filter' (Read l v) = Just (l, v)
filter' _ = Nothing
| 187 | onReads = onEvent filter'
where filter' (Read l v) = Just (l, v)
filter' _ = Nothing
| 105 | false | true | 1 | 11 | 60 | 90 | 45 | 45 | null | null |
peter-fogg/pardoc | src/Text/Pandoc/Pretty.hs | gpl-2.0 | offsetOf :: D -> Int
offsetOf (Text o _) = o | 50 | offsetOf :: D -> Int
offsetOf (Text o _) = o | 50 | offsetOf (Text o _) = o | 29 | false | true | 0 | 7 | 16 | 26 | 13 | 13 | null | null |
uvNikita/TopologyRouting | src/Path.hs | mit | broadcast = broadcastFailed [] | 30 | broadcast = broadcastFailed [] | 30 | broadcast = broadcastFailed [] | 30 | false | false | 0 | 6 | 3 | 11 | 5 | 6 | null | null |
brendanhay/gogol | gogol-admin-directory/gen/Network/Google/Resource/Directory/Resources/Buildings/Delete.hs | mpl-2.0 | -- | The id of the building to delete.
rbdBuildingId :: Lens' ResourcesBuildingsDelete Text
rbdBuildingId
= lens _rbdBuildingId
(\ s a -> s{_rbdBuildingId = a}) | 168 | rbdBuildingId :: Lens' ResourcesBuildingsDelete Text
rbdBuildingId
= lens _rbdBuildingId
(\ s a -> s{_rbdBuildingId = a}) | 129 | rbdBuildingId
= lens _rbdBuildingId
(\ s a -> s{_rbdBuildingId = a}) | 76 | true | true | 0 | 9 | 32 | 42 | 22 | 20 | null | null |
LTI2000/hinterface | src/Foreign/Erlang/NodeState.hs | bsd-3-clause | newNodeState :: IO (NodeState p n mb c)
newNodeState =
NodeState <$> newTVarIO 0
<*> -- serial
newTVarIO 1
<*> -- pidId
newTVarIO 1
<*> -- portId
newTVarIO 0
<*> -- refId0
newTVarIO 0
... | 562 | newNodeState :: IO (NodeState p n mb c)
newNodeState =
NodeState <$> newTVarIO 0
<*> -- serial
newTVarIO 1
<*> -- pidId
newTVarIO 1
<*> -- portId
newTVarIO 0
<*> -- refId0
newTVarIO 0
... | 562 | newNodeState =
NodeState <$> newTVarIO 0
<*> -- serial
newTVarIO 1
<*> -- pidId
newTVarIO 1
<*> -- portId
newTVarIO 0
<*> -- refId0
newTVarIO 0
<*> -- refId1
new... | 522 | false | true | 0 | 14 | 305 | 103 | 51 | 52 | null | null |
mikeplus64/fixed-array | src/Data/Array/Fixed.hs | mit | -- | Strict left fold over an array.
foldl :: Storable a => Mode n -> (b -> a -> b) -> b -> Array i a -> b
foldl m f z arr = foldlRangeIndices m (\b ix -> f b (arr!>ix)) z | 171 | foldl :: Storable a => Mode n -> (b -> a -> b) -> b -> Array i a -> b
foldl m f z arr = foldlRangeIndices m (\b ix -> f b (arr!>ix)) z | 134 | foldl m f z arr = foldlRangeIndices m (\b ix -> f b (arr!>ix)) z | 64 | true | true | 0 | 10 | 43 | 92 | 46 | 46 | null | null |
0xfaded/websockets | tests/haskell/Network/WebSockets/Tests/Util/IterAccum.hs | bsd-3-clause | getAccum :: IterAccum a -> IO [a]
getAccum = fmap reverse . readIORef . unIterAccum | 83 | getAccum :: IterAccum a -> IO [a]
getAccum = fmap reverse . readIORef . unIterAccum | 83 | getAccum = fmap reverse . readIORef . unIterAccum | 49 | false | true | 1 | 8 | 14 | 41 | 18 | 23 | null | null |
ksallberg/adventofcode | 2015/src/Day19_2.hs | bsd-2-clause | trans "PMg" = "F" | 17 | trans "PMg" = "F" | 17 | trans "PMg" = "F" | 17 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.