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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
jlouis/combinatorrent | src/Protocol/BCode.hs | bsd-2-clause | extendedP :: BCode -> Maybe Word16
extendedP = fmap fromIntegral . searchInt "p" | 80 | extendedP :: BCode -> Maybe Word16
extendedP = fmap fromIntegral . searchInt "p" | 80 | extendedP = fmap fromIntegral . searchInt "p" | 45 | false | true | 0 | 6 | 12 | 28 | 13 | 15 | null | null |
jcsaenzcarrasco/MPhil-thesis | Graphs.hs | mit | fillEdges :: Int -> Int -> Int -> [Edge]
fillEdges v e seed = fillAux (zip [1..(v-1)] [2..v]) (mergesort (<) xs)
where
xs = randomEdges v e seed
fillAux [] ys = []
fillAux xs [] = if null xs then []
else tail xs
fillAux xxs@(x:xs) yys@(y:ys)
| fst x == fst y = y : fillAux xxs ys
| (fst y - fst x) == 1 = y : fillAux xs ys
| otherwise =
if null xs then fillAux [] ys
else head xs: fillAux xs yys | 513 | fillEdges :: Int -> Int -> Int -> [Edge]
fillEdges v e seed = fillAux (zip [1..(v-1)] [2..v]) (mergesort (<) xs)
where
xs = randomEdges v e seed
fillAux [] ys = []
fillAux xs [] = if null xs then []
else tail xs
fillAux xxs@(x:xs) yys@(y:ys)
| fst x == fst y = y : fillAux xxs ys
| (fst y - fst x) == 1 = y : fillAux xs ys
| otherwise =
if null xs then fillAux [] ys
else head xs: fillAux xs yys | 513 | fillEdges v e seed = fillAux (zip [1..(v-1)] [2..v]) (mergesort (<) xs)
where
xs = randomEdges v e seed
fillAux [] ys = []
fillAux xs [] = if null xs then []
else tail xs
fillAux xxs@(x:xs) yys@(y:ys)
| fst x == fst y = y : fillAux xxs ys
| (fst y - fst x) == 1 = y : fillAux xs ys
| otherwise =
if null xs then fillAux [] ys
else head xs: fillAux xs yys | 472 | false | true | 3 | 11 | 207 | 289 | 132 | 157 | null | null |
chriseidhof/persist | src/Data/Persist/TypeCheck.hs | bsd-3-clause | typecheck :: [Either Decl Relationship] -> Err ()
typecheck schema = do let (decls, rels) = partitionEithers schema
checkNoRecursion decls
checkTypesAreBetweenDeclDatatypes decls rels
return ()
-- TODO: implement these:
-- | 289 | typecheck :: [Either Decl Relationship] -> Err ()
typecheck schema = do let (decls, rels) = partitionEithers schema
checkNoRecursion decls
checkTypesAreBetweenDeclDatatypes decls rels
return ()
-- TODO: implement these:
-- | 289 | typecheck schema = do let (decls, rels) = partitionEithers schema
checkNoRecursion decls
checkTypesAreBetweenDeclDatatypes decls rels
return ()
-- TODO: implement these:
-- | 239 | false | true | 0 | 11 | 96 | 78 | 35 | 43 | null | null |
wangbj/haskell | nicetre.hs | bsd-2-clause | valid = do
d <- preorder
eof
return d | 43 | valid = do
d <- preorder
eof
return d | 43 | valid = do
d <- preorder
eof
return d | 43 | false | false | 0 | 7 | 14 | 22 | 9 | 13 | null | null |
WraithM/peertrader-backend | src/PeerTrader/Route/User.hs | bsd-3-clause | sendVerifyEmail :: UserLogin -> T.Text -> AppHandler ()
sendVerifyEmail login verifyCode = do
Just url <- fmap T.decodeUtf8 <$> getParam "url"
let verifyUrl = url
<> "/verifynewuser?verifycode=" <> verifyCode
<> "&email=" <> login
keys <- with awsKeys get
void $ liftIO $ forkIO $ do
let mail = flip runReaderT keys $
sendEmailBlaze [userEmail] subject (body verifyUrl)
void $ waitCatch =<< async mail -- TODO Log error
where
subject = "PeerTrader Registration Verification"
userEmail = L.fromStrict $ T.encodeUtf8 login
body verifyUrl = H.html $ H.body $ do
H.h3 "To verify and login to your new PeerTrader account, follow this link: "
H.a H.! A.href (textValue verifyUrl) $ "Click here to verify your account"
H.br
H.p "If you did not register with PeerTrader, you can safely ignore this email."
H.p "Best regards,"
H.p "PeerTrader team [email protected]"
-- | Test if verifycode is equal to what's in the database.
-- Create a new user if they are verified. | 1,101 | sendVerifyEmail :: UserLogin -> T.Text -> AppHandler ()
sendVerifyEmail login verifyCode = do
Just url <- fmap T.decodeUtf8 <$> getParam "url"
let verifyUrl = url
<> "/verifynewuser?verifycode=" <> verifyCode
<> "&email=" <> login
keys <- with awsKeys get
void $ liftIO $ forkIO $ do
let mail = flip runReaderT keys $
sendEmailBlaze [userEmail] subject (body verifyUrl)
void $ waitCatch =<< async mail -- TODO Log error
where
subject = "PeerTrader Registration Verification"
userEmail = L.fromStrict $ T.encodeUtf8 login
body verifyUrl = H.html $ H.body $ do
H.h3 "To verify and login to your new PeerTrader account, follow this link: "
H.a H.! A.href (textValue verifyUrl) $ "Click here to verify your account"
H.br
H.p "If you did not register with PeerTrader, you can safely ignore this email."
H.p "Best regards,"
H.p "PeerTrader team [email protected]"
-- | Test if verifycode is equal to what's in the database.
-- Create a new user if they are verified. | 1,101 | sendVerifyEmail login verifyCode = do
Just url <- fmap T.decodeUtf8 <$> getParam "url"
let verifyUrl = url
<> "/verifynewuser?verifycode=" <> verifyCode
<> "&email=" <> login
keys <- with awsKeys get
void $ liftIO $ forkIO $ do
let mail = flip runReaderT keys $
sendEmailBlaze [userEmail] subject (body verifyUrl)
void $ waitCatch =<< async mail -- TODO Log error
where
subject = "PeerTrader Registration Verification"
userEmail = L.fromStrict $ T.encodeUtf8 login
body verifyUrl = H.html $ H.body $ do
H.h3 "To verify and login to your new PeerTrader account, follow this link: "
H.a H.! A.href (textValue verifyUrl) $ "Click here to verify your account"
H.br
H.p "If you did not register with PeerTrader, you can safely ignore this email."
H.p "Best regards,"
H.p "PeerTrader team [email protected]"
-- | Test if verifycode is equal to what's in the database.
-- Create a new user if they are verified. | 1,045 | false | true | 0 | 16 | 291 | 263 | 121 | 142 | null | null |
patperry/hs-ieee754 | tests/Tests.hs | bsd-3-clause | test_succIEEE_pos_denorm_D1 = succIEEE (minNormal*(1-epsilon)) @?= (minNormal :: D) | 83 | test_succIEEE_pos_denorm_D1 = succIEEE (minNormal*(1-epsilon)) @?= (minNormal :: D) | 83 | test_succIEEE_pos_denorm_D1 = succIEEE (minNormal*(1-epsilon)) @?= (minNormal :: D) | 83 | false | false | 0 | 10 | 7 | 33 | 18 | 15 | null | null |
siddhanathan/ghc | compiler/basicTypes/DataCon.hs | bsd-3-clause | -- | Both the universal and existentiatial type variables of the constructor
dataConAllTyVars :: DataCon -> [TyVar]
dataConAllTyVars (MkData { dcUnivTyVars = univ_tvs, dcExTyVars = ex_tvs })
= univ_tvs ++ ex_tvs | 213 | dataConAllTyVars :: DataCon -> [TyVar]
dataConAllTyVars (MkData { dcUnivTyVars = univ_tvs, dcExTyVars = ex_tvs })
= univ_tvs ++ ex_tvs | 136 | dataConAllTyVars (MkData { dcUnivTyVars = univ_tvs, dcExTyVars = ex_tvs })
= univ_tvs ++ ex_tvs | 97 | true | true | 0 | 9 | 32 | 44 | 25 | 19 | null | null |
trianglesphere/hcas | src/Lexer.hs | agpl-3.0 | -- | Turns a single char into a Lexeme.
lexChar :: Char -> Lexeme
lexChar a | [a] == show Addition = Opr $ LexOp Addition
| [a] == show Multiplication = Opr $ LexOp Multiplication
| [a] == show Division = Opr $ LexBOp Division
| [a] == show Subtraction = Opr $ LexBOp Subtraction
| [a] == show Exp = Opr $ LexBOp Exp
| [a] == show Factorial = Opr $ LexUOp Factorial
| [a] == show OpenParen = OpenParen
| [a] == show CloseParen = CloseParen
| otherwise = error $ "Unknown token: " ++ [a] | 641 | lexChar :: Char -> Lexeme
lexChar a | [a] == show Addition = Opr $ LexOp Addition
| [a] == show Multiplication = Opr $ LexOp Multiplication
| [a] == show Division = Opr $ LexBOp Division
| [a] == show Subtraction = Opr $ LexBOp Subtraction
| [a] == show Exp = Opr $ LexBOp Exp
| [a] == show Factorial = Opr $ LexUOp Factorial
| [a] == show OpenParen = OpenParen
| [a] == show CloseParen = CloseParen
| otherwise = error $ "Unknown token: " ++ [a] | 601 | lexChar a | [a] == show Addition = Opr $ LexOp Addition
| [a] == show Multiplication = Opr $ LexOp Multiplication
| [a] == show Division = Opr $ LexBOp Division
| [a] == show Subtraction = Opr $ LexBOp Subtraction
| [a] == show Exp = Opr $ LexBOp Exp
| [a] == show Factorial = Opr $ LexUOp Factorial
| [a] == show OpenParen = OpenParen
| [a] == show CloseParen = CloseParen
| otherwise = error $ "Unknown token: " ++ [a] | 575 | true | true | 14 | 9 | 254 | 246 | 111 | 135 | null | null |
AdityaKumarRavikanti/Boxes | app/Main.hs | mit | main = do
let key = "1hIEq4AAauzI8INelQRIvgxBhmzX44qAB_1QQpFJQ2Xo"
let doc = "od6"
let firstDocument = access key doc clientid clientsecret
runAPI $ do
sheet1 <- firstDocument
rows <- find (Query (Select everyting sheet1) 0 0 (Order (p "category") False))
-- insert toInsert sheet1
io (mapM_ print rows) | 353 | main = do
let key = "1hIEq4AAauzI8INelQRIvgxBhmzX44qAB_1QQpFJQ2Xo"
let doc = "od6"
let firstDocument = access key doc clientid clientsecret
runAPI $ do
sheet1 <- firstDocument
rows <- find (Query (Select everyting sheet1) 0 0 (Order (p "category") False))
-- insert toInsert sheet1
io (mapM_ print rows) | 353 | main = do
let key = "1hIEq4AAauzI8INelQRIvgxBhmzX44qAB_1QQpFJQ2Xo"
let doc = "od6"
let firstDocument = access key doc clientid clientsecret
runAPI $ do
sheet1 <- firstDocument
rows <- find (Query (Select everyting sheet1) 0 0 (Order (p "category") False))
-- insert toInsert sheet1
io (mapM_ print rows) | 353 | false | false | 3 | 9 | 95 | 94 | 49 | 45 | null | null |
snoyberg/ghc | compiler/types/Type.hs | bsd-3-clause | tyBinderType (Anon ty) = ty | 29 | tyBinderType (Anon ty) = ty | 29 | tyBinderType (Anon ty) = ty | 29 | false | false | 0 | 6 | 6 | 16 | 7 | 9 | null | null |
brendanhay/gogol | gogol-android-publisher/gen/Network/Google/AndroidPublisher/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'SubscriptionPriceChange' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'spcState'
--
-- * 'spcNewPrice'
subscriptionPriceChange
:: SubscriptionPriceChange
subscriptionPriceChange =
SubscriptionPriceChange' {_spcState = Nothing, _spcNewPrice = Nothing} | 369 | subscriptionPriceChange
:: SubscriptionPriceChange
subscriptionPriceChange =
SubscriptionPriceChange' {_spcState = Nothing, _spcNewPrice = Nothing} | 153 | subscriptionPriceChange =
SubscriptionPriceChange' {_spcState = Nothing, _spcNewPrice = Nothing} | 98 | true | true | 1 | 7 | 55 | 36 | 22 | 14 | null | null |
facebookincubator/duckling | Duckling/Rules/BG.hs | bsd-3-clause | langRules (Seal RegexMatch) = [] | 32 | langRules (Seal RegexMatch) = [] | 32 | langRules (Seal RegexMatch) = [] | 32 | false | false | 0 | 7 | 4 | 17 | 8 | 9 | null | null |
cpettitt/tamien | Tamien/Core/Parser.hs | mit | angles = PT.angles lexer | 28 | angles = PT.angles lexer | 28 | angles = PT.angles lexer | 28 | false | false | 1 | 6 | 7 | 14 | 5 | 9 | null | null |
lpeterse/koka | src/Type/InferMonad.hs | apache-2.0 | ppOr :: Pretty.Env -> [Name] -> Doc
ppOr env [] = empty | 59 | ppOr :: Pretty.Env -> [Name] -> Doc
ppOr env [] = empty | 59 | ppOr env [] = empty | 23 | false | true | 0 | 7 | 15 | 36 | 17 | 19 | null | null |
deech/fltkhs | scripts/header-to-function-definition.hs | mit | castIfNecessary argument = "(static_cast<" ++ realArgumentType argument ++ "*>" ++ "(" ++ argumentName argument ++ "))" | 119 | castIfNecessary argument = "(static_cast<" ++ realArgumentType argument ++ "*>" ++ "(" ++ argumentName argument ++ "))" | 119 | castIfNecessary argument = "(static_cast<" ++ realArgumentType argument ++ "*>" ++ "(" ++ argumentName argument ++ "))" | 119 | false | false | 0 | 10 | 15 | 35 | 16 | 19 | null | null |
kajigor/uKanren_transformations | test/OCanrenizeTest.hs | bsd-3-clause | runTest name goal = do
PT.runTestSimplified name goal
toOCanren (name ++ ".ml") name Nothing $ residualize $ drive goal | 123 | runTest name goal = do
PT.runTestSimplified name goal
toOCanren (name ++ ".ml") name Nothing $ residualize $ drive goal | 123 | runTest name goal = do
PT.runTestSimplified name goal
toOCanren (name ++ ".ml") name Nothing $ residualize $ drive goal | 123 | false | false | 0 | 11 | 22 | 50 | 22 | 28 | null | null |
limaner2002/EPC-tools | RapidFire/src/Appian/Lens.hs | bsd-3-clause | gridWidgetHeaders :: (Applicative f, AsValue t) => (Text -> f Text) -> t -> f t
gridWidgetHeaders = key "columnHeaders" . plate . key "contents" . plate . key "label" . _String | 176 | gridWidgetHeaders :: (Applicative f, AsValue t) => (Text -> f Text) -> t -> f t
gridWidgetHeaders = key "columnHeaders" . plate . key "contents" . plate . key "label" . _String | 176 | gridWidgetHeaders = key "columnHeaders" . plate . key "contents" . plate . key "label" . _String | 96 | false | true | 0 | 10 | 31 | 76 | 37 | 39 | null | null |
GaloisInc/halvm-ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | numClassKey = mkPreludeClassUnique 11 | 49 | numClassKey = mkPreludeClassUnique 11 | 49 | numClassKey = mkPreludeClassUnique 11 | 49 | false | false | 1 | 5 | 15 | 12 | 4 | 8 | null | null |
JPMoresmau/leksah | src/IDE/NotebookFlipper.hs | gpl-2.0 | flipUp :: IDEAction
flipUp = do
currentState' <- readIDE currentState
case currentState' of
IsFlipping tv -> moveFlipperUp tv
IsRunning -> initFlipper False
_ -> return ()
-- | Moves down in the Flipper state | 260 | flipUp :: IDEAction
flipUp = do
currentState' <- readIDE currentState
case currentState' of
IsFlipping tv -> moveFlipperUp tv
IsRunning -> initFlipper False
_ -> return ()
-- | Moves down in the Flipper state | 260 | flipUp = do
currentState' <- readIDE currentState
case currentState' of
IsFlipping tv -> moveFlipperUp tv
IsRunning -> initFlipper False
_ -> return ()
-- | Moves down in the Flipper state | 240 | false | true | 0 | 11 | 85 | 61 | 28 | 33 | null | null |
atsukotakahashi/wi | src/library/Yi/MiniBuffer.hs | gpl-2.0 | -- | Hint function that does nothing, for use with @'withMinibufferGen'@
noHint :: a -> YiM [a]
noHint = const $ return [] | 122 | noHint :: a -> YiM [a]
noHint = const $ return [] | 49 | noHint = const $ return [] | 26 | true | true | 0 | 7 | 22 | 31 | 16 | 15 | null | null |
hecrj/haskell-format | src/Language/Haskell/Format/Declaration.hs | bsd-3-clause | type' (TyCon _ qname') =
Atom.qname qname' | 46 | type' (TyCon _ qname') =
Atom.qname qname' | 46 | type' (TyCon _ qname') =
Atom.qname qname' | 46 | false | false | 0 | 6 | 10 | 23 | 10 | 13 | null | null |
zhangjiji/real-world-haskell | ch14/MultiplyTo.hs | mit | robust :: [a] -> Maybe a
robust xs = do
(_:x:_) <- Just xs
return x | 71 | robust :: [a] -> Maybe a
robust xs = do
(_:x:_) <- Just xs
return x | 71 | robust xs = do
(_:x:_) <- Just xs
return x | 46 | false | true | 0 | 11 | 19 | 55 | 25 | 30 | null | null |
nomeata/codeworld | codeworld-base/src/Internal/Text.hs | apache-2.0 | startsWith :: (Text, Text) -> Truth
startsWith (T a, T b) = J.isPrefixOf b a | 76 | startsWith :: (Text, Text) -> Truth
startsWith (T a, T b) = J.isPrefixOf b a | 76 | startsWith (T a, T b) = J.isPrefixOf b a | 40 | false | true | 0 | 9 | 14 | 48 | 23 | 25 | null | null |
mstksg/auto | src/Control/Auto/Blip.hs | mit | once :: Auto m (Blip a) (Blip a)
once = mkState f False
where
f _ True = (NoBlip, True )
f e@(Blip _) False = (e, True )
f _ False = (NoBlip, False)
-- | Suppress only the first emission coming from upstream, and let all the
-- others pass uninhibited. | 292 | once :: Auto m (Blip a) (Blip a)
once = mkState f False
where
f _ True = (NoBlip, True )
f e@(Blip _) False = (e, True )
f _ False = (NoBlip, False)
-- | Suppress only the first emission coming from upstream, and let all the
-- others pass uninhibited. | 292 | once = mkState f False
where
f _ True = (NoBlip, True )
f e@(Blip _) False = (e, True )
f _ False = (NoBlip, False)
-- | Suppress only the first emission coming from upstream, and let all the
-- others pass uninhibited. | 259 | false | true | 3 | 8 | 92 | 112 | 53 | 59 | null | null |
jacekszymanski/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxSASH_TOP :: Int
wxSASH_TOP = 0 | 32 | wxSASH_TOP :: Int
wxSASH_TOP = 0 | 32 | wxSASH_TOP = 0 | 14 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
DavidAlphaFox/ghc | libraries/Cabal/cabal-install/tests/PackageTests/PackageTester.hs | bsd-3-clause | ------------------------------------------------------------------------
-- Verbosity
lookupEnv :: String -> IO (Maybe String)
lookupEnv name =
(fmap Just $ getEnv name)
`E.catch` \ (e :: IOError) ->
if isDoesNotExistError e
then return Nothing
else E.throw e | 292 | lookupEnv :: String -> IO (Maybe String)
lookupEnv name =
(fmap Just $ getEnv name)
`E.catch` \ (e :: IOError) ->
if isDoesNotExistError e
then return Nothing
else E.throw e | 205 | lookupEnv name =
(fmap Just $ getEnv name)
`E.catch` \ (e :: IOError) ->
if isDoesNotExistError e
then return Nothing
else E.throw e | 164 | true | true | 0 | 9 | 65 | 89 | 44 | 45 | null | null |
lukexi/gl-pal | src/Graphics/GL/Pal/Shape.hs | bsd-3-clause | newVAO :: MonadIO m => m VertexArrayObject
newVAO = VertexArrayObject <$> overPtr (glGenVertexArrays 1) | 103 | newVAO :: MonadIO m => m VertexArrayObject
newVAO = VertexArrayObject <$> overPtr (glGenVertexArrays 1) | 103 | newVAO = VertexArrayObject <$> overPtr (glGenVertexArrays 1) | 60 | false | true | 0 | 8 | 13 | 34 | 16 | 18 | null | null |
jystic/river | src/River/Core/Annotation.hs | bsd-3-clause | annotOfBindings :: Bindings k p n a -> a
annotOfBindings = \case
Bindings a _ ->
a | 88 | annotOfBindings :: Bindings k p n a -> a
annotOfBindings = \case
Bindings a _ ->
a | 88 | annotOfBindings = \case
Bindings a _ ->
a | 47 | false | true | 2 | 6 | 22 | 37 | 18 | 19 | null | null |
mydaum/cabal | Cabal/tests/UnitTests/Distribution/Utils/ShortText.hs | bsd-3-clause | prop_ShortTextMonoid :: String -> String -> Bool
prop_ShortTextMonoid a b = Mon.mappend a b == fromShortText (mappend (toShortText a) (toShortText b)) | 150 | prop_ShortTextMonoid :: String -> String -> Bool
prop_ShortTextMonoid a b = Mon.mappend a b == fromShortText (mappend (toShortText a) (toShortText b)) | 150 | prop_ShortTextMonoid a b = Mon.mappend a b == fromShortText (mappend (toShortText a) (toShortText b)) | 101 | false | true | 0 | 10 | 20 | 58 | 28 | 30 | null | null |
phischu/fragnix | tests/packages/scotty/Data.Aeson.TH.hs | bsd-3-clause | parseRecord :: JSONClass
-> TyVarMap
-> [Type]
-> Options
-> Name
-> Name
-> [VarStrictType]
-> Name
-> ExpQ
parseRecord jc tvMap argTys opts tName conName ts obj =
foldl' (\a b -> infixApp a [|(<*>)|] b)
(infixApp (conE conName) [|(<$>)|] x)
xs
where
x:xs = [ [|lookupField|]
`appE` dispatchParseJSON jc conName tvMap argTy
`appE` litE (stringL $ show tName)
`appE` litE (stringL $ constructorTagModifier opts $ nameBase conName)
`appE` varE obj
`appE` ( [|T.pack|] `appE` fieldLabelExp opts field
)
| ((field, _, _), argTy) <- zip ts argTys
] | 799 | parseRecord :: JSONClass
-> TyVarMap
-> [Type]
-> Options
-> Name
-> Name
-> [VarStrictType]
-> Name
-> ExpQ
parseRecord jc tvMap argTys opts tName conName ts obj =
foldl' (\a b -> infixApp a [|(<*>)|] b)
(infixApp (conE conName) [|(<$>)|] x)
xs
where
x:xs = [ [|lookupField|]
`appE` dispatchParseJSON jc conName tvMap argTy
`appE` litE (stringL $ show tName)
`appE` litE (stringL $ constructorTagModifier opts $ nameBase conName)
`appE` varE obj
`appE` ( [|T.pack|] `appE` fieldLabelExp opts field
)
| ((field, _, _), argTy) <- zip ts argTys
] | 799 | parseRecord jc tvMap argTys opts tName conName ts obj =
foldl' (\a b -> infixApp a [|(<*>)|] b)
(infixApp (conE conName) [|(<$>)|] x)
xs
where
x:xs = [ [|lookupField|]
`appE` dispatchParseJSON jc conName tvMap argTy
`appE` litE (stringL $ show tName)
`appE` litE (stringL $ constructorTagModifier opts $ nameBase conName)
`appE` varE obj
`appE` ( [|T.pack|] `appE` fieldLabelExp opts field
)
| ((field, _, _), argTy) <- zip ts argTys
] | 594 | false | true | 3 | 14 | 344 | 263 | 139 | 124 | null | null |
ikirill/ComputationalMathematics | Cube/Permutation.hs | gpl-3.0 | -- | Permutations are multiplied from right to left, so that p1 * p2 *
-- x means that first p2 is applied to x, then p1.
-- TODO This convention might be inconvenient later.
mul :: Perm -> Perm -> Perm
mul p q = mull1 [p,q] | 224 | mul :: Perm -> Perm -> Perm
mul p q = mull1 [p,q] | 49 | mul p q = mull1 [p,q] | 21 | true | true | 0 | 8 | 47 | 41 | 21 | 20 | null | null |
nushio3/ghc | libraries/base/Data/Foldable.hs | bsd-3-clause | -- | The concatenation of all the elements of a container of lists.
concat :: Foldable t => t [a] -> [a]
concat xs = build (\c n -> foldr (\x y -> foldr c y x) n xs) | 165 | concat :: Foldable t => t [a] -> [a]
concat xs = build (\c n -> foldr (\x y -> foldr c y x) n xs) | 97 | concat xs = build (\c n -> foldr (\x y -> foldr c y x) n xs) | 60 | true | true | 0 | 11 | 38 | 72 | 37 | 35 | null | null |
portnov/yaledger | YaLedger/Reports/Stats.hs | bsd-3-clause | postingToDouble opts (DP p) = (if isAssetPosting opts p then id else negate) $ toDouble $ postingValue p | 104 | postingToDouble opts (DP p) = (if isAssetPosting opts p then id else negate) $ toDouble $ postingValue p | 104 | postingToDouble opts (DP p) = (if isAssetPosting opts p then id else negate) $ toDouble $ postingValue p | 104 | false | false | 0 | 9 | 17 | 46 | 22 | 24 | null | null |
ndmitchell/hoogle | src/Action/CmdLine.hs | bsd-3-clause | getCmdLine :: [String] -> IO CmdLine
getCmdLine args = do
args <- withArgs args $ cmdArgsRun cmdLineMode
-- fill in the default database
args <- if database args /= "" then pure args else do
db <- defaultDatabaseLang $ language args; pure args{database=db}
-- fix up people using Hoogle 4 instructions
args <- case args of
Generate{..} | "all" `elem` include -> do
putStrLn "Warning: 'all' argument is no longer required, and has been ignored."
pure $ args{include = delete "all" include}
_ -> pure args
pure args | 588 | getCmdLine :: [String] -> IO CmdLine
getCmdLine args = do
args <- withArgs args $ cmdArgsRun cmdLineMode
-- fill in the default database
args <- if database args /= "" then pure args else do
db <- defaultDatabaseLang $ language args; pure args{database=db}
-- fix up people using Hoogle 4 instructions
args <- case args of
Generate{..} | "all" `elem` include -> do
putStrLn "Warning: 'all' argument is no longer required, and has been ignored."
pure $ args{include = delete "all" include}
_ -> pure args
pure args | 588 | getCmdLine args = do
args <- withArgs args $ cmdArgsRun cmdLineMode
-- fill in the default database
args <- if database args /= "" then pure args else do
db <- defaultDatabaseLang $ language args; pure args{database=db}
-- fix up people using Hoogle 4 instructions
args <- case args of
Generate{..} | "all" `elem` include -> do
putStrLn "Warning: 'all' argument is no longer required, and has been ignored."
pure $ args{include = delete "all" include}
_ -> pure args
pure args | 551 | false | true | 0 | 17 | 162 | 173 | 82 | 91 | null | null |
Motions/motions | src/Bio/Motions/Common.hs | apache-2.0 | laminType :: BinderType
laminType = BinderType 0 | 48 | laminType :: BinderType
laminType = BinderType 0 | 48 | laminType = BinderType 0 | 24 | false | true | 0 | 5 | 6 | 14 | 7 | 7 | null | null |
ublubu/tile-rider | src/TileRider/Drag.hs | mit | applyFullMove :: Draggable t => FullMoveResult -> t -> t
applyFullMove (FullMoveResult dir coord) z = applyMove dir z'
where z' = fromMaybe (error "full move should've been checked beforehand") $
setCoord coord z | 227 | applyFullMove :: Draggable t => FullMoveResult -> t -> t
applyFullMove (FullMoveResult dir coord) z = applyMove dir z'
where z' = fromMaybe (error "full move should've been checked beforehand") $
setCoord coord z | 227 | applyFullMove (FullMoveResult dir coord) z = applyMove dir z'
where z' = fromMaybe (error "full move should've been checked beforehand") $
setCoord coord z | 170 | false | true | 0 | 8 | 48 | 70 | 33 | 37 | null | null |
AndrasKovacs/trie-vector | benchmarks/Benchmarks.hs | mit | 1000 = sn 1000
| 16 | s1000 = sn 1000 | 16 | s1000 = sn 1000 | 16 | false | false | 1 | 4 | 5 | 12 | 4 | 8 | null | null |
urbanslug/ghc | compiler/typecheck/TcRnTypes.hs | bsd-3-clause | -- | Access the 'EvBindsVar' carried by the 'TcPluginM' during
-- constraint solving. Returns 'Nothing' if invoked during
-- 'tcPluginInit' or 'tcPluginStop'.
getEvBindsTcPluginM_maybe :: TcPluginM (Maybe EvBindsVar)
getEvBindsTcPluginM_maybe = TcPluginM return | 262 | getEvBindsTcPluginM_maybe :: TcPluginM (Maybe EvBindsVar)
getEvBindsTcPluginM_maybe = TcPluginM return | 102 | getEvBindsTcPluginM_maybe = TcPluginM return | 44 | true | true | 0 | 7 | 31 | 26 | 14 | 12 | null | null |
IreneKnapp/hs-captcha | Graphics/Captcha.hs | mit | makeCaptcha :: IO (String, ByteString)
makeCaptcha = do
string <- makeRandomString
image <- createInitialImage string
chirpDoubleRandom image
chirpDoubleRandom image
image <- cropToFinalSize image
byteString <- savePngByteString image
return (string, byteString) | 276 | makeCaptcha :: IO (String, ByteString)
makeCaptcha = do
string <- makeRandomString
image <- createInitialImage string
chirpDoubleRandom image
chirpDoubleRandom image
image <- cropToFinalSize image
byteString <- savePngByteString image
return (string, byteString) | 276 | makeCaptcha = do
string <- makeRandomString
image <- createInitialImage string
chirpDoubleRandom image
chirpDoubleRandom image
image <- cropToFinalSize image
byteString <- savePngByteString image
return (string, byteString) | 237 | false | true | 0 | 9 | 43 | 87 | 37 | 50 | null | null |
PhDP/Sphinx-AI | Faun/Parser/FOL.hs | mit | parseNIdentity = do
left <- Term.parseTerm
reservedOps ["!=", "/=", "\\neq"]
right <- Term.parseTerm
return $ Not $ Atom $ Predicate "Identity" [left, right] | 165 | parseNIdentity = do
left <- Term.parseTerm
reservedOps ["!=", "/=", "\\neq"]
right <- Term.parseTerm
return $ Not $ Atom $ Predicate "Identity" [left, right] | 165 | parseNIdentity = do
left <- Term.parseTerm
reservedOps ["!=", "/=", "\\neq"]
right <- Term.parseTerm
return $ Not $ Atom $ Predicate "Identity" [left, right] | 165 | false | false | 1 | 10 | 30 | 69 | 32 | 37 | null | null |
nikki-and-the-robots/nikki | src/Network/Download.hs | lgpl-3.0 | downloadLazy :: String -> IO (Either String ByteString)
downloadLazy = httpGet | 78 | downloadLazy :: String -> IO (Either String ByteString)
downloadLazy = httpGet | 78 | downloadLazy = httpGet | 22 | false | true | 0 | 8 | 10 | 26 | 13 | 13 | null | null |
frontrowed/stratosphere | library-gen/Stratosphere/ResourceProperties/EMRClusterJobFlowInstancesConfig.hs | mit | -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-jobflowinstancesconfig.html#cfn-elasticmapreduce-cluster-jobflowinstancesconfig-ec2subnetid
emrcjficEc2SubnetId :: Lens' EMRClusterJobFlowInstancesConfig (Maybe (Val Text))
emrcjficEc2SubnetId = lens _eMRClusterJobFlowInstancesConfigEc2SubnetId (\s a -> s { _eMRClusterJobFlowInstancesConfigEc2SubnetId = a }) | 416 | emrcjficEc2SubnetId :: Lens' EMRClusterJobFlowInstancesConfig (Maybe (Val Text))
emrcjficEc2SubnetId = lens _eMRClusterJobFlowInstancesConfigEc2SubnetId (\s a -> s { _eMRClusterJobFlowInstancesConfigEc2SubnetId = a }) | 217 | emrcjficEc2SubnetId = lens _eMRClusterJobFlowInstancesConfigEc2SubnetId (\s a -> s { _eMRClusterJobFlowInstancesConfigEc2SubnetId = a }) | 136 | true | true | 0 | 9 | 22 | 52 | 28 | 24 | null | null |
danr/hipspec | testsuite/prod/zeno_version/PropT05.hs | gpl-3.0 | even (S Z) = False | 18 | even (S Z) = False | 18 | even (S Z) = False | 18 | false | false | 0 | 7 | 4 | 15 | 7 | 8 | null | null |
elliottt/hsopenid | src/Network/OpenID/Discovery.hs | bsd-3-clause | splitAttr :: String -> Maybe ((String,String),String)
splitAttr xs = case break (== '=') xs of
(_,[]) -> Nothing
(key,_:'"':ys) -> f key (== '"') ys
(key,_:ys) -> f key isSpace ys
where
f key p cs = case break p cs of
(_,[]) -> Nothing
(value,_:rest) -> Just ((key,value), dropWhile isSpace rest) | 339 | splitAttr :: String -> Maybe ((String,String),String)
splitAttr xs = case break (== '=') xs of
(_,[]) -> Nothing
(key,_:'"':ys) -> f key (== '"') ys
(key,_:ys) -> f key isSpace ys
where
f key p cs = case break p cs of
(_,[]) -> Nothing
(value,_:rest) -> Just ((key,value), dropWhile isSpace rest) | 339 | splitAttr xs = case break (== '=') xs of
(_,[]) -> Nothing
(key,_:'"':ys) -> f key (== '"') ys
(key,_:ys) -> f key isSpace ys
where
f key p cs = case break p cs of
(_,[]) -> Nothing
(value,_:rest) -> Just ((key,value), dropWhile isSpace rest) | 285 | false | true | 4 | 10 | 94 | 189 | 101 | 88 | null | null |
nushio3/dynamic-object | Data/Object/Dynamic/Examples/PointParticle.hs | bsd-3-clause | kineticEnergy :: (UseReal o, Fractional (UnderlyingReal o)) => MemberLens o KineticEnergy
kineticEnergy = memberLens KineticEnergy | 130 | kineticEnergy :: (UseReal o, Fractional (UnderlyingReal o)) => MemberLens o KineticEnergy
kineticEnergy = memberLens KineticEnergy | 130 | kineticEnergy = memberLens KineticEnergy | 40 | false | true | 0 | 8 | 14 | 40 | 20 | 20 | null | null |
cies/bloodhound | src/Database/Bloodhound/Types.hs | bsd-3-clause | {-| 'unpackId' is a silly convenience function that gets used once.
-}
unpackId :: DocId -> Text
unpackId (DocId docId) = docId | 127 | unpackId :: DocId -> Text
unpackId (DocId docId) = docId | 56 | unpackId (DocId docId) = docId | 30 | true | true | 0 | 7 | 21 | 25 | 13 | 12 | null | null |
uduki/hsQt | Qtc/Gui/QPalette.hs | bsd-2-clause | windowText :: QPalette a -> (()) -> IO (QBrush ())
windowText x0 ()
= withObjectRefResult $
withObjectPtr x0 $ \cobj_x0 ->
qtc_QPalette_windowText cobj_x0 | 164 | windowText :: QPalette a -> (()) -> IO (QBrush ())
windowText x0 ()
= withObjectRefResult $
withObjectPtr x0 $ \cobj_x0 ->
qtc_QPalette_windowText cobj_x0 | 164 | windowText x0 ()
= withObjectRefResult $
withObjectPtr x0 $ \cobj_x0 ->
qtc_QPalette_windowText cobj_x0 | 113 | false | true | 0 | 10 | 32 | 64 | 31 | 33 | null | null |
Tener/deeplearning-thesis | lib/Matlab.hs | bsd-3-clause | nnsave_to_file_full :: (IsString a, Monoid a) => a
nnsave_to_file_full = [str|
function nnsave_to_file_full(net, filename)
% open file
file = fopen(filename, 'w');
% write sizes in single row
for i = 2 : net.n
fprintf(file, '%d ', net.size(i));
end
fprintf(file, '\n');
fclose(file);
% write biases in 'layer count' rows
biases = net.b;
for i = 1 : net.n-1;
dlmwrite(filename, biases{i}', 'delimiter', ' ', '-append'); % '
end
% write weights in 'neuron count' rows
weights = net.W;
for i = 1 : net.n-1;
dlmwrite(filename, weights{i}, 'delimiter', ' ', '-append');
end
end
|] | 677 | nnsave_to_file_full :: (IsString a, Monoid a) => a
nnsave_to_file_full = [str|
function nnsave_to_file_full(net, filename)
% open file
file = fopen(filename, 'w');
% write sizes in single row
for i = 2 : net.n
fprintf(file, '%d ', net.size(i));
end
fprintf(file, '\n');
fclose(file);
% write biases in 'layer count' rows
biases = net.b;
for i = 1 : net.n-1;
dlmwrite(filename, biases{i}', 'delimiter', ' ', '-append'); % '
end
% write weights in 'neuron count' rows
weights = net.W;
for i = 1 : net.n-1;
dlmwrite(filename, weights{i}, 'delimiter', ' ', '-append');
end
end
|] | 677 | nnsave_to_file_full = [str|
function nnsave_to_file_full(net, filename)
% open file
file = fopen(filename, 'w');
% write sizes in single row
for i = 2 : net.n
fprintf(file, '%d ', net.size(i));
end
fprintf(file, '\n');
fclose(file);
% write biases in 'layer count' rows
biases = net.b;
for i = 1 : net.n-1;
dlmwrite(filename, biases{i}', 'delimiter', ' ', '-append'); % '
end
% write weights in 'neuron count' rows
weights = net.W;
for i = 1 : net.n-1;
dlmwrite(filename, weights{i}, 'delimiter', ' ', '-append');
end
end
|] | 626 | false | true | 0 | 6 | 192 | 30 | 18 | 12 | null | null |
dom96/pb | Paste.hs | bsd-3-clause | pastebinUrl = fromJust $ parseURI "http://pastebin.com/api_public.php" | 70 | pastebinUrl = fromJust $ parseURI "http://pastebin.com/api_public.php" | 70 | pastebinUrl = fromJust $ parseURI "http://pastebin.com/api_public.php" | 70 | false | false | 0 | 6 | 5 | 13 | 6 | 7 | null | null |
izgzhen/logix | Test.hs | mit | unwrapStepsExample :: [Step]
unwrapStepsExample = constructSnippet [
(strToProp "p", Strategy Assume [])
, (strToProp "p -> A", Strategy L1 [])
, (strToProp "A", Strategy MpRule [0, 1])
, (strToProp "A -> B", Strategy L1 [])
, (strToProp "B", Strategy MpRule [2, 3])
] | 285 | unwrapStepsExample :: [Step]
unwrapStepsExample = constructSnippet [
(strToProp "p", Strategy Assume [])
, (strToProp "p -> A", Strategy L1 [])
, (strToProp "A", Strategy MpRule [0, 1])
, (strToProp "A -> B", Strategy L1 [])
, (strToProp "B", Strategy MpRule [2, 3])
] | 285 | unwrapStepsExample = constructSnippet [
(strToProp "p", Strategy Assume [])
, (strToProp "p -> A", Strategy L1 [])
, (strToProp "A", Strategy MpRule [0, 1])
, (strToProp "A -> B", Strategy L1 [])
, (strToProp "B", Strategy MpRule [2, 3])
] | 256 | false | true | 0 | 9 | 59 | 120 | 65 | 55 | null | null |
haskell-opengl/OpenGLRaw | src/Graphics/GL/Functions/F25.hs | bsd-3-clause | -- glTexCoord1hvNV -------------------------------------------------------------
glTexCoord1hvNV
:: MonadIO m
=> Ptr GLhalfNV -- ^ @v@ pointing to @1@ element of type @Half16NV@.
-> m ()
glTexCoord1hvNV v1 = liftIO $ dyn106 ptr_glTexCoord1hvNV v1 | 253 | glTexCoord1hvNV
:: MonadIO m
=> Ptr GLhalfNV -- ^ @v@ pointing to @1@ element of type @Half16NV@.
-> m ()
glTexCoord1hvNV v1 = liftIO $ dyn106 ptr_glTexCoord1hvNV v1 | 171 | glTexCoord1hvNV v1 = liftIO $ dyn106 ptr_glTexCoord1hvNV v1 | 59 | true | true | 0 | 9 | 37 | 48 | 22 | 26 | null | null |
christiaanb/ghc | compiler/iface/BinIface.hs | bsd-3-clause | getDictFastString :: Dictionary -> BinHandle -> IO FastString
getDictFastString dict bh = do
j <- get bh
return $! (dict ! fromIntegral (j :: Word32)) | 158 | getDictFastString :: Dictionary -> BinHandle -> IO FastString
getDictFastString dict bh = do
j <- get bh
return $! (dict ! fromIntegral (j :: Word32)) | 158 | getDictFastString dict bh = do
j <- get bh
return $! (dict ! fromIntegral (j :: Word32)) | 96 | false | true | 0 | 11 | 32 | 60 | 29 | 31 | null | null |
unthingable/Tidal | Sound/Tidal/Pattern.hs | gpl-3.0 | -- @within@ uses @compress@ and @zoom to apply @f@ to only part of pattern @p@
-- for example, @within (1%2) (3%4) ((1%8) <~) "bd sn bd cp"@ would shift only
-- the second @bd@
within :: Arc -> (Pattern a -> Pattern a) -> Pattern a -> Pattern a
within (s,e) f p = stack [sliceArc (0,s) p,
compress (s,e) $ f $ zoom (s,e) p,
sliceArc (e,1) p
] | 424 | within :: Arc -> (Pattern a -> Pattern a) -> Pattern a -> Pattern a
within (s,e) f p = stack [sliceArc (0,s) p,
compress (s,e) $ f $ zoom (s,e) p,
sliceArc (e,1) p
] | 247 | within (s,e) f p = stack [sliceArc (0,s) p,
compress (s,e) $ f $ zoom (s,e) p,
sliceArc (e,1) p
] | 179 | true | true | 0 | 10 | 151 | 125 | 65 | 60 | null | null |
penguinland/nlp | IntegrationTest.hs | gpl-3.0 | testNounConjugation :: Test
testNounConjugation =
TestCase $ assertBool "Nouns can be conjoined"
(isSingleSentence "the dog and cat play in the yard.") | 163 | testNounConjugation :: Test
testNounConjugation =
TestCase $ assertBool "Nouns can be conjoined"
(isSingleSentence "the dog and cat play in the yard.") | 163 | testNounConjugation =
TestCase $ assertBool "Nouns can be conjoined"
(isSingleSentence "the dog and cat play in the yard.") | 135 | false | true | 0 | 8 | 32 | 26 | 13 | 13 | null | null |
ksallberg/block-battle | Main.hs | bsd-3-clause | main :: IO ()
main = do
hSetBuffering stdin LineBuffering
evalStateT loop $ GameState{timebank = 0,
timePerMove = 0,
players = [],
myBot = "not set",
fieldHeight = 20,
fieldWidth = 10,
gameRound = 0,
thisPieceType = I,
nextPieceType = O,
thisPiecePosition = (3, -1)}
-- helper functions | 649 | main :: IO ()
main = do
hSetBuffering stdin LineBuffering
evalStateT loop $ GameState{timebank = 0,
timePerMove = 0,
players = [],
myBot = "not set",
fieldHeight = 20,
fieldWidth = 10,
gameRound = 0,
thisPieceType = I,
nextPieceType = O,
thisPiecePosition = (3, -1)}
-- helper functions | 649 | main = do
hSetBuffering stdin LineBuffering
evalStateT loop $ GameState{timebank = 0,
timePerMove = 0,
players = [],
myBot = "not set",
fieldHeight = 20,
fieldWidth = 10,
gameRound = 0,
thisPieceType = I,
nextPieceType = O,
thisPiecePosition = (3, -1)}
-- helper functions | 635 | false | true | 0 | 12 | 410 | 113 | 64 | 49 | null | null |
denibertovic/haskell | kubernetes/lib/Kubernetes/OpenAPI/ModelLens.hs | bsd-3-clause | -- | 'v1GlusterfsVolumeSourcePath' Lens
v1GlusterfsVolumeSourcePathL :: Lens_' V1GlusterfsVolumeSource (Text)
v1GlusterfsVolumeSourcePathL f V1GlusterfsVolumeSource{..} = (\v1GlusterfsVolumeSourcePath -> V1GlusterfsVolumeSource { v1GlusterfsVolumeSourcePath, ..} ) <$> f v1GlusterfsVolumeSourcePath | 298 | v1GlusterfsVolumeSourcePathL :: Lens_' V1GlusterfsVolumeSource (Text)
v1GlusterfsVolumeSourcePathL f V1GlusterfsVolumeSource{..} = (\v1GlusterfsVolumeSourcePath -> V1GlusterfsVolumeSource { v1GlusterfsVolumeSourcePath, ..} ) <$> f v1GlusterfsVolumeSourcePath | 258 | v1GlusterfsVolumeSourcePathL f V1GlusterfsVolumeSource{..} = (\v1GlusterfsVolumeSourcePath -> V1GlusterfsVolumeSource { v1GlusterfsVolumeSourcePath, ..} ) <$> f v1GlusterfsVolumeSourcePath | 188 | true | true | 0 | 8 | 22 | 54 | 29 | 25 | null | null |
ford-prefect/haskell-gi | lib/Data/GI/CodeGen/Code.hs | lgpl-2.1 | group :: BaseCodeGen e a -> BaseCodeGen e a
group cg = do
(x, code) <- recurseCG cg
tellCode (Group code)
blank
return x
-- | Write the given code into the .hs-boot file for the current module. | 202 | group :: BaseCodeGen e a -> BaseCodeGen e a
group cg = do
(x, code) <- recurseCG cg
tellCode (Group code)
blank
return x
-- | Write the given code into the .hs-boot file for the current module. | 202 | group cg = do
(x, code) <- recurseCG cg
tellCode (Group code)
blank
return x
-- | Write the given code into the .hs-boot file for the current module. | 158 | false | true | 0 | 9 | 46 | 66 | 30 | 36 | null | null |
ghcjs/jsaddle-dom | src/JSDOM/Generated/PositionCallback.hs | mit | -- | <https://developer.mozilla.org/en-US/docs/Web/API/PositionCallback Mozilla PositionCallback documentation>
newPositionCallbackSync ::
(MonadDOM m) => (Geoposition -> JSM ()) -> m PositionCallback
newPositionCallbackSync callback
= liftDOM
(PositionCallback . Callback <$>
function
(\ _ _ [position] ->
fromJSValUnchecked position >>= \ position' -> callback position')) | 441 | newPositionCallbackSync ::
(MonadDOM m) => (Geoposition -> JSM ()) -> m PositionCallback
newPositionCallbackSync callback
= liftDOM
(PositionCallback . Callback <$>
function
(\ _ _ [position] ->
fromJSValUnchecked position >>= \ position' -> callback position')) | 328 | newPositionCallbackSync callback
= liftDOM
(PositionCallback . Callback <$>
function
(\ _ _ [position] ->
fromJSValUnchecked position >>= \ position' -> callback position')) | 215 | true | true | 0 | 13 | 106 | 90 | 46 | 44 | null | null |
mariefarrell/Hets | Framework/Analysis.hs | gpl-2.0 | {- ----------------------------------------------------------------------------
Logic analysis -}
-- analyzes a logic definition
anaLogicDef :: LogicDef -> DGraph -> IO DGraph
anaLogicDef ld dg =
case meta ld of
LF -> anaLogicDefH Logic_LF.LF ld dg
Isabelle -> anaLogicDefH Logic_Isabelle.Isabelle ld dg
Maude -> anaLogicDefH Logic_Maude.Maude ld dg | 364 | anaLogicDef :: LogicDef -> DGraph -> IO DGraph
anaLogicDef ld dg =
case meta ld of
LF -> anaLogicDefH Logic_LF.LF ld dg
Isabelle -> anaLogicDefH Logic_Isabelle.Isabelle ld dg
Maude -> anaLogicDefH Logic_Maude.Maude ld dg | 234 | anaLogicDef ld dg =
case meta ld of
LF -> anaLogicDefH Logic_LF.LF ld dg
Isabelle -> anaLogicDefH Logic_Isabelle.Isabelle ld dg
Maude -> anaLogicDefH Logic_Maude.Maude ld dg | 187 | true | true | 0 | 9 | 58 | 85 | 40 | 45 | null | null |
kaoskorobase/mescaline | lib/mescaline-database/Mescaline/Analysis/Meap.hs | gpl-3.0 | meapOptions :: ClassPath -> Chain.Options
meapOptions classPath =
Chain.defaultOptions {
segmenter = Segmenter.defaultOptions {
Segmenter.classPath = classPath
, Segmenter.outputHandler = outputHandler
, Segmenter.segmentation = Segmenter.Onset
, Segmenter.smoothingWindow = 0.01
}
, extractor = Extractor.defaultOptions {
Extractor.classPath = classPath
, Extractor.outputHandler = outputHandler
, Extractor.windowSize = 1024
, Extractor.hopSize = 512
, Extractor.features = map fst meapFeatures } }
where
-- outputHandler = OutputHandler (Log.noticeM "Database") (Log.errorM "Database")
outputHandler = defaultOutputHandler | 766 | meapOptions :: ClassPath -> Chain.Options
meapOptions classPath =
Chain.defaultOptions {
segmenter = Segmenter.defaultOptions {
Segmenter.classPath = classPath
, Segmenter.outputHandler = outputHandler
, Segmenter.segmentation = Segmenter.Onset
, Segmenter.smoothingWindow = 0.01
}
, extractor = Extractor.defaultOptions {
Extractor.classPath = classPath
, Extractor.outputHandler = outputHandler
, Extractor.windowSize = 1024
, Extractor.hopSize = 512
, Extractor.features = map fst meapFeatures } }
where
-- outputHandler = OutputHandler (Log.noticeM "Database") (Log.errorM "Database")
outputHandler = defaultOutputHandler | 766 | meapOptions classPath =
Chain.defaultOptions {
segmenter = Segmenter.defaultOptions {
Segmenter.classPath = classPath
, Segmenter.outputHandler = outputHandler
, Segmenter.segmentation = Segmenter.Onset
, Segmenter.smoothingWindow = 0.01
}
, extractor = Extractor.defaultOptions {
Extractor.classPath = classPath
, Extractor.outputHandler = outputHandler
, Extractor.windowSize = 1024
, Extractor.hopSize = 512
, Extractor.features = map fst meapFeatures } }
where
-- outputHandler = OutputHandler (Log.noticeM "Database") (Log.errorM "Database")
outputHandler = defaultOutputHandler | 724 | false | true | 0 | 9 | 210 | 132 | 77 | 55 | null | null |
ancientlanguage/haskell-analysis | grammar/src/Grammar/Common/Decompose.hs | mit | decomposeChar '\xFA1E' = "\x7FBD" | 33 | decomposeChar '\xFA1E' = "\x7FBD" | 33 | decomposeChar '\xFA1E' = "\x7FBD" | 33 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
coolhacks/scripts-hacks | examples/shellcheck-master/ShellCheck/Parser.hs | mit | g_Semi = do
notFollowedBy2 g_DSEMI
tryToken ";" T_Semi | 62 | g_Semi = do
notFollowedBy2 g_DSEMI
tryToken ";" T_Semi | 62 | g_Semi = do
notFollowedBy2 g_DSEMI
tryToken ";" T_Semi | 62 | false | false | 0 | 7 | 15 | 20 | 8 | 12 | null | null |
pmiddend/tic | lib/Tic/CoordTransform.hs | gpl-3.0 | geoVectorNormalize :: forall a.Fractional a => Eq a => Floating a => Iso' (V2 a) (V2 a)
geoVectorNormalize = vectorIso (dividing 360 . adding 0.5) geoVectorYNormalize | 166 | geoVectorNormalize :: forall a.Fractional a => Eq a => Floating a => Iso' (V2 a) (V2 a)
geoVectorNormalize = vectorIso (dividing 360 . adding 0.5) geoVectorYNormalize | 166 | geoVectorNormalize = vectorIso (dividing 360 . adding 0.5) geoVectorYNormalize | 78 | false | true | 0 | 12 | 25 | 78 | 35 | 43 | null | null |
frontrowed/stratosphere | library-gen/Stratosphere/ResourceProperties/CognitoUserPoolInviteMessageTemplate.hs | mit | -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpool-invitemessagetemplate.html#cfn-cognito-userpool-invitemessagetemplate-emailmessage
cupimtEmailMessage :: Lens' CognitoUserPoolInviteMessageTemplate (Maybe (Val Text))
cupimtEmailMessage = lens _cognitoUserPoolInviteMessageTemplateEmailMessage (\s a -> s { _cognitoUserPoolInviteMessageTemplateEmailMessage = a }) | 411 | cupimtEmailMessage :: Lens' CognitoUserPoolInviteMessageTemplate (Maybe (Val Text))
cupimtEmailMessage = lens _cognitoUserPoolInviteMessageTemplateEmailMessage (\s a -> s { _cognitoUserPoolInviteMessageTemplateEmailMessage = a }) | 229 | cupimtEmailMessage = lens _cognitoUserPoolInviteMessageTemplateEmailMessage (\s a -> s { _cognitoUserPoolInviteMessageTemplateEmailMessage = a }) | 145 | true | true | 1 | 9 | 22 | 55 | 28 | 27 | null | null |
xmonad/xmonad-contrib | XMonad/Actions/FlexibleManipulate.hs | bsd-3-clause | zipP :: (a -> b -> c) -> (a,a) -> (b,b) -> (c,c)
zipP f (ax,ay) (bx,by) = (f ax bx, f ay by) | 92 | zipP :: (a -> b -> c) -> (a,a) -> (b,b) -> (c,c)
zipP f (ax,ay) (bx,by) = (f ax bx, f ay by) | 92 | zipP f (ax,ay) (bx,by) = (f ax bx, f ay by) | 43 | false | true | 0 | 8 | 23 | 87 | 49 | 38 | null | null |
apollo-lang/apollo | src/Midi.hs | mit | ppendRests :: Int -> Atom -> [[(Ticks, Message)]]
appendRests l (AtomNote n@(Note (Pitch _) d))
= noteToTrack n : replicate (l - 1) (restToTrack (Rest d))
| 159 | appendRests :: Int -> Atom -> [[(Ticks, Message)]]
appendRests l (AtomNote n@(Note (Pitch _) d))
= noteToTrack n : replicate (l - 1) (restToTrack (Rest d)) | 159 | appendRests l (AtomNote n@(Note (Pitch _) d))
= noteToTrack n : replicate (l - 1) (restToTrack (Rest d)) | 108 | false | true | 0 | 12 | 30 | 90 | 47 | 43 | null | null |
mreid/papersite | src/lib/Paper.hs | mit | pdf t = case lookup "pdf" . BibTex.fields $ t of
Just url -> Just url
Nothing -> Just . toURI "pdf" $ BibTex.identifier t | 128 | pdf t = case lookup "pdf" . BibTex.fields $ t of
Just url -> Just url
Nothing -> Just . toURI "pdf" $ BibTex.identifier t | 128 | pdf t = case lookup "pdf" . BibTex.fields $ t of
Just url -> Just url
Nothing -> Just . toURI "pdf" $ BibTex.identifier t | 128 | false | false | 0 | 10 | 31 | 60 | 27 | 33 | null | null |
profan/mal | haskell/Core.hs | mpl-2.0 | println args = do
liftIO $ putStrLn $ _pr_list False " " args
liftIO $ hFlush stdout
return Nil | 107 | println args = do
liftIO $ putStrLn $ _pr_list False " " args
liftIO $ hFlush stdout
return Nil | 107 | println args = do
liftIO $ putStrLn $ _pr_list False " " args
liftIO $ hFlush stdout
return Nil | 107 | false | false | 0 | 8 | 30 | 43 | 18 | 25 | null | null |
bitemyapp/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | -- OS
osScriptCreate :: String
osScriptCreate = "create" | 57 | osScriptCreate :: String
osScriptCreate = "create" | 50 | osScriptCreate = "create" | 25 | true | true | 0 | 6 | 8 | 19 | 8 | 11 | null | null |
SamirTalwar/advent-of-code | 2021/AOC_04_2.hs | mit | parseDraws :: Text -> [Int]
parseDraws = parseText $ sepBy1 int (string ",") | 76 | parseDraws :: Text -> [Int]
parseDraws = parseText $ sepBy1 int (string ",") | 76 | parseDraws = parseText $ sepBy1 int (string ",") | 48 | false | true | 0 | 8 | 12 | 33 | 17 | 16 | null | null |
judah/haskeline | System/Console/Haskeline/Backend/Terminfo.hs | bsd-3-clause | tinfoLayout :: Terminal -> IO (Maybe Layout)
tinfoLayout term = return $ getCapability term $ do
c <- termColumns
r <- termLines
return Layout {height=r,width=c} | 233 | tinfoLayout :: Terminal -> IO (Maybe Layout)
tinfoLayout term = return $ getCapability term $ do
c <- termColumns
r <- termLines
return Layout {height=r,width=c} | 233 | tinfoLayout term = return $ getCapability term $ do
c <- termColumns
r <- termLines
return Layout {height=r,width=c} | 188 | false | true | 0 | 10 | 96 | 72 | 35 | 37 | null | null |
annenkov/contracts | Haskell/CTest.hs | mit | payments = onceAWeek (scale 10 (transfOne DKK "you" "me")) | 58 | payments = onceAWeek (scale 10 (transfOne DKK "you" "me")) | 58 | payments = onceAWeek (scale 10 (transfOne DKK "you" "me")) | 58 | false | false | 1 | 9 | 8 | 30 | 13 | 17 | null | null |
kovach/web | res0/Graph.hs | gpl-2.0 | webFile_ :: Parser Graph
webFile_ = do
rows <- sepBy (char '\n') arrow_
ws
return $ arr2g rows | 106 | webFile_ :: Parser Graph
webFile_ = do
rows <- sepBy (char '\n') arrow_
ws
return $ arr2g rows | 106 | webFile_ = do
rows <- sepBy (char '\n') arrow_
ws
return $ arr2g rows | 81 | false | true | 0 | 10 | 29 | 45 | 20 | 25 | null | null |
DougBurke/swish | src/Swish/RDF/Vocabulary/FOAF.hs | lgpl-2.1 | -- | @foaf:img@ from <http://xmlns.com/foaf/spec/#term_img>.
foafimg :: ScopedName
foafimg = toF "img" | 103 | foafimg :: ScopedName
foafimg = toF "img" | 41 | foafimg = toF "img" | 19 | true | true | 0 | 5 | 12 | 15 | 8 | 7 | null | null |
pjones/xmonad-test | vendor/xmonad-contrib/XMonad/Hooks/UrgencyHook.hs | bsd-2-clause | -- | Change the _NET_WM_STATE property by applying a function to the list of atoms.
changeNetWMState :: Display -> Window -> ([CLong] -> [CLong]) -> X ()
changeNetWMState dpy w f = do
wmstate <- getAtom "_NET_WM_STATE"
wstate <- fromMaybe [] `fmap` getProp32 wmstate w
let ptype = 4 -- atom property type for changeProperty
io $ changeProperty32 dpy w wmstate ptype propModeReplace (f wstate)
return ()
-- | Add an atom to the _NET_WM_STATE property. | 467 | changeNetWMState :: Display -> Window -> ([CLong] -> [CLong]) -> X ()
changeNetWMState dpy w f = do
wmstate <- getAtom "_NET_WM_STATE"
wstate <- fromMaybe [] `fmap` getProp32 wmstate w
let ptype = 4 -- atom property type for changeProperty
io $ changeProperty32 dpy w wmstate ptype propModeReplace (f wstate)
return ()
-- | Add an atom to the _NET_WM_STATE property. | 383 | changeNetWMState dpy w f = do
wmstate <- getAtom "_NET_WM_STATE"
wstate <- fromMaybe [] `fmap` getProp32 wmstate w
let ptype = 4 -- atom property type for changeProperty
io $ changeProperty32 dpy w wmstate ptype propModeReplace (f wstate)
return ()
-- | Add an atom to the _NET_WM_STATE property. | 313 | true | true | 0 | 10 | 92 | 127 | 62 | 65 | null | null |
green-haskell/ghc | compiler/types/TypeRep.hs | bsd-3-clause | maybeParen :: TyPrec -> TyPrec -> SDoc -> SDoc
maybeParen ctxt_prec inner_prec pretty
| ctxt_prec < inner_prec = pretty
| otherwise = parens pretty | 164 | maybeParen :: TyPrec -> TyPrec -> SDoc -> SDoc
maybeParen ctxt_prec inner_prec pretty
| ctxt_prec < inner_prec = pretty
| otherwise = parens pretty | 164 | maybeParen ctxt_prec inner_prec pretty
| ctxt_prec < inner_prec = pretty
| otherwise = parens pretty | 117 | false | true | 1 | 8 | 40 | 50 | 24 | 26 | null | null |
jacekszymanski/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | cB_LEFT_BAR_HANDLE_HITTED :: Int
cB_LEFT_BAR_HANDLE_HITTED = 3 | 62 | cB_LEFT_BAR_HANDLE_HITTED :: Int
cB_LEFT_BAR_HANDLE_HITTED = 3 | 62 | cB_LEFT_BAR_HANDLE_HITTED = 3 | 29 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
AlexaDeWit/haskellsandboxserver | src/api/v1/public/SessionTokens.hs | bsd-3-clause | tokenServer :: ServerT SessionTokenApi App
tokenServer = tokenFromRequest | 73 | tokenServer :: ServerT SessionTokenApi App
tokenServer = tokenFromRequest | 73 | tokenServer = tokenFromRequest | 30 | false | true | 0 | 5 | 7 | 16 | 8 | 8 | null | null |
RossMeikleham/Idris-dev | src/IRTS/CodegenC.hs | bsd-3-clause | creg (L i) = "LOC(" ++ show i ++ ")" | 36 | creg (L i) = "LOC(" ++ show i ++ ")" | 36 | creg (L i) = "LOC(" ++ show i ++ ")" | 36 | false | false | 0 | 7 | 9 | 26 | 12 | 14 | null | null |
markus-git/co-feldspar | examples/Tut3_Computational.hs | bsd-3-clause | test1 = Soft.icompile $
do arr <- initArr [1, 2, 3, 4]
reverse arr
-- Similarily, the computational instructions of `reverse` can also be
-- interpreted as hardware instructions. So we can interpret `reverse` as a
-- hardware program as well. | 250 | test1 = Soft.icompile $
do arr <- initArr [1, 2, 3, 4]
reverse arr
-- Similarily, the computational instructions of `reverse` can also be
-- interpreted as hardware instructions. So we can interpret `reverse` as a
-- hardware program as well. | 250 | test1 = Soft.icompile $
do arr <- initArr [1, 2, 3, 4]
reverse arr
-- Similarily, the computational instructions of `reverse` can also be
-- interpreted as hardware instructions. So we can interpret `reverse` as a
-- hardware program as well. | 250 | false | false | 0 | 10 | 48 | 43 | 23 | 20 | null | null |
bb010g/aura | aura/exec/Aura/Commands/A.hs | gpl-3.0 | displayPkgbuild :: NonEmpty PkgName -> RIO Env ()
displayPkgbuild ps = do
man <- asks (managerOf . settings)
pbs <- catMaybes <$> traverse (liftIO . getPkgbuild man) (toList ps)
traverse_ ((\p -> B.putStr p >> B.putStr "\n") . pkgbuild) pbs | 246 | displayPkgbuild :: NonEmpty PkgName -> RIO Env ()
displayPkgbuild ps = do
man <- asks (managerOf . settings)
pbs <- catMaybes <$> traverse (liftIO . getPkgbuild man) (toList ps)
traverse_ ((\p -> B.putStr p >> B.putStr "\n") . pkgbuild) pbs | 246 | displayPkgbuild ps = do
man <- asks (managerOf . settings)
pbs <- catMaybes <$> traverse (liftIO . getPkgbuild man) (toList ps)
traverse_ ((\p -> B.putStr p >> B.putStr "\n") . pkgbuild) pbs | 196 | false | true | 0 | 14 | 45 | 114 | 54 | 60 | null | null |
ghcjs/ghcjs | src-bin/Boot.hs | mit | optParser' :: ParserInfo BootSettings
optParser' =
O.info (helper <*> optParser)
(fullDesc <>
header "GHCJS booter, build base libraries for the compiler" <>
progDesc description) | 210 | optParser' :: ParserInfo BootSettings
optParser' =
O.info (helper <*> optParser)
(fullDesc <>
header "GHCJS booter, build base libraries for the compiler" <>
progDesc description) | 210 | optParser' =
O.info (helper <*> optParser)
(fullDesc <>
header "GHCJS booter, build base libraries for the compiler" <>
progDesc description) | 172 | false | true | 0 | 9 | 54 | 45 | 22 | 23 | null | null |
dorchard/camfort | src/Camfort/Transformation/CommonBlockElim.hs | apache-2.0 | collectAndRmCommons :: FAT.TypeEnv -> Filename -> F.ProgramUnitName
-> F.Block A1 -> CommonState (F.Block A1)
collectAndRmCommons tenv fname pname = transformBiM commons
where
commons :: F.Statement A1 -> CommonState (F.Statement A1)
commons (F.StCommon a s@(FU.SrcSpan p1 _) cgrps) = do
mapM_ commonGroups (F.aStrip cgrps)
let a' = onPrev (\ap -> ap {refactored = Just p1, deleteNode = True}) a
return $ F.StCommon a' (deleteLine s) (F.AList a s [])
commons f = return f
punitName (F.Named s) = s
punitName _ = ""
-- Process a common group, adding blocks to the common state
commonGroups :: F.CommonGroup A1 -> CommonState ()
commonGroups (F.CommonGroup _ (FU.SrcSpan p1 _) cname exprs) = do
let r' = show p1 ++ ": removed common declaration\n"
let tcommon = map typeCommonExprs (F.aStrip exprs)
let info = (fname, (punitName pname, (commonNameFromAST cname, tcommon)))
modify (\(r, infos) -> (r ++ r', info : infos))
typeCommonExprs :: F.Expression A1 -> (F.Name, F.BaseType)
typeCommonExprs (F.ExpValue _ sp (F.ValVariable v)) =
case M.lookup v tenv of
Just (FA.IDType (Just t) (Just FA.CTVariable)) -> (v, t)
Just (FA.IDType (Just t) (Just FA.CTArray)) -> (v, t)
_ -> error $ "Variable '" ++ show v
++ "' is of an unknown or higher-order type at: " ++ show sp
++ show (M.lookup v tenv)
typeCommonExprs e = error $ "Not expecting a non-variable expression \
\in expression at: " ++ show (FU.getSpan e)
{- Comparison functions for common block names and variables -} | 1,684 | collectAndRmCommons :: FAT.TypeEnv -> Filename -> F.ProgramUnitName
-> F.Block A1 -> CommonState (F.Block A1)
collectAndRmCommons tenv fname pname = transformBiM commons
where
commons :: F.Statement A1 -> CommonState (F.Statement A1)
commons (F.StCommon a s@(FU.SrcSpan p1 _) cgrps) = do
mapM_ commonGroups (F.aStrip cgrps)
let a' = onPrev (\ap -> ap {refactored = Just p1, deleteNode = True}) a
return $ F.StCommon a' (deleteLine s) (F.AList a s [])
commons f = return f
punitName (F.Named s) = s
punitName _ = ""
-- Process a common group, adding blocks to the common state
commonGroups :: F.CommonGroup A1 -> CommonState ()
commonGroups (F.CommonGroup _ (FU.SrcSpan p1 _) cname exprs) = do
let r' = show p1 ++ ": removed common declaration\n"
let tcommon = map typeCommonExprs (F.aStrip exprs)
let info = (fname, (punitName pname, (commonNameFromAST cname, tcommon)))
modify (\(r, infos) -> (r ++ r', info : infos))
typeCommonExprs :: F.Expression A1 -> (F.Name, F.BaseType)
typeCommonExprs (F.ExpValue _ sp (F.ValVariable v)) =
case M.lookup v tenv of
Just (FA.IDType (Just t) (Just FA.CTVariable)) -> (v, t)
Just (FA.IDType (Just t) (Just FA.CTArray)) -> (v, t)
_ -> error $ "Variable '" ++ show v
++ "' is of an unknown or higher-order type at: " ++ show sp
++ show (M.lookup v tenv)
typeCommonExprs e = error $ "Not expecting a non-variable expression \
\in expression at: " ++ show (FU.getSpan e)
{- Comparison functions for common block names and variables -} | 1,684 | collectAndRmCommons tenv fname pname = transformBiM commons
where
commons :: F.Statement A1 -> CommonState (F.Statement A1)
commons (F.StCommon a s@(FU.SrcSpan p1 _) cgrps) = do
mapM_ commonGroups (F.aStrip cgrps)
let a' = onPrev (\ap -> ap {refactored = Just p1, deleteNode = True}) a
return $ F.StCommon a' (deleteLine s) (F.AList a s [])
commons f = return f
punitName (F.Named s) = s
punitName _ = ""
-- Process a common group, adding blocks to the common state
commonGroups :: F.CommonGroup A1 -> CommonState ()
commonGroups (F.CommonGroup _ (FU.SrcSpan p1 _) cname exprs) = do
let r' = show p1 ++ ": removed common declaration\n"
let tcommon = map typeCommonExprs (F.aStrip exprs)
let info = (fname, (punitName pname, (commonNameFromAST cname, tcommon)))
modify (\(r, infos) -> (r ++ r', info : infos))
typeCommonExprs :: F.Expression A1 -> (F.Name, F.BaseType)
typeCommonExprs (F.ExpValue _ sp (F.ValVariable v)) =
case M.lookup v tenv of
Just (FA.IDType (Just t) (Just FA.CTVariable)) -> (v, t)
Just (FA.IDType (Just t) (Just FA.CTArray)) -> (v, t)
_ -> error $ "Variable '" ++ show v
++ "' is of an unknown or higher-order type at: " ++ show sp
++ show (M.lookup v tenv)
typeCommonExprs e = error $ "Not expecting a non-variable expression \
\in expression at: " ++ show (FU.getSpan e)
{- Comparison functions for common block names and variables -} | 1,559 | false | true | 1 | 15 | 455 | 624 | 307 | 317 | null | null |
sumitsahrawat/IHaskell | ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Types.hs | mit | triggerClick :: (S.ClickHandler ∈ WidgetFields w) => IPythonWidget w -> IO ()
triggerClick = triggerEvent ClickHandler | 118 | triggerClick :: (S.ClickHandler ∈ WidgetFields w) => IPythonWidget w -> IO ()
triggerClick = triggerEvent ClickHandler | 118 | triggerClick = triggerEvent ClickHandler | 40 | false | true | 0 | 8 | 15 | 42 | 20 | 22 | null | null |
ancientlanguage/haskell-analysis | grammar/src/Grammar/Common/Decompose.hs | mit | decomposeChar '\x2F9C2' = "\x45F9" | 34 | decomposeChar '\x2F9C2' = "\x45F9" | 34 | decomposeChar '\x2F9C2' = "\x45F9" | 34 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
bitemyapp/ghc | compiler/basicTypes/RdrName.hs | bsd-3-clause | isSrcRdrName :: RdrName -> Bool
isSrcRdrName (Unqual _) = True | 62 | isSrcRdrName :: RdrName -> Bool
isSrcRdrName (Unqual _) = True | 62 | isSrcRdrName (Unqual _) = True | 30 | false | true | 0 | 7 | 9 | 24 | 12 | 12 | null | null |
brendanhay/gogol | gogol-apps-calendar/gen/Network/Google/Resource/Calendar/CalendarList/List.hs | mpl-2.0 | -- | Whether to include deleted calendar list entries in the result.
-- Optional. The default is False.
cllShowDeleted :: Lens' CalendarListList (Maybe Bool)
cllShowDeleted
= lens _cllShowDeleted
(\ s a -> s{_cllShowDeleted = a}) | 237 | cllShowDeleted :: Lens' CalendarListList (Maybe Bool)
cllShowDeleted
= lens _cllShowDeleted
(\ s a -> s{_cllShowDeleted = a}) | 133 | cllShowDeleted
= lens _cllShowDeleted
(\ s a -> s{_cllShowDeleted = a}) | 79 | true | true | 0 | 9 | 42 | 49 | 26 | 23 | null | null |
jml/difftodo | cmd/all-todos/Main.hs | apache-2.0 | options :: ParserInfo [FilePath]
options =
info (helper <*> parser) description
where
parser = many (argument str (metavar "FILES..."))
description = mconcat
[ fullDesc
, progDesc "Find all todos from source code"
, header "all-todos - Get all todos in source code"
] | 304 | options :: ParserInfo [FilePath]
options =
info (helper <*> parser) description
where
parser = many (argument str (metavar "FILES..."))
description = mconcat
[ fullDesc
, progDesc "Find all todos from source code"
, header "all-todos - Get all todos in source code"
] | 304 | options =
info (helper <*> parser) description
where
parser = many (argument str (metavar "FILES..."))
description = mconcat
[ fullDesc
, progDesc "Find all todos from source code"
, header "all-todos - Get all todos in source code"
] | 271 | false | true | 2 | 8 | 79 | 90 | 40 | 50 | null | null |
sgillespie/lambda-calculus | src/Language/Lambda/Parser.hs | mit | term :: Parser (LambdaExpr String)
term = let' <|> abs <|> var <|> parens | 73 | term :: Parser (LambdaExpr String)
term = let' <|> abs <|> var <|> parens | 73 | term = let' <|> abs <|> var <|> parens | 38 | false | true | 8 | 6 | 13 | 44 | 20 | 24 | null | null |
brendanhay/apteryx | apteryx/System/APT/Types.hs | mpl-2.0 | sizeOf :: Package -> Int64
sizeOf = unSize . statSize . stat | 60 | sizeOf :: Package -> Int64
sizeOf = unSize . statSize . stat | 60 | sizeOf = unSize . statSize . stat | 33 | false | true | 0 | 6 | 11 | 23 | 12 | 11 | null | null |
scslab/iterIO | Data/IterIO/Http.hs | bsd-3-clause | mkStat :: Int -> String -> HttpStatus
mkStat n s = HttpStatus n $ S8.pack s | 75 | mkStat :: Int -> String -> HttpStatus
mkStat n s = HttpStatus n $ S8.pack s | 75 | mkStat n s = HttpStatus n $ S8.pack s | 37 | false | true | 0 | 8 | 15 | 41 | 18 | 23 | null | null |
ExNexu/Idris-dev | src/Idris/AbsSyntaxTree.hs | bsd-3-clause | mapPDeclFC f g (PInstance doc paramDocs syn fc constrs cn cnfc params instTy instN body) =
PInstance doc paramDocs syn (f fc)
(map (\(constrN, constrT) -> (constrN, mapPTermFC f g constrT)) constrs)
cn (g cnfc) (map (mapPTermFC f g) params)
(mapPTermFC f g instTy)
instN
(map (mapPDeclFC f g) body) | 372 | mapPDeclFC f g (PInstance doc paramDocs syn fc constrs cn cnfc params instTy instN body) =
PInstance doc paramDocs syn (f fc)
(map (\(constrN, constrT) -> (constrN, mapPTermFC f g constrT)) constrs)
cn (g cnfc) (map (mapPTermFC f g) params)
(mapPTermFC f g instTy)
instN
(map (mapPDeclFC f g) body) | 372 | mapPDeclFC f g (PInstance doc paramDocs syn fc constrs cn cnfc params instTy instN body) =
PInstance doc paramDocs syn (f fc)
(map (\(constrN, constrT) -> (constrN, mapPTermFC f g constrT)) constrs)
cn (g cnfc) (map (mapPTermFC f g) params)
(mapPTermFC f g instTy)
instN
(map (mapPDeclFC f g) body) | 372 | false | false | 0 | 10 | 123 | 163 | 77 | 86 | null | null |
goshakkk/lisley | src/Lisley/Eval.hs | mit | eval env badForm = throwError $ BadSpecialForm "Unrecognized special form" badForm | 82 | eval env badForm = throwError $ BadSpecialForm "Unrecognized special form" badForm | 82 | eval env badForm = throwError $ BadSpecialForm "Unrecognized special form" badForm | 82 | false | false | 1 | 6 | 10 | 24 | 9 | 15 | null | null |
OS2World/DEV-UTIL-HUGS | libraries/Graphics/Rendering/OpenGL/GLU/Initialization.hs | bsd-3-clause | marshalStringName :: StringName -> GLenum
marshalStringName x = case x of
Version -> 0x189c0
Extensions -> 0x189c1
-------------------------------------------------------------------------------- | 202 | marshalStringName :: StringName -> GLenum
marshalStringName x = case x of
Version -> 0x189c0
Extensions -> 0x189c1
-------------------------------------------------------------------------------- | 202 | marshalStringName x = case x of
Version -> 0x189c0
Extensions -> 0x189c1
-------------------------------------------------------------------------------- | 160 | false | true | 0 | 8 | 24 | 41 | 19 | 22 | null | null |
keera-studios/hsQt | Qtc/Enums/Gui/QAbstractItemView.hs | bsd-2-clause | eMovePageDown :: CursorAction
eMovePageDown
= ieCursorAction $ 7 | 66 | eMovePageDown :: CursorAction
eMovePageDown
= ieCursorAction $ 7 | 66 | eMovePageDown
= ieCursorAction $ 7 | 36 | false | true | 2 | 6 | 9 | 23 | 9 | 14 | null | null |
hanshoglund/hamid | src/System/MacOSX/CoreMIDI.hs | bsd-3-clause | ewSource :: MIDIClientRef -> String -> IO Source
newSource client name = do
src <- newEndpoint c_MIDISourceCreate client name
return $ Source src
-- |Creates a new MIDI destination with the given name.
| 221 | newSource :: MIDIClientRef -> String -> IO Source
newSource client name = do
src <- newEndpoint c_MIDISourceCreate client name
return $ Source src
-- |Creates a new MIDI destination with the given name. | 221 | newSource client name = do
src <- newEndpoint c_MIDISourceCreate client name
return $ Source src
-- |Creates a new MIDI destination with the given name. | 171 | false | true | 0 | 8 | 52 | 52 | 24 | 28 | null | null |
anton-k/language-css | src/Language/Css/Build/Idents.hs | bsd-3-clause | -- | x-slow
xSlow :: Idents a => a
xSlow = ident "x-slow" | 57 | xSlow :: Idents a => a
xSlow = ident "x-slow" | 45 | xSlow = ident "x-slow" | 22 | true | true | 0 | 7 | 12 | 28 | 12 | 16 | null | null |
harrisi/on-being-better | list-expansion/Haskell/course/src/Course/List.hs | cc0-1.0 | unlines ::
List Chars
-> Chars
unlines =
listh . P.unlines . hlist . map hlist | 84 | unlines ::
List Chars
-> Chars
unlines =
listh . P.unlines . hlist . map hlist | 84 | unlines =
listh . P.unlines . hlist . map hlist | 49 | false | true | 0 | 8 | 21 | 38 | 17 | 21 | null | null |
myShoggoth/shakespeare | Text/Hamlet/Parse.hs | mit | attrToContent (Attribute (Nothing, k, [(Nothing, Nothing)])) _ _ = [DocContent $ ContentRaw $ ' ' : k] | 102 | attrToContent (Attribute (Nothing, k, [(Nothing, Nothing)])) _ _ = [DocContent $ ContentRaw $ ' ' : k] | 102 | attrToContent (Attribute (Nothing, k, [(Nothing, Nothing)])) _ _ = [DocContent $ ContentRaw $ ' ' : k] | 102 | false | false | 0 | 10 | 16 | 52 | 29 | 23 | null | null |
leshchevds/ganeti | src/Ganeti/Utils.hs | bsd-2-clause | parseChoices name s [(_, e)] =
fail $ name ++ ": leftover characters when parsing '"
++ s ++ "': '" ++ e ++ "'" | 126 | parseChoices name s [(_, e)] =
fail $ name ++ ": leftover characters when parsing '"
++ s ++ "': '" ++ e ++ "'" | 126 | parseChoices name s [(_, e)] =
fail $ name ++ ": leftover characters when parsing '"
++ s ++ "': '" ++ e ++ "'" | 126 | false | false | 8 | 6 | 39 | 54 | 24 | 30 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.