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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
IreneKnapp/Faction
|
libfaction/Distribution/ModuleName.hs
|
bsd-3-clause
|
validModuleComponent (c:cs) = Char.isUpper c
&& all validModuleChar cs
| 97
|
validModuleComponent (c:cs) = Char.isUpper c
&& all validModuleChar cs
| 97
|
validModuleComponent (c:cs) = Char.isUpper c
&& all validModuleChar cs
| 97
| false
| false
| 0
| 7
| 35
| 30
| 14
| 16
| null | null |
jaalonso/I1M-Cod-Temas
|
src/Tema_21/PolPropiedades.hs
|
gpl-2.0
|
prop_polCero_es_cero :: Bool
prop_polCero_es_cero =
esPolCero polCero
| 71
|
prop_polCero_es_cero :: Bool
prop_polCero_es_cero =
esPolCero polCero
| 71
|
prop_polCero_es_cero =
esPolCero polCero
| 42
| false
| true
| 0
| 6
| 8
| 21
| 8
| 13
| null | null |
rblaze/haskell-dbus
|
lib/DBus/Internal/Wire.hs
|
apache-2.0
|
marshalAtom (AtomInt64 x) = marshalInt64 x
| 42
|
marshalAtom (AtomInt64 x) = marshalInt64 x
| 42
|
marshalAtom (AtomInt64 x) = marshalInt64 x
| 42
| false
| false
| 0
| 7
| 5
| 18
| 8
| 10
| null | null |
jkarni/aeson
|
Data/Aeson/Encode/Builder.hs
|
bsd-3-clause
|
emptyObject__ :: Builder
emptyObject__ = BP.primBounded (ascii2 ('{','}')) ()
| 77
|
emptyObject__ :: Builder
emptyObject__ = BP.primBounded (ascii2 ('{','}')) ()
| 77
|
emptyObject__ = BP.primBounded (ascii2 ('{','}')) ()
| 52
| false
| true
| 0
| 7
| 8
| 40
| 18
| 22
| null | null |
three/codeworld
|
codeworld-compiler/test/Main.hs
|
apache-2.0
|
genTestCases (x) = map toTestCase x
| 35
|
genTestCases (x) = map toTestCase x
| 35
|
genTestCases (x) = map toTestCase x
| 35
| false
| false
| 0
| 6
| 5
| 17
| 8
| 9
| null | null |
timthelion/fenfire
|
Fenfire/RDF.hs
|
gpl-2.0
|
relativizeNode _ node = node
| 28
|
relativizeNode _ node = node
| 28
|
relativizeNode _ node = node
| 28
| false
| false
| 1
| 5
| 4
| 12
| 5
| 7
| null | null |
ctford/Idris-Elba-dev
|
src/Idris/REPL.hs
|
bsd-3-clause
|
getOptLevel _ = Nothing
| 23
|
getOptLevel _ = Nothing
| 23
|
getOptLevel _ = Nothing
| 23
| false
| false
| 0
| 4
| 3
| 10
| 4
| 6
| null | null |
beni55/ghcjs
|
src/Gen2/Prim.hs
|
mit
|
genPrim _ _ WordQuotRem2Op [q,r] [xh,xl,y] = PrimInline [j| `q` = h$quotRem2Word32(`xh`,`xl`,`y`);
`r` = `Ret1`;
|]
| 239
|
genPrim _ _ WordQuotRem2Op [q,r] [xh,xl,y] = PrimInline [j| `q` = h$quotRem2Word32(`xh`,`xl`,`y`);
`r` = `Ret1`;
|]
| 239
|
genPrim _ _ WordQuotRem2Op [q,r] [xh,xl,y] = PrimInline [j| `q` = h$quotRem2Word32(`xh`,`xl`,`y`);
`r` = `Ret1`;
|]
| 239
| false
| false
| 0
| 6
| 139
| 39
| 23
| 16
| null | null |
snapframework/snap-core
|
src/Snap/Internal/Test/RequestBuilder.hs
|
bsd-3-clause
|
setRequestType (UrlEncodedPostRequest fp) = do
rq <- liftM (H.setHeader "Content-Type"
"application/x-www-form-urlencoded") rGet
let b = printUrlEncoded fp
body <- liftIO $ Streams.fromList $! [b]
rPut $ rq { rqMethod = POST
, rqContentLength = Just $! fromIntegral $ S.length b
, rqBody = body
}
------------------------------------------------------------------------------
| 482
|
setRequestType (UrlEncodedPostRequest fp) = do
rq <- liftM (H.setHeader "Content-Type"
"application/x-www-form-urlencoded") rGet
let b = printUrlEncoded fp
body <- liftIO $ Streams.fromList $! [b]
rPut $ rq { rqMethod = POST
, rqContentLength = Just $! fromIntegral $ S.length b
, rqBody = body
}
------------------------------------------------------------------------------
| 482
|
setRequestType (UrlEncodedPostRequest fp) = do
rq <- liftM (H.setHeader "Content-Type"
"application/x-www-form-urlencoded") rGet
let b = printUrlEncoded fp
body <- liftIO $ Streams.fromList $! [b]
rPut $ rq { rqMethod = POST
, rqContentLength = Just $! fromIntegral $ S.length b
, rqBody = body
}
------------------------------------------------------------------------------
| 482
| false
| false
| 0
| 12
| 152
| 110
| 55
| 55
| null | null |
kmate/HaRe
|
old/tools/base/Modules/AST4ModSys.hs
|
bsd-3-clause
|
hsIdentToHsName (HsVar pnt) =pNTtoHsName pnt
| 44
|
hsIdentToHsName (HsVar pnt) =pNTtoHsName pnt
| 44
|
hsIdentToHsName (HsVar pnt) =pNTtoHsName pnt
| 44
| false
| false
| 0
| 6
| 4
| 19
| 8
| 11
| null | null |
fmapfmapfmap/amazonka
|
amazonka-ec2/gen/Network/AWS/EC2/DescribeSecurityGroups.hs
|
mpl-2.0
|
-- | Checks whether you have the required permissions for the action, without
-- actually making the request, and provides an error response. If you have
-- the required permissions, the error response is 'DryRunOperation'.
-- Otherwise, it is 'UnauthorizedOperation'.
dsgsDryRun :: Lens' DescribeSecurityGroups (Maybe Bool)
dsgsDryRun = lens _dsgsDryRun (\ s a -> s{_dsgsDryRun = a})
| 384
|
dsgsDryRun :: Lens' DescribeSecurityGroups (Maybe Bool)
dsgsDryRun = lens _dsgsDryRun (\ s a -> s{_dsgsDryRun = a})
| 115
|
dsgsDryRun = lens _dsgsDryRun (\ s a -> s{_dsgsDryRun = a})
| 59
| true
| true
| 1
| 9
| 56
| 52
| 28
| 24
| null | null |
agentm/project-m36
|
src/lib/ProjectM36/Relation.hs
|
unlicense
|
degree :: Relation -> Int
degree = arity
| 40
|
degree :: Relation -> Int
degree = arity
| 40
|
degree = arity
| 14
| false
| true
| 0
| 7
| 7
| 22
| 9
| 13
| null | null |
yamadapc/list-prompt
|
lib/System/Console/ListPrompt/Internal.hs
|
gpl-2.0
|
withNoCursor :: IO a -> IO a
withNoCursor = bracket_ hideCursor showCursor
| 74
|
withNoCursor :: IO a -> IO a
withNoCursor = bracket_ hideCursor showCursor
| 74
|
withNoCursor = bracket_ hideCursor showCursor
| 45
| false
| true
| 0
| 6
| 11
| 26
| 12
| 14
| null | null |
brendanhay/gogol
|
gogol-groups-settings/gen/Network/Google/GroupsSettings/Types/Product.hs
|
mpl-2.0
|
-- | Permissions to view group messages. Possible values are: -
-- ANYONE_CAN_VIEW: Any Internet user can view the group\'s messages. -
-- ALL_IN_DOMAIN_CAN_VIEW: Anyone in your account can view this group\'s
-- messages. - ALL_MEMBERS_CAN_VIEW: All group members can view the
-- group\'s messages. - ALL_MANAGERS_CAN_VIEW: Any group manager can view
-- this group\'s messages.
gWhoCanViewGroup :: Lens' Groups (Maybe Text)
gWhoCanViewGroup
= lens _gWhoCanViewGroup
(\ s a -> s{_gWhoCanViewGroup = a})
| 509
|
gWhoCanViewGroup :: Lens' Groups (Maybe Text)
gWhoCanViewGroup
= lens _gWhoCanViewGroup
(\ s a -> s{_gWhoCanViewGroup = a})
| 131
|
gWhoCanViewGroup
= lens _gWhoCanViewGroup
(\ s a -> s{_gWhoCanViewGroup = a})
| 85
| true
| true
| 0
| 9
| 80
| 53
| 30
| 23
| null | null |
haskell-pkg-janitors/feed
|
Text/RSS1/Export.hs
|
bsd-3-clause
|
xmlEmpty :: (Maybe Text,Maybe Text) -> Text -> [(XML.Name,Text)] -> XML.Element
xmlEmpty ns t as = (qualNode ns t []){elementAttributes=as}
| 139
|
xmlEmpty :: (Maybe Text,Maybe Text) -> Text -> [(XML.Name,Text)] -> XML.Element
xmlEmpty ns t as = (qualNode ns t []){elementAttributes=as}
| 139
|
xmlEmpty ns t as = (qualNode ns t []){elementAttributes=as}
| 59
| false
| true
| 0
| 10
| 19
| 75
| 40
| 35
| null | null |
rahulmutt/ghcvm
|
compiler/Eta/TypeCheck/TcType.hs
|
bsd-3-clause
|
pprUserTypeCtxt GenSigCtxt = ptext (sLit "a type expected by the context")
| 81
|
pprUserTypeCtxt GenSigCtxt = ptext (sLit "a type expected by the context")
| 81
|
pprUserTypeCtxt GenSigCtxt = ptext (sLit "a type expected by the context")
| 81
| false
| false
| 0
| 7
| 17
| 18
| 8
| 10
| null | null |
haskell-distributed/distributed-process-platform
|
src/Control/Distributed/Process/Platform/ManagedProcess/Internal/GenProcess.hs
|
bsd-3-clause
|
recvLoop :: ProcessDefinition s -> s -> Delay -> Process ExitReason
recvLoop pDef pState recvDelay =
let p = unhandledMessagePolicy pDef
handleTimeout = timeoutHandler pDef
handleStop = shutdownHandler pDef
shutdown' = matchDispatch p pState shutdownHandler'
matchers = map (matchDispatch p pState) (apiHandlers pDef)
ex' = (trapExit:(exitHandlers pDef))
ms' = (shutdown':matchers) ++ matchAux p pState (infoHandlers pDef)
in do
ac <- catchesExit (processReceive ms' handleTimeout pState recvDelay)
(map (\d' -> (dispatchExit d') pState) ex')
case ac of
(ProcessContinue s') -> recvLoop pDef s' recvDelay
(ProcessTimeout t' s') -> recvLoop pDef s' t'
(ProcessHibernate d' s') -> block d' >> recvLoop pDef s' recvDelay
(ProcessStop r) -> handleStop pState r >> return (r :: ExitReason)
(ProcessStopping s' r) -> handleStop s' r >> return (r :: ExitReason)
where
matchAux :: UnhandledMessagePolicy
-> s
-> [DeferredDispatcher s]
-> [Match (ProcessAction s)]
matchAux p ps ds = [matchAny (auxHandler (applyPolicy p ps) ps ds)]
auxHandler :: (P.Message -> Process (ProcessAction s))
-> s
-> [DeferredDispatcher s]
-> P.Message
-> Process (ProcessAction s)
auxHandler policy _ [] msg = policy msg
auxHandler policy st (d:ds :: [DeferredDispatcher s]) msg
| length ds > 0 = let dh = dispatchInfo d in do
-- NB: we *do not* want to terminate/dead-letter messages until
-- we've exhausted all the possible info handlers
m <- dh st msg
case m of
Nothing -> auxHandler policy st ds msg
Just act -> return act
-- but here we *do* let the policy kick in
| otherwise = let dh = dispatchInfo d in do
m <- dh st msg
case m of
Nothing -> policy msg
Just act -> return act
processReceive :: [Match (ProcessAction s)]
-> TimeoutHandler s
-> s
-> Delay
-> Process (ProcessAction s)
processReceive ms handleTimeout st d = do
next <- recv ms d
case next of
Nothing -> handleTimeout st d
Just pa -> return pa
recv :: [Match (ProcessAction s)]
-> Delay
-> Process (Maybe (ProcessAction s))
recv matches d' =
case d' of
Infinity -> receiveWait matches >>= return . Just
NoDelay -> receiveTimeout 0 matches
Delay t' -> receiveTimeout (asTimeout t') matches
--------------------------------------------------------------------------------
-- Simulated Receive Timeouts --
--------------------------------------------------------------------------------
| 2,932
|
recvLoop :: ProcessDefinition s -> s -> Delay -> Process ExitReason
recvLoop pDef pState recvDelay =
let p = unhandledMessagePolicy pDef
handleTimeout = timeoutHandler pDef
handleStop = shutdownHandler pDef
shutdown' = matchDispatch p pState shutdownHandler'
matchers = map (matchDispatch p pState) (apiHandlers pDef)
ex' = (trapExit:(exitHandlers pDef))
ms' = (shutdown':matchers) ++ matchAux p pState (infoHandlers pDef)
in do
ac <- catchesExit (processReceive ms' handleTimeout pState recvDelay)
(map (\d' -> (dispatchExit d') pState) ex')
case ac of
(ProcessContinue s') -> recvLoop pDef s' recvDelay
(ProcessTimeout t' s') -> recvLoop pDef s' t'
(ProcessHibernate d' s') -> block d' >> recvLoop pDef s' recvDelay
(ProcessStop r) -> handleStop pState r >> return (r :: ExitReason)
(ProcessStopping s' r) -> handleStop s' r >> return (r :: ExitReason)
where
matchAux :: UnhandledMessagePolicy
-> s
-> [DeferredDispatcher s]
-> [Match (ProcessAction s)]
matchAux p ps ds = [matchAny (auxHandler (applyPolicy p ps) ps ds)]
auxHandler :: (P.Message -> Process (ProcessAction s))
-> s
-> [DeferredDispatcher s]
-> P.Message
-> Process (ProcessAction s)
auxHandler policy _ [] msg = policy msg
auxHandler policy st (d:ds :: [DeferredDispatcher s]) msg
| length ds > 0 = let dh = dispatchInfo d in do
-- NB: we *do not* want to terminate/dead-letter messages until
-- we've exhausted all the possible info handlers
m <- dh st msg
case m of
Nothing -> auxHandler policy st ds msg
Just act -> return act
-- but here we *do* let the policy kick in
| otherwise = let dh = dispatchInfo d in do
m <- dh st msg
case m of
Nothing -> policy msg
Just act -> return act
processReceive :: [Match (ProcessAction s)]
-> TimeoutHandler s
-> s
-> Delay
-> Process (ProcessAction s)
processReceive ms handleTimeout st d = do
next <- recv ms d
case next of
Nothing -> handleTimeout st d
Just pa -> return pa
recv :: [Match (ProcessAction s)]
-> Delay
-> Process (Maybe (ProcessAction s))
recv matches d' =
case d' of
Infinity -> receiveWait matches >>= return . Just
NoDelay -> receiveTimeout 0 matches
Delay t' -> receiveTimeout (asTimeout t') matches
--------------------------------------------------------------------------------
-- Simulated Receive Timeouts --
--------------------------------------------------------------------------------
| 2,932
|
recvLoop pDef pState recvDelay =
let p = unhandledMessagePolicy pDef
handleTimeout = timeoutHandler pDef
handleStop = shutdownHandler pDef
shutdown' = matchDispatch p pState shutdownHandler'
matchers = map (matchDispatch p pState) (apiHandlers pDef)
ex' = (trapExit:(exitHandlers pDef))
ms' = (shutdown':matchers) ++ matchAux p pState (infoHandlers pDef)
in do
ac <- catchesExit (processReceive ms' handleTimeout pState recvDelay)
(map (\d' -> (dispatchExit d') pState) ex')
case ac of
(ProcessContinue s') -> recvLoop pDef s' recvDelay
(ProcessTimeout t' s') -> recvLoop pDef s' t'
(ProcessHibernate d' s') -> block d' >> recvLoop pDef s' recvDelay
(ProcessStop r) -> handleStop pState r >> return (r :: ExitReason)
(ProcessStopping s' r) -> handleStop s' r >> return (r :: ExitReason)
where
matchAux :: UnhandledMessagePolicy
-> s
-> [DeferredDispatcher s]
-> [Match (ProcessAction s)]
matchAux p ps ds = [matchAny (auxHandler (applyPolicy p ps) ps ds)]
auxHandler :: (P.Message -> Process (ProcessAction s))
-> s
-> [DeferredDispatcher s]
-> P.Message
-> Process (ProcessAction s)
auxHandler policy _ [] msg = policy msg
auxHandler policy st (d:ds :: [DeferredDispatcher s]) msg
| length ds > 0 = let dh = dispatchInfo d in do
-- NB: we *do not* want to terminate/dead-letter messages until
-- we've exhausted all the possible info handlers
m <- dh st msg
case m of
Nothing -> auxHandler policy st ds msg
Just act -> return act
-- but here we *do* let the policy kick in
| otherwise = let dh = dispatchInfo d in do
m <- dh st msg
case m of
Nothing -> policy msg
Just act -> return act
processReceive :: [Match (ProcessAction s)]
-> TimeoutHandler s
-> s
-> Delay
-> Process (ProcessAction s)
processReceive ms handleTimeout st d = do
next <- recv ms d
case next of
Nothing -> handleTimeout st d
Just pa -> return pa
recv :: [Match (ProcessAction s)]
-> Delay
-> Process (Maybe (ProcessAction s))
recv matches d' =
case d' of
Infinity -> receiveWait matches >>= return . Just
NoDelay -> receiveTimeout 0 matches
Delay t' -> receiveTimeout (asTimeout t') matches
--------------------------------------------------------------------------------
-- Simulated Receive Timeouts --
--------------------------------------------------------------------------------
| 2,864
| false
| true
| 1
| 17
| 964
| 860
| 414
| 446
| null | null |
antonlogvinenko/javelin
|
src/Javelin/Lib/ByteCode/Stats.hs
|
mit
|
parseFileContents :: FilePath -> Except.ExceptT String IO ByteCode
parseFileContents path =
Except.ExceptT $
either (addPath path) Right <$> parse <$> BS.unpack <$> BS.readFile path
| 185
|
parseFileContents :: FilePath -> Except.ExceptT String IO ByteCode
parseFileContents path =
Except.ExceptT $
either (addPath path) Right <$> parse <$> BS.unpack <$> BS.readFile path
| 185
|
parseFileContents path =
Except.ExceptT $
either (addPath path) Right <$> parse <$> BS.unpack <$> BS.readFile path
| 118
| false
| true
| 0
| 11
| 27
| 63
| 30
| 33
| null | null |
andyarvanitis/Idris-dev
|
src/IRTS/CodegenC.hs
|
bsd-3-clause
|
doOp v (LSLt (ATInt ITBig)) [l, r] = v ++ "idris_bigLt(vm, " ++ creg l ++ ", " ++ creg r ++ ")"
| 95
|
doOp v (LSLt (ATInt ITBig)) [l, r] = v ++ "idris_bigLt(vm, " ++ creg l ++ ", " ++ creg r ++ ")"
| 95
|
doOp v (LSLt (ATInt ITBig)) [l, r] = v ++ "idris_bigLt(vm, " ++ creg l ++ ", " ++ creg r ++ ")"
| 95
| false
| false
| 0
| 9
| 22
| 57
| 28
| 29
| null | null |
DavidAlphaFox/darcs
|
src/Darcs/UI/Commands/Remove.hs
|
gpl-2.0
|
removeDescription :: String
removeDescription = "Remove files from version control."
| 84
|
removeDescription :: String
removeDescription = "Remove files from version control."
| 84
|
removeDescription = "Remove files from version control."
| 56
| false
| true
| 0
| 6
| 9
| 18
| 7
| 11
| null | null |
jlouis/combinatorrent
|
src/Process/ChokeMgr.hs
|
bsd-2-clause
|
compareInv :: Ord a => a -> a -> Ordering
compareInv x y =
case compare x y of
LT -> GT
EQ -> EQ
GT -> LT
| 133
|
compareInv :: Ord a => a -> a -> Ordering
compareInv x y =
case compare x y of
LT -> GT
EQ -> EQ
GT -> LT
| 133
|
compareInv x y =
case compare x y of
LT -> GT
EQ -> EQ
GT -> LT
| 91
| false
| true
| 0
| 7
| 55
| 58
| 28
| 30
| null | null |
blender/Rome
|
src/Caches/S3/Downloading.hs
|
mit
|
-- | Retrieves a Framework from an S3 Cache and unzip the contents
getFrameworkFromS3
:: S3.BucketName -- ^ The cache definition
-> InvertedRepositoryMap -- ^ The map used to resolve from a `FrameworkVersion` to the path of the Framework in the cache
-> FrameworkVersion -- ^ The `FrameworkVersion` identifying the Framework
-> TargetPlatform -- ^ The `TargetPlatform` to limit the operation to
-> ExceptT String (ReaderT (AWS.Env, CachePrefix, Bool) IO) LBS.ByteString
getFrameworkFromS3 s3BucketName reverseRomeMap (FrameworkVersion f@(Framework fwn _ _) version) platform = do
(env, CachePrefix prefix, verbose) <- ask
mapExceptT (withReaderT (const (env, verbose)))
(getArtifactFromS3 s3BucketName (prefix </> remoteFrameworkUploadPath) fwn)
where remoteFrameworkUploadPath = remoteFrameworkPath platform reverseRomeMap f version
-- | Retrieves a dSYM from an S3 Cache
| 904
|
getFrameworkFromS3
:: S3.BucketName -- ^ The cache definition
-> InvertedRepositoryMap -- ^ The map used to resolve from a `FrameworkVersion` to the path of the Framework in the cache
-> FrameworkVersion -- ^ The `FrameworkVersion` identifying the Framework
-> TargetPlatform -- ^ The `TargetPlatform` to limit the operation to
-> ExceptT String (ReaderT (AWS.Env, CachePrefix, Bool) IO) LBS.ByteString
getFrameworkFromS3 s3BucketName reverseRomeMap (FrameworkVersion f@(Framework fwn _ _) version) platform = do
(env, CachePrefix prefix, verbose) <- ask
mapExceptT (withReaderT (const (env, verbose)))
(getArtifactFromS3 s3BucketName (prefix </> remoteFrameworkUploadPath) fwn)
where remoteFrameworkUploadPath = remoteFrameworkPath platform reverseRomeMap f version
-- | Retrieves a dSYM from an S3 Cache
| 837
|
getFrameworkFromS3 s3BucketName reverseRomeMap (FrameworkVersion f@(Framework fwn _ _) version) platform = do
(env, CachePrefix prefix, verbose) <- ask
mapExceptT (withReaderT (const (env, verbose)))
(getArtifactFromS3 s3BucketName (prefix </> remoteFrameworkUploadPath) fwn)
where remoteFrameworkUploadPath = remoteFrameworkPath platform reverseRomeMap f version
-- | Retrieves a dSYM from an S3 Cache
| 424
| true
| true
| 2
| 14
| 148
| 177
| 92
| 85
| null | null |
ganeti/ganeti
|
src/Ganeti/WConfd/Core.hs
|
bsd-2-clause
|
-- Allocate a drbd minor.
--
-- The free minor will be automatically computed from the existing devices.
-- A node can not be given multiple times.
-- The result is the list of minors, in the same order as the passed nodes.
allocateDRBDMinor
:: T.DiskUUID -> [T.NodeUUID] -> WConfdMonad [T.DRBDMinor]
allocateDRBDMinor disk nodes =
modifyTempResStateErr (\cfg -> T.allocateDRBDMinor cfg disk nodes)
| 402
|
allocateDRBDMinor
:: T.DiskUUID -> [T.NodeUUID] -> WConfdMonad [T.DRBDMinor]
allocateDRBDMinor disk nodes =
modifyTempResStateErr (\cfg -> T.allocateDRBDMinor cfg disk nodes)
| 178
|
allocateDRBDMinor disk nodes =
modifyTempResStateErr (\cfg -> T.allocateDRBDMinor cfg disk nodes)
| 99
| true
| true
| 0
| 9
| 65
| 67
| 36
| 31
| null | null |
scolobb/brsim
|
Properties.hs
|
gpl-3.0
|
intersects :: Ord a => Set.Set a -> Set.Set a -> Bool
a `intersects` b = not $ Set.null $ a `Set.intersection` b
| 113
|
intersects :: Ord a => Set.Set a -> Set.Set a -> Bool
a `intersects` b = not $ Set.null $ a `Set.intersection` b
| 113
|
a `intersects` b = not $ Set.null $ a `Set.intersection` b
| 58
| false
| true
| 0
| 9
| 23
| 66
| 32
| 34
| null | null |
cutsea110/aop
|
src/Num8.hs
|
bsd-3-clause
|
perms :: Int -> [Int] -> [([Int], [Int])]
perms 0 xs = [([], xs)]
| 65
|
perms :: Int -> [Int] -> [([Int], [Int])]
perms 0 xs = [([], xs)]
| 65
|
perms 0 xs = [([], xs)]
| 23
| false
| true
| 0
| 9
| 13
| 53
| 31
| 22
| null | null |
matthewbauer/eu4-parser
|
Generator.hs
|
gpl-3.0
|
genmap :: [ClausewitzText.Value] -> Map String String
genmap = foldr' (union . genmap') empty
where
genmap' (ClausewitzText.Assignment n (ClausewitzText.List b)) = each n b
genmap' _ = empty
each n = foldr' (union . each' n) empty
each' n (ClausewitzText.Float b) =
singleton (show (truncate b :: Integer)) n
each' _ _ = empty
| 354
|
genmap :: [ClausewitzText.Value] -> Map String String
genmap = foldr' (union . genmap') empty
where
genmap' (ClausewitzText.Assignment n (ClausewitzText.List b)) = each n b
genmap' _ = empty
each n = foldr' (union . each' n) empty
each' n (ClausewitzText.Float b) =
singleton (show (truncate b :: Integer)) n
each' _ _ = empty
| 354
|
genmap = foldr' (union . genmap') empty
where
genmap' (ClausewitzText.Assignment n (ClausewitzText.List b)) = each n b
genmap' _ = empty
each n = foldr' (union . each' n) empty
each' n (ClausewitzText.Float b) =
singleton (show (truncate b :: Integer)) n
each' _ _ = empty
| 300
| false
| true
| 4
| 10
| 81
| 147
| 74
| 73
| null | null |
forked-upstream-packages-for-ghcjs/ghc
|
compiler/nativeGen/X86/Ppr.hs
|
bsd-3-clause
|
pprDollImm :: Imm -> SDoc
pprDollImm i = ptext (sLit "$") <> pprImm i
| 69
|
pprDollImm :: Imm -> SDoc
pprDollImm i = ptext (sLit "$") <> pprImm i
| 69
|
pprDollImm i = ptext (sLit "$") <> pprImm i
| 43
| false
| true
| 0
| 8
| 13
| 34
| 16
| 18
| null | null |
shouya/gximemo
|
GxiMemo/Parser.hs
|
mit
|
-- impossible case
parseI (Choice [p]) = do
m' <- parseI p
case m' of
Nothing -> return Nothing
Just _ -> return m'
| 128
|
parseI (Choice [p]) = do
m' <- parseI p
case m' of
Nothing -> return Nothing
Just _ -> return m'
| 109
|
parseI (Choice [p]) = do
m' <- parseI p
case m' of
Nothing -> return Nothing
Just _ -> return m'
| 109
| true
| false
| 0
| 10
| 36
| 57
| 26
| 31
| null | null |
OS2World/DEV-UTIL-HUGS
|
oldlib/AssocList.hs
|
bsd-3-clause
|
adjust f key (I k x m) | key == k = I key (f x) m
| otherwise = I k x (adjust f key m)
| 110
|
adjust f key (I k x m) | key == k = I key (f x) m
| otherwise = I k x (adjust f key m)
| 110
|
adjust f key (I k x m) | key == k = I key (f x) m
| otherwise = I k x (adjust f key m)
| 110
| false
| false
| 0
| 8
| 50
| 72
| 33
| 39
| null | null |
fmapfmapfmap/amazonka
|
amazonka-elasticbeanstalk/gen/Network/AWS/ElasticBeanstalk/DescribeConfigurationOptions.hs
|
mpl-2.0
|
-- | Creates a value of 'DescribeConfigurationOptionsResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'dcorsSolutionStackName'
--
-- * 'dcorsOptions'
--
-- * 'dcorsResponseStatus'
describeConfigurationOptionsResponse
:: Int -- ^ 'dcorsResponseStatus'
-> DescribeConfigurationOptionsResponse
describeConfigurationOptionsResponse pResponseStatus_ =
DescribeConfigurationOptionsResponse'
{ _dcorsSolutionStackName = Nothing
, _dcorsOptions = Nothing
, _dcorsResponseStatus = pResponseStatus_
}
| 612
|
describeConfigurationOptionsResponse
:: Int -- ^ 'dcorsResponseStatus'
-> DescribeConfigurationOptionsResponse
describeConfigurationOptionsResponse pResponseStatus_ =
DescribeConfigurationOptionsResponse'
{ _dcorsSolutionStackName = Nothing
, _dcorsOptions = Nothing
, _dcorsResponseStatus = pResponseStatus_
}
| 338
|
describeConfigurationOptionsResponse pResponseStatus_ =
DescribeConfigurationOptionsResponse'
{ _dcorsSolutionStackName = Nothing
, _dcorsOptions = Nothing
, _dcorsResponseStatus = pResponseStatus_
}
| 219
| true
| true
| 0
| 7
| 94
| 57
| 34
| 23
| null | null |
tolysz/prepare-ghcjs
|
spec-lts8/cabal/cabal-install/Distribution/Client/DistDirLayout.hs
|
bsd-3-clause
|
defaultCabalDirLayout :: FilePath -> CabalDirLayout
defaultCabalDirLayout cabalDir =
CabalDirLayout {..}
where
cabalStoreDirectory compid =
cabalDir </> "store" </> display compid
cabalStorePackageDirectory compid ipkgid =
cabalStoreDirectory compid </> display ipkgid
cabalStorePackageDBPath compid =
cabalStoreDirectory compid </> "package.db"
cabalStorePackageDB =
SpecificPackageDB . cabalStorePackageDBPath
cabalPackageCacheDirectory = cabalDir </> "packages"
cabalLogsDirectory = cabalDir </> "logs"
cabalWorldFile = cabalDir </> "world"
| 609
|
defaultCabalDirLayout :: FilePath -> CabalDirLayout
defaultCabalDirLayout cabalDir =
CabalDirLayout {..}
where
cabalStoreDirectory compid =
cabalDir </> "store" </> display compid
cabalStorePackageDirectory compid ipkgid =
cabalStoreDirectory compid </> display ipkgid
cabalStorePackageDBPath compid =
cabalStoreDirectory compid </> "package.db"
cabalStorePackageDB =
SpecificPackageDB . cabalStorePackageDBPath
cabalPackageCacheDirectory = cabalDir </> "packages"
cabalLogsDirectory = cabalDir </> "logs"
cabalWorldFile = cabalDir </> "world"
| 609
|
defaultCabalDirLayout cabalDir =
CabalDirLayout {..}
where
cabalStoreDirectory compid =
cabalDir </> "store" </> display compid
cabalStorePackageDirectory compid ipkgid =
cabalStoreDirectory compid </> display ipkgid
cabalStorePackageDBPath compid =
cabalStoreDirectory compid </> "package.db"
cabalStorePackageDB =
SpecificPackageDB . cabalStorePackageDBPath
cabalPackageCacheDirectory = cabalDir </> "packages"
cabalLogsDirectory = cabalDir </> "logs"
cabalWorldFile = cabalDir </> "world"
| 557
| false
| true
| 0
| 6
| 121
| 116
| 58
| 58
| null | null |
Philonous/d-bus
|
src/DBus/Wire.hs
|
mit
|
alignment (DBusSimpleType TypeBoolean ) = 4
| 43
|
alignment (DBusSimpleType TypeBoolean ) = 4
| 43
|
alignment (DBusSimpleType TypeBoolean ) = 4
| 43
| false
| false
| 0
| 7
| 5
| 15
| 7
| 8
| null | null |
josefs/autosar
|
oldARSim/ARSim.hs
|
bsd-3-clause
|
seal3 (a1,a2,a3) = (seal a1, seal a2, seal a3)
| 61
|
seal3 (a1,a2,a3) = (seal a1, seal a2, seal a3)
| 61
|
seal3 (a1,a2,a3) = (seal a1, seal a2, seal a3)
| 61
| false
| false
| 0
| 6
| 23
| 37
| 19
| 18
| null | null |
romanlp/mines-haskell
|
tp/TP3.hs
|
mit
|
nombreDeSolutions4 = length test4
| 33
|
nombreDeSolutions4 = length test4
| 33
|
nombreDeSolutions4 = length test4
| 33
| false
| false
| 0
| 5
| 3
| 9
| 4
| 5
| null | null |
ekmett/ghc
|
utils/genapply/GenApply.hs
|
bsd-3-clause
|
loadRegOffs :: [(Reg,Int)] -> Doc
loadRegOffs = vcat . map (uncurry assign_stk_to_reg)
| 86
|
loadRegOffs :: [(Reg,Int)] -> Doc
loadRegOffs = vcat . map (uncurry assign_stk_to_reg)
| 86
|
loadRegOffs = vcat . map (uncurry assign_stk_to_reg)
| 52
| false
| true
| 0
| 8
| 11
| 37
| 20
| 17
| null | null |
nevrenato/HetsAlloy
|
CMDL/Interface.hs
|
gpl-2.0
|
takeOutSlash :: String -> String
takeOutSlash str = case str of
'\\' : ls -> ls
'\n' : ls -> takeOutSlash ls
' ' : ls -> takeOutSlash ls
l -> l
| 183
|
takeOutSlash :: String -> String
takeOutSlash str = case str of
'\\' : ls -> ls
'\n' : ls -> takeOutSlash ls
' ' : ls -> takeOutSlash ls
l -> l
| 183
|
takeOutSlash str = case str of
'\\' : ls -> ls
'\n' : ls -> takeOutSlash ls
' ' : ls -> takeOutSlash ls
l -> l
| 150
| false
| true
| 0
| 8
| 71
| 64
| 31
| 33
| null | null |
Skyfold/postgrest
|
src/PostgREST/OpenAPI.hs
|
mit
|
toSwaggerType "integer" = SwaggerInteger
| 42
|
toSwaggerType "integer" = SwaggerInteger
| 42
|
toSwaggerType "integer" = SwaggerInteger
| 42
| false
| false
| 0
| 5
| 5
| 9
| 4
| 5
| null | null |
ozkar99/HaskellEstadistica
|
MDC/MDC.hs
|
bsd-2-clause
|
freqtable :: [Double] -> [(Int, Double)]
freqtable xs = [ (genericLength x, head x) | x <- group(sortedlist)] --returns a list of a 2 vaulued tuple: (frecuency, value)
where sortedlist = sort xs
--funciton to get the mode of a list
| 249
|
freqtable :: [Double] -> [(Int, Double)]
freqtable xs = [ (genericLength x, head x) | x <- group(sortedlist)] --returns a list of a 2 vaulued tuple: (frecuency, value)
where sortedlist = sort xs
--funciton to get the mode of a list
| 249
|
freqtable xs = [ (genericLength x, head x) | x <- group(sortedlist)] --returns a list of a 2 vaulued tuple: (frecuency, value)
where sortedlist = sort xs
--funciton to get the mode of a list
| 208
| false
| true
| 0
| 9
| 58
| 71
| 39
| 32
| null | null |
TomMD/crypto-api-tests
|
Test/Crypto.hs
|
bsd-3-clause
|
prop_CTRStrictLazyEq = prop_StrictLazyEq ctr ctrLazy unCtr unCtrLazy
| 68
|
prop_CTRStrictLazyEq = prop_StrictLazyEq ctr ctrLazy unCtr unCtrLazy
| 68
|
prop_CTRStrictLazyEq = prop_StrictLazyEq ctr ctrLazy unCtr unCtrLazy
| 68
| false
| false
| 1
| 5
| 6
| 18
| 7
| 11
| null | null |
fnordit/Arcana
|
GameState.hs
|
gpl-2.0
|
drawCard :: (Deck, Hand) -> (Deck, Hand)
drawCard ([], hand) = ([], hand)
| 73
|
drawCard :: (Deck, Hand) -> (Deck, Hand)
drawCard ([], hand) = ([], hand)
| 73
|
drawCard ([], hand) = ([], hand)
| 32
| false
| true
| 0
| 7
| 12
| 46
| 27
| 19
| null | null |
mtolly/rail
|
src/Data/ControlFlow.hs
|
gpl-3.0
|
-- | Like 'unroll', but applied to a network of paths.
unrollSystem :: (Ord c) => c -> System c b e a -> System c b e a
unrollSystem c sys = case Map.lookup c $ systemPaths sys of
Nothing -> sys
Just path -> mapPaths (unroll c path) $
sys { systemPaths = Map.delete c $ systemPaths sys }
-- | Sorts a list, and then returns only elements that appear just once.
| 369
|
unrollSystem :: (Ord c) => c -> System c b e a -> System c b e a
unrollSystem c sys = case Map.lookup c $ systemPaths sys of
Nothing -> sys
Just path -> mapPaths (unroll c path) $
sys { systemPaths = Map.delete c $ systemPaths sys }
-- | Sorts a list, and then returns only elements that appear just once.
| 314
|
unrollSystem c sys = case Map.lookup c $ systemPaths sys of
Nothing -> sys
Just path -> mapPaths (unroll c path) $
sys { systemPaths = Map.delete c $ systemPaths sys }
-- | Sorts a list, and then returns only elements that appear just once.
| 249
| true
| true
| 0
| 14
| 83
| 124
| 59
| 65
| null | null |
aelyasov/Haslog
|
src/Eu/Fittest/Logging/Compression/RawlogParser.hs
|
bsd-3-clause
|
exPar2 = "%<P %<{ }%>%>" :: T.Text
| 35
|
exPar2 = "%<P %<{ }%>%>" :: T.Text
| 35
|
exPar2 = "%<P %<{ }%>%>" :: T.Text
| 35
| false
| false
| 0
| 5
| 7
| 11
| 6
| 5
| null | null |
icyfork/shellcheck
|
ShellCheck/Parser.hs
|
gpl-3.0
|
g_In = tryWordToken "in" T_In
| 29
|
g_In = tryWordToken "in" T_In
| 29
|
g_In = tryWordToken "in" T_In
| 29
| false
| false
| 0
| 5
| 4
| 11
| 5
| 6
| null | null |
josefs/autosar
|
oldARSim/RaceCondition2.hs
|
bsd-3-clause
|
main = mainRand consumer
| 35
|
main = mainRand consumer
| 35
|
main = mainRand consumer
| 35
| false
| false
| 1
| 5
| 14
| 12
| 4
| 8
| null | null |
kishoredbn/barrelfish
|
tools/mackerel/Checks.hs
|
mit
|
--
-- Registers overlapping
--
check_overlap :: Dev.Rec -> [ MacError ]
check_overlap d =
let l = [ r | r <- Dev.registers d, not (RT.also r) ]
in
check_overlap1 l
| 178
|
check_overlap :: Dev.Rec -> [ MacError ]
check_overlap d =
let l = [ r | r <- Dev.registers d, not (RT.also r) ]
in
check_overlap1 l
| 147
|
check_overlap d =
let l = [ r | r <- Dev.registers d, not (RT.also r) ]
in
check_overlap1 l
| 106
| true
| true
| 0
| 14
| 46
| 71
| 36
| 35
| null | null |
rueshyna/gogol
|
gogol-civicinfo/gen/Network/Google/CivicInfo/Types/Product.hs
|
mpl-2.0
|
-- | Addresses at which to contact the official.
offAddress :: Lens' Official [SimpleAddressType]
offAddress
= lens _offAddress (\ s a -> s{_offAddress = a}) .
_Default
. _Coerce
| 192
|
offAddress :: Lens' Official [SimpleAddressType]
offAddress
= lens _offAddress (\ s a -> s{_offAddress = a}) .
_Default
. _Coerce
| 143
|
offAddress
= lens _offAddress (\ s a -> s{_offAddress = a}) .
_Default
. _Coerce
| 94
| true
| true
| 1
| 10
| 42
| 55
| 28
| 27
| null | null |
GaloisInc/sk-dev-platform
|
libs/SCD/src/SCD/M4/Dependencies.hs
|
bsd-3-clause
|
add :: M4Id -> Origin -> P r M4IdMap ()
add k v = do
m <- get
case lookup k m of
Nothing -> put (insert k v m)
Just v' -> throwError $ "SCD.M4.Dependencies.add: duplicate definition of "++show k++": "++ show(v',v)
-- | Build the environment map for template and interfaces
| 285
|
add :: M4Id -> Origin -> P r M4IdMap ()
add k v = do
m <- get
case lookup k m of
Nothing -> put (insert k v m)
Just v' -> throwError $ "SCD.M4.Dependencies.add: duplicate definition of "++show k++": "++ show(v',v)
-- | Build the environment map for template and interfaces
| 285
|
add k v = do
m <- get
case lookup k m of
Nothing -> put (insert k v m)
Just v' -> throwError $ "SCD.M4.Dependencies.add: duplicate definition of "++show k++": "++ show(v',v)
-- | Build the environment map for template and interfaces
| 245
| false
| true
| 0
| 14
| 65
| 114
| 53
| 61
| null | null |
sixears/getopt
|
src/Console/Getopt.hs
|
mit
|
-- | construct --help option
helpme :: HelpOpts -> OptParse o
helpme helpopts _optname mb_optval state =
let progname = prog_name helpopts
argstring = show_arity (arg_arity helpopts) (arg_type helpopts)
-- | format up some help for a specific option
make_help_for :: Option o -> String
make_help_for o = intercalate "\n"
((:) ((++ ":") . intercalate "\n" .
fmap (tr1 ' ' '|') . stripEnds .
wrap 80 . unwords $
optionNames o
)
(stripEnds $
hjoin VTop [ mkBlock [" "]
, wrap 78 (o ^. desc) ]
)
)
in case mb_optval of
Nothing -> let summ = mkHelpSummary progname argstring (state ^. cfg)
in parse_options (sethelp state "--help" summ)
Just o -> case filter (nameMatch o) (state ^. cfg) of
[opt] -> case opt ^. desc of
"" -> parse_options (state &
errs ~:~ err_nolonghelp o)
_ -> parse_options (sethelp state
( "--help"
++ optionName opt)
(make_help_for opt))
[] -> parse_options (state & errs ~:~ err_nonopt o)
_ : _ -> error $ err_ambgopt o
-- helpopt ---------------------------------------------------------------------
-- | printable description for a single option (typically one line of the help
-- summary); each block is a column (so names, type, default, summary)
| 2,035
|
helpme :: HelpOpts -> OptParse o
helpme helpopts _optname mb_optval state =
let progname = prog_name helpopts
argstring = show_arity (arg_arity helpopts) (arg_type helpopts)
-- | format up some help for a specific option
make_help_for :: Option o -> String
make_help_for o = intercalate "\n"
((:) ((++ ":") . intercalate "\n" .
fmap (tr1 ' ' '|') . stripEnds .
wrap 80 . unwords $
optionNames o
)
(stripEnds $
hjoin VTop [ mkBlock [" "]
, wrap 78 (o ^. desc) ]
)
)
in case mb_optval of
Nothing -> let summ = mkHelpSummary progname argstring (state ^. cfg)
in parse_options (sethelp state "--help" summ)
Just o -> case filter (nameMatch o) (state ^. cfg) of
[opt] -> case opt ^. desc of
"" -> parse_options (state &
errs ~:~ err_nolonghelp o)
_ -> parse_options (sethelp state
( "--help"
++ optionName opt)
(make_help_for opt))
[] -> parse_options (state & errs ~:~ err_nonopt o)
_ : _ -> error $ err_ambgopt o
-- helpopt ---------------------------------------------------------------------
-- | printable description for a single option (typically one line of the help
-- summary); each block is a column (so names, type, default, summary)
| 2,006
|
helpme helpopts _optname mb_optval state =
let progname = prog_name helpopts
argstring = show_arity (arg_arity helpopts) (arg_type helpopts)
-- | format up some help for a specific option
make_help_for :: Option o -> String
make_help_for o = intercalate "\n"
((:) ((++ ":") . intercalate "\n" .
fmap (tr1 ' ' '|') . stripEnds .
wrap 80 . unwords $
optionNames o
)
(stripEnds $
hjoin VTop [ mkBlock [" "]
, wrap 78 (o ^. desc) ]
)
)
in case mb_optval of
Nothing -> let summ = mkHelpSummary progname argstring (state ^. cfg)
in parse_options (sethelp state "--help" summ)
Just o -> case filter (nameMatch o) (state ^. cfg) of
[opt] -> case opt ^. desc of
"" -> parse_options (state &
errs ~:~ err_nolonghelp o)
_ -> parse_options (sethelp state
( "--help"
++ optionName opt)
(make_help_for opt))
[] -> parse_options (state & errs ~:~ err_nonopt o)
_ : _ -> error $ err_ambgopt o
-- helpopt ---------------------------------------------------------------------
-- | printable description for a single option (typically one line of the help
-- summary); each block is a column (so names, type, default, summary)
| 1,973
| true
| true
| 0
| 21
| 1,061
| 386
| 192
| 194
| null | null |
unisonweb/platform
|
parser-typechecker/src/Unison/Typechecker/Context.hs
|
mit
|
refineEffectVar l es blank v = do
slack <- freshenVar Var.inferAbility
evs <- traverse (\e -> freshenVar (nameFrom Var.inferAbility e)) es
let locs = loc <$> es
es' = zipWith existentialp locs evs
t' = Type.effects l (existentialp l slack : es')
s = Solved blank v (Type.Monotype t')
vs = existential slack : fmap existential evs
replaceContext (existential v) (vs ++ [s])
Foldable.for_ (es `zip` evs) $ \(e,ev) ->
getContext >>= \ctx -> instantiateR (apply ctx e) B.Blank ev
-- | Instantiate the given existential such that it is
-- a supertype of the given type, updating the context
-- in the process.
| 643
|
refineEffectVar l es blank v = do
slack <- freshenVar Var.inferAbility
evs <- traverse (\e -> freshenVar (nameFrom Var.inferAbility e)) es
let locs = loc <$> es
es' = zipWith existentialp locs evs
t' = Type.effects l (existentialp l slack : es')
s = Solved blank v (Type.Monotype t')
vs = existential slack : fmap existential evs
replaceContext (existential v) (vs ++ [s])
Foldable.for_ (es `zip` evs) $ \(e,ev) ->
getContext >>= \ctx -> instantiateR (apply ctx e) B.Blank ev
-- | Instantiate the given existential such that it is
-- a supertype of the given type, updating the context
-- in the process.
| 643
|
refineEffectVar l es blank v = do
slack <- freshenVar Var.inferAbility
evs <- traverse (\e -> freshenVar (nameFrom Var.inferAbility e)) es
let locs = loc <$> es
es' = zipWith existentialp locs evs
t' = Type.effects l (existentialp l slack : es')
s = Solved blank v (Type.Monotype t')
vs = existential slack : fmap existential evs
replaceContext (existential v) (vs ++ [s])
Foldable.for_ (es `zip` evs) $ \(e,ev) ->
getContext >>= \ctx -> instantiateR (apply ctx e) B.Blank ev
-- | Instantiate the given existential such that it is
-- a supertype of the given type, updating the context
-- in the process.
| 643
| false
| false
| 0
| 14
| 142
| 231
| 116
| 115
| null | null |
HJvT/com
|
System/Win32/Com/Dll.hs
|
bsd-3-clause
|
-- | @withFinalizer act ci@ returns a new ComponentInfo based on @ci@,
-- but with its finalizer action set to @act@.
withFinaliser :: IO () -> ComponentInfo -> ComponentInfo
withFinaliser act info = info{componentFinalise=act}
| 228
|
withFinaliser :: IO () -> ComponentInfo -> ComponentInfo
withFinaliser act info = info{componentFinalise=act}
| 109
|
withFinaliser act info = info{componentFinalise=act}
| 52
| true
| true
| 0
| 8
| 34
| 49
| 23
| 26
| null | null |
Cortlandd/haskell-opencv
|
src/OpenCV/Internal/Exception.hs
|
bsd-3-clause
|
cvExceptU :: QuasiQuoter
cvExceptU = CU.block {quoteExp = \s -> quoteExp CU.block $ cvExceptWrap s}
| 99
|
cvExceptU :: QuasiQuoter
cvExceptU = CU.block {quoteExp = \s -> quoteExp CU.block $ cvExceptWrap s}
| 99
|
cvExceptU = CU.block {quoteExp = \s -> quoteExp CU.block $ cvExceptWrap s}
| 74
| false
| true
| 0
| 10
| 14
| 38
| 20
| 18
| null | null |
gsdlab/clafer
|
src/Language/Clafer/Generator/Html.hs
|
mit
|
printSuper :: Super -> Int -> Map.Map Span [Ir] -> Bool -> [(Span, String)] -> String
printSuper (SuperEmpty _) _ _ _ _ = ""
| 124
|
printSuper :: Super -> Int -> Map.Map Span [Ir] -> Bool -> [(Span, String)] -> String
printSuper (SuperEmpty _) _ _ _ _ = ""
| 124
|
printSuper (SuperEmpty _) _ _ _ _ = ""
| 38
| false
| true
| 0
| 11
| 24
| 67
| 35
| 32
| null | null |
bergmannf/gitit
|
plugins/Signature.hs
|
gpl-2.0
|
replacedate (x:xs) = fmap (x : ) $ replacedate xs
| 49
|
replacedate (x:xs) = fmap (x : ) $ replacedate xs
| 49
|
replacedate (x:xs) = fmap (x : ) $ replacedate xs
| 49
| false
| false
| 0
| 7
| 9
| 30
| 15
| 15
| null | null |
cabrera/hdbc-postgresql
|
testsrc/SpecificDB.hs
|
bsd-3-clause
|
dateTimeTypeOfSqlValue (SqlLocalTimeOfDay _) = "time without time zone"
| 71
|
dateTimeTypeOfSqlValue (SqlLocalTimeOfDay _) = "time without time zone"
| 71
|
dateTimeTypeOfSqlValue (SqlLocalTimeOfDay _) = "time without time zone"
| 71
| false
| false
| 0
| 7
| 7
| 15
| 7
| 8
| null | null |
AlexeyRaga/eta
|
compiler/ETA/Prelude/PrimOp.hs
|
bsd-3-clause
|
tagOf_PrimOp GetApStackValOp = _ILIT(394)
| 41
|
tagOf_PrimOp GetApStackValOp = _ILIT(394)
| 41
|
tagOf_PrimOp GetApStackValOp = _ILIT(394)
| 41
| false
| false
| 0
| 6
| 3
| 16
| 7
| 9
| null | null |
jaccokrijnen/leksah
|
src/IDE/Pane/SourceBuffer.hs
|
gpl-2.0
|
removePackageLogRefs :: FilePath -> [LogRefType] -> IDEAction
removePackageLogRefs root types = do
liftIO . debugM "leksah" $ "removePackageLogRefs " <> root <> " " <> show types
removeLogRefs (\r _ -> r == root) types
| 226
|
removePackageLogRefs :: FilePath -> [LogRefType] -> IDEAction
removePackageLogRefs root types = do
liftIO . debugM "leksah" $ "removePackageLogRefs " <> root <> " " <> show types
removeLogRefs (\r _ -> r == root) types
| 226
|
removePackageLogRefs root types = do
liftIO . debugM "leksah" $ "removePackageLogRefs " <> root <> " " <> show types
removeLogRefs (\r _ -> r == root) types
| 164
| false
| true
| 0
| 12
| 42
| 78
| 38
| 40
| null | null |
nevvi/Declarative-D7012E
|
lab1/lab1.hs
|
gpl-3.0
|
range :: Int -> Int -> [Int] -> [Int]
range _ _ [] = []
| 55
|
range :: Int -> Int -> [Int] -> [Int]
range _ _ [] = []
| 55
|
range _ _ [] = []
| 17
| false
| true
| 0
| 10
| 14
| 46
| 22
| 24
| null | null |
pjones/xmonad-test
|
vendor/xmonad-contrib/XMonad/Hooks/ToggleHook.hs
|
bsd-2-clause
|
_get :: String -> ((Bool, Bool) -> a) -> X a
_get n f = XS.gets $ f . (findWithDefault (False, False) n . hooks)
| 112
|
_get :: String -> ((Bool, Bool) -> a) -> X a
_get n f = XS.gets $ f . (findWithDefault (False, False) n . hooks)
| 112
|
_get n f = XS.gets $ f . (findWithDefault (False, False) n . hooks)
| 67
| false
| true
| 0
| 10
| 24
| 73
| 37
| 36
| null | null |
ekmett/ghclive
|
prototypes/svgdemo/Helper.hs
|
bsd-3-clause
|
bar = renderDia SVG (SVGOptions "output.file" (Dims 200 200)) example
| 69
|
bar = renderDia SVG (SVGOptions "output.file" (Dims 200 200)) example
| 69
|
bar = renderDia SVG (SVGOptions "output.file" (Dims 200 200)) example
| 69
| false
| false
| 1
| 9
| 9
| 32
| 14
| 18
| null | null |
ComputationWithBoundedResources/ara-inference
|
doc/tpdb_trs/Haskell/basic_haskell/index_2.hs
|
mit
|
stop :: MyBool -> a;
stop MyFalse = stop MyFalse
| 50
|
stop :: MyBool -> a
stop MyFalse = stop MyFalse
| 49
|
stop MyFalse = stop MyFalse
| 27
| false
| true
| 0
| 5
| 11
| 26
| 12
| 14
| null | null |
IreneKnapp/Faction
|
libfaction/Distribution/Simple/LocalBuildInfo.hs
|
bsd-3-clause
|
withExeLBI :: PackageDescription -> LocalBuildInfo
-> (Executable -> ComponentLocalBuildInfo -> IO ()) -> IO ()
withExeLBI pkg_descr lbi f = withExe pkg_descr $ \exe ->
case lookup (exeName exe) (executableConfigs lbi) of
Just clbi -> f exe clbi
Nothing -> die (missingExeConf (exeName exe))
| 314
|
withExeLBI :: PackageDescription -> LocalBuildInfo
-> (Executable -> ComponentLocalBuildInfo -> IO ()) -> IO ()
withExeLBI pkg_descr lbi f = withExe pkg_descr $ \exe ->
case lookup (exeName exe) (executableConfigs lbi) of
Just clbi -> f exe clbi
Nothing -> die (missingExeConf (exeName exe))
| 314
|
withExeLBI pkg_descr lbi f = withExe pkg_descr $ \exe ->
case lookup (exeName exe) (executableConfigs lbi) of
Just clbi -> f exe clbi
Nothing -> die (missingExeConf (exeName exe))
| 191
| false
| true
| 0
| 14
| 66
| 123
| 58
| 65
| null | null |
icyfork/shellcheck
|
ShellCheck/Parser.hs
|
gpl-3.0
|
readAndOr = do
aid <- getNextId
annotations <- readAnnotations
andOr <- withAnnotations annotations $
chainr1 readPipeline $ do
op <- g_AND_IF <|> g_OR_IF
readLineBreak
return $ case op of T_AND_IF id -> T_AndIf id
T_OR_IF id -> T_OrIf id
return $ if null annotations
then andOr
else T_Annotation aid annotations andOr
| 445
|
readAndOr = do
aid <- getNextId
annotations <- readAnnotations
andOr <- withAnnotations annotations $
chainr1 readPipeline $ do
op <- g_AND_IF <|> g_OR_IF
readLineBreak
return $ case op of T_AND_IF id -> T_AndIf id
T_OR_IF id -> T_OrIf id
return $ if null annotations
then andOr
else T_Annotation aid annotations andOr
| 445
|
readAndOr = do
aid <- getNextId
annotations <- readAnnotations
andOr <- withAnnotations annotations $
chainr1 readPipeline $ do
op <- g_AND_IF <|> g_OR_IF
readLineBreak
return $ case op of T_AND_IF id -> T_AndIf id
T_OR_IF id -> T_OrIf id
return $ if null annotations
then andOr
else T_Annotation aid annotations andOr
| 445
| false
| false
| 0
| 15
| 177
| 115
| 51
| 64
| null | null |
cullina/Extractor
|
src/Ten.hs
|
bsd-3-clause
|
g :: Int -> [Int] -> Int
g q xs = rem (sum xs) q
| 48
|
g :: Int -> [Int] -> Int
g q xs = rem (sum xs) q
| 48
|
g q xs = rem (sum xs) q
| 23
| false
| true
| 0
| 7
| 14
| 42
| 20
| 22
| null | null |
tolysz/prepare-ghcjs
|
spec-lts8/base/System/Console/GetOpt.hs
|
bsd-3-clause
|
getOpt :: ArgOrder a -- non-option handling
-> [OptDescr a] -- option descriptors
-> [String] -- the command-line arguments
-> ([a],[String],[String]) -- (options,non-options,error messages)
getOpt ordering optDescr args = (os,xs,es ++ map errUnrec us)
where (os,xs,us,es) = getOpt' ordering optDescr args
{-|
This is almost the same as 'getOpt', but returns a quadruple
consisting of the option arguments, a list of non-options, a list of
unrecognized options, and a list of error messages.
-}
| 578
|
getOpt :: ArgOrder a -- non-option handling
-> [OptDescr a] -- option descriptors
-> [String] -- the command-line arguments
-> ([a],[String],[String])
getOpt ordering optDescr args = (os,xs,es ++ map errUnrec us)
where (os,xs,us,es) = getOpt' ordering optDescr args
{-|
This is almost the same as 'getOpt', but returns a quadruple
consisting of the option arguments, a list of non-options, a list of
unrecognized options, and a list of error messages.
-}
| 533
|
getOpt ordering optDescr args = (os,xs,es ++ map errUnrec us)
where (os,xs,us,es) = getOpt' ordering optDescr args
{-|
This is almost the same as 'getOpt', but returns a quadruple
consisting of the option arguments, a list of non-options, a list of
unrecognized options, and a list of error messages.
-}
| 307
| true
| true
| 0
| 9
| 157
| 110
| 63
| 47
| null | null |
hargettp/distributed-containers
|
tests/TestSet.hs
|
mit
|
test1Server :: Assertion
test1Server = timeBound (1000000) $ do
let name = servers !! 0
cfg = newTestConfiguration [name]
withTransport newMemoryTransport $ \transport ->
withEndpoint transport name $ \endpoint -> do
withSetServer endpoint cfg name (Set.empty :: Set.Set String) $ \vSet -> causally $ do
elements <- S.elems vSet
liftIO $ assertBool "Initial set should be empty" $ null elements
S.insert "foo" vSet
isMember1 <- S.member "foo" vSet
liftIO $ assertBool "Foo should be an element" isMember1
S.insert "bar" vSet
size <- S.size vSet
liftIO $ assertEqual "Set should have size 2" 2 size
| 761
|
test1Server :: Assertion
test1Server = timeBound (1000000) $ do
let name = servers !! 0
cfg = newTestConfiguration [name]
withTransport newMemoryTransport $ \transport ->
withEndpoint transport name $ \endpoint -> do
withSetServer endpoint cfg name (Set.empty :: Set.Set String) $ \vSet -> causally $ do
elements <- S.elems vSet
liftIO $ assertBool "Initial set should be empty" $ null elements
S.insert "foo" vSet
isMember1 <- S.member "foo" vSet
liftIO $ assertBool "Foo should be an element" isMember1
S.insert "bar" vSet
size <- S.size vSet
liftIO $ assertEqual "Set should have size 2" 2 size
| 761
|
test1Server = timeBound (1000000) $ do
let name = servers !! 0
cfg = newTestConfiguration [name]
withTransport newMemoryTransport $ \transport ->
withEndpoint transport name $ \endpoint -> do
withSetServer endpoint cfg name (Set.empty :: Set.Set String) $ \vSet -> causally $ do
elements <- S.elems vSet
liftIO $ assertBool "Initial set should be empty" $ null elements
S.insert "foo" vSet
isMember1 <- S.member "foo" vSet
liftIO $ assertBool "Foo should be an element" isMember1
S.insert "bar" vSet
size <- S.size vSet
liftIO $ assertEqual "Set should have size 2" 2 size
| 736
| false
| true
| 4
| 17
| 257
| 221
| 98
| 123
| null | null |
sanjoy/echoes
|
src/Source/Parse.hs
|
gpl-3.0
|
parseString :: String -> String -> Either String Term
parseString fileName text = case parse pTerm fileName text of
Left pError -> Left $ show pError
Right term -> Right term
| 178
|
parseString :: String -> String -> Either String Term
parseString fileName text = case parse pTerm fileName text of
Left pError -> Left $ show pError
Right term -> Right term
| 178
|
parseString fileName text = case parse pTerm fileName text of
Left pError -> Left $ show pError
Right term -> Right term
| 124
| false
| true
| 0
| 9
| 34
| 68
| 31
| 37
| null | null |
Frefreak/solitaire-solver
|
src/Solver.hs
|
bsd-3-clause
|
isPTL _ = False
| 15
|
isPTL _ = False
| 15
|
isPTL _ = False
| 15
| false
| false
| 0
| 4
| 3
| 10
| 4
| 6
| null | null |
hargettp/courier
|
src/Network/Transport.hs
|
mit
|
withBinding2 :: Transport -> (Endpoint,Name) -> (Endpoint,Name) -> IO a -> IO a
withBinding2 transport (endpoint1,name1) (endpoint2,name2) fn =
withBinding transport endpoint1 name1 $
withBinding transport endpoint2 name2 fn
| 230
|
withBinding2 :: Transport -> (Endpoint,Name) -> (Endpoint,Name) -> IO a -> IO a
withBinding2 transport (endpoint1,name1) (endpoint2,name2) fn =
withBinding transport endpoint1 name1 $
withBinding transport endpoint2 name2 fn
| 230
|
withBinding2 transport (endpoint1,name1) (endpoint2,name2) fn =
withBinding transport endpoint1 name1 $
withBinding transport endpoint2 name2 fn
| 150
| false
| true
| 0
| 11
| 34
| 94
| 46
| 48
| null | null |
mgsloan/quasi-extras
|
src/Language/Quasi/Internal/Utils.hs
|
bsd-3-clause
|
normalClause :: [PatQ] -> ExpQ -> ClauseQ
normalClause ps e = clause ps (normalB e) []
| 86
|
normalClause :: [PatQ] -> ExpQ -> ClauseQ
normalClause ps e = clause ps (normalB e) []
| 86
|
normalClause ps e = clause ps (normalB e) []
| 44
| false
| true
| 0
| 7
| 15
| 42
| 21
| 21
| null | null |
ntc2/cryptol
|
src/Cryptol/ModuleSystem/Base.hs
|
bsd-3-clause
|
-- | Add the prelude to the import list if it's not already mentioned.
addPrelude :: P.Module -> P.Module
addPrelude m
| preludeName == P.thing (P.mName m) = m
| preludeName `elem` importedMods = m
| otherwise = m { mImports = importPrelude : mImports m }
where
importedMods = map (P.iModule . P.thing) (P.mImports m)
importPrelude = P.Located
{ P.srcRange = emptyRange
, P.thing = P.Import
{ iModule = preludeName
, iAs = Nothing
, iSpec = Nothing
}
}
-- | Load the dependencies of a module into the environment.
| 609
|
addPrelude :: P.Module -> P.Module
addPrelude m
| preludeName == P.thing (P.mName m) = m
| preludeName `elem` importedMods = m
| otherwise = m { mImports = importPrelude : mImports m }
where
importedMods = map (P.iModule . P.thing) (P.mImports m)
importPrelude = P.Located
{ P.srcRange = emptyRange
, P.thing = P.Import
{ iModule = preludeName
, iAs = Nothing
, iSpec = Nothing
}
}
-- | Load the dependencies of a module into the environment.
| 538
|
addPrelude m
| preludeName == P.thing (P.mName m) = m
| preludeName `elem` importedMods = m
| otherwise = m { mImports = importPrelude : mImports m }
where
importedMods = map (P.iModule . P.thing) (P.mImports m)
importPrelude = P.Located
{ P.srcRange = emptyRange
, P.thing = P.Import
{ iModule = preludeName
, iAs = Nothing
, iSpec = Nothing
}
}
-- | Load the dependencies of a module into the environment.
| 503
| true
| true
| 3
| 12
| 187
| 180
| 91
| 89
| null | null |
sheepforce/Haskell_Data.Chemistry
|
src/modules/Data/Chemistry/XYZ.hs
|
gpl-3.0
|
getElement :: (String,Double,Double,Double) -> String
getElement (e, _, _, _) = e
| 81
|
getElement :: (String,Double,Double,Double) -> String
getElement (e, _, _, _) = e
| 81
|
getElement (e, _, _, _) = e
| 27
| false
| true
| 0
| 6
| 11
| 42
| 25
| 17
| null | null |
brendanhay/gogol
|
gogol-monitoring/gen/Network/Google/Resource/Monitoring/Projects/NotificationChannelDescriptors/Get.hs
|
mpl-2.0
|
-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
pncdgUploadType :: Lens' ProjectsNotificationChannelDescriptorsGet (Maybe Text)
pncdgUploadType
= lens _pncdgUploadType
(\ s a -> s{_pncdgUploadType = a})
| 233
|
pncdgUploadType :: Lens' ProjectsNotificationChannelDescriptorsGet (Maybe Text)
pncdgUploadType
= lens _pncdgUploadType
(\ s a -> s{_pncdgUploadType = a})
| 162
|
pncdgUploadType
= lens _pncdgUploadType
(\ s a -> s{_pncdgUploadType = a})
| 82
| true
| true
| 0
| 9
| 34
| 46
| 25
| 21
| null | null |
mettekou/ghc
|
utils/ghc-cabal/Main.hs
|
bsd-3-clause
|
withCurrentDirectory :: FilePath -> IO a -> IO a
withCurrentDirectory directory io
= bracket (getCurrentDirectory) (setCurrentDirectory)
(const (setCurrentDirectory directory >> io))
| 194
|
withCurrentDirectory :: FilePath -> IO a -> IO a
withCurrentDirectory directory io
= bracket (getCurrentDirectory) (setCurrentDirectory)
(const (setCurrentDirectory directory >> io))
| 194
|
withCurrentDirectory directory io
= bracket (getCurrentDirectory) (setCurrentDirectory)
(const (setCurrentDirectory directory >> io))
| 145
| false
| true
| 0
| 10
| 32
| 66
| 30
| 36
| null | null |
agocorona/haste-perch
|
Haste/App/Perch.hs
|
gpl-3.0
|
tr cont = nelem "tr" `child` cont
| 34
|
tr cont = nelem "tr" `child` cont
| 34
|
tr cont = nelem "tr" `child` cont
| 34
| false
| false
| 0
| 6
| 7
| 18
| 9
| 9
| null | null |
matthieubulte/sequent
|
src/Sequent/Proof.hs
|
bsd-3-clause
|
showProof (OrElimAntecedent _ _) = "OrElimAntecedent"
| 58
|
showProof (OrElimAntecedent _ _) = "OrElimAntecedent"
| 58
|
showProof (OrElimAntecedent _ _) = "OrElimAntecedent"
| 58
| false
| false
| 0
| 6
| 10
| 18
| 8
| 10
| null | null |
mbeidler/kata-bank-ocr
|
src/Types.hs
|
bsd-3-clause
|
seven = Digit 7
| 15
|
seven = Digit 7
| 15
|
seven = Digit 7
| 15
| false
| false
| 1
| 5
| 3
| 12
| 4
| 8
| null | null |
GaloisInc/halvm-ghc
|
compiler/prelude/PrelNames.hs
|
bsd-3-clause
|
doubleTyConKey = mkPreludeTyConUnique 10
| 65
|
doubleTyConKey = mkPreludeTyConUnique 10
| 65
|
doubleTyConKey = mkPreludeTyConUnique 10
| 65
| false
| false
| 0
| 5
| 28
| 9
| 4
| 5
| null | null |
frontrowed/stratosphere
|
library-gen/Stratosphere/ResourceProperties/SageMakerNotebookInstanceLifecycleConfigNotebookInstanceLifecycleHook.hs
|
mit
|
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-notebookinstancelifecycleconfig-notebookinstancelifecyclehook.html#cfn-sagemaker-notebookinstancelifecycleconfig-notebookinstancelifecyclehook-content
smnilcnilhContent :: Lens' SageMakerNotebookInstanceLifecycleConfigNotebookInstanceLifecycleHook (Maybe (Val Text))
smnilcnilhContent = lens _sageMakerNotebookInstanceLifecycleConfigNotebookInstanceLifecycleHookContent (\s a -> s { _sageMakerNotebookInstanceLifecycleConfigNotebookInstanceLifecycleHookContent = a })
| 559
|
smnilcnilhContent :: Lens' SageMakerNotebookInstanceLifecycleConfigNotebookInstanceLifecycleHook (Maybe (Val Text))
smnilcnilhContent = lens _sageMakerNotebookInstanceLifecycleConfigNotebookInstanceLifecycleHookContent (\s a -> s { _sageMakerNotebookInstanceLifecycleConfigNotebookInstanceLifecycleHookContent = a })
| 316
|
smnilcnilhContent = lens _sageMakerNotebookInstanceLifecycleConfigNotebookInstanceLifecycleHookContent (\s a -> s { _sageMakerNotebookInstanceLifecycleConfigNotebookInstanceLifecycleHookContent = a })
| 200
| true
| true
| 0
| 9
| 22
| 52
| 28
| 24
| null | null |
siddhanathan/ghc
|
compiler/prelude/PrelNames.hs
|
bsd-3-clause
|
unpackCStringFoldrName = varQual gHC_CSTRING (fsLit "unpackFoldrCString#") unpackCStringFoldrIdKey
| 99
|
unpackCStringFoldrName = varQual gHC_CSTRING (fsLit "unpackFoldrCString#") unpackCStringFoldrIdKey
| 99
|
unpackCStringFoldrName = varQual gHC_CSTRING (fsLit "unpackFoldrCString#") unpackCStringFoldrIdKey
| 99
| false
| false
| 0
| 7
| 7
| 19
| 9
| 10
| null | null |
HJvT/hdirect
|
src/Parser.hs
|
bsd-3-clause
|
action_286 (39#) = happyGoto action_484
| 39
|
action_286 (39#) = happyGoto action_484
| 39
|
action_286 (39#) = happyGoto action_484
| 39
| false
| false
| 0
| 6
| 4
| 15
| 7
| 8
| null | null |
awto/genuine-control-prompt
|
src/Control/Monad/Indexed/Cont/Dynamic.hs
|
bsd-3-clause
|
control :: ((a -> Cont t b t t) -> Cont r g r r) -> Cont t g b a
control e = Cont $ \k t -> let
c = \x -> Cont $ \k' t' -> k x (
t ++ F (\x' t'' -> k' x' t'') : t')
in runCont (e c) theta1 []
| 254
|
control :: ((a -> Cont t b t t) -> Cont r g r r) -> Cont t g b a
control e = Cont $ \k t -> let
c = \x -> Cont $ \k' t' -> k x (
t ++ F (\x' t'' -> k' x' t'') : t')
in runCont (e c) theta1 []
| 254
|
control e = Cont $ \k t -> let
c = \x -> Cont $ \k' t' -> k x (
t ++ F (\x' t'' -> k' x' t'') : t')
in runCont (e c) theta1 []
| 189
| false
| true
| 0
| 21
| 121
| 146
| 73
| 73
| null | null |
h3nnn4n/rsa-haskell
|
Rsa.hs
|
gpl-3.0
|
decypher m (d, n) = powerMod m d n
| 34
|
decypher m (d, n) = powerMod m d n
| 34
|
decypher m (d, n) = powerMod m d n
| 34
| false
| false
| 0
| 5
| 8
| 28
| 12
| 16
| null | null |
ggreif/thebook-haskell
|
Setup.hs
|
mit
|
parseType _ "Byte" = Just Byte
| 35
|
parseType _ "Byte" = Just Byte
| 35
|
parseType _ "Byte" = Just Byte
| 35
| false
| false
| 1
| 5
| 10
| 16
| 6
| 10
| null | null |
philopon/pylon
|
Graphics/Pylon/Binding/Pango/Font.hs
|
mit
|
fontDescriptionSetVariant :: Variant -> FontDescription -> IO ()
fontDescriptionSetVariant var (FontDescription f'fd) =
withForeignPtr f'fd $ \fd ->
pango_font_description_set_variant fd var
| 198
|
fontDescriptionSetVariant :: Variant -> FontDescription -> IO ()
fontDescriptionSetVariant var (FontDescription f'fd) =
withForeignPtr f'fd $ \fd ->
pango_font_description_set_variant fd var
| 198
|
fontDescriptionSetVariant var (FontDescription f'fd) =
withForeignPtr f'fd $ \fd ->
pango_font_description_set_variant fd var
| 133
| false
| true
| 0
| 8
| 28
| 52
| 25
| 27
| null | null |
holzensp/ghc
|
compiler/codeGen/StgCmmPrim.hs
|
bsd-3-clause
|
translateOp dflags WordMulOp = Just (mo_wordMul dflags)
| 60
|
translateOp dflags WordMulOp = Just (mo_wordMul dflags)
| 60
|
translateOp dflags WordMulOp = Just (mo_wordMul dflags)
| 60
| false
| false
| 0
| 7
| 11
| 20
| 9
| 11
| null | null |
roelvandijk/numerals-base
|
src/Text/Numeral/Rules.hs
|
bsd-3-clause
|
mulScale1 ∷ (Integral α, E.Scale α, E.Unknown β, E.Add β, E.Mul β, E.Scale β)
⇒ α -- ^ Base.
→ α -- ^ Offset.
→ Side -- ^ Add side.
→ Side -- ^ Mul side.
→ Rule α β -- ^ Big num rule.
→ Rule α β
mulScale1 = mulScale_ $ \f m scale' mSide → (flipIfR mSide E.mul) (f m) scale'
| 355
|
mulScale1 ∷ (Integral α, E.Scale α, E.Unknown β, E.Add β, E.Mul β, E.Scale β)
⇒ α -- ^ Base.
→ α -- ^ Offset.
→ Side -- ^ Add side.
→ Side -- ^ Mul side.
→ Rule α β -- ^ Big num rule.
→ Rule α β
mulScale1 = mulScale_ $ \f m scale' mSide → (flipIfR mSide E.mul) (f m) scale'
| 355
|
mulScale1 = mulScale_ $ \f m scale' mSide → (flipIfR mSide E.mul) (f m) scale'
| 78
| false
| true
| 0
| 11
| 145
| 131
| 68
| 63
| null | null |
andgate/vish
|
src/Vish/Graphics/Image.hs
|
bsd-3-clause
|
mkImage :: Texture -- ^ Image texture
-> Image
mkImage t =
let p = Vec.zero
in mkImageXY p t
| 104
|
mkImage :: Texture -- ^ Image texture
-> Image
mkImage t =
let p = Vec.zero
in mkImageXY p t
| 104
|
mkImage t =
let p = Vec.zero
in mkImageXY p t
| 49
| false
| true
| 0
| 9
| 31
| 37
| 18
| 19
| null | null |
MaxDaten/yage
|
src/Yage/Rendering/Resources/GL/SparseTexture/Internal.hs
|
mit
|
-- | The y size of the virtual page for the given format and target
getVirtualPageSize3D :: MonadIO m => TextureTarget -> InternalFormat -> m (V3 Int)
getVirtualPageSize3D t i = liftM3 V3 (getVirtualPageSizeX t i) (getVirtualPageSizeY t i) (getVirtualPageSizeZ t i)
| 265
|
getVirtualPageSize3D :: MonadIO m => TextureTarget -> InternalFormat -> m (V3 Int)
getVirtualPageSize3D t i = liftM3 V3 (getVirtualPageSizeX t i) (getVirtualPageSizeY t i) (getVirtualPageSizeZ t i)
| 197
|
getVirtualPageSize3D t i = liftM3 V3 (getVirtualPageSizeX t i) (getVirtualPageSizeY t i) (getVirtualPageSizeZ t i)
| 114
| true
| true
| 0
| 10
| 41
| 74
| 36
| 38
| null | null |
AndreasVoellmy/openflow
|
src/Network/Data/OF13/Message.hs
|
bsd-3-clause
|
instructionLength (WriteActions actions)
= 8 + actionListLength actions
| 74
|
instructionLength (WriteActions actions)
= 8 + actionListLength actions
| 74
|
instructionLength (WriteActions actions)
= 8 + actionListLength actions
| 74
| false
| false
| 0
| 7
| 10
| 22
| 10
| 12
| null | null |
javgh/mtgoxapi
|
Network/MtGoxAPI/Credentials.hs
|
bsd-3-clause
|
fromRight _ (Right a) = a
| 25
|
fromRight _ (Right a) = a
| 25
|
fromRight _ (Right a) = a
| 25
| false
| false
| 0
| 7
| 5
| 17
| 8
| 9
| null | null |
jwiegley/ghc-release
|
compiler/llvmGen/Llvm/Types.hs
|
gpl-3.0
|
i64 = LMInt 64
| 17
|
i64 = LMInt 64
| 17
|
i64 = LMInt 64
| 17
| false
| false
| 1
| 5
| 6
| 13
| 4
| 9
| null | null |
PeterCxy/peterbot-haskell
|
src/Calc.hs
|
mit
|
solveNewton f count x = do
xn <- (Right x) - (f x) / (derivative1 f x)
solveNewton f (count - 1) xn
| 103
|
solveNewton f count x = do
xn <- (Right x) - (f x) / (derivative1 f x)
solveNewton f (count - 1) xn
| 103
|
solveNewton f count x = do
xn <- (Right x) - (f x) / (derivative1 f x)
solveNewton f (count - 1) xn
| 103
| false
| false
| 0
| 11
| 26
| 65
| 31
| 34
| null | null |
randen/cabal
|
cabal-install/Main.hs
|
bsd-3-clause
|
reconfigure :: Verbosity -- ^ Verbosity setting
-> Flag FilePath -- ^ \"dist\" prefix
-> ConfigFlags -- ^ Additional config flags to set. These flags
-- will be 'mappend'ed to the last used or
-- default 'ConfigFlags' as appropriate, so
-- this value should be 'mempty' with only the
-- required flags set. The required verbosity
-- and \"dist\" prefix flags will be set
-- automatically because they are always
-- required; therefore, it is not necessary to
-- set them here.
-> [String] -- ^ Extra arguments
-> GlobalFlags -- ^ Global flags
-> SkipAddSourceDepsCheck
-- ^ Should we skip the timestamp check for modified
-- add-source dependencies?
-> Flag (Maybe Int)
-- ^ -j flag for reinstalling add-source deps.
-> (ConfigFlags -> Maybe String)
-- ^ Check that the required flags are set in
-- the last used 'ConfigFlags'. If the required
-- flags are not set, provide a message to the
-- user explaining the reason for
-- reconfiguration. Because the correct \"dist\"
-- prefix setting is always required, it is checked
-- automatically; this function need not check
-- for it.
-> IO (UseSandbox, SavedConfig, FilePath)
reconfigure verbosity flagDistPref addConfigFlags extraArgs globalFlags
skipAddSourceDepsCheck numJobsFlag checkFlags = do
(useSandbox, config) <- loadConfigOrSandboxConfig verbosity globalFlags
distPref <- findSavedDistPref config flagDistPref
eLbi <- tryGetPersistBuildConfig distPref
config' <- case eLbi of
Left err -> onNoBuildConfig (useSandbox, config) distPref err
Right lbi -> onBuildConfig (useSandbox, config) distPref lbi
return (useSandbox, config', distPref)
where
-- We couldn't load the saved package config file.
--
-- If we're in a sandbox: add-source deps don't have to be reinstalled
-- (since we don't know the compiler & platform).
onNoBuildConfig :: (UseSandbox, SavedConfig) -> FilePath
-> ConfigStateFileError -> IO SavedConfig
onNoBuildConfig (_, config) distPref err = do
let msg = case err of
ConfigStateFileMissing -> "Package has never been configured."
ConfigStateFileNoParse -> "Saved package config file seems "
++ "to be corrupt."
_ -> show err
case err of
ConfigStateFileBadVersion _ _ _ -> info verbosity msg
_ -> do
let distVerbFlags = mempty
{ configVerbosity = toFlag verbosity
, configDistPref = toFlag distPref
}
defaultFlags = mappend addConfigFlags distVerbFlags
notice verbosity
$ msg ++ " Configuring with default flags." ++ configureManually
configureAction (defaultFlags, defaultConfigExFlags)
extraArgs globalFlags
return config
-- Package has been configured, but the configuration may be out of
-- date or required flags may not be set.
--
-- If we're in a sandbox: reinstall the modified add-source deps and
-- force reconfigure if we did.
onBuildConfig :: (UseSandbox, SavedConfig) -> FilePath
-> LBI.LocalBuildInfo -> IO SavedConfig
onBuildConfig (useSandbox, config) distPref lbi = do
let configFlags = LBI.configFlags lbi
distVerbFlags = mempty
{ configVerbosity = toFlag verbosity
, configDistPref = toFlag distPref
}
flags = mconcat [configFlags, addConfigFlags, distVerbFlags]
-- Was the sandbox created after the package was already configured? We
-- may need to skip reinstallation of add-source deps and force
-- reconfigure.
let buildConfig = localBuildInfoFile distPref
sandboxConfig <- getSandboxConfigFilePath globalFlags
isSandboxConfigNewer <-
sandboxConfig `existsAndIsMoreRecentThan` buildConfig
let skipAddSourceDepsCheck'
| isSandboxConfigNewer = SkipAddSourceDepsCheck
| otherwise = skipAddSourceDepsCheck
when (skipAddSourceDepsCheck' == SkipAddSourceDepsCheck) $
info verbosity "Skipping add-source deps check..."
let (_, config') = updateInstallDirs
(configUserInstall flags)
(useSandbox, config)
depsReinstalled <-
case skipAddSourceDepsCheck' of
DontSkipAddSourceDepsCheck ->
maybeReinstallAddSourceDeps
verbosity numJobsFlag flags globalFlags
(useSandbox, config')
SkipAddSourceDepsCheck -> do
return NoDepsReinstalled
-- Is the @cabal.config@ file newer than @dist/setup.config@? Then we need
-- to force reconfigure. Note that it's possible to use @cabal.config@
-- even without sandboxes.
isUserPackageEnvironmentFileNewer <-
userPackageEnvironmentFile `existsAndIsMoreRecentThan` buildConfig
-- Determine whether we need to reconfigure and which message to show to
-- the user if that is the case.
mMsg <- determineMessageToShow distPref lbi configFlags
depsReinstalled isSandboxConfigNewer
isUserPackageEnvironmentFileNewer
case mMsg of
-- No message for the user indicates that reconfiguration
-- is not required.
Nothing -> return config'
-- Show the message and reconfigure.
Just msg -> do
notice verbosity msg
configureAction (flags, defaultConfigExFlags)
extraArgs globalFlags
return config'
-- Determine what message, if any, to display to the user if reconfiguration
-- is required.
determineMessageToShow :: FilePath -> LBI.LocalBuildInfo -> ConfigFlags
-> WereDepsReinstalled -> Bool -> Bool
-> IO (Maybe String)
determineMessageToShow _ _ _ _ True _ =
-- The sandbox was created after the package was already configured.
return $! Just $! sandboxConfigNewerMessage
determineMessageToShow _ _ _ _ False True =
-- The user package environment file was modified.
return $! Just $! userPackageEnvironmentFileModifiedMessage
determineMessageToShow distPref lbi configFlags depsReinstalled
False False = do
let savedDistPref = fromFlagOrDefault
(useDistPref defaultSetupScriptOptions)
(configDistPref configFlags)
case depsReinstalled of
ReinstalledSomeDeps ->
-- Some add-source deps were reinstalled.
return $! Just $! reinstalledDepsMessage
NoDepsReinstalled ->
case checkFlags configFlags of
-- Flag required by the caller is not set.
Just msg -> return $! Just $! msg ++ configureManually
Nothing
-- Required "dist" prefix is not set.
| savedDistPref /= distPref ->
return $! Just distPrefMessage
-- All required flags are set, but the configuration
-- may be outdated.
| otherwise -> case LBI.pkgDescrFile lbi of
Nothing -> return Nothing
Just pdFile -> do
outdated <- checkPersistBuildConfigOutdated
distPref pdFile
return $! if outdated
then Just $! outdatedMessage pdFile
else Nothing
reconfiguringMostRecent = " Re-configuring with most recently used options."
configureManually = " If this fails, please run configure manually."
sandboxConfigNewerMessage =
"The sandbox was created after the package was already configured."
++ reconfiguringMostRecent
++ configureManually
userPackageEnvironmentFileModifiedMessage =
"The user package environment file ('"
++ userPackageEnvironmentFile ++ "') was modified."
++ reconfiguringMostRecent
++ configureManually
distPrefMessage =
"Package previously configured with different \"dist\" prefix."
++ reconfiguringMostRecent
++ configureManually
outdatedMessage pdFile =
pdFile ++ " has been changed."
++ reconfiguringMostRecent
++ configureManually
reinstalledDepsMessage =
"Some add-source dependencies have been reinstalled."
++ reconfiguringMostRecent
++ configureManually
| 9,249
|
reconfigure :: Verbosity -- ^ Verbosity setting
-> Flag FilePath -- ^ \"dist\" prefix
-> ConfigFlags -- ^ Additional config flags to set. These flags
-- will be 'mappend'ed to the last used or
-- default 'ConfigFlags' as appropriate, so
-- this value should be 'mempty' with only the
-- required flags set. The required verbosity
-- and \"dist\" prefix flags will be set
-- automatically because they are always
-- required; therefore, it is not necessary to
-- set them here.
-> [String] -- ^ Extra arguments
-> GlobalFlags -- ^ Global flags
-> SkipAddSourceDepsCheck
-- ^ Should we skip the timestamp check for modified
-- add-source dependencies?
-> Flag (Maybe Int)
-- ^ -j flag for reinstalling add-source deps.
-> (ConfigFlags -> Maybe String)
-- ^ Check that the required flags are set in
-- the last used 'ConfigFlags'. If the required
-- flags are not set, provide a message to the
-- user explaining the reason for
-- reconfiguration. Because the correct \"dist\"
-- prefix setting is always required, it is checked
-- automatically; this function need not check
-- for it.
-> IO (UseSandbox, SavedConfig, FilePath)
reconfigure verbosity flagDistPref addConfigFlags extraArgs globalFlags
skipAddSourceDepsCheck numJobsFlag checkFlags = do
(useSandbox, config) <- loadConfigOrSandboxConfig verbosity globalFlags
distPref <- findSavedDistPref config flagDistPref
eLbi <- tryGetPersistBuildConfig distPref
config' <- case eLbi of
Left err -> onNoBuildConfig (useSandbox, config) distPref err
Right lbi -> onBuildConfig (useSandbox, config) distPref lbi
return (useSandbox, config', distPref)
where
-- We couldn't load the saved package config file.
--
-- If we're in a sandbox: add-source deps don't have to be reinstalled
-- (since we don't know the compiler & platform).
onNoBuildConfig :: (UseSandbox, SavedConfig) -> FilePath
-> ConfigStateFileError -> IO SavedConfig
onNoBuildConfig (_, config) distPref err = do
let msg = case err of
ConfigStateFileMissing -> "Package has never been configured."
ConfigStateFileNoParse -> "Saved package config file seems "
++ "to be corrupt."
_ -> show err
case err of
ConfigStateFileBadVersion _ _ _ -> info verbosity msg
_ -> do
let distVerbFlags = mempty
{ configVerbosity = toFlag verbosity
, configDistPref = toFlag distPref
}
defaultFlags = mappend addConfigFlags distVerbFlags
notice verbosity
$ msg ++ " Configuring with default flags." ++ configureManually
configureAction (defaultFlags, defaultConfigExFlags)
extraArgs globalFlags
return config
-- Package has been configured, but the configuration may be out of
-- date or required flags may not be set.
--
-- If we're in a sandbox: reinstall the modified add-source deps and
-- force reconfigure if we did.
onBuildConfig :: (UseSandbox, SavedConfig) -> FilePath
-> LBI.LocalBuildInfo -> IO SavedConfig
onBuildConfig (useSandbox, config) distPref lbi = do
let configFlags = LBI.configFlags lbi
distVerbFlags = mempty
{ configVerbosity = toFlag verbosity
, configDistPref = toFlag distPref
}
flags = mconcat [configFlags, addConfigFlags, distVerbFlags]
-- Was the sandbox created after the package was already configured? We
-- may need to skip reinstallation of add-source deps and force
-- reconfigure.
let buildConfig = localBuildInfoFile distPref
sandboxConfig <- getSandboxConfigFilePath globalFlags
isSandboxConfigNewer <-
sandboxConfig `existsAndIsMoreRecentThan` buildConfig
let skipAddSourceDepsCheck'
| isSandboxConfigNewer = SkipAddSourceDepsCheck
| otherwise = skipAddSourceDepsCheck
when (skipAddSourceDepsCheck' == SkipAddSourceDepsCheck) $
info verbosity "Skipping add-source deps check..."
let (_, config') = updateInstallDirs
(configUserInstall flags)
(useSandbox, config)
depsReinstalled <-
case skipAddSourceDepsCheck' of
DontSkipAddSourceDepsCheck ->
maybeReinstallAddSourceDeps
verbosity numJobsFlag flags globalFlags
(useSandbox, config')
SkipAddSourceDepsCheck -> do
return NoDepsReinstalled
-- Is the @cabal.config@ file newer than @dist/setup.config@? Then we need
-- to force reconfigure. Note that it's possible to use @cabal.config@
-- even without sandboxes.
isUserPackageEnvironmentFileNewer <-
userPackageEnvironmentFile `existsAndIsMoreRecentThan` buildConfig
-- Determine whether we need to reconfigure and which message to show to
-- the user if that is the case.
mMsg <- determineMessageToShow distPref lbi configFlags
depsReinstalled isSandboxConfigNewer
isUserPackageEnvironmentFileNewer
case mMsg of
-- No message for the user indicates that reconfiguration
-- is not required.
Nothing -> return config'
-- Show the message and reconfigure.
Just msg -> do
notice verbosity msg
configureAction (flags, defaultConfigExFlags)
extraArgs globalFlags
return config'
-- Determine what message, if any, to display to the user if reconfiguration
-- is required.
determineMessageToShow :: FilePath -> LBI.LocalBuildInfo -> ConfigFlags
-> WereDepsReinstalled -> Bool -> Bool
-> IO (Maybe String)
determineMessageToShow _ _ _ _ True _ =
-- The sandbox was created after the package was already configured.
return $! Just $! sandboxConfigNewerMessage
determineMessageToShow _ _ _ _ False True =
-- The user package environment file was modified.
return $! Just $! userPackageEnvironmentFileModifiedMessage
determineMessageToShow distPref lbi configFlags depsReinstalled
False False = do
let savedDistPref = fromFlagOrDefault
(useDistPref defaultSetupScriptOptions)
(configDistPref configFlags)
case depsReinstalled of
ReinstalledSomeDeps ->
-- Some add-source deps were reinstalled.
return $! Just $! reinstalledDepsMessage
NoDepsReinstalled ->
case checkFlags configFlags of
-- Flag required by the caller is not set.
Just msg -> return $! Just $! msg ++ configureManually
Nothing
-- Required "dist" prefix is not set.
| savedDistPref /= distPref ->
return $! Just distPrefMessage
-- All required flags are set, but the configuration
-- may be outdated.
| otherwise -> case LBI.pkgDescrFile lbi of
Nothing -> return Nothing
Just pdFile -> do
outdated <- checkPersistBuildConfigOutdated
distPref pdFile
return $! if outdated
then Just $! outdatedMessage pdFile
else Nothing
reconfiguringMostRecent = " Re-configuring with most recently used options."
configureManually = " If this fails, please run configure manually."
sandboxConfigNewerMessage =
"The sandbox was created after the package was already configured."
++ reconfiguringMostRecent
++ configureManually
userPackageEnvironmentFileModifiedMessage =
"The user package environment file ('"
++ userPackageEnvironmentFile ++ "') was modified."
++ reconfiguringMostRecent
++ configureManually
distPrefMessage =
"Package previously configured with different \"dist\" prefix."
++ reconfiguringMostRecent
++ configureManually
outdatedMessage pdFile =
pdFile ++ " has been changed."
++ reconfiguringMostRecent
++ configureManually
reinstalledDepsMessage =
"Some add-source dependencies have been reinstalled."
++ reconfiguringMostRecent
++ configureManually
| 9,249
|
reconfigure verbosity flagDistPref addConfigFlags extraArgs globalFlags
skipAddSourceDepsCheck numJobsFlag checkFlags = do
(useSandbox, config) <- loadConfigOrSandboxConfig verbosity globalFlags
distPref <- findSavedDistPref config flagDistPref
eLbi <- tryGetPersistBuildConfig distPref
config' <- case eLbi of
Left err -> onNoBuildConfig (useSandbox, config) distPref err
Right lbi -> onBuildConfig (useSandbox, config) distPref lbi
return (useSandbox, config', distPref)
where
-- We couldn't load the saved package config file.
--
-- If we're in a sandbox: add-source deps don't have to be reinstalled
-- (since we don't know the compiler & platform).
onNoBuildConfig :: (UseSandbox, SavedConfig) -> FilePath
-> ConfigStateFileError -> IO SavedConfig
onNoBuildConfig (_, config) distPref err = do
let msg = case err of
ConfigStateFileMissing -> "Package has never been configured."
ConfigStateFileNoParse -> "Saved package config file seems "
++ "to be corrupt."
_ -> show err
case err of
ConfigStateFileBadVersion _ _ _ -> info verbosity msg
_ -> do
let distVerbFlags = mempty
{ configVerbosity = toFlag verbosity
, configDistPref = toFlag distPref
}
defaultFlags = mappend addConfigFlags distVerbFlags
notice verbosity
$ msg ++ " Configuring with default flags." ++ configureManually
configureAction (defaultFlags, defaultConfigExFlags)
extraArgs globalFlags
return config
-- Package has been configured, but the configuration may be out of
-- date or required flags may not be set.
--
-- If we're in a sandbox: reinstall the modified add-source deps and
-- force reconfigure if we did.
onBuildConfig :: (UseSandbox, SavedConfig) -> FilePath
-> LBI.LocalBuildInfo -> IO SavedConfig
onBuildConfig (useSandbox, config) distPref lbi = do
let configFlags = LBI.configFlags lbi
distVerbFlags = mempty
{ configVerbosity = toFlag verbosity
, configDistPref = toFlag distPref
}
flags = mconcat [configFlags, addConfigFlags, distVerbFlags]
-- Was the sandbox created after the package was already configured? We
-- may need to skip reinstallation of add-source deps and force
-- reconfigure.
let buildConfig = localBuildInfoFile distPref
sandboxConfig <- getSandboxConfigFilePath globalFlags
isSandboxConfigNewer <-
sandboxConfig `existsAndIsMoreRecentThan` buildConfig
let skipAddSourceDepsCheck'
| isSandboxConfigNewer = SkipAddSourceDepsCheck
| otherwise = skipAddSourceDepsCheck
when (skipAddSourceDepsCheck' == SkipAddSourceDepsCheck) $
info verbosity "Skipping add-source deps check..."
let (_, config') = updateInstallDirs
(configUserInstall flags)
(useSandbox, config)
depsReinstalled <-
case skipAddSourceDepsCheck' of
DontSkipAddSourceDepsCheck ->
maybeReinstallAddSourceDeps
verbosity numJobsFlag flags globalFlags
(useSandbox, config')
SkipAddSourceDepsCheck -> do
return NoDepsReinstalled
-- Is the @cabal.config@ file newer than @dist/setup.config@? Then we need
-- to force reconfigure. Note that it's possible to use @cabal.config@
-- even without sandboxes.
isUserPackageEnvironmentFileNewer <-
userPackageEnvironmentFile `existsAndIsMoreRecentThan` buildConfig
-- Determine whether we need to reconfigure and which message to show to
-- the user if that is the case.
mMsg <- determineMessageToShow distPref lbi configFlags
depsReinstalled isSandboxConfigNewer
isUserPackageEnvironmentFileNewer
case mMsg of
-- No message for the user indicates that reconfiguration
-- is not required.
Nothing -> return config'
-- Show the message and reconfigure.
Just msg -> do
notice verbosity msg
configureAction (flags, defaultConfigExFlags)
extraArgs globalFlags
return config'
-- Determine what message, if any, to display to the user if reconfiguration
-- is required.
determineMessageToShow :: FilePath -> LBI.LocalBuildInfo -> ConfigFlags
-> WereDepsReinstalled -> Bool -> Bool
-> IO (Maybe String)
determineMessageToShow _ _ _ _ True _ =
-- The sandbox was created after the package was already configured.
return $! Just $! sandboxConfigNewerMessage
determineMessageToShow _ _ _ _ False True =
-- The user package environment file was modified.
return $! Just $! userPackageEnvironmentFileModifiedMessage
determineMessageToShow distPref lbi configFlags depsReinstalled
False False = do
let savedDistPref = fromFlagOrDefault
(useDistPref defaultSetupScriptOptions)
(configDistPref configFlags)
case depsReinstalled of
ReinstalledSomeDeps ->
-- Some add-source deps were reinstalled.
return $! Just $! reinstalledDepsMessage
NoDepsReinstalled ->
case checkFlags configFlags of
-- Flag required by the caller is not set.
Just msg -> return $! Just $! msg ++ configureManually
Nothing
-- Required "dist" prefix is not set.
| savedDistPref /= distPref ->
return $! Just distPrefMessage
-- All required flags are set, but the configuration
-- may be outdated.
| otherwise -> case LBI.pkgDescrFile lbi of
Nothing -> return Nothing
Just pdFile -> do
outdated <- checkPersistBuildConfigOutdated
distPref pdFile
return $! if outdated
then Just $! outdatedMessage pdFile
else Nothing
reconfiguringMostRecent = " Re-configuring with most recently used options."
configureManually = " If this fails, please run configure manually."
sandboxConfigNewerMessage =
"The sandbox was created after the package was already configured."
++ reconfiguringMostRecent
++ configureManually
userPackageEnvironmentFileModifiedMessage =
"The user package environment file ('"
++ userPackageEnvironmentFile ++ "') was modified."
++ reconfiguringMostRecent
++ configureManually
distPrefMessage =
"Package previously configured with different \"dist\" prefix."
++ reconfiguringMostRecent
++ configureManually
outdatedMessage pdFile =
pdFile ++ " has been changed."
++ reconfiguringMostRecent
++ configureManually
reinstalledDepsMessage =
"Some add-source dependencies have been reinstalled."
++ reconfiguringMostRecent
++ configureManually
| 7,485
| false
| true
| 33
| 22
| 3,242
| 1,211
| 606
| 605
| null | null |
christiaanb/clash
|
clash/CLasH/VHDL/Constants.hs
|
bsd-3-clause
|
-- Numeric Operations
-- | plus operation identifier
plusId :: String
plusId = "+"
| 83
|
plusId :: String
plusId = "+"
| 29
|
plusId = "+"
| 12
| true
| true
| 0
| 4
| 14
| 13
| 8
| 5
| null | null |
abrim/yesod-dsl
|
YesodDsl/Generator/Esqueleto.hs
|
bsd-2-clause
|
boolToInt :: Bool -> Int
boolToInt True = 1
| 43
|
boolToInt :: Bool -> Int
boolToInt True = 1
| 43
|
boolToInt True = 1
| 18
| false
| true
| 0
| 5
| 8
| 18
| 9
| 9
| null | null |
unisonweb/platform
|
parser-typechecker/src/Unison/UnisonFile.hs
|
mit
|
constructorType ::
Var v => UnisonFile v a -> Reference -> Maybe CT.ConstructorType
constructorType = TL.constructorType . declsToTypeLookup
| 142
|
constructorType ::
Var v => UnisonFile v a -> Reference -> Maybe CT.ConstructorType
constructorType = TL.constructorType . declsToTypeLookup
| 142
|
constructorType = TL.constructorType . declsToTypeLookup
| 56
| false
| true
| 0
| 9
| 19
| 42
| 20
| 22
| null | null |
MichielDerhaeg/stack
|
src/Stack/Types/Package.hs
|
bsd-3-clause
|
-- | Get the c file path.
dotCabalCFilePath :: DotCabalPath -> Maybe (Path Abs File)
dotCabalCFilePath (DotCabalCFilePath fp) = Just fp
| 135
|
dotCabalCFilePath :: DotCabalPath -> Maybe (Path Abs File)
dotCabalCFilePath (DotCabalCFilePath fp) = Just fp
| 109
|
dotCabalCFilePath (DotCabalCFilePath fp) = Just fp
| 50
| true
| true
| 0
| 8
| 20
| 39
| 19
| 20
| null | null |
mainland/dph
|
dph-prim-par/Data/Array/Parallel/Unlifted/Parallel/UPSegd.hs
|
bsd-3-clause
|
foldSegsWithP fElem fSeg segd xs
= dcarry `seq` drs `seq`
runST (do
mrs <- joinDM theGang drs
fixupFold fElem mrs dcarry
US.unsafeFreeze mrs)
where (dcarry,drs)
= unzipD
$ mapD (What "UPSegd.foldSegsWithP/partial") theGang partial
$ zipD (takeDistributed segd)
(splitD theGang balanced xs)
partial (((segd', k), off), as)
= let rs = fSeg segd' as
{-# INLINE [0] n #-}
n | off == 0 = 0
| otherwise = 1
in ((k, US.take n rs), US.drop n rs)
| 596
|
foldSegsWithP fElem fSeg segd xs
= dcarry `seq` drs `seq`
runST (do
mrs <- joinDM theGang drs
fixupFold fElem mrs dcarry
US.unsafeFreeze mrs)
where (dcarry,drs)
= unzipD
$ mapD (What "UPSegd.foldSegsWithP/partial") theGang partial
$ zipD (takeDistributed segd)
(splitD theGang balanced xs)
partial (((segd', k), off), as)
= let rs = fSeg segd' as
{-# INLINE [0] n #-}
n | off == 0 = 0
| otherwise = 1
in ((k, US.take n rs), US.drop n rs)
| 596
|
foldSegsWithP fElem fSeg segd xs
= dcarry `seq` drs `seq`
runST (do
mrs <- joinDM theGang drs
fixupFold fElem mrs dcarry
US.unsafeFreeze mrs)
where (dcarry,drs)
= unzipD
$ mapD (What "UPSegd.foldSegsWithP/partial") theGang partial
$ zipD (takeDistributed segd)
(splitD theGang balanced xs)
partial (((segd', k), off), as)
= let rs = fSeg segd' as
{-# INLINE [0] n #-}
n | off == 0 = 0
| otherwise = 1
in ((k, US.take n rs), US.drop n rs)
| 596
| false
| false
| 6
| 12
| 235
| 216
| 106
| 110
| null | null |
dagit/hs6502
|
src/Emulator/Instructions.hs
|
bsd-3-clause
|
modifyOperand ZeropageX op = do
b <- fetchByteAtPC
x <- getReg rX
let addr = toWord (b + x) -- stay on the zeropage but add x
v <- fetchByteMem addr
v' <- op v
writeByteMem addr v'
| 193
|
modifyOperand ZeropageX op = do
b <- fetchByteAtPC
x <- getReg rX
let addr = toWord (b + x) -- stay on the zeropage but add x
v <- fetchByteMem addr
v' <- op v
writeByteMem addr v'
| 193
|
modifyOperand ZeropageX op = do
b <- fetchByteAtPC
x <- getReg rX
let addr = toWord (b + x) -- stay on the zeropage but add x
v <- fetchByteMem addr
v' <- op v
writeByteMem addr v'
| 193
| false
| false
| 0
| 12
| 50
| 77
| 33
| 44
| null | null |
brendanhay/gogol
|
gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Product.hs
|
mpl-2.0
|
-- | Studio advertiser ID associated with rich media and VPAID creatives.
-- This is a read-only field. Applicable to the following creative types:
-- all RICH_MEDIA, and all VPAID.
creStudioAdvertiserId :: Lens' Creative (Maybe Int64)
creStudioAdvertiserId
= lens _creStudioAdvertiserId
(\ s a -> s{_creStudioAdvertiserId = a})
. mapping _Coerce
| 360
|
creStudioAdvertiserId :: Lens' Creative (Maybe Int64)
creStudioAdvertiserId
= lens _creStudioAdvertiserId
(\ s a -> s{_creStudioAdvertiserId = a})
. mapping _Coerce
| 178
|
creStudioAdvertiserId
= lens _creStudioAdvertiserId
(\ s a -> s{_creStudioAdvertiserId = a})
. mapping _Coerce
| 124
| true
| true
| 2
| 8
| 63
| 61
| 30
| 31
| null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.