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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
np/ling | Ling/Fmt/Benjamin/Migrate.hs | bsd-3-clause | transNewSig :: NewSig -> L.NewSig
transNewSig = \case
NoNewSig -> L.NoNewSig
NewTypeSig t -> L.NewTypeSig (transTerm t)
NewSessSig s -> L.NewSessSig (transTerm s) | 168 | transNewSig :: NewSig -> L.NewSig
transNewSig = \case
NoNewSig -> L.NoNewSig
NewTypeSig t -> L.NewTypeSig (transTerm t)
NewSessSig s -> L.NewSessSig (transTerm s) | 168 | transNewSig = \case
NoNewSig -> L.NoNewSig
NewTypeSig t -> L.NewTypeSig (transTerm t)
NewSessSig s -> L.NewSessSig (transTerm s) | 134 | false | true | 0 | 10 | 28 | 67 | 32 | 35 | null | null |
silkapp/ordered-list | tests/Tests.hs | bsd-3-clause | fromAscOrDescListT :: [Val] -> Bool
fromAscOrDescListT a = observe (fromAscOrDescList (sort a) (sortBy (flip compare) a)) a | 123 | fromAscOrDescListT :: [Val] -> Bool
fromAscOrDescListT a = observe (fromAscOrDescList (sort a) (sortBy (flip compare) a)) a | 123 | fromAscOrDescListT a = observe (fromAscOrDescList (sort a) (sortBy (flip compare) a)) a | 87 | false | true | 0 | 11 | 16 | 54 | 27 | 27 | null | null |
orchid-hybrid/bee | Bee/NFA.hs | gpl-3.0 | execute :: NFA -> Node -> Node -> String -> [] String
execute g finish node s | finish == node = return s | 105 | execute :: NFA -> Node -> Node -> String -> [] String
execute g finish node s | finish == node = return s | 105 | execute g finish node s | finish == node = return s | 51 | false | true | 0 | 10 | 23 | 54 | 25 | 29 | null | null |
massysett/penny | penny/lib/Penny/Reconciler.hs | bsd-3-clause | reconcileFlag :: Text -> Text
reconcileFlag x
| x == "C" = "R"
| otherwise = x | 82 | reconcileFlag :: Text -> Text
reconcileFlag x
| x == "C" = "R"
| otherwise = x | 82 | reconcileFlag x
| x == "C" = "R"
| otherwise = x | 52 | false | true | 0 | 8 | 20 | 45 | 19 | 26 | null | null |
vikraman/ghc | compiler/main/ErrUtils.hs | bsd-3-clause | ----------------
emptyMessages :: Messages
emptyMessages = (emptyBag, emptyBag) | 79 | emptyMessages :: Messages
emptyMessages = (emptyBag, emptyBag) | 62 | emptyMessages = (emptyBag, emptyBag) | 36 | true | true | 0 | 6 | 7 | 25 | 12 | 13 | null | null |
qzchenwl/r-proxy | src/Main.hs | bsd-3-clause | applyUrl regex url req =
case HC.parseUrl (unpack (replace (toUrl req) regex url)) of
Nothing -> req
Just req0 -> req
{ requestHeaders = update ("Host", HC.host req0) (requestHeaders req)
, rawPathInfo = HC.path req0
, rawQueryString = HC.queryString req0
, requestHeaderHost = Just $ HC.host req0
} | 355 | applyUrl regex url req =
case HC.parseUrl (unpack (replace (toUrl req) regex url)) of
Nothing -> req
Just req0 -> req
{ requestHeaders = update ("Host", HC.host req0) (requestHeaders req)
, rawPathInfo = HC.path req0
, rawQueryString = HC.queryString req0
, requestHeaderHost = Just $ HC.host req0
} | 355 | applyUrl regex url req =
case HC.parseUrl (unpack (replace (toUrl req) regex url)) of
Nothing -> req
Just req0 -> req
{ requestHeaders = update ("Host", HC.host req0) (requestHeaders req)
, rawPathInfo = HC.path req0
, rawQueryString = HC.queryString req0
, requestHeaderHost = Just $ HC.host req0
} | 355 | false | false | 0 | 13 | 103 | 126 | 64 | 62 | null | null |
jvilar/hrows | test/Expression.hs | gpl-2.0 | testTypeError :: Spec
testTypeError = describe "Test a bug found when errors are used in operations" $
it "Check using an error" $ do
let err = mkError "Mal nombre de campo: error"
evalNames [1, 2] mainRst "2 * (error + error)" `shouldBe` err
evalNames [1, 3] mainRst "error > 1 ? 1 : 1 - error" `shouldBe` err
evalNames [1, 3] mainRst "5 + (error > 1 ? 1 : 1 - error)" `shouldBe` err
evalNames [1, 3] mainRst "5 + min" `shouldBe` mkError "Error en EOFT, esperaba un paréntesis abierto"
evalNames [1, 3] mainRst "5 + 4 - (min > 1 ? 1 - min : 0)" `shouldBe` mkError "Error en GreaterThanT, esperaba un paréntesis abierto" | 758 | testTypeError :: Spec
testTypeError = describe "Test a bug found when errors are used in operations" $
it "Check using an error" $ do
let err = mkError "Mal nombre de campo: error"
evalNames [1, 2] mainRst "2 * (error + error)" `shouldBe` err
evalNames [1, 3] mainRst "error > 1 ? 1 : 1 - error" `shouldBe` err
evalNames [1, 3] mainRst "5 + (error > 1 ? 1 : 1 - error)" `shouldBe` err
evalNames [1, 3] mainRst "5 + min" `shouldBe` mkError "Error en EOFT, esperaba un paréntesis abierto"
evalNames [1, 3] mainRst "5 + 4 - (min > 1 ? 1 - min : 0)" `shouldBe` mkError "Error en GreaterThanT, esperaba un paréntesis abierto" | 758 | testTypeError = describe "Test a bug found when errors are used in operations" $
it "Check using an error" $ do
let err = mkError "Mal nombre de campo: error"
evalNames [1, 2] mainRst "2 * (error + error)" `shouldBe` err
evalNames [1, 3] mainRst "error > 1 ? 1 : 1 - error" `shouldBe` err
evalNames [1, 3] mainRst "5 + (error > 1 ? 1 : 1 - error)" `shouldBe` err
evalNames [1, 3] mainRst "5 + min" `shouldBe` mkError "Error en EOFT, esperaba un paréntesis abierto"
evalNames [1, 3] mainRst "5 + 4 - (min > 1 ? 1 - min : 0)" `shouldBe` mkError "Error en GreaterThanT, esperaba un paréntesis abierto" | 736 | false | true | 0 | 11 | 255 | 153 | 79 | 74 | null | null |
nomeata/codeworld | codeworld-game-server/src/CodeWorld/GameServer.hs | apache-2.0 | sendServerMessage :: ServerMessage -> WS.Connection -> IO ()
sendServerMessage msg conn = WS.sendTextData conn (T.pack (show msg)) | 131 | sendServerMessage :: ServerMessage -> WS.Connection -> IO ()
sendServerMessage msg conn = WS.sendTextData conn (T.pack (show msg)) | 131 | sendServerMessage msg conn = WS.sendTextData conn (T.pack (show msg)) | 69 | false | true | 0 | 9 | 17 | 52 | 25 | 27 | null | null |
snoyberg/ghc | compiler/basicTypes/Unique.hs | bsd-3-clause | stepUnique (MkUnique i) n = MkUnique (i + n) | 44 | stepUnique (MkUnique i) n = MkUnique (i + n) | 44 | stepUnique (MkUnique i) n = MkUnique (i + n) | 44 | false | false | 0 | 7 | 8 | 28 | 13 | 15 | null | null |
TurpIF/Drawhub | src/main/Drawhub/Region.hs | mit | pointY :: Point a -> a
pointY (Point _ y) = y | 45 | pointY :: Point a -> a
pointY (Point _ y) = y | 45 | pointY (Point _ y) = y | 22 | false | true | 0 | 9 | 11 | 35 | 15 | 20 | null | null |
tiann/haskell-learning | haskell99/p02/main.hs | apache-2.0 | myButLast [x] = error "single list" | 35 | myButLast [x] = error "single list" | 35 | myButLast [x] = error "single list" | 35 | false | false | 0 | 6 | 5 | 15 | 7 | 8 | null | null |
jrclogic/SMCDEL | src/SMCDEL/Explicit/DEMO_S5.hs | gpl-2.0 | isTrueAt m w (PAW f g) = not (isTrueAt m w f) || isTrueAt (updPaW m f) w g | 74 | isTrueAt m w (PAW f g) = not (isTrueAt m w f) || isTrueAt (updPaW m f) w g | 74 | isTrueAt m w (PAW f g) = not (isTrueAt m w f) || isTrueAt (updPaW m f) w g | 74 | false | false | 0 | 8 | 18 | 53 | 25 | 28 | null | null |
weeeeeew/petulant-cyril | exercise1/mergesort.hs | unlicense | --testFunction = pmsort
randomInts :: Int -> StdGen -> [Int]
randomInts k g = let result = take k (randoms g)
in force result `seq` result | 156 | randomInts :: Int -> StdGen -> [Int]
randomInts k g = let result = take k (randoms g)
in force result `seq` result | 131 | randomInts k g = let result = take k (randoms g)
in force result `seq` result | 94 | true | true | 0 | 11 | 43 | 59 | 30 | 29 | null | null |
diogob/postgrest | src/PostgREST/Types.hs | mit | isSelfJoin :: Relation -> Bool
isSelfJoin r = relType r /= Root && relTable r == relFTable r | 92 | isSelfJoin :: Relation -> Bool
isSelfJoin r = relType r /= Root && relTable r == relFTable r | 92 | isSelfJoin r = relType r /= Root && relTable r == relFTable r | 61 | false | true | 0 | 8 | 17 | 39 | 18 | 21 | null | null |
brendanhay/gogol | gogol-dataflow/gen/Network/Google/Resource/Dataflow/Projects/CatalogTemplates/Get.hs | mpl-2.0 | -- | V1 error format.
pctgXgafv :: Lens' ProjectsCatalogTemplatesGet (Maybe Xgafv)
pctgXgafv
= lens _pctgXgafv (\ s a -> s{_pctgXgafv = a}) | 141 | pctgXgafv :: Lens' ProjectsCatalogTemplatesGet (Maybe Xgafv)
pctgXgafv
= lens _pctgXgafv (\ s a -> s{_pctgXgafv = a}) | 119 | pctgXgafv
= lens _pctgXgafv (\ s a -> s{_pctgXgafv = a}) | 58 | true | true | 0 | 9 | 23 | 48 | 25 | 23 | null | null |
rahulmutt/ghcvm | compiler/Eta/Core/TrieMap.hs | bsd-3-clause | wrapEmptyTypeMap :: TypeMap a
wrapEmptyTypeMap = TM { tm_var = emptyTM
, tm_app = EmptyTM
, tm_fun = EmptyTM
, tm_tc_app = emptyNameEnv
, tm_forall = EmptyTM
, tm_tylit = emptyTyLitMap } | 300 | wrapEmptyTypeMap :: TypeMap a
wrapEmptyTypeMap = TM { tm_var = emptyTM
, tm_app = EmptyTM
, tm_fun = EmptyTM
, tm_tc_app = emptyNameEnv
, tm_forall = EmptyTM
, tm_tylit = emptyTyLitMap } | 300 | wrapEmptyTypeMap = TM { tm_var = emptyTM
, tm_app = EmptyTM
, tm_fun = EmptyTM
, tm_tc_app = emptyNameEnv
, tm_forall = EmptyTM
, tm_tylit = emptyTyLitMap } | 270 | false | true | 0 | 6 | 145 | 52 | 32 | 20 | null | null |
SamirTalwar/advent-of-code | 2016/AOC_02_1.hs | mit | move MoveRight '6' = '6' | 24 | move MoveRight '6' = '6' | 24 | move MoveRight '6' = '6' | 24 | false | false | 0 | 5 | 4 | 13 | 5 | 8 | null | null |
norm2782/uuagc | src-generated/PrintCode.hs | bsd-3-clause | wrap_DataAlt :: T_DataAlt -> Inh_DataAlt -> (Syn_DataAlt )
wrap_DataAlt !(T_DataAlt act) !(Inh_DataAlt _lhsInested _lhsIstrictPre) =
Control.Monad.Identity.runIdentity (
do !sem <- act
let arg = T_DataAlt_vIn13 _lhsInested _lhsIstrictPre
!(T_DataAlt_vOut13 _lhsOpp) <- return (inv_DataAlt_s14 sem arg)
return (Syn_DataAlt _lhsOpp)
) | 369 | wrap_DataAlt :: T_DataAlt -> Inh_DataAlt -> (Syn_DataAlt )
wrap_DataAlt !(T_DataAlt act) !(Inh_DataAlt _lhsInested _lhsIstrictPre) =
Control.Monad.Identity.runIdentity (
do !sem <- act
let arg = T_DataAlt_vIn13 _lhsInested _lhsIstrictPre
!(T_DataAlt_vOut13 _lhsOpp) <- return (inv_DataAlt_s14 sem arg)
return (Syn_DataAlt _lhsOpp)
) | 369 | wrap_DataAlt !(T_DataAlt act) !(Inh_DataAlt _lhsInested _lhsIstrictPre) =
Control.Monad.Identity.runIdentity (
do !sem <- act
let arg = T_DataAlt_vIn13 _lhsInested _lhsIstrictPre
!(T_DataAlt_vOut13 _lhsOpp) <- return (inv_DataAlt_s14 sem arg)
return (Syn_DataAlt _lhsOpp)
) | 308 | false | true | 0 | 12 | 74 | 112 | 52 | 60 | null | null |
switchface/helm | src/Helm/Mouse.hs | mit | ups
:: Engine e
=> (MouseButton -> V2 Int -> a) -- ^ The function to map a mouse button and position to an action.
-> Sub e a -- ^ The mapped subscription.
ups f = Sub $ do
engine <- input >>= snapshot
fmap (fmap (uncurry f)) <$> mouseUpSignal engine | 284 | ups
:: Engine e
=> (MouseButton -> V2 Int -> a) -- ^ The function to map a mouse button and position to an action.
-> Sub e a
ups f = Sub $ do
engine <- input >>= snapshot
fmap (fmap (uncurry f)) <$> mouseUpSignal engine | 232 | ups f = Sub $ do
engine <- input >>= snapshot
fmap (fmap (uncurry f)) <$> mouseUpSignal engine | 99 | true | true | 2 | 13 | 85 | 92 | 42 | 50 | null | null |
elginer/shpider | Network/Shpider/Curl/Opts.hs | mit | unmarshallOption :: Unmarshaller a -> CurlOption -> IO a
unmarshallOption um c =
let
l = (baseLong+)
o = (baseObject+)
f = (baseFunction+)
off = (baseOffT+)
in
case c of
CurlFileObj x -> u_ptr um (o 1) x
CurlURL x -> u_string um (o 2) x
CurlPort x -> u_long um (l 3) x
CurlProxy x -> u_string um (o 4) x
CurlUserPwd x -> u_string um (o 5) x
CurlProxyUserPwd x -> u_string um (o 6) x
CurlRange x -> u_string um (o 7) x
CurlInFile x -> u_string um (o 9) x
CurlErrorBuffer x -> u_cptr um (o 10) x
CurlWriteFunction x -> u_writeFun um (f 11) x
CurlReadFunction x -> u_readFun um (f 12) x
CurlTimeout x -> u_long um (l 13) x
CurlInFileSize x -> u_long um (l 14) x
CurlPostFields x -> u_string um (o 15) (concat $ intersperse "&" x)
CurlReferer x -> u_string um (o 16) x
CurlFtpPort x -> u_string um (o 17) x
CurlUserAgent x -> u_string um (o 18) x
CurlLowSpeed x -> u_long um (l 19) x
CurlLowSpeedTime x -> u_long um (l 20) x
CurlResumeFrom x -> u_long um (l 21) x
CurlCookie x -> u_string um (o 22) x
CurlHttpHeaders x -> u_strings um (o 23) x
CurlHttpPost x -> u_posts um (o 24) x
CurlSSLCert x -> u_string um (o 25) x
CurlSSLPassword x -> u_string um (o 26) x
CurlSSLKeyPassword x -> u_string um (o 26) x -- yes, duplicate.
CurlCRLF x -> u_bool um (l 27) x
CurlQuote x -> u_strings um (o 28) x
CurlWriteHeader x -> u_ptr um (o 29) x
CurlCookieFile x -> u_string um (o 31) x
CurlSSLVersion x -> u_long um (l 32) x
CurlTimeCondition x -> u_enum um (l 33) x
CurlTimeValue x -> u_long um (l 34) x
CurlCustomRequest x -> u_string um (o 36) x
-- CurlStderr x -> u_string um (o 37) x
CurlPostQuote x -> u_strings um (o 39) x
CurlWriteInfo x -> u_string um (o 40) x
CurlVerbose x -> u_bool um (l 41) x
CurlHeader x -> u_bool um (l 42) x
CurlNoProgress x -> u_bool um (l 43) x
CurlNoBody x -> u_bool um (l 44) x
CurlFailOnError x -> u_bool um (l 45) x
CurlUpload x -> u_bool um (l 46) x
CurlPost x -> u_bool um (l 47) x
CurlFtpListOnly x -> u_bool um (l 48) x
CurlFtpAppend x -> u_bool um (l 50) x
CurlUseNetRc x -> u_enum um (l 51) x
CurlFollowLocation x -> u_bool um (l 52) x
CurlTransferTextASCII x -> u_bool um (l 53) x
CurlPut x -> u_bool um (l 54) x
CurlProgressFunction x -> u_progressFun um (f 56) x
CurlProgressData x -> u_ptr um (o 57) x
CurlAutoReferer x -> u_bool um (l 58) x
CurlProxyPort x -> u_long um (l 59) x
CurlPostFieldSize x -> u_long um (l 60) x
CurlHttpProxyTunnel x -> u_bool um (l 61) x
CurlInterface x -> u_string um (o 62) x
CurlKrb4Level x -> u_string um (o 63) x
CurlSSLVerifyPeer x -> u_bool um (l 64) x
CurlCAInfo x -> u_string um (o 65) x
CurlMaxRedirs x -> u_long um (l 68) x
CurlFiletime x -> u_bool um (l 69) x
CurlTelnetOptions x -> u_strings um (o 70) x
CurlMaxConnects x -> u_long um (l 71) x
CurlClosePolicy x -> u_long um (l 72) x
CurlFreshConnect x -> u_bool um (l 74) x
CurlForbidReuse x -> u_bool um (l 75) x
CurlRandomFile x -> u_string um (o 76) x
CurlEgdSocket x -> u_string um (o 77) x
CurlConnectTimeout x -> u_long um (l 78) x
CurlHeaderFunction x -> u_writeFun um (f 79) x
CurlHttpGet x -> u_bool um (l 80) x
CurlSSLVerifyHost x -> u_long um (l 81) x
CurlCookieJar x -> u_string um (o 82) x
CurlSSLCipherList x -> u_string um (o 83) x -- a string (or a l-list of them)?
CurlHttpVersion x -> u_enum um (l 84) x
CurlFtpUseEPSV x -> u_bool um (l 85) x
CurlSSLCertType x -> u_string um (o 86) x
CurlSSLKey x -> u_string um (o 87) x
CurlSSLKeyType x -> u_string um (o 88) x
CurlSSLEngine x -> u_string um (o 89) x
CurlSSLEngineDefault -> u_bool um (l 90) True
CurlDNSUseGlobalCache x -> u_bool um (l 91) x
CurlDNSCacheTimeout x -> u_long um (l 92) x
CurlPreQuote x -> u_strings um (o 93) x
CurlDebugFunction x -> u_debugFun um (f 94) x
CurlDebugData x -> u_ptr um (o 95) x
CurlCookieSession x -> u_bool um (l 96) x
CurlCAPath x -> u_string um (o 97) x
CurlBufferSize x -> u_long um (l 98) x
CurlNoSignal x -> u_bool um (l 99) x
CurlShare x -> u_ptr um (o 100) x
CurlProxyType x -> u_enum um (l 101) x
CurlEncoding x -> u_string um (o 102) x
CurlPrivate x -> u_ptr um (o 103) x
CurlHttp200Aliases x -> u_string um (o 104) x -- correct?
CurlUnrestrictedAuth x -> u_bool um (l 105) x
CurlFtppUseEPRT x -> u_bool um (l 106) x
CurlHttpAuth xs -> u_long um (l 107) (toHttpAuthMask xs)
CurlSSLCtxFunction x -> u_sslctxt um (f 108) x
CurlSSLCtxData x -> u_ptr um (o 109) x
CurlFtpCreateMissingDirs x -> u_bool um (l 110) x
CurlProxyAuth x -> u_long um (l 111) (toHttpAuthMask x)
CurlFtpResponseTimeout x -> u_long um (l 112) x
CurlIPResolve x -> u_long um (l 113) x
CurlMaxFileSize x -> u_long um (l 114) x
CurlInFileSizeLarge x -> u_llong um (off 115) x
CurlResumeFromLarge x -> u_llong um (off 116) x
CurlMaxFileSizeLarge x -> u_llong um (off 117) x
CurlNetrcFile x -> u_string um (o 118) x
CurlFtpSSL x -> u_enum um (l 119) x
CurlPostFieldSizeLarge x -> u_llong um (off 120) x
CurlTCPNoDelay x -> u_bool um (l 121) x
CurlFtpSSLAuth x -> u_enum um (l 129) x
CurlIOCTLFunction x -> u_ioctl_fun um (f 130) x
CurlIOCTLData x -> u_ptr um (o 131) x
CurlFtpAccount x -> u_string um (o 134) x
CurlCookieList x -> u_string um (o 135) x
CurlIgnoreContentLength x -> u_bool um (l 136) x
CurlFtpSkipPASVIP x -> u_bool um (l 137) x
CurlFtpFileMethod x -> u_enum um (l 138) x
CurlLocalPort x -> u_long um (l 139) x
CurlLocalPortRange x -> u_long um (l 140) x
CurlConnectOnly x -> u_bool um (l 141) x
CurlConvFromNetworkFunction x -> u_convFromNetwork um (f 142) x
CurlConvToNetworkFunction x -> u_convToNetwork um (f 143) x
CurlConvFromUtf8Function x -> u_convFromUtf8 um (f 144) x
CurlMaxSendSpeedLarge x -> u_llong um (off 145) x
CurlMaxRecvSpeedLarge x -> u_llong um (off 146) x
CurlFtpAlternativeToUser x -> u_string um (o 147) x
CurlSockOptFunction x -> u_sockoptFun um (f 148) x
CurlSockOptData x -> u_ptr um (o 149) x
CurlSSLSessionIdCache x -> u_bool um (l 150) x
CurlSSHAuthTypes xs -> u_long um (l 151) (toSSHAuthMask xs)
CurlSSHPublicKeyFile x -> u_string um (o 152) x
CurlSSHPrivateKeyFile x -> u_string um (o 153) x
CurlFtpSSLCCC x -> u_bool um (l 154) x
CurlTimeoutMS x -> u_long um (l 155) x
CurlConnectTimeoutMS x -> u_long um (l 156) x
CurlHttpTransferDecoding x -> u_bool um (l 157) x
CurlHttpContentDecoding x -> u_bool um (l 158) x
CurlNewFilePerms x -> u_long um (l 159) x
CurlNewDirectoryPerms x -> u_long um (l 160) x
CurlPostRedirect x -> u_bool um (l 161) x
CurlSSHHostPublicKeyMD5 x -> u_string um (l 162) x
CurlCopyPostFields x -> u_bool um (l 165) x
CurlProxyTransferMode x -> u_long um (l 166) x
CurlCRLFile x -> u_string um (l 169) x
CurlIssuerCert x -> u_string um (l 170) x
CurlAddressScope x -> u_long um (l 171) x
CurlCertInfo x -> u_long um (l 172) x
CurlUserName x -> u_string um (l 173) x
CurlUserPassword x -> u_string um (l 174) x
CurlProxyUser x -> u_string um (l 175) x
CurlProxyPassword x -> u_string um (l 176) x | 7,222 | unmarshallOption :: Unmarshaller a -> CurlOption -> IO a
unmarshallOption um c =
let
l = (baseLong+)
o = (baseObject+)
f = (baseFunction+)
off = (baseOffT+)
in
case c of
CurlFileObj x -> u_ptr um (o 1) x
CurlURL x -> u_string um (o 2) x
CurlPort x -> u_long um (l 3) x
CurlProxy x -> u_string um (o 4) x
CurlUserPwd x -> u_string um (o 5) x
CurlProxyUserPwd x -> u_string um (o 6) x
CurlRange x -> u_string um (o 7) x
CurlInFile x -> u_string um (o 9) x
CurlErrorBuffer x -> u_cptr um (o 10) x
CurlWriteFunction x -> u_writeFun um (f 11) x
CurlReadFunction x -> u_readFun um (f 12) x
CurlTimeout x -> u_long um (l 13) x
CurlInFileSize x -> u_long um (l 14) x
CurlPostFields x -> u_string um (o 15) (concat $ intersperse "&" x)
CurlReferer x -> u_string um (o 16) x
CurlFtpPort x -> u_string um (o 17) x
CurlUserAgent x -> u_string um (o 18) x
CurlLowSpeed x -> u_long um (l 19) x
CurlLowSpeedTime x -> u_long um (l 20) x
CurlResumeFrom x -> u_long um (l 21) x
CurlCookie x -> u_string um (o 22) x
CurlHttpHeaders x -> u_strings um (o 23) x
CurlHttpPost x -> u_posts um (o 24) x
CurlSSLCert x -> u_string um (o 25) x
CurlSSLPassword x -> u_string um (o 26) x
CurlSSLKeyPassword x -> u_string um (o 26) x -- yes, duplicate.
CurlCRLF x -> u_bool um (l 27) x
CurlQuote x -> u_strings um (o 28) x
CurlWriteHeader x -> u_ptr um (o 29) x
CurlCookieFile x -> u_string um (o 31) x
CurlSSLVersion x -> u_long um (l 32) x
CurlTimeCondition x -> u_enum um (l 33) x
CurlTimeValue x -> u_long um (l 34) x
CurlCustomRequest x -> u_string um (o 36) x
-- CurlStderr x -> u_string um (o 37) x
CurlPostQuote x -> u_strings um (o 39) x
CurlWriteInfo x -> u_string um (o 40) x
CurlVerbose x -> u_bool um (l 41) x
CurlHeader x -> u_bool um (l 42) x
CurlNoProgress x -> u_bool um (l 43) x
CurlNoBody x -> u_bool um (l 44) x
CurlFailOnError x -> u_bool um (l 45) x
CurlUpload x -> u_bool um (l 46) x
CurlPost x -> u_bool um (l 47) x
CurlFtpListOnly x -> u_bool um (l 48) x
CurlFtpAppend x -> u_bool um (l 50) x
CurlUseNetRc x -> u_enum um (l 51) x
CurlFollowLocation x -> u_bool um (l 52) x
CurlTransferTextASCII x -> u_bool um (l 53) x
CurlPut x -> u_bool um (l 54) x
CurlProgressFunction x -> u_progressFun um (f 56) x
CurlProgressData x -> u_ptr um (o 57) x
CurlAutoReferer x -> u_bool um (l 58) x
CurlProxyPort x -> u_long um (l 59) x
CurlPostFieldSize x -> u_long um (l 60) x
CurlHttpProxyTunnel x -> u_bool um (l 61) x
CurlInterface x -> u_string um (o 62) x
CurlKrb4Level x -> u_string um (o 63) x
CurlSSLVerifyPeer x -> u_bool um (l 64) x
CurlCAInfo x -> u_string um (o 65) x
CurlMaxRedirs x -> u_long um (l 68) x
CurlFiletime x -> u_bool um (l 69) x
CurlTelnetOptions x -> u_strings um (o 70) x
CurlMaxConnects x -> u_long um (l 71) x
CurlClosePolicy x -> u_long um (l 72) x
CurlFreshConnect x -> u_bool um (l 74) x
CurlForbidReuse x -> u_bool um (l 75) x
CurlRandomFile x -> u_string um (o 76) x
CurlEgdSocket x -> u_string um (o 77) x
CurlConnectTimeout x -> u_long um (l 78) x
CurlHeaderFunction x -> u_writeFun um (f 79) x
CurlHttpGet x -> u_bool um (l 80) x
CurlSSLVerifyHost x -> u_long um (l 81) x
CurlCookieJar x -> u_string um (o 82) x
CurlSSLCipherList x -> u_string um (o 83) x -- a string (or a l-list of them)?
CurlHttpVersion x -> u_enum um (l 84) x
CurlFtpUseEPSV x -> u_bool um (l 85) x
CurlSSLCertType x -> u_string um (o 86) x
CurlSSLKey x -> u_string um (o 87) x
CurlSSLKeyType x -> u_string um (o 88) x
CurlSSLEngine x -> u_string um (o 89) x
CurlSSLEngineDefault -> u_bool um (l 90) True
CurlDNSUseGlobalCache x -> u_bool um (l 91) x
CurlDNSCacheTimeout x -> u_long um (l 92) x
CurlPreQuote x -> u_strings um (o 93) x
CurlDebugFunction x -> u_debugFun um (f 94) x
CurlDebugData x -> u_ptr um (o 95) x
CurlCookieSession x -> u_bool um (l 96) x
CurlCAPath x -> u_string um (o 97) x
CurlBufferSize x -> u_long um (l 98) x
CurlNoSignal x -> u_bool um (l 99) x
CurlShare x -> u_ptr um (o 100) x
CurlProxyType x -> u_enum um (l 101) x
CurlEncoding x -> u_string um (o 102) x
CurlPrivate x -> u_ptr um (o 103) x
CurlHttp200Aliases x -> u_string um (o 104) x -- correct?
CurlUnrestrictedAuth x -> u_bool um (l 105) x
CurlFtppUseEPRT x -> u_bool um (l 106) x
CurlHttpAuth xs -> u_long um (l 107) (toHttpAuthMask xs)
CurlSSLCtxFunction x -> u_sslctxt um (f 108) x
CurlSSLCtxData x -> u_ptr um (o 109) x
CurlFtpCreateMissingDirs x -> u_bool um (l 110) x
CurlProxyAuth x -> u_long um (l 111) (toHttpAuthMask x)
CurlFtpResponseTimeout x -> u_long um (l 112) x
CurlIPResolve x -> u_long um (l 113) x
CurlMaxFileSize x -> u_long um (l 114) x
CurlInFileSizeLarge x -> u_llong um (off 115) x
CurlResumeFromLarge x -> u_llong um (off 116) x
CurlMaxFileSizeLarge x -> u_llong um (off 117) x
CurlNetrcFile x -> u_string um (o 118) x
CurlFtpSSL x -> u_enum um (l 119) x
CurlPostFieldSizeLarge x -> u_llong um (off 120) x
CurlTCPNoDelay x -> u_bool um (l 121) x
CurlFtpSSLAuth x -> u_enum um (l 129) x
CurlIOCTLFunction x -> u_ioctl_fun um (f 130) x
CurlIOCTLData x -> u_ptr um (o 131) x
CurlFtpAccount x -> u_string um (o 134) x
CurlCookieList x -> u_string um (o 135) x
CurlIgnoreContentLength x -> u_bool um (l 136) x
CurlFtpSkipPASVIP x -> u_bool um (l 137) x
CurlFtpFileMethod x -> u_enum um (l 138) x
CurlLocalPort x -> u_long um (l 139) x
CurlLocalPortRange x -> u_long um (l 140) x
CurlConnectOnly x -> u_bool um (l 141) x
CurlConvFromNetworkFunction x -> u_convFromNetwork um (f 142) x
CurlConvToNetworkFunction x -> u_convToNetwork um (f 143) x
CurlConvFromUtf8Function x -> u_convFromUtf8 um (f 144) x
CurlMaxSendSpeedLarge x -> u_llong um (off 145) x
CurlMaxRecvSpeedLarge x -> u_llong um (off 146) x
CurlFtpAlternativeToUser x -> u_string um (o 147) x
CurlSockOptFunction x -> u_sockoptFun um (f 148) x
CurlSockOptData x -> u_ptr um (o 149) x
CurlSSLSessionIdCache x -> u_bool um (l 150) x
CurlSSHAuthTypes xs -> u_long um (l 151) (toSSHAuthMask xs)
CurlSSHPublicKeyFile x -> u_string um (o 152) x
CurlSSHPrivateKeyFile x -> u_string um (o 153) x
CurlFtpSSLCCC x -> u_bool um (l 154) x
CurlTimeoutMS x -> u_long um (l 155) x
CurlConnectTimeoutMS x -> u_long um (l 156) x
CurlHttpTransferDecoding x -> u_bool um (l 157) x
CurlHttpContentDecoding x -> u_bool um (l 158) x
CurlNewFilePerms x -> u_long um (l 159) x
CurlNewDirectoryPerms x -> u_long um (l 160) x
CurlPostRedirect x -> u_bool um (l 161) x
CurlSSHHostPublicKeyMD5 x -> u_string um (l 162) x
CurlCopyPostFields x -> u_bool um (l 165) x
CurlProxyTransferMode x -> u_long um (l 166) x
CurlCRLFile x -> u_string um (l 169) x
CurlIssuerCert x -> u_string um (l 170) x
CurlAddressScope x -> u_long um (l 171) x
CurlCertInfo x -> u_long um (l 172) x
CurlUserName x -> u_string um (l 173) x
CurlUserPassword x -> u_string um (l 174) x
CurlProxyUser x -> u_string um (l 175) x
CurlProxyPassword x -> u_string um (l 176) x | 7,222 | unmarshallOption um c =
let
l = (baseLong+)
o = (baseObject+)
f = (baseFunction+)
off = (baseOffT+)
in
case c of
CurlFileObj x -> u_ptr um (o 1) x
CurlURL x -> u_string um (o 2) x
CurlPort x -> u_long um (l 3) x
CurlProxy x -> u_string um (o 4) x
CurlUserPwd x -> u_string um (o 5) x
CurlProxyUserPwd x -> u_string um (o 6) x
CurlRange x -> u_string um (o 7) x
CurlInFile x -> u_string um (o 9) x
CurlErrorBuffer x -> u_cptr um (o 10) x
CurlWriteFunction x -> u_writeFun um (f 11) x
CurlReadFunction x -> u_readFun um (f 12) x
CurlTimeout x -> u_long um (l 13) x
CurlInFileSize x -> u_long um (l 14) x
CurlPostFields x -> u_string um (o 15) (concat $ intersperse "&" x)
CurlReferer x -> u_string um (o 16) x
CurlFtpPort x -> u_string um (o 17) x
CurlUserAgent x -> u_string um (o 18) x
CurlLowSpeed x -> u_long um (l 19) x
CurlLowSpeedTime x -> u_long um (l 20) x
CurlResumeFrom x -> u_long um (l 21) x
CurlCookie x -> u_string um (o 22) x
CurlHttpHeaders x -> u_strings um (o 23) x
CurlHttpPost x -> u_posts um (o 24) x
CurlSSLCert x -> u_string um (o 25) x
CurlSSLPassword x -> u_string um (o 26) x
CurlSSLKeyPassword x -> u_string um (o 26) x -- yes, duplicate.
CurlCRLF x -> u_bool um (l 27) x
CurlQuote x -> u_strings um (o 28) x
CurlWriteHeader x -> u_ptr um (o 29) x
CurlCookieFile x -> u_string um (o 31) x
CurlSSLVersion x -> u_long um (l 32) x
CurlTimeCondition x -> u_enum um (l 33) x
CurlTimeValue x -> u_long um (l 34) x
CurlCustomRequest x -> u_string um (o 36) x
-- CurlStderr x -> u_string um (o 37) x
CurlPostQuote x -> u_strings um (o 39) x
CurlWriteInfo x -> u_string um (o 40) x
CurlVerbose x -> u_bool um (l 41) x
CurlHeader x -> u_bool um (l 42) x
CurlNoProgress x -> u_bool um (l 43) x
CurlNoBody x -> u_bool um (l 44) x
CurlFailOnError x -> u_bool um (l 45) x
CurlUpload x -> u_bool um (l 46) x
CurlPost x -> u_bool um (l 47) x
CurlFtpListOnly x -> u_bool um (l 48) x
CurlFtpAppend x -> u_bool um (l 50) x
CurlUseNetRc x -> u_enum um (l 51) x
CurlFollowLocation x -> u_bool um (l 52) x
CurlTransferTextASCII x -> u_bool um (l 53) x
CurlPut x -> u_bool um (l 54) x
CurlProgressFunction x -> u_progressFun um (f 56) x
CurlProgressData x -> u_ptr um (o 57) x
CurlAutoReferer x -> u_bool um (l 58) x
CurlProxyPort x -> u_long um (l 59) x
CurlPostFieldSize x -> u_long um (l 60) x
CurlHttpProxyTunnel x -> u_bool um (l 61) x
CurlInterface x -> u_string um (o 62) x
CurlKrb4Level x -> u_string um (o 63) x
CurlSSLVerifyPeer x -> u_bool um (l 64) x
CurlCAInfo x -> u_string um (o 65) x
CurlMaxRedirs x -> u_long um (l 68) x
CurlFiletime x -> u_bool um (l 69) x
CurlTelnetOptions x -> u_strings um (o 70) x
CurlMaxConnects x -> u_long um (l 71) x
CurlClosePolicy x -> u_long um (l 72) x
CurlFreshConnect x -> u_bool um (l 74) x
CurlForbidReuse x -> u_bool um (l 75) x
CurlRandomFile x -> u_string um (o 76) x
CurlEgdSocket x -> u_string um (o 77) x
CurlConnectTimeout x -> u_long um (l 78) x
CurlHeaderFunction x -> u_writeFun um (f 79) x
CurlHttpGet x -> u_bool um (l 80) x
CurlSSLVerifyHost x -> u_long um (l 81) x
CurlCookieJar x -> u_string um (o 82) x
CurlSSLCipherList x -> u_string um (o 83) x -- a string (or a l-list of them)?
CurlHttpVersion x -> u_enum um (l 84) x
CurlFtpUseEPSV x -> u_bool um (l 85) x
CurlSSLCertType x -> u_string um (o 86) x
CurlSSLKey x -> u_string um (o 87) x
CurlSSLKeyType x -> u_string um (o 88) x
CurlSSLEngine x -> u_string um (o 89) x
CurlSSLEngineDefault -> u_bool um (l 90) True
CurlDNSUseGlobalCache x -> u_bool um (l 91) x
CurlDNSCacheTimeout x -> u_long um (l 92) x
CurlPreQuote x -> u_strings um (o 93) x
CurlDebugFunction x -> u_debugFun um (f 94) x
CurlDebugData x -> u_ptr um (o 95) x
CurlCookieSession x -> u_bool um (l 96) x
CurlCAPath x -> u_string um (o 97) x
CurlBufferSize x -> u_long um (l 98) x
CurlNoSignal x -> u_bool um (l 99) x
CurlShare x -> u_ptr um (o 100) x
CurlProxyType x -> u_enum um (l 101) x
CurlEncoding x -> u_string um (o 102) x
CurlPrivate x -> u_ptr um (o 103) x
CurlHttp200Aliases x -> u_string um (o 104) x -- correct?
CurlUnrestrictedAuth x -> u_bool um (l 105) x
CurlFtppUseEPRT x -> u_bool um (l 106) x
CurlHttpAuth xs -> u_long um (l 107) (toHttpAuthMask xs)
CurlSSLCtxFunction x -> u_sslctxt um (f 108) x
CurlSSLCtxData x -> u_ptr um (o 109) x
CurlFtpCreateMissingDirs x -> u_bool um (l 110) x
CurlProxyAuth x -> u_long um (l 111) (toHttpAuthMask x)
CurlFtpResponseTimeout x -> u_long um (l 112) x
CurlIPResolve x -> u_long um (l 113) x
CurlMaxFileSize x -> u_long um (l 114) x
CurlInFileSizeLarge x -> u_llong um (off 115) x
CurlResumeFromLarge x -> u_llong um (off 116) x
CurlMaxFileSizeLarge x -> u_llong um (off 117) x
CurlNetrcFile x -> u_string um (o 118) x
CurlFtpSSL x -> u_enum um (l 119) x
CurlPostFieldSizeLarge x -> u_llong um (off 120) x
CurlTCPNoDelay x -> u_bool um (l 121) x
CurlFtpSSLAuth x -> u_enum um (l 129) x
CurlIOCTLFunction x -> u_ioctl_fun um (f 130) x
CurlIOCTLData x -> u_ptr um (o 131) x
CurlFtpAccount x -> u_string um (o 134) x
CurlCookieList x -> u_string um (o 135) x
CurlIgnoreContentLength x -> u_bool um (l 136) x
CurlFtpSkipPASVIP x -> u_bool um (l 137) x
CurlFtpFileMethod x -> u_enum um (l 138) x
CurlLocalPort x -> u_long um (l 139) x
CurlLocalPortRange x -> u_long um (l 140) x
CurlConnectOnly x -> u_bool um (l 141) x
CurlConvFromNetworkFunction x -> u_convFromNetwork um (f 142) x
CurlConvToNetworkFunction x -> u_convToNetwork um (f 143) x
CurlConvFromUtf8Function x -> u_convFromUtf8 um (f 144) x
CurlMaxSendSpeedLarge x -> u_llong um (off 145) x
CurlMaxRecvSpeedLarge x -> u_llong um (off 146) x
CurlFtpAlternativeToUser x -> u_string um (o 147) x
CurlSockOptFunction x -> u_sockoptFun um (f 148) x
CurlSockOptData x -> u_ptr um (o 149) x
CurlSSLSessionIdCache x -> u_bool um (l 150) x
CurlSSHAuthTypes xs -> u_long um (l 151) (toSSHAuthMask xs)
CurlSSHPublicKeyFile x -> u_string um (o 152) x
CurlSSHPrivateKeyFile x -> u_string um (o 153) x
CurlFtpSSLCCC x -> u_bool um (l 154) x
CurlTimeoutMS x -> u_long um (l 155) x
CurlConnectTimeoutMS x -> u_long um (l 156) x
CurlHttpTransferDecoding x -> u_bool um (l 157) x
CurlHttpContentDecoding x -> u_bool um (l 158) x
CurlNewFilePerms x -> u_long um (l 159) x
CurlNewDirectoryPerms x -> u_long um (l 160) x
CurlPostRedirect x -> u_bool um (l 161) x
CurlSSHHostPublicKeyMD5 x -> u_string um (l 162) x
CurlCopyPostFields x -> u_bool um (l 165) x
CurlProxyTransferMode x -> u_long um (l 166) x
CurlCRLFile x -> u_string um (l 169) x
CurlIssuerCert x -> u_string um (l 170) x
CurlAddressScope x -> u_long um (l 171) x
CurlCertInfo x -> u_long um (l 172) x
CurlUserName x -> u_string um (l 173) x
CurlUserPassword x -> u_string um (l 174) x
CurlProxyUser x -> u_string um (l 175) x
CurlProxyPassword x -> u_string um (l 176) x | 7,165 | false | true | 0 | 13 | 1,741 | 3,495 | 1,600 | 1,895 | null | null |
sopvop/cabal | Cabal/Distribution/Simple/GHC/ImplInfo.hs | bsd-3-clause | getImplInfo :: Compiler -> GhcImplInfo
getImplInfo comp =
case compilerFlavor comp of
GHC -> ghcVersionImplInfo (compilerVersion comp)
LHC -> lhcVersionImplInfo (compilerVersion comp)
GHCJS -> case compilerCompatVersion GHC comp of
Just ghcVer -> ghcjsVersionImplInfo (compilerVersion comp) ghcVer
_ -> error ("Distribution.Simple.GHC.Props.getImplProps: " ++
"could not find GHC version for GHCJS compiler")
x -> error ("Distribution.Simple.GHC.Props.getImplProps only works" ++
"for GHC-like compilers (GHC, GHCJS, LHC)" ++
", but found " ++ show x) | 673 | getImplInfo :: Compiler -> GhcImplInfo
getImplInfo comp =
case compilerFlavor comp of
GHC -> ghcVersionImplInfo (compilerVersion comp)
LHC -> lhcVersionImplInfo (compilerVersion comp)
GHCJS -> case compilerCompatVersion GHC comp of
Just ghcVer -> ghcjsVersionImplInfo (compilerVersion comp) ghcVer
_ -> error ("Distribution.Simple.GHC.Props.getImplProps: " ++
"could not find GHC version for GHCJS compiler")
x -> error ("Distribution.Simple.GHC.Props.getImplProps only works" ++
"for GHC-like compilers (GHC, GHCJS, LHC)" ++
", but found " ++ show x) | 673 | getImplInfo comp =
case compilerFlavor comp of
GHC -> ghcVersionImplInfo (compilerVersion comp)
LHC -> lhcVersionImplInfo (compilerVersion comp)
GHCJS -> case compilerCompatVersion GHC comp of
Just ghcVer -> ghcjsVersionImplInfo (compilerVersion comp) ghcVer
_ -> error ("Distribution.Simple.GHC.Props.getImplProps: " ++
"could not find GHC version for GHCJS compiler")
x -> error ("Distribution.Simple.GHC.Props.getImplProps only works" ++
"for GHC-like compilers (GHC, GHCJS, LHC)" ++
", but found " ++ show x) | 634 | false | true | 0 | 13 | 192 | 138 | 64 | 74 | null | null |
synsem/texhs | src/Text/TeX/Lexer/TokenParser/Execution.hs | gpl-3.0 | ---------- Multi-token parsers with expansion
-- Parse many tokens using 'token'.
tokens :: HandleTeXIO m => LexerT m [Token]
tokens = concat <$> many token | 157 | tokens :: HandleTeXIO m => LexerT m [Token]
tokens = concat <$> many token | 74 | tokens = concat <$> many token | 30 | true | true | 2 | 8 | 25 | 41 | 19 | 22 | null | null |
wbthomason/cv-tool | lib/CVTool/Readers.hs | bsd-3-clause | toObject cvData =
cvObject
where Object cvObject = toJSON cvData | 68 | toObject cvData =
cvObject
where Object cvObject = toJSON cvData | 68 | toObject cvData =
cvObject
where Object cvObject = toJSON cvData | 68 | false | false | 2 | 5 | 13 | 29 | 10 | 19 | null | null |
copumpkin/charm | src/Architecture/ARM/Pretty.hs | bsd-3-clause | showMemOp :: MemOp -> String
showMemOp (MemReg base (Imm 0) up) = printf "[%s]" (showRegister base) ++ if up then "!" else "" | 125 | showMemOp :: MemOp -> String
showMemOp (MemReg base (Imm 0) up) = printf "[%s]" (showRegister base) ++ if up then "!" else "" | 125 | showMemOp (MemReg base (Imm 0) up) = printf "[%s]" (showRegister base) ++ if up then "!" else "" | 96 | false | true | 0 | 9 | 22 | 57 | 29 | 28 | null | null |
nyson/haste-compiler | Tests/StaticPtr.hs | bsd-3-clause | runTest :: IO ()
runTest = do
print (staticKey (static staticPtrKeys))
print (staticKey (static runTest)) | 109 | runTest :: IO ()
runTest = do
print (staticKey (static staticPtrKeys))
print (staticKey (static runTest)) | 109 | runTest = do
print (staticKey (static staticPtrKeys))
print (staticKey (static runTest)) | 92 | false | true | 0 | 11 | 18 | 52 | 24 | 28 | null | null |
Enamex/refined | library/Refined.hs | mit | refine :: forall p x. Predicate p x => x -> Either String (Refined p x)
refine x =
maybe (Right (Refined x)) Left $
validate (undefined :: p) x | 147 | refine :: forall p x. Predicate p x => x -> Either String (Refined p x)
refine x =
maybe (Right (Refined x)) Left $
validate (undefined :: p) x | 147 | refine x =
maybe (Right (Refined x)) Left $
validate (undefined :: p) x | 75 | false | true | 0 | 11 | 33 | 84 | 40 | 44 | null | null |
massysett/penny | penny/lib/Penny/Core.hs | bsd-3-clause | postings :: Lens' (TransactionX a) (Seq (Posting a))
postings = Lens._2 . Lens._2 | 81 | postings :: Lens' (TransactionX a) (Seq (Posting a))
postings = Lens._2 . Lens._2 | 81 | postings = Lens._2 . Lens._2 | 28 | false | true | 0 | 9 | 12 | 42 | 21 | 21 | null | null |
bvdelft/parac2 | src/Language/Java/Paragon/TypeCheck/Test.hs | bsd-3-clause | testExp :: String -> IO ()
testExp str =
case parser stmtExp str of
Right e -> do res <- runTc testEnv testState $ tcExp e
print res
Left errs -> print errs | 181 | testExp :: String -> IO ()
testExp str =
case parser stmtExp str of
Right e -> do res <- runTc testEnv testState $ tcExp e
print res
Left errs -> print errs | 181 | testExp str =
case parser stmtExp str of
Right e -> do res <- runTc testEnv testState $ tcExp e
print res
Left errs -> print errs | 154 | false | true | 0 | 12 | 57 | 82 | 35 | 47 | null | null |
bergmark/clay | src/Clay/Text.hs | bsd-3-clause | lowercase = TextTransform "lowercase" | 38 | lowercase = TextTransform "lowercase" | 38 | lowercase = TextTransform "lowercase" | 38 | false | false | 0 | 5 | 4 | 9 | 4 | 5 | null | null |
erantapaa/henigma | src/Enigma/Parse.hs | bsd-3-clause | findRotor "" = return $ makeRotor letters "" | 50 | findRotor "" = return $ makeRotor letters "" | 50 | findRotor "" = return $ makeRotor letters "" | 50 | false | false | 3 | 5 | 13 | 22 | 8 | 14 | null | null |
gridaphobe/liquid-fixpoint | src/Language/Fixpoint/Smt/Bitvector.hs | bsd-3-clause | -- | Construct the bitvector `Sort` from its `BvSize`
mkSort :: BvSize -> Sort
mkSort s = fApp (fTyconSort bvTyCon) [ fTyconSort (sizeTyCon s) ] | 144 | mkSort :: BvSize -> Sort
mkSort s = fApp (fTyconSort bvTyCon) [ fTyconSort (sizeTyCon s) ] | 90 | mkSort s = fApp (fTyconSort bvTyCon) [ fTyconSort (sizeTyCon s) ] | 65 | true | true | 0 | 9 | 24 | 42 | 21 | 21 | null | null |
bsummer4/logtoy | Main.hs | mit | readLogName t = if T.all validLogNameChar t
then Just $ LogNameInternal t
else Nothing | 118 | readLogName t = if T.all validLogNameChar t
then Just $ LogNameInternal t
else Nothing | 118 | readLogName t = if T.all validLogNameChar t
then Just $ LogNameInternal t
else Nothing | 118 | false | false | 0 | 7 | 45 | 31 | 15 | 16 | null | null |
tekul/cryptonite | Crypto/ECC/Simple/Types.hs | bsd-3-clause | typeSEC_t571r1 = CurveBinary $ CurveBinaryParam 0x080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000425 | 194 | typeSEC_t571r1 = CurveBinary $ CurveBinaryParam 0x080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000425 | 194 | typeSEC_t571r1 = CurveBinary $ CurveBinaryParam 0x080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000425 | 194 | false | false | 1 | 6 | 5 | 16 | 6 | 10 | null | null |
ctford/Idris-Elba-dev | src/Idris/Core/TT.hs | bsd-3-clause | uniqueName :: Name -> [Name] -> Name
uniqueName n hs | n `elem` hs = uniqueName (nextName n) hs
| otherwise = n | 129 | uniqueName :: Name -> [Name] -> Name
uniqueName n hs | n `elem` hs = uniqueName (nextName n) hs
| otherwise = n | 129 | uniqueName n hs | n `elem` hs = uniqueName (nextName n) hs
| otherwise = n | 92 | false | true | 0 | 8 | 40 | 67 | 31 | 36 | null | null |
lexml/lexml-linker | src/main/haskell/LexML/URN/Show.hs | gpl-2.0 | prefixAll :: URNShow a => String -> [a] -> String
prefixAll prefix l = concat [ prefix ++ urnShow el | el <- l ] | 112 | prefixAll :: URNShow a => String -> [a] -> String
prefixAll prefix l = concat [ prefix ++ urnShow el | el <- l ] | 112 | prefixAll prefix l = concat [ prefix ++ urnShow el | el <- l ] | 62 | false | true | 0 | 8 | 24 | 55 | 27 | 28 | null | null |
jtapolczai/Scratchpad | src/Snake.hs | apache-2.0 | sk = Sk [(2,2),(2,3)] (2,2) | 27 | sk = Sk [(2,2),(2,3)] (2,2) | 27 | sk = Sk [(2,2),(2,3)] (2,2) | 27 | false | false | 1 | 6 | 4 | 39 | 21 | 18 | null | null |
olsner/ghc | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | emitPrimOp dflags res IndexByteArrayOp_Addr args = doIndexByteArrayOp Nothing (bWord dflags) res args | 115 | emitPrimOp dflags res IndexByteArrayOp_Addr args = doIndexByteArrayOp Nothing (bWord dflags) res args | 115 | emitPrimOp dflags res IndexByteArrayOp_Addr args = doIndexByteArrayOp Nothing (bWord dflags) res args | 115 | false | false | 0 | 7 | 25 | 34 | 14 | 20 | null | null |
DougBurke/swish | tests/RDFGraphTest.hs | lgpl-2.1 | g1uri, g2, gt2, g3, gt3, g4, g5, g6, g7, g8, g9, g10 :: RDFGraph
g1uri = toGraph [tu01] | 87 | g1uri, g2, gt2, g3, gt3, g4, g5, g6, g7, g8, g9, g10 :: RDFGraph
g1uri = toGraph [tu01] | 87 | g1uri = toGraph [tu01] | 22 | false | true | 0 | 6 | 17 | 39 | 31 | 8 | null | null |
rasendubi/mqtt-broker | src/Network/MQTT/Client/Utils.hs | bsd-3-clause | subscribe :: OutputStream ClientCommand -> [(TopicFilter, QoS)] -> IO ()
subscribe os = writeTo os . SubscribeCommand | 117 | subscribe :: OutputStream ClientCommand -> [(TopicFilter, QoS)] -> IO ()
subscribe os = writeTo os . SubscribeCommand | 117 | subscribe os = writeTo os . SubscribeCommand | 44 | false | true | 0 | 9 | 16 | 51 | 24 | 27 | null | null |
rawlep/EQS | sourceCode/GlobalParameters.hs | mit | -- | convenience function which activates a string in a combobox if it
-- exists in the given list of strigs (usually the LOS in the combo box)
update cmb str list = mWhen (G.comboBoxSetActive cmb ) $ findIndex (== str) list | 224 | update cmb str list = mWhen (G.comboBoxSetActive cmb ) $ findIndex (== str) list | 80 | update cmb str list = mWhen (G.comboBoxSetActive cmb ) $ findIndex (== str) list | 80 | true | false | 1 | 9 | 41 | 44 | 20 | 24 | null | null |
noteed/opengl-api | Text/OpenGL/Spec.hs | bsd-3-clause | pGlfflags :: P Prop
pGlfflags = Glfflags <$> (field "glfflags" *> many1 pGlfflag) <* eol | 88 | pGlfflags :: P Prop
pGlfflags = Glfflags <$> (field "glfflags" *> many1 pGlfflag) <* eol | 88 | pGlfflags = Glfflags <$> (field "glfflags" *> many1 pGlfflag) <* eol | 68 | false | true | 0 | 9 | 14 | 35 | 17 | 18 | null | null |
AngelitoJ/HsParser | src/GenericParser.hs | gpl-3.0 | processGenericFile :: FilePath -> IO ()
processGenericFile file = do
putStrLn $ show file
result <- parseFile file
case result of
Left err -> print err
Right xs -> mapM_ dumpLine xs | 233 | processGenericFile :: FilePath -> IO ()
processGenericFile file = do
putStrLn $ show file
result <- parseFile file
case result of
Left err -> print err
Right xs -> mapM_ dumpLine xs | 233 | processGenericFile file = do
putStrLn $ show file
result <- parseFile file
case result of
Left err -> print err
Right xs -> mapM_ dumpLine xs | 193 | false | true | 0 | 10 | 83 | 76 | 33 | 43 | null | null |
SRechenberger/flock | lib/Flock.hs | bsd-3-clause | -- | Returns the Angle between the direction vector
-- and the vector between the agent and another object;
--
-- ATTENTION! The angle returned is symmetrical for both sides;
-- i.e.: if the angle is, e.g., PI/2, it is either 90 Degrees on the left
-- or on the right side.
angle :: (IsObject a)
=> Agent -> a -> Angle
angle a o = angleVV (position o - position a) (_agentDirection a) | 398 | angle :: (IsObject a)
=> Agent -> a -> Angle
angle a o = angleVV (position o - position a) (_agentDirection a) | 116 | angle a o = angleVV (position o - position a) (_agentDirection a) | 65 | true | true | 0 | 8 | 87 | 63 | 34 | 29 | null | null |
noughtmare/yi | yi-frontend-pango/src/Yi/Frontend/Pango/Control.hs | gpl-2.0 | controlUnsafeWithEditor :: Config -> MVar Editor -> EditorM a -> IO a
controlUnsafeWithEditor cfg r f = modifyMVar r $ \e -> do
let (e',a) = runEditor cfg f e
-- Make sure that the result of runEditor is evaluated before
-- replacing the editor state. Otherwise, we might replace e
-- with an exception-producing thunk, which makes it impossible
-- to look at or update the editor state.
-- Maybe this could also be fixed by -fno-state-hack flag?
-- TODO: can we simplify this?
e' `seq` a `seq` return (e', a) | 525 | controlUnsafeWithEditor :: Config -> MVar Editor -> EditorM a -> IO a
controlUnsafeWithEditor cfg r f = modifyMVar r $ \e -> do
let (e',a) = runEditor cfg f e
-- Make sure that the result of runEditor is evaluated before
-- replacing the editor state. Otherwise, we might replace e
-- with an exception-producing thunk, which makes it impossible
-- to look at or update the editor state.
-- Maybe this could also be fixed by -fno-state-hack flag?
-- TODO: can we simplify this?
e' `seq` a `seq` return (e', a) | 525 | controlUnsafeWithEditor cfg r f = modifyMVar r $ \e -> do
let (e',a) = runEditor cfg f e
-- Make sure that the result of runEditor is evaluated before
-- replacing the editor state. Otherwise, we might replace e
-- with an exception-producing thunk, which makes it impossible
-- to look at or update the editor state.
-- Maybe this could also be fixed by -fno-state-hack flag?
-- TODO: can we simplify this?
e' `seq` a `seq` return (e', a) | 455 | false | true | 0 | 12 | 107 | 104 | 55 | 49 | null | null |
rodrigogribeiro/mptc | src/Language/Haskell/Exts/Pretty.hs | bsd-3-clause | fsep dl = sequence dl >>= return . P.fsep | 41 | fsep dl = sequence dl >>= return . P.fsep | 41 | fsep dl = sequence dl >>= return . P.fsep | 41 | false | false | 4 | 6 | 8 | 29 | 11 | 18 | null | null |
wherkendell/diagrams-contrib | src/Diagrams/TwoD/Path/Boolean.hs | bsd-3-clause | path2loop :: C.ClosedPath Double -> Located (Trail' Loop V2 Double)
path2loop (C.ClosedPath []) = fromSegments [] `at` origin | 125 | path2loop :: C.ClosedPath Double -> Located (Trail' Loop V2 Double)
path2loop (C.ClosedPath []) = fromSegments [] `at` origin | 125 | path2loop (C.ClosedPath []) = fromSegments [] `at` origin | 57 | false | true | 0 | 8 | 17 | 61 | 29 | 32 | null | null |
dysinger/amazonka | amazonka-ec2/gen/Network/AWS/EC2/Types.hs | mpl-2.0 | -- | The ID of the AWS account that owns the reservation.
rOwnerId :: Lens' Reservation Text
rOwnerId = lens _rOwnerId (\s a -> s { _rOwnerId = a }) | 148 | rOwnerId :: Lens' Reservation Text
rOwnerId = lens _rOwnerId (\s a -> s { _rOwnerId = a }) | 90 | rOwnerId = lens _rOwnerId (\s a -> s { _rOwnerId = a }) | 55 | true | true | 0 | 9 | 29 | 40 | 22 | 18 | null | null |
konn/leport | leport-web/Settings.hs | bsd-3-clause | -- | How static files should be combined.
combineSettings :: CombineSettings
combineSettings = def | 98 | combineSettings :: CombineSettings
combineSettings = def | 56 | combineSettings = def | 21 | true | true | 0 | 4 | 13 | 12 | 7 | 5 | null | null |
brendanhay/gogol | gogol-docs/gen/Network/Google/Docs/Types/Product.hs | mpl-2.0 | -- | The contents of the body. The indexes for the body\'s content begin at
-- zero.
bContent :: Lens' Body [StructuralElement]
bContent
= lens _bContent (\ s a -> s{_bContent = a}) .
_Default
. _Coerce | 216 | bContent :: Lens' Body [StructuralElement]
bContent
= lens _bContent (\ s a -> s{_bContent = a}) .
_Default
. _Coerce | 131 | bContent
= lens _bContent (\ s a -> s{_bContent = a}) .
_Default
. _Coerce | 88 | true | true | 0 | 11 | 50 | 54 | 29 | 25 | null | null |
PPitson/Deque | test/unit/HUnitTests.hs | bsd-3-clause | -- push front
test34 = TestCase (assertEqual "push front" [1] (toListDEQ $ pushFrontDEQ emptyDEQ 1) ) | 102 | test34 = TestCase (assertEqual "push front" [1] (toListDEQ $ pushFrontDEQ emptyDEQ 1) ) | 88 | test34 = TestCase (assertEqual "push front" [1] (toListDEQ $ pushFrontDEQ emptyDEQ 1) ) | 88 | true | false | 0 | 10 | 16 | 35 | 18 | 17 | null | null |
ambiata/mismi | mismi-ec2-core/src/Mismi/EC2/Core/Device.hs | bsd-3-clause | instanceStorage I2_8XLarge = InstanceStore 8 800 6400 SSD | 57 | instanceStorage I2_8XLarge = InstanceStore 8 800 6400 SSD | 57 | instanceStorage I2_8XLarge = InstanceStore 8 800 6400 SSD | 57 | false | false | 0 | 5 | 7 | 18 | 8 | 10 | null | null |
adamse/hindent | src/HIndent/Styles/ChrisDone.hs | bsd-3-clause | -- | We try to render everything on a flat line. More than one of the
-- arguments are not flat and it wouldn't be a single liner.
-- If the head is short we depend, otherwise we swing.
exp (App _ op a) =
do orig <- gets psIndentLevel
dependBind
(do (short,st) <- isShort f
put st
space
return short)
(\headIsShort ->
do let flats = map isFlat args
flatish =
length (filter not flats) <
2
if (headIsShort && flatish) ||
all id flats
then do ((singleLiner,overflow),st) <- sandboxNonOverflowing args
if singleLiner && not overflow
then put st
else multi orig args headIsShort
else multi orig args headIsShort)
where (f,args) = flatten op [a]
flatten :: Exp NodeInfo
-> [Exp NodeInfo]
-> (Exp NodeInfo,[Exp NodeInfo])
flatten (App _ f' a') b =
flatten f' (a' : b)
flatten f' as = (f',as)
-- | Lambdas are dependent if they can be. | 1,154 | exp (App _ op a) =
do orig <- gets psIndentLevel
dependBind
(do (short,st) <- isShort f
put st
space
return short)
(\headIsShort ->
do let flats = map isFlat args
flatish =
length (filter not flats) <
2
if (headIsShort && flatish) ||
all id flats
then do ((singleLiner,overflow),st) <- sandboxNonOverflowing args
if singleLiner && not overflow
then put st
else multi orig args headIsShort
else multi orig args headIsShort)
where (f,args) = flatten op [a]
flatten :: Exp NodeInfo
-> [Exp NodeInfo]
-> (Exp NodeInfo,[Exp NodeInfo])
flatten (App _ f' a') b =
flatten f' (a' : b)
flatten f' as = (f',as)
-- | Lambdas are dependent if they can be. | 968 | exp (App _ op a) =
do orig <- gets psIndentLevel
dependBind
(do (short,st) <- isShort f
put st
space
return short)
(\headIsShort ->
do let flats = map isFlat args
flatish =
length (filter not flats) <
2
if (headIsShort && flatish) ||
all id flats
then do ((singleLiner,overflow),st) <- sandboxNonOverflowing args
if singleLiner && not overflow
then put st
else multi orig args headIsShort
else multi orig args headIsShort)
where (f,args) = flatten op [a]
flatten :: Exp NodeInfo
-> [Exp NodeInfo]
-> (Exp NodeInfo,[Exp NodeInfo])
flatten (App _ f' a') b =
flatten f' (a' : b)
flatten f' as = (f',as)
-- | Lambdas are dependent if they can be. | 968 | true | false | 1 | 18 | 478 | 321 | 155 | 166 | null | null |
diku-kmc/repg | src/KMC/Kleenex/Parser.hs | mit | angles :: Parser a -> Parser a
angles = between (symbol "<") (symbol ">") | 73 | angles :: Parser a -> Parser a
angles = between (symbol "<") (symbol ">") | 73 | angles = between (symbol "<") (symbol ">") | 42 | false | true | 0 | 7 | 13 | 44 | 19 | 25 | null | null |
dgvncsz0f/nws | src/Jerimum/PostgreSQL/Internal.hs | bsd-3-clause | putStandbyStatusUpdate :: StreamMessage -> Put
putStandbyStatusUpdate msg = do
putWord64be (succ $ writtenLSN msg)
putWord64be (succ $ flushedLSN msg)
putWord64be (succ $ appliedLSN msg)
putInt64be $ time msg
if needReply msg
then putWord8 1
else putWord8 0 | 275 | putStandbyStatusUpdate :: StreamMessage -> Put
putStandbyStatusUpdate msg = do
putWord64be (succ $ writtenLSN msg)
putWord64be (succ $ flushedLSN msg)
putWord64be (succ $ appliedLSN msg)
putInt64be $ time msg
if needReply msg
then putWord8 1
else putWord8 0 | 275 | putStandbyStatusUpdate msg = do
putWord64be (succ $ writtenLSN msg)
putWord64be (succ $ flushedLSN msg)
putWord64be (succ $ appliedLSN msg)
putInt64be $ time msg
if needReply msg
then putWord8 1
else putWord8 0 | 228 | false | true | 0 | 11 | 54 | 102 | 44 | 58 | null | null |
ezyang/ghc | compiler/main/SysTools/Tasks.hs | bsd-3-clause | runRanlib :: DynFlags -> [Option] -> IO ()
runRanlib dflags args = do
let ranlib = pgm_ranlib dflags
runSomethingFiltered dflags id "Ranlib" ranlib args Nothing Nothing | 172 | runRanlib :: DynFlags -> [Option] -> IO ()
runRanlib dflags args = do
let ranlib = pgm_ranlib dflags
runSomethingFiltered dflags id "Ranlib" ranlib args Nothing Nothing | 172 | runRanlib dflags args = do
let ranlib = pgm_ranlib dflags
runSomethingFiltered dflags id "Ranlib" ranlib args Nothing Nothing | 129 | false | true | 0 | 11 | 29 | 67 | 30 | 37 | null | null |
bergmark/cassava | Data/Csv/Conversion.hs | bsd-3-clause | lengthMismatch :: Int -> Record -> Parser a
lengthMismatch expected v =
fail $ "cannot unpack array of length " ++
show n ++ " into a " ++ desired ++ ". Input record: " ++
show v
where
n = V.length v
desired | expected == 1 = "Only"
| expected == 2 = "pair"
| otherwise = show expected ++ "-tuple" | 347 | lengthMismatch :: Int -> Record -> Parser a
lengthMismatch expected v =
fail $ "cannot unpack array of length " ++
show n ++ " into a " ++ desired ++ ". Input record: " ++
show v
where
n = V.length v
desired | expected == 1 = "Only"
| expected == 2 = "pair"
| otherwise = show expected ++ "-tuple" | 347 | lengthMismatch expected v =
fail $ "cannot unpack array of length " ++
show n ++ " into a " ++ desired ++ ". Input record: " ++
show v
where
n = V.length v
desired | expected == 1 = "Only"
| expected == 2 = "pair"
| otherwise = show expected ++ "-tuple" | 303 | false | true | 5 | 10 | 112 | 115 | 53 | 62 | null | null |
svenkeidel/monto-broker | src/Monto/Automaton.hs | bsd-3-clause | permutations :: [a] -> [b] -> [[(a,b)]]
permutations [] _ = [[]] | 64 | permutations :: [a] -> [b] -> [[(a,b)]]
permutations [] _ = [[]] | 64 | permutations [] _ = [[]] | 24 | false | true | 0 | 11 | 11 | 55 | 29 | 26 | null | null |
ku-fpg/better-life | examples/HuttonICanvas.hs | bsd-2-clause | testGFlat = life (s50,False) glider | 35 | testGFlat = life (s50,False) glider | 35 | testGFlat = life (s50,False) glider | 35 | false | false | 0 | 6 | 4 | 17 | 9 | 8 | null | null |
brendanhay/gogol | gogol-firebase-rules/gen/Network/Google/Resource/FirebaseRules/Projects/Releases/GetExecutable.hs | mpl-2.0 | -- | V1 error format.
prgeXgafv :: Lens' ProjectsReleasesGetExecutable (Maybe Xgafv)
prgeXgafv
= lens _prgeXgafv (\ s a -> s{_prgeXgafv = a}) | 143 | prgeXgafv :: Lens' ProjectsReleasesGetExecutable (Maybe Xgafv)
prgeXgafv
= lens _prgeXgafv (\ s a -> s{_prgeXgafv = a}) | 121 | prgeXgafv
= lens _prgeXgafv (\ s a -> s{_prgeXgafv = a}) | 58 | true | true | 1 | 9 | 23 | 52 | 25 | 27 | null | null |
phischu/fragnix | benchmarks/containers/Data.Sequence.hs | bsd-3-clause | addDigits1 m1 (Four a b c d) e (Four f g h i) m2 =
appendTree3 m1 (node3 a b c) (node3 d e f) (node3 g h i) m2 | 114 | addDigits1 m1 (Four a b c d) e (Four f g h i) m2 =
appendTree3 m1 (node3 a b c) (node3 d e f) (node3 g h i) m2 | 114 | addDigits1 m1 (Four a b c d) e (Four f g h i) m2 =
appendTree3 m1 (node3 a b c) (node3 d e f) (node3 g h i) m2 | 114 | false | false | 1 | 7 | 33 | 92 | 40 | 52 | null | null |
d0kt0r0/Tidal | src/Sound/Tidal/Params.hs | gpl-3.0 | button5 :: Pattern Double -> ControlPattern
button5 = pF "button5" | 66 | button5 :: Pattern Double -> ControlPattern
button5 = pF "button5" | 66 | button5 = pF "button5" | 22 | false | true | 0 | 6 | 9 | 21 | 10 | 11 | null | null |
utwente-fmt/scoop | src/Auxiliary.hs | bsd-3-clause | thd4 (a,b,c,d) = c | 18 | thd4 (a,b,c,d) = c | 18 | thd4 (a,b,c,d) = c | 18 | false | false | 0 | 6 | 3 | 21 | 12 | 9 | null | null |
chemist/snmp | src/Network/Protocol/Snmp.hs | bsd-3-clause | setErrorStatus e (V3Packet v h (ScopedPDU a b (PDU req s))) = V3Packet v h (ScopedPDU a b (PDU req { es = e } s)) | 113 | setErrorStatus e (V3Packet v h (ScopedPDU a b (PDU req s))) = V3Packet v h (ScopedPDU a b (PDU req { es = e } s)) | 113 | setErrorStatus e (V3Packet v h (ScopedPDU a b (PDU req s))) = V3Packet v h (ScopedPDU a b (PDU req { es = e } s)) | 113 | false | false | 0 | 11 | 25 | 72 | 36 | 36 | null | null |
keithodulaigh/Hets | Static/GTheory.hs | gpl-2.0 | -- | apply a comorphism to a theory
mapG_theory :: AnyComorphism -> G_theory -> Result G_theory
mapG_theory (Comorphism cid) (G_theory lid _ (ExtSign sign _) ind1 sens ind2) =
do
bTh <- coerceBasicTheory lid (sourceLogic cid)
("unapplicable comorphism '" ++ language_name cid ++ "'\n")
(sign, toNamedList sens)
(sign', sens') <- wrapMapTheory cid bTh
return $ G_theory (targetLogic cid) Nothing (mkExtSign sign')
ind1 (toThSens sens') ind2
-- | Translation of a G_theory along a GMorphism | 514 | mapG_theory :: AnyComorphism -> G_theory -> Result G_theory
mapG_theory (Comorphism cid) (G_theory lid _ (ExtSign sign _) ind1 sens ind2) =
do
bTh <- coerceBasicTheory lid (sourceLogic cid)
("unapplicable comorphism '" ++ language_name cid ++ "'\n")
(sign, toNamedList sens)
(sign', sens') <- wrapMapTheory cid bTh
return $ G_theory (targetLogic cid) Nothing (mkExtSign sign')
ind1 (toThSens sens') ind2
-- | Translation of a G_theory along a GMorphism | 478 | mapG_theory (Comorphism cid) (G_theory lid _ (ExtSign sign _) ind1 sens ind2) =
do
bTh <- coerceBasicTheory lid (sourceLogic cid)
("unapplicable comorphism '" ++ language_name cid ++ "'\n")
(sign, toNamedList sens)
(sign', sens') <- wrapMapTheory cid bTh
return $ G_theory (targetLogic cid) Nothing (mkExtSign sign')
ind1 (toThSens sens') ind2
-- | Translation of a G_theory along a GMorphism | 418 | true | true | 0 | 13 | 99 | 165 | 80 | 85 | null | null |
TomMD/ghc | compiler/coreSyn/MkCore.hs | bsd-3-clause | chunkify :: [a] -> [[a]]
-- ^ Split a list into lists that are small enough to have a corresponding
-- tuple arity. The sub-lists of the result all have length <= 'mAX_TUPLE_SIZE'
-- But there may be more than 'mAX_TUPLE_SIZE' sub-lists
chunkify xs
| n_xs <= mAX_TUPLE_SIZE = [xs]
| otherwise = split xs
where
n_xs = length xs
split [] = []
split xs = take mAX_TUPLE_SIZE xs : split (drop mAX_TUPLE_SIZE xs)
{-
Creating tuples and their types for Core expressions
@mkBigCoreVarTup@ builds a tuple; the inverse to @mkTupleSelector@.
* If it has only one element, it is the identity function.
* If there are more elements than a big tuple can have, it nests
the tuples.
-}
-- | Build a small tuple holding the specified variables | 769 | chunkify :: [a] -> [[a]]
chunkify xs
| n_xs <= mAX_TUPLE_SIZE = [xs]
| otherwise = split xs
where
n_xs = length xs
split [] = []
split xs = take mAX_TUPLE_SIZE xs : split (drop mAX_TUPLE_SIZE xs)
{-
Creating tuples and their types for Core expressions
@mkBigCoreVarTup@ builds a tuple; the inverse to @mkTupleSelector@.
* If it has only one element, it is the identity function.
* If there are more elements than a big tuple can have, it nests
the tuples.
-}
-- | Build a small tuple holding the specified variables | 557 | chunkify xs
| n_xs <= mAX_TUPLE_SIZE = [xs]
| otherwise = split xs
where
n_xs = length xs
split [] = []
split xs = take mAX_TUPLE_SIZE xs : split (drop mAX_TUPLE_SIZE xs)
{-
Creating tuples and their types for Core expressions
@mkBigCoreVarTup@ builds a tuple; the inverse to @mkTupleSelector@.
* If it has only one element, it is the identity function.
* If there are more elements than a big tuple can have, it nests
the tuples.
-}
-- | Build a small tuple holding the specified variables | 532 | true | true | 3 | 9 | 172 | 125 | 57 | 68 | null | null |
lpeterse/koka | src/Kind/Pretty.hs | apache-2.0 | precAtom = 4 | 13 | precAtom = 4 | 13 | precAtom = 4 | 13 | false | false | 0 | 4 | 3 | 6 | 3 | 3 | null | null |
bitemyapp/ganeti | src/Ganeti/DataCollectors/Types.hs | bsd-2-clause | -- | Add the data collector status information to the JSON representation of
-- the collector data.
addStatus :: DCStatus -> JSValue -> JSValue
addStatus dcStatus (JSObject obj) =
makeObj $ ("status", showJSON dcStatus) : fromJSObject obj | 240 | addStatus :: DCStatus -> JSValue -> JSValue
addStatus dcStatus (JSObject obj) =
makeObj $ ("status", showJSON dcStatus) : fromJSObject obj | 140 | addStatus dcStatus (JSObject obj) =
makeObj $ ("status", showJSON dcStatus) : fromJSObject obj | 96 | true | true | 0 | 8 | 38 | 52 | 27 | 25 | null | null |
sdynerow/Semirings-Library | haskell/Examples/BoundedShortestPath.hs | apache-2.0 | bspExamples 4 = M (toArray 5 [ zero, BSP 2, BSP 1, zero, zero
, zero, zero, zero, BSP 1, zero
, zero, zero, zero, BSP 3, zero
, zero, zero, zero, zero, BSP 2
, zero, zero, zero, zero, zero]) | 293 | bspExamples 4 = M (toArray 5 [ zero, BSP 2, BSP 1, zero, zero
, zero, zero, zero, BSP 1, zero
, zero, zero, zero, BSP 3, zero
, zero, zero, zero, zero, BSP 2
, zero, zero, zero, zero, zero]) | 293 | bspExamples 4 = M (toArray 5 [ zero, BSP 2, BSP 1, zero, zero
, zero, zero, zero, BSP 1, zero
, zero, zero, zero, BSP 3, zero
, zero, zero, zero, zero, BSP 2
, zero, zero, zero, zero, zero]) | 293 | false | false | 0 | 9 | 143 | 110 | 64 | 46 | null | null |
mpickering/hackage-server | Distribution/Server/Features/PreferredVersions/State.hs | bsd-3-clause | ---------------
maybeBestVersion :: PreferredInfo -> [Version] -> Set Version -> Maybe (Version, Maybe VersionStatus)
maybeBestVersion info allVersions versions = if null allVersions || Set.null versions then Nothing else Just $ findBestVersion info allVersions versions | 270 | maybeBestVersion :: PreferredInfo -> [Version] -> Set Version -> Maybe (Version, Maybe VersionStatus)
maybeBestVersion info allVersions versions = if null allVersions || Set.null versions then Nothing else Just $ findBestVersion info allVersions versions | 254 | maybeBestVersion info allVersions versions = if null allVersions || Set.null versions then Nothing else Just $ findBestVersion info allVersions versions | 152 | true | true | 0 | 10 | 33 | 85 | 41 | 44 | null | null |
GrandArchTemplar/FunctionalProgramming | src/HW2.hs | mit | test41Data :: [([Integer], Int, String)]
test41Data = [
([1,2,3] , 1, "Test 4.1.1"),
([4,3,2,1] , 3, "Test 4.1.2"),
([1,2,4,5] , 1, "Test 4.1.3"),
([2,2,2] , 2, "Test 4.1.4"),
([3,1,2,5,7,6], 2, "Test 4.1.5")
] | 319 | test41Data :: [([Integer], Int, String)]
test41Data = [
([1,2,3] , 1, "Test 4.1.1"),
([4,3,2,1] , 3, "Test 4.1.2"),
([1,2,4,5] , 1, "Test 4.1.3"),
([2,2,2] , 2, "Test 4.1.4"),
([3,1,2,5,7,6], 2, "Test 4.1.5")
] | 319 | test41Data = [
([1,2,3] , 1, "Test 4.1.1"),
([4,3,2,1] , 3, "Test 4.1.2"),
([1,2,4,5] , 1, "Test 4.1.3"),
([2,2,2] , 2, "Test 4.1.4"),
([3,1,2,5,7,6], 2, "Test 4.1.5")
] | 278 | false | true | 0 | 7 | 141 | 146 | 96 | 50 | null | null |
kfish/scope | Scope/View.hs | bsd-3-clause | viewEndUTC :: Scope ui -> View ui -> Maybe UTCTime
viewEndUTC scope View{..} = dataToUTC scope viewX2 | 101 | viewEndUTC :: Scope ui -> View ui -> Maybe UTCTime
viewEndUTC scope View{..} = dataToUTC scope viewX2 | 101 | viewEndUTC scope View{..} = dataToUTC scope viewX2 | 50 | false | true | 0 | 7 | 16 | 44 | 20 | 24 | null | null |
Noeda/Megaman | src/Regex.hs | mit | compileAndExecute regex str =
case R.execute (compile regex) str of
Left msg -> error $ "Regex execution error: " ++ msg
Right Nothing -> Nothing
Right (Just matches) -> Just matches | 201 | compileAndExecute regex str =
case R.execute (compile regex) str of
Left msg -> error $ "Regex execution error: " ++ msg
Right Nothing -> Nothing
Right (Just matches) -> Just matches | 201 | compileAndExecute regex str =
case R.execute (compile regex) str of
Left msg -> error $ "Regex execution error: " ++ msg
Right Nothing -> Nothing
Right (Just matches) -> Just matches | 201 | false | false | 0 | 10 | 49 | 72 | 33 | 39 | null | null |
tonymorris/hbudget | src/Math/Budget/Interval.hs | bsd-3-clause | isOnceOffInterval ::
Interval
-> Bool
isOnceOffInterval =
(== OnceOff) | 76 | isOnceOffInterval ::
Interval
-> Bool
isOnceOffInterval =
(== OnceOff) | 76 | isOnceOffInterval =
(== OnceOff) | 34 | false | true | 0 | 7 | 14 | 22 | 11 | 11 | null | null |
projectorhq/haskell-liquid | src/Text/Liquid/Renderer.hs | bsd-3-clause | applyArrayFilterM vs (FilterCell "toSentenceWithSeparator" [QuoteString sep, QuoteString fin]) = do
(upToLast, lastElem) <- vs^?_Snoc
case null upToLast of
True -> renderv lastElem
False -> do
text <- mconcat . intersperse sep <$> renderEachArrayElem upToLast
fmap (mappend $ text <> fin) $ renderv lastElem | 331 | applyArrayFilterM vs (FilterCell "toSentenceWithSeparator" [QuoteString sep, QuoteString fin]) = do
(upToLast, lastElem) <- vs^?_Snoc
case null upToLast of
True -> renderv lastElem
False -> do
text <- mconcat . intersperse sep <$> renderEachArrayElem upToLast
fmap (mappend $ text <> fin) $ renderv lastElem | 331 | applyArrayFilterM vs (FilterCell "toSentenceWithSeparator" [QuoteString sep, QuoteString fin]) = do
(upToLast, lastElem) <- vs^?_Snoc
case null upToLast of
True -> renderv lastElem
False -> do
text <- mconcat . intersperse sep <$> renderEachArrayElem upToLast
fmap (mappend $ text <> fin) $ renderv lastElem | 331 | false | false | 0 | 16 | 66 | 120 | 55 | 65 | null | null |
kmate/HaRe | old/testing/rmOneParameter/A2_TokOut.hs | bsd-3-clause | sumSq xs ys= sum (map sq xs) + sumSquares xs | 44 | sumSq xs ys= sum (map sq xs) + sumSquares xs | 44 | sumSq xs ys= sum (map sq xs) + sumSquares xs | 44 | false | false | 0 | 8 | 9 | 30 | 13 | 17 | null | null |
nicoan/miniLogo | src/Parser.hs | gpl-3.0 | parseExp :: Parser Exp
parseExp = let numPar = do e <- parseNumExp
return (N e)
boolPar = do e <- parseBoolExp
return (B e)
numOrBool = do x <- lookAhead whatOp
case x of
"+" -> numPar
"-" -> numPar
"*" -> numPar
"/" -> numPar
"<" -> boolPar
"<=" -> boolPar
"=" -> boolPar
"=>" -> boolPar
">" -> boolPar
in try numOrBool <|> try boolPar <|> numPar | 793 | parseExp :: Parser Exp
parseExp = let numPar = do e <- parseNumExp
return (N e)
boolPar = do e <- parseBoolExp
return (B e)
numOrBool = do x <- lookAhead whatOp
case x of
"+" -> numPar
"-" -> numPar
"*" -> numPar
"/" -> numPar
"<" -> boolPar
"<=" -> boolPar
"=" -> boolPar
"=>" -> boolPar
">" -> boolPar
in try numOrBool <|> try boolPar <|> numPar | 791 | parseExp = let numPar = do e <- parseNumExp
return (N e)
boolPar = do e <- parseBoolExp
return (B e)
numOrBool = do x <- lookAhead whatOp
case x of
"+" -> numPar
"-" -> numPar
"*" -> numPar
"/" -> numPar
"<" -> boolPar
"<=" -> boolPar
"=" -> boolPar
"=>" -> boolPar
">" -> boolPar
in try numOrBool <|> try boolPar <|> numPar | 768 | false | true | 0 | 13 | 515 | 158 | 74 | 84 | null | null |
spechub/Hets | atermlib/src/ATerm/ReadWrite.hs | gpl-2.0 | abbrev :: Int -> String
abbrev i = '#' : mkAbbrev i | 51 | abbrev :: Int -> String
abbrev i = '#' : mkAbbrev i | 51 | abbrev i = '#' : mkAbbrev i | 27 | false | true | 2 | 7 | 11 | 31 | 13 | 18 | null | null |
JPMoresmau/rnn | src/AI/Network/RNN/Expr.hs | bsd-2-clause | simplify (Mul (Lit x) (Lit y)) = Lit (x*y) | 42 | simplify (Mul (Lit x) (Lit y)) = Lit (x*y) | 42 | simplify (Mul (Lit x) (Lit y)) = Lit (x*y) | 42 | false | false | 0 | 8 | 8 | 40 | 19 | 21 | null | null |
hferreiro/replay | compiler/utils/Binary.hs | bsd-3-clause | putBS :: BinHandle -> ByteString -> IO ()
putBS bh bs =
BS.unsafeUseAsCStringLen bs $ \(ptr, l) -> do
put_ bh l
let
go n | n == l = return ()
| otherwise = do
b <- peekElemOff (castPtr ptr) n
putByte bh b
go (n+1)
go 0
{- -- possible faster version, not quite there yet:
getBS bh@BinMem{} = do
(I# l) <- get bh
arr <- readIORef (arr_r bh)
off <- readFastMutInt (off_r bh)
return $! (mkFastSubBytesBA# arr off l)
-} | 503 | putBS :: BinHandle -> ByteString -> IO ()
putBS bh bs =
BS.unsafeUseAsCStringLen bs $ \(ptr, l) -> do
put_ bh l
let
go n | n == l = return ()
| otherwise = do
b <- peekElemOff (castPtr ptr) n
putByte bh b
go (n+1)
go 0
{- -- possible faster version, not quite there yet:
getBS bh@BinMem{} = do
(I# l) <- get bh
arr <- readIORef (arr_r bh)
off <- readFastMutInt (off_r bh)
return $! (mkFastSubBytesBA# arr off l)
-} | 503 | putBS bh bs =
BS.unsafeUseAsCStringLen bs $ \(ptr, l) -> do
put_ bh l
let
go n | n == l = return ()
| otherwise = do
b <- peekElemOff (castPtr ptr) n
putByte bh b
go (n+1)
go 0
{- -- possible faster version, not quite there yet:
getBS bh@BinMem{} = do
(I# l) <- get bh
arr <- readIORef (arr_r bh)
off <- readFastMutInt (off_r bh)
return $! (mkFastSubBytesBA# arr off l)
-} | 461 | false | true | 2 | 18 | 172 | 145 | 64 | 81 | null | null |
dylanmc/Haskell-PDF-Parsing-Library | Text/PDF/Document.hs | bsd-3-clause | appendPage x y = (PDFArray [(PDFError "BadCallToAppendPage with:"), x, y]) | 74 | appendPage x y = (PDFArray [(PDFError "BadCallToAppendPage with:"), x, y]) | 74 | appendPage x y = (PDFArray [(PDFError "BadCallToAppendPage with:"), x, y]) | 74 | false | false | 0 | 9 | 9 | 32 | 17 | 15 | null | null |
kwrooijen/sdl-game | End/Header/Tile.hs | gpl-3.0 | getColl 20 = Rect 12 0 8 32 | 29 | getColl 20 = Rect 12 0 8 32 | 29 | getColl 20 = Rect 12 0 8 32 | 29 | false | false | 0 | 5 | 9 | 18 | 8 | 10 | null | null |
massysett/multiarg | tests/Telly/Tests.hs | bsd-3-clause | tests :: TestTree
tests = $(testGroupGenerator) | 47 | tests :: TestTree
tests = $(testGroupGenerator) | 47 | tests = $(testGroupGenerator) | 29 | false | true | 0 | 6 | 5 | 15 | 8 | 7 | null | null |
AubreyEAnderson/shellcheck | ShellCheck/Analytics.hs | gpl-3.0 | checkArrayWithoutIndex params _ =
concat $ doVariableFlowAnalysis readF writeF Map.empty (variableFlow params)
where
readF _ (T_DollarBraced id token) _ = do
map <- get
return . maybeToList $ do
name <- getLiteralString token
assignment <- Map.lookup name map
return [makeComment WarningC id 2128
"Expanding an array without an index only gives the first element."]
readF _ _ _ = return []
writeF _ t name (DataArray _) = do
modify (Map.insert name t)
return []
writeF _ expr name _ = do
if isIndexed expr
then modify (Map.insert name expr)
else modify (Map.delete name)
return []
isIndexed expr =
case expr of
T_Assignment _ _ _ (Just _) _ -> True
_ -> False | 843 | checkArrayWithoutIndex params _ =
concat $ doVariableFlowAnalysis readF writeF Map.empty (variableFlow params)
where
readF _ (T_DollarBraced id token) _ = do
map <- get
return . maybeToList $ do
name <- getLiteralString token
assignment <- Map.lookup name map
return [makeComment WarningC id 2128
"Expanding an array without an index only gives the first element."]
readF _ _ _ = return []
writeF _ t name (DataArray _) = do
modify (Map.insert name t)
return []
writeF _ expr name _ = do
if isIndexed expr
then modify (Map.insert name expr)
else modify (Map.delete name)
return []
isIndexed expr =
case expr of
T_Assignment _ _ _ (Just _) _ -> True
_ -> False | 843 | checkArrayWithoutIndex params _ =
concat $ doVariableFlowAnalysis readF writeF Map.empty (variableFlow params)
where
readF _ (T_DollarBraced id token) _ = do
map <- get
return . maybeToList $ do
name <- getLiteralString token
assignment <- Map.lookup name map
return [makeComment WarningC id 2128
"Expanding an array without an index only gives the first element."]
readF _ _ _ = return []
writeF _ t name (DataArray _) = do
modify (Map.insert name t)
return []
writeF _ expr name _ = do
if isIndexed expr
then modify (Map.insert name expr)
else modify (Map.delete name)
return []
isIndexed expr =
case expr of
T_Assignment _ _ _ (Just _) _ -> True
_ -> False | 843 | false | false | 8 | 13 | 297 | 293 | 127 | 166 | null | null |
vbalalla/financial_contract_language | calender-new.hs | mit | -- European option
european :: Time -> Currency -> Terms -> Terms
european t c u = when (at t) (u `DSL.or` Zero) | 112 | european :: Time -> Currency -> Terms -> Terms
european t c u = when (at t) (u `DSL.or` Zero) | 93 | european t c u = when (at t) (u `DSL.or` Zero) | 46 | true | true | 0 | 7 | 22 | 53 | 28 | 25 | null | null |
fffej/HS-Poker | LookupPatternMatch.hs | bsd-3-clause | getValueFromProduct 25382 = 2224 | 32 | getValueFromProduct 25382 = 2224 | 32 | getValueFromProduct 25382 = 2224 | 32 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
ProLambda/Times | Skeleton/Kernel/Core/Mail.hs | gpl-3.0 | renderHtml' :: EleM
-> String
renderHtml' (id, title, host, star) = printf
"<tr>\
\<td>%d</td>\
\<td><a href='http://sapphiresoft.io/disqus?uniqueid=%s'> %s </a></td>\
\<td>%s</td>\
\</tr>"
star id title host | 453 | renderHtml' :: EleM
-> String
renderHtml' (id, title, host, star) = printf
"<tr>\
\<td>%d</td>\
\<td><a href='http://sapphiresoft.io/disqus?uniqueid=%s'> %s </a></td>\
\<td>%s</td>\
\</tr>"
star id title host | 453 | renderHtml' (id, title, host, star) = printf
"<tr>\
\<td>%d</td>\
\<td><a href='http://sapphiresoft.io/disqus?uniqueid=%s'> %s </a></td>\
\<td>%s</td>\
\</tr>"
star id title host | 411 | false | true | 0 | 8 | 268 | 46 | 23 | 23 | null | null |
fpco/stackage-server | src/Handler/Blog.hs | mit | getBlogFeedR :: Handler TypedContent
getBlogFeedR = do
cacheSeconds 3600
posts <- fmap (take 10) getPosts
latest <- maybe notFound return $ headMay posts
newsFeed
Feed
{ feedTitle = "Stackage Curator blog"
, feedLinkSelf = BlogFeedR
, feedLinkHome = HomeR
, feedAuthor = "The Stackage Curator team"
, feedDescription = "Messages from the Stackage Curators about the Stackage project"
, feedLanguage = "en"
, feedUpdated = postTime latest
, feedLogo = Nothing
, feedEntries = map toEntry $ toList posts
}
where
toEntry post =
FeedEntry
{ feedEntryLink = BlogPostR (postYear post) (postMonth post) (postSlug post)
, feedEntryUpdated = postTime post
, feedEntryTitle = postTitle post
, feedEntryContent = postBody post
, feedEntryEnclosure = Nothing
, feedEntryCategories = []
} | 1,017 | getBlogFeedR :: Handler TypedContent
getBlogFeedR = do
cacheSeconds 3600
posts <- fmap (take 10) getPosts
latest <- maybe notFound return $ headMay posts
newsFeed
Feed
{ feedTitle = "Stackage Curator blog"
, feedLinkSelf = BlogFeedR
, feedLinkHome = HomeR
, feedAuthor = "The Stackage Curator team"
, feedDescription = "Messages from the Stackage Curators about the Stackage project"
, feedLanguage = "en"
, feedUpdated = postTime latest
, feedLogo = Nothing
, feedEntries = map toEntry $ toList posts
}
where
toEntry post =
FeedEntry
{ feedEntryLink = BlogPostR (postYear post) (postMonth post) (postSlug post)
, feedEntryUpdated = postTime post
, feedEntryTitle = postTitle post
, feedEntryContent = postBody post
, feedEntryEnclosure = Nothing
, feedEntryCategories = []
} | 1,017 | getBlogFeedR = do
cacheSeconds 3600
posts <- fmap (take 10) getPosts
latest <- maybe notFound return $ headMay posts
newsFeed
Feed
{ feedTitle = "Stackage Curator blog"
, feedLinkSelf = BlogFeedR
, feedLinkHome = HomeR
, feedAuthor = "The Stackage Curator team"
, feedDescription = "Messages from the Stackage Curators about the Stackage project"
, feedLanguage = "en"
, feedUpdated = postTime latest
, feedLogo = Nothing
, feedEntries = map toEntry $ toList posts
}
where
toEntry post =
FeedEntry
{ feedEntryLink = BlogPostR (postYear post) (postMonth post) (postSlug post)
, feedEntryUpdated = postTime post
, feedEntryTitle = postTitle post
, feedEntryContent = postBody post
, feedEntryEnclosure = Nothing
, feedEntryCategories = []
} | 980 | false | true | 0 | 11 | 360 | 216 | 115 | 101 | null | null |
siddhanathan/ghc | compiler/ghci/ByteCodeAsm.hs | bsd-3-clause | return_ubx P = bci_RETURN_P | 29 | return_ubx P = bci_RETURN_P | 29 | return_ubx P = bci_RETURN_P | 29 | false | false | 1 | 5 | 5 | 13 | 4 | 9 | null | null |
vizziv/qsim | src/Simulate.hs | bsd-3-clause | fg :: Traversal' (Env job) (KeyVal Grade (Heap (Future Grade) job))
fg = framesq . _Just . foreground | 101 | fg :: Traversal' (Env job) (KeyVal Grade (Heap (Future Grade) job))
fg = framesq . _Just . foreground | 101 | fg = framesq . _Just . foreground | 33 | false | true | 2 | 11 | 17 | 56 | 26 | 30 | null | null |
hamishmack/haskell-gi | lib/Data/GI/GIR/Arg.hs | lgpl-2.1 | parseDirection :: Text -> Parser Direction
parseDirection "in" = return DirectionIn | 83 | parseDirection :: Text -> Parser Direction
parseDirection "in" = return DirectionIn | 83 | parseDirection "in" = return DirectionIn | 40 | false | true | 0 | 6 | 10 | 24 | 11 | 13 | null | null |
robeverest/accelerate | Data/Array/Accelerate/Trafo/Algebra.hs | bsd-3-clause | evalSin :: Elt a => FloatingType a -> a :-> a
evalSin ty | FloatingDict <- floatingDict ty = eval1 sin | 102 | evalSin :: Elt a => FloatingType a -> a :-> a
evalSin ty | FloatingDict <- floatingDict ty = eval1 sin | 102 | evalSin ty | FloatingDict <- floatingDict ty = eval1 sin | 56 | false | true | 0 | 9 | 20 | 48 | 21 | 27 | null | null |
uwap/Idris-dev | src/Idris/Reflection.hs | bsd-3-clause | reifyRawApp t [n, b, x]
| t == reflm "RBind" = do n' <- reifyTTName n
b' <- reifyTTBinder reifyRaw (reflm "Raw") b
x' <- reifyRaw x
return $ RBind n' b' x' | 281 | reifyRawApp t [n, b, x]
| t == reflm "RBind" = do n' <- reifyTTName n
b' <- reifyTTBinder reifyRaw (reflm "Raw") b
x' <- reifyRaw x
return $ RBind n' b' x' | 281 | reifyRawApp t [n, b, x]
| t == reflm "RBind" = do n' <- reifyTTName n
b' <- reifyTTBinder reifyRaw (reflm "Raw") b
x' <- reifyRaw x
return $ RBind n' b' x' | 281 | false | false | 0 | 11 | 158 | 87 | 39 | 48 | null | null |
adjoint-io/datetime | src/Datetime/Types.hs | apache-2.0 | -- | Alter the Datetime timezone using logic from Data.Hourglass
alterTimezone :: TimezoneOffset -> Datetime -> Datetime
alterTimezone tz = dateTimeToDatetime tz . datetimeToDateTime | 182 | alterTimezone :: TimezoneOffset -> Datetime -> Datetime
alterTimezone tz = dateTimeToDatetime tz . datetimeToDateTime | 117 | alterTimezone tz = dateTimeToDatetime tz . datetimeToDateTime | 61 | true | true | 0 | 6 | 23 | 30 | 15 | 15 | null | null |
massysett/dapi | dapi.hs | bsd-3-clause | pRelative :: Parser Relative
pRelative
= RRelDay <$> P.try pRelDay
<|> RDayOfWeek <$> P.try pRelDayOfWeek
<|> RByUnit <$> P.try pRelByUnit | 144 | pRelative :: Parser Relative
pRelative
= RRelDay <$> P.try pRelDay
<|> RDayOfWeek <$> P.try pRelDayOfWeek
<|> RByUnit <$> P.try pRelByUnit | 144 | pRelative
= RRelDay <$> P.try pRelDay
<|> RDayOfWeek <$> P.try pRelDayOfWeek
<|> RByUnit <$> P.try pRelByUnit | 115 | false | true | 12 | 6 | 25 | 63 | 28 | 35 | null | null |
rwbarton/rw | Crawl/Equipment.hs | bsd-3-clause | baseEVP ARM_PLATE_ARMOUR = 6 | 28 | baseEVP ARM_PLATE_ARMOUR = 6 | 28 | baseEVP ARM_PLATE_ARMOUR = 6 | 28 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
vladimir-ipatov/ganeti | src/Ganeti/Constants.hs | gpl-2.0 | qrJob :: String
qrJob = "job" | 29 | qrJob :: String
qrJob = "job" | 29 | qrJob = "job" | 13 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
bgwines/filediff | src/Filediff.hs | bsd-3-clause | diffLists :: forall a. (Eq a) => [a] -> [a] -> ListDiff a
diffLists a b = ListDiff
(map (\i -> (i, a !! i)) $ nonSubsequenceIndices common a)
(getProgressiveIndicesToAdd common b)
where
common :: [a]
common = longestCommonSubsequenceWrapper a b
-- | > λ add
-- > [(0,"w"),(3,"x"),(4,"y")]
-- > λ common
-- > ["a","b","e"]
getProgressiveIndicesToAdd :: [a] -> [a] -> [(Int, a)]
getProgressiveIndicesToAdd sub super =
map (\i -> (i, super !! i)) $ nonSubsequenceIndices sub super
-- | Applies a list diff. For example,
--
-- > ListDiff {dels = [(2,'c'),(3,'d'),(5,'f'),(6,'g')], adds = [(0,'w'),(3,'x'),(4,'y'),(5,'z')]}
-- > λ applyListDiff it "abcdefg"
-- > Right "wabxyze"
--
-- Returns a fail state if the diff cannot be applied. This can happen
-- for two reasons: first, the diff calls for a deletion at an index
-- but the element at that index doesn't match the element believed by
-- the to be diff at that index. Second, it can happen if the diff calls
-- for an element to be added at an index too large for the given input.
-- Here are respective examples of inputs that would trigger this case:
--
-- > let base = "abcdefg"
-- > let faultyBase = "ab*defg"
-- > let comp = "wabxyze"
-- > let listDiff = F.diffLists base comp
-- > F.applyListDiff listDiff faultyBase -- fails
--
-- and
--
-- > let base = "abcdefg"
-- > let faultyBase = "abcde"
-- > let comp = "wabxyzefgq"
-- > let listDiff = F.diffLists base comp
-- > F.applyListDiff listDiff faultyBase -- fails | 1,628 | diffLists :: forall a. (Eq a) => [a] -> [a] -> ListDiff a
diffLists a b = ListDiff
(map (\i -> (i, a !! i)) $ nonSubsequenceIndices common a)
(getProgressiveIndicesToAdd common b)
where
common :: [a]
common = longestCommonSubsequenceWrapper a b
-- | > λ add
-- > [(0,"w"),(3,"x"),(4,"y")]
-- > λ common
-- > ["a","b","e"]
getProgressiveIndicesToAdd :: [a] -> [a] -> [(Int, a)]
getProgressiveIndicesToAdd sub super =
map (\i -> (i, super !! i)) $ nonSubsequenceIndices sub super
-- | Applies a list diff. For example,
--
-- > ListDiff {dels = [(2,'c'),(3,'d'),(5,'f'),(6,'g')], adds = [(0,'w'),(3,'x'),(4,'y'),(5,'z')]}
-- > λ applyListDiff it "abcdefg"
-- > Right "wabxyze"
--
-- Returns a fail state if the diff cannot be applied. This can happen
-- for two reasons: first, the diff calls for a deletion at an index
-- but the element at that index doesn't match the element believed by
-- the to be diff at that index. Second, it can happen if the diff calls
-- for an element to be added at an index too large for the given input.
-- Here are respective examples of inputs that would trigger this case:
--
-- > let base = "abcdefg"
-- > let faultyBase = "ab*defg"
-- > let comp = "wabxyze"
-- > let listDiff = F.diffLists base comp
-- > F.applyListDiff listDiff faultyBase -- fails
--
-- and
--
-- > let base = "abcdefg"
-- > let faultyBase = "abcde"
-- > let comp = "wabxyzefgq"
-- > let listDiff = F.diffLists base comp
-- > F.applyListDiff listDiff faultyBase -- fails | 1,628 | diffLists a b = ListDiff
(map (\i -> (i, a !! i)) $ nonSubsequenceIndices common a)
(getProgressiveIndicesToAdd common b)
where
common :: [a]
common = longestCommonSubsequenceWrapper a b
-- | > λ add
-- > [(0,"w"),(3,"x"),(4,"y")]
-- > λ common
-- > ["a","b","e"]
getProgressiveIndicesToAdd :: [a] -> [a] -> [(Int, a)]
getProgressiveIndicesToAdd sub super =
map (\i -> (i, super !! i)) $ nonSubsequenceIndices sub super
-- | Applies a list diff. For example,
--
-- > ListDiff {dels = [(2,'c'),(3,'d'),(5,'f'),(6,'g')], adds = [(0,'w'),(3,'x'),(4,'y'),(5,'z')]}
-- > λ applyListDiff it "abcdefg"
-- > Right "wabxyze"
--
-- Returns a fail state if the diff cannot be applied. This can happen
-- for two reasons: first, the diff calls for a deletion at an index
-- but the element at that index doesn't match the element believed by
-- the to be diff at that index. Second, it can happen if the diff calls
-- for an element to be added at an index too large for the given input.
-- Here are respective examples of inputs that would trigger this case:
--
-- > let base = "abcdefg"
-- > let faultyBase = "ab*defg"
-- > let comp = "wabxyze"
-- > let listDiff = F.diffLists base comp
-- > F.applyListDiff listDiff faultyBase -- fails
--
-- and
--
-- > let base = "abcdefg"
-- > let faultyBase = "abcde"
-- > let comp = "wabxyzefgq"
-- > let listDiff = F.diffLists base comp
-- > F.applyListDiff listDiff faultyBase -- fails | 1,570 | false | true | 0 | 11 | 417 | 223 | 130 | 93 | null | null |
ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/enumFrom_4.hs | mit | primMulNat (Succ x) (Succ y) = primPlusNat (primMulNat x (Succ y)) (Succ y) | 75 | primMulNat (Succ x) (Succ y) = primPlusNat (primMulNat x (Succ y)) (Succ y) | 75 | primMulNat (Succ x) (Succ y) = primPlusNat (primMulNat x (Succ y)) (Succ y) | 75 | false | false | 0 | 9 | 12 | 48 | 23 | 25 | null | null |
thomie/vector | Data/Vector/Primitive/Mutable.hs | bsd-3-clause | overlaps = G.overlaps | 21 | overlaps = G.overlaps | 21 | overlaps = G.overlaps | 21 | false | false | 0 | 5 | 2 | 8 | 4 | 4 | null | null |
riwsky/wiwinwlh | src/uniplate.hs | mit | simplify :: Expr a -> Expr a
simplify = transform simp
where
simp (Not (Not f)) = f
simp (Not Fls) = Tru
simp (Not Tru) = Fls
simp x = x | 149 | simplify :: Expr a -> Expr a
simplify = transform simp
where
simp (Not (Not f)) = f
simp (Not Fls) = Tru
simp (Not Tru) = Fls
simp x = x | 149 | simplify = transform simp
where
simp (Not (Not f)) = f
simp (Not Fls) = Tru
simp (Not Tru) = Fls
simp x = x | 120 | false | true | 0 | 8 | 44 | 86 | 40 | 46 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.