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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
karknu/rws | src/IPv6.hs | bsd-3-clause | ipv6Decl :: Parser Packet -> Parser Packet
ipv6Decl f = do
symbol "ipv6"
p <- parseIPv6Pkt f
return (PIPv6 p) | 112 | ipv6Decl :: Parser Packet -> Parser Packet
ipv6Decl f = do
symbol "ipv6"
p <- parseIPv6Pkt f
return (PIPv6 p) | 112 | ipv6Decl f = do
symbol "ipv6"
p <- parseIPv6Pkt f
return (PIPv6 p) | 69 | false | true | 0 | 10 | 22 | 57 | 23 | 34 | null | null |
dec9ue/jhc_copygc | src/FrontEnd/Desugar.hs | gpl-2.0 | garHsStmt :: Monad m => HsStmt -> m HsStmt
desugarHsStmt s = return $ fst $ runState (desugarStmt s) (0::Int)
de | 113 | desugarHsStmt :: Monad m => HsStmt -> m HsStmt
desugarHsStmt s = return $ fst $ runState (desugarStmt s) (0::Int) | 113 | desugarHsStmt s = return $ fst $ runState (desugarStmt s) (0::Int) | 66 | false | true | 0 | 8 | 21 | 56 | 27 | 29 | null | null |
travitch/foreign-inference | src/Foreign/Inference/Interface/Diff.hs | bsd-3-clause | funcToBuilder :: ForeignFunction -> Builder
funcToBuilder ff = mconcat [ fromString " * "
, fromString name
, fromString "\n"
]
where
name = foreignFunctionName ff | 250 | funcToBuilder :: ForeignFunction -> Builder
funcToBuilder ff = mconcat [ fromString " * "
, fromString name
, fromString "\n"
]
where
name = foreignFunctionName ff | 250 | funcToBuilder ff = mconcat [ fromString " * "
, fromString name
, fromString "\n"
]
where
name = foreignFunctionName ff | 206 | false | true | 1 | 7 | 112 | 58 | 25 | 33 | null | null |
mstksg/hledger | hledger-lib/Hledger/Utils/Debug.hs | gpl-3.0 | dbg8IO :: (MonadIO m, Show a) => String -> a -> m ()
dbg8IO = tracePrettyAtIO 8 | 79 | dbg8IO :: (MonadIO m, Show a) => String -> a -> m ()
dbg8IO = tracePrettyAtIO 8 | 79 | dbg8IO = tracePrettyAtIO 8 | 26 | false | true | 0 | 9 | 16 | 42 | 21 | 21 | null | null |
Paow/encore | src/types/Typechecker/Util.hs | bsd-3-clause | findVar :: QualifiedName -> TypecheckM (Maybe (QualifiedName, Type))
findVar x = do
result <- asks $ varLookup x
case result of
Just [] ->
return Nothing
Just [qvar] ->
return (Just qvar)
Just l ->
tcError $ AmbiguousNameError x l
Nothing ->
tcError $ UnknownNamespaceError (q... | 329 | findVar :: QualifiedName -> TypecheckM (Maybe (QualifiedName, Type))
findVar x = do
result <- asks $ varLookup x
case result of
Just [] ->
return Nothing
Just [qvar] ->
return (Just qvar)
Just l ->
tcError $ AmbiguousNameError x l
Nothing ->
tcError $ UnknownNamespaceError (q... | 329 | findVar x = do
result <- asks $ varLookup x
case result of
Just [] ->
return Nothing
Just [qvar] ->
return (Just qvar)
Just l ->
tcError $ AmbiguousNameError x l
Nothing ->
tcError $ UnknownNamespaceError (qnspace x) | 260 | false | true | 0 | 14 | 90 | 131 | 60 | 71 | null | null |
beni55/haste-compiler | libraries/ghc-7.10/array/Data/Array/Base.hs | bsd-3-clause | -- | Return a list of all the associations of a mutable array, in
-- index order.
getAssocs :: (MArray a e m, Ix i) => a i e -> m [(i, e)]
getAssocs marr = do
(l,u) <- getBounds marr
n <- getNumElements marr
sequence [ do e <- unsafeRead marr (safeIndex (l,u) n i); return (i,e)
| i <- range (l,u)]
| 317 | getAssocs :: (MArray a e m, Ix i) => a i e -> m [(i, e)]
getAssocs marr = do
(l,u) <- getBounds marr
n <- getNumElements marr
sequence [ do e <- unsafeRead marr (safeIndex (l,u) n i); return (i,e)
| i <- range (l,u)]
| 235 | getAssocs marr = do
(l,u) <- getBounds marr
n <- getNumElements marr
sequence [ do e <- unsafeRead marr (safeIndex (l,u) n i); return (i,e)
| i <- range (l,u)]
| 178 | true | true | 0 | 15 | 81 | 149 | 76 | 73 | null | null |
thlorenz/WebToInk | webtoink-converter/Data/String/Utils.hs | bsd-2-clause | {- | Removes any whitespace characters that are present at the start
or end of a string. Does not alter the internal contents of a
string. If no whitespace characters are present at the start or end
of a string, returns the original string unmodified. Safe to use on
any string.
Note that this may differ from some othe... | 568 | strip :: String -> String
strip = lstrip . rstrip | 49 | strip = lstrip . rstrip | 23 | true | true | 1 | 7 | 104 | 28 | 12 | 16 | null | null |
fmapfmapfmap/amazonka | amazonka-ec2/gen/Network/AWS/EC2/CreateVPCEndpoint.hs | mpl-2.0 | -- | Creates a value of 'CreateVPCEndpoint' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'cvePolicyDocument'
--
-- * 'cveClientToken'
--
-- * 'cveDryRun'
--
-- * 'cveRouteTableIds'
--
-- * 'cveVPCId'
--
-- * 'cveServiceName'
createV... | 680 | createVPCEndpoint
:: Text -- ^ 'cveVPCId'
-> Text -- ^ 'cveServiceName'
-> CreateVPCEndpoint
createVPCEndpoint pVPCId_ pServiceName_ =
CreateVPCEndpoint'
{ _cvePolicyDocument = Nothing
, _cveClientToken = Nothing
, _cveDryRun = Nothing
, _cveRouteTableIds = Nothing
, _cveVPCId = pVPC... | 367 | createVPCEndpoint pVPCId_ pServiceName_ =
CreateVPCEndpoint'
{ _cvePolicyDocument = Nothing
, _cveClientToken = Nothing
, _cveDryRun = Nothing
, _cveRouteTableIds = Nothing
, _cveVPCId = pVPCId_
, _cveServiceName = pServiceName_
} | 262 | true | true | 0 | 6 | 140 | 79 | 54 | 25 | null | null |
sdiehl/ghc | compiler/typecheck/FamInst.hs | bsd-3-clause | {- Note [Home package family instances]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Optimization: If we're only defining type family instances
for type families *defined in the home package*, then we
only have to load interface files that belong to the home
package. The reason is that there's no recursion between
packages,... | 2,344 | addLocalFamInst :: (FamInstEnv,[FamInst])
-> FamInst
-> TcM (FamInstEnv, [FamInst])
addLocalFamInst (home_fie, my_fis) fam_inst
-- home_fie includes home package and this module
-- my_fies is just the ones from this module
= do { traceTc "addLocalFamInst" (ppr fam_inst)... | 1,435 | addLocalFamInst (home_fie, my_fis) fam_inst
-- home_fie includes home package and this module
-- my_fies is just the ones from this module
= do { traceTc "addLocalFamInst" (ppr fam_inst)
-- Unlike the case of class instances, don't override existing
-- instances in GHCi; it's un... | 1,319 | true | true | 0 | 12 | 628 | 228 | 126 | 102 | null | null |
mettekou/ghc | compiler/ghci/ByteCodeGen.hs | bsd-3-clause | emitBc :: ([FFIInfo] -> ProtoBCO Name) -> BcM (ProtoBCO Name)
emitBc bco
= BcM $ \st -> return (st{ffis=[]}, bco (ffis st)) | 125 | emitBc :: ([FFIInfo] -> ProtoBCO Name) -> BcM (ProtoBCO Name)
emitBc bco
= BcM $ \st -> return (st{ffis=[]}, bco (ffis st)) | 125 | emitBc bco
= BcM $ \st -> return (st{ffis=[]}, bco (ffis st)) | 63 | false | true | 2 | 9 | 23 | 83 | 41 | 42 | null | null |
polachok/hs-nginx | src/Nginx/Http/Proxy.hs | mit | proxyIgnoreHeaders = (uncurry ProxyIgnoreHeadersDirective) <$> keyValueDirective "proxy_ignore_headers" | 103 | proxyIgnoreHeaders = (uncurry ProxyIgnoreHeadersDirective) <$> keyValueDirective "proxy_ignore_headers" | 103 | proxyIgnoreHeaders = (uncurry ProxyIgnoreHeadersDirective) <$> keyValueDirective "proxy_ignore_headers" | 103 | false | false | 0 | 7 | 6 | 19 | 9 | 10 | null | null |
diagrams/diagrams-contrib | src/Diagrams/Color/XKCD.hs | bsd-3-clause | tea = fromJust $ readHexColor "#65ab7c" | 57 | tea = fromJust $ readHexColor "#65ab7c" | 57 | tea = fromJust $ readHexColor "#65ab7c" | 57 | false | false | 0 | 6 | 23 | 13 | 6 | 7 | null | null |
ice1000/OI-codes | codewars/101-200/valid-braces.hs | agpl-3.0 | validBraces xs = not (xs == exes) && validBraces exes
where exes = replace "{}" "" (replace "()" "" (replace "[]" "" xs))
-- | 136 | validBraces xs = not (xs == exes) && validBraces exes
where exes = replace "{}" "" (replace "()" "" (replace "[]" "" xs))
-- | 136 | validBraces xs = not (xs == exes) && validBraces exes
where exes = replace "{}" "" (replace "()" "" (replace "[]" "" xs))
-- | 136 | false | false | 2 | 9 | 35 | 68 | 30 | 38 | null | null |
tphyahoo/haskoin | haskoin-wallet/Network/Haskoin/Wallet/Client/Commands.hs | unlicense | cmdStop :: Handler ()
cmdStop = R.ask >>= \cfg -> liftIO $ do
stopSPVServer cfg
putStrLn "Process stopped" | 114 | cmdStop :: Handler ()
cmdStop = R.ask >>= \cfg -> liftIO $ do
stopSPVServer cfg
putStrLn "Process stopped" | 114 | cmdStop = R.ask >>= \cfg -> liftIO $ do
stopSPVServer cfg
putStrLn "Process stopped" | 92 | false | true | 0 | 10 | 25 | 43 | 20 | 23 | null | null |
paterson/interpreter | src/Program.hs | bsd-3-clause | failingProgram :: Program
failingProgram = do
"arg" .= int 10
"unusedvar" .= int 4
"scratch" .= var "arg"
"total" .= int 1
while ( (var "scratch") `Gt` (int 1) ) (
do "total" .= "total" .* "scratch"
... | 463 | failingProgram :: Program
failingProgram = do
"arg" .= int 10
"unusedvar" .= int 4
"scratch" .= var "arg"
"total" .= int 1
while ( (var "scratch") `Gt` (int 1) ) (
do "total" .= "total" .* "scratch"
... | 463 | failingProgram = do
"arg" .= int 10
"unusedvar" .= int 4
"scratch" .= var "arg"
"total" .= int 1
while ( (var "scratch") `Gt` (int 1) ) (
do "total" .= "total" .* "scratch"
"scratch" .= "s... | 437 | false | true | 0 | 13 | 236 | 138 | 62 | 76 | null | null |
dolio/irc-core | src/Client/Commands/Arguments/Spec.hs | isc | extensionArg :: String -> (r -> String -> Maybe (Args r a)) -> Args r a
extensionArg name parser = liftAp (Extension name parser) | 129 | extensionArg :: String -> (r -> String -> Maybe (Args r a)) -> Args r a
extensionArg name parser = liftAp (Extension name parser) | 129 | extensionArg name parser = liftAp (Extension name parser) | 57 | false | true | 0 | 12 | 23 | 62 | 30 | 32 | null | null |
ntc2/cryptol | src/Cryptol/REPL/Monad.hs | bsd-3-clause | checkInfLength :: EnvVal -> IO (Maybe String)
checkInfLength val = case val of
EnvNum n
| n >= 0 -> return Nothing
| otherwise -> return $ Just "the number of elements should be positive"
_ -> return $ Just "unable to parse a value for infLength" | 261 | checkInfLength :: EnvVal -> IO (Maybe String)
checkInfLength val = case val of
EnvNum n
| n >= 0 -> return Nothing
| otherwise -> return $ Just "the number of elements should be positive"
_ -> return $ Just "unable to parse a value for infLength" | 261 | checkInfLength val = case val of
EnvNum n
| n >= 0 -> return Nothing
| otherwise -> return $ Just "the number of elements should be positive"
_ -> return $ Just "unable to parse a value for infLength" | 215 | false | true | 0 | 11 | 61 | 86 | 38 | 48 | null | null |
agrafix/hackage-server | Distribution/Client/Mirror/Session.hs | bsd-3-clause | requestGET :: URI -> HttpSession (Either ErrorResponse ByteString)
requestGET uri = do
(_, rsp) <- request (Request uri GET headers BS.empty)
case rspCode rsp of
(2,0,0) -> return (Right (rspBody rsp))
_ -> return (Left (mkErrorResponse uri rsp))
where
headers = [] | 298 | requestGET :: URI -> HttpSession (Either ErrorResponse ByteString)
requestGET uri = do
(_, rsp) <- request (Request uri GET headers BS.empty)
case rspCode rsp of
(2,0,0) -> return (Right (rspBody rsp))
_ -> return (Left (mkErrorResponse uri rsp))
where
headers = [] | 298 | requestGET uri = do
(_, rsp) <- request (Request uri GET headers BS.empty)
case rspCode rsp of
(2,0,0) -> return (Right (rspBody rsp))
_ -> return (Left (mkErrorResponse uri rsp))
where
headers = [] | 231 | false | true | 0 | 14 | 74 | 132 | 65 | 67 | null | null |
timthelion/fenfire | Fenfire/RDF.hs | gpl-2.0 | writeTriple nss (s,p,o) =
(concat $ intersperse " " $ map (showNode nss) [s,p,o]) ++ ".\n" | 94 | writeTriple nss (s,p,o) =
(concat $ intersperse " " $ map (showNode nss) [s,p,o]) ++ ".\n" | 94 | writeTriple nss (s,p,o) =
(concat $ intersperse " " $ map (showNode nss) [s,p,o]) ++ ".\n" | 94 | false | false | 0 | 10 | 19 | 60 | 31 | 29 | null | null |
rueshyna/gogol | gogol-spectrum/gen/Network/Google/Spectrum/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'DeviceOwner' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'doOperator'
--
-- * 'doOwner'
deviceOwner
:: DeviceOwner
deviceOwner =
DeviceOwner'
{ _doOperator = Nothing
, _doOwner = Nothing
... | 322 | deviceOwner
:: DeviceOwner
deviceOwner =
DeviceOwner'
{ _doOperator = Nothing
, _doOwner = Nothing
} | 120 | deviceOwner =
DeviceOwner'
{ _doOperator = Nothing
, _doOwner = Nothing
} | 89 | true | true | 0 | 7 | 72 | 42 | 24 | 18 | null | null |
m-alvarez/jhc | src/FrontEnd/Tc/Class.hs | mit | --match' (TMetaVar mv) t | kind mv == kind t = return [(mv,t)]
match' (TCon tc1) (TCon tc2) | tc1==tc2 = return mempty | 118 | match' (TCon tc1) (TCon tc2) | tc1==tc2 = return mempty | 55 | match' (TCon tc1) (TCon tc2) | tc1==tc2 = return mempty | 55 | true | false | 0 | 8 | 22 | 37 | 17 | 20 | null | null |
andir/ganeti | src/Ganeti/OpCodes.hs | bsd-2-clause | opSummaryVal OpInstanceFailover { opInstanceName = s } = Just s | 63 | opSummaryVal OpInstanceFailover { opInstanceName = s } = Just s | 63 | opSummaryVal OpInstanceFailover { opInstanceName = s } = Just s | 63 | false | false | 0 | 8 | 9 | 21 | 10 | 11 | null | null |
da-x/lamdu | Lamdu/Builtins/PrimVal.hs | gpl-3.0 | nameOf :: T.NominalId -> String
nameOf p
| p == bytesTid = "Bytes"
| p == floatTid = "Num"
| otherwise = error $ "Invalid prim id: " ++ show p | 154 | nameOf :: T.NominalId -> String
nameOf p
| p == bytesTid = "Bytes"
| p == floatTid = "Num"
| otherwise = error $ "Invalid prim id: " ++ show p | 154 | nameOf p
| p == bytesTid = "Bytes"
| p == floatTid = "Num"
| otherwise = error $ "Invalid prim id: " ++ show p | 122 | false | true | 2 | 8 | 42 | 61 | 29 | 32 | null | null |
jystic/ntpmon | src/Network/NTP.hs | bsd-3-clause | -- | Simple linear regression between 2 samples.
-- Takes two vectors Y={yi} and X={xi} and returns
-- (alpha, beta, r*r) such that Y = alpha + beta*X
linearRegression :: S.Sample -> S.WeightedSample -> (Double, Double)
linearRegression xs ys = (alpha, beta)
where
!c = U.sum (U.zipWith (*) (U.map (subtrac... | 611 | linearRegression :: S.Sample -> S.WeightedSample -> (Double, Double)
linearRegression xs ys = (alpha, beta)
where
!c = U.sum (U.zipWith (*) (U.map (subtract mx) xs) (U.map (subtract my . fst) ys)) / (n-1)
!r = c / (sx * sy)
!mx = S.mean xs
!my = S.meanWeighted ys
!sx = S.stdDev xs... | 456 | linearRegression xs ys = (alpha, beta)
where
!c = U.sum (U.zipWith (*) (U.map (subtract mx) xs) (U.map (subtract my . fst) ys)) / (n-1)
!r = c / (sx * sy)
!mx = S.mean xs
!my = S.meanWeighted ys
!sx = S.stdDev xs
!sy = sqrt (S.varianceWeighted ys)
!n = fromIntegral ... | 387 | true | true | 6 | 12 | 170 | 249 | 118 | 131 | null | null |
vinnymac/glot-www | Util/Http.hs | mit | httpGet :: String -> Maybe Text -> IO L.ByteString
httpGet url authToken = do
r <- getWith (reqOptions authToken) url
return $ r ^. responseBody | 152 | httpGet :: String -> Maybe Text -> IO L.ByteString
httpGet url authToken = do
r <- getWith (reqOptions authToken) url
return $ r ^. responseBody | 152 | httpGet url authToken = do
r <- getWith (reqOptions authToken) url
return $ r ^. responseBody | 101 | false | true | 0 | 10 | 32 | 66 | 29 | 37 | null | null |
tjakway/ghcjvm | compiler/nativeGen/RegAlloc/Liveness.hs | bsd-3-clause | livenessSCCs platform blockmap done (AcyclicSCC block : sccs)
= let (blockmap', block') = livenessBlock platform blockmap block
in livenessSCCs platform blockmap' (AcyclicSCC block' : done) sccs | 205 | livenessSCCs platform blockmap done (AcyclicSCC block : sccs)
= let (blockmap', block') = livenessBlock platform blockmap block
in livenessSCCs platform blockmap' (AcyclicSCC block' : done) sccs | 205 | livenessSCCs platform blockmap done (AcyclicSCC block : sccs)
= let (blockmap', block') = livenessBlock platform blockmap block
in livenessSCCs platform blockmap' (AcyclicSCC block' : done) sccs | 205 | false | false | 0 | 9 | 36 | 72 | 33 | 39 | null | null |
bobatkey/Forvie | src/Data/MonadicStream.hs | bsd-3-clause | (|>|) :: Monad m => Stream m a -> Reader a m b -> m b
stream |>| reader = do
readerStep <- forceReader reader
case readerStep of
Read k ->
do streamStep <- forceStream stream
case streamStep of
StreamElem a stream' -> stream' |>| k (Just a)
StreamEnd -> ni... | 374 | (|>|) :: Monad m => Stream m a -> Reader a m b -> m b
stream |>| reader = do
readerStep <- forceReader reader
case readerStep of
Read k ->
do streamStep <- forceStream stream
case streamStep of
StreamElem a stream' -> stream' |>| k (Just a)
StreamEnd -> ni... | 374 | stream |>| reader = do
readerStep <- forceReader reader
case readerStep of
Read k ->
do streamStep <- forceStream stream
case streamStep of
StreamElem a stream' -> stream' |>| k (Just a)
StreamEnd -> nil |>| k Nothing
ReadEnd b ->
return b
| 320 | false | true | 0 | 18 | 139 | 144 | 64 | 80 | null | null |
haskell-opengl/OpenGLRaw | src/Graphics/GL/Functions/F11.hs | bsd-3-clause | -- glGetPerfMonitorCounterDataAMD ----------------------------------------------
glGetPerfMonitorCounterDataAMD
:: MonadIO m
=> GLuint -- ^ @monitor@.
-> GLenum -- ^ @pname@.
-> GLsizei -- ^ @dataSize@.
-> Ptr GLuint -- ^ @data@ pointing to @dataSize@ elements of type @GLuint@.
-> Ptr GLint -- ^ @bytesWrit... | 489 | glGetPerfMonitorCounterDataAMD
:: MonadIO m
=> GLuint -- ^ @monitor@.
-> GLenum -- ^ @pname@.
-> GLsizei -- ^ @dataSize@.
-> Ptr GLuint -- ^ @data@ pointing to @dataSize@ elements of type @GLuint@.
-> Ptr GLint -- ^ @bytesWritten@ pointing to @1@ element of type @GLint@.
-> m ()
glGetPerfMonitorCounterDat... | 407 | glGetPerfMonitorCounterDataAMD v1 v2 v3 v4 v5 = liftIO $ dyn400 ptr_glGetPerfMonitorCounterDataAMD v1 v2 v3 v4 v5 | 113 | true | true | 0 | 13 | 81 | 87 | 43 | 44 | null | null |
agentm/project-m36 | src/bin/TutorialD/Interpreter/RelationalExpr.hs | unlicense | doubleAtomP :: Parser Atom
doubleAtomP = DoubleAtom <$> float | 61 | doubleAtomP :: Parser Atom
doubleAtomP = DoubleAtom <$> float | 61 | doubleAtomP = DoubleAtom <$> float | 34 | false | true | 0 | 5 | 8 | 18 | 9 | 9 | null | null |
forste/haReFork | refactorer/RefacFunDef.hs | bsd-3-clause | {- = if i == i2
then True
else checkInPat pats exp1 -}
checkInPat (pat1@(Pat (HsPParen pat)):pats) exp
| (checkInPat [pat] exp) == False = checkInPat pats exp
| otherwise = True | 216 | checkInPat (pat1@(Pat (HsPParen pat)):pats) exp
| (checkInPat [pat] exp) == False = checkInPat pats exp
| otherwise = True | 148 | checkInPat (pat1@(Pat (HsPParen pat)):pats) exp
| (checkInPat [pat] exp) == False = checkInPat pats exp
| otherwise = True | 148 | true | false | 1 | 12 | 70 | 68 | 34 | 34 | null | null |
jfischoff/hs-mitsuba | tests/Tests/Mitsuba/Types.hs | bsd-3-clause | -- __case_Child_toXML =
case_WavelengthStyle_toAttributeValue =
toAttributeValue (WavelengthStyle $ AtLeastTwo $ M.fromList
[ (PositiveDouble 400, 0.56)
, (PositiveDouble 500, 0.18)
, (PositiveDouble 600, 0.58)
, (... | 432 | case_WavelengthStyle_toAttributeValue =
toAttributeValue (WavelengthStyle $ AtLeastTwo $ M.fromList
[ (PositiveDouble 400, 0.56)
, (PositiveDouble 500, 0.18)
, (PositiveDouble 600, 0.58)
, (PositiveDouble 700, 0.24)
... | 403 | case_WavelengthStyle_toAttributeValue =
toAttributeValue (WavelengthStyle $ AtLeastTwo $ M.fromList
[ (PositiveDouble 400, 0.56)
, (PositiveDouble 500, 0.18)
, (PositiveDouble 600, 0.58)
, (PositiveDouble 700, 0.24)
... | 403 | true | false | 0 | 12 | 169 | 78 | 43 | 35 | null | null |
adept/hledger | hledger-ui/Hledger/UI/UIUtils.hs | gpl-3.0 | listScrollPushingSelection :: (Ord n, Foldable t, Splittable t) =>
n -> GenericList n t e -> Int -> Int -> EventM n (GenericList n t e)
listScrollPushingSelection name list listheight scrollamt = do
viewportScroll name `vScrollBy` scrollamt
mvp <- lookupViewport name
case mvp of
Just VP{_vpTop, _vpSize=(_,... | 763 | listScrollPushingSelection :: (Ord n, Foldable t, Splittable t) =>
n -> GenericList n t e -> Int -> Int -> EventM n (GenericList n t e)
listScrollPushingSelection name list listheight scrollamt = do
viewportScroll name `vScrollBy` scrollamt
mvp <- lookupViewport name
case mvp of
Just VP{_vpTop, _vpSize=(_,... | 763 | listScrollPushingSelection name list listheight scrollamt = do
viewportScroll name `vScrollBy` scrollamt
mvp <- lookupViewport name
case mvp of
Just VP{_vpTop, _vpSize=(_,vpheight)} -> do
let mselidx = listSelected list
case mselidx of
Just selidx -> return $ pushsel list
where
... | 624 | false | true | 1 | 14 | 245 | 250 | 127 | 123 | null | null |
alexlegg/couchgames | app/Main.hs | bsd-3-clause | main :: IO ()
main = getArgs >>= parse >> exit | 46 | main :: IO ()
main = getArgs >>= parse >> exit | 46 | main = getArgs >>= parse >> exit | 32 | false | true | 0 | 6 | 10 | 24 | 12 | 12 | null | null |
authchir/SoSe17-FFP-haskell-http2-server | src/StreamsImpl.hs | gpl-3.0 | resciveAction :: TChan ByteString -> (Int -> IO ByteString)
resciveAction chan count = do
bs <- atomically $ readTChan chan
if BS.null bs
then do
atomically $ unGetTChan chan BS.empty
return BS.empty
else i... | 1,109 | resciveAction :: TChan ByteString -> (Int -> IO ByteString)
resciveAction chan count = do
bs <- atomically $ readTChan chan
if BS.null bs
then do
atomically $ unGetTChan chan BS.empty
return BS.empty
else i... | 1,109 | resciveAction chan count = do
bs <- atomically $ readTChan chan
if BS.null bs
then do
atomically $ unGetTChan chan BS.empty
return BS.empty
else if BS.length bs >= (fromIntegral count)
... | 1,049 | false | true | 0 | 18 | 548 | 306 | 141 | 165 | null | null |
AndrewRademacher/stack | src/Stack/Upload.hs | bsd-3-clause | handleIO :: (E.IOException -> IO a) -> IO a -> IO a
handleIO = E.handle | 71 | handleIO :: (E.IOException -> IO a) -> IO a -> IO a
handleIO = E.handle | 71 | handleIO = E.handle | 19 | false | true | 0 | 9 | 14 | 45 | 20 | 25 | null | null |
trskop/install-paths | src/System/Environment/InstallPaths.hs | bsd-3-clause | -- | @'getBaseDir_' = 'getBaseDir' 'def'@
getSysconfigDir_ :: IO FilePath
getSysconfigDir_ = getSysconfigDir def | 112 | getSysconfigDir_ :: IO FilePath
getSysconfigDir_ = getSysconfigDir def | 70 | getSysconfigDir_ = getSysconfigDir def | 38 | true | true | 0 | 5 | 13 | 18 | 9 | 9 | null | null |
nkaretnikov/ghc | compiler/utils/Outputable.hs | bsd-3-clause | pprDeeper :: SDoc -> SDoc
pprDeeper d = SDoc $ \ctx -> case ctx of
SDC{sdocStyle=PprUser _ (PartWay 0)} -> Pretty.text "..."
SDC{sdocStyle=PprUser q (PartWay n)} ->
runSDoc d ctx{sdocStyle = PprUser q (PartWay (n-1))}
_ -> runSDoc d ctx | 246 | pprDeeper :: SDoc -> SDoc
pprDeeper d = SDoc $ \ctx -> case ctx of
SDC{sdocStyle=PprUser _ (PartWay 0)} -> Pretty.text "..."
SDC{sdocStyle=PprUser q (PartWay n)} ->
runSDoc d ctx{sdocStyle = PprUser q (PartWay (n-1))}
_ -> runSDoc d ctx | 246 | pprDeeper d = SDoc $ \ctx -> case ctx of
SDC{sdocStyle=PprUser _ (PartWay 0)} -> Pretty.text "..."
SDC{sdocStyle=PprUser q (PartWay n)} ->
runSDoc d ctx{sdocStyle = PprUser q (PartWay (n-1))}
_ -> runSDoc d ctx | 220 | false | true | 4 | 12 | 49 | 132 | 65 | 67 | null | null |
frantisekfarka/ghc-dsi | compiler/vectorise/Vectorise/Convert.hs | bsd-3-clause | identityConv (TyConApp tycon tys)
= do { mapM_ identityConv tys
; identityConvTyCon tycon
} | 107 | identityConv (TyConApp tycon tys)
= do { mapM_ identityConv tys
; identityConvTyCon tycon
} | 107 | identityConv (TyConApp tycon tys)
= do { mapM_ identityConv tys
; identityConvTyCon tycon
} | 107 | false | false | 0 | 7 | 29 | 34 | 16 | 18 | null | null |
mcschroeder/ghc | compiler/utils/FV.hs | bsd-3-clause | -- | Run a free variable computation, returning a deterministic set of free
-- variables. Note that this is just a wrapper around the version that
-- returns a deterministic list. If you need a list you should use
-- `runFVList`.
runFVDSet :: FV -> DVarSet
runFVDSet = mkDVarSet . fst . runFV | 292 | runFVDSet :: FV -> DVarSet
runFVDSet = mkDVarSet . fst . runFV | 62 | runFVDSet = mkDVarSet . fst . runFV | 35 | true | true | 0 | 6 | 52 | 27 | 16 | 11 | null | null |
olsner/ghc | compiler/basicTypes/MkId.hs | bsd-3-clause | voidPrimId :: Id -- Global constant :: Void#
voidPrimId = pcMiscPrelId voidPrimIdName voidPrimTy
(noCafIdInfo `setUnfoldingInfo` evaldUnfolding) | 165 | voidPrimId :: Id
voidPrimId = pcMiscPrelId voidPrimIdName voidPrimTy
(noCafIdInfo `setUnfoldingInfo` evaldUnfolding) | 133 | voidPrimId = pcMiscPrelId voidPrimIdName voidPrimTy
(noCafIdInfo `setUnfoldingInfo` evaldUnfolding) | 116 | true | true | 0 | 7 | 36 | 28 | 16 | 12 | null | null |
nevrenato/Hets_Fork | THF/ParseTHF0.hs | gpl-2.0 | thfBinaryFormula :: CharParser st THFBinaryFormula
thfBinaryFormula = fmap TBF_THF_Binary_Tuple thfBinaryTuple
<|> do
(uff, pc) <- try $ do
uff1 <- thfUnitaryFormula
pc1 <- thfPairConnective
return (uff1, pc1)
ufb <- thfUnitaryFormula
return $ TBF_THF_Binary_Pair uff pc ufb | 312 | thfBinaryFormula :: CharParser st THFBinaryFormula
thfBinaryFormula = fmap TBF_THF_Binary_Tuple thfBinaryTuple
<|> do
(uff, pc) <- try $ do
uff1 <- thfUnitaryFormula
pc1 <- thfPairConnective
return (uff1, pc1)
ufb <- thfUnitaryFormula
return $ TBF_THF_Binary_Pair uff pc ufb | 312 | thfBinaryFormula = fmap TBF_THF_Binary_Tuple thfBinaryTuple
<|> do
(uff, pc) <- try $ do
uff1 <- thfUnitaryFormula
pc1 <- thfPairConnective
return (uff1, pc1)
ufb <- thfUnitaryFormula
return $ TBF_THF_Binary_Pair uff pc ufb | 261 | false | true | 6 | 8 | 73 | 95 | 42 | 53 | null | null |
denibertovic/haskell | kubernetes/lib/Kubernetes/OpenAPI/ModelLens.hs | bsd-3-clause | -- | 'v1ObjectReferenceResourceVersion' Lens
v1ObjectReferenceResourceVersionL :: Lens_' V1ObjectReference (Maybe Text)
v1ObjectReferenceResourceVersionL f V1ObjectReference{..} = (\v1ObjectReferenceResourceVersion -> V1ObjectReference { v1ObjectReferenceResourceVersion, ..} ) <$> f v1ObjectReferenceResourceVersion | 316 | v1ObjectReferenceResourceVersionL :: Lens_' V1ObjectReference (Maybe Text)
v1ObjectReferenceResourceVersionL f V1ObjectReference{..} = (\v1ObjectReferenceResourceVersion -> V1ObjectReference { v1ObjectReferenceResourceVersion, ..} ) <$> f v1ObjectReferenceResourceVersion | 271 | v1ObjectReferenceResourceVersionL f V1ObjectReference{..} = (\v1ObjectReferenceResourceVersion -> V1ObjectReference { v1ObjectReferenceResourceVersion, ..} ) <$> f v1ObjectReferenceResourceVersion | 196 | true | true | 0 | 8 | 23 | 57 | 30 | 27 | null | null |
cryptica/slapnet | src/Solver/SComponent.hs | gpl-3.0 | checkTokens :: PetriNet -> SIMap Place -> SBool
checkTokens net p' =
sum (map addPlace $ linitials net) .== 1
where addPlace (p,i) = literal i * val p' p | 173 | checkTokens :: PetriNet -> SIMap Place -> SBool
checkTokens net p' =
sum (map addPlace $ linitials net) .== 1
where addPlace (p,i) = literal i * val p' p | 173 | checkTokens net p' =
sum (map addPlace $ linitials net) .== 1
where addPlace (p,i) = literal i * val p' p | 125 | false | true | 0 | 8 | 49 | 80 | 37 | 43 | null | null |
ezyang/ghc | compiler/main/DriverPhases.hs | bsd-3-clause | isDynLibFilename platform f = isDynLibSuffix platform (drop 1 $ takeExtension f) | 80 | isDynLibFilename platform f = isDynLibSuffix platform (drop 1 $ takeExtension f) | 80 | isDynLibFilename platform f = isDynLibSuffix platform (drop 1 $ takeExtension f) | 80 | false | false | 0 | 8 | 10 | 29 | 13 | 16 | null | null |
ckaestne/CIDE | other/CaseStudies/fgl/CIDEfgl/Data/Graph/Inductive/Graph.hs | gpl-3.0 | suc :: (Graph gr) => gr a b -> Node -> [Node];
suc = map snd .: context4l | 75 | suc :: (Graph gr) => gr a b -> Node -> [Node]
suc = map snd .: context4l | 72 | suc = map snd .: context4l | 26 | false | true | 3 | 8 | 19 | 53 | 25 | 28 | null | null |
oldmanmike/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | absIntegerIdKey = mkPreludeMiscIdUnique 72 | 56 | absIntegerIdKey = mkPreludeMiscIdUnique 72 | 56 | absIntegerIdKey = mkPreludeMiscIdUnique 72 | 56 | false | false | 0 | 5 | 17 | 9 | 4 | 5 | null | null |
geophf/1HaskellADay | exercises/HAD/Y2021/M03/D01/Exercise.hs | mit | -- ApprovedAliases matches the wikiwinery name to the graph-(indexed)-winery
-- There are various ways to get what we want approved into our approval-list.
-- I'm going to go with the functional approach
approve :: (Name, IxWinery) -> Bool
approve ("Ch\226teau Golan", WN "Ch\\226teau Calon" _) = True | 309 | approve :: (Name, IxWinery) -> Bool
approve ("Ch\226teau Golan", WN "Ch\\226teau Calon" _) = True | 103 | approve ("Ch\226teau Golan", WN "Ch\\226teau Calon" _) = True | 67 | true | true | 0 | 7 | 54 | 38 | 22 | 16 | null | null |
apyrgio/snf-ganeti | src/Ganeti/Constants.hs | bsd-2-clause | nvFileStoragePath :: String
nvFileStoragePath = "file-storage-path" | 67 | nvFileStoragePath :: String
nvFileStoragePath = "file-storage-path" | 67 | nvFileStoragePath = "file-storage-path" | 39 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
keithodulaigh/Hets | Taxonomy/MMiSSOntologyGraph.hs | gpl-2.0 | createEdgeTypes :: ClassGraph -> [(String, DaVinciArcTypeParms A.EdgeValue)]
createEdgeTypes g = map createEdgeType
$ nub (map ( \ (_, _, l) -> l) $ labEdges g) ++ ["instanceOf"]
where
createEdgeType str =
case str of
"isa" ->
("isa",
Thick
$$$ Head "oar... | 836 | createEdgeTypes :: ClassGraph -> [(String, DaVinciArcTypeParms A.EdgeValue)]
createEdgeTypes g = map createEdgeType
$ nub (map ( \ (_, _, l) -> l) $ labEdges g) ++ ["instanceOf"]
where
createEdgeType str =
case str of
"isa" ->
("isa",
Thick
$$$ Head "oar... | 836 | createEdgeTypes g = map createEdgeType
$ nub (map ( \ (_, _, l) -> l) $ labEdges g) ++ ["instanceOf"]
where
createEdgeType str =
case str of
"isa" ->
("isa",
Thick
$$$ Head "oarrow"
$$$ Dir "first"
$$$ emptyArcTypeParms :: D... | 759 | false | true | 2 | 15 | 322 | 224 | 116 | 108 | null | null |
tangboyun/miranda | src/MiRanda/IO.hs | gpl-3.0 | toOutPut spe allUTRFile outPath func mRs =
let dDir = "Diagrams"
outP = outPath </> dDir
targetFile = outPath </> "Target Genes.xml"
siteFile = outPath </> "Target Sites.xml"
hRef = dDir
in if null mRs
then do
mkdir outPath
writeFile (outPath </> "No bindin... | 1,140 | toOutPut spe allUTRFile outPath func mRs =
let dDir = "Diagrams"
outP = outPath </> dDir
targetFile = outPath </> "Target Genes.xml"
siteFile = outPath </> "Target Sites.xml"
hRef = dDir
in if null mRs
then do
mkdir outPath
writeFile (outPath </> "No bindin... | 1,140 | toOutPut spe allUTRFile outPath func mRs =
let dDir = "Diagrams"
outP = outPath </> dDir
targetFile = outPath </> "Target Genes.xml"
siteFile = outPath </> "Target Sites.xml"
hRef = dDir
in if null mRs
then do
mkdir outPath
writeFile (outPath </> "No bindin... | 1,140 | false | false | 0 | 31 | 552 | 291 | 143 | 148 | null | null |
christiaanb/clash-compiler | clash-ghc/src-ghc/CLaSH/GHC/GHC2Core.hs | bsd-2-clause | coreToType' (ForAllTy tv ty) = C.ForAllTy <$>
(bind <$> coreToTyVar tv <*> coreToType ty) | 120 | coreToType' (ForAllTy tv ty) = C.ForAllTy <$>
(bind <$> coreToTyVar tv <*> coreToType ty) | 120 | coreToType' (ForAllTy tv ty) = C.ForAllTy <$>
(bind <$> coreToTyVar tv <*> coreToType ty) | 120 | false | false | 0 | 9 | 44 | 40 | 19 | 21 | null | null |
contivero/diagz | src/Diagz.hs | bsd-3-clause | fname :: Word8 -> Bool
fname = flip testBit 3 | 45 | fname :: Word8 -> Bool
fname = flip testBit 3 | 45 | fname = flip testBit 3 | 22 | false | true | 0 | 5 | 9 | 20 | 10 | 10 | null | null |
foreverbell/project-euler-solutions | lib/Common/NumMod/MkNumMod.hs | bsd-3-clause | mkSignum :: Int -> [Dec]
mkSignum _ = mkUndefined m
where
m = mkName "signum" | 83 | mkSignum :: Int -> [Dec]
mkSignum _ = mkUndefined m
where
m = mkName "signum" | 83 | mkSignum _ = mkUndefined m
where
m = mkName "signum" | 58 | false | true | 1 | 8 | 20 | 44 | 18 | 26 | null | null |
aisamanra/activitystreams-aeson | Codec/ActivityStream/Internal.hs | bsd-3-clause | ensure :: Monad m => String -> HashMap Text Value -> [Text] -> m ()
ensure objName obj keys = mapM_ go keys
where go k
| member k obj = return ()
| otherwise = fail ("Object \"" <> objName <>
"\" does not contain property \"" <>
unpack k ... | 328 | ensure :: Monad m => String -> HashMap Text Value -> [Text] -> m ()
ensure objName obj keys = mapM_ go keys
where go k
| member k obj = return ()
| otherwise = fail ("Object \"" <> objName <>
"\" does not contain property \"" <>
unpack k ... | 328 | ensure objName obj keys = mapM_ go keys
where go k
| member k obj = return ()
| otherwise = fail ("Object \"" <> objName <>
"\" does not contain property \"" <>
unpack k <> "\"") | 260 | false | true | 0 | 11 | 134 | 115 | 53 | 62 | null | null |
andir/ganeti | src/Ganeti/HTools/Program/Hcheck.hs | bsd-2-clause | levelPrefix ClusterLvl = "CLUSTER" | 35 | levelPrefix ClusterLvl = "CLUSTER" | 35 | levelPrefix ClusterLvl = "CLUSTER" | 35 | false | false | 0 | 5 | 4 | 9 | 4 | 5 | null | null |
frantisekfarka/ghc-dsi | compiler/nativeGen/PPC/CodeGen.hs | bsd-3-clause | getAmode (CmmMachOp (MO_Add W32) [x, CmmLit (CmmInt i _)])
| Just off <- makeImmediate W32 True i
= do
(reg, code) <- getSomeReg x
return (Amode (AddrRegImm reg off) code)
-- optimize addition with 32-bit immediate
-- (needed for PIC) | 261 | getAmode (CmmMachOp (MO_Add W32) [x, CmmLit (CmmInt i _)])
| Just off <- makeImmediate W32 True i
= do
(reg, code) <- getSomeReg x
return (Amode (AddrRegImm reg off) code)
-- optimize addition with 32-bit immediate
-- (needed for PIC) | 261 | getAmode (CmmMachOp (MO_Add W32) [x, CmmLit (CmmInt i _)])
| Just off <- makeImmediate W32 True i
= do
(reg, code) <- getSomeReg x
return (Amode (AddrRegImm reg off) code)
-- optimize addition with 32-bit immediate
-- (needed for PIC) | 261 | false | false | 0 | 12 | 66 | 101 | 48 | 53 | null | null |
katydid/haslapse | src/Data/Katydid/Relapse/MemDerive.hs | bsd-3-clause | returns :: Grammar -> ([Pattern], [Bool]) -> State Mem [Pattern]
returns g k = state $ \(Mem (c, r)) ->
let (v', r') = mem (Derive.returns g) k r in (v', Mem (c, r')) | 168 | returns :: Grammar -> ([Pattern], [Bool]) -> State Mem [Pattern]
returns g k = state $ \(Mem (c, r)) ->
let (v', r') = mem (Derive.returns g) k r in (v', Mem (c, r')) | 168 | returns g k = state $ \(Mem (c, r)) ->
let (v', r') = mem (Derive.returns g) k r in (v', Mem (c, r')) | 103 | false | true | 0 | 14 | 35 | 113 | 61 | 52 | null | null |
ideas-edu/ideas | src/Ideas/Service/Submit.hs | apache-2.0 | submit :: State a -> Context a -> Result a
submit state ctx = fromDiagnose (diagnose state ctx Nothing) | 104 | submit :: State a -> Context a -> Result a
submit state ctx = fromDiagnose (diagnose state ctx Nothing) | 103 | submit state ctx = fromDiagnose (diagnose state ctx Nothing) | 60 | false | true | 0 | 8 | 19 | 50 | 22 | 28 | null | null |
fpco/fay | src/Fay/Compiler/Misc.hs | bsd-3-clause | tryResolveName q@(Qual _ (ModuleName _ "Fay$") _) = Just $ unAnn q | 80 | tryResolveName q@(Qual _ (ModuleName _ "Fay$") _) = Just $ unAnn q | 80 | tryResolveName q@(Qual _ (ModuleName _ "Fay$") _) = Just $ unAnn q | 80 | false | false | 0 | 10 | 25 | 37 | 18 | 19 | null | null |
GaloisInc/halvm-ghc | compiler/deSugar/DsBinds.hs | bsd-3-clause | -- | Desugar all other kind of bindings, Ids of strict binds are returned to
-- later be forced in the binding gorup body, see Note [Desugar Strict binds]
dsLHsBinds :: LHsBinds Id
-> DsM ([Id], [(Id,CoreExpr)])
dsLHsBinds binds = do { (force_vars, binds') <- ds_lhs_binds binds
; return... | 343 | dsLHsBinds :: LHsBinds Id
-> DsM ([Id], [(Id,CoreExpr)])
dsLHsBinds binds = do { (force_vars, binds') <- ds_lhs_binds binds
; return (force_vars, binds') } | 188 | dsLHsBinds binds = do { (force_vars, binds') <- ds_lhs_binds binds
; return (force_vars, binds') } | 120 | true | true | 0 | 9 | 84 | 75 | 42 | 33 | null | null |
ghc-android/ghc | compiler/utils/Digraph.hs | bsd-3-clause | graphFromEdgedVertices edged_vertices = Graph graph vertex_fn (key_vertex . key_extractor)
where key_extractor (_, k, _) = k
(bounds, vertex_fn, key_vertex, numbered_nodes) = reduceNodesIntoVertices edged_vertices key_extractor
graph = array bounds [(v, mapMaybe key_vertex ks) | (v, (_, _, ks)) <- num... | 332 | graphFromEdgedVertices edged_vertices = Graph graph vertex_fn (key_vertex . key_extractor)
where key_extractor (_, k, _) = k
(bounds, vertex_fn, key_vertex, numbered_nodes) = reduceNodesIntoVertices edged_vertices key_extractor
graph = array bounds [(v, mapMaybe key_vertex ks) | (v, (_, _, ks)) <- num... | 332 | graphFromEdgedVertices edged_vertices = Graph graph vertex_fn (key_vertex . key_extractor)
where key_extractor (_, k, _) = k
(bounds, vertex_fn, key_vertex, numbered_nodes) = reduceNodesIntoVertices edged_vertices key_extractor
graph = array bounds [(v, mapMaybe key_vertex ks) | (v, (_, _, ks)) <- num... | 332 | false | false | 1 | 10 | 56 | 119 | 62 | 57 | null | null |
dorchard/gram_lang | frontend/src/Language/Granule/Syntax/Type.hs | bsd-3-clause | normalise (CZero (TyApp (TyCon (Id "Interval" "Interval")) t)) =
(CInterval (normalise (CZero t)) (normalise (CZero t))) | 128 | normalise (CZero (TyApp (TyCon (Id "Interval" "Interval")) t)) =
(CInterval (normalise (CZero t)) (normalise (CZero t))) | 128 | normalise (CZero (TyApp (TyCon (Id "Interval" "Interval")) t)) =
(CInterval (normalise (CZero t)) (normalise (CZero t))) | 128 | false | false | 0 | 13 | 23 | 69 | 34 | 35 | null | null |
akfidjeland/NeMo | src/api/autogen/Matlab.hs | gpl-2.0 | commentLine :: Doc -> Doc
commentLine = (<+>) $ char '%' | 56 | commentLine :: Doc -> Doc
commentLine = (<+>) $ char '%' | 56 | commentLine = (<+>) $ char '%' | 30 | false | true | 2 | 7 | 10 | 32 | 14 | 18 | null | null |
frontrowed/stratosphere | library-gen/Stratosphere/Resources/EMRCluster.hs | mit | -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticmapreduce-cluster.html#cfn-elasticmapreduce-cluster-additionalinfo
emrcAdditionalInfo :: Lens' EMRCluster (Maybe Object)
emrcAdditionalInfo = lens _eMRClusterAdditionalInfo (\s a -> s { _eMRClusterAdditionalInfo = a }) | 305 | emrcAdditionalInfo :: Lens' EMRCluster (Maybe Object)
emrcAdditionalInfo = lens _eMRClusterAdditionalInfo (\s a -> s { _eMRClusterAdditionalInfo = a }) | 151 | emrcAdditionalInfo = lens _eMRClusterAdditionalInfo (\s a -> s { _eMRClusterAdditionalInfo = a }) | 97 | true | true | 0 | 9 | 21 | 46 | 25 | 21 | null | null |
OS2World/DEV-UTIL-HUGS | libraries/Graphics/Rendering/OpenGL/GL/Antialiasing.hs | bsd-3-clause | antialiasingInfo :: GetPName -> GettableStateVar GLsizei
antialiasingInfo = makeGettableStateVar . getSizei1 id | 111 | antialiasingInfo :: GetPName -> GettableStateVar GLsizei
antialiasingInfo = makeGettableStateVar . getSizei1 id | 111 | antialiasingInfo = makeGettableStateVar . getSizei1 id | 54 | false | true | 0 | 6 | 11 | 25 | 12 | 13 | null | null |
mariefarrell/Hets | Common/ProofUtils.hs | gpl-2.0 | -- | collect the mapping of new to old names
collectNameMapping :: [Named a] -> [Named a] -> Map.Map String String
collectNameMapping ns os = if any (null . senAttr) os
then error "Common.ProofUtils.collectNameMapping"
else Map.fromList $ zipWith (\ n o -> (senAttr n, senAttr o)) ns os | 290 | collectNameMapping :: [Named a] -> [Named a] -> Map.Map String String
collectNameMapping ns os = if any (null . senAttr) os
then error "Common.ProofUtils.collectNameMapping"
else Map.fromList $ zipWith (\ n o -> (senAttr n, senAttr o)) ns os | 245 | collectNameMapping ns os = if any (null . senAttr) os
then error "Common.ProofUtils.collectNameMapping"
else Map.fromList $ zipWith (\ n o -> (senAttr n, senAttr o)) ns os | 175 | true | true | 0 | 11 | 51 | 102 | 52 | 50 | null | null |
b1g3ar5/Sync | src/Sync.hs | gpl-3.0 | oCopy new (Dir _ []) = new
| 27 | toCopy new (Dir _ []) = new | 27 | toCopy new (Dir _ []) = new | 27 | false | false | 0 | 8 | 7 | 21 | 10 | 11 | null | null |
mboogerd/hello-haskell | src/lyah/InputOutput.hs | apache-2.0 | appendTodo = do
todoItem <- getLine
appendFile "todo.txt" (todoItem ++ "\n")
-- hSetBuffering allows the control over buffering
-- data BufferMode = NoBuffering | LineBuffering | BlockBuffering (Maybe Int)
-- hFlush takes a handle and returns an I/O action that will flush the buffer of the file associated with... | 331 | appendTodo = do
todoItem <- getLine
appendFile "todo.txt" (todoItem ++ "\n")
-- hSetBuffering allows the control over buffering
-- data BufferMode = NoBuffering | LineBuffering | BlockBuffering (Maybe Int)
-- hFlush takes a handle and returns an I/O action that will flush the buffer of the file associated with... | 331 | appendTodo = do
todoItem <- getLine
appendFile "todo.txt" (todoItem ++ "\n")
-- hSetBuffering allows the control over buffering
-- data BufferMode = NoBuffering | LineBuffering | BlockBuffering (Maybe Int)
-- hFlush takes a handle and returns an I/O action that will flush the buffer of the file associated with... | 331 | false | false | 0 | 9 | 59 | 31 | 16 | 15 | null | null |
acowley/ghc | compiler/iface/IfaceType.hs | bsd-3-clause | eqIfaceCoercion env (IfaceFunCo eq1 co11 co12) (IfaceFunCo eq2 co21 co22)
= eq1 == eq2 && eqIfaceCoercion env co11 co21
&& eqIfaceCoercion env co12 co22 | 169 | eqIfaceCoercion env (IfaceFunCo eq1 co11 co12) (IfaceFunCo eq2 co21 co22)
= eq1 == eq2 && eqIfaceCoercion env co11 co21
&& eqIfaceCoercion env co12 co22 | 169 | eqIfaceCoercion env (IfaceFunCo eq1 co11 co12) (IfaceFunCo eq2 co21 co22)
= eq1 == eq2 && eqIfaceCoercion env co11 co21
&& eqIfaceCoercion env co12 co22 | 169 | false | false | 0 | 7 | 40 | 59 | 28 | 31 | null | null |
zearen-wover/ponselciha | Lojban/Ponjo/Transcribe/Kana.hs | bsd-3-clause | tsVowelP' :: Stream s m Char => Hyakuyonjuuon -> Char -> ParsecT s u m String
tsVowelP' kana c = (<?> "vowel") $ do
vs <- fullVowelP
if vs `elem` [["ai"], ["ei"], ["oi"], ["au"]]
then choice
[ do
let [v, iu] = head vs
vs <- fullVowelP
return $ lookupKana kana c... | 571 | tsVowelP' :: Stream s m Char => Hyakuyonjuuon -> Char -> ParsecT s u m String
tsVowelP' kana c = (<?> "vowel") $ do
vs <- fullVowelP
if vs `elem` [["ai"], ["ei"], ["oi"], ["au"]]
then choice
[ do
let [v, iu] = head vs
vs <- fullVowelP
return $ lookupKana kana c... | 571 | tsVowelP' kana c = (<?> "vowel") $ do
vs <- fullVowelP
if vs `elem` [["ai"], ["ei"], ["oi"], ["au"]]
then choice
[ do
let [v, iu] = head vs
vs <- fullVowelP
return $ lookupKana kana c [v]
++ lookupKana kana iu (head vs)
++ transc... | 493 | false | true | 2 | 17 | 207 | 238 | 118 | 120 | null | null |
keithodulaigh/Hets | Common/Lib/Rel.hs | gpl-2.0 | depCycle :: Ord a => [Set.Set a] -> a -> Set.Set a
depCycle cs a = case cs of
[] -> Set.singleton a
c : r ->
if Set.member a c then c else depCycle r a
-- | gets the most right elements of a relation, | 209 | depCycle :: Ord a => [Set.Set a] -> a -> Set.Set a
depCycle cs a = case cs of
[] -> Set.singleton a
c : r ->
if Set.member a c then c else depCycle r a
-- | gets the most right elements of a relation, | 209 | depCycle cs a = case cs of
[] -> Set.singleton a
c : r ->
if Set.member a c then c else depCycle r a
-- | gets the most right elements of a relation, | 158 | false | true | 0 | 10 | 55 | 96 | 46 | 50 | null | null |
geigerzaehler/pladen | Pladen/App/Stream.hs | mit | -- | Stream the audio data as ogg or mp3.
streamTrack :: Track -> Controller
streamTrack track = do
c <- getConfig
let path = musicDir c </> makeRelative (beetsDir c) (trackPath track)
guard =<< liftIO (doesFileExist path)
respond =<< liftIO (response path)
where
response p | trackFormat tra... | 753 | streamTrack :: Track -> Controller
streamTrack track = do
c <- getConfig
let path = musicDir c </> makeRelative (beetsDir c) (trackPath track)
guard =<< liftIO (doesFileExist path)
respond =<< liftIO (response path)
where
response p | trackFormat track == "OGG"
= return $ ... | 711 | streamTrack track = do
c <- getConfig
let path = musicDir c </> makeRelative (beetsDir c) (trackPath track)
guard =<< liftIO (doesFileExist path)
respond =<< liftIO (response path)
where
response p | trackFormat track == "OGG"
= return $ fileResponse mimeOgg p
... | 676 | true | true | 0 | 13 | 250 | 202 | 92 | 110 | null | null |
keera-studios/hsQt | Qtc/ClassTypes/Gui.hs | bsd-2-clause | qCast_QActionGroup :: Object a -> IO (QActionGroup ())
qCast_QActionGroup _qobj
= return (objectCast _qobj) | 109 | qCast_QActionGroup :: Object a -> IO (QActionGroup ())
qCast_QActionGroup _qobj
= return (objectCast _qobj) | 109 | qCast_QActionGroup _qobj
= return (objectCast _qobj) | 54 | false | true | 0 | 9 | 15 | 41 | 19 | 22 | null | null |
tjakway/ghcjvm | compiler/types/Type.hs | bsd-3-clause | equalityTyCon Phantom = eqPhantPrimTyCon | 49 | equalityTyCon Phantom = eqPhantPrimTyCon | 49 | equalityTyCon Phantom = eqPhantPrimTyCon | 49 | false | false | 0 | 4 | 12 | 10 | 4 | 6 | null | null |
ekmett/ghc | ghc/GhciTags.hs | bsd-3-clause | createETagsFileCmd file = ghciCreateTagsFile ETags file | 56 | createETagsFileCmd file = ghciCreateTagsFile ETags file | 56 | createETagsFileCmd file = ghciCreateTagsFile ETags file | 56 | false | false | 0 | 5 | 6 | 14 | 6 | 8 | null | null |
olsner/ghc | utils/genapply/Main.hs | bsd-3-clause | -- Copied from Constants.lhs & CgUtils.hs, i'd rather have this imported:
-- (arity,tag)
tAG_BITS = (TAG_BITS :: Int) | 117 | tAG_BITS = (TAG_BITS :: Int) | 28 | tAG_BITS = (TAG_BITS :: Int) | 28 | true | false | 1 | 5 | 17 | 17 | 9 | 8 | null | null |
gennady-em/haskel | src/PF_Probability.hs | gpl-2.0 | rWalk 1 t = (>>= return . singleton) . t | 40 | rWalk 1 t = (>>= return . singleton) . t | 40 | rWalk 1 t = (>>= return . singleton) . t | 40 | false | false | 1 | 7 | 9 | 28 | 12 | 16 | null | null |
snoyberg/ghc | compiler/prelude/TysPrim.hs | bsd-3-clause | voidPrimTyConName = mkPrimTc (fsLit "Void#") voidPrimTyConKey voidPrimTyCon | 87 | voidPrimTyConName = mkPrimTc (fsLit "Void#") voidPrimTyConKey voidPrimTyCon | 87 | voidPrimTyConName = mkPrimTc (fsLit "Void#") voidPrimTyConKey voidPrimTyCon | 87 | false | false | 0 | 7 | 18 | 19 | 9 | 10 | null | null |
GaloisInc/sk-dev-platform | libs/lobster/src/Lobster/Policy.hs | bsd-3-clause | flattenDomain :: Domain -> P Domain
flattenDomain (Domain dom) =
do dom' <- Domain.flatten dom
return (Domain dom') | 126 | flattenDomain :: Domain -> P Domain
flattenDomain (Domain dom) =
do dom' <- Domain.flatten dom
return (Domain dom') | 126 | flattenDomain (Domain dom) =
do dom' <- Domain.flatten dom
return (Domain dom') | 90 | false | true | 0 | 9 | 28 | 51 | 23 | 28 | null | null |
jwaldmann/ersatz-minisatapi | examples/knight.hs | gpl-3.0 | atmost_one xs = let (r,c) = count1 xs in not c | 46 | atmost_one xs = let (r,c) = count1 xs in not c | 46 | atmost_one xs = let (r,c) = count1 xs in not c | 46 | false | false | 1 | 9 | 10 | 36 | 15 | 21 | null | null |
joehillen/aura | src/Aura/Languages.hs | gpl-3.0 | orpha :: Language -> String
orpha = blue . \case
Japanese -> "必要とされていない従属パッケージに関する処理\n" ++ "デフォルトでその従属パッケージの名前を出力"
Polish -> "Wykonuje akcje związane z [O]sieroconymi pakietami.\n" ++ "Domyślnie wyświetla wszystkie osierocone pakiety."
Croatian -> "Izvršava radnje s paketima bez roditelja ([O]rphan)... | 1,898 | orpha :: Language -> String
orpha = blue . \case
Japanese -> "必要とされていない従属パッケージに関する処理\n" ++ "デフォルトでその従属パッケージの名前を出力"
Polish -> "Wykonuje akcje związane z [O]sieroconymi pakietami.\n" ++ "Domyślnie wyświetla wszystkie osierocone pakiety."
Croatian -> "Izvršava radnje s paketima bez roditelja ([O]rphan)... | 1,898 | orpha = blue . \case
Japanese -> "必要とされていない従属パッケージに関する処理\n" ++ "デフォルトでその従属パッケージの名前を出力"
Polish -> "Wykonuje akcje związane z [O]sieroconymi pakietami.\n" ++ "Domyślnie wyświetla wszystkie osierocone pakiety."
Croatian -> "Izvršava radnje s paketima bez roditelja ([O]rphan).\n" ++ "Uobičajena (default... | 1,870 | false | true | 1 | 9 | 324 | 173 | 86 | 87 | null | null |
peterkmurphy/preference | src/OurTests/TestStuff.hs | bsd-3-clause | testIsWinprop6 = iswinningproportion [1/3, 2/3] @?= True | 56 | testIsWinprop6 = iswinningproportion [1/3, 2/3] @?= True | 56 | testIsWinprop6 = iswinningproportion [1/3, 2/3] @?= True | 56 | false | false | 0 | 8 | 6 | 27 | 14 | 13 | null | null |
ntc2/cryptol | cryptol/Main.hs | bsd-3-clause | setCryptolPathOnly :: OptParser Options
setCryptolPathOnly = modify $ \opts -> opts { optCryptolPathOnly = True } | 114 | setCryptolPathOnly :: OptParser Options
setCryptolPathOnly = modify $ \opts -> opts { optCryptolPathOnly = True } | 114 | setCryptolPathOnly = modify $ \opts -> opts { optCryptolPathOnly = True } | 74 | false | true | 0 | 8 | 16 | 31 | 17 | 14 | null | null |
slpopejoy/fadno-xml | src/Fadno/MusicXml/MusicXml20.hs | bsd-2-clause | -- | Smart constructor for 'DynamicsSffz'
mkDynamicsSffz :: Empty -> ChxDynamics
mkDynamicsSffz a = DynamicsSffz a | 114 | mkDynamicsSffz :: Empty -> ChxDynamics
mkDynamicsSffz a = DynamicsSffz a | 72 | mkDynamicsSffz a = DynamicsSffz a | 33 | true | true | 0 | 7 | 15 | 27 | 12 | 15 | null | null |
AlexanderPankiv/ghc | compiler/basicTypes/PatSyn.hs | bsd-3-clause | -- | Arity of the pattern synonym
patSynArity :: PatSyn -> Arity
patSynArity = psArity | 86 | patSynArity :: PatSyn -> Arity
patSynArity = psArity | 52 | patSynArity = psArity | 21 | true | true | 0 | 7 | 14 | 23 | 10 | 13 | null | null |
vTurbine/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | reset_RDR = varQual_RDR rEAD_PREC (fsLit "reset") | 64 | reset_RDR = varQual_RDR rEAD_PREC (fsLit "reset") | 64 | reset_RDR = varQual_RDR rEAD_PREC (fsLit "reset") | 64 | false | false | 0 | 7 | 20 | 17 | 8 | 9 | null | null |
aslatter/parsec2 | Text/ParserCombinators/Parsec/Prim.hs | bsd-2-clause | -- | @setParserState st@ set the full parser state to @st@.
setParserState :: State tok st -> GenParser tok st (State tok st)
setParserState st = updateParserState (const st) | 177 | setParserState :: State tok st -> GenParser tok st (State tok st)
setParserState st = updateParserState (const st) | 117 | setParserState st = updateParserState (const st) | 48 | true | true | 0 | 8 | 31 | 48 | 23 | 25 | null | null |
mayeranalytics/nanoPage | src/Internal/HtmlOps.hs | mit | tr :: Show a => a -> a
tr = Tr.traceShowId | 42 | tr :: Show a => a -> a
tr = Tr.traceShowId | 42 | tr = Tr.traceShowId | 19 | false | true | 0 | 8 | 10 | 31 | 13 | 18 | null | null |
sos22/ppres | ppres/driver/Timing.hs | gpl-2.0 | tdToMicroseconds :: TimeDiff -> Integer
tdToMicroseconds td = (toInteger $ tdSec td) * 1000000 + (tdPicosec td `div` 1000000) | 125 | tdToMicroseconds :: TimeDiff -> Integer
tdToMicroseconds td = (toInteger $ tdSec td) * 1000000 + (tdPicosec td `div` 1000000) | 125 | tdToMicroseconds td = (toInteger $ tdSec td) * 1000000 + (tdPicosec td `div` 1000000) | 85 | false | true | 0 | 9 | 18 | 48 | 25 | 23 | null | null |
mightymoose/liquidhaskell | tests/pos/HigherOrderRecFun.hs | bsd-3-clause | foo :: [a] -> (b -> c) -> (b -> c)
foo [] f = f | 51 | foo :: [a] -> (b -> c) -> (b -> c)
foo [] f = f | 51 | foo [] f = f | 16 | false | true | 0 | 8 | 19 | 43 | 23 | 20 | null | null |
pjones/xmonad-test | vendor/xmonad-contrib/XMonad/Layout/Groups/Helpers.hs | bsd-2-clause | focusFloatUp :: X ()
focusFloatUp = focusHelper id reverse | 58 | focusFloatUp :: X ()
focusFloatUp = focusHelper id reverse | 58 | focusFloatUp = focusHelper id reverse | 37 | false | true | 0 | 6 | 8 | 21 | 10 | 11 | null | null |
a143753/AOJ | 0226.hs | apache-2.0 | blow' _ [] = 0 | 14 | blow' _ [] = 0 | 14 | blow' _ [] = 0 | 14 | false | false | 0 | 6 | 4 | 17 | 7 | 10 | null | null |
DavidAlphaFox/ghc | libraries/Cabal/Cabal/Distribution/Simple/Command.hs | bsd-3-clause | noExtraFlags extraFlags =
die $ "Unrecognised flags: " ++ intercalate ", " extraFlags | 87 | noExtraFlags extraFlags =
die $ "Unrecognised flags: " ++ intercalate ", " extraFlags | 87 | noExtraFlags extraFlags =
die $ "Unrecognised flags: " ++ intercalate ", " extraFlags | 87 | false | false | 5 | 5 | 14 | 27 | 10 | 17 | null | null |
spechub/Hets | CspCASLProver/Consts.hs | gpl-2.0 | {- | Given a sort this function produces the function name (string) of the built
in Isabelle fucntion that corresponds to the abstraction function of the
type that sort_bar. -}
mkSortBarAbsString :: SORT -> String
mkSortBarAbsString s = "Abs_" ++ convertSort2String s ++ barExtS | 278 | mkSortBarAbsString :: SORT -> String
mkSortBarAbsString s = "Abs_" ++ convertSort2String s ++ barExtS | 101 | mkSortBarAbsString s = "Abs_" ++ convertSort2String s ++ barExtS | 64 | true | true | 0 | 7 | 43 | 30 | 15 | 15 | null | null |
friedbrice/RealWorldHaskell | ch3/exB8.hs | gpl-2.0 | height :: Tree a -> Int
height Empty = 0 | 47 | height :: Tree a -> Int
height Empty = 0 | 47 | height Empty = 0 | 23 | false | true | 0 | 6 | 16 | 21 | 10 | 11 | null | null |
brendanhay/gogol | gogol-iam/gen/Network/Google/Resource/IAM/Roles/List.hs | mpl-2.0 | -- | The \`parent\` parameter\'s value depends on the target resource for the
-- request, namely [\`roles\`](\/iam\/reference\/rest\/v1\/roles),
-- [\`projects\`](\/iam\/reference\/rest\/v1\/projects.roles), or
-- [\`organizations\`](\/iam\/reference\/rest\/v1\/organizations.roles).
-- Each resource type\'s \`parent\` ... | 1,502 | rlParent :: Lens' RolesList (Maybe Text)
rlParent = lens _rlParent (\ s a -> s{_rlParent = a}) | 94 | rlParent = lens _rlParent (\ s a -> s{_rlParent = a}) | 53 | true | true | 0 | 9 | 132 | 66 | 45 | 21 | null | null |
mcschroeder/ghc | compiler/hsSyn/HsUtils.hs | bsd-3-clause | -- The Big equivalents for the source tuple expressions
mkBigLHsVarTup :: [id] -> LHsExpr id
mkBigLHsVarTup ids = mkBigLHsTup (map nlHsVar ids) | 143 | mkBigLHsVarTup :: [id] -> LHsExpr id
mkBigLHsVarTup ids = mkBigLHsTup (map nlHsVar ids) | 87 | mkBigLHsVarTup ids = mkBigLHsTup (map nlHsVar ids) | 50 | true | true | 0 | 7 | 21 | 36 | 18 | 18 | null | null |
brooksbp/haskell-openflow | Network/OpenFlow.hs | bsd-3-clause | msgType (OfptGetConfigReply _) = 8 | 41 | msgType (OfptGetConfigReply _) = 8 | 41 | msgType (OfptGetConfigReply _) = 8 | 41 | false | false | 0 | 7 | 11 | 15 | 7 | 8 | null | null |
iblumenfeld/cryptol | src/Cryptol/TypeCheck/Sanity.hs | bsd-3-clause | checkArm [m] = do (x,l) <- checkMatch m
return ([x], l) | 75 | checkArm [m] = do (x,l) <- checkMatch m
return ([x], l) | 75 | checkArm [m] = do (x,l) <- checkMatch m
return ([x], l) | 75 | false | false | 0 | 9 | 30 | 43 | 22 | 21 | null | null |
kalouantonis/kriek | src/hs/Kriek/Scanner.hs | mit | scanList :: AST -> Runtime Op
scanList f@(AList l _) = case l of
[] -> right $ RT $ RList [] M.empty
(l1:ls) -> case l1 of
f2@(ASymbol (_,s) _) -> case s of
"import" -> scanImport f
"if" -> scanIf f
_ -> left $ Unimplemented
_ -> (RT . (flip RList) M.empty) <$> mapM scan ls | 304 | scanList :: AST -> Runtime Op
scanList f@(AList l _) = case l of
[] -> right $ RT $ RList [] M.empty
(l1:ls) -> case l1 of
f2@(ASymbol (_,s) _) -> case s of
"import" -> scanImport f
"if" -> scanIf f
_ -> left $ Unimplemented
_ -> (RT . (flip RList) M.empty) <$> mapM scan ls | 304 | scanList f@(AList l _) = case l of
[] -> right $ RT $ RList [] M.empty
(l1:ls) -> case l1 of
f2@(ASymbol (_,s) _) -> case s of
"import" -> scanImport f
"if" -> scanIf f
_ -> left $ Unimplemented
_ -> (RT . (flip RList) M.empty) <$> mapM scan ls | 274 | false | true | 2 | 13 | 88 | 168 | 83 | 85 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.