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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ndmitchell/qed
|
v1/Exp.hs
|
bsd-3-clause
|
free (Lam x y) = delete x $ free y
| 34
|
free (Lam x y) = delete x $ free y
| 34
|
free (Lam x y) = delete x $ free y
| 34
| false
| false
| 0
| 6
| 9
| 28
| 12
| 16
| null | null |
hvr/jhc
|
lib/haskell-extras/Data/List.hs
|
mit
|
-- transpose is lazy in both rows and columns,
-- and works for non-rectangular 'matrices'
-- For example, transpose [[1,2],[3,4,5],[]] = [[1,3],[2,4],[5]]
-- Note that [h | (h:t) <- xss] is not the same as (map head xss)
-- because the former discards empty sublists inside xss
transpose :: [[a]] -> [[a]]
transpose [] = []
| 364
|
transpose :: [[a]] -> [[a]]
transpose [] = []
| 72
|
transpose [] = []
| 29
| true
| true
| 0
| 9
| 95
| 45
| 25
| 20
| null | null |
mzini/termlib
|
Termlib/Rule.hs
|
gpl-3.0
|
isSizeIncreasing :: Rule -> Bool
isSizeIncreasing rule@(Rule l r) = T.size r > T.size l && isNonErasing rule
| 108
|
isSizeIncreasing :: Rule -> Bool
isSizeIncreasing rule@(Rule l r) = T.size r > T.size l && isNonErasing rule
| 108
|
isSizeIncreasing rule@(Rule l r) = T.size r > T.size l && isNonErasing rule
| 75
| false
| true
| 0
| 8
| 17
| 50
| 24
| 26
| null | null |
haroldcarr/learn-haskell-coq-ml-etc
|
haskell/topic/general/haskellforall/src/X_2012_01_03_ADTs.hs
|
unlicense
|
reverse2 :: Either a (Either b c) -> Either (Either a b) c
reverse2 = either (Left . Left) (either (Left . Right) Right)
| 120
|
reverse2 :: Either a (Either b c) -> Either (Either a b) c
reverse2 = either (Left . Left) (either (Left . Right) Right)
| 120
|
reverse2 = either (Left . Left) (either (Left . Right) Right)
| 61
| false
| true
| 0
| 9
| 23
| 68
| 34
| 34
| null | null |
comonoidial/ALFIN
|
Backend/OptimizeAsm.hs
|
mit
|
substTCafTerm s (TailCall (Run_Fun f []) []) = case lookup f s of
Nothing -> (TailCall (Run_Fun f []) [], [f])
Just (StoreNode (BoxCon b) [Right (BigImm n)]) -> (NodeReturn (BoxCon b) [Right $ BigImm n], [])
| 250
|
substTCafTerm s (TailCall (Run_Fun f []) []) = case lookup f s of
Nothing -> (TailCall (Run_Fun f []) [], [f])
Just (StoreNode (BoxCon b) [Right (BigImm n)]) -> (NodeReturn (BoxCon b) [Right $ BigImm n], [])
| 250
|
substTCafTerm s (TailCall (Run_Fun f []) []) = case lookup f s of
Nothing -> (TailCall (Run_Fun f []) [], [f])
Just (StoreNode (BoxCon b) [Right (BigImm n)]) -> (NodeReturn (BoxCon b) [Right $ BigImm n], [])
| 250
| false
| false
| 0
| 14
| 79
| 138
| 68
| 70
| null | null |
oceanborn2/experiments
|
proglang/haskell/mathmagic/src/Functions.hs
|
gpl-2.0
|
-- fibonacci function (recursive version)
fib 0 = 1
| 52
|
fib 0 = 1
| 9
|
fib 0 = 1
| 9
| true
| false
| 0
| 5
| 9
| 10
| 5
| 5
| null | null |
kavigupta/Infsabot
|
Infsabot/GamePlay/Logic.hs
|
gpl-3.0
|
applyTimeTick :: Board -> Board
applyTimeTick b = b {boardTime = boardTime b + 1}
| 81
|
applyTimeTick :: Board -> Board
applyTimeTick b = b {boardTime = boardTime b + 1}
| 81
|
applyTimeTick b = b {boardTime = boardTime b + 1}
| 49
| false
| true
| 0
| 8
| 14
| 33
| 17
| 16
| null | null |
ford-prefect/haskell-gi
|
lib/Data/GI/CodeGen/Transfer.hs
|
lgpl-2.1
|
basicFreeFnOnError (TGArray _) _ = return $ Just "unrefGArray"
| 62
|
basicFreeFnOnError (TGArray _) _ = return $ Just "unrefGArray"
| 62
|
basicFreeFnOnError (TGArray _) _ = return $ Just "unrefGArray"
| 62
| false
| false
| 0
| 7
| 8
| 24
| 11
| 13
| null | null |
talanis85/mudblood
|
src/Mudblood/Trigger.hs
|
gpl-3.0
|
colorize :: (Monad m) => Color -> AttrString -> TriggerM m i y [TriggerEvent]
colorize c x = returnLine $ setFg c x
| 115
|
colorize :: (Monad m) => Color -> AttrString -> TriggerM m i y [TriggerEvent]
colorize c x = returnLine $ setFg c x
| 115
|
colorize c x = returnLine $ setFg c x
| 37
| false
| true
| 0
| 9
| 22
| 54
| 27
| 27
| null | null |
duplode/stack
|
src/Stack/Build/Coverage.hs
|
bsd-3-clause
|
pathToHtml :: Path b t -> Text
pathToHtml = T.dropWhileEnd (=='/') . LT.toStrict . htmlEscape . LT.pack . toFilePath
| 116
|
pathToHtml :: Path b t -> Text
pathToHtml = T.dropWhileEnd (=='/') . LT.toStrict . htmlEscape . LT.pack . toFilePath
| 116
|
pathToHtml = T.dropWhileEnd (=='/') . LT.toStrict . htmlEscape . LT.pack . toFilePath
| 85
| false
| true
| 0
| 10
| 18
| 49
| 25
| 24
| null | null |
dolio/vector
|
Data/Vector/Fusion/Bundle/Monadic.hs
|
bsd-3-clause
|
enumFromStepN x y n = fromStream (S.enumFromStepN x y n) (Exact (delay_inline max n 0))
| 87
|
enumFromStepN x y n = fromStream (S.enumFromStepN x y n) (Exact (delay_inline max n 0))
| 87
|
enumFromStepN x y n = fromStream (S.enumFromStepN x y n) (Exact (delay_inline max n 0))
| 87
| false
| false
| 0
| 9
| 14
| 48
| 22
| 26
| null | null |
rahulmutt/ghcvm
|
compiler/Eta/Rename/RnTypes.hs
|
bsd-3-clause
|
rnHsTyKi isType _ (HsSpliceTy sp _)
= ASSERT( isType )
rnSpliceType sp
| 76
|
rnHsTyKi isType _ (HsSpliceTy sp _)
= ASSERT( isType )
rnSpliceType sp
| 76
|
rnHsTyKi isType _ (HsSpliceTy sp _)
= ASSERT( isType )
rnSpliceType sp
| 76
| false
| false
| 1
| 6
| 17
| 37
| 15
| 22
| null | null |
Ferdinand-vW/HHDFS
|
src/Test.hs
|
isc
|
bigFiles :: [String]
bigFiles = [ "bigfile1", "bigfile2", "bigfile3", "bigfile4", "bigfile5", "bigfile6",
"bigfile7", "bigfile8", "bigfile9", "bigfile10", "bigfile11", "bigfile12"]
| 193
|
bigFiles :: [String]
bigFiles = [ "bigfile1", "bigfile2", "bigfile3", "bigfile4", "bigfile5", "bigfile6",
"bigfile7", "bigfile8", "bigfile9", "bigfile10", "bigfile11", "bigfile12"]
| 193
|
bigFiles = [ "bigfile1", "bigfile2", "bigfile3", "bigfile4", "bigfile5", "bigfile6",
"bigfile7", "bigfile8", "bigfile9", "bigfile10", "bigfile11", "bigfile12"]
| 172
| false
| true
| 0
| 5
| 30
| 50
| 32
| 18
| null | null |
venkat24/codeworld
|
codeworld-game-server/src/CodeWorld/GameServer.hs
|
apache-2.0
|
findGame :: ServerState -> GameId -> Signature -> IO (MVar Game)
findGame state gid "BOT" = do
games <- readMVar (games state)
let (gameMV:_) = [ gameMV | ((_, gid), gameMV) <- HM.toList games ]
return gameMV
| 220
|
findGame :: ServerState -> GameId -> Signature -> IO (MVar Game)
findGame state gid "BOT" = do
games <- readMVar (games state)
let (gameMV:_) = [ gameMV | ((_, gid), gameMV) <- HM.toList games ]
return gameMV
| 220
|
findGame state gid "BOT" = do
games <- readMVar (games state)
let (gameMV:_) = [ gameMV | ((_, gid), gameMV) <- HM.toList games ]
return gameMV
| 155
| false
| true
| 0
| 14
| 48
| 112
| 53
| 59
| null | null |
laurencer/confluence-sync
|
src/Confluence/Sync/Internal/RateLimiter.hs
|
bsd-3-clause
|
-- | Creates a new Throttle.
newThrottle :: Int -> Int -> Int -> Rational -> IO Throttle
newThrottle actionLimit minDelayInMillis maxDelayInMillis requestBackoff = do
-- Initialise an empty action counter
actionCount <- TVar.newTVarIO 0
-- Create the semaphore/throttle allowing a single action.
actionSem <- Sem.new 2
return $ Throttle { .. }
-- | Runs the action but ensures that it is throttled appropriately.
--
-- Specifically this limits the number of actions that can be invoked overall and
-- also adds in a delay between actions.
--
-- The delay is equal to the greater of the minimum delay specified and the last action time
-- up to the limit of the maximum delay.
--
-- For example if the last action took 4 seconds and the min delay was 100 ms then it would
-- wait at least another 4 seconds before continuing.
--
| 844
|
newThrottle :: Int -> Int -> Int -> Rational -> IO Throttle
newThrottle actionLimit minDelayInMillis maxDelayInMillis requestBackoff = do
-- Initialise an empty action counter
actionCount <- TVar.newTVarIO 0
-- Create the semaphore/throttle allowing a single action.
actionSem <- Sem.new 2
return $ Throttle { .. }
-- | Runs the action but ensures that it is throttled appropriately.
--
-- Specifically this limits the number of actions that can be invoked overall and
-- also adds in a delay between actions.
--
-- The delay is equal to the greater of the minimum delay specified and the last action time
-- up to the limit of the maximum delay.
--
-- For example if the last action took 4 seconds and the min delay was 100 ms then it would
-- wait at least another 4 seconds before continuing.
--
| 815
|
newThrottle actionLimit minDelayInMillis maxDelayInMillis requestBackoff = do
-- Initialise an empty action counter
actionCount <- TVar.newTVarIO 0
-- Create the semaphore/throttle allowing a single action.
actionSem <- Sem.new 2
return $ Throttle { .. }
-- | Runs the action but ensures that it is throttled appropriately.
--
-- Specifically this limits the number of actions that can be invoked overall and
-- also adds in a delay between actions.
--
-- The delay is equal to the greater of the minimum delay specified and the last action time
-- up to the limit of the maximum delay.
--
-- For example if the last action took 4 seconds and the min delay was 100 ms then it would
-- wait at least another 4 seconds before continuing.
--
| 755
| true
| true
| 0
| 9
| 163
| 94
| 50
| 44
| null | null |
razvan9310/barrelfish
|
hake/RuleDefs.hs
|
mit
|
-------------------------------------------------------------------------
--
-- Architecture specific definitions
--
-------------------------------------------------------------------------
options :: String -> Options
options "armv7" = ARMv7.options
| 252
|
options :: String -> Options
options "armv7" = ARMv7.options
| 60
|
options "armv7" = ARMv7.options
| 31
| true
| true
| 0
| 5
| 17
| 25
| 15
| 10
| null | null |
nathana1/FrameworkBenchmarks
|
frameworks/Haskell/yesod/yesod-mysql-mongo/src/yesod.hs
|
bsd-3-clause
|
fakeInternalState :: InternalState
fakeInternalState = unsafePerformIO $ newIORef $ error "fakeInternalState forced"
| 116
|
fakeInternalState :: InternalState
fakeInternalState = unsafePerformIO $ newIORef $ error "fakeInternalState forced"
| 116
|
fakeInternalState = unsafePerformIO $ newIORef $ error "fakeInternalState forced"
| 81
| false
| true
| 0
| 6
| 11
| 22
| 11
| 11
| null | null |
kyagrd/mininax
|
src/InferDec.hs
|
bsd-2-clause
|
tiDec (Data (UIdent tc) is dAlts) (kctx,ictx,env) =
trace ("\ntiDec "++tc) $
do kArgSigs <- sequence $
do i <- is -- list monad
return $ case i of
IVarR(LIdent a) -> (,) (string2Name a) <$>
(Right . Var <$> fresh "k")
IVarL(LIdent a) -> (,) (string2Name a) <$>
(Left . Var <$> freshTyName' "i")
let kArgSigsR = [ (x,monoKi k) | (x,Right k) <- kArgSigs]
let kArgSigsL = [ (x,monoTy t) | (x,Left t) <- kArgSigs]
mapM (kiDAlt (kArgSigsR ++ kctx) (kArgSigsL ++ ictx) env) dAlts
u <- lift getSubst
tcSig <- (,) (string2Name tc) <$>
(closeKi kctx ictx [] =<<
norm env (uapply u $ foldr KArr Star (map snd kArgSigs)))
let kctx' = tcSig : kctx
ictx' <- (++ ictx) <$>
sequence
[ (,) (string2Name c) <$>
(closeTy kctx' ictx_upper =<<
(norm env $ uapply u $
foldr TArr retTy (map (type2Ty' env) ts)) )
| DAlt (UIdent c) ts <- reverse dAlts ]
u <- lift getSubst
() <- trace ("length u = "++show(length u)) $ return ()
return (kctx',ictx',env)
where
ictx_upper = filter (isUpper.head.show.fst) ictx
retTy = foldl TApp (TCon(string2Name tc)) $
do i <- is -- list monad
return $ case i of
IVarR(LIdent a) -> Right $ Var(string2Name a)
IVarL(LIdent a) -> Left $ Var(string2Name a)
| 1,695
|
tiDec (Data (UIdent tc) is dAlts) (kctx,ictx,env) =
trace ("\ntiDec "++tc) $
do kArgSigs <- sequence $
do i <- is -- list monad
return $ case i of
IVarR(LIdent a) -> (,) (string2Name a) <$>
(Right . Var <$> fresh "k")
IVarL(LIdent a) -> (,) (string2Name a) <$>
(Left . Var <$> freshTyName' "i")
let kArgSigsR = [ (x,monoKi k) | (x,Right k) <- kArgSigs]
let kArgSigsL = [ (x,monoTy t) | (x,Left t) <- kArgSigs]
mapM (kiDAlt (kArgSigsR ++ kctx) (kArgSigsL ++ ictx) env) dAlts
u <- lift getSubst
tcSig <- (,) (string2Name tc) <$>
(closeKi kctx ictx [] =<<
norm env (uapply u $ foldr KArr Star (map snd kArgSigs)))
let kctx' = tcSig : kctx
ictx' <- (++ ictx) <$>
sequence
[ (,) (string2Name c) <$>
(closeTy kctx' ictx_upper =<<
(norm env $ uapply u $
foldr TArr retTy (map (type2Ty' env) ts)) )
| DAlt (UIdent c) ts <- reverse dAlts ]
u <- lift getSubst
() <- trace ("length u = "++show(length u)) $ return ()
return (kctx',ictx',env)
where
ictx_upper = filter (isUpper.head.show.fst) ictx
retTy = foldl TApp (TCon(string2Name tc)) $
do i <- is -- list monad
return $ case i of
IVarR(LIdent a) -> Right $ Var(string2Name a)
IVarL(LIdent a) -> Left $ Var(string2Name a)
| 1,695
|
tiDec (Data (UIdent tc) is dAlts) (kctx,ictx,env) =
trace ("\ntiDec "++tc) $
do kArgSigs <- sequence $
do i <- is -- list monad
return $ case i of
IVarR(LIdent a) -> (,) (string2Name a) <$>
(Right . Var <$> fresh "k")
IVarL(LIdent a) -> (,) (string2Name a) <$>
(Left . Var <$> freshTyName' "i")
let kArgSigsR = [ (x,monoKi k) | (x,Right k) <- kArgSigs]
let kArgSigsL = [ (x,monoTy t) | (x,Left t) <- kArgSigs]
mapM (kiDAlt (kArgSigsR ++ kctx) (kArgSigsL ++ ictx) env) dAlts
u <- lift getSubst
tcSig <- (,) (string2Name tc) <$>
(closeKi kctx ictx [] =<<
norm env (uapply u $ foldr KArr Star (map snd kArgSigs)))
let kctx' = tcSig : kctx
ictx' <- (++ ictx) <$>
sequence
[ (,) (string2Name c) <$>
(closeTy kctx' ictx_upper =<<
(norm env $ uapply u $
foldr TArr retTy (map (type2Ty' env) ts)) )
| DAlt (UIdent c) ts <- reverse dAlts ]
u <- lift getSubst
() <- trace ("length u = "++show(length u)) $ return ()
return (kctx',ictx',env)
where
ictx_upper = filter (isUpper.head.show.fst) ictx
retTy = foldl TApp (TCon(string2Name tc)) $
do i <- is -- list monad
return $ case i of
IVarR(LIdent a) -> Right $ Var(string2Name a)
IVarL(LIdent a) -> Left $ Var(string2Name a)
| 1,695
| false
| false
| 5
| 20
| 743
| 678
| 324
| 354
| null | null |
mapinguari/SC_HS_Proxy
|
src/Proxy/Query/Unit.hs
|
mit
|
isWorker ProtossForge = False
| 29
|
isWorker ProtossForge = False
| 29
|
isWorker ProtossForge = False
| 29
| false
| false
| 0
| 5
| 3
| 9
| 4
| 5
| null | null |
brendanhay/gogol
|
gogol-books/gen/Network/Google/Books/Types/Product.hs
|
mpl-2.0
|
-- | User-created data for this annotation.
annData :: Lens' Annotation (Maybe Text)
annData = lens _annData (\ s a -> s{_annData = a})
| 135
|
annData :: Lens' Annotation (Maybe Text)
annData = lens _annData (\ s a -> s{_annData = a})
| 91
|
annData = lens _annData (\ s a -> s{_annData = a})
| 50
| true
| true
| 0
| 9
| 23
| 46
| 25
| 21
| null | null |
mhwombat/exp-uivector-cluster-wains
|
src/ALife/Creatur/Wain/UIVector/Cluster/Experiment.hs
|
bsd-3-clause
|
idealPopControlDeltaE :: Double -> Double -> Double -> Int -> Double
idealPopControlDeltaE average total budget pop
| average < 0.8 = min 0.08 $ (budget - total) / (fromIntegral pop)
| otherwise = 0.8 - average
| 218
|
idealPopControlDeltaE :: Double -> Double -> Double -> Int -> Double
idealPopControlDeltaE average total budget pop
| average < 0.8 = min 0.08 $ (budget - total) / (fromIntegral pop)
| otherwise = 0.8 - average
| 218
|
idealPopControlDeltaE average total budget pop
| average < 0.8 = min 0.08 $ (budget - total) / (fromIntegral pop)
| otherwise = 0.8 - average
| 149
| false
| true
| 1
| 9
| 43
| 82
| 40
| 42
| null | null |
li-zhirui/EoplLangs
|
src/ExceptionLang/Evaluator.hs
|
bsd-3-clause
|
valueOf (RaiseExpr expr) env cont = evalRaiseExpr expr env cont
| 70
|
valueOf (RaiseExpr expr) env cont = evalRaiseExpr expr env cont
| 70
|
valueOf (RaiseExpr expr) env cont = evalRaiseExpr expr env cont
| 70
| false
| false
| 0
| 7
| 16
| 26
| 12
| 14
| null | null |
brendanhay/gogol
|
gogol-tracing/gen/Network/Google/Resource/Tracing/Projects/Traces/BatchWrite.hs
|
mpl-2.0
|
-- | V1 error format.
ptbwXgafv :: Lens' ProjectsTracesBatchWrite (Maybe Xgafv)
ptbwXgafv
= lens _ptbwXgafv (\ s a -> s{_ptbwXgafv = a})
| 138
|
ptbwXgafv :: Lens' ProjectsTracesBatchWrite (Maybe Xgafv)
ptbwXgafv
= lens _ptbwXgafv (\ s a -> s{_ptbwXgafv = a})
| 116
|
ptbwXgafv
= lens _ptbwXgafv (\ s a -> s{_ptbwXgafv = a})
| 58
| true
| true
| 0
| 9
| 23
| 48
| 25
| 23
| null | null |
naushadh/persistent
|
persistent-mongoDB/Database/Persist/MongoDB.hs
|
mit
|
-- | The normal Persistent equality test '==.' is not generic enough.
-- Instead use this with the drill-down arrow operaters such as '->.'
--
-- using this as the only query filter is similar to the following in the mongoDB shell
--
-- > db.Collection.find({"object.field": item})
nestEq, nestNe, nestGe, nestLe, nestIn, nestNotIn :: forall record typ.
( PersistField typ , PersistEntityBackend record ~ DB.MongoContext)
=> NestedField record typ
-> typ
-> Filter record
nestEq = nestedFilterOp Eq
| 514
|
nestEq, nestNe, nestGe, nestLe, nestIn, nestNotIn :: forall record typ.
( PersistField typ , PersistEntityBackend record ~ DB.MongoContext)
=> NestedField record typ
-> typ
-> Filter record
nestEq = nestedFilterOp Eq
| 232
|
nestEq = nestedFilterOp Eq
| 26
| true
| true
| 2
| 9
| 93
| 76
| 45
| 31
| null | null |
cglazner/ibd_stitch
|
src/ParseMorg.hs
|
bsd-3-clause
|
myAllele = oneOf "012" <* myWs <?> "allele"
| 44
|
myAllele = oneOf "012" <* myWs <?> "allele"
| 44
|
myAllele = oneOf "012" <* myWs <?> "allele"
| 44
| false
| false
| 0
| 7
| 8
| 17
| 8
| 9
| null | null |
piyush-kurur-pages/website
|
Site/Blog.hs
|
bsd-3-clause
|
-- | Blog post page
blogPostPage :: Tags -> Pipeline String String
blogPostPage tags = prePandoc >=> pandoc
>=> saveSnapshot "content"
>=> postRender
>=> postPandoc cxt
where postRender = loadAndApplyTemplate postT cxt
cxt = postContext <> tagsField "postTags" tags
-- | Blog archive page.
| 365
|
blogPostPage :: Tags -> Pipeline String String
blogPostPage tags = prePandoc >=> pandoc
>=> saveSnapshot "content"
>=> postRender
>=> postPandoc cxt
where postRender = loadAndApplyTemplate postT cxt
cxt = postContext <> tagsField "postTags" tags
-- | Blog archive page.
| 345
|
blogPostPage tags = prePandoc >=> pandoc
>=> saveSnapshot "content"
>=> postRender
>=> postPandoc cxt
where postRender = loadAndApplyTemplate postT cxt
cxt = postContext <> tagsField "postTags" tags
-- | Blog archive page.
| 298
| true
| true
| 1
| 8
| 119
| 75
| 36
| 39
| null | null |
acowley/ghc
|
compiler/typecheck/TcType.hs
|
bsd-3-clause
|
isImprovementPred :: PredType -> Bool
-- Either it's an equality, or has some functional dependency
isImprovementPred ty
= case classifyPredType ty of
EqPred NomEq t1 t2 -> not (t1 `tcEqType` t2)
EqPred ReprEq _ _ -> False
ClassPred cls _ -> classHasFds cls
IrredPred {} -> True -- Might have equalities after reduction?
{-
************************************************************************
* *
\subsection{Predicates}
* *
************************************************************************
-}
| 680
|
isImprovementPred :: PredType -> Bool
isImprovementPred ty
= case classifyPredType ty of
EqPred NomEq t1 t2 -> not (t1 `tcEqType` t2)
EqPred ReprEq _ _ -> False
ClassPred cls _ -> classHasFds cls
IrredPred {} -> True -- Might have equalities after reduction?
{-
************************************************************************
* *
\subsection{Predicates}
* *
************************************************************************
-}
| 618
|
isImprovementPred ty
= case classifyPredType ty of
EqPred NomEq t1 t2 -> not (t1 `tcEqType` t2)
EqPred ReprEq _ _ -> False
ClassPred cls _ -> classHasFds cls
IrredPred {} -> True -- Might have equalities after reduction?
{-
************************************************************************
* *
\subsection{Predicates}
* *
************************************************************************
-}
| 580
| true
| true
| 0
| 10
| 237
| 96
| 46
| 50
| null | null |
jonaprieto/athena
|
src/Athena/Translation/Utils.hs
|
mit
|
subIndex ∷ Char → Char
subIndex '0' = '₀'
| 41
|
subIndex ∷ Char → Char
subIndex '0' = '₀'
| 41
|
subIndex '0' = '₀'
| 18
| false
| true
| 0
| 5
| 8
| 18
| 9
| 9
| null | null |
5outh/BeFun
|
src/FunctionProcesses.hs
|
mit
|
subt = bsPopFunBinary (flip (-))
| 35
|
subt = bsPopFunBinary (flip (-))
| 35
|
subt = bsPopFunBinary (flip (-))
| 35
| false
| false
| 0
| 7
| 7
| 17
| 9
| 8
| null | null |
joshuapassos/GCET525-Compiladores
|
BNF/Parser/Vodka/SkelVodka.hs
|
mit
|
transMain :: Main -> Result
transMain x = case x of
Main idents block -> failure x
| 84
|
transMain :: Main -> Result
transMain x = case x of
Main idents block -> failure x
| 84
|
transMain x = case x of
Main idents block -> failure x
| 56
| false
| true
| 2
| 5
| 18
| 35
| 17
| 18
| null | null |
GaloisInc/saw-script
|
rme/src/Data/RME/Vector.hs
|
bsd-3-clause
|
ripple_carry_adder (x : xs) (y : ys) c = (c'', z : zs)
where (c', zs) = ripple_carry_adder xs ys c
(c'', z) = full_adder x y c'
-- | Two's complement bitvector addition.
| 180
|
ripple_carry_adder (x : xs) (y : ys) c = (c'', z : zs)
where (c', zs) = ripple_carry_adder xs ys c
(c'', z) = full_adder x y c'
-- | Two's complement bitvector addition.
| 180
|
ripple_carry_adder (x : xs) (y : ys) c = (c'', z : zs)
where (c', zs) = ripple_carry_adder xs ys c
(c'', z) = full_adder x y c'
-- | Two's complement bitvector addition.
| 180
| false
| false
| 1
| 7
| 44
| 77
| 42
| 35
| null | null |
dmjio/aeson
|
benchmarks/bench/UnescapePureText2.hs
|
bsd-3-clause
|
decodeHex :: Word8 -> Word16
decodeHex x
| 48 <= x && x <= 57 = fromIntegral x - 48 -- 0-9
| 65 <= x && x <= 70 = fromIntegral x - 55 -- A-F
| 97 <= x && x <= 102 = fromIntegral x - 87 -- a-f
| otherwise = throwDecodeError
| 235
|
decodeHex :: Word8 -> Word16
decodeHex x
| 48 <= x && x <= 57 = fromIntegral x - 48 -- 0-9
| 65 <= x && x <= 70 = fromIntegral x - 55 -- A-F
| 97 <= x && x <= 102 = fromIntegral x - 87 -- a-f
| otherwise = throwDecodeError
| 235
|
decodeHex x
| 48 <= x && x <= 57 = fromIntegral x - 48 -- 0-9
| 65 <= x && x <= 70 = fromIntegral x - 55 -- A-F
| 97 <= x && x <= 102 = fromIntegral x - 87 -- a-f
| otherwise = throwDecodeError
| 206
| false
| true
| 1
| 10
| 68
| 114
| 55
| 59
| null | null |
jfulseca/Pudding
|
src/Pudding/Types/Internal/PolarAngles.hs
|
gpl-3.0
|
polarAnglesEq :: PolarAngles -> PolarAngles -> Bool
polarAnglesEq a1 a2
| theta1' ~= 0 = theta2' ~= 0
| theta2' ~= 0 = theta1' ~= 0
| theta1' ~= pi = theta2' ~= pi
| theta2' ~= 0 = theta1' ~= pi
| otherwise = theta1' ~= theta2' && phi1' ~= phi2'
where PolarAngles theta1' phi1' = normalize a1
PolarAngles theta2' phi2' = normalize a2
| 353
|
polarAnglesEq :: PolarAngles -> PolarAngles -> Bool
polarAnglesEq a1 a2
| theta1' ~= 0 = theta2' ~= 0
| theta2' ~= 0 = theta1' ~= 0
| theta1' ~= pi = theta2' ~= pi
| theta2' ~= 0 = theta1' ~= pi
| otherwise = theta1' ~= theta2' && phi1' ~= phi2'
where PolarAngles theta1' phi1' = normalize a1
PolarAngles theta2' phi2' = normalize a2
| 353
|
polarAnglesEq a1 a2
| theta1' ~= 0 = theta2' ~= 0
| theta2' ~= 0 = theta1' ~= 0
| theta1' ~= pi = theta2' ~= pi
| theta2' ~= 0 = theta1' ~= pi
| otherwise = theta1' ~= theta2' && phi1' ~= phi2'
where PolarAngles theta1' phi1' = normalize a1
PolarAngles theta2' phi2' = normalize a2
| 301
| false
| true
| 5
| 8
| 84
| 135
| 65
| 70
| null | null |
zeckalpha/TaPL
|
src/Language/TaPL/Boolean/Syntax.hs
|
mit
|
arbitraryTerm' 0 = oneof $ return <$> [ TmTrue
, TmFalse
]
| 134
|
arbitraryTerm' 0 = oneof $ return <$> [ TmTrue
, TmFalse
]
| 134
|
arbitraryTerm' 0 = oneof $ return <$> [ TmTrue
, TmFalse
]
| 134
| false
| false
| 0
| 6
| 87
| 23
| 12
| 11
| null | null |
beni55/hspec-snap
|
src/Test/Hspec/Snap.hs
|
bsd-3-clause
|
-- | Asserts that the response is a NotFound.
should404 :: TestResponse -> SnapHspecM b ()
should404 NotFound = setResult Success
| 129
|
should404 :: TestResponse -> SnapHspecM b ()
should404 NotFound = setResult Success
| 83
|
should404 NotFound = setResult Success
| 38
| true
| true
| 0
| 8
| 20
| 34
| 15
| 19
| null | null |
jacekszymanski/wxHaskell
|
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
|
lgpl-2.1
|
wxLAYOUT_VERTICAL :: Int
wxLAYOUT_VERTICAL = 1
| 46
|
wxLAYOUT_VERTICAL :: Int
wxLAYOUT_VERTICAL = 1
| 46
|
wxLAYOUT_VERTICAL = 1
| 21
| false
| true
| 0
| 4
| 5
| 11
| 6
| 5
| null | null |
magicant/flesh
|
src/Flesh/Language/Parser/Error/Print.hs
|
gpl-2.0
|
describe (MissingThenForIf p) =
("a then clause is required after the if clause", [b])
where b = note p "the \"if\" was here"
| 131
|
describe (MissingThenForIf p) =
("a then clause is required after the if clause", [b])
where b = note p "the \"if\" was here"
| 131
|
describe (MissingThenForIf p) =
("a then clause is required after the if clause", [b])
where b = note p "the \"if\" was here"
| 131
| false
| false
| 0
| 7
| 28
| 36
| 19
| 17
| null | null |
thoferon/seakale
|
src/Database/Seakale/FromRow.hs
|
bsd-3-clause
|
execParser :: RowParser backend n a -> backend
-> [(ColumnInfo backend, Field backend)]
-> Either String ([(ColumnInfo backend, Field backend)], a)
execParser parser backend pairs = case parser of
Pure x -> return (pairs, x)
GetBackend -> return (pairs, backend)
Consume -> case pairs of
pair : pairs' -> return (pairs', pair)
[] -> Left "not enough columns"
Bind parser' f -> do
(pairs', x) <- execParser parser' backend pairs
execParser (f x) backend pairs'
Or parser1 parser2 ->
let eRes1 = execParser parser1 backend pairs
eRes2 = execParser parser2 backend pairs
in case eRes1 of
Right _ -> eRes1
_ -> eRes2
Fail msg -> Left msg
| 712
|
execParser :: RowParser backend n a -> backend
-> [(ColumnInfo backend, Field backend)]
-> Either String ([(ColumnInfo backend, Field backend)], a)
execParser parser backend pairs = case parser of
Pure x -> return (pairs, x)
GetBackend -> return (pairs, backend)
Consume -> case pairs of
pair : pairs' -> return (pairs', pair)
[] -> Left "not enough columns"
Bind parser' f -> do
(pairs', x) <- execParser parser' backend pairs
execParser (f x) backend pairs'
Or parser1 parser2 ->
let eRes1 = execParser parser1 backend pairs
eRes2 = execParser parser2 backend pairs
in case eRes1 of
Right _ -> eRes1
_ -> eRes2
Fail msg -> Left msg
| 712
|
execParser parser backend pairs = case parser of
Pure x -> return (pairs, x)
GetBackend -> return (pairs, backend)
Consume -> case pairs of
pair : pairs' -> return (pairs', pair)
[] -> Left "not enough columns"
Bind parser' f -> do
(pairs', x) <- execParser parser' backend pairs
execParser (f x) backend pairs'
Or parser1 parser2 ->
let eRes1 = execParser parser1 backend pairs
eRes2 = execParser parser2 backend pairs
in case eRes1 of
Right _ -> eRes1
_ -> eRes2
Fail msg -> Left msg
| 542
| false
| true
| 0
| 13
| 186
| 278
| 135
| 143
| null | null |
harendra-kumar/asyncly
|
examples/WordCount.hs
|
bsd-3-clause
|
main :: IO ()
main = do
name <- fmap head getArgs
src <- openFile name ReadMode
-- _wc_mwl_serial src -- Unix wc -l program
-- printCounts =<< _wc_mwl_parserial src -- Unix wc -l program
-- Using different sizes of chunks (1,2,3,4,5,10,128,256) is a good testing
-- mechanism for parallel counting code.
{-
args <- getArgs
let chunkSize = read $ args !! 1
-}
let chunkSize = 32 * 1024
printCounts =<< wc_mwl_parallel src chunkSize -- Unix wc -l program
| 501
|
main :: IO ()
main = do
name <- fmap head getArgs
src <- openFile name ReadMode
-- _wc_mwl_serial src -- Unix wc -l program
-- printCounts =<< _wc_mwl_parserial src -- Unix wc -l program
-- Using different sizes of chunks (1,2,3,4,5,10,128,256) is a good testing
-- mechanism for parallel counting code.
{-
args <- getArgs
let chunkSize = read $ args !! 1
-}
let chunkSize = 32 * 1024
printCounts =<< wc_mwl_parallel src chunkSize -- Unix wc -l program
| 501
|
main = do
name <- fmap head getArgs
src <- openFile name ReadMode
-- _wc_mwl_serial src -- Unix wc -l program
-- printCounts =<< _wc_mwl_parserial src -- Unix wc -l program
-- Using different sizes of chunks (1,2,3,4,5,10,128,256) is a good testing
-- mechanism for parallel counting code.
{-
args <- getArgs
let chunkSize = read $ args !! 1
-}
let chunkSize = 32 * 1024
printCounts =<< wc_mwl_parallel src chunkSize -- Unix wc -l program
| 487
| false
| true
| 1
| 11
| 129
| 75
| 35
| 40
| null | null |
snowleopard/alga
|
src/Algebra/Graph/ToGraph.hs
|
mit
|
-- | The transposed /adjacency map/ of a graph: each vertex is associated with a
-- set of its /direct predecessors/.
--
-- @
-- adjacencyMapTranspose == Algebra.Graph.AdjacencyMap.'Algebra.Graph.AdjacencyMap.adjacencyMap' . 'toAdjacencyMapTranspose'
-- @
adjacencyMapTranspose :: (ToGraph t, Ord (ToVertex t)) => t -> Map (ToVertex t) (Set (ToVertex t))
adjacencyMapTranspose = AM.adjacencyMap . toAdjacencyMapTranspose
| 420
|
adjacencyMapTranspose :: (ToGraph t, Ord (ToVertex t)) => t -> Map (ToVertex t) (Set (ToVertex t))
adjacencyMapTranspose = AM.adjacencyMap . toAdjacencyMapTranspose
| 164
|
adjacencyMapTranspose = AM.adjacencyMap . toAdjacencyMapTranspose
| 65
| true
| true
| 0
| 11
| 52
| 71
| 39
| 32
| null | null |
mcmaniac/ghc
|
compiler/nativeGen/X86/CodeGen.hs
|
bsd-3-clause
|
genCCall _ (CmmPrim MO_WriteBarrier) _ _ = return nilOL
| 55
|
genCCall _ (CmmPrim MO_WriteBarrier) _ _ = return nilOL
| 55
|
genCCall _ (CmmPrim MO_WriteBarrier) _ _ = return nilOL
| 55
| false
| false
| 0
| 7
| 8
| 24
| 11
| 13
| null | null |
LambdaHack/LambdaHack
|
engine-src/Game/LambdaHack/Atomic/MonadStateWrite.hs
|
bsd-3-clause
|
deleteBagContainer :: MonadStateWrite m
=> ItemBag -> Container -> m ()
deleteBagContainer bag c = case c of
CFloor lid pos -> do
let alt Nothing = atomicFail $ "floor bag already empty"
`showFailure` (lid, pos, bag)
alt (Just bag2) = assert (bag == bag2) Nothing
updateLevel lid $ updateFloor $ EM.alter alt pos
CEmbed lid pos -> do
let alt Nothing = atomicFail $ "embed bag already empty"
`showFailure` (lid, pos, bag)
alt (Just bag2) = assert (bag == bag2 `blame` (bag, bag2)) Nothing
updateLevel lid $ updateEmbed $ EM.alter alt pos
CActor aid store ->
-- Very unlikely case, so we prefer brevity over performance.
mapWithKeyM_ (\iid kit -> deleteItemActor iid kit aid store) bag
CTrunk{} -> error $ "" `showFailure` c
| 859
|
deleteBagContainer :: MonadStateWrite m
=> ItemBag -> Container -> m ()
deleteBagContainer bag c = case c of
CFloor lid pos -> do
let alt Nothing = atomicFail $ "floor bag already empty"
`showFailure` (lid, pos, bag)
alt (Just bag2) = assert (bag == bag2) Nothing
updateLevel lid $ updateFloor $ EM.alter alt pos
CEmbed lid pos -> do
let alt Nothing = atomicFail $ "embed bag already empty"
`showFailure` (lid, pos, bag)
alt (Just bag2) = assert (bag == bag2 `blame` (bag, bag2)) Nothing
updateLevel lid $ updateEmbed $ EM.alter alt pos
CActor aid store ->
-- Very unlikely case, so we prefer brevity over performance.
mapWithKeyM_ (\iid kit -> deleteItemActor iid kit aid store) bag
CTrunk{} -> error $ "" `showFailure` c
| 859
|
deleteBagContainer bag c = case c of
CFloor lid pos -> do
let alt Nothing = atomicFail $ "floor bag already empty"
`showFailure` (lid, pos, bag)
alt (Just bag2) = assert (bag == bag2) Nothing
updateLevel lid $ updateFloor $ EM.alter alt pos
CEmbed lid pos -> do
let alt Nothing = atomicFail $ "embed bag already empty"
`showFailure` (lid, pos, bag)
alt (Just bag2) = assert (bag == bag2 `blame` (bag, bag2)) Nothing
updateLevel lid $ updateEmbed $ EM.alter alt pos
CActor aid store ->
-- Very unlikely case, so we prefer brevity over performance.
mapWithKeyM_ (\iid kit -> deleteItemActor iid kit aid store) bag
CTrunk{} -> error $ "" `showFailure` c
| 768
| false
| true
| 6
| 13
| 260
| 285
| 142
| 143
| null | null |
ghcjs/jsaddle-dom
|
src/JSDOM/Generated/SubtleCrypto.hs
|
mit
|
-- | <https://developer.mozilla.org/en-US/docs/Web/API/WebKitSubtleCrypto.verify Mozilla WebKitSubtleCrypto.verify documentation>
verify ::
(MonadDOM m, ToJSString algorithm, IsBufferSource signature,
IsBufferSource data') =>
SubtleCrypto ->
algorithm -> CryptoKey -> signature -> data' -> m JSVal
verify self algorithm key signature data'
= liftDOM
(((self ^. jsf "verify"
[toJSVal algorithm, toJSVal key, toJSVal signature, toJSVal data'])
>>= readPromise)
>>= toJSVal)
| 545
|
verify ::
(MonadDOM m, ToJSString algorithm, IsBufferSource signature,
IsBufferSource data') =>
SubtleCrypto ->
algorithm -> CryptoKey -> signature -> data' -> m JSVal
verify self algorithm key signature data'
= liftDOM
(((self ^. jsf "verify"
[toJSVal algorithm, toJSVal key, toJSVal signature, toJSVal data'])
>>= readPromise)
>>= toJSVal)
| 414
|
verify self algorithm key signature data'
= liftDOM
(((self ^. jsf "verify"
[toJSVal algorithm, toJSVal key, toJSVal signature, toJSVal data'])
>>= readPromise)
>>= toJSVal)
| 211
| true
| true
| 0
| 14
| 126
| 131
| 65
| 66
| null | null |
alexander-at-github/eta
|
compiler/ETA/Prelude/PrimOp.hs
|
bsd-3-clause
|
tagOf_PrimOp ReadOffAddrOp_Int = _ILIT(290)
| 43
|
tagOf_PrimOp ReadOffAddrOp_Int = _ILIT(290)
| 43
|
tagOf_PrimOp ReadOffAddrOp_Int = _ILIT(290)
| 43
| false
| false
| 0
| 6
| 3
| 15
| 7
| 8
| null | null |
JacquesCarette/literate-scientific-software
|
code/drasil-example/Drasil/GamePhysics/DesignDec/Vector.hs
|
bsd-2-clause
|
vectRPerp = funcDef "vectRPerp" [v_v] (Vect Rational)
[
FRet (FCall (funcUID vect)
[
FCall (funcUID getY) [v_v],
Neg (FCall (funcUID getX) [v_v])
]
)
]
| 191
|
vectRPerp = funcDef "vectRPerp" [v_v] (Vect Rational)
[
FRet (FCall (funcUID vect)
[
FCall (funcUID getY) [v_v],
Neg (FCall (funcUID getX) [v_v])
]
)
]
| 191
|
vectRPerp = funcDef "vectRPerp" [v_v] (Vect Rational)
[
FRet (FCall (funcUID vect)
[
FCall (funcUID getY) [v_v],
Neg (FCall (funcUID getX) [v_v])
]
)
]
| 191
| false
| false
| 0
| 14
| 64
| 85
| 43
| 42
| null | null |
sdiehl/ghc
|
compiler/prelude/PrelNames.hs
|
bsd-3-clause
|
gHC_EXTS = mkBaseModule (fsLit "GHC.Exts")
| 49
|
gHC_EXTS = mkBaseModule (fsLit "GHC.Exts")
| 49
|
gHC_EXTS = mkBaseModule (fsLit "GHC.Exts")
| 49
| false
| false
| 0
| 7
| 11
| 15
| 7
| 8
| null | null |
corngood/cabal
|
Cabal/Distribution/Simple/GHC.hs
|
bsd-3-clause
|
checkNeedsRecompilation :: FilePath -> GhcOptions -> IO Bool
checkNeedsRecompilation filename opts = filename `moreRecentFile` oname
where oname = getObjectFileName filename opts
-- | Finds the object file name of the given source file
| 240
|
checkNeedsRecompilation :: FilePath -> GhcOptions -> IO Bool
checkNeedsRecompilation filename opts = filename `moreRecentFile` oname
where oname = getObjectFileName filename opts
-- | Finds the object file name of the given source file
| 240
|
checkNeedsRecompilation filename opts = filename `moreRecentFile` oname
where oname = getObjectFileName filename opts
-- | Finds the object file name of the given source file
| 179
| false
| true
| 0
| 7
| 37
| 47
| 24
| 23
| null | null |
RichardBarrell/snippets
|
ToTheMoon.hs
|
isc
|
hvsucc h v k = if all id h then k empties (lsucc v) else k (lsucc h) v
| 70
|
hvsucc h v k = if all id h then k empties (lsucc v) else k (lsucc h) v
| 70
|
hvsucc h v k = if all id h then k empties (lsucc v) else k (lsucc h) v
| 70
| false
| false
| 0
| 8
| 18
| 48
| 23
| 25
| null | null |
JohnL4/ProjectEuler
|
Haskell/Problem032/src/Lib.hs
|
mit
|
smallestUniqueSeqGE (digit:[]) allowed =
if 0 == (length $ dropWhile (< digit) allowed)
then Nothing
else Just [head $ dropWhile (< digit) allowed]
| 153
|
smallestUniqueSeqGE (digit:[]) allowed =
if 0 == (length $ dropWhile (< digit) allowed)
then Nothing
else Just [head $ dropWhile (< digit) allowed]
| 153
|
smallestUniqueSeqGE (digit:[]) allowed =
if 0 == (length $ dropWhile (< digit) allowed)
then Nothing
else Just [head $ dropWhile (< digit) allowed]
| 153
| false
| false
| 0
| 10
| 28
| 67
| 36
| 31
| null | null |
LouisJenkinsCS/Minimal-JVM
|
MateVMRuntime/JavaObjects.hs
|
bsd-3-clause
|
getObjectFieldCountPtr :: Ptr a -> IO Int
getObjectFieldCountPtr ptr = do
clazzNameM <- getClassNamePtr ptr
case clazzNameM of
Nothing -> error "getObjectFieldCountPtr called on non mate object (getClassNamePtr returned Nothing)"
Just clazzName -> liftM fromIntegral $ getFieldCount clazzName
| 302
|
getObjectFieldCountPtr :: Ptr a -> IO Int
getObjectFieldCountPtr ptr = do
clazzNameM <- getClassNamePtr ptr
case clazzNameM of
Nothing -> error "getObjectFieldCountPtr called on non mate object (getClassNamePtr returned Nothing)"
Just clazzName -> liftM fromIntegral $ getFieldCount clazzName
| 302
|
getObjectFieldCountPtr ptr = do
clazzNameM <- getClassNamePtr ptr
case clazzNameM of
Nothing -> error "getObjectFieldCountPtr called on non mate object (getClassNamePtr returned Nothing)"
Just clazzName -> liftM fromIntegral $ getFieldCount clazzName
| 260
| false
| true
| 0
| 11
| 47
| 69
| 30
| 39
| null | null |
gregwebs/haskell-sphinx-client
|
Text/Search/Sphinx/Indexable.hs
|
bsd-3-clause
|
serialize :: SphinxSchema a => [a] -> Element
serialize items =
sphinxEl "docset" << (
sphinxEl "schema" << (map schemaField $ schema (head $ items))
: map (doc . toDocument) items
)
| 196
|
serialize :: SphinxSchema a => [a] -> Element
serialize items =
sphinxEl "docset" << (
sphinxEl "schema" << (map schemaField $ schema (head $ items))
: map (doc . toDocument) items
)
| 196
|
serialize items =
sphinxEl "docset" << (
sphinxEl "schema" << (map schemaField $ schema (head $ items))
: map (doc . toDocument) items
)
| 150
| false
| true
| 0
| 13
| 45
| 81
| 40
| 41
| null | null |
jdcannon/hascheme
|
.stack-work/dist/x86_64-linux-ncurses6-nopie/Cabal-1.24.2.0/build/autogen/Paths_HaScheme.hs
|
gpl-3.0
|
dynlibdir = "/home/promethorn/Projects/HaScheme/.stack-work/install/x86_64-linux-ncurses6-nopie/lts-9.9/8.0.2/lib/x86_64-linux-ghc-8.0.2"
| 138
|
dynlibdir = "/home/promethorn/Projects/HaScheme/.stack-work/install/x86_64-linux-ncurses6-nopie/lts-9.9/8.0.2/lib/x86_64-linux-ghc-8.0.2"
| 138
|
dynlibdir = "/home/promethorn/Projects/HaScheme/.stack-work/install/x86_64-linux-ncurses6-nopie/lts-9.9/8.0.2/lib/x86_64-linux-ghc-8.0.2"
| 138
| false
| false
| 0
| 4
| 3
| 6
| 3
| 3
| null | null |
mettekou/ghc
|
compiler/hsSyn/HsExpr.hs
|
bsd-3-clause
|
isEmptyMatchGroup :: MatchGroup id body -> Bool
isEmptyMatchGroup (MG { mg_alts = ms }) = null $ unLoc ms
| 105
|
isEmptyMatchGroup :: MatchGroup id body -> Bool
isEmptyMatchGroup (MG { mg_alts = ms }) = null $ unLoc ms
| 105
|
isEmptyMatchGroup (MG { mg_alts = ms }) = null $ unLoc ms
| 57
| false
| true
| 0
| 9
| 18
| 42
| 21
| 21
| null | null |
brendanhay/gogol
|
gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Product.hs
|
mpl-2.0
|
-- | Number of users currently in the list. This is a read-only field.
rlListSize :: Lens' RemarketingList (Maybe Int64)
rlListSize
= lens _rlListSize (\ s a -> s{_rlListSize = a}) .
mapping _Coerce
| 206
|
rlListSize :: Lens' RemarketingList (Maybe Int64)
rlListSize
= lens _rlListSize (\ s a -> s{_rlListSize = a}) .
mapping _Coerce
| 135
|
rlListSize
= lens _rlListSize (\ s a -> s{_rlListSize = a}) .
mapping _Coerce
| 85
| true
| true
| 1
| 9
| 41
| 59
| 28
| 31
| null | null |
phaazon/OpenGLRaw
|
src/Graphics/Rendering/OpenGL/Raw/Tokens.hs
|
bsd-3-clause
|
gl_CURRENT_MATRIX_ARB :: GLenum
gl_CURRENT_MATRIX_ARB = 0x8641
| 62
|
gl_CURRENT_MATRIX_ARB :: GLenum
gl_CURRENT_MATRIX_ARB = 0x8641
| 62
|
gl_CURRENT_MATRIX_ARB = 0x8641
| 30
| false
| true
| 0
| 4
| 5
| 11
| 6
| 5
| null | null |
garetht/jsons-to-schema
|
test/JSONSchema/Draft4/BasicTypeTests.hs
|
mit
|
testBasicTypesIntegerType :: Spec
testBasicTypesIntegerType =
it "can handle the Integer type when given an integer" $
-- TODO: this should eventually unify to just number
let j1 = [text| 2.14 |]
j2 = [text| 32 |]
expected =
[text|
{"type": ["number", "integer"]}
|]
in testJsonsToSchema [j1, j2] expected
| 355
|
testBasicTypesIntegerType :: Spec
testBasicTypesIntegerType =
it "can handle the Integer type when given an integer" $
-- TODO: this should eventually unify to just number
let j1 = [text| 2.14 |]
j2 = [text| 32 |]
expected =
[text|
{"type": ["number", "integer"]}
|]
in testJsonsToSchema [j1, j2] expected
| 355
|
testBasicTypesIntegerType =
it "can handle the Integer type when given an integer" $
-- TODO: this should eventually unify to just number
let j1 = [text| 2.14 |]
j2 = [text| 32 |]
expected =
[text|
{"type": ["number", "integer"]}
|]
in testJsonsToSchema [j1, j2] expected
| 321
| false
| true
| 0
| 9
| 97
| 63
| 39
| 24
| null | null |
lpeterse/haskell-libssh
|
SSH/Server.hs
|
lgpl-3.0
|
setRsaKey :: String -> Server -> IO CInt
setRsaKey path bind
= do ptr <- newCString path
result <- ssh_bind_options_set bind ssh_BIND_OPTIONS_RSAKEY ptr
free ptr
return result
-- | Set the session logging verbosity.
| 239
|
setRsaKey :: String -> Server -> IO CInt
setRsaKey path bind
= do ptr <- newCString path
result <- ssh_bind_options_set bind ssh_BIND_OPTIONS_RSAKEY ptr
free ptr
return result
-- | Set the session logging verbosity.
| 239
|
setRsaKey path bind
= do ptr <- newCString path
result <- ssh_bind_options_set bind ssh_BIND_OPTIONS_RSAKEY ptr
free ptr
return result
-- | Set the session logging verbosity.
| 198
| false
| true
| 0
| 8
| 57
| 64
| 28
| 36
| null | null |
peter-fogg/pardoc
|
src/Text/Pandoc/Writers/ICML.hs
|
gpl-2.0
|
strongName = "Bold"
| 24
|
strongName = "Bold"
| 24
|
strongName = "Bold"
| 24
| false
| false
| 0
| 4
| 7
| 6
| 3
| 3
| null | null |
jberryman/wai
|
wai-extra/Network/Wai/EventSource/EventStream.hs
|
mit
|
retryField = fromString "retry:"
| 32
|
retryField = fromString "retry:"
| 32
|
retryField = fromString "retry:"
| 32
| false
| false
| 0
| 5
| 3
| 9
| 4
| 5
| null | null |
NICTA/lets-lens
|
src/Lets/StoreLens.hs
|
bsd-3-clause
|
----
cityL ::
Lens Locality String
cityL =
Lens
(\(Locality c t y) ->
Store (\c' -> Locality c' t y) c)
| 118
|
cityL ::
Lens Locality String
cityL =
Lens
(\(Locality c t y) ->
Store (\c' -> Locality c' t y) c)
| 112
|
cityL =
Lens
(\(Locality c t y) ->
Store (\c' -> Locality c' t y) c)
| 80
| true
| true
| 0
| 11
| 36
| 58
| 30
| 28
| null | null |
spacekitteh/smcghc
|
compiler/cmm/CLabel.hs
|
bsd-3-clause
|
pprCLbl (PicBaseLabel {}) = panic "pprCLbl PicBaseLabel"
| 62
|
pprCLbl (PicBaseLabel {}) = panic "pprCLbl PicBaseLabel"
| 62
|
pprCLbl (PicBaseLabel {}) = panic "pprCLbl PicBaseLabel"
| 62
| false
| false
| 0
| 6
| 12
| 20
| 9
| 11
| null | null |
coghex/abridgefaraway
|
src/GLUtil/ABFA.hs
|
bsd-3-clause
|
mousebutt4 = GLFW.MouseButton'4
| 31
|
mousebutt4 = GLFW.MouseButton'4
| 31
|
mousebutt4 = GLFW.MouseButton'4
| 31
| false
| false
| 1
| 6
| 2
| 12
| 4
| 8
| null | null |
olvap/dotfiles
|
xmonad/xmonad.hs
|
mit
|
------------------------------------------------------------------------
-- Colors and borders
-- Currently based on the ir_black theme.
--
myNormalBorderColor = "#7c7c7c"
| 172
|
myNormalBorderColor = "#7c7c7c"
| 32
|
myNormalBorderColor = "#7c7c7c"
| 32
| true
| false
| 1
| 5
| 16
| 14
| 7
| 7
| null | null |
hguenther/nbis
|
MemoryModel/Typed.hs
|
agpl-3.0
|
bitWidth' tp = bitWidth tp
| 26
|
bitWidth' tp = bitWidth tp
| 26
|
bitWidth' tp = bitWidth tp
| 26
| false
| false
| 0
| 5
| 4
| 12
| 5
| 7
| null | null |
WraithM/peertrader-backend
|
src/PeerTrader/Socket/Ops.hs
|
bsd-3-clause
|
handleConn :: (Sender t1, Sender t2, Receiver t1) => Ops -> TChan Command -> Socket z t1 -> Socket z t2 -> ZMQ z ()
handleConn ops commandChan commandSock responseSock = do
accts <- liftIO $ readTVarIO (_accounts ops)
_ <- H.traverseWithKey (sendResponses responseSock) accts
forever $ do
command <- receive commandSock
case decode command of
Right c -> do
enqueue commandChan c
send commandSock [] "OK"
Left err -> liftIO $ debugM "WebConnection" $
"Could not decode command: " ++ err
where
sendResponses :: Sender t => Socket z t -> UserLogin -> PeerTraderAccount -> ZMQ z ()
sendResponses sock n acct = do
investmentRead <- liftIO . atomically $ dupTChan (_investWrite . _prosperChans $ acct)
void . async . forever $ do
investResponse <- liftIO . atomically $ readTChan investmentRead
debugM "WebConnection" "Sending invest response..."
send sock [] (encode (Response n investResponse))
| 1,053
|
handleConn :: (Sender t1, Sender t2, Receiver t1) => Ops -> TChan Command -> Socket z t1 -> Socket z t2 -> ZMQ z ()
handleConn ops commandChan commandSock responseSock = do
accts <- liftIO $ readTVarIO (_accounts ops)
_ <- H.traverseWithKey (sendResponses responseSock) accts
forever $ do
command <- receive commandSock
case decode command of
Right c -> do
enqueue commandChan c
send commandSock [] "OK"
Left err -> liftIO $ debugM "WebConnection" $
"Could not decode command: " ++ err
where
sendResponses :: Sender t => Socket z t -> UserLogin -> PeerTraderAccount -> ZMQ z ()
sendResponses sock n acct = do
investmentRead <- liftIO . atomically $ dupTChan (_investWrite . _prosperChans $ acct)
void . async . forever $ do
investResponse <- liftIO . atomically $ readTChan investmentRead
debugM "WebConnection" "Sending invest response..."
send sock [] (encode (Response n investResponse))
| 1,053
|
handleConn ops commandChan commandSock responseSock = do
accts <- liftIO $ readTVarIO (_accounts ops)
_ <- H.traverseWithKey (sendResponses responseSock) accts
forever $ do
command <- receive commandSock
case decode command of
Right c -> do
enqueue commandChan c
send commandSock [] "OK"
Left err -> liftIO $ debugM "WebConnection" $
"Could not decode command: " ++ err
where
sendResponses :: Sender t => Socket z t -> UserLogin -> PeerTraderAccount -> ZMQ z ()
sendResponses sock n acct = do
investmentRead <- liftIO . atomically $ dupTChan (_investWrite . _prosperChans $ acct)
void . async . forever $ do
investResponse <- liftIO . atomically $ readTChan investmentRead
debugM "WebConnection" "Sending invest response..."
send sock [] (encode (Response n investResponse))
| 937
| false
| true
| 0
| 17
| 306
| 345
| 157
| 188
| null | null |
worksap-ate/aws-sdk
|
test/EC2Tests/VolumeTests.hs
|
bsd-3-clause
|
zone :: Text
zone = "ap-northeast-1a"
| 37
|
zone :: Text
zone = "ap-northeast-1a"
| 37
|
zone = "ap-northeast-1a"
| 24
| false
| true
| 0
| 6
| 5
| 18
| 7
| 11
| null | null |
kevinjardine/gruzeSnaplet
|
src/Snap/Snaplet/Gruze/Box.hs
|
gpl-2.0
|
getKeysFromObjBox :: GrzObjBoxClass c => c -> [GrzKey]
getKeysFromObjBox c = Map.keys (getObjBox c)
| 99
|
getKeysFromObjBox :: GrzObjBoxClass c => c -> [GrzKey]
getKeysFromObjBox c = Map.keys (getObjBox c)
| 99
|
getKeysFromObjBox c = Map.keys (getObjBox c)
| 44
| false
| true
| 0
| 7
| 13
| 39
| 19
| 20
| null | null |
ezyang/ghc
|
libraries/base/GHC/Enum.hs
|
bsd-3-clause
|
succError :: String -> a
succError inst_ty =
errorWithoutStackTrace $ "Enum.succ{" ++ inst_ty ++ "}: tried to take `succ' of maxBound"
| 138
|
succError :: String -> a
succError inst_ty =
errorWithoutStackTrace $ "Enum.succ{" ++ inst_ty ++ "}: tried to take `succ' of maxBound"
| 138
|
succError inst_ty =
errorWithoutStackTrace $ "Enum.succ{" ++ inst_ty ++ "}: tried to take `succ' of maxBound"
| 113
| false
| true
| 0
| 7
| 24
| 30
| 15
| 15
| null | null |
edsko/ChinesePodAPI
|
src-main/Options.hs
|
bsd-3-clause
|
parseReqLogin :: Parser ReqLogin
parseReqLogin = ReqLogin
<$> (strOption $ mconcat [
long "client-id"
, metavar "ID"
, help "ChinesePod Client API ID"
])
<*> (strOption $ mconcat [
long "user-email"
, metavar "EMAIL"
, help "ChinesePod user email address"
])
<*> parseReqSignature
| 376
|
parseReqLogin :: Parser ReqLogin
parseReqLogin = ReqLogin
<$> (strOption $ mconcat [
long "client-id"
, metavar "ID"
, help "ChinesePod Client API ID"
])
<*> (strOption $ mconcat [
long "user-email"
, metavar "EMAIL"
, help "ChinesePod user email address"
])
<*> parseReqSignature
| 376
|
parseReqLogin = ReqLogin
<$> (strOption $ mconcat [
long "client-id"
, metavar "ID"
, help "ChinesePod Client API ID"
])
<*> (strOption $ mconcat [
long "user-email"
, metavar "EMAIL"
, help "ChinesePod user email address"
])
<*> parseReqSignature
| 343
| false
| true
| 8
| 9
| 138
| 90
| 45
| 45
| null | null |
brendanhay/gogol
|
gogol-vision/gen/Network/Google/Vision/Types/Product.hs
|
mpl-2.0
|
-- | Object name, expressed in its \`language_code\` language.
gcvvloaName :: Lens' GoogleCloudVisionV1p1beta1LocalizedObjectAnnotation (Maybe Text)
gcvvloaName
= lens _gcvvloaName (\ s a -> s{_gcvvloaName = a})
| 213
|
gcvvloaName :: Lens' GoogleCloudVisionV1p1beta1LocalizedObjectAnnotation (Maybe Text)
gcvvloaName
= lens _gcvvloaName (\ s a -> s{_gcvvloaName = a})
| 150
|
gcvvloaName
= lens _gcvvloaName (\ s a -> s{_gcvvloaName = a})
| 64
| true
| true
| 1
| 9
| 27
| 51
| 25
| 26
| null | null |
chpatrick/hmidi
|
System/MIDI/Placeholder.hs
|
bsd-3-clause
|
laceholder :: a
placeholder = error "Placeholder value for Haddock."
| 69
|
placeholder :: a
placeholder = error "Placeholder value for Haddock."
| 69
|
placeholder = error "Placeholder value for Haddock."
| 52
| false
| true
| 0
| 6
| 10
| 20
| 8
| 12
| null | null |
fmapfmapfmap/amazonka
|
amazonka-lambda/gen/Network/AWS/Lambda/AddPermission.hs
|
mpl-2.0
|
-- | The AWS Lambda action you want to allow in this statement. Each Lambda
-- action is a string starting with \"lambda:\" followed by the API name
-- (see Operations). For example, \"lambda:CreateFunction\". You can use
-- wildcard (\"lambda:*\") to grant permission for all AWS Lambda actions.
apAction :: Lens' AddPermission Text
apAction = lens _apAction (\ s a -> s{_apAction = a})
| 387
|
apAction :: Lens' AddPermission Text
apAction = lens _apAction (\ s a -> s{_apAction = a})
| 90
|
apAction = lens _apAction (\ s a -> s{_apAction = a})
| 53
| true
| true
| 1
| 9
| 63
| 49
| 25
| 24
| null | null |
emilaxelsson/ag-graph
|
examples/Repmin.hs
|
bsd-3-clause
|
repminG' :: Dag IntTreeF -> Dag IntTreeF
repminG' = snd . runRewriteDag const minS minI rep' init
where init (MinS i) = MinI i
| 128
|
repminG' :: Dag IntTreeF -> Dag IntTreeF
repminG' = snd . runRewriteDag const minS minI rep' init
where init (MinS i) = MinI i
| 128
|
repminG' = snd . runRewriteDag const minS minI rep' init
where init (MinS i) = MinI i
| 87
| false
| true
| 0
| 7
| 25
| 55
| 26
| 29
| null | null |
np/hlatex
|
Language/LaTeX/Builder/Math.hs
|
bsd-3-clause
|
det :: MathItem
det = mathCmd "det"
| 35
|
det :: MathItem
det = mathCmd "det"
| 35
|
det = mathCmd "det"
| 19
| false
| true
| 0
| 5
| 6
| 14
| 7
| 7
| null | null |
dbueno/funsat
|
src/Funsat/Circuit.hs
|
bsd-3-clause
|
| A `CMaps' with an initial `hashCount' of 2.
emptyCMaps :: CMaps v
emptyCMaps = CMaps
{ hashCount = [2 ..]
, varMap = Bimap.empty
, andMap = Bimap.empty
, orMap = Bimap.empty
, notMap = Bimap.empty
, xorMap = Bimap.empty
, onlyifMap = Bimap.empty
, iffMap = Bimap.empty
, iteMap = Bimap.empty }
| 356
|
emptyCMaps :: CMaps v
emptyCMaps = CMaps
{ hashCount = [2 ..]
, varMap = Bimap.empty
, andMap = Bimap.empty
, orMap = Bimap.empty
, notMap = Bimap.empty
, xorMap = Bimap.empty
, onlyifMap = Bimap.empty
, iffMap = Bimap.empty
, iteMap = Bimap.empty }
| 307
|
emptyCMaps = CMaps
{ hashCount = [2 ..]
, varMap = Bimap.empty
, andMap = Bimap.empty
, orMap = Bimap.empty
, notMap = Bimap.empty
, xorMap = Bimap.empty
, onlyifMap = Bimap.empty
, iffMap = Bimap.empty
, iteMap = Bimap.empty }
| 285
| true
| true
| 2
| 10
| 114
| 111
| 65
| 46
| null | null |
keithodulaigh/Hets
|
SoftFOL/ParseTPTP.hs
|
gpl-2.0
|
allRoles :: [Role]
allRoles =
[ Axiom
, Hypothesis
, Definition
, Assumption
, Lemma
, Theorem
, Conjecture
, Negated_conjecture
, Plain
, Fi_domain
, Fi_functors
, Fi_predicates
, Type
, Unknown ]
| 225
|
allRoles :: [Role]
allRoles =
[ Axiom
, Hypothesis
, Definition
, Assumption
, Lemma
, Theorem
, Conjecture
, Negated_conjecture
, Plain
, Fi_domain
, Fi_functors
, Fi_predicates
, Type
, Unknown ]
| 225
|
allRoles =
[ Axiom
, Hypothesis
, Definition
, Assumption
, Lemma
, Theorem
, Conjecture
, Negated_conjecture
, Plain
, Fi_domain
, Fi_functors
, Fi_predicates
, Type
, Unknown ]
| 206
| false
| true
| 0
| 7
| 61
| 63
| 37
| 26
| null | null |
anton-dessiatov/ghc
|
compiler/types/CoAxiom.hs
|
bsd-3-clause
|
toBranchList (h:t) = NextBranch h (toBranchList t)
| 50
|
toBranchList (h:t) = NextBranch h (toBranchList t)
| 50
|
toBranchList (h:t) = NextBranch h (toBranchList t)
| 50
| false
| false
| 0
| 7
| 6
| 27
| 13
| 14
| null | null |
Noeda/Megaman
|
src/Terminal/Terminal.hs
|
mit
|
captureInteger :: String -> (Int, Int) -> (Int, Int) -> Terminal -> Maybe Int
captureInteger str topleft rightbottom t =
R.match str (concat (linesOf topleft rightbottom t))
| 175
|
captureInteger :: String -> (Int, Int) -> (Int, Int) -> Terminal -> Maybe Int
captureInteger str topleft rightbottom t =
R.match str (concat (linesOf topleft rightbottom t))
| 175
|
captureInteger str topleft rightbottom t =
R.match str (concat (linesOf topleft rightbottom t))
| 97
| false
| true
| 0
| 9
| 28
| 74
| 38
| 36
| null | null |
gcross/habit-of-fate
|
sources/tests/test-stress-run-game.hs
|
agpl-3.0
|
main ∷ IO ()
main = defaultMain $ apiTestCase "Run the game a large number of times" $ do
createHabit test_habit_id $ Habit "name" (Tagged (Success VeryHigh) (Failure VeryHigh)) Indefinite [] Nothing
marks ← lift $ replicateM 20000 randomIO <&> map (bool FailureResult SuccessResult)
void $ markHabits [(test_habit_id, marks)]
getMarks >>= (@?=[ Mark mark VeryHigh | mark ← marks ])
replicateM_ 100000 runGame
getMarks >>= (@?= [])
| 443
|
main ∷ IO ()
main = defaultMain $ apiTestCase "Run the game a large number of times" $ do
createHabit test_habit_id $ Habit "name" (Tagged (Success VeryHigh) (Failure VeryHigh)) Indefinite [] Nothing
marks ← lift $ replicateM 20000 randomIO <&> map (bool FailureResult SuccessResult)
void $ markHabits [(test_habit_id, marks)]
getMarks >>= (@?=[ Mark mark VeryHigh | mark ← marks ])
replicateM_ 100000 runGame
getMarks >>= (@?= [])
| 443
|
main = defaultMain $ apiTestCase "Run the game a large number of times" $ do
createHabit test_habit_id $ Habit "name" (Tagged (Success VeryHigh) (Failure VeryHigh)) Indefinite [] Nothing
marks ← lift $ replicateM 20000 randomIO <&> map (bool FailureResult SuccessResult)
void $ markHabits [(test_habit_id, marks)]
getMarks >>= (@?=[ Mark mark VeryHigh | mark ← marks ])
replicateM_ 100000 runGame
getMarks >>= (@?= [])
| 430
| false
| true
| 1
| 13
| 78
| 172
| 81
| 91
| null | null |
gridaphobe/ghc
|
compiler/types/Coercion.hs
|
bsd-3-clause
|
toPhantomCo :: Coercion -> Coercion
toPhantomCo co
= mkPhantomCo (mkKindCo co) ty1 ty2
where Pair ty1 ty2 = coercionKind co
-- Convert args to a TyConAppCo Nominal to the same TyConAppCo Representational
| 208
|
toPhantomCo :: Coercion -> Coercion
toPhantomCo co
= mkPhantomCo (mkKindCo co) ty1 ty2
where Pair ty1 ty2 = coercionKind co
-- Convert args to a TyConAppCo Nominal to the same TyConAppCo Representational
| 208
|
toPhantomCo co
= mkPhantomCo (mkKindCo co) ty1 ty2
where Pair ty1 ty2 = coercionKind co
-- Convert args to a TyConAppCo Nominal to the same TyConAppCo Representational
| 172
| false
| true
| 0
| 7
| 36
| 47
| 23
| 24
| null | null |
paolino/marionetta
|
Movie.hs
|
bsd-3-clause
|
generaPasso :: Tree (Pezzo Assoluto) -> Tree (Pezzo Assoluto) -> Fulcrum -> Tempo Normalizzato -> Figura
generaPasso fp fa (Fulcrum s p) = let
(forw,_) = fromSelector fp s
fp' = relativizza $ fp
fa' = relativizza $ fa
in interpolazione fp' fa'
| 265
|
generaPasso :: Tree (Pezzo Assoluto) -> Tree (Pezzo Assoluto) -> Fulcrum -> Tempo Normalizzato -> Figura
generaPasso fp fa (Fulcrum s p) = let
(forw,_) = fromSelector fp s
fp' = relativizza $ fp
fa' = relativizza $ fa
in interpolazione fp' fa'
| 264
|
generaPasso fp fa (Fulcrum s p) = let
(forw,_) = fromSelector fp s
fp' = relativizza $ fp
fa' = relativizza $ fa
in interpolazione fp' fa'
| 158
| false
| true
| 0
| 9
| 64
| 109
| 53
| 56
| null | null |
nicolocodev/learnhappstack
|
4_Filters/Filters.hs
|
mit
|
dir :: String -> Context -> Maybe Context
dir path = iff (\ctx -> route (request ctx) == path)
| 96
|
dir :: String -> Context -> Maybe Context
dir path = iff (\ctx -> route (request ctx) == path)
| 94
|
dir path = iff (\ctx -> route (request ctx) == path)
| 52
| false
| true
| 0
| 11
| 20
| 52
| 25
| 27
| null | null |
zoomhub/zoomhub
|
vendor/servant/servant-server/src/Servant/Server/Internal.hs
|
mit
|
ct_wildcard :: B.ByteString
ct_wildcard = "*" <> "/" <> "*"
| 59
|
ct_wildcard :: B.ByteString
ct_wildcard = "*" <> "/" <> "*"
| 59
|
ct_wildcard = "*" <> "/" <> "*"
| 31
| false
| true
| 0
| 6
| 9
| 21
| 11
| 10
| null | null |
fpco/hlint
|
src/HSE/Util.hs
|
bsd-3-clause
|
isList _ = False
| 16
|
isList _ = False
| 16
|
isList _ = False
| 16
| false
| false
| 0
| 4
| 3
| 10
| 4
| 6
| null | null |
JacquesCarette/literate-scientific-software
|
code/drasil-docLang/Drasil/Sections/Requirements.hs
|
bsd-2-clause
|
-- wrapper for reqIntro
reqF :: [Section] -> Section
reqF = SRS.require [reqIntro]
| 82
|
reqF :: [Section] -> Section
reqF = SRS.require [reqIntro]
| 58
|
reqF = SRS.require [reqIntro]
| 29
| true
| true
| 0
| 6
| 12
| 27
| 15
| 12
| null | null |
ezyang/ghc
|
testsuite/tests/simplCore/should_run/T13429a.hs
|
bsd-3-clause
|
(><) :: (Measured v a) => FingerTree v a -> FingerTree v a -> FingerTree v a
(><) = appendTree0
| 96
|
(><) :: (Measured v a) => FingerTree v a -> FingerTree v a -> FingerTree v a
(><) = appendTree0
| 96
|
(><) = appendTree0
| 19
| false
| true
| 0
| 9
| 20
| 55
| 27
| 28
| null | null |
NatureShade/SymbolicHaskell
|
src/Math/Symbolic/Simplify2.hs
|
mit
|
sortMath :: (Ord a) => Math a -> Math a
sortMath (Op "+" xs) = Op "+" $ sort xs
| 79
|
sortMath :: (Ord a) => Math a -> Math a
sortMath (Op "+" xs) = Op "+" $ sort xs
| 79
|
sortMath (Op "+" xs) = Op "+" $ sort xs
| 39
| false
| true
| 0
| 7
| 19
| 51
| 24
| 27
| null | null |
sherwoodwang/wxHaskell
|
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
|
lgpl-2.1
|
wxPAPER_A_PLUS :: Int
wxPAPER_A_PLUS = 55
| 41
|
wxPAPER_A_PLUS :: Int
wxPAPER_A_PLUS = 55
| 41
|
wxPAPER_A_PLUS = 55
| 19
| false
| true
| 0
| 6
| 5
| 18
| 7
| 11
| null | null |
mxswd/mxs3
|
mxs3.hs
|
bsd-3-clause
|
runCmd (Just "quit") = do
return False
| 40
|
runCmd (Just "quit") = do
return False
| 40
|
runCmd (Just "quit") = do
return False
| 40
| false
| false
| 0
| 7
| 8
| 22
| 9
| 13
| null | null |
rueshyna/gogol
|
gogol-youtube/gen/Network/Google/Resource/YouTube/Comments/SetModerationStatus.hs
|
mpl-2.0
|
-- | Creates a value of 'CommentsSetModerationStatus' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'csmsBanAuthor'
--
-- * 'csmsModerationStatus'
--
-- * 'csmsId'
commentsSetModerationStatus
:: CommentsSetModerationStatusModerationStatus -- ^ 'csmsModerationStatus'
-> Text -- ^ 'csmsId'
-> CommentsSetModerationStatus
commentsSetModerationStatus pCsmsModerationStatus_ pCsmsId_ =
CommentsSetModerationStatus'
{ _csmsBanAuthor = False
, _csmsModerationStatus = pCsmsModerationStatus_
, _csmsId = pCsmsId_
}
| 626
|
commentsSetModerationStatus
:: CommentsSetModerationStatusModerationStatus -- ^ 'csmsModerationStatus'
-> Text -- ^ 'csmsId'
-> CommentsSetModerationStatus
commentsSetModerationStatus pCsmsModerationStatus_ pCsmsId_ =
CommentsSetModerationStatus'
{ _csmsBanAuthor = False
, _csmsModerationStatus = pCsmsModerationStatus_
, _csmsId = pCsmsId_
}
| 375
|
commentsSetModerationStatus pCsmsModerationStatus_ pCsmsId_ =
CommentsSetModerationStatus'
{ _csmsBanAuthor = False
, _csmsModerationStatus = pCsmsModerationStatus_
, _csmsId = pCsmsId_
}
| 207
| true
| true
| 0
| 8
| 104
| 64
| 38
| 26
| null | null |
Baranowski/SourceGraph
|
Analyse/Visualise.hs
|
gpl-3.0
|
clustAttributes (DataDefn d) = [ toLabel $ "Data: " ++ d
, styles [filled, rounded]
, fillColor PapayaWhip
]
| 213
|
clustAttributes (DataDefn d) = [ toLabel $ "Data: " ++ d
, styles [filled, rounded]
, fillColor PapayaWhip
]
| 213
|
clustAttributes (DataDefn d) = [ toLabel $ "Data: " ++ d
, styles [filled, rounded]
, fillColor PapayaWhip
]
| 213
| false
| false
| 0
| 7
| 123
| 44
| 23
| 21
| null | null |
robdockins/edison
|
edison-core/src/Data/Edison/Seq/BinaryRandList.hs
|
mit
|
size (Odd _ ps) = 1 + 2 * size ps
| 33
|
size (Odd _ ps) = 1 + 2 * size ps
| 33
|
size (Odd _ ps) = 1 + 2 * size ps
| 33
| false
| false
| 3
| 6
| 10
| 31
| 13
| 18
| null | null |
ComputationWithBoundedResources/tct-core
|
src/Tct/Core/Main.hs
|
bsd-3-clause
|
run :: TctConfig i -> TctM a -> IO a
run cfg m = run' m $ \st -> st { kvPairs = M.fromList (runtimeOptions cfg) }
| 113
|
run :: TctConfig i -> TctM a -> IO a
run cfg m = run' m $ \st -> st { kvPairs = M.fromList (runtimeOptions cfg) }
| 113
|
run cfg m = run' m $ \st -> st { kvPairs = M.fromList (runtimeOptions cfg) }
| 76
| false
| true
| 0
| 11
| 26
| 64
| 31
| 33
| null | null |
psandahl/big-engine
|
src/BigE/Runtime/Render.hs
|
mit
|
modifyAppState :: (app -> app) -> Render app ()
modifyAppState g = do
ref <- ask
modifyIORef' ref $ \state ->
maybe state (\appState' -> state { appState = Just (g appState') }) (appState state)
-- | Set (or unset) the 'WindowSizeCallback'.
| 257
|
modifyAppState :: (app -> app) -> Render app ()
modifyAppState g = do
ref <- ask
modifyIORef' ref $ \state ->
maybe state (\appState' -> state { appState = Just (g appState') }) (appState state)
-- | Set (or unset) the 'WindowSizeCallback'.
| 257
|
modifyAppState g = do
ref <- ask
modifyIORef' ref $ \state ->
maybe state (\appState' -> state { appState = Just (g appState') }) (appState state)
-- | Set (or unset) the 'WindowSizeCallback'.
| 209
| false
| true
| 0
| 17
| 58
| 98
| 48
| 50
| null | null |
christiaanb/cabal
|
cabal-install/Main.hs
|
bsd-3-clause
|
wrapperAction :: Monoid flags
=> CommandUI flags
-> (flags -> Flag Verbosity)
-> (flags -> Flag String)
-> Command (GlobalFlags -> IO ())
wrapperAction command verbosityFlag distPrefFlag =
commandAddAction command
{ commandDefaultFlags = mempty } $ \flags extraArgs _globalFlags -> do
let verbosity = fromFlagOrDefault normal (verbosityFlag flags)
setupScriptOptions = defaultSetupScriptOptions {
useDistPref = fromFlagOrDefault
(useDistPref defaultSetupScriptOptions)
(distPrefFlag flags)
}
setupWrapper verbosity setupScriptOptions Nothing
command (const flags) extraArgs
| 738
|
wrapperAction :: Monoid flags
=> CommandUI flags
-> (flags -> Flag Verbosity)
-> (flags -> Flag String)
-> Command (GlobalFlags -> IO ())
wrapperAction command verbosityFlag distPrefFlag =
commandAddAction command
{ commandDefaultFlags = mempty } $ \flags extraArgs _globalFlags -> do
let verbosity = fromFlagOrDefault normal (verbosityFlag flags)
setupScriptOptions = defaultSetupScriptOptions {
useDistPref = fromFlagOrDefault
(useDistPref defaultSetupScriptOptions)
(distPrefFlag flags)
}
setupWrapper verbosity setupScriptOptions Nothing
command (const flags) extraArgs
| 738
|
wrapperAction command verbosityFlag distPrefFlag =
commandAddAction command
{ commandDefaultFlags = mempty } $ \flags extraArgs _globalFlags -> do
let verbosity = fromFlagOrDefault normal (verbosityFlag flags)
setupScriptOptions = defaultSetupScriptOptions {
useDistPref = fromFlagOrDefault
(useDistPref defaultSetupScriptOptions)
(distPrefFlag flags)
}
setupWrapper verbosity setupScriptOptions Nothing
command (const flags) extraArgs
| 544
| false
| true
| 0
| 17
| 232
| 175
| 85
| 90
| null | null |
dgn23/dotfiles
|
xmonad.hs
|
gpl-2.0
|
mySpaces = ["1:term","2:web","3:emacs","4:media"] ++ map show [6..9]
| 68
|
mySpaces = ["1:term","2:web","3:emacs","4:media"] ++ map show [6..9]
| 68
|
mySpaces = ["1:term","2:web","3:emacs","4:media"] ++ map show [6..9]
| 68
| false
| false
| 0
| 7
| 6
| 32
| 18
| 14
| null | null |
ygale/wai
|
warp/Network/Wai/Handler/Warp/Settings.hs
|
mit
|
defaultExceptionResponse :: SomeException -> Response
defaultExceptionResponse _ = responseLBS H.internalServerError500 [(H.hContentType, "text/plain; charset=utf-8")] "Something went wrong"
| 190
|
defaultExceptionResponse :: SomeException -> Response
defaultExceptionResponse _ = responseLBS H.internalServerError500 [(H.hContentType, "text/plain; charset=utf-8")] "Something went wrong"
| 190
|
defaultExceptionResponse _ = responseLBS H.internalServerError500 [(H.hContentType, "text/plain; charset=utf-8")] "Something went wrong"
| 136
| false
| true
| 0
| 8
| 15
| 38
| 20
| 18
| null | null |
DataStewardshipPortal/ds-wizard
|
DSServer/app/Actions/Main/Url.hs
|
apache-2.0
|
url :: String
url = "/"
| 23
|
url :: String
url = "/"
| 23
|
url = "/"
| 9
| false
| true
| 0
| 4
| 5
| 11
| 6
| 5
| null | null |
ezyang/ghc
|
libraries/template-haskell/Language/Haskell/TH/Ppr.hs
|
bsd-3-clause
|
-- | Pretty prints a pattern synonym's type; follows the usual
-- conventions to print a pattern synonym type compactly, yet
-- unambiguously. See the note on 'PatSynType' and the section on
-- pattern synonyms in the GHC user's guide for more information.
pprPatSynType :: PatSynType -> Doc
pprPatSynType ty@(ForallT uniTys reqs ty'@(ForallT exTys provs ty''))
| null exTys, null provs = ppr (ForallT uniTys reqs ty'')
| null uniTys, null reqs = noreqs <+> ppr ty'
| null reqs = forall uniTys <+> noreqs <+> ppr ty'
| otherwise = ppr ty
where noreqs = text "() =>"
forall tvs = text "forall" <+> (hsep (map ppr tvs)) <+> text "."
| 682
|
pprPatSynType :: PatSynType -> Doc
pprPatSynType ty@(ForallT uniTys reqs ty'@(ForallT exTys provs ty''))
| null exTys, null provs = ppr (ForallT uniTys reqs ty'')
| null uniTys, null reqs = noreqs <+> ppr ty'
| null reqs = forall uniTys <+> noreqs <+> ppr ty'
| otherwise = ppr ty
where noreqs = text "() =>"
forall tvs = text "forall" <+> (hsep (map ppr tvs)) <+> text "."
| 425
|
pprPatSynType ty@(ForallT uniTys reqs ty'@(ForallT exTys provs ty''))
| null exTys, null provs = ppr (ForallT uniTys reqs ty'')
| null uniTys, null reqs = noreqs <+> ppr ty'
| null reqs = forall uniTys <+> noreqs <+> ppr ty'
| otherwise = ppr ty
where noreqs = text "() =>"
forall tvs = text "forall" <+> (hsep (map ppr tvs)) <+> text "."
| 390
| true
| true
| 2
| 11
| 163
| 186
| 89
| 97
| null | null |
jstolarek/lattice-structure-hs
|
bench/Signal/Wavelet/Repa1Bench.hs
|
bsd-3-clause
|
dataCslNCsrN :: ([Double], [Double]) -> (Int, Array U DIM1 Double)
dataCslNCsrN (ls, sig) = (length ls, fromListUnboxed (Z :. sigSize) sig)
where sigSize = length sig
| 173
|
dataCslNCsrN :: ([Double], [Double]) -> (Int, Array U DIM1 Double)
dataCslNCsrN (ls, sig) = (length ls, fromListUnboxed (Z :. sigSize) sig)
where sigSize = length sig
| 173
|
dataCslNCsrN (ls, sig) = (length ls, fromListUnboxed (Z :. sigSize) sig)
where sigSize = length sig
| 106
| false
| true
| 1
| 8
| 32
| 88
| 45
| 43
| null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.