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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
GaloisInc/halvm-ghc | libraries/template-haskell/Language/Haskell/TH/Ppr.hs | bsd-3-clause | pprPat i (BangP p) = parensIf (i > noPrec) $ char '!' <> pprPat appPrec p | 76 | pprPat i (BangP p) = parensIf (i > noPrec) $ char '!' <> pprPat appPrec p | 76 | pprPat i (BangP p) = parensIf (i > noPrec) $ char '!' <> pprPat appPrec p | 76 | false | false | 0 | 9 | 18 | 45 | 20 | 25 | null | null |
brendanhay/gogol | gogol-datafusion/gen/Network/Google/DataFusion/Types/Product.hs | mpl-2.0 | -- | Service-specific metadata associated with the operation. It typically
-- contains progress information and common metadata such as create time.
-- Some services might not provide such metadata. Any method that returns a
-- long-running operation should document the metadata type, if any.
oMetadata :: Lens' Operation (Maybe OperationSchema)
oMetadata
= lens _oMetadata (\ s a -> s{_oMetadata = a}) | 405 | oMetadata :: Lens' Operation (Maybe OperationSchema)
oMetadata
= lens _oMetadata (\ s a -> s{_oMetadata = a}) | 111 | oMetadata
= lens _oMetadata (\ s a -> s{_oMetadata = a}) | 58 | true | true | 0 | 9 | 62 | 51 | 28 | 23 | null | null |
sdiehl/time-recurrence | src/Data/Time/CalendarTime/CalendarTime.hs | lgpl-3.0 | lastDayOfMonth :: (CalendarTimeConvertible a) => a -> Int
lastDayOfMonth t = let ct = toCalendarTime t
in gregorianMonthLength (calendarYear ct) (fromEnum $ calendarMonth ct) | 176 | lastDayOfMonth :: (CalendarTimeConvertible a) => a -> Int
lastDayOfMonth t = let ct = toCalendarTime t
in gregorianMonthLength (calendarYear ct) (fromEnum $ calendarMonth ct) | 176 | lastDayOfMonth t = let ct = toCalendarTime t
in gregorianMonthLength (calendarYear ct) (fromEnum $ calendarMonth ct) | 118 | false | true | 0 | 10 | 25 | 62 | 30 | 32 | null | null |
DamienCassou/HYahtzee | Game/HYahtzee/Tests/EngineTest.hs | bsd-3-clause | mainTests :: IO Counts
mainTests = runTestTT allTests | 53 | mainTests :: IO Counts
mainTests = runTestTT allTests | 53 | mainTests = runTestTT allTests | 30 | false | true | 0 | 6 | 7 | 23 | 9 | 14 | null | null |
karamellpelle/grid | source/Game/GUI/Widget/LayoutWidget/StaticLayout.hs | gpl-3.0 | xgatherBot1 :: (StaticLayout l0) =>
l0 a -> XGatherLayout a
xgatherBot1 l0 =
xgatherBot [makeChildLayout l0] | 129 | xgatherBot1 :: (StaticLayout l0) =>
l0 a -> XGatherLayout a
xgatherBot1 l0 =
xgatherBot [makeChildLayout l0] | 129 | xgatherBot1 l0 =
xgatherBot [makeChildLayout l0] | 53 | false | true | 0 | 8 | 36 | 47 | 21 | 26 | null | null |
chwarr/bond | compiler/src/Language/Bond/Parser.hs | mit | enum :: [Attribute] -> Parser Declaration
enum attr = Enum <$> asks currentNamespaces <*> pure attr <*> name <*> consts <* optional semi <?> "enum definition"
where
name = try (keyword "enum") *> identifier <?> "enum identifier"
consts = braces (semiOrCommaSepEnd1 constant <?> "enum constant")
constant = Constant <$> identifier <*> optional value
value = equal *> (fromIntegral <$> integer)
-- basic types parser | 433 | enum :: [Attribute] -> Parser Declaration
enum attr = Enum <$> asks currentNamespaces <*> pure attr <*> name <*> consts <* optional semi <?> "enum definition"
where
name = try (keyword "enum") *> identifier <?> "enum identifier"
consts = braces (semiOrCommaSepEnd1 constant <?> "enum constant")
constant = Constant <$> identifier <*> optional value
value = equal *> (fromIntegral <$> integer)
-- basic types parser | 433 | enum attr = Enum <$> asks currentNamespaces <*> pure attr <*> name <*> consts <* optional semi <?> "enum definition"
where
name = try (keyword "enum") *> identifier <?> "enum identifier"
consts = braces (semiOrCommaSepEnd1 constant <?> "enum constant")
constant = Constant <$> identifier <*> optional value
value = equal *> (fromIntegral <$> integer)
-- basic types parser | 391 | false | true | 0 | 11 | 82 | 133 | 66 | 67 | null | null |
romanb/amazonka | amazonka-cognito-identity/gen/Network/AWS/CognitoIdentity/MergeDeveloperIdentities.hs | mpl-2.0 | -- | A unique identifier in the format REGION:GUID.
mdirIdentityId :: Lens' MergeDeveloperIdentitiesResponse (Maybe Text)
mdirIdentityId = lens _mdirIdentityId (\s a -> s { _mdirIdentityId = a }) | 195 | mdirIdentityId :: Lens' MergeDeveloperIdentitiesResponse (Maybe Text)
mdirIdentityId = lens _mdirIdentityId (\s a -> s { _mdirIdentityId = a }) | 143 | mdirIdentityId = lens _mdirIdentityId (\s a -> s { _mdirIdentityId = a }) | 73 | true | true | 0 | 9 | 27 | 46 | 25 | 21 | null | null |
aslatter/parsec2 | Text/ParserCombinators/Parsec/Prim.hs | bsd-2-clause | -- | The expression @parseTest p input@ applies a parser @p@ against
-- input @input@ and prints the result to stdout. Used for testing
-- parsers.
parseTest :: Show a => GenParser tok () a -> [tok] -> IO ()
parseTest p input
= case (runParser p () "" input) of
Left err -> do{ putStr "parse error at "
; print err
}
Right x -> print x
-- | @parse p filePath input@ runs a parser @p@ without user
-- state. The @filePath@ is only used in error messages and may be the
-- empty string. Returns either a 'ParseError' ('Left')
-- or a value of type @a@ ('Right').
--
-- > main = case (parse numbers "" "11, 2, 43") of
-- > Left err -> print err
-- > Right xs -> print (sum xs)
-- >
-- > numbers = commaSep integer | 807 | parseTest :: Show a => GenParser tok () a -> [tok] -> IO ()
parseTest p input
= case (runParser p () "" input) of
Left err -> do{ putStr "parse error at "
; print err
}
Right x -> print x
-- | @parse p filePath input@ runs a parser @p@ without user
-- state. The @filePath@ is only used in error messages and may be the
-- empty string. Returns either a 'ParseError' ('Left')
-- or a value of type @a@ ('Right').
--
-- > main = case (parse numbers "" "11, 2, 43") of
-- > Left err -> print err
-- > Right xs -> print (sum xs)
-- >
-- > numbers = commaSep integer | 659 | parseTest p input
= case (runParser p () "" input) of
Left err -> do{ putStr "parse error at "
; print err
}
Right x -> print x
-- | @parse p filePath input@ runs a parser @p@ without user
-- state. The @filePath@ is only used in error messages and may be the
-- empty string. Returns either a 'ParseError' ('Left')
-- or a value of type @a@ ('Right').
--
-- > main = case (parse numbers "" "11, 2, 43") of
-- > Left err -> print err
-- > Right xs -> print (sum xs)
-- >
-- > numbers = commaSep integer | 599 | true | true | 0 | 10 | 243 | 115 | 61 | 54 | null | null |
spechub/Hets | QBF/AS_BASIC_QBF.der.hs | gpl-2.0 | printSymbol :: SYMB -> Doc
printSymbol (SymbId sym) = pretty sym | 64 | printSymbol :: SYMB -> Doc
printSymbol (SymbId sym) = pretty sym | 64 | printSymbol (SymbId sym) = pretty sym | 37 | false | true | 0 | 7 | 10 | 27 | 13 | 14 | null | null |
brendanhay/gogol | gogol-shopping-content/gen/Network/Google/ShoppingContent/Types/Product.hs | mpl-2.0 | -- | Required. First day on which the override applies. In ISO 8601 format.
rpsoStartDate :: Lens' ReturnPolicySeasonalOverride (Maybe Text)
rpsoStartDate
= lens _rpsoStartDate
(\ s a -> s{_rpsoStartDate = a}) | 217 | rpsoStartDate :: Lens' ReturnPolicySeasonalOverride (Maybe Text)
rpsoStartDate
= lens _rpsoStartDate
(\ s a -> s{_rpsoStartDate = a}) | 141 | rpsoStartDate
= lens _rpsoStartDate
(\ s a -> s{_rpsoStartDate = a}) | 76 | true | true | 0 | 9 | 38 | 48 | 25 | 23 | null | null |
LeonardoRigon/TypeInfer-LambdaExpressions-in-Haskell | tests.hs | mit | -- \x . case x true -|> 1, false -|> 0
ex6 = Lam "x" (Case (Var "x") [(PLit (LBool True), Lit (LInt 1)), (PLit (LBool False), Lit (LInt 0))]) | 141 | ex6 = Lam "x" (Case (Var "x") [(PLit (LBool True), Lit (LInt 1)), (PLit (LBool False), Lit (LInt 0))]) | 102 | ex6 = Lam "x" (Case (Var "x") [(PLit (LBool True), Lit (LInt 1)), (PLit (LBool False), Lit (LInt 0))]) | 102 | true | false | 0 | 12 | 29 | 80 | 41 | 39 | null | null |
feuerbach/music | Melody/GameOfThrones.hs | mit | bass_pat_bf = do
replicateM_ 2 $ do
mono "b3b" 1
mono "b2b" 0.5
mono "b3b" 0.5
mono "f2" 0.5
mono "b2b" 0.5 | 153 | bass_pat_bf = do
replicateM_ 2 $ do
mono "b3b" 1
mono "b2b" 0.5
mono "b3b" 0.5
mono "f2" 0.5
mono "b2b" 0.5 | 153 | bass_pat_bf = do
replicateM_ 2 $ do
mono "b3b" 1
mono "b2b" 0.5
mono "b3b" 0.5
mono "f2" 0.5
mono "b2b" 0.5 | 153 | false | false | 0 | 10 | 67 | 56 | 22 | 34 | null | null |
dmjio/stripe | stripe-core/src/Web/Stripe/Util.hs | mit | paramsToByteString ((x,y) : xs) =
mconcat [ x, "=", y, "&" ] <> paramsToByteString xs | 89 | paramsToByteString ((x,y) : xs) =
mconcat [ x, "=", y, "&" ] <> paramsToByteString xs | 89 | paramsToByteString ((x,y) : xs) =
mconcat [ x, "=", y, "&" ] <> paramsToByteString xs | 89 | false | false | 0 | 7 | 18 | 45 | 24 | 21 | null | null |
facebook/fbthrift | thrift/lib/hs/Thrift/Protocol/JSON.hs | apache-2.0 | buildJSONValue (TMap kt vt entries) =
"[\"" <> getTypeName kt <> "\"" <>
",\"" <> getTypeName vt <> "\"" <>
"," <> intDec (length entries) <>
",{" <> buildJSONMap entries <> "}" <>
"]" | 194 | buildJSONValue (TMap kt vt entries) =
"[\"" <> getTypeName kt <> "\"" <>
",\"" <> getTypeName vt <> "\"" <>
"," <> intDec (length entries) <>
",{" <> buildJSONMap entries <> "}" <>
"]" | 194 | buildJSONValue (TMap kt vt entries) =
"[\"" <> getTypeName kt <> "\"" <>
",\"" <> getTypeName vt <> "\"" <>
"," <> intDec (length entries) <>
",{" <> buildJSONMap entries <> "}" <>
"]" | 194 | false | false | 0 | 16 | 43 | 81 | 38 | 43 | null | null |
oldmanmike/ghc | compiler/cmm/CLabel.hs | bsd-3-clause | needsCDecl (AsmTempLabel _) = False | 47 | needsCDecl (AsmTempLabel _) = False | 47 | needsCDecl (AsmTempLabel _) = False | 47 | false | false | 0 | 7 | 16 | 15 | 7 | 8 | null | null |
input-output-hk/pos-haskell-prototype | util/test/Test/Pos/Util/QuickCheck/Property.hs | mit | shouldThrowException
:: (Exception e)
=> (a -> b)
-> Selector e
-> a
-> Expectation
shouldThrowException action exception arg =
(return $! action arg) `shouldThrow` exception | 198 | shouldThrowException
:: (Exception e)
=> (a -> b)
-> Selector e
-> a
-> Expectation
shouldThrowException action exception arg =
(return $! action arg) `shouldThrow` exception | 198 | shouldThrowException action exception arg =
(return $! action arg) `shouldThrow` exception | 94 | false | true | 0 | 10 | 49 | 71 | 35 | 36 | null | null |
infotroph/pandoc | src/Text/Pandoc/Readers/EPUB.hs | gpl-2.0 | fixInternalReferences :: FilePath -> Pandoc -> Pandoc
fixInternalReferences pathToFile =
(walk $ renameImages root)
. (walk $ fixBlockIRs filename)
. (walk $ fixInlineIRs filename)
where
(root, escapeURI -> filename) = splitFileName pathToFile | 255 | fixInternalReferences :: FilePath -> Pandoc -> Pandoc
fixInternalReferences pathToFile =
(walk $ renameImages root)
. (walk $ fixBlockIRs filename)
. (walk $ fixInlineIRs filename)
where
(root, escapeURI -> filename) = splitFileName pathToFile | 255 | fixInternalReferences pathToFile =
(walk $ renameImages root)
. (walk $ fixBlockIRs filename)
. (walk $ fixInlineIRs filename)
where
(root, escapeURI -> filename) = splitFileName pathToFile | 201 | false | true | 2 | 7 | 43 | 87 | 42 | 45 | null | null |
nschoe/hpm | BookLibrary.hs | bsd-3-clause | askPassword (Just msg) = askPassword' msg | 41 | askPassword (Just msg) = askPassword' msg | 41 | askPassword (Just msg) = askPassword' msg | 41 | false | false | 0 | 7 | 5 | 18 | 8 | 10 | null | null |
E2LP/e2asm | src/E2ASM/Assembler/Parser.hs | gpl-3.0 | predicate :: Parser Pred.Predicate
predicate = P.token show getPos check
where
check :: Tok.Token -> Maybe Pred.Predicate
check (Tok.Token (Tok.TPred p) _) = Just p
check _ = Nothing | 222 | predicate :: Parser Pred.Predicate
predicate = P.token show getPos check
where
check :: Tok.Token -> Maybe Pred.Predicate
check (Tok.Token (Tok.TPred p) _) = Just p
check _ = Nothing | 222 | predicate = P.token show getPos check
where
check :: Tok.Token -> Maybe Pred.Predicate
check (Tok.Token (Tok.TPred p) _) = Just p
check _ = Nothing | 187 | false | true | 3 | 10 | 68 | 80 | 39 | 41 | null | null |
eltongo/unicorn | bindings/haskell/samples/SampleMips.hs | gpl-2.0 | -- Pretty-print integral as hex
showHex :: (Integral a, Show a) => a -> String
showHex =
flip N.showHex "" | 110 | showHex :: (Integral a, Show a) => a -> String
showHex =
flip N.showHex "" | 78 | showHex =
flip N.showHex "" | 31 | true | true | 0 | 6 | 23 | 38 | 20 | 18 | null | null |
5outh/wyas | Types.hs | gpl-2.0 | showVal :: LispVal -> String
showVal (Atom a) = a | 49 | showVal :: LispVal -> String
showVal (Atom a) = a | 49 | showVal (Atom a) = a | 20 | false | true | 0 | 9 | 9 | 30 | 13 | 17 | null | null |
green-haskell/ghc | compiler/basicTypes/RdrName.hs | bsd-3-clause | setRdrNameSpace (Orig m occ) ns = Orig m (setOccNameSpace ns occ) | 65 | setRdrNameSpace (Orig m occ) ns = Orig m (setOccNameSpace ns occ) | 65 | setRdrNameSpace (Orig m occ) ns = Orig m (setOccNameSpace ns occ) | 65 | false | false | 0 | 7 | 10 | 32 | 15 | 17 | null | null |
brendanhay/gogol | gogol-videointelligence/gen/Network/Google/VideoIntelligence/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'GoogleCloudVideointelligenceV1p2beta1_SpeechTranscription' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'goo1Alternatives'
--
-- * 'goo1LanguageCode'
googleCloudVideointelligenceV1p2beta1_SpeechTranscription
:: GoogleCloudVideointelligenceV1p2beta1_SpeechTranscription
googleCloudVideointelligenceV1p2beta1_SpeechTranscription =
GoogleCloudVideointelligenceV1p2beta1_SpeechTranscription'
{_goo1Alternatives = Nothing, _goo1LanguageCode = Nothing} | 569 | googleCloudVideointelligenceV1p2beta1_SpeechTranscription
:: GoogleCloudVideointelligenceV1p2beta1_SpeechTranscription
googleCloudVideointelligenceV1p2beta1_SpeechTranscription =
GoogleCloudVideointelligenceV1p2beta1_SpeechTranscription'
{_goo1Alternatives = Nothing, _goo1LanguageCode = Nothing} | 306 | googleCloudVideointelligenceV1p2beta1_SpeechTranscription =
GoogleCloudVideointelligenceV1p2beta1_SpeechTranscription'
{_goo1Alternatives = Nothing, _goo1LanguageCode = Nothing} | 183 | true | true | 0 | 6 | 59 | 32 | 22 | 10 | null | null |
samcal/rasa | rasa-ext-vim/src/Rasa/Ext/Vim.hs | gpl-3.0 | normal [Keypress 'w' [Ctrl]] = runApp hSplit | 44 | normal [Keypress 'w' [Ctrl]] = runApp hSplit | 44 | normal [Keypress 'w' [Ctrl]] = runApp hSplit | 44 | false | false | 0 | 8 | 6 | 23 | 11 | 12 | null | null |
aufheben/Y86 | Assembler/src/Assembler/NanoParsec.hs | mit | item :: Parser Char
item = Parser $ \s ->
case s of
[] -> []
(c:cs) -> [(c,cs)] | 91 | item :: Parser Char
item = Parser $ \s ->
case s of
[] -> []
(c:cs) -> [(c,cs)] | 91 | item = Parser $ \s ->
case s of
[] -> []
(c:cs) -> [(c,cs)] | 71 | false | true | 0 | 11 | 30 | 59 | 32 | 27 | null | null |
contivero/hasmin | tests/Hasmin/Types/TransformFunctionSpec.hs | bsd-3-clause | main :: IO ()
main = hspec spec | 31 | main :: IO ()
main = hspec spec | 31 | main = hspec spec | 17 | false | true | 0 | 7 | 7 | 25 | 10 | 15 | null | null |
frenetic-lang/netcore-1.0 | src/Frenetic/Slices/Compile.hs | bsd-3-clause | matchesSwitch s (And p1 p2) = matchesSwitch s p1 && matchesSwitch s p2 | 70 | matchesSwitch s (And p1 p2) = matchesSwitch s p1 && matchesSwitch s p2 | 70 | matchesSwitch s (And p1 p2) = matchesSwitch s p1 && matchesSwitch s p2 | 70 | false | false | 0 | 6 | 12 | 35 | 15 | 20 | null | null |
siddhanathan/ghc | testsuite/tests/rename/should_compile/timing001.hs | bsd-3-clause | a343 = a344 | 11 | a343 = a344 | 11 | a343 = a344 | 11 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
gencer/bond | compiler/src/Language/Bond/Codegen/CustomMapping.hs | mit | -- consume whitespace after every lexeme
lexeme :: Parser a -> Parser a
lexeme = L.lexeme sc | 92 | lexeme :: Parser a -> Parser a
lexeme = L.lexeme sc | 51 | lexeme = L.lexeme sc | 20 | true | true | 0 | 6 | 16 | 27 | 13 | 14 | null | null |
yaccz/saturnin | library/Saturnin/Server.hs | bsd-3-clause | ybsListen
:: (Maybe ConfigServer)
-> YBServer (Maybe Socket)
ybsListen (Just cg) = do
addrinfos <- liftIO $ getAddrInfo
(Just defaultHints {addrFamily = AF_INET})
(listen_addr cg)
(listen_port cg)
let addr = head addrinfos
sock <- liftIO $ socket (addrFamily addr) Stream defaultProtocol
_ <- liftIO . bind sock $ addrAddress addr
logInfo $ format ("Listening on " % shown) addr
_ <- liftIO $ listen sock 5
return $ Just sock | 489 | ybsListen
:: (Maybe ConfigServer)
-> YBServer (Maybe Socket)
ybsListen (Just cg) = do
addrinfos <- liftIO $ getAddrInfo
(Just defaultHints {addrFamily = AF_INET})
(listen_addr cg)
(listen_port cg)
let addr = head addrinfos
sock <- liftIO $ socket (addrFamily addr) Stream defaultProtocol
_ <- liftIO . bind sock $ addrAddress addr
logInfo $ format ("Listening on " % shown) addr
_ <- liftIO $ listen sock 5
return $ Just sock | 489 | ybsListen (Just cg) = do
addrinfos <- liftIO $ getAddrInfo
(Just defaultHints {addrFamily = AF_INET})
(listen_addr cg)
(listen_port cg)
let addr = head addrinfos
sock <- liftIO $ socket (addrFamily addr) Stream defaultProtocol
_ <- liftIO . bind sock $ addrAddress addr
logInfo $ format ("Listening on " % shown) addr
_ <- liftIO $ listen sock 5
return $ Just sock | 420 | false | true | 0 | 14 | 133 | 190 | 87 | 103 | null | null |
haroldcarr/learn-haskell-coq-ml-etc | haskell/topic/monads/2017-06-snoyman-readert-design-pattern/test/XSpec.hs | unlicense | spec :: Spec
spec = do
Lib.test
HC.test | 44 | spec :: Spec
spec = do
Lib.test
HC.test | 44 | spec = do
Lib.test
HC.test | 31 | false | true | 0 | 7 | 12 | 21 | 10 | 11 | null | null |
dorchard/camfort | tests/Camfort/Specification/Hoare/ParserSpec.hs | apache-2.0 | stripSpans :: Data from => from -> from
stripSpans = transformBi (const defSpan) | 80 | stripSpans :: Data from => from -> from
stripSpans = transformBi (const defSpan) | 80 | stripSpans = transformBi (const defSpan) | 40 | false | true | 0 | 7 | 12 | 31 | 15 | 16 | null | null |
urbanslug/ghc | testsuite/tests/gadt/T7974.hs | bsd-3-clause | k :: X a -> X b
k N = N | 23 | k :: X a -> X b
k N = N | 23 | k N = N | 7 | false | true | 0 | 7 | 10 | 29 | 12 | 17 | null | null |
dlewissandy/lambda-blas | test/Foreign.hs | bsd-3-clause | srotg,srotg_unsafe :: Float -> Float -> IO (GivensRot Float)
srotg = rotgHelper srotg_foreign | 93 | srotg,srotg_unsafe :: Float -> Float -> IO (GivensRot Float)
srotg = rotgHelper srotg_foreign | 93 | srotg = rotgHelper srotg_foreign | 32 | false | true | 2 | 10 | 12 | 43 | 18 | 25 | null | null |
gafiatulin/codewars | src/8 kyu/Litres.hs | mit | litres :: Double -> Integer
litres = floor . (0.5 *) | 52 | litres :: Double -> Integer
litres = floor . (0.5 *) | 52 | litres = floor . (0.5 *) | 24 | false | true | 0 | 6 | 10 | 23 | 13 | 10 | null | null |
jmgimeno/haskell-playground | src/Church.hs | unlicense | one f x = f x | 14 | one f x = f x | 14 | one f x = f x | 14 | false | false | 0 | 5 | 6 | 14 | 6 | 8 | null | null |
exbb2/BlastItWithPiss | src/BlastItWithPiss/Choice.hs | gpl-3.0 | popularThread :: Thread -> Bool
popularThread t = postcount t >= 100 | 68 | popularThread :: Thread -> Bool
popularThread t = postcount t >= 100 | 68 | popularThread t = postcount t >= 100 | 36 | false | true | 0 | 6 | 11 | 25 | 12 | 13 | null | null |
thoughtpolice/binary-serialise-cbor | Data/Binary/Serialise/CBOR/Read.hs | bsd-3-clause | readBigUInt :: ByteString -> DecodedToken (BigIntToken a)
readBigUInt bs
| let bs' = BS.unsafeTail bs
, not (BS.null bs')
, let !hdr = unsafeHead bs'
, BS.length bs' >= tokenSize hdr
= case tryConsumeBytes hdr bs' of
DecodeFailure -> DecodeFailure
DecodedToken sz (Fits bstr) -> DecodedToken (1+sz) (BigIntToken (uintegerFromBytes bstr))
DecodedToken sz (TooLong len) -> DecodedToken (1+sz) (BigUIntNeedBody len)
| otherwise
= DecodedToken 1 BigUIntNeedHeader | 530 | readBigUInt :: ByteString -> DecodedToken (BigIntToken a)
readBigUInt bs
| let bs' = BS.unsafeTail bs
, not (BS.null bs')
, let !hdr = unsafeHead bs'
, BS.length bs' >= tokenSize hdr
= case tryConsumeBytes hdr bs' of
DecodeFailure -> DecodeFailure
DecodedToken sz (Fits bstr) -> DecodedToken (1+sz) (BigIntToken (uintegerFromBytes bstr))
DecodedToken sz (TooLong len) -> DecodedToken (1+sz) (BigUIntNeedBody len)
| otherwise
= DecodedToken 1 BigUIntNeedHeader | 530 | readBigUInt bs
| let bs' = BS.unsafeTail bs
, not (BS.null bs')
, let !hdr = unsafeHead bs'
, BS.length bs' >= tokenSize hdr
= case tryConsumeBytes hdr bs' of
DecodeFailure -> DecodeFailure
DecodedToken sz (Fits bstr) -> DecodedToken (1+sz) (BigIntToken (uintegerFromBytes bstr))
DecodedToken sz (TooLong len) -> DecodedToken (1+sz) (BigUIntNeedBody len)
| otherwise
= DecodedToken 1 BigUIntNeedHeader | 472 | false | true | 0 | 13 | 135 | 195 | 90 | 105 | null | null |
ezyang/ghc | compiler/utils/Encoding.hs | bsd-3-clause | -- Characters not having a specific code are coded as z224U (in hex)
decode_num_esc :: Char -> EncodedString -> UserString
decode_num_esc d rest
= go (digitToInt d) rest
where
go n (c : rest) | isHexDigit c = go (16*n + digitToInt c) rest
go n ('U' : rest) = chr n : zDecodeString rest
go n other = error ("decode_num_esc: " ++ show n ++ ' ':other) | 375 | decode_num_esc :: Char -> EncodedString -> UserString
decode_num_esc d rest
= go (digitToInt d) rest
where
go n (c : rest) | isHexDigit c = go (16*n + digitToInt c) rest
go n ('U' : rest) = chr n : zDecodeString rest
go n other = error ("decode_num_esc: " ++ show n ++ ' ':other) | 306 | decode_num_esc d rest
= go (digitToInt d) rest
where
go n (c : rest) | isHexDigit c = go (16*n + digitToInt c) rest
go n ('U' : rest) = chr n : zDecodeString rest
go n other = error ("decode_num_esc: " ++ show n ++ ' ':other) | 252 | true | true | 0 | 10 | 94 | 142 | 68 | 74 | null | null |
beni55/haste-compiler | libraries/haste-prim/src/Haste/Prim/JSType.hs | bsd-3-clause | convert :: (JSNum a, JSNum b) => a -> b
convert = fromNumber . toNumber | 71 | convert :: (JSNum a, JSNum b) => a -> b
convert = fromNumber . toNumber | 71 | convert = fromNumber . toNumber | 31 | false | true | 1 | 8 | 14 | 42 | 19 | 23 | null | null |
Heather/cabal | cabal-install/Distribution/Client/CmdBuild.hs | bsd-3-clause | -- | The @build@ command does a lot. It brings the install plan up to date,
-- selects that part of the plan needed by the given or implicit targets and
-- then executes the plan.
--
-- For more details on how this works, see the module
-- "Distribution.Client.ProjectOrchestration"
--
buildAction :: (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags)
-> [String] -> GlobalFlags -> IO ()
buildAction (configFlags, configExFlags, installFlags, haddockFlags)
targetStrings globalFlags = do
userTargets <- readUserBuildTargets targetStrings
buildCtx@ProjectBuildContext{buildSettings} <-
runProjectPreBuildPhase
verbosity
( globalFlags, configFlags, configExFlags
, installFlags, haddockFlags )
PreBuildHooks {
hookPrePlanning = \_ _ _ -> return (),
hookSelectPlanSubset = selectBuildTargets userTargets
}
printPlan verbosity buildCtx
unless (buildSettingDryRun buildSettings) $ do
_plan <- runProjectBuildPhase
verbosity
buildCtx
--TODO: [required eventually] report on build failures in residual plan
return ()
where
verbosity = fromFlagOrDefault normal (configVerbosity configFlags)
-- When we interpret the targets on the command line, interpret them as
-- repl targets (as opposed to say repl or haddock targets).
selectBuildTargets =
selectTargets
BuildDefaultComponents
BuildSpecificComponent | 1,510 | buildAction :: (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags)
-> [String] -> GlobalFlags -> IO ()
buildAction (configFlags, configExFlags, installFlags, haddockFlags)
targetStrings globalFlags = do
userTargets <- readUserBuildTargets targetStrings
buildCtx@ProjectBuildContext{buildSettings} <-
runProjectPreBuildPhase
verbosity
( globalFlags, configFlags, configExFlags
, installFlags, haddockFlags )
PreBuildHooks {
hookPrePlanning = \_ _ _ -> return (),
hookSelectPlanSubset = selectBuildTargets userTargets
}
printPlan verbosity buildCtx
unless (buildSettingDryRun buildSettings) $ do
_plan <- runProjectBuildPhase
verbosity
buildCtx
--TODO: [required eventually] report on build failures in residual plan
return ()
where
verbosity = fromFlagOrDefault normal (configVerbosity configFlags)
-- When we interpret the targets on the command line, interpret them as
-- repl targets (as opposed to say repl or haddock targets).
selectBuildTargets =
selectTargets
BuildDefaultComponents
BuildSpecificComponent | 1,224 | buildAction (configFlags, configExFlags, installFlags, haddockFlags)
targetStrings globalFlags = do
userTargets <- readUserBuildTargets targetStrings
buildCtx@ProjectBuildContext{buildSettings} <-
runProjectPreBuildPhase
verbosity
( globalFlags, configFlags, configExFlags
, installFlags, haddockFlags )
PreBuildHooks {
hookPrePlanning = \_ _ _ -> return (),
hookSelectPlanSubset = selectBuildTargets userTargets
}
printPlan verbosity buildCtx
unless (buildSettingDryRun buildSettings) $ do
_plan <- runProjectBuildPhase
verbosity
buildCtx
--TODO: [required eventually] report on build failures in residual plan
return ()
where
verbosity = fromFlagOrDefault normal (configVerbosity configFlags)
-- When we interpret the targets on the command line, interpret them as
-- repl targets (as opposed to say repl or haddock targets).
selectBuildTargets =
selectTargets
BuildDefaultComponents
BuildSpecificComponent | 1,104 | true | true | 1 | 13 | 372 | 233 | 120 | 113 | null | null |
mackenzie-tcc-arthur-gabriel/CSS-Applier | src/Tree.hs | gpl-3.0 | getSpecialRules :: (String, String) -> [(String, String)]
getSpecialRules (name, value) =
case Data.List.find (strEq name . fst) specialRules of
Nothing ->
[(name, value)]
Just (_, ruleNames) ->
P.map (\r -> (r, value)) ruleNames | 274 | getSpecialRules :: (String, String) -> [(String, String)]
getSpecialRules (name, value) =
case Data.List.find (strEq name . fst) specialRules of
Nothing ->
[(name, value)]
Just (_, ruleNames) ->
P.map (\r -> (r, value)) ruleNames | 274 | getSpecialRules (name, value) =
case Data.List.find (strEq name . fst) specialRules of
Nothing ->
[(name, value)]
Just (_, ruleNames) ->
P.map (\r -> (r, value)) ruleNames | 216 | false | true | 0 | 11 | 77 | 116 | 64 | 52 | null | null |
ghc-android/ghc | testsuite/tests/indexed-types/should_compile/Kind.hs | bsd-3-clause | foo :: a x -> T a
foo = undefined | 33 | foo :: a x -> T a
foo = undefined | 33 | foo = undefined | 15 | false | true | 0 | 7 | 9 | 27 | 11 | 16 | null | null |
philopon/apiary | src/Control/Monad/Apiary/Action/Internal.hs | mit | paramsE :: [String] -> TH.ExpQ
paramsE ps = do
ns <- mapM (\p -> (,) <$> TH.newName "x" <*> pure p) ps
let bs = map (\(v, k) -> TH.bindS (TH.varP v) (prm k)) ns
tpl = TH.noBindS [| return $(TH.tupE $ map (TH.varE . fst) ns) |]
TH.doE $ bs ++ [tpl]
where
prm n = [| param (SProxy :: SProxy $(TH.litT $ TH.strTyLit n)) |]
-- | get parameters. since 1.0.0.
--
-- > [params|foo,bar|] == do { a <- param [key|foo|]; b <- param [key|bar|]; return (a, b) }
-- | 481 | paramsE :: [String] -> TH.ExpQ
paramsE ps = do
ns <- mapM (\p -> (,) <$> TH.newName "x" <*> pure p) ps
let bs = map (\(v, k) -> TH.bindS (TH.varP v) (prm k)) ns
tpl = TH.noBindS [| return $(TH.tupE $ map (TH.varE . fst) ns) |]
TH.doE $ bs ++ [tpl]
where
prm n = [| param (SProxy :: SProxy $(TH.litT $ TH.strTyLit n)) |]
-- | get parameters. since 1.0.0.
--
-- > [params|foo,bar|] == do { a <- param [key|foo|]; b <- param [key|bar|]; return (a, b) }
-- | 481 | paramsE ps = do
ns <- mapM (\p -> (,) <$> TH.newName "x" <*> pure p) ps
let bs = map (\(v, k) -> TH.bindS (TH.varP v) (prm k)) ns
tpl = TH.noBindS [| return $(TH.tupE $ map (TH.varE . fst) ns) |]
TH.doE $ bs ++ [tpl]
where
prm n = [| param (SProxy :: SProxy $(TH.litT $ TH.strTyLit n)) |]
-- | get parameters. since 1.0.0.
--
-- > [params|foo,bar|] == do { a <- param [key|foo|]; b <- param [key|bar|]; return (a, b) }
-- | 450 | false | true | 1 | 16 | 121 | 167 | 85 | 82 | null | null |
iblumenfeld/cryptol | src/Cryptol/Parser/NoPat.hs | bsd-3-clause | noPatModule :: Module -> NoPatM Module
noPatModule m =
do let (ds, others) = partitionEithers (map isDecl (mDecls m))
ds1 <- noPatTopDs ds
return m { mDecls = others ++ map Decl ds1 }
where
isDecl (Decl d) = Left d
isDecl d = Right d
-------------------------------------------------------------------------------- | 342 | noPatModule :: Module -> NoPatM Module
noPatModule m =
do let (ds, others) = partitionEithers (map isDecl (mDecls m))
ds1 <- noPatTopDs ds
return m { mDecls = others ++ map Decl ds1 }
where
isDecl (Decl d) = Left d
isDecl d = Right d
-------------------------------------------------------------------------------- | 342 | noPatModule m =
do let (ds, others) = partitionEithers (map isDecl (mDecls m))
ds1 <- noPatTopDs ds
return m { mDecls = others ++ map Decl ds1 }
where
isDecl (Decl d) = Left d
isDecl d = Right d
-------------------------------------------------------------------------------- | 303 | false | true | 0 | 14 | 74 | 124 | 57 | 67 | null | null |
seinokatsuhiro/koshu-java-tool | InstSize.hs | bsd-3-clause | instSize (J.LLOAD _) = 2 | 39 | instSize (J.LLOAD _) = 2 | 39 | instSize (J.LLOAD _) = 2 | 39 | false | false | 0 | 7 | 19 | 18 | 8 | 10 | null | null |
lennart/Tidal | Sound/Tidal/Tempo.hs | gpl-3.0 | bpsUtils :: IO ((Double -> IO (), IO (Rational)))
bpsUtils = do (mTempo, mBps) <- runClient
let bpsSetter b = putMVar mBps b
currentTime = do tempo <- readMVar mTempo
now <- beatNow tempo
return $ toRational now
return (bpsSetter, currentTime) | 359 | bpsUtils :: IO ((Double -> IO (), IO (Rational)))
bpsUtils = do (mTempo, mBps) <- runClient
let bpsSetter b = putMVar mBps b
currentTime = do tempo <- readMVar mTempo
now <- beatNow tempo
return $ toRational now
return (bpsSetter, currentTime) | 359 | bpsUtils = do (mTempo, mBps) <- runClient
let bpsSetter b = putMVar mBps b
currentTime = do tempo <- readMVar mTempo
now <- beatNow tempo
return $ toRational now
return (bpsSetter, currentTime) | 309 | false | true | 0 | 13 | 156 | 115 | 55 | 60 | null | null |
rodrigo-machado/verigraph | src/library/Util/Closures.hs | gpl-3.0 | relationImage :: Ord a => Relation a -> Set a
relationImage set
| null set = empty
| otherwise = [b | (_,b) <- set] | 120 | relationImage :: Ord a => Relation a -> Set a
relationImage set
| null set = empty
| otherwise = [b | (_,b) <- set] | 120 | relationImage set
| null set = empty
| otherwise = [b | (_,b) <- set] | 73 | false | true | 1 | 9 | 29 | 65 | 31 | 34 | null | null |
ARCCN/hcprobe | src/bench/ethertest.hs | bsd-3-clause | crcTest2 :: IO ()
crcTest2 = do
let w8 = [0x4500, 0x003c, 0x1c46, 0x4000, 0x4006, 0xb1e6, 0xac10, 0x0a63, 0xac10, 0x0a0c] :: [Word16]
let c = (foldl' ( (+) . complement) 0) w8
printf "%04X\n" c | 199 | crcTest2 :: IO ()
crcTest2 = do
let w8 = [0x4500, 0x003c, 0x1c46, 0x4000, 0x4006, 0xb1e6, 0xac10, 0x0a63, 0xac10, 0x0a0c] :: [Word16]
let c = (foldl' ( (+) . complement) 0) w8
printf "%04X\n" c | 199 | crcTest2 = do
let w8 = [0x4500, 0x003c, 0x1c46, 0x4000, 0x4006, 0xb1e6, 0xac10, 0x0a63, 0xac10, 0x0a0c] :: [Word16]
let c = (foldl' ( (+) . complement) 0) w8
printf "%04X\n" c | 181 | false | true | 0 | 14 | 40 | 98 | 54 | 44 | null | null |
Melvar/Idris-dev | src/Idris/Core/Elaborate.hs | bsd-3-clause | autoArg :: Name -> Elab' aux ()
autoArg n = processTactic' (AutoArg n) | 70 | autoArg :: Name -> Elab' aux ()
autoArg n = processTactic' (AutoArg n) | 70 | autoArg n = processTactic' (AutoArg n) | 38 | false | true | 0 | 8 | 12 | 38 | 17 | 21 | null | null |
diku-dk/futhark | src/Futhark/CodeGen/ImpGen.hs | isc | memBoundToVarEntry e (MemMem space) =
MemVar e $ MemEntry space | 65 | memBoundToVarEntry e (MemMem space) =
MemVar e $ MemEntry space | 65 | memBoundToVarEntry e (MemMem space) =
MemVar e $ MemEntry space | 65 | false | false | 2 | 6 | 11 | 31 | 12 | 19 | null | null |
brendanhay/gogol | gogol-script/gen/Network/Google/Script/Types/Product.hs | mpl-2.0 | -- | A list of functions composing the set.
gastfsValues :: Lens' GoogleAppsScriptTypeFunctionSet [GoogleAppsScriptTypeFunction]
gastfsValues
= lens _gastfsValues (\ s a -> s{_gastfsValues = a})
. _Default
. _Coerce | 229 | gastfsValues :: Lens' GoogleAppsScriptTypeFunctionSet [GoogleAppsScriptTypeFunction]
gastfsValues
= lens _gastfsValues (\ s a -> s{_gastfsValues = a})
. _Default
. _Coerce | 185 | gastfsValues
= lens _gastfsValues (\ s a -> s{_gastfsValues = a})
. _Default
. _Coerce | 100 | true | true | 3 | 8 | 42 | 59 | 28 | 31 | null | null |
patperry/hs-linear-algebra | lib/Data/Matrix/Banded/IOBase.hs | bsd-3-clause | -- | Create a new banded matrix of given shape and (lower,upper), bandwidths,
-- but do not initialize the elements.
newIOBanded_ :: (Elem e) => (Int,Int) -> (Int,Int) -> IO (IOBanded e)
newIOBanded_ (m,n) (kl,ku)
| m < 0 || n < 0 =
err "dimensions must be non-negative."
| kl < 0 =
err "lower bandwdth must be non-negative."
| m /= 0 && kl >= m =
err "lower bandwidth must be less than m."
| ku < 0 =
err "upper bandwidth must be non-negative."
| n /= 0 && ku >= n =
err "upper bandwidth must be less than n."
| otherwise =
let m' = kl + 1 + ku
l = m'
h = NoTrans
in do
fp <- mallocForeignPtrArray (m' * n)
let p = unsafeForeignPtrToPtr fp
return $ IOBanded h m n kl ku fp p l
where
err s = fail $ "newBanded_ " ++ show (m,n) ++ " " ++ show (kl,ku) ++ ": " ++ s | 917 | newIOBanded_ :: (Elem e) => (Int,Int) -> (Int,Int) -> IO (IOBanded e)
newIOBanded_ (m,n) (kl,ku)
| m < 0 || n < 0 =
err "dimensions must be non-negative."
| kl < 0 =
err "lower bandwdth must be non-negative."
| m /= 0 && kl >= m =
err "lower bandwidth must be less than m."
| ku < 0 =
err "upper bandwidth must be non-negative."
| n /= 0 && ku >= n =
err "upper bandwidth must be less than n."
| otherwise =
let m' = kl + 1 + ku
l = m'
h = NoTrans
in do
fp <- mallocForeignPtrArray (m' * n)
let p = unsafeForeignPtrToPtr fp
return $ IOBanded h m n kl ku fp p l
where
err s = fail $ "newBanded_ " ++ show (m,n) ++ " " ++ show (kl,ku) ++ ": " ++ s | 800 | newIOBanded_ (m,n) (kl,ku)
| m < 0 || n < 0 =
err "dimensions must be non-negative."
| kl < 0 =
err "lower bandwdth must be non-negative."
| m /= 0 && kl >= m =
err "lower bandwidth must be less than m."
| ku < 0 =
err "upper bandwidth must be non-negative."
| n /= 0 && ku >= n =
err "upper bandwidth must be less than n."
| otherwise =
let m' = kl + 1 + ku
l = m'
h = NoTrans
in do
fp <- mallocForeignPtrArray (m' * n)
let p = unsafeForeignPtrToPtr fp
return $ IOBanded h m n kl ku fp p l
where
err s = fail $ "newBanded_ " ++ show (m,n) ++ " " ++ show (kl,ku) ++ ": " ++ s | 730 | true | true | 3 | 12 | 322 | 315 | 156 | 159 | null | null |
danse/haskell-opaleye | src/Opaleye/Internal/Sql.hs | bsd-3-clause | -- Postgres seems to name columns of VALUES clauses "column1",
-- "column2", ... . I'm not sure to what extent it is customisable or
-- how robust it is to rely on this
values :: [Symbol] -> [[HPQ.PrimExpr]] -> Select
values columns pes = SelectValues Values { vAttrs = SelectAttrs (mkColumns columns)
, vValues = (map . map) sqlExpr pes }
where mkColumns = ensureColumns . zipWith (flip (curry (sqlBinding . Arr.second mkColumn))) [1..]
mkColumn i = (HPQ.BaseTableAttrExpr . ("column" ++) . show) (i::Int) | 558 | values :: [Symbol] -> [[HPQ.PrimExpr]] -> Select
values columns pes = SelectValues Values { vAttrs = SelectAttrs (mkColumns columns)
, vValues = (map . map) sqlExpr pes }
where mkColumns = ensureColumns . zipWith (flip (curry (sqlBinding . Arr.second mkColumn))) [1..]
mkColumn i = (HPQ.BaseTableAttrExpr . ("column" ++) . show) (i::Int) | 389 | values columns pes = SelectValues Values { vAttrs = SelectAttrs (mkColumns columns)
, vValues = (map . map) sqlExpr pes }
where mkColumns = ensureColumns . zipWith (flip (curry (sqlBinding . Arr.second mkColumn))) [1..]
mkColumn i = (HPQ.BaseTableAttrExpr . ("column" ++) . show) (i::Int) | 340 | true | true | 1 | 14 | 135 | 153 | 83 | 70 | null | null |
m4dc4p/haskelldb | test/TestCases.hs | bsd-3-clause | -- * Utilities
assertTableEmpty db tbl =
do rs <- query db $ table tbl
assertBool "Table not empty" (null rs) | 121 | assertTableEmpty db tbl =
do rs <- query db $ table tbl
assertBool "Table not empty" (null rs) | 105 | assertTableEmpty db tbl =
do rs <- query db $ table tbl
assertBool "Table not empty" (null rs) | 105 | true | false | 0 | 9 | 32 | 43 | 19 | 24 | null | null |
hvr/vector | Data/Vector/Fusion/Bundle/Size.hs | bsd-3-clause | -- | Compute the minimum size from a size hint
lowerBound :: Size -> Int
lowerBound (Exact n) = n | 97 | lowerBound :: Size -> Int
lowerBound (Exact n) = n | 50 | lowerBound (Exact n) = n | 24 | true | true | 0 | 7 | 19 | 25 | 13 | 12 | null | null |
GaloisInc/ivory | ivory-eval/src/Ivory/Eval.hs | bsd-3-clause | eq :: Value -> Value -> Value
eq x y = Bool (x == y) | 52 | eq :: Value -> Value -> Value
eq x y = Bool (x == y) | 52 | eq x y = Bool (x == y) | 22 | false | true | 0 | 7 | 14 | 38 | 18 | 20 | null | null |
unisonweb/platform | parser-typechecker/src/Unison/Codebase/Editor/UriParser.hs | mit | symbol :: Text -> P Text
symbol = L.symbol (pure ()) | 52 | symbol :: Text -> P Text
symbol = L.symbol (pure ()) | 52 | symbol = L.symbol (pure ()) | 27 | false | true | 0 | 8 | 10 | 31 | 15 | 16 | null | null |
alexisVallet/hnn | src/HNN/Data.hs | bsd-3-clause | shuffle :: MonadRandom m => [a] -> m [a]
shuffle xs = do
let l = length xs
rands_ <- getRandomRs (0, l-1)
let
rands = take l rands_
ar = runST $ do
ar <- NSV.unsafeThaw $ NSV.fromList xs
forM_ (zip [0..(l-1)] rands) $ \(i, j) -> do
vi <- NSVM.read ar i
vj <- NSVM.read ar j
NSVM.write ar j vi
NSVM.write ar i vj
NSV.unsafeFreeze ar
return $ NSV.toList ar | 420 | shuffle :: MonadRandom m => [a] -> m [a]
shuffle xs = do
let l = length xs
rands_ <- getRandomRs (0, l-1)
let
rands = take l rands_
ar = runST $ do
ar <- NSV.unsafeThaw $ NSV.fromList xs
forM_ (zip [0..(l-1)] rands) $ \(i, j) -> do
vi <- NSVM.read ar i
vj <- NSVM.read ar j
NSVM.write ar j vi
NSVM.write ar i vj
NSV.unsafeFreeze ar
return $ NSV.toList ar | 420 | shuffle xs = do
let l = length xs
rands_ <- getRandomRs (0, l-1)
let
rands = take l rands_
ar = runST $ do
ar <- NSV.unsafeThaw $ NSV.fromList xs
forM_ (zip [0..(l-1)] rands) $ \(i, j) -> do
vi <- NSVM.read ar i
vj <- NSVM.read ar j
NSVM.write ar j vi
NSVM.write ar i vj
NSV.unsafeFreeze ar
return $ NSV.toList ar | 379 | false | true | 0 | 19 | 138 | 220 | 103 | 117 | null | null |
ComputationWithBoundedResources/slogic | src/SLogic/Smt/State.hs | bsd-3-clause | nvarM' = do
n <- fresh
let v = ivar n
assert $ v .>= zero
return v | 74 | nvarM' = do
n <- fresh
let v = ivar n
assert $ v .>= zero
return v | 74 | nvarM' = do
n <- fresh
let v = ivar n
assert $ v .>= zero
return v | 74 | false | false | 0 | 10 | 25 | 42 | 18 | 24 | null | null |
fffej/HS-Poker | LookupPatternMatch.hs | bsd-3-clause | getValueFromProduct 2052501 = 3373 | 34 | getValueFromProduct 2052501 = 3373 | 34 | getValueFromProduct 2052501 = 3373 | 34 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
kim/amazonka | amazonka-rds/gen/Network/AWS/RDS/Types.hs | mpl-2.0 | -- | The ARN from the Key Store with which the instance is associated for TDE
-- encryption.
dbiTdeCredentialArn :: Lens' DBInstance (Maybe Text)
dbiTdeCredentialArn =
lens _dbiTdeCredentialArn (\s a -> s { _dbiTdeCredentialArn = a }) | 238 | dbiTdeCredentialArn :: Lens' DBInstance (Maybe Text)
dbiTdeCredentialArn =
lens _dbiTdeCredentialArn (\s a -> s { _dbiTdeCredentialArn = a }) | 145 | dbiTdeCredentialArn =
lens _dbiTdeCredentialArn (\s a -> s { _dbiTdeCredentialArn = a }) | 92 | true | true | 1 | 9 | 40 | 51 | 26 | 25 | null | null |
antonlogvinenko/javelin | src/Javelin/Interpreter/ClassPathLoading.hs | mit | getClassPathElementLayout :: FilePath -> IO (Map.Map ClassName ClassSource)
getClassPathElementLayout path
| ".class" `List.isSuffixOf` path = extractFileClass path
| isZip path = extractZipClasses path
| otherwise = do
isDirectory <- Dir.doesDirectoryExist path
if not isDirectory
then return Map.empty
else getFilesInClassPath path >>= getClassPathLayout | 382 | getClassPathElementLayout :: FilePath -> IO (Map.Map ClassName ClassSource)
getClassPathElementLayout path
| ".class" `List.isSuffixOf` path = extractFileClass path
| isZip path = extractZipClasses path
| otherwise = do
isDirectory <- Dir.doesDirectoryExist path
if not isDirectory
then return Map.empty
else getFilesInClassPath path >>= getClassPathLayout | 382 | getClassPathElementLayout path
| ".class" `List.isSuffixOf` path = extractFileClass path
| isZip path = extractZipClasses path
| otherwise = do
isDirectory <- Dir.doesDirectoryExist path
if not isDirectory
then return Map.empty
else getFilesInClassPath path >>= getClassPathLayout | 306 | false | true | 2 | 9 | 67 | 107 | 50 | 57 | null | null |
Icelandjack/lens | src/Control/Lens/Fold.hs | bsd-3-clause | ------------------------------------------------------------------------------
-- Folds with Reified Monoid
------------------------------------------------------------------------------
foldBy :: Foldable t => (a -> a -> a) -> a -> t a -> a
foldBy f z = reifyFold f z (foldMap M) | 281 | foldBy :: Foldable t => (a -> a -> a) -> a -> t a -> a
foldBy f z = reifyFold f z (foldMap M) | 93 | foldBy f z = reifyFold f z (foldMap M) | 38 | true | true | 0 | 10 | 33 | 73 | 34 | 39 | null | null |
githubkleon/ConvenientHDL | src/ArgParseCCV.hs | bsd-3-clause | argparse argv = case getOpt Permute flags argv of
(args,fs,[]) -> do
let files = if null fs then ["-"] else fs
--Define usage here
if Help `elem` args
then do hPutStrLn stderr (usageInfo helpme [])
exitWith ExitSuccess
else return (nub (concatMap set args), files)
(_,_,errs) -> do
hPutStrLn stderr (concat errs ++ usageInfo header (init flags))
exitWith (ExitFailure 1)
where header = "Use 'ccv -h' to get more specific usage"
set f = [f]
helpme = "Check the readme file first! I'll write later." | 613 | argparse argv = case getOpt Permute flags argv of
(args,fs,[]) -> do
let files = if null fs then ["-"] else fs
--Define usage here
if Help `elem` args
then do hPutStrLn stderr (usageInfo helpme [])
exitWith ExitSuccess
else return (nub (concatMap set args), files)
(_,_,errs) -> do
hPutStrLn stderr (concat errs ++ usageInfo header (init flags))
exitWith (ExitFailure 1)
where header = "Use 'ccv -h' to get more specific usage"
set f = [f]
helpme = "Check the readme file first! I'll write later." | 613 | argparse argv = case getOpt Permute flags argv of
(args,fs,[]) -> do
let files = if null fs then ["-"] else fs
--Define usage here
if Help `elem` args
then do hPutStrLn stderr (usageInfo helpme [])
exitWith ExitSuccess
else return (nub (concatMap set args), files)
(_,_,errs) -> do
hPutStrLn stderr (concat errs ++ usageInfo header (init flags))
exitWith (ExitFailure 1)
where header = "Use 'ccv -h' to get more specific usage"
set f = [f]
helpme = "Check the readme file first! I'll write later." | 613 | false | false | 4 | 16 | 200 | 215 | 102 | 113 | null | null |
dmjio/miso | src/Miso/FFI.hs | bsd-3-clause | eventStopPropagation :: JSVal -> JSM ()
eventStopPropagation e = do
_ <- e # "stopPropagation" $ ()
pure ()
-- | Prevent default event behavior | 148 | eventStopPropagation :: JSVal -> JSM ()
eventStopPropagation e = do
_ <- e # "stopPropagation" $ ()
pure ()
-- | Prevent default event behavior | 148 | eventStopPropagation e = do
_ <- e # "stopPropagation" $ ()
pure ()
-- | Prevent default event behavior | 108 | false | true | 0 | 9 | 29 | 49 | 23 | 26 | null | null |
jonpetterbergman/wai-snap | src/Snap/Language.hs | bsd-3-clause | setContentLanguage :: (Eq a, MonadSnap m)
=> RangeMapping a
-> a
-> m ()
setContentLanguage rangeMapping val =
maybe (return ()) go $ lookup val $ map swap $ toList rangeMapping
where go = modifyResponse . setHeader "Content-Language" . BC.pack | 305 | setContentLanguage :: (Eq a, MonadSnap m)
=> RangeMapping a
-> a
-> m ()
setContentLanguage rangeMapping val =
maybe (return ()) go $ lookup val $ map swap $ toList rangeMapping
where go = modifyResponse . setHeader "Content-Language" . BC.pack | 305 | setContentLanguage rangeMapping val =
maybe (return ()) go $ lookup val $ map swap $ toList rangeMapping
where go = modifyResponse . setHeader "Content-Language" . BC.pack | 175 | false | true | 0 | 11 | 100 | 102 | 48 | 54 | null | null |
alpicola/mel | src/K/Normalize.hs | mit | -- K-normalization
normalize :: AnnProgram -> Fresh KProgram
normalize (typs, expr) = do
(expr', t) <- runNorm M.empty $ normExpr expr
let mainDecl = KFunDecl (Special "main", FunType UnitType t) [(Erased, UnitType)] expr'
return (buildConDecls typs, [mainDecl])
-- To simplify datatypes declarations | 308 | normalize :: AnnProgram -> Fresh KProgram
normalize (typs, expr) = do
(expr', t) <- runNorm M.empty $ normExpr expr
let mainDecl = KFunDecl (Special "main", FunType UnitType t) [(Erased, UnitType)] expr'
return (buildConDecls typs, [mainDecl])
-- To simplify datatypes declarations | 288 | normalize (typs, expr) = do
(expr', t) <- runNorm M.empty $ normExpr expr
let mainDecl = KFunDecl (Special "main", FunType UnitType t) [(Erased, UnitType)] expr'
return (buildConDecls typs, [mainDecl])
-- To simplify datatypes declarations | 246 | true | true | 0 | 13 | 49 | 116 | 58 | 58 | null | null |
dmp1ce/DMSS | src-lib/DMSS/CLI.hs | unlicense | process (Cli Nothing _ _ (CheckIn CheckInList)) =
putStrLn "TODO: CheckIn List command here" | 94 | process (Cli Nothing _ _ (CheckIn CheckInList)) =
putStrLn "TODO: CheckIn List command here" | 94 | process (Cli Nothing _ _ (CheckIn CheckInList)) =
putStrLn "TODO: CheckIn List command here" | 94 | false | false | 0 | 8 | 15 | 31 | 14 | 17 | null | null |
DaMSL/K3 | src/Language/K3/Transform/Common.hs | apache-2.0 | noRefsTransConfig :: TransformConfig
noRefsTransConfig = defaultTransConfig { optRefs = False } | 96 | noRefsTransConfig :: TransformConfig
noRefsTransConfig = defaultTransConfig { optRefs = False } | 96 | noRefsTransConfig = defaultTransConfig { optRefs = False } | 59 | false | true | 0 | 6 | 11 | 19 | 11 | 8 | null | null |
anttisalonen/freekick2 | src/Listings.hs | gpl-3.0 | showPlayerNation 52 = "El Salvador" | 35 | showPlayerNation 52 = "El Salvador" | 35 | showPlayerNation 52 = "El Salvador" | 35 | false | false | 1 | 5 | 4 | 13 | 4 | 9 | null | null |
frontrowed/stratosphere | library-gen/Stratosphere/Resources/RDSDBCluster.hs | mit | -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html#cfn-rds-dbcluster-storageencrypted
rdsdbcStorageEncrypted :: Lens' RDSDBCluster (Maybe (Val Bool))
rdsdbcStorageEncrypted = lens _rDSDBClusterStorageEncrypted (\s a -> s { _rDSDBClusterStorageEncrypted = a }) | 307 | rdsdbcStorageEncrypted :: Lens' RDSDBCluster (Maybe (Val Bool))
rdsdbcStorageEncrypted = lens _rDSDBClusterStorageEncrypted (\s a -> s { _rDSDBClusterStorageEncrypted = a }) | 173 | rdsdbcStorageEncrypted = lens _rDSDBClusterStorageEncrypted (\s a -> s { _rDSDBClusterStorageEncrypted = a }) | 109 | true | true | 0 | 9 | 22 | 52 | 28 | 24 | null | null |
azoimide/haskell-automatas | src/main/hs/Auto/DFA/DFA.hs | mit | setInitial :: State -> DFA -> DFA
setInitial s a
| s `elem` (states a) = DFA (Just s) (accepting a) (states a)
| otherwise = error ((show s) ++ " not in " ++ (show a)) | 175 | setInitial :: State -> DFA -> DFA
setInitial s a
| s `elem` (states a) = DFA (Just s) (accepting a) (states a)
| otherwise = error ((show s) ++ " not in " ++ (show a)) | 175 | setInitial s a
| s `elem` (states a) = DFA (Just s) (accepting a) (states a)
| otherwise = error ((show s) ++ " not in " ++ (show a)) | 141 | false | true | 0 | 10 | 44 | 111 | 52 | 59 | null | null |
kumasento/accelerate | Data/Array/Accelerate/Pretty/Traverse.hs | bsd-3-clause | labelForPrimFun PrimLAnd = "PrimLAnd" | 51 | labelForPrimFun PrimLAnd = "PrimLAnd" | 51 | labelForPrimFun PrimLAnd = "PrimLAnd" | 51 | false | false | 0 | 4 | 17 | 10 | 4 | 6 | null | null |
chriseidhof/objc-value-objects | ObjC.hs | mit | l .=. r = AssignmentStatement l Equals r | 40 | l .=. r = AssignmentStatement l Equals r | 40 | l .=. r = AssignmentStatement l Equals r | 40 | false | false | 2 | 5 | 7 | 22 | 9 | 13 | null | null |
ncaq/nlod | src/Main.hs | unlicense | toHiraganaCompatibleForGoogle :: Text -> Text
toHiraganaCompatibleForGoogle = completeKogaki . replace "う゛" "ゔ" . toHiragana
where completeKogaki = replace "xか" "ゕ" . replace "xけ" "ゖ"
-- | ローマ字、かなのペアのリストを基礎的なテーブルデータから生成します | 225 | toHiraganaCompatibleForGoogle :: Text -> Text
toHiraganaCompatibleForGoogle = completeKogaki . replace "う゛" "ゔ" . toHiragana
where completeKogaki = replace "xか" "ゕ" . replace "xけ" "ゖ"
-- | ローマ字、かなのペアのリストを基礎的なテーブルデータから生成します | 225 | toHiraganaCompatibleForGoogle = completeKogaki . replace "う゛" "ゔ" . toHiragana
where completeKogaki = replace "xか" "ゕ" . replace "xけ" "ゖ"
-- | ローマ字、かなのペアのリストを基礎的なテーブルデータから生成します | 179 | false | true | 0 | 7 | 29 | 51 | 25 | 26 | null | null |
michaeljklein/CPlug | src/Data/Either/Aux.hs | bsd-3-clause | mapLeft f ((Left y) : xs) = Left (f y) : mapLeft f xs | 54 | mapLeft f ((Left y) : xs) = Left (f y) : mapLeft f xs | 54 | mapLeft f ((Left y) : xs) = Left (f y) : mapLeft f xs | 54 | false | false | 0 | 9 | 14 | 43 | 20 | 23 | null | null |
nomicflux/threals | src/Threal/Show.hs | gpl-2.0 | showThreal (Threal [Threal [] [(Threal [] [] [])] []] [Threal [(Threal [] [] [])] [] []] []) = " r<>g " | 103 | showThreal (Threal [Threal [] [(Threal [] [] [])] []] [Threal [(Threal [] [] [])] [] []] []) = " r<>g " | 103 | showThreal (Threal [Threal [] [(Threal [] [] [])] []] [Threal [(Threal [] [] [])] [] []] []) = " r<>g " | 103 | false | false | 0 | 13 | 20 | 87 | 44 | 43 | null | null |
seanhess/serials | server/Serials/Model/App.hs | mit | readEnv :: Read a => String -> a -> IO a
readEnv name def = do
mval <- lookupEnv name
return $ fromMaybe def (read <$> mval) | 132 | readEnv :: Read a => String -> a -> IO a
readEnv name def = do
mval <- lookupEnv name
return $ fromMaybe def (read <$> mval) | 132 | readEnv name def = do
mval <- lookupEnv name
return $ fromMaybe def (read <$> mval) | 91 | false | true | 0 | 11 | 34 | 68 | 30 | 38 | null | null |
balez/Safe-AG | Grammar/SafeAG/TH/Idiom.hs | gpl-3.0 | bracket (LetE ds e) =
return (lets ds e) | 42 | bracket (LetE ds e) =
return (lets ds e) | 42 | bracket (LetE ds e) =
return (lets ds e) | 42 | false | false | 0 | 7 | 10 | 29 | 13 | 16 | null | null |
irori/hs2lazy | examples/lisp.hs | bsd-3-clause | parseInt a (d:ds) = parseInt (a * 10 + ord d - ord '0') ds | 58 | parseInt a (d:ds) = parseInt (a * 10 + ord d - ord '0') ds | 58 | parseInt a (d:ds) = parseInt (a * 10 + ord d - ord '0') ds | 58 | false | false | 0 | 9 | 14 | 44 | 21 | 23 | null | null |
shockkolate/containers | Data/Set/Base.hs | bsd-3-clause | {--------------------------------------------------------------------
Minimal, Maximal
--------------------------------------------------------------------}
-- | /O(log n)/. The minimal element of a set.
findMin :: Set a -> a
findMin (Bin _ x Tip _) = x | 255 | findMin :: Set a -> a
findMin (Bin _ x Tip _) = x | 49 | findMin (Bin _ x Tip _) = x | 27 | true | true | 0 | 7 | 29 | 35 | 18 | 17 | null | null |
mcschroeder/ghc | compiler/prelude/TysWiredIn.hs | bsd-3-clause | promotedTupleDataCon :: Boxity -> Arity -> TyCon
promotedTupleDataCon boxity i = promoteDataCon (tupleDataCon boxity i) | 119 | promotedTupleDataCon :: Boxity -> Arity -> TyCon
promotedTupleDataCon boxity i = promoteDataCon (tupleDataCon boxity i) | 119 | promotedTupleDataCon boxity i = promoteDataCon (tupleDataCon boxity i) | 70 | false | true | 0 | 7 | 14 | 35 | 17 | 18 | null | null |
23Skidoo/erp | ERP.hs | gpl-3.0 | interpret' _ (AInt i) = Right (VInt i) | 40 | interpret' _ (AInt i) = Right (VInt i) | 40 | interpret' _ (AInt i) = Right (VInt i) | 40 | false | false | 0 | 7 | 9 | 26 | 12 | 14 | null | null |
HIPERFIT/futhark | src/Futhark/CLI/Literate.hs | isc | withGnuplotData ::
[(T.Text, T.Text)] ->
[(T.Text, [Value])] ->
([T.Text] -> [T.Text] -> ScriptM a) ->
ScriptM a
withGnuplotData sets [] cont = uncurry cont $ unzip $ reverse sets | 187 | withGnuplotData ::
[(T.Text, T.Text)] ->
[(T.Text, [Value])] ->
([T.Text] -> [T.Text] -> ScriptM a) ->
ScriptM a
withGnuplotData sets [] cont = uncurry cont $ unzip $ reverse sets | 187 | withGnuplotData sets [] cont = uncurry cont $ unzip $ reverse sets | 66 | false | true | 0 | 12 | 36 | 100 | 53 | 47 | null | null |
fmthoma/ghc | compiler/iface/IfaceType.hs | bsd-3-clause | pprIfaceForAll :: [IfaceTvBndr] -> SDoc
pprIfaceForAll [] = empty | 66 | pprIfaceForAll :: [IfaceTvBndr] -> SDoc
pprIfaceForAll [] = empty | 66 | pprIfaceForAll [] = empty | 26 | false | true | 0 | 6 | 9 | 23 | 12 | 11 | null | null |
gcampax/ghc | compiler/deSugar/DsArrows.hs | bsd-3-clause | dsLCmd :: DsCmdEnv -> IdSet -> Type -> Type -> LHsCmd Id -> [Id]
-> DsM (CoreExpr, IdSet)
dsLCmd ids local_vars stk_ty res_ty cmd env_ids
= dsCmd ids local_vars stk_ty res_ty (unLoc cmd) env_ids | 203 | dsLCmd :: DsCmdEnv -> IdSet -> Type -> Type -> LHsCmd Id -> [Id]
-> DsM (CoreExpr, IdSet)
dsLCmd ids local_vars stk_ty res_ty cmd env_ids
= dsCmd ids local_vars stk_ty res_ty (unLoc cmd) env_ids | 203 | dsLCmd ids local_vars stk_ty res_ty cmd env_ids
= dsCmd ids local_vars stk_ty res_ty (unLoc cmd) env_ids | 106 | false | true | 0 | 12 | 42 | 82 | 41 | 41 | null | null |
AlexanderPankiv/ghc | compiler/types/Type.hs | bsd-3-clause | tyConAppTyCon :: Type -> TyCon
tyConAppTyCon ty = tyConAppTyCon_maybe ty `orElse` pprPanic "tyConAppTyCon" (ppr ty) | 115 | tyConAppTyCon :: Type -> TyCon
tyConAppTyCon ty = tyConAppTyCon_maybe ty `orElse` pprPanic "tyConAppTyCon" (ppr ty) | 115 | tyConAppTyCon ty = tyConAppTyCon_maybe ty `orElse` pprPanic "tyConAppTyCon" (ppr ty) | 84 | false | true | 0 | 8 | 14 | 43 | 20 | 23 | null | null |
jean-lopes/grafos | src/Estruturas/VetorRoteamento.hs | mit | mostrarFloresta :: Forest Vertice -> IO ()
mostrarFloresta fs = putStrLn $ drawForest fs | 88 | mostrarFloresta :: Forest Vertice -> IO ()
mostrarFloresta fs = putStrLn $ drawForest fs | 88 | mostrarFloresta fs = putStrLn $ drawForest fs | 45 | false | true | 0 | 7 | 13 | 33 | 15 | 18 | null | null |
FranklinChen/Idris-dev | src/IRTS/CodegenJavaScript.hs | bsd-3-clause | jsOLDBASE :: JS
jsOLDBASE = JSIdent "oldbase" | 45 | jsOLDBASE :: JS
jsOLDBASE = JSIdent "oldbase" | 45 | jsOLDBASE = JSIdent "oldbase" | 29 | false | true | 0 | 6 | 6 | 21 | 8 | 13 | null | null |
TomMD/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | doubleTyConKey = mkPreludeTyConUnique 10 | 65 | doubleTyConKey = mkPreludeTyConUnique 10 | 65 | doubleTyConKey = mkPreludeTyConUnique 10 | 65 | false | false | 0 | 5 | 28 | 9 | 4 | 5 | null | null |
urbanslug/ghc | compiler/main/GhcMake.hs | bsd-3-clause | preprocessFile hsc_env src_fn mb_phase (Just (buf, _time))
= do
let dflags = hsc_dflags hsc_env
let local_opts = getOptions dflags buf src_fn
(dflags', leftovers, warns)
<- parseDynamicFilePragma dflags local_opts
checkProcessArgsResult dflags leftovers
handleFlagWarnings dflags' warns
let needs_preprocessing
| Just (Unlit _) <- mb_phase = True
| Nothing <- mb_phase, Unlit _ <- startPhase src_fn = True
-- note: local_opts is only required if there's no Unlit phase
| xopt Opt_Cpp dflags' = True
| gopt Opt_Pp dflags' = True
| otherwise = False
when needs_preprocessing $
throwGhcExceptionIO (ProgramError "buffer needs preprocesing; interactive check disabled")
return (dflags', src_fn, buf)
-----------------------------------------------------------------------------
-- Error messages
----------------------------------------------------------------------------- | 1,126 | preprocessFile hsc_env src_fn mb_phase (Just (buf, _time))
= do
let dflags = hsc_dflags hsc_env
let local_opts = getOptions dflags buf src_fn
(dflags', leftovers, warns)
<- parseDynamicFilePragma dflags local_opts
checkProcessArgsResult dflags leftovers
handleFlagWarnings dflags' warns
let needs_preprocessing
| Just (Unlit _) <- mb_phase = True
| Nothing <- mb_phase, Unlit _ <- startPhase src_fn = True
-- note: local_opts is only required if there's no Unlit phase
| xopt Opt_Cpp dflags' = True
| gopt Opt_Pp dflags' = True
| otherwise = False
when needs_preprocessing $
throwGhcExceptionIO (ProgramError "buffer needs preprocesing; interactive check disabled")
return (dflags', src_fn, buf)
-----------------------------------------------------------------------------
-- Error messages
----------------------------------------------------------------------------- | 1,126 | preprocessFile hsc_env src_fn mb_phase (Just (buf, _time))
= do
let dflags = hsc_dflags hsc_env
let local_opts = getOptions dflags buf src_fn
(dflags', leftovers, warns)
<- parseDynamicFilePragma dflags local_opts
checkProcessArgsResult dflags leftovers
handleFlagWarnings dflags' warns
let needs_preprocessing
| Just (Unlit _) <- mb_phase = True
| Nothing <- mb_phase, Unlit _ <- startPhase src_fn = True
-- note: local_opts is only required if there's no Unlit phase
| xopt Opt_Cpp dflags' = True
| gopt Opt_Pp dflags' = True
| otherwise = False
when needs_preprocessing $
throwGhcExceptionIO (ProgramError "buffer needs preprocesing; interactive check disabled")
return (dflags', src_fn, buf)
-----------------------------------------------------------------------------
-- Error messages
----------------------------------------------------------------------------- | 1,126 | false | false | 0 | 16 | 358 | 222 | 103 | 119 | null | null |
acowley/ghc | compiler/coreSyn/PprCore.hs | bsd-3-clause | pprRule :: CoreRule -> SDoc
pprRule (BuiltinRule { ru_fn = fn, ru_name = name})
= ptext (sLit "Built in rule for") <+> ppr fn <> colon <+> doubleQuotes (ftext name) | 166 | pprRule :: CoreRule -> SDoc
pprRule (BuiltinRule { ru_fn = fn, ru_name = name})
= ptext (sLit "Built in rule for") <+> ppr fn <> colon <+> doubleQuotes (ftext name) | 166 | pprRule (BuiltinRule { ru_fn = fn, ru_name = name})
= ptext (sLit "Built in rule for") <+> ppr fn <> colon <+> doubleQuotes (ftext name) | 138 | false | true | 0 | 10 | 31 | 69 | 35 | 34 | null | null |
input-output-hk/pos-haskell-prototype | infra/src/Pos/Infra/Shutdown/Logic.hs | mit | triggerShutdown
:: (MonadIO m, MonadReader ctx m, WithLogger m, HasShutdownContext ctx)
=> m ()
triggerShutdown = triggerShutdown' $ ExitFailure 20 | 155 | triggerShutdown
:: (MonadIO m, MonadReader ctx m, WithLogger m, HasShutdownContext ctx)
=> m ()
triggerShutdown = triggerShutdown' $ ExitFailure 20 | 155 | triggerShutdown = triggerShutdown' $ ExitFailure 20 | 51 | false | true | 0 | 8 | 27 | 57 | 27 | 30 | null | null |
frantisekfarka/CoALP | src/CoALP/AntiUnify.hs | lgpl-3.0 | ntiUnifyAux :: (Eq a, Eq b, Eq c, Freshable c) => [Term a b c] -> [Term a b c] -> AntiUnifySt a b c [Term a b c]
antiUnifyAux [] _ = return []
| 144 | antiUnifyAux :: (Eq a, Eq b, Eq c, Freshable c) => [Term a b c] -> [Term a b c] -> AntiUnifySt a b c [Term a b c]
antiUnifyAux [] _ = return [] | 144 | antiUnifyAux [] _ = return [] | 30 | false | true | 0 | 10 | 36 | 97 | 48 | 49 | null | null |
rueshyna/gogol | gogol-youtube/gen/Network/Google/YouTube/Types/Product.hs | mpl-2.0 | -- | The video\'s General Directorate of Radio, Television and Cinematography
-- (Mexico) rating.
crRtcRating :: Lens' ContentRating (Maybe ContentRatingRtcRating)
crRtcRating
= lens _crRtcRating (\ s a -> s{_crRtcRating = a}) | 228 | crRtcRating :: Lens' ContentRating (Maybe ContentRatingRtcRating)
crRtcRating
= lens _crRtcRating (\ s a -> s{_crRtcRating = a}) | 130 | crRtcRating
= lens _crRtcRating (\ s a -> s{_crRtcRating = a}) | 64 | true | true | 0 | 9 | 32 | 49 | 26 | 23 | null | null |
etu-fkti5301-bgu/alt-exam_automated_theorem_proving | src/Resolution.hs | bsd-3-clause | pureBasicResolution :: Log m => Formula -> m ()
pureBasicResolution fm = basicResloop ([], Prop.simpcnf $ Skolem.specialize $ Skolem.pnf fm) | 140 | pureBasicResolution :: Log m => Formula -> m ()
pureBasicResolution fm = basicResloop ([], Prop.simpcnf $ Skolem.specialize $ Skolem.pnf fm) | 140 | pureBasicResolution fm = basicResloop ([], Prop.simpcnf $ Skolem.specialize $ Skolem.pnf fm) | 92 | false | true | 0 | 9 | 19 | 58 | 28 | 30 | null | null |
peterspackman/hsqc | src/Integrals.hs | gpl-3.0 | g (i,0,j,k) (a,b,c,d) =
(-ζ)/(ρ^2)*(ζ*η/ρ * (pMinQ i)*(qMinP j)*(qMinP k) * (boys 3 t)
- 0.5 *(boys 2 t) *((δ i j)*(pMinQ k) + (δ i k)*(pMinQ j)
+ (δ j k) * (pMinQ i)))
where
!t = (ζ*η/ρ) * euclidean2 p q
p = centerOfProduct a b
q = centerOfProduct c d
pMinQ x = p ! x - q ! x
qMinP x = q ! x - p ! x
ζ = α a + α b
η = α c + α d
ρ = ζ + η
-- Gijkl | 387 | g (i,0,j,k) (a,b,c,d) =
(-ζ)/(ρ^2)*(ζ*η/ρ * (pMinQ i)*(qMinP j)*(qMinP k) * (boys 3 t)
- 0.5 *(boys 2 t) *((δ i j)*(pMinQ k) + (δ i k)*(pMinQ j)
+ (δ j k) * (pMinQ i)))
where
!t = (ζ*η/ρ) * euclidean2 p q
p = centerOfProduct a b
q = centerOfProduct c d
pMinQ x = p ! x - q ! x
qMinP x = q ! x - p ! x
ζ = α a + α b
η = α c + α d
ρ = ζ + η
-- Gijkl | 387 | g (i,0,j,k) (a,b,c,d) =
(-ζ)/(ρ^2)*(ζ*η/ρ * (pMinQ i)*(qMinP j)*(qMinP k) * (boys 3 t)
- 0.5 *(boys 2 t) *((δ i j)*(pMinQ k) + (δ i k)*(pMinQ j)
+ (δ j k) * (pMinQ i)))
where
!t = (ζ*η/ρ) * euclidean2 p q
p = centerOfProduct a b
q = centerOfProduct c d
pMinQ x = p ! x - q ! x
qMinP x = q ! x - p ! x
ζ = α a + α b
η = α c + α d
ρ = ζ + η
-- Gijkl | 387 | false | false | 11 | 26 | 133 | 331 | 167 | 164 | null | null |
Fuuzetsu/haddock | haddock-api/src/Haddock/Backends/Xhtml/Decl.hs | bsd-2-clause | -- Used for arg of any infix operator
-- (we don't keep their fixities around)
pREC_CON = 4 :: Int | 120 | pREC_CON = 4 :: Int | 19 | pREC_CON = 4 :: Int | 19 | true | false | 0 | 4 | 41 | 11 | 7 | 4 | null | null |
JacquesCarette/literate-scientific-software | code/drasil-docLang/Drasil/Sections/SpecificSystemDescription.hs | bsd-2-clause | propsIntro :: Contents
propsIntro = foldlSP_ [outputTableSent, physConsSent] | 76 | propsIntro :: Contents
propsIntro = foldlSP_ [outputTableSent, physConsSent] | 76 | propsIntro = foldlSP_ [outputTableSent, physConsSent] | 53 | false | true | 0 | 6 | 7 | 20 | 11 | 9 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.