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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
itkovian/number-six | src/NumberSix/Irc.hs | bsd-3-clause | -- | Get the IRC prefix
--
getPrefix :: Irc Prefix
getPrefix = do
Just prefix <- messagePrefix . ircMessage <$> ask
return prefix
-- | Obtain the actual IRC command: the result from this function will always be
-- in uppercase.
-- | 239 | getPrefix :: Irc Prefix
getPrefix = do
Just prefix <- messagePrefix . ircMessage <$> ask
return prefix
-- | Obtain the actual IRC command: the result from this function will always be
-- in uppercase.
-- | 212 | getPrefix = do
Just prefix <- messagePrefix . ircMessage <$> ask
return prefix
-- | Obtain the actual IRC command: the result from this function will always be
-- in uppercase.
-- | 188 | true | true | 0 | 9 | 51 | 43 | 22 | 21 | null | null |
michalkonecny/aern2 | aern2-mfun/src/AERN2/Linear/Vector/Type.hs | bsd-3-clause | zipWith :: (a -> b -> c) -> Vector a -> Vector b -> Vector c
zipWith = V.zipWith | 80 | zipWith :: (a -> b -> c) -> Vector a -> Vector b -> Vector c
zipWith = V.zipWith | 80 | zipWith = V.zipWith | 19 | false | true | 0 | 8 | 18 | 45 | 22 | 23 | null | null |
kazu-yamamoto/webserver | Network/Web/Server.hs | bsd-3-clause | ----------------------------------------------------------------
{-|
A function to run an 'WebServer'. 'Handle' should be mode by
converting an accepted socket.
Keep-alive / termination of HTTP 1.0 and HTTP 1.1 is correctly handled.
So, 'WebServer' need not to handle the Connection: header in response.
The D... | 717 | connection :: Handle -> WebServer -> WebConfig -> IO ()
connection hdl srv cnf = session hdl srv cnf `catches` serverError
where
serverError =
[Handler (\e -> closedHook cnf (show (e::ServerException))),
Handler (\e -> errorHook cnf (show (e::SomeException)))]
--------------------------------------... | 346 | connection hdl srv cnf = session hdl srv cnf `catches` serverError
where
serverError =
[Handler (\e -> closedHook cnf (show (e::ServerException))),
Handler (\e -> errorHook cnf (show (e::SomeException)))]
---------------------------------------------------------------- | 290 | true | true | 0 | 12 | 119 | 121 | 65 | 56 | null | null |
jcristovao/persistent | persistent/Database/Persist/Sql/Run.hs | mit | withSqlConn :: (MonadIO m, MonadBaseControl IO m, MonadLogger m)
=> (LogFunc -> IO SqlBackend) -> (SqlBackend -> m a) -> m a
withSqlConn open f = do
logFunc <- askLogFunc
bracket (liftIO $ open logFunc) (liftIO . close') f | 242 | withSqlConn :: (MonadIO m, MonadBaseControl IO m, MonadLogger m)
=> (LogFunc -> IO SqlBackend) -> (SqlBackend -> m a) -> m a
withSqlConn open f = do
logFunc <- askLogFunc
bracket (liftIO $ open logFunc) (liftIO . close') f | 242 | withSqlConn open f = do
logFunc <- askLogFunc
bracket (liftIO $ open logFunc) (liftIO . close') f | 105 | false | true | 0 | 11 | 58 | 109 | 52 | 57 | null | null |
brendanhay/gogol | gogol-jobs/gen/Network/Google/Jobs/Types.hs | mpl-2.0 | -- | Default request referring to version 'v4' of the Cloud Talent Solution API. This contains the host and root path used as a starting point for constructing service requests.
jobsService :: ServiceConfig
jobsService
= defaultService (ServiceId "jobs:v4")
"jobs.googleapis.com" | 287 | jobsService :: ServiceConfig
jobsService
= defaultService (ServiceId "jobs:v4")
"jobs.googleapis.com" | 109 | jobsService
= defaultService (ServiceId "jobs:v4")
"jobs.googleapis.com" | 80 | true | true | 0 | 6 | 46 | 31 | 13 | 18 | null | null |
fmapfmapfmap/amazonka | amazonka-cloudsearch-domains/gen/Network/AWS/CloudSearchDomains/Types/Product.hs | mpl-2.0 | -- | How long it took to process the request, in milliseconds.
ssTimems :: Lens' SuggestStatus (Maybe Integer)
ssTimems = lens _ssTimems (\ s a -> s{_ssTimems = a}) | 164 | ssTimems :: Lens' SuggestStatus (Maybe Integer)
ssTimems = lens _ssTimems (\ s a -> s{_ssTimems = a}) | 101 | ssTimems = lens _ssTimems (\ s a -> s{_ssTimems = a}) | 53 | true | true | 0 | 9 | 28 | 46 | 25 | 21 | null | null |
rvion/ride | jetpack/src/Network/Wai/Handler/Warp/AsWai.hs | bsd-3-clause | get_wai_connSendAll o = I.connSendAll o | 39 | get_wai_connSendAll o = I.connSendAll o | 39 | get_wai_connSendAll o = I.connSendAll o | 39 | false | false | 0 | 6 | 4 | 14 | 6 | 8 | null | null |
mikeplus64/indices | src/Data/Index.hs | mit | nextTagged :: Dim a => Tagged (Succ n) a -> Tagged n a
nextTagged (Tagged a) = Tagged (next a) | 94 | nextTagged :: Dim a => Tagged (Succ n) a -> Tagged n a
nextTagged (Tagged a) = Tagged (next a) | 94 | nextTagged (Tagged a) = Tagged (next a) | 39 | false | true | 0 | 9 | 19 | 60 | 27 | 33 | null | null |
pgj/bead | src/Bead/View/Content/Bootstrap.hs | bsd-3-clause | -- | Creates a bootstrap page header
pageHeader = H.div ! class_ "page-header" | 78 | pageHeader = H.div ! class_ "page-header" | 41 | pageHeader = H.div ! class_ "page-header" | 41 | true | false | 0 | 6 | 12 | 16 | 8 | 8 | null | null |
ony/Yampa-core | tests/AFRPTestsComp.hs | bsd-3-clause | comp_t5r :: [Double]
comp_t5r =
[0.0,0.5,1.0,1.5,2.0,2.5,3.0,3.5,4.0,4.5,5.0,5.5,6.0,6.5,7.0,7.5,8.0,8.5,
9.0,9.5,10.0,10.5,11.0,11.5,12.0] | 148 | comp_t5r :: [Double]
comp_t5r =
[0.0,0.5,1.0,1.5,2.0,2.5,3.0,3.5,4.0,4.5,5.0,5.5,6.0,6.5,7.0,7.5,8.0,8.5,
9.0,9.5,10.0,10.5,11.0,11.5,12.0] | 148 | comp_t5r =
[0.0,0.5,1.0,1.5,2.0,2.5,3.0,3.5,4.0,4.5,5.0,5.5,6.0,6.5,7.0,7.5,8.0,8.5,
9.0,9.5,10.0,10.5,11.0,11.5,12.0] | 127 | false | true | 0 | 7 | 15 | 96 | 59 | 37 | null | null |
rkoeninger/GameCom | src/lib/CPU.hs | mit | decode 0x51 = (eor, iiyMode, 5) | 31 | decode 0x51 = (eor, iiyMode, 5) | 31 | decode 0x51 = (eor, iiyMode, 5) | 31 | false | false | 0 | 5 | 5 | 18 | 10 | 8 | null | null |
kumasento/accelerate | Data/Array/Accelerate/Trafo/Algebra.hs | bsd-3-clause | evalSig (FloatingNumType ty) | FloatingDict <- floatingDict ty = eval1 signum | 77 | evalSig (FloatingNumType ty) | FloatingDict <- floatingDict ty = eval1 signum | 77 | evalSig (FloatingNumType ty) | FloatingDict <- floatingDict ty = eval1 signum | 77 | false | false | 0 | 9 | 10 | 31 | 13 | 18 | null | null |
mikusp/accelerate-cuda | Data/Array/Accelerate/CUDA/CodeGen/Type.hs | bsd-3-clause | codegenIntegralType (TypeInt64 _) = typename "Int64" | 54 | codegenIntegralType (TypeInt64 _) = typename "Int64" | 54 | codegenIntegralType (TypeInt64 _) = typename "Int64" | 54 | false | false | 0 | 6 | 7 | 19 | 8 | 11 | null | null |
romanofski/gtfsbrisbane | src/GTFS/Realtime/Internal/Com/Google/Transit/Realtime/Alert/Cause.hs | bsd-3-clause | toMaybe'Enum 6 = Prelude'.Just ACCIDENT | 39 | toMaybe'Enum 6 = Prelude'.Just ACCIDENT | 39 | toMaybe'Enum 6 = Prelude'.Just ACCIDENT | 39 | false | false | 0 | 6 | 4 | 14 | 6 | 8 | null | null |
rueshyna/gogol | gogol-affiliates/gen/Network/Google/Affiliates/Types/Product.hs | mpl-2.0 | -- | The sum of fees paid to publishers divided by the total number of clicks
-- over the past three months. This value should be multiplied by 100 at
-- the time of display.
advEpcNinetyDayAverage :: Lens' Advertiser (Maybe Money)
advEpcNinetyDayAverage
= lens _advEpcNinetyDayAverage
(\ s a -> s{_advEpcNinetyD... | 335 | advEpcNinetyDayAverage :: Lens' Advertiser (Maybe Money)
advEpcNinetyDayAverage
= lens _advEpcNinetyDayAverage
(\ s a -> s{_advEpcNinetyDayAverage = a}) | 160 | advEpcNinetyDayAverage
= lens _advEpcNinetyDayAverage
(\ s a -> s{_advEpcNinetyDayAverage = a}) | 103 | true | true | 1 | 9 | 59 | 54 | 27 | 27 | null | null |
Teaspot-Studio/bmstu-binary-genetics-haste | Binary/Application.hs | bsd-3-clause | resultPlot :: Input -> Int -> Int -> Maybe Double -> Widget ()
resultPlot input dwidth dheight maybeSolution =
div ! atr "class" "col-md-6" <<< plotWidget
(PlotState $ sample (-10) (10) 50 $ userFunction input)
[(sample (-10) (10) 4 $ const $ inputExpected input, RGB 50 250 50)]
"Y" "X" ( 0.4 * fromInt... | 489 | resultPlot :: Input -> Int -> Int -> Maybe Double -> Widget ()
resultPlot input dwidth dheight maybeSolution =
div ! atr "class" "col-md-6" <<< plotWidget
(PlotState $ sample (-10) (10) 50 $ userFunction input)
[(sample (-10) (10) 4 $ const $ inputExpected input, RGB 50 250 50)]
"Y" "X" ( 0.4 * fromInt... | 489 | resultPlot input dwidth dheight maybeSolution =
div ! atr "class" "col-md-6" <<< plotWidget
(PlotState $ sample (-10) (10) 50 $ userFunction input)
[(sample (-10) (10) 4 $ const $ inputExpected input, RGB 50 250 50)]
"Y" "X" ( 0.4 * fromIntegral dwidth, fromIntegral dheight * 0.4) 2 2
(maybe [] (\c... | 426 | false | true | 0 | 11 | 94 | 213 | 106 | 107 | null | null |
adituv/qbscript | src/Compiler/QbScript/Parser.hs | bsd-3-clause | -- * Lexer
alpha :: [Char]
alpha = ['A'..'Z'] ++ ['a'..'z'] | 60 | alpha :: [Char]
alpha = ['A'..'Z'] ++ ['a'..'z'] | 48 | alpha = ['A'..'Z'] ++ ['a'..'z'] | 32 | true | true | 0 | 6 | 11 | 29 | 17 | 12 | null | null |
travisbrown/sentlex | src/Sentlex.hs | apache-2.0 | relevantSeedsToV :: Dictionary -> (Relation -> Double) -> Int -> [((Category,String),Double)] -> Array Int Double
relevantSeedsToV d s it seeds = accumArray (+) 0.0 bnds $ concat $ map (\(a,b) -> map (\((c,_),_) -> (c,b)) a) rels -- $ map (map (\(((a,_),v),_) -> (a,v)) . {-relevant .-}
where
rels = map (relevan... | 455 | relevantSeedsToV :: Dictionary -> (Relation -> Double) -> Int -> [((Category,String),Double)] -> Array Int Double
relevantSeedsToV d s it seeds = accumArray (+) 0.0 bnds $ concat $ map (\(a,b) -> map (\((c,_),_) -> (c,b)) a) rels -- $ map (map (\(((a,_),v),_) -> (a,v)) . {-relevant .-}
where
rels = map (relevan... | 455 | relevantSeedsToV d s it seeds = accumArray (+) 0.0 bnds $ concat $ map (\(a,b) -> map (\((c,_),_) -> (c,b)) a) rels -- $ map (map (\(((a,_),v),_) -> (a,v)) . {-relevant .-}
where
rels = map (relevant . (uncurry $ rateSenses d s it)) $ withComp seeds
bnds = bounds $ wdWordSenses d
withComp xs = map (\x -... | 341 | false | true | 0 | 13 | 93 | 214 | 116 | 98 | null | null |
daniel-j-h/asm-js-hs | src/Main.hs | bsd-3-clause | f1 :: JsFunction Int
f1 = JsFunction "f1" e1 | 44 | f1 :: JsFunction Int
f1 = JsFunction "f1" e1 | 44 | f1 = JsFunction "f1" e1 | 23 | false | true | 0 | 5 | 8 | 19 | 9 | 10 | null | null |
crooney/cinder | src/Cinder/DSL.hs | bsd-3-clause | (!:) :: Markup -> DString -> Markup
m !: v = m ! Content v | 58 | (!:) :: Markup -> DString -> Markup
m !: v = m ! Content v | 58 | m !: v = m ! Content v | 22 | false | true | 0 | 9 | 14 | 38 | 18 | 20 | null | null |
haroldcarr/learn-haskell-coq-ml-etc | haskell/topic/monads/wiki-haskell-org_all-about-monads/src/X_16_example.hs | unlicense | -- turn a named template into a (name,template) pair
stripName :: NamedTemplate -> (String, Template)
stripName (NT n t) = (n,t) | 128 | stripName :: NamedTemplate -> (String, Template)
stripName (NT n t) = (n,t) | 75 | stripName (NT n t) = (n,t) | 26 | true | true | 0 | 7 | 20 | 39 | 22 | 17 | null | null |
snoyberg/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | gHC_CSTRING = mkPrimModule (fsLit "GHC.CString") | 52 | gHC_CSTRING = mkPrimModule (fsLit "GHC.CString") | 52 | gHC_CSTRING = mkPrimModule (fsLit "GHC.CString") | 52 | false | false | 0 | 7 | 8 | 15 | 7 | 8 | null | null |
kawu/concraft | src/NLP/Concraft/Guess.hs | bsd-2-clause | -- | Insert guessing results into the sentence. Only interpretations
-- of OOV words will be extended.
include :: (X.Word w, Ord t) => [[t]] -> X.Sent w t -> X.Sent w t
include xss sent =
[ word { X.tags = tags }
| (word, tags) <- zip sent sentTags ]
where
sentTags =
[ if X.oov word
t... | 552 | include :: (X.Word w, Ord t) => [[t]] -> X.Sent w t -> X.Sent w t
include xss sent =
[ word { X.tags = tags }
| (word, tags) <- zip sent sentTags ]
where
sentTags =
[ if X.oov word
then addInterps (X.tags word) xs
else X.tags word
| (xs, word) <- zip xss sent ]
... | 448 | include xss sent =
[ word { X.tags = tags }
| (word, tags) <- zip sent sentTags ]
where
sentTags =
[ if X.oov word
then addInterps (X.tags word) xs
else X.tags word
| (xs, word) <- zip xss sent ]
addInterps wm xs = X.mkWMap
$ M.toList (X.unWMap wm)
... | 382 | true | true | 0 | 10 | 173 | 202 | 106 | 96 | null | null |
gcampax/ghc | compiler/basicTypes/Id.hs | bsd-3-clause | mkUserLocalM :: MonadUnique m => OccName -> Type -> SrcSpan -> m Id
mkUserLocalM occ ty loc = getUniqueM >>= (\uniq -> return (mkUserLocal occ uniq ty loc)) | 156 | mkUserLocalM :: MonadUnique m => OccName -> Type -> SrcSpan -> m Id
mkUserLocalM occ ty loc = getUniqueM >>= (\uniq -> return (mkUserLocal occ uniq ty loc)) | 156 | mkUserLocalM occ ty loc = getUniqueM >>= (\uniq -> return (mkUserLocal occ uniq ty loc)) | 88 | false | true | 0 | 10 | 27 | 67 | 33 | 34 | null | null |
wayofthepie/neo4j-bolt | test/PackStream/Internal/MessageSpec.hs | bsd-3-clause | int16TestData = IntTypeTest
"packInt16" "unpackInt16" (6000 :: Int16)
int16Init S.putWord16be packInt16 unpackInt16 | 123 | int16TestData = IntTypeTest
"packInt16" "unpackInt16" (6000 :: Int16)
int16Init S.putWord16be packInt16 unpackInt16 | 123 | int16TestData = IntTypeTest
"packInt16" "unpackInt16" (6000 :: Int16)
int16Init S.putWord16be packInt16 unpackInt16 | 123 | false | false | 0 | 6 | 19 | 30 | 15 | 15 | null | null |
pparkkin/eta | compiler/ETA/Prelude/PrelNames.hs | bsd-3-clause | unpackCStringUtf8_RDR = nameRdrName unpackCStringUtf8Name | 59 | unpackCStringUtf8_RDR = nameRdrName unpackCStringUtf8Name | 59 | unpackCStringUtf8_RDR = nameRdrName unpackCStringUtf8Name | 59 | false | false | 0 | 5 | 5 | 9 | 4 | 5 | null | null |
TravisWhitaker/rdf | src/Data/RDF/Graph.hs | mit | graphRDF :: G.Graph g => Maybe IRI -> g GNode GEdge -> Either String RDFGraph
graphRDF l = (RDFGraph l <$>) . graphTriples | 123 | graphRDF :: G.Graph g => Maybe IRI -> g GNode GEdge -> Either String RDFGraph
graphRDF l = (RDFGraph l <$>) . graphTriples | 123 | graphRDF l = (RDFGraph l <$>) . graphTriples | 45 | false | true | 0 | 8 | 23 | 55 | 26 | 29 | null | null |
purcell/adventofcodeteam | app/TwentyTwo.hs | bsd-3-clause | availableSpells :: Player -> Boss -> [(Char, Spell, Int)]
availableSpells player boss = filter (spellIsAvailable player boss) spellBook | 135 | availableSpells :: Player -> Boss -> [(Char, Spell, Int)]
availableSpells player boss = filter (spellIsAvailable player boss) spellBook | 135 | availableSpells player boss = filter (spellIsAvailable player boss) spellBook | 77 | false | true | 0 | 8 | 17 | 53 | 27 | 26 | null | null |
sleexyz/untyped | src/Lib.hs | bsd-3-clause | eval :: Prog -> Prog
eval (Prog value ctx) = case value of
-- Do Nothing
Lambda name expr -> Prog (Lambda name expr) ctx
Prim name expr -> Prog (Prim name expr) ctx
-- Step
Var name -> evalVar name
Apply f x -> evalApply f x
where
evalVar :: Name -> Prog
evalVar name = f $... | 976 | eval :: Prog -> Prog
eval (Prog value ctx) = case value of
-- Do Nothing
Lambda name expr -> Prog (Lambda name expr) ctx
Prim name expr -> Prog (Prim name expr) ctx
-- Step
Var name -> evalVar name
Apply f x -> evalApply f x
where
evalVar :: Name -> Prog
evalVar name = f $... | 976 | eval (Prog value ctx) = case value of
-- Do Nothing
Lambda name expr -> Prog (Lambda name expr) ctx
Prim name expr -> Prog (Prim name expr) ctx
-- Step
Var name -> evalVar name
Apply f x -> evalApply f x
where
evalVar :: Name -> Prog
evalVar name = f $ ctxLookup ctx name
... | 955 | false | true | 0 | 11 | 293 | 325 | 159 | 166 | null | null |
ezyang/ghc | testsuite/tests/typecheck/should_compile/T12734a.hs | bsd-3-clause | test_gr :: forall m t lrs bind.
( Con m (TStk t lrs)
, bind ~ Expr t lrs
-- ) => m (Expr t lrs) -- GHC 8 worked if you said this...
) => m bind -- but not this!
test_gr = undefined | 240 | test_gr :: forall m t lrs bind.
( Con m (TStk t lrs)
, bind ~ Expr t lrs
-- ) => m (Expr t lrs) -- GHC 8 worked if you said this...
) => m bind
test_gr = undefined | 209 | test_gr = undefined | 19 | true | true | 0 | 9 | 104 | 56 | 31 | 25 | null | null |
nomeata/ghc | compiler/llvmGen/LlvmCodeGen.hs | bsd-3-clause | -- -----------------------------------------------------------------------------
-- | Do LLVM code generation on all these Cmms procs.
--
cmmProcLlvmGens :: DynFlags -> BufHandle -> UniqSupply -> LlvmEnv -> [RawCmmDecl]
-> Int -- ^ count, used for generating unique subsections
-> [[LlvmVar]] -- ^ in... | 424 | cmmProcLlvmGens :: DynFlags -> BufHandle -> UniqSupply -> LlvmEnv -> [RawCmmDecl]
-> Int -- ^ count, used for generating unique subsections
-> [[LlvmVar]] -- ^ info tables that need to be marked as 'used'
-> IO ()
cmmProcLlvmGens _ _ _ _ [] _ []
= return () | 285 | cmmProcLlvmGens _ _ _ _ [] _ []
= return () | 45 | true | true | 0 | 14 | 90 | 87 | 45 | 42 | null | null |
lgeorget/ogmarkup | src/Text/Ogmarkup/Private/Generator.hs | mit | -- | Apply a template to the result of a given 'Generator' before appending it
-- to the previously generated output.
apply :: Monoid a
=> Template a -- ^ The 'Template' to apply
-> Generator c a x -- ^ The 'Generator' to run
-> Generator c a ()
apply app gen = do
(str, maybe) <- get
put ... | 500 | apply :: Monoid a
=> Template a -- ^ The 'Template' to apply
-> Generator c a x -- ^ The 'Generator' to run
-> Generator c a ()
apply app gen = do
(str, maybe) <- get
put (mempty, maybe)
gen
(str', maybe') <- get
put (str `mappend` app str', maybe')
-- | Forget about the past and con... | 380 | apply app gen = do
(str, maybe) <- get
put (mempty, maybe)
gen
(str', maybe') <- get
put (str `mappend` app str', maybe')
-- | Forget about the past and consider the next 'Ast.Atom' as the
-- first to be processed. | 227 | true | true | 0 | 10 | 130 | 118 | 61 | 57 | null | null |
genos/online_problems | advent_of_code_2016/day10/src/Main.hs | mit | attempt :: Instruction -> Factory -> Maybe Factory
attempt (GoesTo v k) f = do
let b = updateBot v $ f `botOrNew` k
return $! f & bots . at k ?~ b | 150 | attempt :: Instruction -> Factory -> Maybe Factory
attempt (GoesTo v k) f = do
let b = updateBot v $ f `botOrNew` k
return $! f & bots . at k ?~ b | 150 | attempt (GoesTo v k) f = do
let b = updateBot v $ f `botOrNew` k
return $! f & bots . at k ?~ b | 99 | false | true | 0 | 12 | 37 | 79 | 38 | 41 | null | null |
benjaminselfridge/logix | src/Calculus.hs | bsd-3-clause | match ((PredPat p):pats) fs =
[(mergeForms, matchTerms) | Pred p' ts <- nub fs
, (matchForms, matchTerms) <- match pats (delete (Pred p' ts) fs)
, mergeForms <- mergeFormulaAssignments [[(p, [Pred p' ts])], matchForms]] | 277 | match ((PredPat p):pats) fs =
[(mergeForms, matchTerms) | Pred p' ts <- nub fs
, (matchForms, matchTerms) <- match pats (delete (Pred p' ts) fs)
, mergeForms <- mergeFormulaAssignments [[(p, [Pred p' ts])], matchForms]] | 277 | match ((PredPat p):pats) fs =
[(mergeForms, matchTerms) | Pred p' ts <- nub fs
, (matchForms, matchTerms) <- match pats (delete (Pred p' ts) fs)
, mergeForms <- mergeFormulaAssignments [[(p, [Pred p' ts])], matchForms]] | 277 | false | false | 0 | 13 | 91 | 118 | 62 | 56 | null | null |
forked-upstream-packages-for-ghcjs/ghc | compiler/main/HscTypes.hs | bsd-3-clause | metaRequestE :: Functor f => MetaHook f -> LHsExpr Id -> f (LHsExpr RdrName)
metaRequestE h = fmap unMetaResE . h (MetaE MetaResE) | 130 | metaRequestE :: Functor f => MetaHook f -> LHsExpr Id -> f (LHsExpr RdrName)
metaRequestE h = fmap unMetaResE . h (MetaE MetaResE) | 130 | metaRequestE h = fmap unMetaResE . h (MetaE MetaResE) | 53 | false | true | 0 | 11 | 22 | 64 | 28 | 36 | null | null |
input-output-hk/pos-haskell-prototype | binary/test/Test/Pos/Cbor/RefImpl.hs | mit | fromUInt (UInt16 w) = fromIntegral w | 39 | fromUInt (UInt16 w) = fromIntegral w | 39 | fromUInt (UInt16 w) = fromIntegral w | 39 | false | false | 0 | 6 | 8 | 19 | 8 | 11 | null | null |
joeyadams/hs-conduit-resumable | Data/Conduit/Resumable.hs | bsd-3-clause | -- | Like '+$$+', but resume an already-running source.
(+$$++) :: Monad m
=> ResumableSource m i
-> Sink i m r
-> m (ResumableSource m i, Either (Sink i m r) r)
(+$$++) (ResumableSource (ConduitM left0) final0) (ConduitM right0) =
goRight final0 left0 right0
where
goRight final left r... | 1,316 | (+$$++) :: Monad m
=> ResumableSource m i
-> Sink i m r
-> m (ResumableSource m i, Either (Sink i m r) r)
(+$$++) (ResumableSource (ConduitM left0) final0) (ConduitM right0) =
goRight final0 left0 right0
where
goRight final left right =
case right of
HaveOutput _ _ ... | 1,260 | (+$$++) (ResumableSource (ConduitM left0) final0) (ConduitM right0) =
goRight final0 left0 right0
where
goRight final left right =
case right of
HaveOutput _ _ o -> absurd o
NeedInput rp rc -> goLeft rp rc final left
Done r -> return (ResumableSource (... | 1,130 | true | true | 0 | 14 | 550 | 402 | 191 | 211 | null | null |
OS2World/DEV-UTIL-HUGS | libraries/Graphics/Rendering/OpenGL/GL/Colors.hs | bsd-3-clause | --------------------------------------------------------------------------------
attenuation :: Light -> StateVar (GLfloat, GLfloat, GLfloat)
attenuation theLight =
makeStateVar
(liftM3 (,,) (get (constantAttenuation theLight))
(get (linearAttenuation theLight))
(get ... | 550 | attenuation :: Light -> StateVar (GLfloat, GLfloat, GLfloat)
attenuation theLight =
makeStateVar
(liftM3 (,,) (get (constantAttenuation theLight))
(get (linearAttenuation theLight))
(get (quadraticAttenuation theLight)))
(\(constant, linear, quadratic) -> do
... | 468 | attenuation theLight =
makeStateVar
(liftM3 (,,) (get (constantAttenuation theLight))
(get (linearAttenuation theLight))
(get (quadraticAttenuation theLight)))
(\(constant, linear, quadratic) -> do
constantAttenuation theLight $= constant
linea... | 407 | true | true | 0 | 11 | 129 | 135 | 69 | 66 | null | null |
sdiehl/protolude | src/Protolude/Debug.hs | mit | traceShowM :: (P.Show a, Monad m) => a -> m ()
traceShowM a = trace (P.show a) (return ()) | 90 | traceShowM :: (P.Show a, Monad m) => a -> m ()
traceShowM a = trace (P.show a) (return ()) | 90 | traceShowM a = trace (P.show a) (return ()) | 43 | false | true | 0 | 8 | 18 | 61 | 30 | 31 | null | null |
mk12/lam | src/Lam/Parse.hs | mit | -- | Applies the first parser one or more times, and after this applies the
-- second parser zero times or one time. Returns a list of the returned values.
many1Last :: Parser a -> Parser a -> Parser [a]
many1Last p q = do
x <- p
xs <- P.many p
my <- P.optionMaybe q
return $ case my of
Nothing -... | 410 | many1Last :: Parser a -> Parser a -> Parser [a]
many1Last p q = do
x <- p
xs <- P.many p
my <- P.optionMaybe q
return $ case my of
Nothing -> x:xs
Just y -> x:xs ++ [y]
-- | Shows a parser error as a user-readable string. | 254 | many1Last p q = do
x <- p
xs <- P.many p
my <- P.optionMaybe q
return $ case my of
Nothing -> x:xs
Just y -> x:xs ++ [y]
-- | Shows a parser error as a user-readable string. | 206 | true | true | 0 | 12 | 112 | 111 | 53 | 58 | null | null |
beni55/combinatorrent | src/Process/Peer/Receiver.hs | bsd-2-clause | loopHeader :: B.ByteString -> Process CF Socket ()
loopHeader bs = {-# SCC "loopHeader" #-}
let bsl = B.length bs
in if bsl >= 4
then let (l, r) = B.splitAt 4 bs
ll = readW32 l
in if ll == 0
then loopHeader r -- KeepAlive
else loop... | 500 | loopHeader :: B.ByteString -> Process CF Socket ()
loopHeader bs = {-# SCC "loopHeader" #-}
let bsl = B.length bs
in if bsl >= 4
then let (l, r) = B.splitAt 4 bs
ll = readW32 l
in if ll == 0
then loopHeader r -- KeepAlive
else loop... | 500 | loopHeader bs = {-# SCC "loopHeader" #-}
let bsl = B.length bs
in if bsl >= 4
then let (l, r) = B.splitAt 4 bs
ll = readW32 l
in if ll == 0
then loopHeader r -- KeepAlive
else loopMsg [r] (fromIntegral (B.length r)) (readW32 l)
... | 449 | false | true | 0 | 16 | 194 | 168 | 84 | 84 | null | null |
danr/hipspec | testsuite/prod/zeno_version/PropT28.hs | gpl-3.0 | subset (x:xs) ys = x `elem` xs && subset xs ys | 46 | subset (x:xs) ys = x `elem` xs && subset xs ys | 46 | subset (x:xs) ys = x `elem` xs && subset xs ys | 46 | false | false | 1 | 9 | 10 | 36 | 17 | 19 | null | null |
spechub/Hets | Syntax/AS_Library.der.hs | gpl-2.0 | addDownload :: Bool -> SPEC_NAME -> Annoted LIB_ITEM
addDownload unique = emptyAnno . addDownloadAux unique | 107 | addDownload :: Bool -> SPEC_NAME -> Annoted LIB_ITEM
addDownload unique = emptyAnno . addDownloadAux unique | 107 | addDownload unique = emptyAnno . addDownloadAux unique | 54 | false | true | 0 | 7 | 14 | 32 | 15 | 17 | null | null |
Peaker/chess | Chess.hs | bsd-3-clause | inRange :: Ord a => a -> a -> a -> Bool
inRange low high value = low <= value && value < high | 93 | inRange :: Ord a => a -> a -> a -> Bool
inRange low high value = low <= value && value < high | 93 | inRange low high value = low <= value && value < high | 53 | false | true | 0 | 10 | 23 | 55 | 25 | 30 | null | null |
sdiehl/ghc | testsuite/tests/rename/should_compile/T17d.hs | bsd-3-clause | bar :: Int -> Int
bar match = 1 | 31 | bar :: Int -> Int
bar match = 1 | 31 | bar match = 1 | 13 | false | true | 0 | 5 | 8 | 22 | 10 | 12 | null | null |
joeyadams/hs-stm-connection | Data/STM/Queue.hs | bsd-3-clause | dec :: TVar Int -> STM ()
dec var = do
n <- readTVar var
writeTVar var $! n-1 | 85 | dec :: TVar Int -> STM ()
dec var = do
n <- readTVar var
writeTVar var $! n-1 | 85 | dec var = do
n <- readTVar var
writeTVar var $! n-1 | 59 | false | true | 0 | 9 | 26 | 54 | 23 | 31 | null | null |
genos/online_problems | advent_of_code_2018/day13/src/Main.hs | mit | rotL, rotR, fore, back :: Direction -> Direction
rotL U = L | 59 | rotL, rotR, fore, back :: Direction -> Direction
rotL U = L | 59 | rotL U = L | 10 | false | true | 6 | 7 | 11 | 42 | 16 | 26 | null | null |
PipocaQuemada/ermine | src/Ermine/Interpreter.hs | bsd-2-clause | payload :: (PrimMonad m, G.Vector v a) => G.Mutable v (PrimState m) a -> Int -> Int -> m (v a)
payload mv s n = do
me <- GM.new n
GM.copy me (GM.slice s n mv)
G.unsafeFreeze me
------------------------------------------------------------------------------
-- * The Spineless Tagless G-Machine
--------------------... | 378 | payload :: (PrimMonad m, G.Vector v a) => G.Mutable v (PrimState m) a -> Int -> Int -> m (v a)
payload mv s n = do
me <- GM.new n
GM.copy me (GM.slice s n mv)
G.unsafeFreeze me
------------------------------------------------------------------------------
-- * The Spineless Tagless G-Machine
--------------------... | 378 | payload mv s n = do
me <- GM.new n
GM.copy me (GM.slice s n mv)
G.unsafeFreeze me
------------------------------------------------------------------------------
-- * The Spineless Tagless G-Machine
------------------------------------------------------------------------------ | 283 | false | true | 0 | 11 | 53 | 118 | 57 | 61 | null | null |
jesboat/173tourney | server-src/CS173/NormalizeSubmissions.hs | bsd-3-clause | pltWsBlock ('|':'#':rest) = rest | 32 | pltWsBlock ('|':'#':rest) = rest | 32 | pltWsBlock ('|':'#':rest) = rest | 32 | false | false | 0 | 8 | 3 | 20 | 10 | 10 | null | null |
mtolly/golfscript | src/Language/GolfScript/Prelude.hs | gpl-3.0 | order :: (Monad m) => Golf m (Ordered m)
order = pop2 >>= \(x, y) -> return $ case (x, y) of
(Int a, Int b) -> IntInt a b
(Int a, Arr b) -> IntArr a b
(Int a, Str b) -> IntStr a b
(Int a, Blk b) -> IntBlk a b
(Arr a, Int b) -> IntArr b a
(Arr a, Arr b) -> ArrArr a b
(Arr a, Str b) -> ArrStr a b
(Arr a, ... | 650 | order :: (Monad m) => Golf m (Ordered m)
order = pop2 >>= \(x, y) -> return $ case (x, y) of
(Int a, Int b) -> IntInt a b
(Int a, Arr b) -> IntArr a b
(Int a, Str b) -> IntStr a b
(Int a, Blk b) -> IntBlk a b
(Arr a, Int b) -> IntArr b a
(Arr a, Arr b) -> ArrArr a b
(Arr a, Str b) -> ArrStr a b
(Arr a, ... | 650 | order = pop2 >>= \(x, y) -> return $ case (x, y) of
(Int a, Int b) -> IntInt a b
(Int a, Arr b) -> IntArr a b
(Int a, Str b) -> IntStr a b
(Int a, Blk b) -> IntBlk a b
(Arr a, Int b) -> IntArr b a
(Arr a, Arr b) -> ArrArr a b
(Arr a, Str b) -> ArrStr a b
(Arr a, Blk b) -> ArrBlk a b
(Str a, Int b) -> ... | 609 | false | true | 32 | 9 | 195 | 441 | 211 | 230 | null | null |
frontrowed/stratosphere | library-gen/Stratosphere/Resources/ApiGatewayV2Stage.hs | mit | -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-stage.html#cfn-apigatewayv2-stage-defaultroutesettings
agvsDefaultRouteSettings :: Lens' ApiGatewayV2Stage (Maybe ApiGatewayV2StageRouteSettings)
agvsDefaultRouteSettings = lens _apiGatewayV2StageDefaultRouteSettings (\s a -> s... | 368 | agvsDefaultRouteSettings :: Lens' ApiGatewayV2Stage (Maybe ApiGatewayV2StageRouteSettings)
agvsDefaultRouteSettings = lens _apiGatewayV2StageDefaultRouteSettings (\s a -> s { _apiGatewayV2StageDefaultRouteSettings = a }) | 220 | agvsDefaultRouteSettings = lens _apiGatewayV2StageDefaultRouteSettings (\s a -> s { _apiGatewayV2StageDefaultRouteSettings = a }) | 129 | true | true | 1 | 9 | 21 | 49 | 25 | 24 | null | null |
kmels/hledger | extra/hledger-chart/Hledger/Chart/Options.hs | gpl-3.0 | checkChartOpts :: ChartOpts -> IO ChartOpts
checkChartOpts opts = do
checkCliOpts $ cliopts_ opts
return opts | 113 | checkChartOpts :: ChartOpts -> IO ChartOpts
checkChartOpts opts = do
checkCliOpts $ cliopts_ opts
return opts | 113 | checkChartOpts opts = do
checkCliOpts $ cliopts_ opts
return opts | 69 | false | true | 0 | 9 | 19 | 42 | 17 | 25 | null | null |
Rizary/hackage-matrix-builder | src-ui.v3/src/Router.hs | gpl-3.0 | encodeFrag RoutePackages = Just "#/packages" | 44 | encodeFrag RoutePackages = Just "#/packages" | 44 | encodeFrag RoutePackages = Just "#/packages" | 44 | false | false | 0 | 5 | 4 | 12 | 5 | 7 | null | null |
stackbuilders/dotenv-hs | app/Main.hs | mit | main :: IO ()
main = do
Options{..} <- execParser opts
let configDotenv =
Config
{ configExamplePath = dotenvExampleFiles
, configOverride = override
, configPath =
if null dotenvFiles
then configPath defaultConfig
else dotenvFiles
... | 827 | main :: IO ()
main = do
Options{..} <- execParser opts
let configDotenv =
Config
{ configExamplePath = dotenvExampleFiles
, configOverride = override
, configPath =
if null dotenvFiles
then configPath defaultConfig
else dotenvFiles
... | 827 | main = do
Options{..} <- execParser opts
let configDotenv =
Config
{ configExamplePath = dotenvExampleFiles
, configOverride = override
, configPath =
if null dotenvFiles
then configPath defaultConfig
else dotenvFiles
}
... | 813 | false | true | 2 | 16 | 301 | 207 | 96 | 111 | null | null |
diku-dk/futhark | src/Futhark/CLI/Run.hs | isc | putValue :: I.Value -> TypeBase () () -> IO ()
putValue v t
| I.isEmptyArray v = putStrLn $ I.prettyEmptyArray t v
| otherwise = putStrLn $ pretty v | 152 | putValue :: I.Value -> TypeBase () () -> IO ()
putValue v t
| I.isEmptyArray v = putStrLn $ I.prettyEmptyArray t v
| otherwise = putStrLn $ pretty v | 152 | putValue v t
| I.isEmptyArray v = putStrLn $ I.prettyEmptyArray t v
| otherwise = putStrLn $ pretty v | 105 | false | true | 1 | 9 | 32 | 76 | 35 | 41 | null | null |
tiqwab/md-parser | src/Text/Md/MdParser.hs | bsd-3-clause | parseMdFileWith :: ParseContext -> FilePath -> IO String
parseMdFileWith context path = do
content <- readFile path
return $ writeMd $ readMd context content | 161 | parseMdFileWith :: ParseContext -> FilePath -> IO String
parseMdFileWith context path = do
content <- readFile path
return $ writeMd $ readMd context content | 161 | parseMdFileWith context path = do
content <- readFile path
return $ writeMd $ readMd context content | 104 | false | true | 0 | 9 | 27 | 58 | 25 | 33 | null | null |
malie/drolesat | Testing.hs | bsd-3-clause | cnfFile =
-- "out.cnf"
-- "sudoku-complete.cnf"
-- "simple.cnf"
-- "wp-cdcl-example.cnf"
"../sat-2002-beta/submitted/"
++ "goldberg/fpga_routing/term1_gr_rcs_w3.shuffled.cnf" | 186 | cnfFile =
-- "out.cnf"
-- "sudoku-complete.cnf"
-- "simple.cnf"
-- "wp-cdcl-example.cnf"
"../sat-2002-beta/submitted/"
++ "goldberg/fpga_routing/term1_gr_rcs_w3.shuffled.cnf" | 186 | cnfFile =
-- "out.cnf"
-- "sudoku-complete.cnf"
-- "simple.cnf"
-- "wp-cdcl-example.cnf"
"../sat-2002-beta/submitted/"
++ "goldberg/fpga_routing/term1_gr_rcs_w3.shuffled.cnf" | 186 | false | false | 3 | 5 | 24 | 19 | 9 | 10 | null | null |
ekmett/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxLANGUAGE_GEORGIAN :: Int
wxLANGUAGE_GEORGIAN = 86 | 51 | wxLANGUAGE_GEORGIAN :: Int
wxLANGUAGE_GEORGIAN = 86 | 51 | wxLANGUAGE_GEORGIAN = 86 | 24 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
olsner/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | bcoPrimTyConKey = mkPreludeTyConUnique 74 | 65 | bcoPrimTyConKey = mkPreludeTyConUnique 74 | 65 | bcoPrimTyConKey = mkPreludeTyConUnique 74 | 65 | false | false | 0 | 5 | 27 | 9 | 4 | 5 | null | null |
fffej/HS-Poker | LookupPatternMatch.hs | bsd-3-clause | getValueFromProduct 308913 = 5163 | 33 | getValueFromProduct 308913 = 5163 | 33 | getValueFromProduct 308913 = 5163 | 33 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
Soostone/data-filepath | Data/FilePath.hs | bsd-3-clause | cRelativePath
= mkConstr
tFilePath "RelativePath" [] Prefix | 67 | cRelativePath
= mkConstr
tFilePath "RelativePath" [] Prefix | 67 | cRelativePath
= mkConstr
tFilePath "RelativePath" [] Prefix | 67 | false | false | 1 | 6 | 14 | 21 | 8 | 13 | null | null |
teuffy/min-var-ci | src/DataAnalysis/Application/Handler/Import.hs | mit | -- | Show the import form.
getImportR :: Handler Html
getImportR = getImport Nothing | 84 | getImportR :: Handler Html
getImportR = getImport Nothing | 57 | getImportR = getImport Nothing | 30 | true | true | 0 | 5 | 13 | 18 | 9 | 9 | null | null |
taktoa/TSBot | test-suite/Web/TSBotSpec.hs | mit | spec :: Spec
spec = do
describe "parseCond" $ do
context "when given an empty string" $ do
it "returns [fromListCQR []]" $ do
parseCondTest "" `shouldReturn` Right [fromListCQR []]
context "when given an ugly-printed CQResponse" $ do
it "returns the original CQResponse" $ do
proper... | 335 | spec :: Spec
spec = do
describe "parseCond" $ do
context "when given an empty string" $ do
it "returns [fromListCQR []]" $ do
parseCondTest "" `shouldReturn` Right [fromListCQR []]
context "when given an ugly-printed CQResponse" $ do
it "returns the original CQResponse" $ do
proper... | 335 | spec = do
describe "parseCond" $ do
context "when given an empty string" $ do
it "returns [fromListCQR []]" $ do
parseCondTest "" `shouldReturn` Right [fromListCQR []]
context "when given an ugly-printed CQResponse" $ do
it "returns the original CQResponse" $ do
property parseCondI... | 322 | false | true | 0 | 21 | 84 | 97 | 40 | 57 | null | null |
lwchkg/sunlight-x | test/code-snippets/haskell.hs | apache-2.0 | string_txt (Chr c) s = c:s | 29 | string_txt (Chr c) s = c:s | 29 | string_txt (Chr c) s = c:s | 29 | false | false | 0 | 7 | 8 | 21 | 10 | 11 | null | null |
rvion/lamdu | bottlelib/Graphics/UI/Bottle/EventMap.hs | gpl-3.0 | prettyKeyEvent (KeyEvent GLFW.KeyState'Repeating modKey) = "Repeat " ++ ModKey.pretty modKey | 92 | prettyKeyEvent (KeyEvent GLFW.KeyState'Repeating modKey) = "Repeat " ++ ModKey.pretty modKey | 92 | prettyKeyEvent (KeyEvent GLFW.KeyState'Repeating modKey) = "Repeat " ++ ModKey.pretty modKey | 92 | false | false | 0 | 7 | 9 | 29 | 13 | 16 | null | null |
mydaum/cabal | cabal-install/Distribution/Client/Install.hs | bsd-3-clause | theSpecifiedPackage :: Package pkg => PackageSpecifier pkg -> Maybe PackageId
theSpecifiedPackage pkgSpec =
case pkgSpec of
NamedPackage name [PackagePropertyVersion version]
-> PackageIdentifier name <$> trivialRange version
NamedPackage _ _ -> Nothing
SpecificSourcePackage pkg -> Just $ packageId ... | 892 | theSpecifiedPackage :: Package pkg => PackageSpecifier pkg -> Maybe PackageId
theSpecifiedPackage pkgSpec =
case pkgSpec of
NamedPackage name [PackagePropertyVersion version]
-> PackageIdentifier name <$> trivialRange version
NamedPackage _ _ -> Nothing
SpecificSourcePackage pkg -> Just $ packageId ... | 892 | theSpecifiedPackage pkgSpec =
case pkgSpec of
NamedPackage name [PackagePropertyVersion version]
-> PackageIdentifier name <$> trivialRange version
NamedPackage _ _ -> Nothing
SpecificSourcePackage pkg -> Just $ packageId pkg
where
-- | If a range includes only a single version, return Just th... | 814 | false | true | 0 | 10 | 216 | 183 | 91 | 92 | null | null |
bitemyapp/ghc | compiler/main/ErrUtils.hs | bsd-3-clause | -- -----------------------------------------------------------------------------
-- Collecting up messages for later ordering and printing.
mk_err_msg :: DynFlags -> Severity -> SrcSpan -> PrintUnqualified -> MsgDoc -> SDoc -> ErrMsg
mk_err_msg dflags sev locn print_unqual msg extra
= ErrMsg { errMsgSpan = locn, err... | 491 | mk_err_msg :: DynFlags -> Severity -> SrcSpan -> PrintUnqualified -> MsgDoc -> SDoc -> ErrMsg
mk_err_msg dflags sev locn print_unqual msg extra
= ErrMsg { errMsgSpan = locn, errMsgContext = print_unqual
, errMsgShortDoc = msg , errMsgShortString = showSDoc dflags msg
, errMsgExtraInfo = extra
... | 350 | mk_err_msg dflags sev locn print_unqual msg extra
= ErrMsg { errMsgSpan = locn, errMsgContext = print_unqual
, errMsgShortDoc = msg , errMsgShortString = showSDoc dflags msg
, errMsgExtraInfo = extra
, errMsgSeverity = sev } | 256 | true | true | 0 | 10 | 93 | 102 | 55 | 47 | null | null |
cronburg/deckbuild | Game/DeckBuild/Dominion/Types.hs | bsd-3-clause | defaultHand = defaultPile { sortPileBy = Just $ show } | 54 | defaultHand = defaultPile { sortPileBy = Just $ show } | 54 | defaultHand = defaultPile { sortPileBy = Just $ show } | 54 | false | false | 0 | 7 | 9 | 18 | 10 | 8 | null | null |
TikhonJelvis/Cow | src/Cow/ParseTree/Viz.hs | gpl-3.0 | charWidth = 0.25 | 18 | charWidth = 0.25 | 18 | charWidth = 0.25 | 18 | false | false | 0 | 4 | 4 | 6 | 3 | 3 | null | null |
slpopejoy/fadno-xml | src/Fadno/MusicXml/MusicXml20.hs | bsd-2-clause | parseIDREF :: String -> P.XParse IDREF
parseIDREF = return . fromString | 71 | parseIDREF :: String -> P.XParse IDREF
parseIDREF = return . fromString | 71 | parseIDREF = return . fromString | 32 | false | true | 1 | 8 | 10 | 31 | 13 | 18 | null | null |
8l/metafun | src/Language/Kiff/Typing/Infer.hs | gpl-3.0 | collectExpr (UnaryMinus _ e) = do e' <- collectExpr e
let tau = getTy e'
yieldEqs [tau :=: TyPrimitive TyInt]
return $ UnaryMinus (TyPrimitive TyInt) e' | 298 | collectExpr (UnaryMinus _ e) = do e' <- collectExpr e
let tau = getTy e'
yieldEqs [tau :=: TyPrimitive TyInt]
return $ UnaryMinus (TyPrimitive TyInt) e' | 298 | collectExpr (UnaryMinus _ e) = do e' <- collectExpr e
let tau = getTy e'
yieldEqs [tau :=: TyPrimitive TyInt]
return $ UnaryMinus (TyPrimitive TyInt) e' | 298 | false | false | 0 | 10 | 171 | 73 | 32 | 41 | null | null |
cocreature/leksah | src/IDE/Debug.hs | gpl-2.0 | debugToggled :: IDEAction
debugToggled = do
toggled <- getDebugToggled
maybeDebug <- readIDE debugState
case (toggled, maybeDebug) of
(True, Nothing) -> packageTry debugStart
(False, Just _) -> debugQuit
_ -> return () | 268 | debugToggled :: IDEAction
debugToggled = do
toggled <- getDebugToggled
maybeDebug <- readIDE debugState
case (toggled, maybeDebug) of
(True, Nothing) -> packageTry debugStart
(False, Just _) -> debugQuit
_ -> return () | 268 | debugToggled = do
toggled <- getDebugToggled
maybeDebug <- readIDE debugState
case (toggled, maybeDebug) of
(True, Nothing) -> packageTry debugStart
(False, Just _) -> debugQuit
_ -> return () | 242 | false | true | 0 | 12 | 80 | 89 | 42 | 47 | null | null |
MaxGabriel/stack | scripts/release/release.hs | bsd-3-clause | options :: [OptDescr (Either String (Global -> Global))]
options =
[ Option "" [gpgKeyOptName]
(ReqArg (\v -> Right $ \g -> g{gGpgKey = v}) "USER-ID")
"GPG user ID to sign distribution package with."
, Option "" [allowDirtyOptName] (NoArg $ Right $ \g -> g{gAllowDirty = True})
"Allow a d... | 1,249 | options :: [OptDescr (Either String (Global -> Global))]
options =
[ Option "" [gpgKeyOptName]
(ReqArg (\v -> Right $ \g -> g{gGpgKey = v}) "USER-ID")
"GPG user ID to sign distribution package with."
, Option "" [allowDirtyOptName] (NoArg $ Right $ \g -> g{gAllowDirty = True})
"Allow a d... | 1,249 | options =
[ Option "" [gpgKeyOptName]
(ReqArg (\v -> Right $ \g -> g{gGpgKey = v}) "USER-ID")
"GPG user ID to sign distribution package with."
, Option "" [allowDirtyOptName] (NoArg $ Right $ \g -> g{gAllowDirty = True})
"Allow a dirty working tree for release."
, Option "" [githubAu... | 1,192 | false | true | 0 | 17 | 355 | 358 | 196 | 162 | null | null |
rueshyna/gogol | gogol-sqladmin/gen/Network/Google/Resource/SQL/Databases/Get.hs | mpl-2.0 | -- | Project ID of the project that contains the instance.
dgProject :: Lens' DatabasesGet Text
dgProject
= lens _dgProject (\ s a -> s{_dgProject = a}) | 154 | dgProject :: Lens' DatabasesGet Text
dgProject
= lens _dgProject (\ s a -> s{_dgProject = a}) | 95 | dgProject
= lens _dgProject (\ s a -> s{_dgProject = a}) | 58 | true | true | 1 | 9 | 28 | 44 | 22 | 22 | null | null |
abakst/liquidhaskell | src/Language/Haskell/Liquid/Types/RefType.hs | bsd-3-clause | rTypeSortArrow :: (PPrint r, Reftable r) => TCEmb TyCon -> RRType r -> Sort
rTypeSortArrow tce = typeSortArrow tce . toType | 128 | rTypeSortArrow :: (PPrint r, Reftable r) => TCEmb TyCon -> RRType r -> Sort
rTypeSortArrow tce = typeSortArrow tce . toType | 128 | rTypeSortArrow tce = typeSortArrow tce . toType | 47 | false | true | 0 | 8 | 25 | 50 | 24 | 26 | null | null |
ghcjs/jsaddle-dom | src/JSDOM/Generated/SVGFEGaussianBlurElement.hs | mit | -- | <https://developer.mozilla.org/en-US/docs/Web/API/SVGFEGaussianBlurElement.in1 Mozilla SVGFEGaussianBlurElement.in1 documentation>
getIn1 ::
(MonadDOM m) => SVGFEGaussianBlurElement -> m SVGAnimatedString
getIn1 self = liftDOM ((self ^. js "in1") >>= fromJSValUnchecked) | 283 | getIn1 ::
(MonadDOM m) => SVGFEGaussianBlurElement -> m SVGAnimatedString
getIn1 self = liftDOM ((self ^. js "in1") >>= fromJSValUnchecked) | 146 | getIn1 self = liftDOM ((self ^. js "in1") >>= fromJSValUnchecked) | 65 | true | true | 0 | 10 | 32 | 56 | 27 | 29 | null | null |
jac3km4/haskit | src/LuaJIT/ByteCode.hs | mit | jfuncf a d = Instruction 87 $ TwoArgs a d | 41 | jfuncf a d = Instruction 87 $ TwoArgs a d | 41 | jfuncf a d = Instruction 87 $ TwoArgs a d | 41 | false | false | 1 | 6 | 9 | 27 | 10 | 17 | null | null |
mbakke/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | cvEinstancemissingcfgparameter :: (String, String, String)
cvEinstancemissingcfgparameter =
("instance",
Types.cVErrorCodeToRaw CvEINSTANCEMISSINGCFGPARAMETER,
"A configuration parameter for an instance is missing") | 223 | cvEinstancemissingcfgparameter :: (String, String, String)
cvEinstancemissingcfgparameter =
("instance",
Types.cVErrorCodeToRaw CvEINSTANCEMISSINGCFGPARAMETER,
"A configuration parameter for an instance is missing") | 223 | cvEinstancemissingcfgparameter =
("instance",
Types.cVErrorCodeToRaw CvEINSTANCEMISSINGCFGPARAMETER,
"A configuration parameter for an instance is missing") | 164 | false | true | 0 | 7 | 25 | 34 | 20 | 14 | null | null |
conal/shady-examples | src/SurfaceExamples.hs | agpl-3.0 | tt3@(t3,t3') = mm a1e TI.a19 | 31 | tt3@(t3,t3') = mm a1e TI.a19 | 31 | tt3@(t3,t3') = mm a1e TI.a19 | 31 | false | false | 0 | 6 | 7 | 23 | 12 | 11 | null | null |
alanz/Alex | src/Main.hs | bsd-3-clause | usageHeader :: String -> String
usageHeader prog = "Usage: " ++ prog ++ " [OPTION...] file\n" | 93 | usageHeader :: String -> String
usageHeader prog = "Usage: " ++ prog ++ " [OPTION...] file\n" | 93 | usageHeader prog = "Usage: " ++ prog ++ " [OPTION...] file\n" | 61 | false | true | 4 | 7 | 15 | 34 | 14 | 20 | null | null |
m15k/hs-xml-alchemy | lib/Readers/DTD.hs | mit | evalNotation (Notation name (NotationPubSysID s0 s1)) = undefined | 65 | evalNotation (Notation name (NotationPubSysID s0 s1)) = undefined | 65 | evalNotation (Notation name (NotationPubSysID s0 s1)) = undefined | 65 | false | false | 0 | 8 | 7 | 26 | 12 | 14 | null | null |
haskell-opengl/OpenGLRaw | src/Graphics/GL/Functions/F29.hs | bsd-3-clause | -- glVertex3s ------------------------------------------------------------------
-- | Manual page for <https://www.opengl.org/sdk/docs/man2/xhtml/glVertex.xml OpenGL 2.x>. The vector equivalent of this command is 'glVertex3sv'.
glVertex3s
:: MonadIO m
=> GLshort -- ^ @x@ of type @CoordS@.
-> GLshort -- ^ @y@ of ... | 445 | glVertex3s
:: MonadIO m
=> GLshort -- ^ @x@ of type @CoordS@.
-> GLshort -- ^ @y@ of type @CoordS@.
-> GLshort -- ^ @z@ of type @CoordS@.
-> m ()
glVertex3s v1 v2 v3 = liftIO $ dyn47 ptr_glVertex3s v1 v2 v3 | 216 | glVertex3s v1 v2 v3 = liftIO $ dyn47 ptr_glVertex3s v1 v2 v3 | 60 | true | true | 0 | 11 | 72 | 64 | 32 | 32 | null | null |
esengie/fpl-exploration-tool | src/langGenerator/CodeGen/RightSide/Solver.hs | bsd-3-clause | shortenLtoR :: Eq a => [a] -> [a] -> [a]
shortenLtoR [] _ = [] | 62 | shortenLtoR :: Eq a => [a] -> [a] -> [a]
shortenLtoR [] _ = [] | 62 | shortenLtoR [] _ = [] | 21 | false | true | 0 | 8 | 14 | 49 | 24 | 25 | null | null |
zoomhub/zoomhub | vendor/servant/servant-server/src/Servant/Server/Internal/ServerError.hs | mit | -- | 'err409' Conflict
--
-- Example:
--
-- > failingHandler :: Handler ()
-- > failingHandler = throwError $ err409 { errBody = "Transaction conflicts with 59879cb56c7c159231eeacdd503d755f7e835f74" }
--
err409 :: ServerError
err409 = ServerError { errHTTPCode = 409
, errReasonPhrase = "Conflict"
... | 412 | err409 :: ServerError
err409 = ServerError { errHTTPCode = 409
, errReasonPhrase = "Conflict"
, errBody = ""
, errHeaders = []
} | 208 | err409 = ServerError { errHTTPCode = 409
, errReasonPhrase = "Conflict"
, errBody = ""
, errHeaders = []
} | 186 | true | true | 0 | 8 | 132 | 53 | 32 | 21 | null | null |
Heather/stack | src/Stack/Dot.hs | bsd-3-clause | printLocalNodes :: (F.Foldable t, MonadIO m)
=> DotOpts
-> t PackageName
-> m ()
printLocalNodes dotOpts locals = liftIO $ Text.putStrLn (Text.intercalate "\n" lpNodes)
where applyStyle :: Text -> Text
applyStyle n = if dotIncludeExternal dotOpts
... | 540 | printLocalNodes :: (F.Foldable t, MonadIO m)
=> DotOpts
-> t PackageName
-> m ()
printLocalNodes dotOpts locals = liftIO $ Text.putStrLn (Text.intercalate "\n" lpNodes)
where applyStyle :: Text -> Text
applyStyle n = if dotIncludeExternal dotOpts
... | 540 | printLocalNodes dotOpts locals = liftIO $ Text.putStrLn (Text.intercalate "\n" lpNodes)
where applyStyle :: Text -> Text
applyStyle n = if dotIncludeExternal dotOpts
then n <> " [style=dashed];"
else n <> " [style=solid];"
lpNodes :: [Text]
lpN... | 411 | false | true | 0 | 9 | 187 | 141 | 72 | 69 | null | null |
mightymoose/liquidhaskell | benchmarks/bytestring-0.9.2.1/Data/ByteString.T.hs | bsd-3-clause | -- | The interact function takes a function of type @ByteString -> ByteString@
-- as its argument. The entire input from the standard input device is passed
-- to this function as its argument, and the resulting string is output on the
-- standard output device. It's great for writing one line programs!
interact :: (By... | 412 | interact :: (ByteString -> ByteString) -> IO ()
interact transformer = putStr . transformer =<< getContents | 107 | interact transformer = putStr . transformer =<< getContents | 59 | true | true | 1 | 8 | 68 | 47 | 24 | 23 | null | null |
dysinger/amazonka | amazonka-glacier/gen/Network/AWS/Glacier/AbortMultipartUpload.hs | mpl-2.0 | -- | 'AbortMultipartUpload' constructor.
--
-- The fields accessible through corresponding lenses are:
--
-- * 'amuAccountId' @::@ 'Text'
--
-- * 'amuUploadId' @::@ 'Text'
--
-- * 'amuVaultName' @::@ 'Text'
--
abortMultipartUpload :: Text -- ^ 'amuAccountId'
-> Text -- ^ 'amuVaultName'
... | 534 | abortMultipartUpload :: Text -- ^ 'amuAccountId'
-> Text -- ^ 'amuVaultName'
-> Text -- ^ 'amuUploadId'
-> AbortMultipartUpload
abortMultipartUpload p1 p2 p3 = AbortMultipartUpload
{ _amuAccountId = p1
, _amuVaultName = p2
, _amuUploadId = p3
... | 324 | abortMultipartUpload p1 p2 p3 = AbortMultipartUpload
{ _amuAccountId = p1
, _amuVaultName = p2
, _amuUploadId = p3
} | 133 | true | true | 0 | 7 | 148 | 67 | 42 | 25 | null | null |
tcsc/ffs | src/Ffs.hs | mit | -- | Initialises the haskell logging system based on the verbosity level set
-- by the user.
initLogger :: Log.Priority -> IO ()
initLogger level = do
handler <- Log.streamHandler stdout Log.DEBUG
Log.updateGlobalLogger Log.rootLoggerName (update handler)
where
update h = Log.setLevel level . Log.setHandler... | 325 | initLogger :: Log.Priority -> IO ()
initLogger level = do
handler <- Log.streamHandler stdout Log.DEBUG
Log.updateGlobalLogger Log.rootLoggerName (update handler)
where
update h = Log.setLevel level . Log.setHandlers [h] | 232 | initLogger level = do
handler <- Log.streamHandler stdout Log.DEBUG
Log.updateGlobalLogger Log.rootLoggerName (update handler)
where
update h = Log.setLevel level . Log.setHandlers [h] | 196 | true | true | 2 | 9 | 56 | 97 | 43 | 54 | null | null |
pepeiborra/narradar | src/Narradar/Types/ArgumentFiltering.hs | bsd-3-clause | countPositionsFiltered = sum . fmap length . snd . unzip . toList | 65 | countPositionsFiltered = sum . fmap length . snd . unzip . toList | 65 | countPositionsFiltered = sum . fmap length . snd . unzip . toList | 65 | false | false | 0 | 9 | 11 | 25 | 12 | 13 | null | null |
phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/Tokens.hs | bsd-3-clause | gl_MIN_SAMPLE_SHADING_VALUE_ARB :: GLenum
gl_MIN_SAMPLE_SHADING_VALUE_ARB = 0x8C37 | 82 | gl_MIN_SAMPLE_SHADING_VALUE_ARB :: GLenum
gl_MIN_SAMPLE_SHADING_VALUE_ARB = 0x8C37 | 82 | gl_MIN_SAMPLE_SHADING_VALUE_ARB = 0x8C37 | 40 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
HIPERFIT/futhark | src/Futhark/CodeGen/ImpGen.hs | isc | compileOutParams ::
Mem rep inner =>
[RetType rep] ->
Maybe [EntryPointType] ->
ImpM rep r op ([Imp.ExternalValue], [Imp.Param], [ValueDestination])
compileOutParams orig_rts maybe_orig_epts = do
(maybe_params, dests) <- unzip <$> mapM compileOutParam orig_rts
evs <- case maybe_orig_epts of
Just orig_ep... | 448 | compileOutParams ::
Mem rep inner =>
[RetType rep] ->
Maybe [EntryPointType] ->
ImpM rep r op ([Imp.ExternalValue], [Imp.Param], [ValueDestination])
compileOutParams orig_rts maybe_orig_epts = do
(maybe_params, dests) <- unzip <$> mapM compileOutParam orig_rts
evs <- case maybe_orig_epts of
Just orig_ep... | 448 | compileOutParams orig_rts maybe_orig_epts = do
(maybe_params, dests) <- unzip <$> mapM compileOutParam orig_rts
evs <- case maybe_orig_epts of
Just orig_epts -> compileExternalValues orig_rts orig_epts maybe_params
Nothing -> pure []
return (evs, catMaybes maybe_params, dests) | 291 | false | true | 0 | 12 | 74 | 154 | 77 | 77 | null | null |
glguy/GhcPkgUtils | GhcPkgUtils.hs | bsd-3-clause | showUsage :: IO ()
showUsage =
do hPutStrLn stderr "Valid commands:"
hPutStrLn stderr $ unlines $ map fst knownProgs | 123 | showUsage :: IO ()
showUsage =
do hPutStrLn stderr "Valid commands:"
hPutStrLn stderr $ unlines $ map fst knownProgs | 123 | showUsage =
do hPutStrLn stderr "Valid commands:"
hPutStrLn stderr $ unlines $ map fst knownProgs | 104 | false | true | 0 | 9 | 25 | 43 | 19 | 24 | null | null |
mstksg/tensor-ops | src/TensorOps/Types.hs | bsd-3-clause | gradTOp
:: (Tensor t, RealFloat (ElemT t))
=> TOp ns '[ '[] ]
-> Prod t ns
-> Prod t ns
gradTOp o xs = gradTOp' o xs (only (getI $ generateA (\_ -> I 1))) | 170 | gradTOp
:: (Tensor t, RealFloat (ElemT t))
=> TOp ns '[ '[] ]
-> Prod t ns
-> Prod t ns
gradTOp o xs = gradTOp' o xs (only (getI $ generateA (\_ -> I 1))) | 170 | gradTOp o xs = gradTOp' o xs (only (getI $ generateA (\_ -> I 1))) | 66 | false | true | 0 | 13 | 51 | 103 | 51 | 52 | null | null |
olsner/ghc | compiler/typecheck/TcBinds.hs | bsd-3-clause | polyBindErr :: [LHsBind Name] -> SDoc
polyBindErr binds
= hang (text "You can't mix polymorphic and unlifted bindings")
2 (vcat [vcat (map ppr binds),
text "Probable fix: add a type signature"]) | 219 | polyBindErr :: [LHsBind Name] -> SDoc
polyBindErr binds
= hang (text "You can't mix polymorphic and unlifted bindings")
2 (vcat [vcat (map ppr binds),
text "Probable fix: add a type signature"]) | 219 | polyBindErr binds
= hang (text "You can't mix polymorphic and unlifted bindings")
2 (vcat [vcat (map ppr binds),
text "Probable fix: add a type signature"]) | 181 | false | true | 0 | 11 | 55 | 63 | 31 | 32 | null | null |
rewinfrey/haskell-tic-tac-toe | src/Game/Board.hs | bsd-3-clause | update :: Board -> Location -> Token -> Board
update board (i, j) token = Data.Matrix.fromList (Data.Matrix.nrows board) (Data.Matrix.ncols board) updateBoard
where space = Data.Matrix.getElem i j board
updatedSpace = space { spaceToken = token }
updateBoard = updateSpace <$> Data.Matrix.toList board
... | 506 | update :: Board -> Location -> Token -> Board
update board (i, j) token = Data.Matrix.fromList (Data.Matrix.nrows board) (Data.Matrix.ncols board) updateBoard
where space = Data.Matrix.getElem i j board
updatedSpace = space { spaceToken = token }
updateBoard = updateSpace <$> Data.Matrix.toList board
... | 506 | update board (i, j) token = Data.Matrix.fromList (Data.Matrix.nrows board) (Data.Matrix.ncols board) updateBoard
where space = Data.Matrix.getElem i j board
updatedSpace = space { spaceToken = token }
updateBoard = updateSpace <$> Data.Matrix.toList board
updateSpace space = if open space then... | 460 | false | true | 3 | 11 | 107 | 178 | 95 | 83 | null | null |
gergoerdi/metafun | src/Metafun/Compiler.hs | gpl-3.0 | unbox :: MPL.Expr -> MPL.Expr
unbox (MPL.Box _ expr) = expr | 59 | unbox :: MPL.Expr -> MPL.Expr
unbox (MPL.Box _ expr) = expr | 59 | unbox (MPL.Box _ expr) = expr | 29 | false | true | 0 | 8 | 10 | 32 | 16 | 16 | null | null |
kbiscanic/PUH | hw07/homework.hs | mit | stemmer3 :: [String] -> String -> String
stemmer3 ss xs
| any (`isSuffixOf` xs) ss = stemmer2 ss xs
| otherwise = stemmer1 xs | 129 | stemmer3 :: [String] -> String -> String
stemmer3 ss xs
| any (`isSuffixOf` xs) ss = stemmer2 ss xs
| otherwise = stemmer1 xs | 129 | stemmer3 ss xs
| any (`isSuffixOf` xs) ss = stemmer2 ss xs
| otherwise = stemmer1 xs | 88 | false | true | 0 | 9 | 27 | 68 | 32 | 36 | null | null |
keithodulaigh/Hets | OWL2/XMLKeywords.hs | gpl-2.0 | annotationAssertionK :: String
annotationAssertionK = "AnnotationAssertion" | 75 | annotationAssertionK :: String
annotationAssertionK = "AnnotationAssertion" | 75 | annotationAssertionK = "AnnotationAssertion" | 44 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
ocharles/opaleye-tf | src/Control/Monad/Opaleye.hs | bsd-3-clause | runPostgreSQLTransactions
:: PostgreSQLTransactionT m a -> Pg.Connection -> m a
runPostgreSQLTransactions (PostgreSQLTransactionT r) = runReaderT r | 149 | runPostgreSQLTransactions
:: PostgreSQLTransactionT m a -> Pg.Connection -> m a
runPostgreSQLTransactions (PostgreSQLTransactionT r) = runReaderT r | 149 | runPostgreSQLTransactions (PostgreSQLTransactionT r) = runReaderT r | 67 | false | true | 0 | 7 | 17 | 44 | 20 | 24 | null | null |
hvr/lens | src/Control/Lens/Action.hs | bsd-3-clause | -- | Perform an 'IndexedAction'.
--
-- @
-- 'iperform' ≡ 'flip' ('^@!')
-- @
iperform :: Monad m => IndexedActing i m (i, a) s a -> s -> m (i, a)
iperform l = getEffect #. l (Indexed $ \i a -> Effect (return (i, a))) | 216 | iperform :: Monad m => IndexedActing i m (i, a) s a -> s -> m (i, a)
iperform l = getEffect #. l (Indexed $ \i a -> Effect (return (i, a))) | 139 | iperform l = getEffect #. l (Indexed $ \i a -> Effect (return (i, a))) | 70 | true | true | 0 | 13 | 47 | 100 | 53 | 47 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.