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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
VictorCMiraldo/mmm | MMM/OOP/Language/Utils.hs | mit | mPutStrLn = lift . putStrLn | 27 | mPutStrLn = lift . putStrLn | 27 | mPutStrLn = lift . putStrLn | 27 | false | false | 0 | 5 | 4 | 10 | 5 | 5 | null | null |
573/leksah | data/leksah-welcome/src/Main.hs | gpl-2.0 | -- | Simple function to create a hello message.
--
-- The following tells doctest & QuickCheck that if you strip "Hello "
-- from the start of `hello s` you will be left with `s` (for any `s`).
-- QuickCheck will create the test data needed to run this test.
--
-- To automatically run the tests when the package is buil... | 635 | hello s = "Hello " ++ s | 23 | hello s = "Hello " ++ s | 23 | true | false | 0 | 5 | 127 | 28 | 21 | 7 | null | null |
brendanhay/gogol | gogol-compute/gen/Network/Google/Resource/Compute/Instances/SetMetadata.hs | mpl-2.0 | -- | Multipart request metadata.
ismPayload :: Lens' InstancesSetMetadata Metadata
ismPayload
= lens _ismPayload (\ s a -> s{_ismPayload = a}) | 144 | ismPayload :: Lens' InstancesSetMetadata Metadata
ismPayload
= lens _ismPayload (\ s a -> s{_ismPayload = a}) | 111 | ismPayload
= lens _ismPayload (\ s a -> s{_ismPayload = a}) | 61 | true | true | 1 | 9 | 22 | 46 | 22 | 24 | null | null |
eiji-a/aya | src/Main.hs | bsd-3-clause | main = do
writeFile "aya.ppm" (header ++ imageToStr (smoothen image)) | 71 | main = do
writeFile "aya.ppm" (header ++ imageToStr (smoothen image)) | 71 | main = do
writeFile "aya.ppm" (header ++ imageToStr (smoothen image)) | 71 | false | false | 1 | 13 | 11 | 34 | 14 | 20 | null | null |
notae/haskell-exercise | pack/Pack2.hs | bsd-3-clause | -- (5)
st5 :: (Traversable t) => t (Maybe a) -> Maybe (t a)
st5 = traverse id | 77 | st5 :: (Traversable t) => t (Maybe a) -> Maybe (t a)
st5 = traverse id | 70 | st5 = traverse id | 17 | true | true | 0 | 10 | 17 | 51 | 24 | 27 | null | null |
yigitozkavci/glow | src/Parser.hs | mit | binops = [ [ binary "<-" Ex.AssocLeft
]
, [ binary "*" Ex.AssocLeft
, binary "/" Ex.AssocLeft
]
, [ binary "+" Ex.AssocLeft
, binary "-" Ex.AssocLeft
]
, [ binary "<" Ex.AssocLeft
, binary ">" Ex.AssocLeft
]
... | 322 | binops = [ [ binary "<-" Ex.AssocLeft
]
, [ binary "*" Ex.AssocLeft
, binary "/" Ex.AssocLeft
]
, [ binary "+" Ex.AssocLeft
, binary "-" Ex.AssocLeft
]
, [ binary "<" Ex.AssocLeft
, binary ">" Ex.AssocLeft
]
... | 322 | binops = [ [ binary "<-" Ex.AssocLeft
]
, [ binary "*" Ex.AssocLeft
, binary "/" Ex.AssocLeft
]
, [ binary "+" Ex.AssocLeft
, binary "-" Ex.AssocLeft
]
, [ binary "<" Ex.AssocLeft
, binary ">" Ex.AssocLeft
]
... | 322 | false | false | 1 | 9 | 151 | 92 | 46 | 46 | null | null |
rueshyna/gogol | gogol-autoscaler/gen/Network/Google/Autoscaler/Types.hs | mpl-2.0 | -- | View your Google Compute Engine resources
computeReadOnlyScope :: Proxy '["https://www.googleapis.com/auth/compute.readonly"]
computeReadOnlyScope = Proxy | 159 | computeReadOnlyScope :: Proxy '["https://www.googleapis.com/auth/compute.readonly"]
computeReadOnlyScope = Proxy | 112 | computeReadOnlyScope = Proxy | 28 | true | true | 0 | 7 | 14 | 20 | 11 | 9 | null | null |
phischu/fragnix | tests/packages/scotty/Data.Acquire.Internal.hs | bsd-3-clause | withEx :: (C.MonadMask m, MonadIO m)
=> Acquire a
-> (a -> m b)
-> m b
withEx (Acquire f) g = do
-- We need to do some funny business, since the restore we get below is
-- specialized to the m from the result, whereas we need a restore function
-- in IO. Checking the current masking sta... | 687 | withEx :: (C.MonadMask m, MonadIO m)
=> Acquire a
-> (a -> m b)
-> m b
withEx (Acquire f) g = do
-- We need to do some funny business, since the restore we get below is
-- specialized to the m from the result, whereas we need a restore function
-- in IO. Checking the current masking sta... | 687 | withEx (Acquire f) g = do
-- We need to do some funny business, since the restore we get below is
-- specialized to the m from the result, whereas we need a restore function
-- in IO. Checking the current masking state is exactly how mask is
-- implemented in base.
origMS <- liftIO E.getMaskingState... | 595 | false | true | 0 | 16 | 211 | 180 | 87 | 93 | null | null |
mtlstats/mtlstats | src/Mtlstats/Control/EditGoalie.hs | gpl-3.0 | ltTiesC :: Action () -> Controller
ltTiesC = promptController . editGoalieLtTiesPrompt | 86 | ltTiesC :: Action () -> Controller
ltTiesC = promptController . editGoalieLtTiesPrompt | 86 | ltTiesC = promptController . editGoalieLtTiesPrompt | 51 | false | true | 0 | 8 | 10 | 31 | 13 | 18 | null | null |
dmcclean/HaTeX | Text/LaTeX/Base/Commands.hs | bsd-3-clause | article :: ClassName
article = "article" | 40 | article :: ClassName
article = "article" | 40 | article = "article" | 19 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
lukasmartinelli/hadolint | src/Hadolint/Rule/DL3059.hs | gpl-3.0 | reset :: Acc -> Acc
reset _ = Empty | 35 | reset :: Acc -> Acc
reset _ = Empty | 35 | reset _ = Empty | 15 | false | true | 0 | 7 | 8 | 24 | 10 | 14 | null | null |
cpettitt/tamien | Tamien/TI/Eval.hs | mit | doAdmin :: TiState -> TiState
doAdmin state = state2
where stack = tiStack state
heap = tiHeap state
need_gc = H.size heap > minGcHeapSize
stats' = TiStats (steps + 1)
(max max_stack (length stack))
(max max_heap (H.size he... | 577 | doAdmin :: TiState -> TiState
doAdmin state = state2
where stack = tiStack state
heap = tiHeap state
need_gc = H.size heap > minGcHeapSize
stats' = TiStats (steps + 1)
(max max_stack (length stack))
(max max_heap (H.size he... | 577 | doAdmin state = state2
where stack = tiStack state
heap = tiHeap state
need_gc = H.size heap > minGcHeapSize
stats' = TiStats (steps + 1)
(max max_stack (length stack))
(max max_heap (H.size heap))
... | 547 | false | true | 7 | 9 | 245 | 207 | 92 | 115 | null | null |
wtetzner/hatemail | haskell/src/Parse.hs | gpl-3.0 | mbxListOflag = choice [str "\\Noinferiors", flagExtension] | 58 | mbxListOflag = choice [str "\\Noinferiors", flagExtension] | 58 | mbxListOflag = choice [str "\\Noinferiors", flagExtension] | 58 | false | false | 1 | 7 | 5 | 22 | 9 | 13 | null | null |
thlorenz/WebToInk | webtoink-converter/WebToInk/Converter/HtmlPages.hs | bsd-2-clause | getSameFolderHtmls rootUrl = nub . filterLocalLinks . getLinks
where
filterLocalLinks = filter (notElem '/')
fixLocalStartingWithRoot = undefined
getLinks :: [Tag String] -> [String]
getLinks = map (snd . getUrl)
where getUrl (TagOpen tag urls) = head urls
-- | Return... | 392 | getSameFolderHtmls rootUrl = nub . filterLocalLinks . getLinks
where
filterLocalLinks = filter (notElem '/')
fixLocalStartingWithRoot = undefined
getLinks :: [Tag String] -> [String]
getLinks = map (snd . getUrl)
where getUrl (TagOpen tag urls) = head urls
-- | Return... | 392 | getSameFolderHtmls rootUrl = nub . filterLocalLinks . getLinks
where
filterLocalLinks = filter (notElem '/')
fixLocalStartingWithRoot = undefined
getLinks :: [Tag String] -> [String]
getLinks = map (snd . getUrl)
where getUrl (TagOpen tag urls) = head urls
-- | Return... | 392 | false | false | 2 | 9 | 103 | 97 | 48 | 49 | null | null |
davideGiovannini/scheme-repl | test/TestParsing.hs | bsd-3-clause | -- STRINGS
parseString :: String -> Result
parseString = parser "string" | 72 | parseString :: String -> Result
parseString = parser "string" | 61 | parseString = parser "string" | 29 | true | true | 0 | 7 | 10 | 26 | 11 | 15 | null | null |
lfairy/sylvia | Sylvia/UI/GTK.hs | gpl-3.0 | (-:-) :: String -> IO a -> IO a
msg -:- action = do
hPutStr stderr msg
result <- action
hPutStrLn stderr " ... done"
return result | 146 | (-:-) :: String -> IO a -> IO a
msg -:- action = do
hPutStr stderr msg
result <- action
hPutStrLn stderr " ... done"
return result | 146 | msg -:- action = do
hPutStr stderr msg
result <- action
hPutStrLn stderr " ... done"
return result | 114 | false | true | 0 | 7 | 42 | 62 | 27 | 35 | null | null |
Bodigrim/arithmoi | Math/NumberTheory/DirichletCharacters.hs | mit | isPrincipal :: DirichletCharacter n -> Bool
isPrincipal chi = characterNumber chi == 0 | 86 | isPrincipal :: DirichletCharacter n -> Bool
isPrincipal chi = characterNumber chi == 0 | 86 | isPrincipal chi = characterNumber chi == 0 | 42 | false | true | 0 | 6 | 12 | 28 | 13 | 15 | null | null |
snoyberg/ghc | testsuite/tests/typecheck/should_compile/tc189.hs | bsd-3-clause | u :: b
(t,u,v) = (v,v,t) | 26 | u :: b
(t,u,v) = (v,v,t) | 24 | (t,u,v) = (v,v,t) | 17 | false | true | 1 | 6 | 7 | 34 | 18 | 16 | null | null |
23Skidoo/xmlhtml | test/suite/Text/XmlHtml/Tests.hs | bsd-3-clause | omitEndTD :: Bool
omitEndTD = parseHTML "" "<td><td>"
== Right (HtmlDocument UTF8 Nothing [Element "td" [] [], Element "td" [] []]) | 139 | omitEndTD :: Bool
omitEndTD = parseHTML "" "<td><td>"
== Right (HtmlDocument UTF8 Nothing [Element "td" [] [], Element "td" [] []]) | 139 | omitEndTD = parseHTML "" "<td><td>"
== Right (HtmlDocument UTF8 Nothing [Element "td" [] [], Element "td" [] []]) | 121 | false | true | 0 | 11 | 28 | 61 | 30 | 31 | null | null |
seantalts/hasktrip | src/Datalog.hs | bsd-3-clause | conj :: Goal -> Goal -> Goal
conj g1 g2 sc = (g1 sc) >>= g2 | 59 | conj :: Goal -> Goal -> Goal
conj g1 g2 sc = (g1 sc) >>= g2 | 59 | conj g1 g2 sc = (g1 sc) >>= g2 | 30 | false | true | 0 | 7 | 15 | 36 | 18 | 18 | null | null |
chreekat/snowdrift | Data/Order.hs | agpl-3.0 | termP :: Parser (Orderable -> Double)
termP = stripP $
claimedP
<|> unclaimedP
<|> tagP
<|> const <$> double
<|> timeValueP
<|> "(" *> expressionP <* ")" | 177 | termP :: Parser (Orderable -> Double)
termP = stripP $
claimedP
<|> unclaimedP
<|> tagP
<|> const <$> double
<|> timeValueP
<|> "(" *> expressionP <* ")" | 177 | termP = stripP $
claimedP
<|> unclaimedP
<|> tagP
<|> const <$> double
<|> timeValueP
<|> "(" *> expressionP <* ")" | 139 | false | true | 23 | 8 | 50 | 84 | 42 | 42 | null | null |
mikeplus64/plissken | src/Editor.hs | gpl-3.0 | edit_ :: IORef Editor -> Edit a -> IO ()
edit_ editor' e = do
editor0 <- readIORef editor'
case execState e editor0 of
editor1 -> writeIORef editor' $! editor1 | 175 | edit_ :: IORef Editor -> Edit a -> IO ()
edit_ editor' e = do
editor0 <- readIORef editor'
case execState e editor0 of
editor1 -> writeIORef editor' $! editor1 | 175 | edit_ editor' e = do
editor0 <- readIORef editor'
case execState e editor0 of
editor1 -> writeIORef editor' $! editor1 | 134 | false | true | 0 | 11 | 45 | 70 | 31 | 39 | null | null |
lynnard/cocos2d-hs | src/Graphics/UI/Cocos2d/Event.hs | bsd-3-clause | eventTouchVector_clear :: (EventTouchVectorPtr arg'1) => arg'1 -> HoppyP.IO ()
eventTouchVector_clear arg'1 =
HoppyFHR.withCppPtr (toEventTouchVector arg'1) $ \arg'1' ->
(eventTouchVector_clear' arg'1') | 206 | eventTouchVector_clear :: (EventTouchVectorPtr arg'1) => arg'1 -> HoppyP.IO ()
eventTouchVector_clear arg'1 =
HoppyFHR.withCppPtr (toEventTouchVector arg'1) $ \arg'1' ->
(eventTouchVector_clear' arg'1') | 206 | eventTouchVector_clear arg'1 =
HoppyFHR.withCppPtr (toEventTouchVector arg'1) $ \arg'1' ->
(eventTouchVector_clear' arg'1') | 127 | false | true | 0 | 8 | 23 | 60 | 30 | 30 | null | null |
unisonweb/platform | parser-typechecker/tests/Unison/Test/ABT.hs | mit | test :: Test ()
test = scope "abt" $ tests [
scope "freshInBoth" $
let
t1 = var 1 "a"
t2 = var 0 "a"
fresh = ABT.freshInBoth t1 t2 $ symbol 0 "a"
in tests
[ scope "first" $ expect (not $ Set.member fresh (ABT.freeVars t1))
, scope "second" $ expect (not $ Set.member fresh (ABT.f... | 1,218 | test :: Test ()
test = scope "abt" $ tests [
scope "freshInBoth" $
let
t1 = var 1 "a"
t2 = var 0 "a"
fresh = ABT.freshInBoth t1 t2 $ symbol 0 "a"
in tests
[ scope "first" $ expect (not $ Set.member fresh (ABT.freeVars t1))
, scope "second" $ expect (not $ Set.member fresh (ABT.f... | 1,218 | test = scope "abt" $ tests [
scope "freshInBoth" $
let
t1 = var 1 "a"
t2 = var 0 "a"
fresh = ABT.freshInBoth t1 t2 $ symbol 0 "a"
in tests
[ scope "first" $ expect (not $ Set.member fresh (ABT.freeVars t1))
, scope "second" $ expect (not $ Set.member fresh (ABT.freeVars t2))
... | 1,202 | false | true | 1 | 20 | 348 | 442 | 215 | 227 | null | null |
brendanhay/gogol | gogol-dlp/gen/Network/Google/DLP/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'GooglePrivacyDlpV2DeidentifyContentRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'gpdvdcrInspectConfig'
--
-- * 'gpdvdcrDeidentifyConfig'
--
-- * 'gpdvdcrDeidentifyTemplateName'
--
-- * 'gpdvdcrItem'... | 809 | googlePrivacyDlpV2DeidentifyContentRequest
:: GooglePrivacyDlpV2DeidentifyContentRequest
googlePrivacyDlpV2DeidentifyContentRequest =
GooglePrivacyDlpV2DeidentifyContentRequest'
{ _gpdvdcrInspectConfig = Nothing
, _gpdvdcrDeidentifyConfig = Nothing
, _gpdvdcrDeidentifyTemplateName = Nothing
, _gpd... | 423 | googlePrivacyDlpV2DeidentifyContentRequest =
GooglePrivacyDlpV2DeidentifyContentRequest'
{ _gpdvdcrInspectConfig = Nothing
, _gpdvdcrDeidentifyConfig = Nothing
, _gpdvdcrDeidentifyTemplateName = Nothing
, _gpdvdcrItem = Nothing
, _gpdvdcrLocationId = Nothing
, _gpdvdcrInspectTemplateName = Not... | 330 | true | true | 0 | 6 | 118 | 64 | 46 | 18 | null | null |
akegalj/snowdrift | dev/Sdm.hs | agpl-3.0 | unsetTemplate = template False | 30 | unsetTemplate = template False | 30 | unsetTemplate = template False | 30 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
orblivion/feedGetter | rss.hs | mit | -- Simplify the XML representation, it's more complicated than needed for our purposes
simpleXML' :: Element -> SimpleXMLRepr
simpleXML' e = simpleXML $ Elem e | 159 | simpleXML' :: Element -> SimpleXMLRepr
simpleXML' e = simpleXML $ Elem e | 72 | simpleXML' e = simpleXML $ Elem e | 33 | true | true | 0 | 6 | 24 | 26 | 13 | 13 | null | null |
rahulmutt/ghcvm | compiler/Eta/CodeGen/Rts.hs | bsd-3-clause | ftWrapper :: FieldType -> Text
ftWrapper (BaseType prim) =
prefix <> case prim of
JBool -> "Boolean"
JChar -> "Character"
JFloat -> "Float"
JDouble -> "Double"
JByte -> "Byte"
JShort -> "Short"
JInt -> "Integer"
JLong -> "Long"
where prefix = "java/lang/" | 304 | ftWrapper :: FieldType -> Text
ftWrapper (BaseType prim) =
prefix <> case prim of
JBool -> "Boolean"
JChar -> "Character"
JFloat -> "Float"
JDouble -> "Double"
JByte -> "Byte"
JShort -> "Short"
JInt -> "Integer"
JLong -> "Long"
where prefix = "java/lang/" | 304 | ftWrapper (BaseType prim) =
prefix <> case prim of
JBool -> "Boolean"
JChar -> "Character"
JFloat -> "Float"
JDouble -> "Double"
JByte -> "Byte"
JShort -> "Short"
JInt -> "Integer"
JLong -> "Long"
where prefix = "java/lang/" | 273 | false | true | 8 | 7 | 90 | 104 | 44 | 60 | null | null |
rsasse/tamarin-prover | src/Web/Types.hs | gpl-3.0 | -- instance Bin.Binary TheoryInfo
-- instance Bin.Binary DiffTheoryInfo
-- instance Bin.Binary EitherTheoryInfo
{- instance Bin.Binary EitherTheoryInfo where
put (Trace i) = do Bin.put (0 :: Bin.Word8)
Bin.put i
put (Diff i) = do Bin.put (1 :: Bin.Word8)
Bin.put i -}... | 897 | getEitherTheoryName :: EitherTheoryInfo -> String
getEitherTheoryName (Trace i) = get thyName (tiTheory i) | 107 | getEitherTheoryName (Trace i) = get thyName (tiTheory i) | 57 | true | true | 0 | 7 | 368 | 42 | 24 | 18 | null | null |
ahammar/placeholders | src/Development/Placeholders.hs | bsd-3-clause | -- | Indicates unimplemented code or a known bug with a custom message.
--
-- @$(todo msg) = $(placeholder (\"TODO: \" ++ msg))@
todo :: String -> Q Exp
todo msg = placeholder $ "TODO: " ++ msg | 193 | todo :: String -> Q Exp
todo msg = placeholder $ "TODO: " ++ msg | 64 | todo msg = placeholder $ "TODO: " ++ msg | 40 | true | true | 0 | 6 | 37 | 32 | 17 | 15 | null | null |
spechub/Hets | CommonLogic/PredefinedCASLAxioms.hs | gpl-2.0 | vy1 :: VAR_DECL
vy1 = mkVarDecl y1 individual | 45 | vy1 :: VAR_DECL
vy1 = mkVarDecl y1 individual | 45 | vy1 = mkVarDecl y1 individual | 29 | false | true | 0 | 5 | 7 | 16 | 8 | 8 | null | null |
literate-unitb/literate-unitb | src/Document/Pipeline.hs | mit | liftEither (Right r) = return r | 31 | liftEither (Right r) = return r | 31 | liftEither (Right r) = return r | 31 | false | false | 0 | 7 | 5 | 18 | 8 | 10 | null | null |
nozaq/programming-in-haskell | src/Ch8.hs | mit | integer :: Parser Int
integer = token int | 42 | integer :: Parser Int
integer = token int | 42 | integer = token int | 20 | false | true | 0 | 5 | 8 | 17 | 8 | 9 | null | null |
HMPerson1/soi | src/Language/Soi/Parser.hs | gpl-3.0 | parseFile :: String -> ByteString -> Either ParseError File
parseFile = runParser parseFileP | 92 | parseFile :: String -> ByteString -> Either ParseError File
parseFile = runParser parseFileP | 92 | parseFile = runParser parseFileP | 32 | false | true | 0 | 7 | 12 | 27 | 13 | 14 | null | null |
keera-studios/hsQt | Qtc/Gui/QComboBox.hs | bsd-2-clause | setRootModelIndex :: QComboBox a -> ((QModelIndex t1)) -> IO ()
setRootModelIndex x0 (x1)
= withObjectPtr x0 $ \cobj_x0 ->
withObjectPtr x1 $ \cobj_x1 ->
qtc_QComboBox_setRootModelIndex cobj_x0 cobj_x1 | 211 | setRootModelIndex :: QComboBox a -> ((QModelIndex t1)) -> IO ()
setRootModelIndex x0 (x1)
= withObjectPtr x0 $ \cobj_x0 ->
withObjectPtr x1 $ \cobj_x1 ->
qtc_QComboBox_setRootModelIndex cobj_x0 cobj_x1 | 211 | setRootModelIndex x0 (x1)
= withObjectPtr x0 $ \cobj_x0 ->
withObjectPtr x1 $ \cobj_x1 ->
qtc_QComboBox_setRootModelIndex cobj_x0 cobj_x1 | 147 | false | true | 0 | 9 | 36 | 73 | 36 | 37 | null | null |
PierreR/Haskell-Turtle-Library | src/Turtle/Prelude.hs | bsd-3-clause | hostname :: MonadIO io => io Text
hostname = liftIO (fmap Text.pack getHostName) | 80 | hostname :: MonadIO io => io Text
hostname = liftIO (fmap Text.pack getHostName) | 80 | hostname = liftIO (fmap Text.pack getHostName) | 46 | false | true | 0 | 8 | 12 | 34 | 16 | 18 | null | null |
geophf/1HaskellADay | exercises/HAD/Y2017/M10/D26/Solution.hs | mit | mirt word@(h:t) | h == ' ' = mirt t
| otherwise = reverse word | 78 | mirt word@(h:t) | h == ' ' = mirt t
| otherwise = reverse word | 78 | mirt word@(h:t) | h == ' ' = mirt t
| otherwise = reverse word | 78 | false | false | 0 | 8 | 30 | 44 | 20 | 24 | null | null |
matthiasgoergens/static-sorting-visualisation | app/Main.hs | gpl-3.0 | inputList :: Seed -> Int -> [Int]
inputList seed size = shuffle' [0..size-1] size (mkStdGen seed) | 97 | inputList :: Seed -> Int -> [Int]
inputList seed size = shuffle' [0..size-1] size (mkStdGen seed) | 97 | inputList seed size = shuffle' [0..size-1] size (mkStdGen seed) | 63 | false | true | 0 | 7 | 15 | 53 | 26 | 27 | null | null |
ExNexu/Idris-dev | src/Pkg/Package.hs | bsd-3-clause | toIBCFile (NS n ns) = foldl1' (</>) (reverse (toIBCFile n : map str ns)) | 72 | toIBCFile (NS n ns) = foldl1' (</>) (reverse (toIBCFile n : map str ns)) | 72 | toIBCFile (NS n ns) = foldl1' (</>) (reverse (toIBCFile n : map str ns)) | 72 | false | false | 0 | 10 | 13 | 46 | 22 | 24 | null | null |
vikraman/ghc | compiler/hsSyn/HsBinds.hs | bsd-3-clause | isInlineLSig :: LSig name -> Bool
-- Identifies inline pragmas
isInlineLSig (L _ (InlineSig {})) = True | 103 | isInlineLSig :: LSig name -> Bool
isInlineLSig (L _ (InlineSig {})) = True | 74 | isInlineLSig (L _ (InlineSig {})) = True | 40 | true | true | 1 | 10 | 16 | 42 | 20 | 22 | null | null |
tolysz/prepare-ghcjs | spec-lts8/aeson/tests/Properties.hs | bsd-3-clause | roundTripNoEnc :: (FromJSON a, ToJSON a, Show a) =>
(a -> a -> Property) -> a -> a -> Property
roundTripNoEnc eq _ i =
case ifromJSON . toJSON $ i of
(ISuccess v) -> v `eq` i
(IError path err) -> failure "fromJSON" (formatError path err) i | 273 | roundTripNoEnc :: (FromJSON a, ToJSON a, Show a) =>
(a -> a -> Property) -> a -> a -> Property
roundTripNoEnc eq _ i =
case ifromJSON . toJSON $ i of
(ISuccess v) -> v `eq` i
(IError path err) -> failure "fromJSON" (formatError path err) i | 273 | roundTripNoEnc eq _ i =
case ifromJSON . toJSON $ i of
(ISuccess v) -> v `eq` i
(IError path err) -> failure "fromJSON" (formatError path err) i | 165 | false | true | 0 | 10 | 81 | 126 | 63 | 63 | null | null |
dmp1ce/Haskell-Programming-Exercises | Chapter 17/ApplicativeInstances/src/Four_2.hs | unlicense | verifyFour'IsFunctor :: IO ()
verifyFour'IsFunctor = quickBatch $ functor (undefined :: Four' (Int,Int,Int) (Int,Int,Int)) | 122 | verifyFour'IsFunctor :: IO ()
verifyFour'IsFunctor = quickBatch $ functor (undefined :: Four' (Int,Int,Int) (Int,Int,Int)) | 122 | verifyFour'IsFunctor = quickBatch $ functor (undefined :: Four' (Int,Int,Int) (Int,Int,Int)) | 92 | false | true | 2 | 8 | 13 | 58 | 30 | 28 | null | null |
naoto-ogawa/h-xproto-mysql | src/DataBase/MySQLX/Model.hs | mit | xBetween :: PEx.Expr -> PEx.Expr -> PEx.Expr -> PEx.Expr
xBetween x min max = multiaryOperator mkOperatorBetween [x, min, max] | 128 | xBetween :: PEx.Expr -> PEx.Expr -> PEx.Expr -> PEx.Expr
xBetween x min max = multiaryOperator mkOperatorBetween [x, min, max] | 126 | xBetween x min max = multiaryOperator mkOperatorBetween [x, min, max] | 69 | false | true | 0 | 10 | 20 | 57 | 28 | 29 | null | null |
conal/lambda-ccc | src/LambdaCCC/Unused/ToCircuit.hs | bsd-3-clause | primToSource AndP = curry and | 30 | primToSource AndP = curry and | 30 | primToSource AndP = curry and | 30 | false | false | 0 | 5 | 5 | 12 | 5 | 7 | null | null |
ryantrinkle/ghcjs | src/Gen2/Prim.hs | mit | genPrim _ _ ReadOffAddrOp_Float [c] [a,o,i] = PrimInline [j| `c` = `a`.dv.getFloat32(`o`+(`i`<<2),true); |] | 107 | genPrim _ _ ReadOffAddrOp_Float [c] [a,o,i] = PrimInline [j| `c` = `a`.dv.getFloat32(`o`+(`i`<<2),true); |] | 107 | genPrim _ _ ReadOffAddrOp_Float [c] [a,o,i] = PrimInline [j| `c` = `a`.dv.getFloat32(`o`+(`i`<<2),true); |] | 107 | false | false | 3 | 6 | 12 | 37 | 21 | 16 | null | null |
forked-upstream-packages-for-ghcjs/ghc | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | translateOp _ DoubleLeOp = Just (MO_F_Le W64) | 54 | translateOp _ DoubleLeOp = Just (MO_F_Le W64) | 54 | translateOp _ DoubleLeOp = Just (MO_F_Le W64) | 54 | false | false | 0 | 7 | 15 | 20 | 9 | 11 | null | null |
rueshyna/gogol | gogol-admin-directory/gen/Network/Google/Directory/Types/Product.hs | mpl-2.0 | -- | ETag of the resource.
nEtag :: Lens' Notification (Maybe Text)
nEtag = lens _nEtag (\ s a -> s{_nEtag = a}) | 112 | nEtag :: Lens' Notification (Maybe Text)
nEtag = lens _nEtag (\ s a -> s{_nEtag = a}) | 85 | nEtag = lens _nEtag (\ s a -> s{_nEtag = a}) | 44 | true | true | 0 | 9 | 22 | 46 | 25 | 21 | null | null |
apyrgio/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | diskValidAccessModes :: FrozenSet String
diskValidAccessModes =
ConstantUtils.mkSet $ map Types.diskAccessModeToRaw [minBound..] | 130 | diskValidAccessModes :: FrozenSet String
diskValidAccessModes =
ConstantUtils.mkSet $ map Types.diskAccessModeToRaw [minBound..] | 130 | diskValidAccessModes =
ConstantUtils.mkSet $ map Types.diskAccessModeToRaw [minBound..] | 89 | false | true | 0 | 7 | 12 | 30 | 15 | 15 | null | null |
SKA-ScienceDataProcessor/RC | MS6/dna/flow/Flow/Builder.hs | apache-2.0 | hintsByPars :: IsKernelDef kd => ([[RegionBox]] -> [ProfileHint]) -> kd -> kd
hintsByPars hint = hintsGeneral $ \rdata _ -> hint (map Map.keys rdata) | 149 | hintsByPars :: IsKernelDef kd => ([[RegionBox]] -> [ProfileHint]) -> kd -> kd
hintsByPars hint = hintsGeneral $ \rdata _ -> hint (map Map.keys rdata) | 149 | hintsByPars hint = hintsGeneral $ \rdata _ -> hint (map Map.keys rdata) | 71 | false | true | 0 | 10 | 23 | 69 | 36 | 33 | null | null |
rvion/lamdu | Lamdu/Sugar/Convert/Monad.hs | gpl-3.0 | getP :: MonadA m => Transaction.MkProperty m a -> ConvertM m a
getP = liftTransaction . Transaction.getP | 104 | getP :: MonadA m => Transaction.MkProperty m a -> ConvertM m a
getP = liftTransaction . Transaction.getP | 104 | getP = liftTransaction . Transaction.getP | 41 | false | true | 0 | 9 | 16 | 46 | 20 | 26 | null | null |
luispedro/NGH | bin/Utils.hs | mit | mayunzip :: (Monad m, MonadUnsafeIO m, MonadThrow m) => String -> Conduit S.ByteString m S.ByteString
mayunzip finput = transformif ("gz" `isSuffixOf` finput) ungzip | 165 | mayunzip :: (Monad m, MonadUnsafeIO m, MonadThrow m) => String -> Conduit S.ByteString m S.ByteString
mayunzip finput = transformif ("gz" `isSuffixOf` finput) ungzip | 165 | mayunzip finput = transformif ("gz" `isSuffixOf` finput) ungzip | 63 | false | true | 0 | 8 | 22 | 64 | 33 | 31 | null | null |
tjakway/ghcjvm | compiler/main/CmdLineParser.hs | bsd-3-clause | setArg :: Located String -> EwM m () -> EwM m ()
setArg l (EwM f) = EwM (\_ es ws -> f l es ws) | 95 | setArg :: Located String -> EwM m () -> EwM m ()
setArg l (EwM f) = EwM (\_ es ws -> f l es ws) | 95 | setArg l (EwM f) = EwM (\_ es ws -> f l es ws) | 46 | false | true | 0 | 10 | 25 | 74 | 34 | 40 | null | null |
Fermat/Gottlob | Language/ProofChecking.hs | bsd-3-clause | erased (Forall x p) = Forall x (erased p) | 41 | erased (Forall x p) = Forall x (erased p) | 41 | erased (Forall x p) = Forall x (erased p) | 41 | false | false | 0 | 7 | 8 | 28 | 13 | 15 | null | null |
ideas-edu/ideas | src/Ideas/Common/DerivationTree.hs | apache-2.0 | singleNode :: a -> Bool -> DerivationTree s a
singleNode a b = DT a b [] | 73 | singleNode :: a -> Bool -> DerivationTree s a
singleNode a b = DT a b [] | 72 | singleNode a b = DT a b [] | 26 | false | true | 0 | 7 | 17 | 38 | 18 | 20 | null | null |
oldmanmike/ghc | compiler/main/DynFlags.hs | bsd-3-clause | -- | Is the Safe Haskell safe inference mode active
safeInferOn :: DynFlags -> Bool
safeInferOn = safeInfer | 107 | safeInferOn :: DynFlags -> Bool
safeInferOn = safeInfer | 55 | safeInferOn = safeInfer | 23 | true | true | 0 | 7 | 17 | 23 | 10 | 13 | null | null |
nevrenato/HetsAlloy | CASL/Freeness.hs | gpl-2.0 | homomorphy_form f = f | 21 | homomorphy_form f = f | 21 | homomorphy_form f = f | 21 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
haroldcarr/learn-haskell-coq-ml-etc | haskell/playpen/2019-03-daniel-brice-compose-validation-io/src/Lib.hs | unlicense | sudoMakeSandwich :: Person -> IO Sandwich
sudoMakeSandwich person = do
bread <- lookupBread person
mustard <- lookupMustard person
turkey <- lookupTurkey person
pickles <- lookupPickles person
join (runValidation logErrorsAndPanic pure
(makeSandwich person pickles mustard turkey bread))
-- `makeSa... | 387 | sudoMakeSandwich :: Person -> IO Sandwich
sudoMakeSandwich person = do
bread <- lookupBread person
mustard <- lookupMustard person
turkey <- lookupTurkey person
pickles <- lookupPickles person
join (runValidation logErrorsAndPanic pure
(makeSandwich person pickles mustard turkey bread))
-- `makeSa... | 387 | sudoMakeSandwich person = do
bread <- lookupBread person
mustard <- lookupMustard person
turkey <- lookupTurkey person
pickles <- lookupPickles person
join (runValidation logErrorsAndPanic pure
(makeSandwich person pickles mustard turkey bread))
-- `makeSandwich` describes making a sandwich (or li... | 345 | false | true | 0 | 12 | 69 | 96 | 42 | 54 | null | null |
ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/GTEQ_2.hs | mit | primCmpInt (Neg Zero) (Neg Zero) = EQ | 37 | primCmpInt (Neg Zero) (Neg Zero) = EQ | 37 | primCmpInt (Neg Zero) (Neg Zero) = EQ | 37 | false | false | 0 | 7 | 6 | 23 | 11 | 12 | null | null |
expipiplus1/vulkan | utils/src/Vulkan/Utils/Debug.hs | bsd-3-clause | -- | Assign a name to a handle using 'setDebugUtilsObjectNameEXT', note that
-- the @VK_EXT_debug_utils@ extension must be enabled.
nameObject :: (HasObjectType a, MonadIO m) => Device -> a -> ByteString -> m ()
nameObject device object name = setDebugUtilsObjectNameEXT
device
(uncurry DebugUtilsObjectNameInfoEXT (... | 360 | nameObject :: (HasObjectType a, MonadIO m) => Device -> a -> ByteString -> m ()
nameObject device object name = setDebugUtilsObjectNameEXT
device
(uncurry DebugUtilsObjectNameInfoEXT (objectTypeAndHandle object) (Just name)) | 228 | nameObject device object name = setDebugUtilsObjectNameEXT
device
(uncurry DebugUtilsObjectNameInfoEXT (objectTypeAndHandle object) (Just name)) | 148 | true | true | 0 | 10 | 50 | 80 | 40 | 40 | null | null |
sdiehl/ghc | testsuite/tests/arrows/should_fail/T2111.hs | bsd-3-clause | bar1 = do { rec { x <- return ('a':x); }; putStrLn (take 20 x) } | 64 | bar1 = do { rec { x <- return ('a':x); }; putStrLn (take 20 x) } | 64 | bar1 = do { rec { x <- return ('a':x); }; putStrLn (take 20 x) } | 64 | false | false | 1 | 13 | 15 | 50 | 24 | 26 | null | null |
vTurbine/ghc | compiler/coreSyn/CoreArity.hs | bsd-3-clause | floatIn True (ATop as) = ATop as | 33 | floatIn True (ATop as) = ATop as | 33 | floatIn True (ATop as) = ATop as | 33 | false | false | 0 | 7 | 7 | 20 | 9 | 11 | null | null |
mzero/PlainChanges2 | src/PartII.hs | bsd-3-clause | ringCymbal :: Dur -> Int -> Music Pitch
ringCymbal d n = ringPerc d $ replicate n RideCymbal2 | 93 | ringCymbal :: Dur -> Int -> Music Pitch
ringCymbal d n = ringPerc d $ replicate n RideCymbal2 | 93 | ringCymbal d n = ringPerc d $ replicate n RideCymbal2 | 53 | false | true | 0 | 7 | 17 | 39 | 18 | 21 | null | null |
parapluu/encore | src/ir/AST/AST.hs | bsd-3-clause | isThisAccess _ = False | 22 | isThisAccess _ = False | 22 | isThisAccess _ = False | 22 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
Soares/tagwiki | src/Text/Render.hs | mit | article :: String -> String -> String
article name = printf "<article id='%s'>\n<h2>%s</h2>\n%s</article>\n"
(slugify name) name | 132 | article :: String -> String -> String
article name = printf "<article id='%s'>\n<h2>%s</h2>\n%s</article>\n"
(slugify name) name | 132 | article name = printf "<article id='%s'>\n<h2>%s</h2>\n%s</article>\n"
(slugify name) name | 94 | false | true | 0 | 7 | 19 | 37 | 17 | 20 | null | null |
ahmadsalim/micro-dsl-properties | src/FJ.hs | gpl-3.0 | prettyField :: Field -> Doc
prettyField (Field cn fn) = text (unName cn) <+> text (unName fn) <> semi | 101 | prettyField :: Field -> Doc
prettyField (Field cn fn) = text (unName cn) <+> text (unName fn) <> semi | 101 | prettyField (Field cn fn) = text (unName cn) <+> text (unName fn) <> semi | 73 | false | true | 0 | 9 | 18 | 52 | 25 | 27 | null | null |
ababkin/railoscopy | src/Haste/Perch/Client.hs | mit | setHtml :: Perch -> String -> Perch
setHtml me text= Perch $ \e' -> do
e <- build me e'
inner e text
return e'
where
inner :: Elem -> String -> Client ()
inner e txt = setProp e "innerHTML" txt
-- | create an element and add a Haste event handler to it. | 272 | setHtml :: Perch -> String -> Perch
setHtml me text= Perch $ \e' -> do
e <- build me e'
inner e text
return e'
where
inner :: Elem -> String -> Client ()
inner e txt = setProp e "innerHTML" txt
-- | create an element and add a Haste event handler to it. | 272 | setHtml me text= Perch $ \e' -> do
e <- build me e'
inner e text
return e'
where
inner :: Elem -> String -> Client ()
inner e txt = setProp e "innerHTML" txt
-- | create an element and add a Haste event handler to it. | 236 | false | true | 2 | 9 | 73 | 108 | 48 | 60 | null | null |
ARCCN/hcprobe | src/HCProbe/FakeSwitch/Processing.hs | bsd-3-clause | -- return $ Just (headReply hdr OFPT_HELLO)
defProcessMessage fk swCfg OFPT_FEATURES_REQUEST (OfpMessage hdr _msg) =
return $ Just (featuresReply openflow_1_0 (eSwitchFeatures fk) (ofp_hdr_xid hdr)) | 208 | defProcessMessage fk swCfg OFPT_FEATURES_REQUEST (OfpMessage hdr _msg) =
return $ Just (featuresReply openflow_1_0 (eSwitchFeatures fk) (ofp_hdr_xid hdr)) | 164 | defProcessMessage fk swCfg OFPT_FEATURES_REQUEST (OfpMessage hdr _msg) =
return $ Just (featuresReply openflow_1_0 (eSwitchFeatures fk) (ofp_hdr_xid hdr)) | 164 | true | false | 0 | 10 | 33 | 53 | 26 | 27 | null | null |
tsujigiri/markov-text | app/Main.hs | bsd-3-clause | main :: IO ()
main = do
args <- getArgs
texts <- mapM readFile args
rng <- newStdGen
putStrLn . takeUntilFullStop $ generate rng texts | 150 | main :: IO ()
main = do
args <- getArgs
texts <- mapM readFile args
rng <- newStdGen
putStrLn . takeUntilFullStop $ generate rng texts | 150 | main = do
args <- getArgs
texts <- mapM readFile args
rng <- newStdGen
putStrLn . takeUntilFullStop $ generate rng texts | 136 | false | true | 0 | 9 | 40 | 64 | 27 | 37 | null | null |
kowey/GenI | geniserver/src/NLP/GenI/Server/Flag.hs | gpl-2.0 | optionsForServer :: [OptDescr Flag]
optionsForServer =
[ helpOption, verboseOption
, macrosOption, lexiconOption
, Option [] ["port"] (reqArg PortFlg read "INT")
("port to listen on (default " ++ show defaultPort ++ ")")
, Option [] ["host"] (reqArg HostFlg id "HOST")
("which host to b... | 363 | optionsForServer :: [OptDescr Flag]
optionsForServer =
[ helpOption, verboseOption
, macrosOption, lexiconOption
, Option [] ["port"] (reqArg PortFlg read "INT")
("port to listen on (default " ++ show defaultPort ++ ")")
, Option [] ["host"] (reqArg HostFlg id "HOST")
("which host to b... | 363 | optionsForServer =
[ helpOption, verboseOption
, macrosOption, lexiconOption
, Option [] ["port"] (reqArg PortFlg read "INT")
("port to listen on (default " ++ show defaultPort ++ ")")
, Option [] ["host"] (reqArg HostFlg id "HOST")
("which host to bind (default " ++ defaultHost ++ ")"... | 327 | false | true | 0 | 11 | 87 | 115 | 59 | 56 | null | null |
zyla/rybu | src/Parser.hs | bsd-3-clause | table =
[ [Postfix arrayIndexOrSlice]
, [Infix (flip BinOp <$> multiplicativeOp) AssocLeft]
, [Infix (flip BinOp <$> additiveOp) AssocLeft]
] | 157 | table =
[ [Postfix arrayIndexOrSlice]
, [Infix (flip BinOp <$> multiplicativeOp) AssocLeft]
, [Infix (flip BinOp <$> additiveOp) AssocLeft]
] | 157 | table =
[ [Postfix arrayIndexOrSlice]
, [Infix (flip BinOp <$> multiplicativeOp) AssocLeft]
, [Infix (flip BinOp <$> additiveOp) AssocLeft]
] | 157 | false | false | 0 | 10 | 35 | 57 | 30 | 27 | null | null |
ben-schulz/Idris-dev | src/Idris/IdrisDoc.hs | bsd-3-clause | extractPTermNames (PIfThenElse _ c t f) = concatMap extract [c, t, f] | 69 | extractPTermNames (PIfThenElse _ c t f) = concatMap extract [c, t, f] | 69 | extractPTermNames (PIfThenElse _ c t f) = concatMap extract [c, t, f] | 69 | false | false | 0 | 7 | 11 | 35 | 18 | 17 | null | null |
prowdsponsor/country-codes | src/Data/CountryCodes/ISO31661.hs | bsd-3-clause | fromMName "Kazakhstan" = Just KZ | 32 | fromMName "Kazakhstan" = Just KZ | 32 | fromMName "Kazakhstan" = Just KZ | 32 | false | false | 0 | 5 | 4 | 12 | 5 | 7 | null | null |
yiannist/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | -- * NIC types
htNicE1000 :: String
htNicE1000 = "e1000" | 57 | htNicE1000 :: String
htNicE1000 = "e1000" | 41 | htNicE1000 = "e1000" | 20 | true | true | 0 | 4 | 10 | 12 | 7 | 5 | null | null |
kim/amazonka | amazonka-ec2/gen/Network/AWS/EC2/Types.hs | mpl-2.0 | -- | The time stamp when the snapshot was initiated.
sStartTime :: Lens' Snapshot UTCTime
sStartTime = lens _sStartTime (\s a -> s { _sStartTime = a }) . _Time | 159 | sStartTime :: Lens' Snapshot UTCTime
sStartTime = lens _sStartTime (\s a -> s { _sStartTime = a }) . _Time | 106 | sStartTime = lens _sStartTime (\s a -> s { _sStartTime = a }) . _Time | 69 | true | true | 0 | 9 | 29 | 51 | 25 | 26 | null | null |
charlesrosenbauer/Bzo-Compiler | src/ModelRules.hs | gpl-3.0 | replaceEnum ps (BzS_Statement p expr) = (BzS_Statement p (replaceEnum ps expr)) | 83 | replaceEnum ps (BzS_Statement p expr) = (BzS_Statement p (replaceEnum ps expr)) | 83 | replaceEnum ps (BzS_Statement p expr) = (BzS_Statement p (replaceEnum ps expr)) | 83 | false | false | 0 | 8 | 14 | 35 | 17 | 18 | null | null |
kumasento/accelerate | Data/Array/Accelerate/Pretty/Print.hs | bsd-3-clause | prettyConst (PrimMaxBound _) = text "maxBound" | 46 | prettyConst (PrimMaxBound _) = text "maxBound" | 46 | prettyConst (PrimMaxBound _) = text "maxBound" | 46 | false | false | 0 | 7 | 5 | 18 | 8 | 10 | null | null |
sdiehl/ghc | hadrian/src/Hadrian/Utilities.hs | bsd-3-clause | intersectOrd :: (a -> b -> Ordering) -> [a] -> [b] -> [a]
intersectOrd cmp = loop
where
loop [] _ = []
loop _ [] = []
loop (x:xs) (y:ys) = case cmp x y of
LT -> loop xs (y:ys)
EQ -> x : loop xs (y:ys)
GT -> loop (x:xs) ys
-- | Lookup all elements of a given sorted list in ... | 668 | intersectOrd :: (a -> b -> Ordering) -> [a] -> [b] -> [a]
intersectOrd cmp = loop
where
loop [] _ = []
loop _ [] = []
loop (x:xs) (y:ys) = case cmp x y of
LT -> loop xs (y:ys)
EQ -> x : loop xs (y:ys)
GT -> loop (x:xs) ys
-- | Lookup all elements of a given sorted list in ... | 668 | intersectOrd cmp = loop
where
loop [] _ = []
loop _ [] = []
loop (x:xs) (y:ys) = case cmp x y of
LT -> loop xs (y:ys)
EQ -> x : loop xs (y:ys)
GT -> loop (x:xs) ys
-- | Lookup all elements of a given sorted list in a given sorted dictionary.
-- @lookupAll list dict@ is equ... | 610 | false | true | 0 | 11 | 173 | 174 | 92 | 82 | null | null |
chrisdone/ghc-server | src/main/Main.hs | bsd-3-clause | -- | Main entry point.
main :: IO ()
main = do args <- fmap parse getArgs
runLogging (startServer (fromMaybe 5233 (lookup "port" args)))
where parse = go
where go ("--port":port:xs) = ("port",read port) : go xs
go (_:xs) = go xs
go [] = [] | 293 | main :: IO ()
main = do args <- fmap parse getArgs
runLogging (startServer (fromMaybe 5233 (lookup "port" args)))
where parse = go
where go ("--port":port:xs) = ("port",read port) : go xs
go (_:xs) = go xs
go [] = [] | 270 | main = do args <- fmap parse getArgs
runLogging (startServer (fromMaybe 5233 (lookup "port" args)))
where parse = go
where go ("--port":port:xs) = ("port",read port) : go xs
go (_:xs) = go xs
go [] = [] | 256 | true | true | 0 | 13 | 99 | 132 | 65 | 67 | null | null |
fmapfmapfmap/amazonka | amazonka-redshift/gen/Network/AWS/Redshift/DescribeEventCategories.hs | mpl-2.0 | -- | Creates a value of 'DescribeEventCategoriesResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'decrsEventCategoriesMapList'
--
-- * 'decrsResponseStatus'
describeEventCategoriesResponse
:: Int -- ^ 'decrsResponseStatus'... | 544 | describeEventCategoriesResponse
:: Int -- ^ 'decrsResponseStatus'
-> DescribeEventCategoriesResponse
describeEventCategoriesResponse pResponseStatus_ =
DescribeEventCategoriesResponse'
{ _decrsEventCategoriesMapList = Nothing
, _decrsResponseStatus = pResponseStatus_
} | 293 | describeEventCategoriesResponse pResponseStatus_ =
DescribeEventCategoriesResponse'
{ _decrsEventCategoriesMapList = Nothing
, _decrsResponseStatus = pResponseStatus_
} | 184 | true | true | 0 | 6 | 82 | 40 | 26 | 14 | null | null |
beni55/ghcjs | src/Gen2/Prim.hs | mit | genPrim _ _ FloatTanhOp [r] [x] = PrimInline [j| `r` = (Math.exp(2*`x`)-1)/(Math.exp(2*`x`)+1) |] | 105 | genPrim _ _ FloatTanhOp [r] [x] = PrimInline [j| `r` = (Math.exp(2*`x`)-1)/(Math.exp(2*`x`)+1) |] | 105 | genPrim _ _ FloatTanhOp [r] [x] = PrimInline [j| `r` = (Math.exp(2*`x`)-1)/(Math.exp(2*`x`)+1) |] | 105 | false | false | 0 | 6 | 20 | 30 | 17 | 13 | null | null |
romanb/amazonka | amazonka-iam/gen/Network/AWS/IAM/GetSAMLProvider.hs | mpl-2.0 | -- | The expiration date and time for the SAML provider.
gsamlprValidUntil :: Lens' GetSAMLProviderResponse (Maybe UTCTime)
gsamlprValidUntil =
lens _gsamlprValidUntil (\s a -> s { _gsamlprValidUntil = a })
. mapping _Time | 234 | gsamlprValidUntil :: Lens' GetSAMLProviderResponse (Maybe UTCTime)
gsamlprValidUntil =
lens _gsamlprValidUntil (\s a -> s { _gsamlprValidUntil = a })
. mapping _Time | 177 | gsamlprValidUntil =
lens _gsamlprValidUntil (\s a -> s { _gsamlprValidUntil = a })
. mapping _Time | 110 | true | true | 0 | 10 | 44 | 53 | 28 | 25 | null | null |
beni55/attoparsec | Data/Attoparsec/Internal.hs | bsd-3-clause | -- | Compare two 'IResult' values for equality.
--
-- If both 'IResult's are 'Partial', the result will be 'Nothing', as
-- they are incomplete and hence their equality cannot be known.
-- (This is why there is no 'Eq' instance for 'IResult'.)
compareResults :: (Eq i, Eq r) => IResult i r -> IResult i r -> Maybe Bool
c... | 431 | compareResults :: (Eq i, Eq r) => IResult i r -> IResult i r -> Maybe Bool
compareResults (Fail t0 ctxs0 msg0) (Fail t1 ctxs1 msg1) =
Just (t0 == t1 && ctxs0 == ctxs1 && msg0 == msg1) | 187 | compareResults (Fail t0 ctxs0 msg0) (Fail t1 ctxs1 msg1) =
Just (t0 == t1 && ctxs0 == ctxs1 && msg0 == msg1) | 112 | true | true | 0 | 11 | 85 | 103 | 53 | 50 | null | null |
urbanslug/ghc | libraries/base/GHC/IO/Exception.hs | bsd-3-clause | -- |@since 4.7.0.0
asyncExceptionFromException :: Exception e => SomeException -> Maybe e
asyncExceptionFromException x = do
SomeAsyncException a <- fromException x
cast a
-- |Asynchronous exceptions. | 210 | asyncExceptionFromException :: Exception e => SomeException -> Maybe e
asyncExceptionFromException x = do
SomeAsyncException a <- fromException x
cast a
-- |Asynchronous exceptions. | 191 | asyncExceptionFromException x = do
SomeAsyncException a <- fromException x
cast a
-- |Asynchronous exceptions. | 120 | true | true | 0 | 8 | 35 | 49 | 22 | 27 | null | null |
UU-ComputerScience/uulib | src/UU/Parsing/CharParser.hs | bsd-3-clause | parseString :: CharParser a
-> [Char]
-> Steps (Pair a (Pair Input ())) Char Pos
parseString p txt = parse p ((Input txt (initPos ""))) | 161 | parseString :: CharParser a
-> [Char]
-> Steps (Pair a (Pair Input ())) Char Pos
parseString p txt = parse p ((Input txt (initPos ""))) | 161 | parseString p txt = parse p ((Input txt (initPos ""))) | 54 | false | true | 0 | 12 | 50 | 77 | 38 | 39 | null | null |
geophf/1HaskellADay | exercises/HAD/Y2018/M07/D30/Solution.hs | mit | -- We have two databases
pilot, entities, exDir :: FilePath
exDir = "Y2018/M07/D30/" | 85 | pilot, entities, exDir :: FilePath
exDir = "Y2018/M07/D30/" | 59 | exDir = "Y2018/M07/D30/" | 24 | true | true | 4 | 6 | 13 | 31 | 12 | 19 | null | null |
eryx67/haskell-libtorrent | src/Network/Libtorrent/Rss.hs | bsd-3-clause | setFeedSettingsDefaultTtl :: MonadIO m => FeedSettings -> CInt -> m ()
setFeedSettingsDefaultTtl ho val =
liftIO . withPtr ho $ \hoPtr ->
[CU.exp| void { $(feed_settings * hoPtr)->default_ttl = $(int val)} |] | 213 | setFeedSettingsDefaultTtl :: MonadIO m => FeedSettings -> CInt -> m ()
setFeedSettingsDefaultTtl ho val =
liftIO . withPtr ho $ \hoPtr ->
[CU.exp| void { $(feed_settings * hoPtr)->default_ttl = $(int val)} |] | 213 | setFeedSettingsDefaultTtl ho val =
liftIO . withPtr ho $ \hoPtr ->
[CU.exp| void { $(feed_settings * hoPtr)->default_ttl = $(int val)} |] | 141 | false | true | 0 | 9 | 36 | 58 | 30 | 28 | null | null |
arirahikkala/straylight-divergence | src/Util.hs | gpl-3.0 | lengthAtLeast n (_:xs) = lengthAtLeast (n - 1) xs | 49 | lengthAtLeast n (_:xs) = lengthAtLeast (n - 1) xs | 49 | lengthAtLeast n (_:xs) = lengthAtLeast (n - 1) xs | 49 | false | false | 0 | 7 | 8 | 30 | 15 | 15 | null | null |
ocharles/hackage-server | Distribution/Server/Features/Upload/Backup.hs | bsd-3-clause | maintToExport :: Map PackageName UserIdSet -> BackupEntry
maintToExport pkgmap = csvToBackup ["maintainers.csv"] (maintToCSV assocUsers)
where assocUsers = map (\(name, uidset) -> (name, UserIdSet.toList uidset))
$ Map.toList pkgmap | 253 | maintToExport :: Map PackageName UserIdSet -> BackupEntry
maintToExport pkgmap = csvToBackup ["maintainers.csv"] (maintToCSV assocUsers)
where assocUsers = map (\(name, uidset) -> (name, UserIdSet.toList uidset))
$ Map.toList pkgmap | 253 | maintToExport pkgmap = csvToBackup ["maintainers.csv"] (maintToCSV assocUsers)
where assocUsers = map (\(name, uidset) -> (name, UserIdSet.toList uidset))
$ Map.toList pkgmap | 195 | false | true | 0 | 11 | 47 | 82 | 42 | 40 | null | null |
TueHaulund/ROOPLC | src/CodeGenerator.hs | mit | cgBinOp BitOr r1 r2 = tempRegister >>= \rt -> return (rt, [(Nothing, ORX rt r1 r2)], popTempRegister) | 101 | cgBinOp BitOr r1 r2 = tempRegister >>= \rt -> return (rt, [(Nothing, ORX rt r1 r2)], popTempRegister) | 101 | cgBinOp BitOr r1 r2 = tempRegister >>= \rt -> return (rt, [(Nothing, ORX rt r1 r2)], popTempRegister) | 101 | false | false | 0 | 11 | 16 | 50 | 27 | 23 | null | null |
Peaker/keyvaluehash | src/Database/GrowingFile.hs | bsd-3-clause | resizeFile :: FilePath -> Word64 -> IO ()
resizeFile filePath size =
IO.withBinaryFile filePath IO.ReadWriteMode $ \handle ->
IO.hSetFileSize handle (fromIntegral size) | 174 | resizeFile :: FilePath -> Word64 -> IO ()
resizeFile filePath size =
IO.withBinaryFile filePath IO.ReadWriteMode $ \handle ->
IO.hSetFileSize handle (fromIntegral size) | 174 | resizeFile filePath size =
IO.withBinaryFile filePath IO.ReadWriteMode $ \handle ->
IO.hSetFileSize handle (fromIntegral size) | 132 | false | true | 0 | 9 | 27 | 60 | 29 | 31 | null | null |
ctford/Idris-Elba-dev | src/IRTS/CodegenJava.hs | bsd-3-clause | -- Empty expressions
mkExp pp (SNothing) = ppExp pp $ Lit Null | 62 | mkExp pp (SNothing) = ppExp pp $ Lit Null | 41 | mkExp pp (SNothing) = ppExp pp $ Lit Null | 41 | true | false | 0 | 6 | 11 | 26 | 12 | 14 | null | null |
mi-na/scotland_yard | src/CharacterD.hs | bsd-3-clause | move :: Bool -> Int -> [Node] -> Player -> Maybe Player
move flag distNum allNodes targetP
| isValidDistination distNum targetP || flag = return Player { myNumber=myNumber targetP
, myOccupation=myOccupation targetP
... | 604 | move :: Bool -> Int -> [Node] -> Player -> Maybe Player
move flag distNum allNodes targetP
| isValidDistination distNum targetP || flag = return Player { myNumber=myNumber targetP
, myOccupation=myOccupation targetP
... | 604 | move flag distNum allNodes targetP
| isValidDistination distNum targetP || flag = return Player { myNumber=myNumber targetP
, myOccupation=myOccupation targetP
, myNode=(getNextNode distNum... | 548 | false | true | 1 | 10 | 330 | 115 | 57 | 58 | null | null |
kryft/fsil | Player.hs | gpl-2.0 | -- | The base number by which the player's to-hit roll needs to exceed
--a monster's evasion roll for a critical hit to occur. This is 7.0 in
--Sil (and not likely to change).
playerBaseCritThres = 7.0 | 201 | playerBaseCritThres = 7.0 | 25 | playerBaseCritThres = 7.0 | 25 | true | false | 0 | 4 | 36 | 9 | 6 | 3 | null | null |
AlexeyRaga/eta | compiler/ETA/Main/DynFlags.hs | bsd-3-clause | setExtensionFlag', unSetExtensionFlag' :: ExtensionFlag -> DynFlags -> DynFlags
setExtensionFlag' f dflags = foldr ($) (xopt_set dflags f) deps
where
deps = [ if turn_on then setExtensionFlag' d
else unSetExtensionFlag' d
| (f', turn_on, d) <- impliedXFlags, f' == f ]
... | 474 | setExtensionFlag', unSetExtensionFlag' :: ExtensionFlag -> DynFlags -> DynFlags
setExtensionFlag' f dflags = foldr ($) (xopt_set dflags f) deps
where
deps = [ if turn_on then setExtensionFlag' d
else unSetExtensionFlag' d
| (f', turn_on, d) <- impliedXFlags, f' == f ]
... | 474 | setExtensionFlag' f dflags = foldr ($) (xopt_set dflags f) deps
where
deps = [ if turn_on then setExtensionFlag' d
else unSetExtensionFlag' d
| (f', turn_on, d) <- impliedXFlags, f' == f ]
-- When you set f, set the ones it implies
-- NB: use setExtensionFlag r... | 394 | false | true | 3 | 9 | 134 | 105 | 53 | 52 | null | null |
dkensinger/haskell | haskell-primes/NaurPrimes.hs | gpl-3.0 | intLimit :: Integral a => a
intLimit = fromIntegral (maxBound::Int) | 67 | intLimit :: Integral a => a
intLimit = fromIntegral (maxBound::Int) | 67 | intLimit = fromIntegral (maxBound::Int) | 39 | false | true | 0 | 6 | 9 | 27 | 14 | 13 | null | null |
gabesoft/kapi | src/Persistence/ElasticSearch.hs | bsd-3-clause | mkSearch' :: Maybe Query
-> Maybe Filter
-> Maybe Sort
-> [FieldName]
-> Int
-> Int
-> Search
mkSearch' query filter' sort fields' start limit =
Search
query
filter'
sort
Nothing
Nothing
False
(From start)
(Size limit)
Sea... | 391 | mkSearch' :: Maybe Query
-> Maybe Filter
-> Maybe Sort
-> [FieldName]
-> Int
-> Int
-> Search
mkSearch' query filter' sort fields' start limit =
Search
query
filter'
sort
Nothing
Nothing
False
(From start)
(Size limit)
Sea... | 391 | mkSearch' query filter' sort fields' start limit =
Search
query
filter'
sort
Nothing
Nothing
False
(From start)
(Size limit)
SearchTypeDfsQueryThenFetch
(mToMaybe fields')
Nothing
Nothing | 237 | false | true | 0 | 10 | 151 | 103 | 50 | 53 | null | null |
snoyberg/photosorter | fay/Language/Fay/JQuery.hs | bsd-2-clause | hide :: JQuery -> Fay JQuery
hide = ffi "%1['hide']()" | 54 | hide :: JQuery -> Fay JQuery
hide = ffi "%1['hide']()" | 54 | hide = ffi "%1['hide']()" | 25 | false | true | 0 | 6 | 9 | 21 | 10 | 11 | null | null |
timbod7/veditor | Graphics/UI/VE/GTK.hs | bsd-3-clause | uiGTK (MaybeVE ui) = uiGTK (maybeVE_ ui) | 40 | uiGTK (MaybeVE ui) = uiGTK (maybeVE_ ui) | 40 | uiGTK (MaybeVE ui) = uiGTK (maybeVE_ ui) | 40 | false | false | 0 | 6 | 6 | 25 | 11 | 14 | null | null |
vonavi/hcloud | src/Main.hs | bsd-3-clause | tempSessionFile :: NodeEndPoint -> IO FilePath
tempSessionFile ept = do
dir <- getTemporaryDirectory
return $ dir </> getHost ept ++ ":" ++ getPort ept ++ ".tmp" | 165 | tempSessionFile :: NodeEndPoint -> IO FilePath
tempSessionFile ept = do
dir <- getTemporaryDirectory
return $ dir </> getHost ept ++ ":" ++ getPort ept ++ ".tmp" | 165 | tempSessionFile ept = do
dir <- getTemporaryDirectory
return $ dir </> getHost ept ++ ":" ++ getPort ept ++ ".tmp" | 118 | false | true | 0 | 11 | 29 | 57 | 26 | 31 | null | null |
kwangkim/pigment | src-web/hs/Cochon/OldView.hs | mit | prettyDevView :: Traversable f => ProofContext -> Dev f -> InteractionReact
prettyDevView loc (Dev entries tip _ suspended) =
let runner :: ProofState TermReact
runner = tipView tip
runner' :: TermReact
runner' = case runProofState runner loc of
Left err -> err
Right ... | 912 | prettyDevView :: Traversable f => ProofContext -> Dev f -> InteractionReact
prettyDevView loc (Dev entries tip _ suspended) =
let runner :: ProofState TermReact
runner = tipView tip
runner' :: TermReact
runner' = case runProofState runner loc of
Left err -> err
Right ... | 912 | prettyDevView loc (Dev entries tip _ suspended) =
let runner :: ProofState TermReact
runner = tipView tip
runner' :: TermReact
runner' = case runProofState runner loc of
Left err -> err
Right (view, _) -> view
-- XXX(joel) we're no longer showing the implemen... | 836 | false | true | 0 | 16 | 284 | 174 | 86 | 88 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.