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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
neothemachine/monadiccp
|
src/Data/Expr/Data.hs
|
bsd-3-clause
|
compareExpr l (Div a1 b1) (Div a2 b2) = compareExpr l a1 a2 <<>> compareExpr l b1 b2
| 84
|
compareExpr l (Div a1 b1) (Div a2 b2) = compareExpr l a1 a2 <<>> compareExpr l b1 b2
| 84
|
compareExpr l (Div a1 b1) (Div a2 b2) = compareExpr l a1 a2 <<>> compareExpr l b1 b2
| 84
| false
| false
| 1
| 8
| 17
| 50
| 22
| 28
| null | null |
beni55/hermit
|
src/HERMIT/Dictionary/Reasoning.hs
|
bsd-2-clause
|
eqLhsIntroR _ = fail "compound lemmas not supported."
| 53
|
eqLhsIntroR _ = fail "compound lemmas not supported."
| 53
|
eqLhsIntroR _ = fail "compound lemmas not supported."
| 53
| false
| false
| 0
| 4
| 7
| 13
| 5
| 8
| null | null |
tibbe/ghc
|
libraries/base/Data/Data.hs
|
bsd-3-clause
|
nothingConstr :: Constr
nothingConstr = mkConstr maybeDataType "Nothing" [] Prefix
| 82
|
nothingConstr :: Constr
nothingConstr = mkConstr maybeDataType "Nothing" [] Prefix
| 82
|
nothingConstr = mkConstr maybeDataType "Nothing" [] Prefix
| 58
| false
| true
| 0
| 6
| 9
| 28
| 12
| 16
| null | null |
ehlemur/HMeans
|
dist/build/autogen/Paths_HMeans.hs
|
gpl-3.0
|
sysconfdir = "/home/lemur/.cabal/etc"
| 37
|
sysconfdir = "/home/lemur/.cabal/etc"
| 37
|
sysconfdir = "/home/lemur/.cabal/etc"
| 37
| false
| false
| 0
| 4
| 2
| 6
| 3
| 3
| null | null |
yiannist/ganeti
|
src/Ganeti/UDSServer.hs
|
bsd-2-clause
|
logMsg
:: (Show e, J.JSON e, MonadLog m)
=> Handler i m o
-> i -- ^ the received request (used for logging)
-> GenericResult e J.JSValue -- ^ A message to be sent
-> m ()
logMsg handler req (Bad err) =
logWarning $ "Failed to execute request " ++ hInputLogLong handler req ++ ": "
++ show err
| 355
|
logMsg
:: (Show e, J.JSON e, MonadLog m)
=> Handler i m o
-> i -- ^ the received request (used for logging)
-> GenericResult e J.JSValue -- ^ A message to be sent
-> m ()
logMsg handler req (Bad err) =
logWarning $ "Failed to execute request " ++ hInputLogLong handler req ++ ": "
++ show err
| 355
|
logMsg handler req (Bad err) =
logWarning $ "Failed to execute request " ++ hInputLogLong handler req ++ ": "
++ show err
| 138
| false
| true
| 0
| 12
| 122
| 108
| 52
| 56
| null | null |
ekmett/wxHaskell
|
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
|
lgpl-2.1
|
wxLANGUAGE_ENGLISH_DENMARK :: Int
wxLANGUAGE_ENGLISH_DENMARK = 64
| 65
|
wxLANGUAGE_ENGLISH_DENMARK :: Int
wxLANGUAGE_ENGLISH_DENMARK = 64
| 65
|
wxLANGUAGE_ENGLISH_DENMARK = 64
| 31
| false
| true
| 0
| 6
| 5
| 18
| 7
| 11
| null | null |
uduki/hsQt
|
Qtc/ClassTypes/Gui.hs
|
bsd-2-clause
|
withQComboBoxResult :: IO (Ptr (TQComboBox a)) -> IO (QComboBox a)
withQComboBoxResult f
= withObjectResult qtc_QComboBox_getFinalizer f
| 138
|
withQComboBoxResult :: IO (Ptr (TQComboBox a)) -> IO (QComboBox a)
withQComboBoxResult f
= withObjectResult qtc_QComboBox_getFinalizer f
| 138
|
withQComboBoxResult f
= withObjectResult qtc_QComboBox_getFinalizer f
| 71
| false
| true
| 0
| 11
| 17
| 51
| 23
| 28
| null | null |
Numberartificial/workflow
|
haskell-first-principles/haskell-programming-from-first-principles-master/src/Chapter4.hs
|
mit
|
changeMood :: Mood -> Mood
changeMood Blah = Woot
| 49
|
changeMood :: Mood -> Mood
changeMood Blah = Woot
| 49
|
changeMood Blah = Woot
| 22
| false
| true
| 0
| 5
| 8
| 18
| 9
| 9
| null | null |
xpika/mohws
|
src/Network/MoHWS/Server.hs
|
bsd-3-clause
|
topServer :: (Stream.C body) =>
ServerContext.T ext -> [Module.T body] -> Init.T body ext -> (forall a. Unblock a) -> IO ()
topServer st mods initExt unblock =
let startServers =
do ts <- servers st mods
(Util.wait `Exception.catch`
(\e -> case e of
ErrorCall "**restart**" ->
do mapM_ killThread ts
rereadConfig st initExt unblock
_ -> Exception.throw e))
loop =
(do Posix.unblockSignals sigsToBlock
unblock startServers)
`Exception.catch`
(\(Exception.SomeException e) ->
do logError st ("server: " ++ show e)
loop)
in loop
| 763
|
topServer :: (Stream.C body) =>
ServerContext.T ext -> [Module.T body] -> Init.T body ext -> (forall a. Unblock a) -> IO ()
topServer st mods initExt unblock =
let startServers =
do ts <- servers st mods
(Util.wait `Exception.catch`
(\e -> case e of
ErrorCall "**restart**" ->
do mapM_ killThread ts
rereadConfig st initExt unblock
_ -> Exception.throw e))
loop =
(do Posix.unblockSignals sigsToBlock
unblock startServers)
`Exception.catch`
(\(Exception.SomeException e) ->
do logError st ("server: " ++ show e)
loop)
in loop
| 763
|
topServer st mods initExt unblock =
let startServers =
do ts <- servers st mods
(Util.wait `Exception.catch`
(\e -> case e of
ErrorCall "**restart**" ->
do mapM_ killThread ts
rereadConfig st initExt unblock
_ -> Exception.throw e))
loop =
(do Posix.unblockSignals sigsToBlock
unblock startServers)
`Exception.catch`
(\(Exception.SomeException e) ->
do logError st ("server: " ++ show e)
loop)
in loop
| 636
| false
| true
| 0
| 20
| 318
| 239
| 116
| 123
| null | null |
hguenther/smtlib2
|
extras/composite/Language/SMTLib2/Composite/Choice.hs
|
gpl-3.0
|
zipSame _ _ _ = Nothing
| 23
|
zipSame _ _ _ = Nothing
| 23
|
zipSame _ _ _ = Nothing
| 23
| false
| false
| 1
| 5
| 5
| 14
| 5
| 9
| null | null |
apyrgio/ganeti
|
src/Ganeti/Query/Instance.hs
|
bsd-2-clause
|
beParamGetter :: String -- ^ The field we are building the getter for
-> ConfigData -- ^ The configuration object
-> Instance -- ^ The instance configuration object
-> ResultEntry -- ^ The result
beParamGetter field config inst =
case getFilledInstBeParams config inst of
Ok beParams -> dictFieldGetter field $ Just beParams
Bad _ -> rsNoData
-- | Hvparam getter builder: given a field, it returns a FieldConfig
-- getter, that is a function that takes the config and the object and
-- returns the Hvparam field specified when the getter was built.
| 620
|
beParamGetter :: String -- ^ The field we are building the getter for
-> ConfigData -- ^ The configuration object
-> Instance -- ^ The instance configuration object
-> ResultEntry
beParamGetter field config inst =
case getFilledInstBeParams config inst of
Ok beParams -> dictFieldGetter field $ Just beParams
Bad _ -> rsNoData
-- | Hvparam getter builder: given a field, it returns a FieldConfig
-- getter, that is a function that takes the config and the object and
-- returns the Hvparam field specified when the getter was built.
| 603
|
beParamGetter field config inst =
case getFilledInstBeParams config inst of
Ok beParams -> dictFieldGetter field $ Just beParams
Bad _ -> rsNoData
-- | Hvparam getter builder: given a field, it returns a FieldConfig
-- getter, that is a function that takes the config and the object and
-- returns the Hvparam field specified when the getter was built.
| 369
| true
| true
| 0
| 9
| 164
| 74
| 38
| 36
| null | null |
ppseafield/lametetris
|
LameTetris/Timer.hs
|
bsd-3-clause
|
-- -- | Pause timer
-- pause :: Game ()
-- pause = do
-- st <- get -- Grab the game state
-- let time = timer st
-- in put $ st { timer = (time { paused = True }) }
-- -- | Unpause timer
-- unpause :: Game ()
-- unpause = do
-- st <- get -- Grab the game state
-- let time = timer st
-- in put $ st { timer = (time { paused = False }) }
-- | If it's too early to run the game loop again, just
-- delay until it's time
waitUntilNextFrame :: Game ()
waitUntilNextFrame = do
time <- gets timer
now <- liftIO getTicks
let start = startedAt time
td = now - start
minDelta = 1000 `div` gameFPS
when (td < minDelta) $ do
liftIO $ delay (minDelta - td)
now' <- liftIO $ getTicks
time <- gets timer
setTimer $ time {startedAt = now'}
| 788
|
waitUntilNextFrame :: Game ()
waitUntilNextFrame = do
time <- gets timer
now <- liftIO getTicks
let start = startedAt time
td = now - start
minDelta = 1000 `div` gameFPS
when (td < minDelta) $ do
liftIO $ delay (minDelta - td)
now' <- liftIO $ getTicks
time <- gets timer
setTimer $ time {startedAt = now'}
| 342
|
waitUntilNextFrame = do
time <- gets timer
now <- liftIO getTicks
let start = startedAt time
td = now - start
minDelta = 1000 `div` gameFPS
when (td < minDelta) $ do
liftIO $ delay (minDelta - td)
now' <- liftIO $ getTicks
time <- gets timer
setTimer $ time {startedAt = now'}
| 312
| true
| true
| 0
| 13
| 226
| 152
| 80
| 72
| null | null |
allanderek/ipclib
|
size/Sizes.hs
|
gpl-2.0
|
-- Translation of a dynamic model into a (large) pepa model.
-- Here for each process set we must translate into a single
-- component which may act as any of the processes in that set.
createPepaModel :: DynamicModel -> DynamicModel
createPepaModel (DynamicModel rDefs defs system) =
DynamicModel rDefs newDefs system
where
newDefs = traverseSystem [] system
traverseSystem :: [ ProcessDef ] -> DynamicComponent -> [ ProcessDef ]
traverseSystem soFar (IdProcess name) =
getDefs id soFar name
traverseSystem soFar (Cooperation left coop right) =
traverseSystem (traverseSystem soFar left) right
traverseSystem _ _ =
error "invalid component in system definition"
getDefs :: (String -> String) -> [ ProcessDef ] -> String -> [ ProcessDef ]
getDefs rename soFar name
| any (definesName name) soFar = soFar
| otherwise =
case find (definesName name) defs of
Nothing -> error $ "Undefined process: " ++ name
Just (SequentialDef ds) -> (SequentialDef $ map renameSDef ds) : soFar
Just (SetDef _ ds) ->
setDef : (foldl (getDefs newRename) soFar ds)
where
setDef = SequentialDef [ (name, foldr1 ComponentSum tauPrefixes) ]
tauPrefixes = map ((Prefix "tau") . IdProcess) ds
newRename :: String -> String
newRename n
| elem n ds = name
| otherwise = rename n
where
renameSDef :: (String, DynamicComponent) -> (String, DynamicComponent)
renameSDef = second $ renameComponent rename
definesName :: String -> ProcessDef -> Bool
definesName n (SequentialDef ds) = elem n $ map fst ds
definesName n (SetDef n2 _ds) = (n == n2)
renameComponent :: (String -> String) -> DynamicComponent -> DynamicComponent
renameComponent rename (IdProcess ident) =
IdProcess $ rename ident
renameComponent rename (Prefix trans next) =
Prefix trans $ renameComponent rename next
renameComponent rename (ComponentSum left right) =
ComponentSum (renameComponent rename left)
(renameComponent rename right)
| 2,198
|
createPepaModel :: DynamicModel -> DynamicModel
createPepaModel (DynamicModel rDefs defs system) =
DynamicModel rDefs newDefs system
where
newDefs = traverseSystem [] system
traverseSystem :: [ ProcessDef ] -> DynamicComponent -> [ ProcessDef ]
traverseSystem soFar (IdProcess name) =
getDefs id soFar name
traverseSystem soFar (Cooperation left coop right) =
traverseSystem (traverseSystem soFar left) right
traverseSystem _ _ =
error "invalid component in system definition"
getDefs :: (String -> String) -> [ ProcessDef ] -> String -> [ ProcessDef ]
getDefs rename soFar name
| any (definesName name) soFar = soFar
| otherwise =
case find (definesName name) defs of
Nothing -> error $ "Undefined process: " ++ name
Just (SequentialDef ds) -> (SequentialDef $ map renameSDef ds) : soFar
Just (SetDef _ ds) ->
setDef : (foldl (getDefs newRename) soFar ds)
where
setDef = SequentialDef [ (name, foldr1 ComponentSum tauPrefixes) ]
tauPrefixes = map ((Prefix "tau") . IdProcess) ds
newRename :: String -> String
newRename n
| elem n ds = name
| otherwise = rename n
where
renameSDef :: (String, DynamicComponent) -> (String, DynamicComponent)
renameSDef = second $ renameComponent rename
definesName :: String -> ProcessDef -> Bool
definesName n (SequentialDef ds) = elem n $ map fst ds
definesName n (SetDef n2 _ds) = (n == n2)
renameComponent :: (String -> String) -> DynamicComponent -> DynamicComponent
renameComponent rename (IdProcess ident) =
IdProcess $ rename ident
renameComponent rename (Prefix trans next) =
Prefix trans $ renameComponent rename next
renameComponent rename (ComponentSum left right) =
ComponentSum (renameComponent rename left)
(renameComponent rename right)
| 2,012
|
createPepaModel (DynamicModel rDefs defs system) =
DynamicModel rDefs newDefs system
where
newDefs = traverseSystem [] system
traverseSystem :: [ ProcessDef ] -> DynamicComponent -> [ ProcessDef ]
traverseSystem soFar (IdProcess name) =
getDefs id soFar name
traverseSystem soFar (Cooperation left coop right) =
traverseSystem (traverseSystem soFar left) right
traverseSystem _ _ =
error "invalid component in system definition"
getDefs :: (String -> String) -> [ ProcessDef ] -> String -> [ ProcessDef ]
getDefs rename soFar name
| any (definesName name) soFar = soFar
| otherwise =
case find (definesName name) defs of
Nothing -> error $ "Undefined process: " ++ name
Just (SequentialDef ds) -> (SequentialDef $ map renameSDef ds) : soFar
Just (SetDef _ ds) ->
setDef : (foldl (getDefs newRename) soFar ds)
where
setDef = SequentialDef [ (name, foldr1 ComponentSum tauPrefixes) ]
tauPrefixes = map ((Prefix "tau") . IdProcess) ds
newRename :: String -> String
newRename n
| elem n ds = name
| otherwise = rename n
where
renameSDef :: (String, DynamicComponent) -> (String, DynamicComponent)
renameSDef = second $ renameComponent rename
definesName :: String -> ProcessDef -> Bool
definesName n (SequentialDef ds) = elem n $ map fst ds
definesName n (SetDef n2 _ds) = (n == n2)
renameComponent :: (String -> String) -> DynamicComponent -> DynamicComponent
renameComponent rename (IdProcess ident) =
IdProcess $ rename ident
renameComponent rename (Prefix trans next) =
Prefix trans $ renameComponent rename next
renameComponent rename (ComponentSum left right) =
ComponentSum (renameComponent rename left)
(renameComponent rename right)
| 1,964
| true
| true
| 1
| 14
| 612
| 604
| 303
| 301
| null | null |
goldfirere/th-desugar
|
Test/Run.hs
|
bsd-3-clause
|
test_e6b = $(test_expand6 >>= dsExp >>= expand >>= return . expToTH)
| 68
|
test_e6b = $(test_expand6 >>= dsExp >>= expand >>= return . expToTH)
| 68
|
test_e6b = $(test_expand6 >>= dsExp >>= expand >>= return . expToTH)
| 68
| false
| false
| 0
| 11
| 10
| 30
| 14
| 16
| null | null |
spechub/Hets
|
GUI/GraphLogic.hs
|
gpl-2.0
|
updateGraph :: GInfo -> [DGChange] -> IO ()
updateGraph gInfo@(GInfo { libName = ln }) changes = do
ost <- readIORef $ intState gInfo
case i_state ost of
Nothing -> return ()
Just ist -> updateGraphAux gInfo ln changes $ lookupDGraph ln $ i_libEnv ist
| 263
|
updateGraph :: GInfo -> [DGChange] -> IO ()
updateGraph gInfo@(GInfo { libName = ln }) changes = do
ost <- readIORef $ intState gInfo
case i_state ost of
Nothing -> return ()
Just ist -> updateGraphAux gInfo ln changes $ lookupDGraph ln $ i_libEnv ist
| 263
|
updateGraph gInfo@(GInfo { libName = ln }) changes = do
ost <- readIORef $ intState gInfo
case i_state ost of
Nothing -> return ()
Just ist -> updateGraphAux gInfo ln changes $ lookupDGraph ln $ i_libEnv ist
| 219
| false
| true
| 0
| 12
| 56
| 112
| 53
| 59
| null | null |
adamse/haddock
|
haddock-api/src/Haddock/Backends/LaTeX.hs
|
bsd-2-clause
|
ppInstHead :: Bool -> InstHead DocName -> LaTeX
ppInstHead unicode (n, ks, ts, ClassInst ctx) = ppContextNoLocs ctx unicode <+> ppAppNameTypes n ks ts unicode
| 158
|
ppInstHead :: Bool -> InstHead DocName -> LaTeX
ppInstHead unicode (n, ks, ts, ClassInst ctx) = ppContextNoLocs ctx unicode <+> ppAppNameTypes n ks ts unicode
| 158
|
ppInstHead unicode (n, ks, ts, ClassInst ctx) = ppContextNoLocs ctx unicode <+> ppAppNameTypes n ks ts unicode
| 110
| false
| true
| 0
| 10
| 24
| 65
| 31
| 34
| null | null |
tdfirth/lambda
|
src/Lambda/Primitives.hs
|
mit
|
boolBoolBinop :: (MonadError LispError m) => (Bool -> Bool -> Bool) -> [LispVal] -> m LispVal
boolBoolBinop = boolBinop unpackBool
| 130
|
boolBoolBinop :: (MonadError LispError m) => (Bool -> Bool -> Bool) -> [LispVal] -> m LispVal
boolBoolBinop = boolBinop unpackBool
| 130
|
boolBoolBinop = boolBinop unpackBool
| 36
| false
| true
| 0
| 9
| 19
| 50
| 26
| 24
| null | null |
Lysxia/twentyseven
|
src/Rubik/Cube/Cubie/Internal.hs
|
mit
|
-- | Check that the argument is a vector of senary (6) values of size 8 and
-- wrap it.
--
-- In a 'solvable' Rubik's cube,
-- only ternary values are possible;
-- i.e., all elements must be between 0 and 2.
-- Their sum must also be a multiple of 3.
--
-- == Orientation encoding
--
-- Corner orientations are permutations of 3 facelets.
--
-- They are mapped to integers in @[0 .. 5]@
-- such that @[0, 1, 2]@ are rotations (even permutations)
-- and @[3, 4, 5]@ are transpositions (although impossible in a Rubik's cube).
--
-- - 0. identity
-- - 1. counter-clockwise
-- - 2. clockwise
-- - 3. left facelet fixed
-- - 4. right facelet fixed
-- - 5. top (reference) facelet fixed
--
cornerOrien :: Vector Int -> Maybe CornerOrien
cornerOrien v = do
guard $ U.length v == numCorners
&& U.all (\o -> 0 <= o && o < 6) v
return (CornerOrien v)
| 852
|
cornerOrien :: Vector Int -> Maybe CornerOrien
cornerOrien v = do
guard $ U.length v == numCorners
&& U.all (\o -> 0 <= o && o < 6) v
return (CornerOrien v)
| 167
|
cornerOrien v = do
guard $ U.length v == numCorners
&& U.all (\o -> 0 <= o && o < 6) v
return (CornerOrien v)
| 120
| true
| true
| 0
| 13
| 176
| 106
| 62
| 44
| null | null |
akiochiai/haxr-wai
|
Network/XmlRpc/Wai.hs
|
bsd-3-clause
|
handlerSink :: [(String, XR.XmlRpcMethod)] -> C.Sink ByteString (C.ResourceT IO) W.Response
handlerSink ms = C.sinkState mempty push close
where
push builder input = return $ C.StateProcessing (builder <> BL.fromByteString input)
close :: BL.Builder -> C.ResourceT IO W.Response
close builder = do let bs = BL.toByteString builder
ebody <- liftIO $ runErrorT $ dispatch $ BC.unpack bs
case ebody of
Left e -> do liftIO $ putStrLn e
return $ W.responseLBS internalServerError500 [] $ LBC.pack ""
Right body -> do liftIO $ LBC.putStrLn body
return $ W.responseLBS ok200 [] body
dispatch :: String -> XRI.Err IO LBC.ByteString
dispatch req = do call <- XRI.parseCall req
result <- XR.methods ms call
let res = XRI.renderResponse result
return res
| 1,087
|
handlerSink :: [(String, XR.XmlRpcMethod)] -> C.Sink ByteString (C.ResourceT IO) W.Response
handlerSink ms = C.sinkState mempty push close
where
push builder input = return $ C.StateProcessing (builder <> BL.fromByteString input)
close :: BL.Builder -> C.ResourceT IO W.Response
close builder = do let bs = BL.toByteString builder
ebody <- liftIO $ runErrorT $ dispatch $ BC.unpack bs
case ebody of
Left e -> do liftIO $ putStrLn e
return $ W.responseLBS internalServerError500 [] $ LBC.pack ""
Right body -> do liftIO $ LBC.putStrLn body
return $ W.responseLBS ok200 [] body
dispatch :: String -> XRI.Err IO LBC.ByteString
dispatch req = do call <- XRI.parseCall req
result <- XR.methods ms call
let res = XRI.renderResponse result
return res
| 1,087
|
handlerSink ms = C.sinkState mempty push close
where
push builder input = return $ C.StateProcessing (builder <> BL.fromByteString input)
close :: BL.Builder -> C.ResourceT IO W.Response
close builder = do let bs = BL.toByteString builder
ebody <- liftIO $ runErrorT $ dispatch $ BC.unpack bs
case ebody of
Left e -> do liftIO $ putStrLn e
return $ W.responseLBS internalServerError500 [] $ LBC.pack ""
Right body -> do liftIO $ LBC.putStrLn body
return $ W.responseLBS ok200 [] body
dispatch :: String -> XRI.Err IO LBC.ByteString
dispatch req = do call <- XRI.parseCall req
result <- XR.methods ms call
let res = XRI.renderResponse result
return res
| 995
| false
| true
| 28
| 10
| 458
| 261
| 138
| 123
| null | null |
solvery/lang-features
|
haskell/function_1.hs
|
gpl-2.0
|
func1 :: Int -> Int
func1 x = x + x
| 35
|
func1 :: Int -> Int
func1 x = x + x
| 35
|
func1 x = x + x
| 15
| false
| true
| 0
| 5
| 10
| 22
| 11
| 11
| null | null |
keera-studios/hsQt
|
Qtc/ClassTypes/Gui.hs
|
bsd-2-clause
|
qCast_QAbstractProxyModel :: Object a -> IO (QAbstractProxyModel ())
qCast_QAbstractProxyModel _qobj
= return (objectCast _qobj)
| 130
|
qCast_QAbstractProxyModel :: Object a -> IO (QAbstractProxyModel ())
qCast_QAbstractProxyModel _qobj
= return (objectCast _qobj)
| 130
|
qCast_QAbstractProxyModel _qobj
= return (objectCast _qobj)
| 61
| false
| true
| 0
| 9
| 15
| 41
| 19
| 22
| null | null |
shicks/shsh
|
Language/Sh/Map.hs
|
bsd-3-clause
|
(><>) :: (Monad m,Functor m) => (a -> m [b]) -> [a] -> m [b]
(><>) = concatMapM
| 79
|
(><>) :: (Monad m,Functor m) => (a -> m [b]) -> [a] -> m [b]
(><>) = concatMapM
| 79
|
(><>) = concatMapM
| 18
| false
| true
| 0
| 10
| 17
| 60
| 34
| 26
| null | null |
erahhal/dev-environment-setup
|
xmonad/xmonadctl.hs
|
mit
|
parse :: Bool -> String -> [String] -> IO ()
parse input addr args = case args of
["--"] | input -> repl addr
| otherwise -> return ()
("--":xs) -> sendAll addr xs
("-a":a:xs) -> parse input a xs
("-h":_) -> showHelp
("--help":_) -> showHelp
("-?":_) -> showHelp
(a@('-':_):_) -> hPutStrLn stderr ("Unknown option " ++ a)
(x:xs) -> sendCommand addr x >> parse False addr xs
[] | input -> repl addr
| otherwise -> return ()
| 521
|
parse :: Bool -> String -> [String] -> IO ()
parse input addr args = case args of
["--"] | input -> repl addr
| otherwise -> return ()
("--":xs) -> sendAll addr xs
("-a":a:xs) -> parse input a xs
("-h":_) -> showHelp
("--help":_) -> showHelp
("-?":_) -> showHelp
(a@('-':_):_) -> hPutStrLn stderr ("Unknown option " ++ a)
(x:xs) -> sendCommand addr x >> parse False addr xs
[] | input -> repl addr
| otherwise -> return ()
| 521
|
parse input addr args = case args of
["--"] | input -> repl addr
| otherwise -> return ()
("--":xs) -> sendAll addr xs
("-a":a:xs) -> parse input a xs
("-h":_) -> showHelp
("--help":_) -> showHelp
("-?":_) -> showHelp
(a@('-':_):_) -> hPutStrLn stderr ("Unknown option " ++ a)
(x:xs) -> sendCommand addr x >> parse False addr xs
[] | input -> repl addr
| otherwise -> return ()
| 476
| false
| true
| 0
| 12
| 177
| 254
| 124
| 130
| null | null |
brendanhay/gogol
|
gogol-partners/gen/Network/Google/Partners/Types/Product.hs
|
mpl-2.0
|
-- | (localized) Get Y amount for that country\'s offer.
coiGetYAmount :: Lens' CountryOfferInfo (Maybe Text)
coiGetYAmount
= lens _coiGetYAmount
(\ s a -> s{_coiGetYAmount = a})
| 186
|
coiGetYAmount :: Lens' CountryOfferInfo (Maybe Text)
coiGetYAmount
= lens _coiGetYAmount
(\ s a -> s{_coiGetYAmount = a})
| 129
|
coiGetYAmount
= lens _coiGetYAmount
(\ s a -> s{_coiGetYAmount = a})
| 76
| true
| true
| 0
| 9
| 34
| 48
| 25
| 23
| null | null |
siddhanathan/ghc
|
compiler/utils/Outputable.hs
|
bsd-3-clause
|
neverQualifyNames :: QueryQualifyName
neverQualifyNames _ _ = NameUnqual
| 72
|
neverQualifyNames :: QueryQualifyName
neverQualifyNames _ _ = NameUnqual
| 72
|
neverQualifyNames _ _ = NameUnqual
| 34
| false
| true
| 0
| 5
| 7
| 16
| 8
| 8
| null | null |
Saulzar/Ants
|
Ant/Square.hs
|
bsd-3-clause
|
seenFlag = 2
| 15
|
seenFlag = 2
| 15
|
seenFlag = 2
| 15
| false
| false
| 0
| 4
| 5
| 6
| 3
| 3
| null | null |
raboof/xmobar
|
src/Xmobar.hs
|
bsd-3-clause
|
drawInWin :: Rectangle -> [[(String, String)]] -> X ()
drawInWin (Rectangle _ _ wid ht) ~[left,center,right] = do
r <- ask
let (c,d ) = (config &&& display) r
(w,fs) = (window &&& fontS ) r
strLn = io . mapM (\(s,cl) -> textWidth d fs s >>= \tw -> return (s,cl,fi tw))
withColors d [bgColor c, borderColor c] $ \[bgcolor, bdcolor] -> do
gc <- io $ createGC d w
-- create a pixmap to write to and fill it with a rectangle
p <- io $ createPixmap d w wid ht
(defaultDepthOfScreen (defaultScreenOfDisplay d))
-- the fgcolor of the rectangle will be the bgcolor of the window
io $ setForeground d gc bgcolor
io $ fillRectangle d p gc 0 0 wid ht
-- write to the pixmap the new string
printStrings p gc fs 1 L =<< strLn left
printStrings p gc fs 1 R =<< strLn right
printStrings p gc fs 1 C =<< strLn center
-- draw 1 pixel border if requested
io $ drawBorder (border c) d p gc bdcolor wid ht
-- copy the pixmap with the new string to the window
io $ copyArea d p w gc 0 0 wid ht 0 0
-- free up everything (we do not want to leak memory!)
io $ freeGC d gc
io $ freePixmap d p
-- resync
io $ sync d True
-- | An easy way to print the stuff we need to print
| 1,267
|
drawInWin :: Rectangle -> [[(String, String)]] -> X ()
drawInWin (Rectangle _ _ wid ht) ~[left,center,right] = do
r <- ask
let (c,d ) = (config &&& display) r
(w,fs) = (window &&& fontS ) r
strLn = io . mapM (\(s,cl) -> textWidth d fs s >>= \tw -> return (s,cl,fi tw))
withColors d [bgColor c, borderColor c] $ \[bgcolor, bdcolor] -> do
gc <- io $ createGC d w
-- create a pixmap to write to and fill it with a rectangle
p <- io $ createPixmap d w wid ht
(defaultDepthOfScreen (defaultScreenOfDisplay d))
-- the fgcolor of the rectangle will be the bgcolor of the window
io $ setForeground d gc bgcolor
io $ fillRectangle d p gc 0 0 wid ht
-- write to the pixmap the new string
printStrings p gc fs 1 L =<< strLn left
printStrings p gc fs 1 R =<< strLn right
printStrings p gc fs 1 C =<< strLn center
-- draw 1 pixel border if requested
io $ drawBorder (border c) d p gc bdcolor wid ht
-- copy the pixmap with the new string to the window
io $ copyArea d p w gc 0 0 wid ht 0 0
-- free up everything (we do not want to leak memory!)
io $ freeGC d gc
io $ freePixmap d p
-- resync
io $ sync d True
-- | An easy way to print the stuff we need to print
| 1,267
|
drawInWin (Rectangle _ _ wid ht) ~[left,center,right] = do
r <- ask
let (c,d ) = (config &&& display) r
(w,fs) = (window &&& fontS ) r
strLn = io . mapM (\(s,cl) -> textWidth d fs s >>= \tw -> return (s,cl,fi tw))
withColors d [bgColor c, borderColor c] $ \[bgcolor, bdcolor] -> do
gc <- io $ createGC d w
-- create a pixmap to write to and fill it with a rectangle
p <- io $ createPixmap d w wid ht
(defaultDepthOfScreen (defaultScreenOfDisplay d))
-- the fgcolor of the rectangle will be the bgcolor of the window
io $ setForeground d gc bgcolor
io $ fillRectangle d p gc 0 0 wid ht
-- write to the pixmap the new string
printStrings p gc fs 1 L =<< strLn left
printStrings p gc fs 1 R =<< strLn right
printStrings p gc fs 1 C =<< strLn center
-- draw 1 pixel border if requested
io $ drawBorder (border c) d p gc bdcolor wid ht
-- copy the pixmap with the new string to the window
io $ copyArea d p w gc 0 0 wid ht 0 0
-- free up everything (we do not want to leak memory!)
io $ freeGC d gc
io $ freePixmap d p
-- resync
io $ sync d True
-- | An easy way to print the stuff we need to print
| 1,212
| false
| true
| 0
| 18
| 361
| 459
| 226
| 233
| null | null |
michalkonecny/aern
|
aern-real/src/Numeric/AERN/RealArithmetic/RefinementOrderRounding/MixedFieldOps.hs
|
bsd-3-clause
|
testsInOutMixedFieldOps (name, sample) (nameN, sampleN) area =
testGroup (name ++ " with " ++ nameN ++ ": mixed in/out rounded ops") $
[
testProperty "addition" (area, propMixedAddEqualsConvert sample sampleN)
,
testProperty "multiplication" (area, propMixedMultEqualsConvert sample sampleN)
,
testProperty "division" (area, propMixedDivEqualsConvert sample sampleN)
]
| 440
|
testsInOutMixedFieldOps (name, sample) (nameN, sampleN) area =
testGroup (name ++ " with " ++ nameN ++ ": mixed in/out rounded ops") $
[
testProperty "addition" (area, propMixedAddEqualsConvert sample sampleN)
,
testProperty "multiplication" (area, propMixedMultEqualsConvert sample sampleN)
,
testProperty "division" (area, propMixedDivEqualsConvert sample sampleN)
]
| 440
|
testsInOutMixedFieldOps (name, sample) (nameN, sampleN) area =
testGroup (name ++ " with " ++ nameN ++ ": mixed in/out rounded ops") $
[
testProperty "addition" (area, propMixedAddEqualsConvert sample sampleN)
,
testProperty "multiplication" (area, propMixedMultEqualsConvert sample sampleN)
,
testProperty "division" (area, propMixedDivEqualsConvert sample sampleN)
]
| 440
| false
| false
| 0
| 10
| 115
| 104
| 55
| 49
| null | null |
robbertkrebbers/fewdigits
|
Data/Real/CReal.hs
|
bsd-2-clause
|
integerInterval f = Interval (i-1, i+1)
where
i = fromInteger $ around f
| 75
|
integerInterval f = Interval (i-1, i+1)
where
i = fromInteger $ around f
| 75
|
integerInterval f = Interval (i-1, i+1)
where
i = fromInteger $ around f
| 75
| false
| false
| 0
| 7
| 15
| 41
| 20
| 21
| null | null |
Pochoir/Pochoir
|
src/PUtils.hs
|
gpl-3.0
|
updatePRange pL@(p:ps) parserState =
parserState { pRange = foldr pMapInsert (pRange parserState) pL }
| 106
|
updatePRange pL@(p:ps) parserState =
parserState { pRange = foldr pMapInsert (pRange parserState) pL }
| 106
|
updatePRange pL@(p:ps) parserState =
parserState { pRange = foldr pMapInsert (pRange parserState) pL }
| 106
| false
| false
| 0
| 10
| 17
| 49
| 23
| 26
| null | null |
CIFASIS/wavy
|
Sound/Wav/Assemble.hs
|
bsd-3-clause
|
-- TODO expose this file so that people can modify it before it is written to the
-- filesystem
toRiffFile :: WaveFile -> RiffFile
toRiffFile waveFile = RiffFile
{ riffFileType = RIFF
, riffFileFormatType = waveHeader
, riffFileChildren = children
}
where
children = catMaybes
[ Just formatChunk
-- TODO the ordering of these chunks should be configurable
, infoChunk
, Just dataChunk
-- TODO we discard all other chunks, we should include them in here
]
formatChunk :: RiffChunk
formatChunk = RiffChunkChild
{ riffChunkId = waveFormatHeader
, riffData = runPut . putWaveFormat . waveFormat $ waveFile
}
infoChunk :: Maybe RiffChunk
infoChunk = (wrapInfoList . waveInfoToRiffChunks) <$> waveInfo waveFile
where
wrapInfoList contents = RiffChunkParent
{ riffFormTypeInfo = waveInfoListType
, riffChunkChildren = contents
}
dataChunk :: RiffChunk
dataChunk = RiffChunkChild
{ riffChunkId = waveDataHeader
, riffData = waveData waveFile
}
| 1,171
|
toRiffFile :: WaveFile -> RiffFile
toRiffFile waveFile = RiffFile
{ riffFileType = RIFF
, riffFileFormatType = waveHeader
, riffFileChildren = children
}
where
children = catMaybes
[ Just formatChunk
-- TODO the ordering of these chunks should be configurable
, infoChunk
, Just dataChunk
-- TODO we discard all other chunks, we should include them in here
]
formatChunk :: RiffChunk
formatChunk = RiffChunkChild
{ riffChunkId = waveFormatHeader
, riffData = runPut . putWaveFormat . waveFormat $ waveFile
}
infoChunk :: Maybe RiffChunk
infoChunk = (wrapInfoList . waveInfoToRiffChunks) <$> waveInfo waveFile
where
wrapInfoList contents = RiffChunkParent
{ riffFormTypeInfo = waveInfoListType
, riffChunkChildren = contents
}
dataChunk :: RiffChunk
dataChunk = RiffChunkChild
{ riffChunkId = waveDataHeader
, riffData = waveData waveFile
}
| 1,075
|
toRiffFile waveFile = RiffFile
{ riffFileType = RIFF
, riffFileFormatType = waveHeader
, riffFileChildren = children
}
where
children = catMaybes
[ Just formatChunk
-- TODO the ordering of these chunks should be configurable
, infoChunk
, Just dataChunk
-- TODO we discard all other chunks, we should include them in here
]
formatChunk :: RiffChunk
formatChunk = RiffChunkChild
{ riffChunkId = waveFormatHeader
, riffData = runPut . putWaveFormat . waveFormat $ waveFile
}
infoChunk :: Maybe RiffChunk
infoChunk = (wrapInfoList . waveInfoToRiffChunks) <$> waveInfo waveFile
where
wrapInfoList contents = RiffChunkParent
{ riffFormTypeInfo = waveInfoListType
, riffChunkChildren = contents
}
dataChunk :: RiffChunk
dataChunk = RiffChunkChild
{ riffChunkId = waveDataHeader
, riffData = waveData waveFile
}
| 1,040
| true
| true
| 0
| 11
| 375
| 181
| 104
| 77
| null | null |
AlexeyRaga/eta
|
compiler/ETA/Prelude/PrelNames.hs
|
bsd-3-clause
|
returnM_RDR = nameRdrName returnMName
| 49
|
returnM_RDR = nameRdrName returnMName
| 49
|
returnM_RDR = nameRdrName returnMName
| 49
| false
| false
| 0
| 5
| 15
| 9
| 4
| 5
| null | null |
ewestern/geos
|
src/Data/Geometry/Geos/Geometry.hs
|
mit
|
-- | the same as `withSomeGeometry` with its arguments reversed.
mapSomeGeometry :: (forall a . Geometry a -> b) -> Some Geometry -> b
mapSomeGeometry f (Some p) = f p
| 167
|
mapSomeGeometry :: (forall a . Geometry a -> b) -> Some Geometry -> b
mapSomeGeometry f (Some p) = f p
| 102
|
mapSomeGeometry f (Some p) = f p
| 32
| true
| true
| 0
| 9
| 30
| 57
| 27
| 30
| null | null |
mettekou/ghc
|
compiler/basicTypes/BasicTypes.hs
|
bsd-3-clause
|
-- | Add two 'IntWithInf's
plusWithInf :: IntWithInf -> IntWithInf -> IntWithInf
plusWithInf Infinity _ = Infinity
| 121
|
plusWithInf :: IntWithInf -> IntWithInf -> IntWithInf
plusWithInf Infinity _ = Infinity
| 94
|
plusWithInf Infinity _ = Infinity
| 40
| true
| true
| 0
| 6
| 23
| 30
| 14
| 16
| null | null |
diku-dk/futhark
|
src/Futhark/Construct.hs
|
isc
|
letInPlace ::
MonadBuilder m =>
String ->
VName ->
Slice SubExp ->
Exp (Rep m) ->
m VName
letInPlace desc src slice e = do
tmp <- letSubExp (desc ++ "_tmp") e
letExp desc $ BasicOp $ Update Unsafe src slice tmp
| 226
|
letInPlace ::
MonadBuilder m =>
String ->
VName ->
Slice SubExp ->
Exp (Rep m) ->
m VName
letInPlace desc src slice e = do
tmp <- letSubExp (desc ++ "_tmp") e
letExp desc $ BasicOp $ Update Unsafe src slice tmp
| 226
|
letInPlace desc src slice e = do
tmp <- letSubExp (desc ++ "_tmp") e
letExp desc $ BasicOp $ Update Unsafe src slice tmp
| 124
| false
| true
| 0
| 12
| 57
| 100
| 46
| 54
| null | null |
Heather/stack
|
src/Stack/Types/Config.hs
|
bsd-3-clause
|
configMonoidRebuildGhcOptionsName :: Text
configMonoidRebuildGhcOptionsName = "rebuild-ghc-options"
| 99
|
configMonoidRebuildGhcOptionsName :: Text
configMonoidRebuildGhcOptionsName = "rebuild-ghc-options"
| 99
|
configMonoidRebuildGhcOptionsName = "rebuild-ghc-options"
| 57
| false
| true
| 0
| 4
| 5
| 11
| 6
| 5
| null | null |
olsner/ghc
|
libraries/base/Data/Functor/Classes.hs
|
bsd-3-clause
|
-- | Lift the standard 'readPrec' and 'readListPrec' functions through the
-- type constructor.
--
-- @since 4.10.0.0
readPrec1 :: (Read1 f, Read a) => ReadPrec (f a)
readPrec1 = liftReadPrec readPrec readListPrec
| 213
|
readPrec1 :: (Read1 f, Read a) => ReadPrec (f a)
readPrec1 = liftReadPrec readPrec readListPrec
| 95
|
readPrec1 = liftReadPrec readPrec readListPrec
| 46
| true
| true
| 0
| 8
| 32
| 44
| 24
| 20
| null | null |
ekr/tamarin-prover
|
lib/theory/src/Theory/Model/Formula.hs
|
gpl-3.0
|
(.<=>.) = Conn Iff
| 18
|
(.<=>.) = Conn Iff
| 18
|
(.<=>.) = Conn Iff
| 18
| false
| false
| 1
| 5
| 3
| 15
| 6
| 9
| null | null |
Fuuzetsu/haddock
|
haddock-library/src/Documentation/Haddock/Types.hs
|
bsd-2-clause
|
overDoc :: (DocH a b -> DocH c d) -> MetaDoc a b -> MetaDoc c d
overDoc f d = d { _doc = f $ _doc d }
| 101
|
overDoc :: (DocH a b -> DocH c d) -> MetaDoc a b -> MetaDoc c d
overDoc f d = d { _doc = f $ _doc d }
| 101
|
overDoc f d = d { _doc = f $ _doc d }
| 37
| false
| true
| 0
| 8
| 29
| 66
| 32
| 34
| null | null |
hbrouwer/pdrt-sandbox
|
src/Data/PDRS/Structure.hs
|
apache-2.0
|
---------------------------------------------------------------------------
-- | Returns all the labels in a 'PDRS'.
---------------------------------------------------------------------------
pdrsLabels :: PDRS -> [PVar]
pdrsLabels (LambdaPDRS _) = []
| 252
|
pdrsLabels :: PDRS -> [PVar]
pdrsLabels (LambdaPDRS _) = []
| 59
|
pdrsLabels (LambdaPDRS _) = []
| 30
| true
| true
| 0
| 7
| 20
| 32
| 18
| 14
| null | null |
goldfirere/glambda
|
src/Language/Glambda/Repl.hs
|
bsd-3-clause
|
reportErrors :: Reportable a => GlamE a -> Glam ()
reportErrors thing_inside = do
result <- runGlamE thing_inside
new_globals <- case result of
Left err -> printLine err >> get
Right x -> report x
put new_globals
| 227
|
reportErrors :: Reportable a => GlamE a -> Glam ()
reportErrors thing_inside = do
result <- runGlamE thing_inside
new_globals <- case result of
Left err -> printLine err >> get
Right x -> report x
put new_globals
| 227
|
reportErrors thing_inside = do
result <- runGlamE thing_inside
new_globals <- case result of
Left err -> printLine err >> get
Right x -> report x
put new_globals
| 176
| false
| true
| 0
| 12
| 51
| 88
| 38
| 50
| null | null |
shouya/poi
|
src/Deploy.hs
|
gpl-3.0
|
readConfPathSh :: Text -> Text -> Sh FilePath
readConfPathSh a b = fromText <$> readConfSh a b
| 94
|
readConfPathSh :: Text -> Text -> Sh FilePath
readConfPathSh a b = fromText <$> readConfSh a b
| 94
|
readConfPathSh a b = fromText <$> readConfSh a b
| 48
| false
| true
| 0
| 7
| 16
| 36
| 17
| 19
| null | null |
gridaphobe/ghc
|
compiler/typecheck/TcBinds.hs
|
bsd-3-clause
|
tcTySigs :: [LSig Name] -> TcM ([TcId], TcSigFun)
tcTySigs hs_sigs
= checkNoErrs $ -- See Note [Fail eagerly on bad signatures]
do { ty_sigs_s <- mapAndRecoverM tcTySig hs_sigs
; let ty_sigs = concat ty_sigs_s
poly_ids = mapMaybe completeSigPolyId_maybe ty_sigs
-- The returned [TcId] are the ones for which we have
-- a complete type signature.
-- See Note [Complete and partial type signatures]
env = mkNameEnv [(tcSigInfoName sig, sig) | sig <- ty_sigs]
; return (poly_ids, lookupNameEnv env) }
| 618
|
tcTySigs :: [LSig Name] -> TcM ([TcId], TcSigFun)
tcTySigs hs_sigs
= checkNoErrs $ -- See Note [Fail eagerly on bad signatures]
do { ty_sigs_s <- mapAndRecoverM tcTySig hs_sigs
; let ty_sigs = concat ty_sigs_s
poly_ids = mapMaybe completeSigPolyId_maybe ty_sigs
-- The returned [TcId] are the ones for which we have
-- a complete type signature.
-- See Note [Complete and partial type signatures]
env = mkNameEnv [(tcSigInfoName sig, sig) | sig <- ty_sigs]
; return (poly_ids, lookupNameEnv env) }
| 618
|
tcTySigs hs_sigs
= checkNoErrs $ -- See Note [Fail eagerly on bad signatures]
do { ty_sigs_s <- mapAndRecoverM tcTySig hs_sigs
; let ty_sigs = concat ty_sigs_s
poly_ids = mapMaybe completeSigPolyId_maybe ty_sigs
-- The returned [TcId] are the ones for which we have
-- a complete type signature.
-- See Note [Complete and partial type signatures]
env = mkNameEnv [(tcSigInfoName sig, sig) | sig <- ty_sigs]
; return (poly_ids, lookupNameEnv env) }
| 568
| false
| true
| 0
| 15
| 199
| 130
| 67
| 63
| null | null |
luqui/collada
|
Graphics/Formats/Collada/Objects.hs
|
bsd-3-clause
|
rawNode :: LA.LA X.XmlTree Node
rawNode = uncurry Node ^<< (child matrix `X.withDefault` identityMatrix) &&& (id .< child nodeInstance) <<< X.hasName "node"
| 156
|
rawNode :: LA.LA X.XmlTree Node
rawNode = uncurry Node ^<< (child matrix `X.withDefault` identityMatrix) &&& (id .< child nodeInstance) <<< X.hasName "node"
| 156
|
rawNode = uncurry Node ^<< (child matrix `X.withDefault` identityMatrix) &&& (id .< child nodeInstance) <<< X.hasName "node"
| 124
| false
| true
| 0
| 10
| 21
| 64
| 32
| 32
| null | null |
kojiromike/Idris-dev
|
src/Idris/AbsSyntaxTree.hs
|
bsd-3-clause
|
mapPTermFC f g (PWithApp fc t arg) = PWithApp (f fc) (mapPTermFC f g t) (mapPTermFC f g arg)
| 103
|
mapPTermFC f g (PWithApp fc t arg) = PWithApp (f fc) (mapPTermFC f g t) (mapPTermFC f g arg)
| 103
|
mapPTermFC f g (PWithApp fc t arg) = PWithApp (f fc) (mapPTermFC f g t) (mapPTermFC f g arg)
| 103
| false
| false
| 0
| 7
| 29
| 59
| 27
| 32
| null | null |
vitiaaap29/fcm1
|
dist/build/autogen/Paths_fcm1.hs
|
bsd-3-clause
|
libexecdir = "C:\\Users\\vitek\\AppData\\Roaming\\cabal\\fcm1-0.1.0.0-DEMJej5TEBq5nNaGFJ4Sml"
| 93
|
libexecdir = "C:\\Users\\vitek\\AppData\\Roaming\\cabal\\fcm1-0.1.0.0-DEMJej5TEBq5nNaGFJ4Sml"
| 93
|
libexecdir = "C:\\Users\\vitek\\AppData\\Roaming\\cabal\\fcm1-0.1.0.0-DEMJej5TEBq5nNaGFJ4Sml"
| 93
| false
| false
| 0
| 4
| 2
| 6
| 3
| 3
| null | null |
abakst/Zoepis
|
Zoepis/ZObject.hs
|
gpl-3.0
|
zLoadObjectFile :: String -> Bool -> IO ZObject
zLoadObjectFile objfile unit = withCString objfile $ \str -> do
ptr <- glmReadOBJ str
when unit $ glmUnitize ptr >> return ()
lst <- glmList ptr 22
return $ ZObject (DisplayList lst)
| 342
|
zLoadObjectFile :: String -> Bool -> IO ZObject
zLoadObjectFile objfile unit = withCString objfile $ \str -> do
ptr <- glmReadOBJ str
when unit $ glmUnitize ptr >> return ()
lst <- glmList ptr 22
return $ ZObject (DisplayList lst)
| 342
|
zLoadObjectFile objfile unit = withCString objfile $ \str -> do
ptr <- glmReadOBJ str
when unit $ glmUnitize ptr >> return ()
lst <- glmList ptr 22
return $ ZObject (DisplayList lst)
| 294
| false
| true
| 0
| 12
| 151
| 99
| 44
| 55
| null | null |
nomeata/ghc
|
compiler/utils/Encoding.hs
|
bsd-3-clause
|
decode_upper, decode_lower :: Char -> Char
decode_upper 'L' = '('
| 66
|
decode_upper, decode_lower :: Char -> Char
decode_upper 'L' = '('
| 65
|
decode_upper 'L' = '('
| 22
| false
| true
| 0
| 5
| 10
| 20
| 11
| 9
| null | null |
rahulaaj/ML-Library
|
src/Linear/Linear.hs
|
gpl-3.0
|
(mx,my)=unsafePerformIO $ readData "linearRegression.txt"
| 57
|
(mx,my)=unsafePerformIO $ readData "linearRegression.txt"
| 57
|
(mx,my)=unsafePerformIO $ readData "linearRegression.txt"
| 57
| false
| false
| 0
| 6
| 3
| 20
| 10
| 10
| null | null |
mumuki/mulang
|
src/Language/Mulang/Parsers/C.hs
|
gpl-3.0
|
muTypeSpecifier (CTypeDef id _) = Just $ muIdent id
| 51
|
muTypeSpecifier (CTypeDef id _) = Just $ muIdent id
| 51
|
muTypeSpecifier (CTypeDef id _) = Just $ muIdent id
| 51
| false
| false
| 0
| 7
| 8
| 24
| 11
| 13
| null | null |
ku-fpg/blank-canvas
|
wiki-suite/Line_Join.hs
|
bsd-3-clause
|
-- (578,200)
main :: IO ()
main = blankCanvas 3000 $ \ context -> do
send context $ do
lineWidth 25;
-- miter line join (left)
beginPath();
moveTo(99, 150);
lineTo(149, 50);
lineTo(199, 150);
lineJoin "miter";
stroke();
-- round line join (middle)
beginPath();
moveTo(239, 150);
lineTo(289, 50);
lineTo(339, 150);
lineJoin "round";
stroke();
-- bevel line join (right)
beginPath();
moveTo(379, 150);
lineTo(429, 50);
lineTo(479, 150);
lineJoin "bevel";
stroke();
wiki $ snapShot context "images/Line_Join.png"
wiki $ close context
| 728
|
main :: IO ()
main = blankCanvas 3000 $ \ context -> do
send context $ do
lineWidth 25;
-- miter line join (left)
beginPath();
moveTo(99, 150);
lineTo(149, 50);
lineTo(199, 150);
lineJoin "miter";
stroke();
-- round line join (middle)
beginPath();
moveTo(239, 150);
lineTo(289, 50);
lineTo(339, 150);
lineJoin "round";
stroke();
-- bevel line join (right)
beginPath();
moveTo(379, 150);
lineTo(429, 50);
lineTo(479, 150);
lineJoin "bevel";
stroke();
wiki $ snapShot context "images/Line_Join.png"
wiki $ close context
| 714
|
main = blankCanvas 3000 $ \ context -> do
send context $ do
lineWidth 25;
-- miter line join (left)
beginPath();
moveTo(99, 150);
lineTo(149, 50);
lineTo(199, 150);
lineJoin "miter";
stroke();
-- round line join (middle)
beginPath();
moveTo(239, 150);
lineTo(289, 50);
lineTo(339, 150);
lineJoin "round";
stroke();
-- bevel line join (right)
beginPath();
moveTo(379, 150);
lineTo(429, 50);
lineTo(479, 150);
lineJoin "bevel";
stroke();
wiki $ snapShot context "images/Line_Join.png"
wiki $ close context
| 700
| true
| true
| 0
| 13
| 272
| 263
| 130
| 133
| null | null |
enolan/Idris-dev
|
src/Idris/Reflection.hs
|
bsd-3-clause
|
reifyErasure tm = fail $ "Can't reify " ++ show tm ++ " as erasure info."
| 73
|
reifyErasure tm = fail $ "Can't reify " ++ show tm ++ " as erasure info."
| 73
|
reifyErasure tm = fail $ "Can't reify " ++ show tm ++ " as erasure info."
| 73
| false
| false
| 1
| 7
| 15
| 28
| 11
| 17
| null | null |
iliastsi/gac
|
src/basicTypes/UnTypedAst.hs
|
mit
|
dumpUStmt ind (UStmtWhile lucond lustmt) =
indent ind ++ "while(" ++ dumpUCond (unLoc lucond) ++
")" ++ dumpComp (ind+1) "" (unLoc lustmt)
| 150
|
dumpUStmt ind (UStmtWhile lucond lustmt) =
indent ind ++ "while(" ++ dumpUCond (unLoc lucond) ++
")" ++ dumpComp (ind+1) "" (unLoc lustmt)
| 150
|
dumpUStmt ind (UStmtWhile lucond lustmt) =
indent ind ++ "while(" ++ dumpUCond (unLoc lucond) ++
")" ++ dumpComp (ind+1) "" (unLoc lustmt)
| 150
| false
| false
| 0
| 10
| 33
| 67
| 32
| 35
| null | null |
fmap/hwb
|
src/HWB/Plugin/Navigation.hs
|
mit
|
forceReload :: H ()
forceReload = asks userInterfaceWebView >>= liftIO . webViewReloadBypassCache
| 97
|
forceReload :: H ()
forceReload = asks userInterfaceWebView >>= liftIO . webViewReloadBypassCache
| 97
|
forceReload = asks userInterfaceWebView >>= liftIO . webViewReloadBypassCache
| 77
| false
| true
| 0
| 7
| 11
| 27
| 13
| 14
| null | null |
chaosim/peasy
|
coffee/samples/latex.hs
|
mit
|
tilde 'u' = "ũ"
| 15
|
tilde 'u' = "ũ"
| 15
|
tilde 'u' = "ũ"
| 15
| false
| false
| 1
| 5
| 3
| 13
| 4
| 9
| null | null |
bacchanalia/KitchenSink
|
KitchenSink/Qualified.hs
|
gpl-3.0
|
-- |'VS.ifoldl''
vs_ifoldl' = VS.ifoldl'
| 40
|
vs_ifoldl' = VS.ifoldl'
| 23
|
vs_ifoldl' = VS.ifoldl'
| 23
| true
| false
| 0
| 5
| 4
| 9
| 5
| 4
| null | null |
haskell-opengl/OpenGLRaw
|
src/Graphics/GL/Functions/F19.hs
|
bsd-3-clause
|
-- glNamedStringARB ------------------------------------------------------------
glNamedStringARB
:: MonadIO m
=> GLenum -- ^ @type@.
-> GLint -- ^ @namelen@.
-> Ptr GLchar -- ^ @name@ pointing to @namelen@ elements of type @GLchar@.
-> GLint -- ^ @stringlen@.
-> Ptr GLchar -- ^ @string@ pointing to @stringlen@ elements of type @GLchar@.
-> m ()
glNamedStringARB v1 v2 v3 v4 v5 = liftIO $ dyn631 ptr_glNamedStringARB v1 v2 v3 v4 v5
| 448
|
glNamedStringARB
:: MonadIO m
=> GLenum -- ^ @type@.
-> GLint -- ^ @namelen@.
-> Ptr GLchar -- ^ @name@ pointing to @namelen@ elements of type @GLchar@.
-> GLint -- ^ @stringlen@.
-> Ptr GLchar -- ^ @string@ pointing to @stringlen@ elements of type @GLchar@.
-> m ()
glNamedStringARB v1 v2 v3 v4 v5 = liftIO $ dyn631 ptr_glNamedStringARB v1 v2 v3 v4 v5
| 366
|
glNamedStringARB v1 v2 v3 v4 v5 = liftIO $ dyn631 ptr_glNamedStringARB v1 v2 v3 v4 v5
| 85
| true
| true
| 0
| 13
| 81
| 87
| 43
| 44
| null | null |
meditans/hyper-relation
|
src/Data/HyperRelation/Internal/Proxy.hs
|
bsd-3-clause
|
third :: Proxy (S (S Z))
third = Proxy
| 38
|
third :: Proxy (S (S Z))
third = Proxy
| 38
|
third = Proxy
| 13
| false
| true
| 0
| 9
| 8
| 26
| 13
| 13
| null | null |
bartoszw/haslo
|
Haslo/Calculator.hs
|
bsd-3-clause
|
rateIrr' is c n r count | epsilon < 1e-13 && result < 0 && eta > (-2) = return 0
| epsilon < 1e-13 && result < 0 = throwError $ OtherError $
"negative rate r=" ++ show result ++
" is:" ++ show is
| epsilon < 1e-13 = return result
| count > 30 = throwError $ OtherError $
"rateIrr c:" ++
show c ++
" is:" ++ show is
| otherwise = rateIrr' is c n (r - f / ff) (count + 1)
where f = sum(map (uncurry (/)) (zip is [(1+r)^i|i <- [1..n]])) - c
ff = sum $ map (uncurry (/))
(zip (map (uncurry (*))
(zip is [fromIntegral(-i)|i <- [1..n]]))
[(1+r)^(i+1)|i <- [1..n]])
epsilon = abs (f / ff)
result = r - f / ff
eta = result * c
| 1,234
|
rateIrr' is c n r count | epsilon < 1e-13 && result < 0 && eta > (-2) = return 0
| epsilon < 1e-13 && result < 0 = throwError $ OtherError $
"negative rate r=" ++ show result ++
" is:" ++ show is
| epsilon < 1e-13 = return result
| count > 30 = throwError $ OtherError $
"rateIrr c:" ++
show c ++
" is:" ++ show is
| otherwise = rateIrr' is c n (r - f / ff) (count + 1)
where f = sum(map (uncurry (/)) (zip is [(1+r)^i|i <- [1..n]])) - c
ff = sum $ map (uncurry (/))
(zip (map (uncurry (*))
(zip is [fromIntegral(-i)|i <- [1..n]]))
[(1+r)^(i+1)|i <- [1..n]])
epsilon = abs (f / ff)
result = r - f / ff
eta = result * c
| 1,234
|
rateIrr' is c n r count | epsilon < 1e-13 && result < 0 && eta > (-2) = return 0
| epsilon < 1e-13 && result < 0 = throwError $ OtherError $
"negative rate r=" ++ show result ++
" is:" ++ show is
| epsilon < 1e-13 = return result
| count > 30 = throwError $ OtherError $
"rateIrr c:" ++
show c ++
" is:" ++ show is
| otherwise = rateIrr' is c n (r - f / ff) (count + 1)
where f = sum(map (uncurry (/)) (zip is [(1+r)^i|i <- [1..n]])) - c
ff = sum $ map (uncurry (/))
(zip (map (uncurry (*))
(zip is [fromIntegral(-i)|i <- [1..n]]))
[(1+r)^(i+1)|i <- [1..n]])
epsilon = abs (f / ff)
result = r - f / ff
eta = result * c
| 1,234
| false
| false
| 0
| 18
| 753
| 405
| 206
| 199
| null | null |
aleator/simple-dc1394
|
System/Camera/Firewire/Simple.hs
|
bsd-3-clause
|
fromFramerate Rate_30 = c'DC1394_FRAMERATE_30
| 45
|
fromFramerate Rate_30 = c'DC1394_FRAMERATE_30
| 45
|
fromFramerate Rate_30 = c'DC1394_FRAMERATE_30
| 45
| false
| false
| 1
| 5
| 3
| 13
| 4
| 9
| null | null |
tomahawkins/ecu
|
src/CANViewDecompose.hs
|
bsd-3-clause
|
rearrangeBytesLEtoBE :: Word64 -> Int -> Word64
rearrangeBytesLEtoBE word64 numBytes = toWord64 rearranged
where
desiredBytes = drop (8 - numBytes) (fromWord64 word64)
numDontCare = 8 - numBytes
rearranged = (replicate numDontCare 0xFF) ++ (reverse desiredBytes)
| 280
|
rearrangeBytesLEtoBE :: Word64 -> Int -> Word64
rearrangeBytesLEtoBE word64 numBytes = toWord64 rearranged
where
desiredBytes = drop (8 - numBytes) (fromWord64 word64)
numDontCare = 8 - numBytes
rearranged = (replicate numDontCare 0xFF) ++ (reverse desiredBytes)
| 280
|
rearrangeBytesLEtoBE word64 numBytes = toWord64 rearranged
where
desiredBytes = drop (8 - numBytes) (fromWord64 word64)
numDontCare = 8 - numBytes
rearranged = (replicate numDontCare 0xFF) ++ (reverse desiredBytes)
| 232
| false
| true
| 2
| 9
| 52
| 88
| 43
| 45
| null | null |
andyarvanitis/Idris-dev
|
src/Pkg/Package.hs
|
bsd-3-clause
|
mkDirCmd = "mkdir "
| 19
|
mkDirCmd = "mkdir "
| 19
|
mkDirCmd = "mkdir "
| 19
| false
| false
| 1
| 5
| 3
| 10
| 3
| 7
| null | null |
m-alvarez/jhc
|
drift_processed/Ho/Type.hs
|
mit
|
choHo_s v = choHo_u (const v)
| 31
|
choHo_s v = choHo_u (const v)
| 31
|
choHo_s v = choHo_u (const v)
| 31
| false
| false
| 0
| 7
| 7
| 18
| 8
| 10
| null | null |
rcallahan/thermonuc
|
ThermoNuc/Dat.hs
|
bsd-3-clause
|
dg_interiorloop, dg_bulgeloop, dg_hairpinloop :: Ptr Double
(dg_interiorloop, dg_bulgeloop, dg_hairpinloop) = $(embedLoopArrays "dat/loop.DG")
| 142
|
dg_interiorloop, dg_bulgeloop, dg_hairpinloop :: Ptr Double
(dg_interiorloop, dg_bulgeloop, dg_hairpinloop) = $(embedLoopArrays "dat/loop.DG")
| 142
|
(dg_interiorloop, dg_bulgeloop, dg_hairpinloop) = $(embedLoopArrays "dat/loop.DG")
| 82
| false
| true
| 4
| 8
| 11
| 44
| 20
| 24
| null | null |
frontrowed/stratosphere
|
library-gen/Stratosphere/Resources/S3BucketPolicy.hs
|
mit
|
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-policy.html#aws-properties-s3-policy-bucket
sbpBucket :: Lens' S3BucketPolicy (Val Text)
sbpBucket = lens _s3BucketPolicyBucket (\s a -> s { _s3BucketPolicyBucket = a })
| 254
|
sbpBucket :: Lens' S3BucketPolicy (Val Text)
sbpBucket = lens _s3BucketPolicyBucket (\s a -> s { _s3BucketPolicyBucket = a })
| 125
|
sbpBucket = lens _s3BucketPolicyBucket (\s a -> s { _s3BucketPolicyBucket = a })
| 80
| true
| true
| 0
| 9
| 21
| 46
| 25
| 21
| null | null |
rueshyna/gogol
|
gen/src/Gen/AST/Render.hs
|
mpl-2.0
|
renderSchema :: Solved -> AST (Maybe Data)
renderSchema s = go (_schema s)
where
go = \case
SEnm i e -> pure (Just (enum i e))
SObj i o -> Just <$> object i o
_ -> pure Nothing
k = _unique s
p = _prefix s
ds = _deriving s
enum i (Enm vs) = Sum (dname k) (i ^. iDescription) $
map (\(v, h) -> Branch (bname p v) v h) vs
object i (Obj aps ps) = do
a <- traverse getSolved aps
b <- traverse getSolved ps
let ab = setAdditional <$> a
ts = maybe b (flip (Map.insert "addtional") b) ab
prod ts
where
prod ts = Prod (dname k) (i ^. iDescription)
<$> pp Indent (objDecl k p ds ts)
<*> ctor ts
<*> traverse lens (Map.toList ts)
<*> traverse (pp Print) (jsonDecls k p ts)
ctor ts = Fun' (cname k) (Just help)
<$> (pp None (ctorSig k ts) <&> comments p ts)
<*> pp Indent (ctorDecl k p ts)
lens (l, v) = Fun' (lname p l) (v ^. iDescription)
<$> pp None (lensSig k p l v)
<*> pp Print (lensDecl p l v)
help = rawHelpText $
sformat ("Creates a value of '" % gid %
"' with the minimum fields required to make a request.\n")
k
| 1,327
|
renderSchema :: Solved -> AST (Maybe Data)
renderSchema s = go (_schema s)
where
go = \case
SEnm i e -> pure (Just (enum i e))
SObj i o -> Just <$> object i o
_ -> pure Nothing
k = _unique s
p = _prefix s
ds = _deriving s
enum i (Enm vs) = Sum (dname k) (i ^. iDescription) $
map (\(v, h) -> Branch (bname p v) v h) vs
object i (Obj aps ps) = do
a <- traverse getSolved aps
b <- traverse getSolved ps
let ab = setAdditional <$> a
ts = maybe b (flip (Map.insert "addtional") b) ab
prod ts
where
prod ts = Prod (dname k) (i ^. iDescription)
<$> pp Indent (objDecl k p ds ts)
<*> ctor ts
<*> traverse lens (Map.toList ts)
<*> traverse (pp Print) (jsonDecls k p ts)
ctor ts = Fun' (cname k) (Just help)
<$> (pp None (ctorSig k ts) <&> comments p ts)
<*> pp Indent (ctorDecl k p ts)
lens (l, v) = Fun' (lname p l) (v ^. iDescription)
<$> pp None (lensSig k p l v)
<*> pp Print (lensDecl p l v)
help = rawHelpText $
sformat ("Creates a value of '" % gid %
"' with the minimum fields required to make a request.\n")
k
| 1,327
|
renderSchema s = go (_schema s)
where
go = \case
SEnm i e -> pure (Just (enum i e))
SObj i o -> Just <$> object i o
_ -> pure Nothing
k = _unique s
p = _prefix s
ds = _deriving s
enum i (Enm vs) = Sum (dname k) (i ^. iDescription) $
map (\(v, h) -> Branch (bname p v) v h) vs
object i (Obj aps ps) = do
a <- traverse getSolved aps
b <- traverse getSolved ps
let ab = setAdditional <$> a
ts = maybe b (flip (Map.insert "addtional") b) ab
prod ts
where
prod ts = Prod (dname k) (i ^. iDescription)
<$> pp Indent (objDecl k p ds ts)
<*> ctor ts
<*> traverse lens (Map.toList ts)
<*> traverse (pp Print) (jsonDecls k p ts)
ctor ts = Fun' (cname k) (Just help)
<$> (pp None (ctorSig k ts) <&> comments p ts)
<*> pp Indent (ctorDecl k p ts)
lens (l, v) = Fun' (lname p l) (v ^. iDescription)
<$> pp None (lensSig k p l v)
<*> pp Print (lensDecl p l v)
help = rawHelpText $
sformat ("Creates a value of '" % gid %
"' with the minimum fields required to make a request.\n")
k
| 1,284
| false
| true
| 0
| 15
| 533
| 558
| 270
| 288
| null | null |
kishoredbn/barrelfish
|
tools/flounder/THCStubsBackend.hs
|
mit
|
call_rpc_argdecl ifn (RPCArgOut tr v) = THC.receive_msg_argdecl ifn (Arg tr v)
| 78
|
call_rpc_argdecl ifn (RPCArgOut tr v) = THC.receive_msg_argdecl ifn (Arg tr v)
| 78
|
call_rpc_argdecl ifn (RPCArgOut tr v) = THC.receive_msg_argdecl ifn (Arg tr v)
| 78
| false
| false
| 0
| 7
| 10
| 34
| 16
| 18
| null | null |
ekmett/ghclive
|
cache/Helper.hs
|
bsd-3-clause
|
burst = mconcat . take 13 . iterate (rotateBy (-1/13)) $ spike
| 62
|
burst = mconcat . take 13 . iterate (rotateBy (-1/13)) $ spike
| 62
|
burst = mconcat . take 13 . iterate (rotateBy (-1/13)) $ spike
| 62
| false
| false
| 0
| 12
| 11
| 39
| 19
| 20
| null | null |
jstolarek/slicer
|
lib/Language/Slicer/Desugar.hs
|
gpl-3.0
|
-- simple version that just fails if term is not well-typed
desugarM :: A.Exp -> DesugarM (Exp, Type)
desugarM (A.Var x)
= do gamma <- getGamma
case lookupEnv' gamma x of
HoleTy -> desugarError ("Unbound variable " ++ show x)
ty -> return (EVar x, ty)
| 290
|
desugarM :: A.Exp -> DesugarM (Exp, Type)
desugarM (A.Var x)
= do gamma <- getGamma
case lookupEnv' gamma x of
HoleTy -> desugarError ("Unbound variable " ++ show x)
ty -> return (EVar x, ty)
| 230
|
desugarM (A.Var x)
= do gamma <- getGamma
case lookupEnv' gamma x of
HoleTy -> desugarError ("Unbound variable " ++ show x)
ty -> return (EVar x, ty)
| 188
| true
| true
| 0
| 13
| 84
| 94
| 46
| 48
| null | null |
tpsinnem/Idris-dev
|
src/Idris/Primitives.hs
|
bsd-3-clause
|
bashr :: IntTy -> [Const] -> Maybe Const
bashr ITBig [BI x, BI y] = Just $ BI (x `shiftR` fromIntegral y)
| 105
|
bashr :: IntTy -> [Const] -> Maybe Const
bashr ITBig [BI x, BI y] = Just $ BI (x `shiftR` fromIntegral y)
| 105
|
bashr ITBig [BI x, BI y] = Just $ BI (x `shiftR` fromIntegral y)
| 64
| false
| true
| 0
| 10
| 21
| 65
| 32
| 33
| null | null |
limonheiro/OS
|
ex/threadring_sample.hs
|
gpl-3.0
|
thread :: Int -> MVar Int -> MVar Int -> IO ()
thread _ l r = do
v <- takeMVar r
putMVar l $! v+1
| 103
|
thread :: Int -> MVar Int -> MVar Int -> IO ()
thread _ l r = do
v <- takeMVar r
putMVar l $! v+1
| 103
|
thread _ l r = do
v <- takeMVar r
putMVar l $! v+1
| 56
| false
| true
| 0
| 9
| 31
| 65
| 29
| 36
| null | null |
pparkkin/eta
|
compiler/ETA/Prelude/PrimOp.hs
|
bsd-3-clause
|
tagOf_PrimOp DoubleNeOp = _ILIT(87)
| 35
|
tagOf_PrimOp DoubleNeOp = _ILIT(87)
| 35
|
tagOf_PrimOp DoubleNeOp = _ILIT(87)
| 35
| false
| false
| 0
| 6
| 3
| 15
| 7
| 8
| null | null |
haBuu/tfs-website
|
Model/Page.hs
|
mit
|
otherFilter :: Page -> Bool
otherFilter page = (not $ pageTopLevel page) && (not $ pageObsolete page)
| 101
|
otherFilter :: Page -> Bool
otherFilter page = (not $ pageTopLevel page) && (not $ pageObsolete page)
| 101
|
otherFilter page = (not $ pageTopLevel page) && (not $ pageObsolete page)
| 73
| false
| true
| 0
| 8
| 16
| 42
| 21
| 21
| null | null |
brendanhay/gogol
|
gogol-cloudidentity/gen/Network/Google/CloudIdentity/Types/Product.hs
|
mpl-2.0
|
-- | The latest time at which the dynamic group is guaranteed to be in the
-- given status. If status is \`UP_TO_DATE\`, the latest time at which the
-- dynamic group was confirmed to be up-to-date. If status is
-- \`UPDATING_MEMBERSHIPS\`, the time at which dynamic group was created.
dgsStatusTime :: Lens' DynamicGroupStatus (Maybe UTCTime)
dgsStatusTime
= lens _dgsStatusTime
(\ s a -> s{_dgsStatusTime = a})
. mapping _DateTime
| 446
|
dgsStatusTime :: Lens' DynamicGroupStatus (Maybe UTCTime)
dgsStatusTime
= lens _dgsStatusTime
(\ s a -> s{_dgsStatusTime = a})
. mapping _DateTime
| 160
|
dgsStatusTime
= lens _dgsStatusTime
(\ s a -> s{_dgsStatusTime = a})
. mapping _DateTime
| 102
| true
| true
| 1
| 8
| 83
| 60
| 31
| 29
| null | null |
sdiehl/ghc
|
compiler/coreSyn/PprCore.hs
|
bsd-3-clause
|
pprRules :: [CoreRule] -> SDoc
pprRules rules = vcat (map pprRule rules)
| 72
|
pprRules :: [CoreRule] -> SDoc
pprRules rules = vcat (map pprRule rules)
| 72
|
pprRules rules = vcat (map pprRule rules)
| 41
| false
| true
| 0
| 7
| 11
| 32
| 16
| 16
| null | null |
fmapfmapfmap/amazonka
|
amazonka-ec2/gen/Network/AWS/EC2/DescribeInternetGateways.hs
|
mpl-2.0
|
-- | Information about one or more Internet gateways.
digrsInternetGateways :: Lens' DescribeInternetGatewaysResponse [InternetGateway]
digrsInternetGateways = lens _digrsInternetGateways (\ s a -> s{_digrsInternetGateways = a}) . _Default . _Coerce
| 249
|
digrsInternetGateways :: Lens' DescribeInternetGatewaysResponse [InternetGateway]
digrsInternetGateways = lens _digrsInternetGateways (\ s a -> s{_digrsInternetGateways = a}) . _Default . _Coerce
| 195
|
digrsInternetGateways = lens _digrsInternetGateways (\ s a -> s{_digrsInternetGateways = a}) . _Default . _Coerce
| 113
| true
| true
| 0
| 11
| 28
| 51
| 28
| 23
| null | null |
neothemachine/monadiccp
|
src/Control/Monatron/Transformer.hs
|
bsd-3-clause
|
foldListT :: Monad m => (a -> m b -> m b) -> m b -> ListT m a -> m b
foldListT c n (L m) = do l <- m
case l of
NilT () -> n
ConsT a l1 -> c a (foldListT c n l1)
| 247
|
foldListT :: Monad m => (a -> m b -> m b) -> m b -> ListT m a -> m b
foldListT c n (L m) = do l <- m
case l of
NilT () -> n
ConsT a l1 -> c a (foldListT c n l1)
| 247
|
foldListT c n (L m) = do l <- m
case l of
NilT () -> n
ConsT a l1 -> c a (foldListT c n l1)
| 178
| false
| true
| 0
| 13
| 135
| 127
| 57
| 70
| null | null |
crvs/scythe
|
src/Math/ScytheGraph.hs
|
bsd-3-clause
|
-- we mark the vertices twice
markCrit,unmarkCrit :: Eq a => Graph (Vertex a) -> Vertex a -> Graph (Vertex a)
markCrit g v = fmap (\ x -> if x==v then fmap markT x else x) g
| 176
|
markCrit,unmarkCrit :: Eq a => Graph (Vertex a) -> Vertex a -> Graph (Vertex a)
markCrit g v = fmap (\ x -> if x==v then fmap markT x else x) g
| 145
|
markCrit g v = fmap (\ x -> if x==v then fmap markT x else x) g
| 65
| true
| true
| 0
| 10
| 40
| 85
| 43
| 42
| null | null |
grpc/grpc-haskell
|
tests/interop_client/main.hs
|
apache-2.0
|
runServerStreamingWithSlowConsumerTest :: Options -> IO (Either String ())
runServerStreamingWithSlowConsumerTest opts = do
let
responseSize = 1030
responsesCount = 2000
delaySeconds = 20
delay = delaySeconds * 1000
req = def { _StreamingOutputCallRequest'responseParameters =
replicate responsesCount def { _ResponseParameters'size = responseSize }
}
expectedBody = B.replicate (fromIntegral responseSize) 0
go client acc = do
maybeResponse <- receiveMessage client
case maybeResponse of
Nothing -> return $ Right (reverse acc)
Just resp -> do
let
eitherMsg = do
msg <- mapLeft ("proto decoder says: " ++) $ decodeMessage (L.toStrict resp)
payload <- maybeToEither "no payload" (_StreamingOutputCallResponse'payload msg)
unless (_Payload'body payload == expectedBody) $
Left "payload does not match"
return msg
case eitherMsg of
Left err ->
return (Left err)
Right msg -> do
liftIO (threadDelay delay)
go client (msg : acc)
bracket (newChannel opts) destroyChannel $ \channel ->
bracket (newClientContext channel) destroyClientContext $ \ctx -> do
resp <- runRpc $ do
client <- joinReply =<< liftIO (callDownstream ctx mempty "/grpc.testing.TestService/StreamingOutputCall" (encodeMessage req))
msgs <- go client []
closeCall client
return msgs
case resp of
RpcOk (Right msgs)
| length msgs == responsesCount ->
return (Right ())
| otherwise ->
return (Left ("responses count does not match: " ++ show (length msgs)))
RpcOk (Left err) ->
return (Left err)
RpcError err ->
return (Left (show err))
-- | This test verifies unary calls succeed in sending messages, and propagate
-- back status code and message sent along with the messages.
--
-- Server features:
-- * [UnaryCall][]
-- * [FullDuplexCall][]
-- * [Echo Status][]
-- Procedure:
-- 1. Client calls UnaryCall with:
--
-- ```
-- {
-- response_status:{
-- code: 2
-- message: "test status message"
-- }
-- }
-- ```
--
-- 2. Client calls FullDuplexCall with:
--
-- ```
-- {
-- response_status:{
-- code: 2
-- message: "test status message"
-- }
-- }
-- ```
--
-- and then half-closes
-- Client asserts:
-- * received status code is the same as the sent code for both Procedure steps 1
-- and 2
-- * received status message is the same as the sent message for both Procedure
-- steps 1 and 2
| 2,744
|
runServerStreamingWithSlowConsumerTest :: Options -> IO (Either String ())
runServerStreamingWithSlowConsumerTest opts = do
let
responseSize = 1030
responsesCount = 2000
delaySeconds = 20
delay = delaySeconds * 1000
req = def { _StreamingOutputCallRequest'responseParameters =
replicate responsesCount def { _ResponseParameters'size = responseSize }
}
expectedBody = B.replicate (fromIntegral responseSize) 0
go client acc = do
maybeResponse <- receiveMessage client
case maybeResponse of
Nothing -> return $ Right (reverse acc)
Just resp -> do
let
eitherMsg = do
msg <- mapLeft ("proto decoder says: " ++) $ decodeMessage (L.toStrict resp)
payload <- maybeToEither "no payload" (_StreamingOutputCallResponse'payload msg)
unless (_Payload'body payload == expectedBody) $
Left "payload does not match"
return msg
case eitherMsg of
Left err ->
return (Left err)
Right msg -> do
liftIO (threadDelay delay)
go client (msg : acc)
bracket (newChannel opts) destroyChannel $ \channel ->
bracket (newClientContext channel) destroyClientContext $ \ctx -> do
resp <- runRpc $ do
client <- joinReply =<< liftIO (callDownstream ctx mempty "/grpc.testing.TestService/StreamingOutputCall" (encodeMessage req))
msgs <- go client []
closeCall client
return msgs
case resp of
RpcOk (Right msgs)
| length msgs == responsesCount ->
return (Right ())
| otherwise ->
return (Left ("responses count does not match: " ++ show (length msgs)))
RpcOk (Left err) ->
return (Left err)
RpcError err ->
return (Left (show err))
-- | This test verifies unary calls succeed in sending messages, and propagate
-- back status code and message sent along with the messages.
--
-- Server features:
-- * [UnaryCall][]
-- * [FullDuplexCall][]
-- * [Echo Status][]
-- Procedure:
-- 1. Client calls UnaryCall with:
--
-- ```
-- {
-- response_status:{
-- code: 2
-- message: "test status message"
-- }
-- }
-- ```
--
-- 2. Client calls FullDuplexCall with:
--
-- ```
-- {
-- response_status:{
-- code: 2
-- message: "test status message"
-- }
-- }
-- ```
--
-- and then half-closes
-- Client asserts:
-- * received status code is the same as the sent code for both Procedure steps 1
-- and 2
-- * received status message is the same as the sent message for both Procedure
-- steps 1 and 2
| 2,744
|
runServerStreamingWithSlowConsumerTest opts = do
let
responseSize = 1030
responsesCount = 2000
delaySeconds = 20
delay = delaySeconds * 1000
req = def { _StreamingOutputCallRequest'responseParameters =
replicate responsesCount def { _ResponseParameters'size = responseSize }
}
expectedBody = B.replicate (fromIntegral responseSize) 0
go client acc = do
maybeResponse <- receiveMessage client
case maybeResponse of
Nothing -> return $ Right (reverse acc)
Just resp -> do
let
eitherMsg = do
msg <- mapLeft ("proto decoder says: " ++) $ decodeMessage (L.toStrict resp)
payload <- maybeToEither "no payload" (_StreamingOutputCallResponse'payload msg)
unless (_Payload'body payload == expectedBody) $
Left "payload does not match"
return msg
case eitherMsg of
Left err ->
return (Left err)
Right msg -> do
liftIO (threadDelay delay)
go client (msg : acc)
bracket (newChannel opts) destroyChannel $ \channel ->
bracket (newClientContext channel) destroyClientContext $ \ctx -> do
resp <- runRpc $ do
client <- joinReply =<< liftIO (callDownstream ctx mempty "/grpc.testing.TestService/StreamingOutputCall" (encodeMessage req))
msgs <- go client []
closeCall client
return msgs
case resp of
RpcOk (Right msgs)
| length msgs == responsesCount ->
return (Right ())
| otherwise ->
return (Left ("responses count does not match: " ++ show (length msgs)))
RpcOk (Left err) ->
return (Left err)
RpcError err ->
return (Left (show err))
-- | This test verifies unary calls succeed in sending messages, and propagate
-- back status code and message sent along with the messages.
--
-- Server features:
-- * [UnaryCall][]
-- * [FullDuplexCall][]
-- * [Echo Status][]
-- Procedure:
-- 1. Client calls UnaryCall with:
--
-- ```
-- {
-- response_status:{
-- code: 2
-- message: "test status message"
-- }
-- }
-- ```
--
-- 2. Client calls FullDuplexCall with:
--
-- ```
-- {
-- response_status:{
-- code: 2
-- message: "test status message"
-- }
-- }
-- ```
--
-- and then half-closes
-- Client asserts:
-- * received status code is the same as the sent code for both Procedure steps 1
-- and 2
-- * received status message is the same as the sent message for both Procedure
-- steps 1 and 2
| 2,669
| false
| true
| 0
| 27
| 851
| 580
| 289
| 291
| null | null |
ndmitchell/firstify
|
Example.hs
|
bsd-3-clause
|
main4 x = even (x :: Int)
| 25
|
main4 x = even (x :: Int)
| 25
|
main4 x = even (x :: Int)
| 25
| false
| false
| 1
| 5
| 6
| 21
| 9
| 12
| null | null |
aristidb/sequential-index
|
Test/SequentialIndex.hs
|
bsd-3-clause
|
prop_parentRootLeft = (parent =<< leftChild root) == Just root
| 62
|
prop_parentRootLeft = (parent =<< leftChild root) == Just root
| 62
|
prop_parentRootLeft = (parent =<< leftChild root) == Just root
| 62
| false
| false
| 0
| 8
| 8
| 23
| 11
| 12
| null | null |
jean-edouard/manager
|
xenmgr/XenMgr/Expose/XenmgrObject.hs
|
gpl-2.0
|
_ListExtensionPacks :: Rpc [Map String String]
_ListExtensionPacks = map entry <$> getExtPacks where
entry e
= M.fromList [ ("id", extpackId e)
, ("vendor", extpackVendor e)
, ("name", extpackName e)
, ("description", extpackDescr e)
, ("version", extpackVersion e)
, ("image", extpackImage e)
]
| 403
|
_ListExtensionPacks :: Rpc [Map String String]
_ListExtensionPacks = map entry <$> getExtPacks where
entry e
= M.fromList [ ("id", extpackId e)
, ("vendor", extpackVendor e)
, ("name", extpackName e)
, ("description", extpackDescr e)
, ("version", extpackVersion e)
, ("image", extpackImage e)
]
| 403
|
_ListExtensionPacks = map entry <$> getExtPacks where
entry e
= M.fromList [ ("id", extpackId e)
, ("vendor", extpackVendor e)
, ("name", extpackName e)
, ("description", extpackDescr e)
, ("version", extpackVersion e)
, ("image", extpackImage e)
]
| 356
| false
| true
| 0
| 10
| 149
| 116
| 63
| 53
| null | null |
spire/spire
|
src/Spire/Surface/Elaborator.hs
|
bsd-3-clause
|
elabC x@(SPi _ _) = elabIC x
| 38
|
elabC x@(SPi _ _) = elabIC x
| 38
|
elabC x@(SPi _ _) = elabIC x
| 38
| false
| false
| 1
| 8
| 16
| 27
| 11
| 16
| null | null |
Heather/Idris-dev
|
src/Idris/Primitives.hs
|
bsd-3-clause
|
floatToInt :: IntTy -> [Const] -> Maybe Const
floatToInt ity [Fl x] = Just $ toInt ity (truncate x :: Integer)
| 110
|
floatToInt :: IntTy -> [Const] -> Maybe Const
floatToInt ity [Fl x] = Just $ toInt ity (truncate x :: Integer)
| 110
|
floatToInt ity [Fl x] = Just $ toInt ity (truncate x :: Integer)
| 64
| false
| true
| 0
| 8
| 20
| 59
| 28
| 31
| null | null |
frp-arduino/frp-arduino
|
src/Arduino/DSL.hs
|
gpl-3.0
|
byteConstant :: DAG.Byte -> LLI DAG.Byte
byteConstant = LLI . DAG.Const . show
| 78
|
byteConstant :: DAG.Byte -> LLI DAG.Byte
byteConstant = LLI . DAG.Const . show
| 78
|
byteConstant = LLI . DAG.Const . show
| 37
| false
| true
| 1
| 8
| 12
| 38
| 17
| 21
| null | null |
fsharpcorner/99-Problems-in-Haskell
|
src/Lib.hs
|
bsd-3-clause
|
myLast'' :: [a] -> Maybe a
myLast'' [] = Nothing
| 48
|
myLast'' :: [a] -> Maybe a
myLast'' [] = Nothing
| 48
|
myLast'' [] = Nothing
| 21
| false
| true
| 0
| 6
| 9
| 26
| 13
| 13
| null | null |
nevrenato/Hets_Fork
|
Common/Lib/Pretty.hs
|
gpl-2.0
|
punctuate p (d:ds) = go d ds
where
go d' [] = [d']
go d' (e:es) = (d' <> p) : go e es
-- ---------------------------------------------------------------------------
-- The Doc data type
-- A Doc represents a *set* of layouts. A Doc with
-- no occurrences of Union or NoDoc represents just one layout.
-- | The abstract type of documents.
-- The 'Show' instance is equivalent to using 'render'.
| 458
|
punctuate p (d:ds) = go d ds
where
go d' [] = [d']
go d' (e:es) = (d' <> p) : go e es
-- ---------------------------------------------------------------------------
-- The Doc data type
-- A Doc represents a *set* of layouts. A Doc with
-- no occurrences of Union or NoDoc represents just one layout.
-- | The abstract type of documents.
-- The 'Show' instance is equivalent to using 'render'.
| 458
|
punctuate p (d:ds) = go d ds
where
go d' [] = [d']
go d' (e:es) = (d' <> p) : go e es
-- ---------------------------------------------------------------------------
-- The Doc data type
-- A Doc represents a *set* of layouts. A Doc with
-- no occurrences of Union or NoDoc represents just one layout.
-- | The abstract type of documents.
-- The 'Show' instance is equivalent to using 'render'.
| 458
| false
| false
| 0
| 9
| 133
| 79
| 43
| 36
| null | null |
leshchevds/ganeti
|
src/Ganeti/DataCollectors/InstStatus.hs
|
bsd-2-clause
|
-- Builds the status of an instance using runtime information about the Xen
-- Domains, their uptime information and the static information provided by
-- the ConfD server.
buildStatus :: Map.Map String Domain -> Map.Map Int UptimeInfo
-> RealInstanceData
-> IO InstStatus
buildStatus domains uptimes inst = do
let name = realInstName inst
currDomain = Map.lookup name domains
idNum = fmap domId currDomain
currUInfo = idNum >>= (`Map.lookup` uptimes)
uptime = fmap uInfoUptime currUInfo
adminState = realInstAdminState inst
actualState =
if adminState == AdminDown && isNothing currDomain
then ActualShutdown
else case currDomain of
(Just dom@(Domain _ _ _ _ (Just isHung))) ->
if isHung
then ActualHung
else domState dom
_ -> ActualUnknown
status = computeStatusField adminState actualState
trail <- getReasonTrail name
return $
InstStatus
name
(UTF8.toString $ realInstUuid inst)
adminState
actualState
uptime
(realInstMtime inst)
trail
status
-- | Compute the status code and message, given the current DRBD data
-- The final state will have the code corresponding to the worst code of
-- all the devices, and the error message given from the concatenation of the
-- non-empty error messages.
| 1,425
|
buildStatus :: Map.Map String Domain -> Map.Map Int UptimeInfo
-> RealInstanceData
-> IO InstStatus
buildStatus domains uptimes inst = do
let name = realInstName inst
currDomain = Map.lookup name domains
idNum = fmap domId currDomain
currUInfo = idNum >>= (`Map.lookup` uptimes)
uptime = fmap uInfoUptime currUInfo
adminState = realInstAdminState inst
actualState =
if adminState == AdminDown && isNothing currDomain
then ActualShutdown
else case currDomain of
(Just dom@(Domain _ _ _ _ (Just isHung))) ->
if isHung
then ActualHung
else domState dom
_ -> ActualUnknown
status = computeStatusField adminState actualState
trail <- getReasonTrail name
return $
InstStatus
name
(UTF8.toString $ realInstUuid inst)
adminState
actualState
uptime
(realInstMtime inst)
trail
status
-- | Compute the status code and message, given the current DRBD data
-- The final state will have the code corresponding to the worst code of
-- all the devices, and the error message given from the concatenation of the
-- non-empty error messages.
| 1,252
|
buildStatus domains uptimes inst = do
let name = realInstName inst
currDomain = Map.lookup name domains
idNum = fmap domId currDomain
currUInfo = idNum >>= (`Map.lookup` uptimes)
uptime = fmap uInfoUptime currUInfo
adminState = realInstAdminState inst
actualState =
if adminState == AdminDown && isNothing currDomain
then ActualShutdown
else case currDomain of
(Just dom@(Domain _ _ _ _ (Just isHung))) ->
if isHung
then ActualHung
else domState dom
_ -> ActualUnknown
status = computeStatusField adminState actualState
trail <- getReasonTrail name
return $
InstStatus
name
(UTF8.toString $ realInstUuid inst)
adminState
actualState
uptime
(realInstMtime inst)
trail
status
-- | Compute the status code and message, given the current DRBD data
-- The final state will have the code corresponding to the worst code of
-- all the devices, and the error message given from the concatenation of the
-- non-empty error messages.
| 1,122
| true
| true
| 0
| 20
| 409
| 265
| 136
| 129
| null | null |
advancedtelematic/quickcheck-state-machine-model
|
src/Test/StateMachine/Logic.hs
|
bsd-3-clause
|
logic (l :=> r) = case logic l of
VFalse _ -> VTrue
VTrue -> case logic r of
VTrue -> VTrue
VFalse ce -> VFalse (ImpliesC ce)
| 149
|
logic (l :=> r) = case logic l of
VFalse _ -> VTrue
VTrue -> case logic r of
VTrue -> VTrue
VFalse ce -> VFalse (ImpliesC ce)
| 149
|
logic (l :=> r) = case logic l of
VFalse _ -> VTrue
VTrue -> case logic r of
VTrue -> VTrue
VFalse ce -> VFalse (ImpliesC ce)
| 149
| false
| false
| 5
| 7
| 51
| 65
| 32
| 33
| null | null |
kmate/HaRe
|
old/refactorer/RefacUnGuard.hs
|
bsd-3-clause
|
mergeMatches (HsMatch l1 i1 ((Pat (HsPParen p1)):ps1) e1 []) m2
= do HsMatch l i (p:ps) e _ <- mergeMatches (HsMatch l1 i1 (p1:ps1) e1 []) m2
return $ HsMatch l i ((Pat (HsPParen p)):ps) e []
| 205
|
mergeMatches (HsMatch l1 i1 ((Pat (HsPParen p1)):ps1) e1 []) m2
= do HsMatch l i (p:ps) e _ <- mergeMatches (HsMatch l1 i1 (p1:ps1) e1 []) m2
return $ HsMatch l i ((Pat (HsPParen p)):ps) e []
| 205
|
mergeMatches (HsMatch l1 i1 ((Pat (HsPParen p1)):ps1) e1 []) m2
= do HsMatch l i (p:ps) e _ <- mergeMatches (HsMatch l1 i1 (p1:ps1) e1 []) m2
return $ HsMatch l i ((Pat (HsPParen p)):ps) e []
| 205
| false
| false
| 1
| 15
| 50
| 143
| 68
| 75
| null | null |
themoritz/cabal
|
cabal-install/Distribution/Client/Setup.hs
|
bsd-3-clause
|
relaxDepsPrinter :: (Maybe RelaxDeps) -> [Maybe String]
relaxDepsPrinter Nothing = []
| 105
|
relaxDepsPrinter :: (Maybe RelaxDeps) -> [Maybe String]
relaxDepsPrinter Nothing = []
| 105
|
relaxDepsPrinter Nothing = []
| 49
| false
| true
| 0
| 7
| 30
| 32
| 16
| 16
| null | null |
input-output-hk/pos-haskell-prototype
|
core/src/Pos/Core/Reporting/Metrics.hs
|
mit
|
recordValue ::
( MonadIO m
, WithLogger m
)
=> MetricMonitor value
-> value
-> m ()
recordValue MetricMonitor {..} v = do
let MetricMonitorState {..} = mmState
let vInt = mmConvertValue v
liftIO $ Gauge.set mmsGauge vInt
lastReportTime <- readTVarIO mmsLastReportTime
curTime <- currentTime
lastReportedValue <- readTVarIO mmsLastReportedValue
case mmReportMisbehaviour (curTime - lastReportTime) lastReportedValue v of
Nothing -> whenJust mmDebugFormat $ logDebug . flip sformat v
Just _ -> do
atomically $ do
writeTVar mmsLastReportTime curTime
writeTVar mmsLastReportedValue (Just v)
| 707
|
recordValue ::
( MonadIO m
, WithLogger m
)
=> MetricMonitor value
-> value
-> m ()
recordValue MetricMonitor {..} v = do
let MetricMonitorState {..} = mmState
let vInt = mmConvertValue v
liftIO $ Gauge.set mmsGauge vInt
lastReportTime <- readTVarIO mmsLastReportTime
curTime <- currentTime
lastReportedValue <- readTVarIO mmsLastReportedValue
case mmReportMisbehaviour (curTime - lastReportTime) lastReportedValue v of
Nothing -> whenJust mmDebugFormat $ logDebug . flip sformat v
Just _ -> do
atomically $ do
writeTVar mmsLastReportTime curTime
writeTVar mmsLastReportedValue (Just v)
| 707
|
recordValue MetricMonitor {..} v = do
let MetricMonitorState {..} = mmState
let vInt = mmConvertValue v
liftIO $ Gauge.set mmsGauge vInt
lastReportTime <- readTVarIO mmsLastReportTime
curTime <- currentTime
lastReportedValue <- readTVarIO mmsLastReportedValue
case mmReportMisbehaviour (curTime - lastReportTime) lastReportedValue v of
Nothing -> whenJust mmDebugFormat $ logDebug . flip sformat v
Just _ -> do
atomically $ do
writeTVar mmsLastReportTime curTime
writeTVar mmsLastReportedValue (Just v)
| 590
| false
| true
| 17
| 6
| 201
| 167
| 90
| 77
| null | null |
robdockins/edison
|
edison-core/src/Data/Edison/Coll/EnumSet.hs
|
mit
|
foldlBits' :: (a -> Int -> a) -> a -> Word -> a
foldlBits' f z w = foldlBits_aux' (\x i -> x `seq` f x i) z 0 w
| 111
|
foldlBits' :: (a -> Int -> a) -> a -> Word -> a
foldlBits' f z w = foldlBits_aux' (\x i -> x `seq` f x i) z 0 w
| 111
|
foldlBits' f z w = foldlBits_aux' (\x i -> x `seq` f x i) z 0 w
| 63
| false
| true
| 0
| 9
| 29
| 71
| 37
| 34
| null | null |
kim/amazonka
|
amazonka-opsworks/gen/Network/AWS/OpsWorks/Types.hs
|
mpl-2.0
|
-- | An 'InstancesCount' object with the number of instances in each status.
ssInstancesCount :: Lens' StackSummary (Maybe InstancesCount)
ssInstancesCount = lens _ssInstancesCount (\s a -> s { _ssInstancesCount = a })
| 218
|
ssInstancesCount :: Lens' StackSummary (Maybe InstancesCount)
ssInstancesCount = lens _ssInstancesCount (\s a -> s { _ssInstancesCount = a })
| 141
|
ssInstancesCount = lens _ssInstancesCount (\s a -> s { _ssInstancesCount = a })
| 79
| true
| true
| 0
| 9
| 31
| 46
| 25
| 21
| null | null |
phischu/fragnix
|
builtins/base/GHC.Float.RealFracMethods.hs
|
bsd-3-clause
|
ceilingDoubleInt :: Double -> Int
ceilingDoubleInt (D# x) =
case double2Int# x of
n | isTrue# (int2Double# n <## x) -> I# (n +# 1#)
| otherwise -> I# n
| 189
|
ceilingDoubleInt :: Double -> Int
ceilingDoubleInt (D# x) =
case double2Int# x of
n | isTrue# (int2Double# n <## x) -> I# (n +# 1#)
| otherwise -> I# n
| 189
|
ceilingDoubleInt (D# x) =
case double2Int# x of
n | isTrue# (int2Double# n <## x) -> I# (n +# 1#)
| otherwise -> I# n
| 155
| false
| true
| 3
| 10
| 67
| 74
| 36
| 38
| null | null |
yesodweb/shakespeare
|
Text/Hamlet.hs
|
mit
|
getVars (ContentVar d) = [(d, VTPlain)]
| 41
|
getVars (ContentVar d) = [(d, VTPlain)]
| 41
|
getVars (ContentVar d) = [(d, VTPlain)]
| 41
| false
| false
| 0
| 6
| 7
| 25
| 13
| 12
| null | null |
tranma/falling-turnip
|
accelerate/World.hs
|
bsd-3-clause
|
isWall :: Exp Element -> Exp Bool
isWall x = (x >=* 23 &&* x <=* 26) ||* x ==* 127
| 82
|
isWall :: Exp Element -> Exp Bool
isWall x = (x >=* 23 &&* x <=* 26) ||* x ==* 127
| 82
|
isWall x = (x >=* 23 &&* x <=* 26) ||* x ==* 127
| 48
| false
| true
| 0
| 10
| 20
| 47
| 23
| 24
| null | null |
ledyba/hs-java
|
JVM/Assembler.hs
|
lgpl-3.0
|
byte2atype 5 = return T_CHAR
| 29
|
byte2atype 5 = return T_CHAR
| 29
|
byte2atype 5 = return T_CHAR
| 29
| false
| false
| 0
| 5
| 5
| 12
| 5
| 7
| null | null |
mfpi/hnars
|
src/FingerTree.hs
|
mit
|
nodes (a:b:c:xs) = node3 a b c : nodes xs
| 41
|
nodes (a:b:c:xs) = node3 a b c : nodes xs
| 41
|
nodes (a:b:c:xs) = node3 a b c : nodes xs
| 41
| false
| false
| 0
| 9
| 9
| 38
| 18
| 20
| null | null |
brendanhay/gogol
|
gogol-analytics/gen/Network/Google/Resource/Analytics/Management/ProFiles/Patch.hs
|
mpl-2.0
|
-- | ID of the view (profile) to be updated.
mpfpProFileId :: Lens' ManagementProFilesPatch Text
mpfpProFileId
= lens _mpfpProFileId
(\ s a -> s{_mpfpProFileId = a})
| 173
|
mpfpProFileId :: Lens' ManagementProFilesPatch Text
mpfpProFileId
= lens _mpfpProFileId
(\ s a -> s{_mpfpProFileId = a})
| 128
|
mpfpProFileId
= lens _mpfpProFileId
(\ s a -> s{_mpfpProFileId = a})
| 76
| true
| true
| 0
| 9
| 33
| 42
| 22
| 20
| null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.