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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
distrap/ivory-tower-canopen | src/CANOpen/Tower/SDO.hs | bsd-3-clause | arrayCopyFromOffset :: ( ANat n, ANat m, IvoryRef r
, IvoryExpr (r s2 ('Array m ('Stored t)))
, IvoryExpr (r s2 ('Stored t))
, IvoryStore t
)
=> Ref s1 ('Array n ('Stored t))
-> r s2 ('Arr... | 1,066 | arrayCopyFromOffset :: ( ANat n, ANat m, IvoryRef r
, IvoryExpr (r s2 ('Array m ('Stored t)))
, IvoryExpr (r s2 ('Stored t))
, IvoryStore t
)
=> Ref s1 ('Array n ('Stored t))
-> r s2 ('Arr... | 1,066 | arrayCopyFromOffset to from fromOffset end = do
assert (fromOffset >=? 0 .&& fromOffset <? frLen)
assert (end >=? 0 .&& end <=? toLen)
arrayMap $ go
where
-- The index is w.r.t. the from array.
go ix =
cond_
[ -- We've reached the @end@ index: stop copying.
(fromIx ix >=? ... | 632 | false | true | 0 | 13 | 449 | 354 | 175 | 179 | null | null |
garetxe/cabal | Cabal/Distribution/Simple/Utils.hs | bsd-3-clause | smartCopySources :: Verbosity -> [FilePath] -> FilePath
-> [ModuleName] -> [String] -> IO ()
smartCopySources verbosity searchPath targetDir moduleNames extensions =
findModuleFiles searchPath extensions moduleNames
>>= copyFiles verbosity targetDir | 274 | smartCopySources :: Verbosity -> [FilePath] -> FilePath
-> [ModuleName] -> [String] -> IO ()
smartCopySources verbosity searchPath targetDir moduleNames extensions =
findModuleFiles searchPath extensions moduleNames
>>= copyFiles verbosity targetDir | 274 | smartCopySources verbosity searchPath targetDir moduleNames extensions =
findModuleFiles searchPath extensions moduleNames
>>= copyFiles verbosity targetDir | 164 | false | true | 2 | 11 | 53 | 74 | 37 | 37 | null | null |
tanakh/yesod-bbs | production.hs | bsd-2-clause | main :: IO ()
main = withYesodBBS $ run 3000 | 44 | main :: IO ()
main = withYesodBBS $ run 3000 | 44 | main = withYesodBBS $ run 3000 | 30 | false | true | 0 | 6 | 9 | 23 | 11 | 12 | null | null |
Coggroach/Gluon | .stack-work/intero/intero6065_D0.hs | bsd-3-clause | getPort :: ServerType -> ApiHandler Int
getPort st = return (maximum getPorts) + 1 | 82 | getPort :: ServerType -> ApiHandler Int
getPort st = return (maximum getPorts) + 1 | 82 | getPort st = return (maximum getPorts) + 1 | 42 | false | true | 0 | 8 | 13 | 39 | 17 | 22 | null | null |
TOSPIO/yi | src/library/Yi/Keymap/Emacs/Utils.hs | gpl-2.0 | scrollUpE :: UnivArgument -> BufferM ()
scrollUpE a = case a of
Nothing -> upScreenB
Just n -> scrollB (negate n)
-- | Prompts the user for a buffer name and switches to the chosen buffer. | 223 | scrollUpE :: UnivArgument -> BufferM ()
scrollUpE a = case a of
Nothing -> upScreenB
Just n -> scrollB (negate n)
-- | Prompts the user for a buffer name and switches to the chosen buffer. | 223 | scrollUpE a = case a of
Nothing -> upScreenB
Just n -> scrollB (negate n)
-- | Prompts the user for a buffer name and switches to the chosen buffer. | 183 | false | true | 0 | 10 | 70 | 56 | 26 | 30 | null | null |
changlinli/nikki | src/Base/Application/Music.hs | lgpl-3.0 | pauseGameBackgroundMusic :: IO ()
pauseGameBackgroundMusic = SFML.pauseMusic | 76 | pauseGameBackgroundMusic :: IO ()
pauseGameBackgroundMusic = SFML.pauseMusic | 76 | pauseGameBackgroundMusic = SFML.pauseMusic | 42 | false | true | 0 | 6 | 6 | 18 | 9 | 9 | null | null |
dmjio/stripe | stripe-core/src/Web/Stripe/Recipient.hs | mit | ------------------------------------------------------------------------------
-- | Base Request for issues create `Recipient` requests
createRecipient
:: Name -- ^ `Recipient` `Name`
-> RecipientType -- ^ `Individual` or `Corporation`
-> StripeRequest CreateRecipient
createRecipient
name
r... | 547 | createRecipient
:: Name -- ^ `Recipient` `Name`
-> RecipientType -- ^ `Individual` or `Corporation`
-> StripeRequest CreateRecipient
createRecipient
name
recipienttype
= request
where request = mkStripeRequest POST url params
url = "recipients"
params ... | 411 | createRecipient
name
recipienttype
= request
where request = mkStripeRequest POST url params
url = "recipients"
params = toStripeParam name $
toStripeParam recipienttype $
[] | 257 | true | true | 0 | 8 | 154 | 77 | 38 | 39 | null | null |
vluukkal/aspreify | testaspparse.hs | mit | -- taltexpr = TestCase $ assertEqual "altexpr X" (wrapparser_expr altexpr "" "")
tfunc1 = TestCase $ assertEqual "func 1" (Func (Const "#abs") [Sym (Var "N"),Arith Plus (Sym (Var "N")) (Number (Const "1"))] True) (wrapparser_exp func "" "#abs(N,N+1)") | 253 | tfunc1 = TestCase $ assertEqual "func 1" (Func (Const "#abs") [Sym (Var "N"),Arith Plus (Sym (Var "N")) (Number (Const "1"))] True) (wrapparser_exp func "" "#abs(N,N+1)") | 170 | tfunc1 = TestCase $ assertEqual "func 1" (Func (Const "#abs") [Sym (Var "N"),Arith Plus (Sym (Var "N")) (Number (Const "1"))] True) (wrapparser_exp func "" "#abs(N,N+1)") | 170 | true | false | 1 | 14 | 38 | 93 | 45 | 48 | null | null |
junnf/Functional-Programming | codes/funclist.hs | unlicense | funcdict2 'b' x = f2 x | 22 | funcdict2 'b' x = f2 x | 22 | funcdict2 'b' x = f2 x | 22 | false | false | 1 | 5 | 5 | 16 | 6 | 10 | null | null |
mapinguari/SC_HS_Proxy | src/Proxy/Query/Unit.hs | mit | whatBuilds ZergSpawningPool = ZergDrone | 39 | whatBuilds ZergSpawningPool = ZergDrone | 39 | whatBuilds ZergSpawningPool = ZergDrone | 39 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
erisco/extensible-ast | example02/main.hs | mit | evalExprBinOp ::
(binOp -> Int -> Int -> Int)
-- ^ How to evaluate binary operators
-> (expr -> Int)
-- ^ How to evaluate expressions
-> expr
-- ^ Left argument
-> binOp
... | 571 | evalExprBinOp ::
(binOp -> Int -> Int -> Int)
-- ^ How to evaluate binary operators
-> (expr -> Int)
-- ^ How to evaluate expressions
-> expr
-- ^ Left argument
-> binOp
... | 518 | evalExprBinOp evalBinOp' evalExpr' l op r
= evalBinOp' op (evalExpr' l) (evalExpr' r) | 87 | true | true | 0 | 9 | 291 | 89 | 48 | 41 | null | null |
mrak/coreutils.hs | src/lib/Coreutils.hs | mit | unrange (x:'-':y:cs)
| ord x >= ord y = x : '-' : y : unrange cs
| otherwise = [chr c | c <- [(ord x)..(ord y)]] ++ unrange cs | 134 | unrange (x:'-':y:cs)
| ord x >= ord y = x : '-' : y : unrange cs
| otherwise = [chr c | c <- [(ord x)..(ord y)]] ++ unrange cs | 134 | unrange (x:'-':y:cs)
| ord x >= ord y = x : '-' : y : unrange cs
| otherwise = [chr c | c <- [(ord x)..(ord y)]] ++ unrange cs | 134 | false | false | 1 | 11 | 38 | 100 | 48 | 52 | null | null |
jkpl/ptt | src/Ptt/Task.hs | mit | changeKey :: Selector -> Selector -> TaskMap -> TaskMap
changeKey selector newSelector tasks =
let updatedTasks = do
task <- getTask selector tasks
return $ addTask newSelector task (deleteTask selector tasks)
in fromMaybe tasks updatedTasks | 261 | changeKey :: Selector -> Selector -> TaskMap -> TaskMap
changeKey selector newSelector tasks =
let updatedTasks = do
task <- getTask selector tasks
return $ addTask newSelector task (deleteTask selector tasks)
in fromMaybe tasks updatedTasks | 261 | changeKey selector newSelector tasks =
let updatedTasks = do
task <- getTask selector tasks
return $ addTask newSelector task (deleteTask selector tasks)
in fromMaybe tasks updatedTasks | 205 | false | true | 0 | 14 | 54 | 80 | 37 | 43 | null | null |
noinia/virtual-persistent-fs | src/System/FileSystem/Virtual.hs | bsd-3-clause | withFileOrDirectory :: (MonadState (FSTree D v a) m, Functor m)
=> NonEmptyPath -> m (Maybe (FileOrDir v a))
withFileOrDirectory p = let (p',n) = andLast p
in accessFileOrDirectoryAt p' n <$> get | 243 | withFileOrDirectory :: (MonadState (FSTree D v a) m, Functor m)
=> NonEmptyPath -> m (Maybe (FileOrDir v a))
withFileOrDirectory p = let (p',n) = andLast p
in accessFileOrDirectoryAt p' n <$> get | 243 | withFileOrDirectory p = let (p',n) = andLast p
in accessFileOrDirectoryAt p' n <$> get | 110 | false | true | 0 | 11 | 79 | 92 | 45 | 47 | null | null |
jasonzoladz/yesod-auth-oauth2 | Yesod/Auth/OAuth2/Spotify.hs | bsd-2-clause | oauth2Spotify :: YesodAuth m
=> Text -- ^ Client ID
-> Text -- ^ Client Secret
-> [ByteString] -- ^ Scopes
-> AuthPlugin m
oauth2Spotify clientId clientSecret scope = authOAuth2 "spotify"
OAuth2
{ oauthClientId = encodeUtf8 clientId
, oauthClie... | 668 | oauth2Spotify :: YesodAuth m
=> Text -- ^ Client ID
-> Text -- ^ Client Secret
-> [ByteString] -- ^ Scopes
-> AuthPlugin m
oauth2Spotify clientId clientSecret scope = authOAuth2 "spotify"
OAuth2
{ oauthClientId = encodeUtf8 clientId
, oauthClie... | 668 | oauth2Spotify clientId clientSecret scope = authOAuth2 "spotify"
OAuth2
{ oauthClientId = encodeUtf8 clientId
, oauthClientSecret = encodeUtf8 clientSecret
, oauthOAuthorizeEndpoint = B.append "https://accounts.spotify.com/authorize?scope=" (B.intercalate "%20" scope)
, oauthAccessTo... | 489 | false | true | 0 | 12 | 175 | 117 | 62 | 55 | null | null |
agrafix/hackage-server | Distribution/Server/Pages/Package.hs | bsd-3-clause | renderDownloads :: Int -> Int -> {- Int -> Version -> -} (String, Html)
renderDownloads totalDown recentDown {- versionDown version -} =
("Downloads", toHtml $ {- show versionDown ++ " for " ++ display version ++
" and " ++ -} show totalDown ++ " total (" ++
show recentDo... | 346 | renderDownloads :: Int -> Int -> {- Int -> Version -> -} (String, Html)
renderDownloads totalDown recentDown {- versionDown version -} =
("Downloads", toHtml $ {- show versionDown ++ " for " ++ display version ++
" and " ++ -} show totalDown ++ " total (" ++
show recentDo... | 346 | renderDownloads totalDown recentDown {- versionDown version -} =
("Downloads", toHtml $ {- show versionDown ++ " for " ++ display version ++
" and " ++ -} show totalDown ++ " total (" ++
show recentDown ++ " in last 30 days)") | 274 | false | true | 0 | 10 | 103 | 61 | 33 | 28 | null | null |
scott-fleischman/greek-grammar | haskell/greek-grammar/src/Text/Greek/IO/Paths.hs | mit | perseusInventoryXml :: FilePath
perseusInventoryXml = perseusCatalog </> "perseus" </> "perseuscts.xml" | 103 | perseusInventoryXml :: FilePath
perseusInventoryXml = perseusCatalog </> "perseus" </> "perseuscts.xml" | 103 | perseusInventoryXml = perseusCatalog </> "perseus" </> "perseuscts.xml" | 71 | false | true | 0 | 6 | 9 | 19 | 10 | 9 | null | null |
ifesdjeen/deflisp | src/DefLisp/Core.hs | bsd-3-clause | unpackNum nan = error $ "Can't unpack number: " ++ (show nan) | 61 | unpackNum nan = error $ "Can't unpack number: " ++ (show nan) | 61 | unpackNum nan = error $ "Can't unpack number: " ++ (show nan) | 61 | false | false | 0 | 7 | 11 | 23 | 11 | 12 | null | null |
timsears/species | Math/Combinatorics/Species/AST.hs | bsd-3-clause | annotate One = wrap TOne | 40 | annotate One = wrap TOne | 40 | annotate One = wrap TOne | 40 | false | false | 0 | 5 | 20 | 12 | 5 | 7 | null | null |
thierr26/thierr26_xmonad_config_and_dot_files | .xmonad/xmonad.hs | unlicense | myNormalBorderColor = backColor | 32 | myNormalBorderColor = backColor | 32 | myNormalBorderColor = backColor | 32 | false | false | 0 | 4 | 3 | 6 | 3 | 3 | null | null |
hazel-el/hazel | Hazel/Hierarchy.hs | gpl-3.0 | -- inserts new parents for a concept
insertParents :: Hierarchy -> Concept -> [Concept] -> Hierarchy
insertParents (Hierarchy parents equivalents domain) concept parents' =
Hierarchy (extend parents concept parents') equivalents domain | 243 | insertParents :: Hierarchy -> Concept -> [Concept] -> Hierarchy
insertParents (Hierarchy parents equivalents domain) concept parents' =
Hierarchy (extend parents concept parents') equivalents domain | 206 | insertParents (Hierarchy parents equivalents domain) concept parents' =
Hierarchy (extend parents concept parents') equivalents domain | 142 | true | true | 0 | 8 | 38 | 61 | 31 | 30 | null | null |
gafiatulin/codewars | src/5 kyu/CoddecSqStrings.hs | mit | specialChar = chr 11 | 20 | specialChar = chr 11 | 20 | specialChar = chr 11 | 20 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
lukexi/ghc | ghc/Main.hs | bsd-3-clause | printSetting :: String -> Mode
printSetting k = mkPreLoadMode (PrintWithDynFlags f)
where f dflags = fromMaybe (panic ("Setting not found: " ++ show k))
$ lookup k (compilerInfo dflags) | 208 | printSetting :: String -> Mode
printSetting k = mkPreLoadMode (PrintWithDynFlags f)
where f dflags = fromMaybe (panic ("Setting not found: " ++ show k))
$ lookup k (compilerInfo dflags) | 208 | printSetting k = mkPreLoadMode (PrintWithDynFlags f)
where f dflags = fromMaybe (panic ("Setting not found: " ++ show k))
$ lookup k (compilerInfo dflags) | 177 | false | true | 0 | 13 | 51 | 71 | 34 | 37 | null | null |
spinda/liquidhaskell | tests/gsoc15/unknown/pos/Avg.hs | bsd-3-clause | :: [Double] -> Double
lenD [] = 0.0 | 35 | :: [Double] -> Double
lenD [] = 0.0 | 35 | :: [Double] -> Double
lenD [] = 0.0 | 35 | false | false | 0 | 8 | 7 | 26 | 12 | 14 | null | null |
brendanhay/gogol | gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Product.hs | mpl-2.0 | -- | Registry used for the Ad ID value.
uaiRegistry :: Lens' UniversalAdId (Maybe UniversalAdIdRegistry)
uaiRegistry
= lens _uaiRegistry (\ s a -> s{_uaiRegistry = a}) | 169 | uaiRegistry :: Lens' UniversalAdId (Maybe UniversalAdIdRegistry)
uaiRegistry
= lens _uaiRegistry (\ s a -> s{_uaiRegistry = a}) | 129 | uaiRegistry
= lens _uaiRegistry (\ s a -> s{_uaiRegistry = a}) | 64 | true | true | 1 | 9 | 27 | 52 | 25 | 27 | null | null |
d12frosted/optparse-applicative-kb | Options/Applicative/Builder.hs | bsd-3-clause | -- | Builder for an option using the 'auto' reader.
option :: ReadM a -> Mod OptionFields a -> Parser a
option r m = mkParser d g rdr
where
Mod f d g = metavar "ARG" `mappend` m
fields = f (OptionFields [] mempty (ErrorMsg ""))
crdr = CReader (optCompleter fields) r
rdr = OptReader (optNames fields) c... | 379 | option :: ReadM a -> Mod OptionFields a -> Parser a
option r m = mkParser d g rdr
where
Mod f d g = metavar "ARG" `mappend` m
fields = f (OptionFields [] mempty (ErrorMsg ""))
crdr = CReader (optCompleter fields) r
rdr = OptReader (optNames fields) crdr (optNoArgError fields)
-- | Modifier for 'Parse... | 327 | option r m = mkParser d g rdr
where
Mod f d g = metavar "ARG" `mappend` m
fields = f (OptionFields [] mempty (ErrorMsg ""))
crdr = CReader (optCompleter fields) r
rdr = OptReader (optNames fields) crdr (optNoArgError fields)
-- | Modifier for 'ParserInfo'. | 275 | true | true | 1 | 9 | 84 | 142 | 67 | 75 | null | null |
Zoetermeer/latro | src/Latro/Sexpable.hs | mit | showSexp :: Sexpable a => a -> String
showSexp = show . sexp | 60 | showSexp :: Sexpable a => a -> String
showSexp = show . sexp | 60 | showSexp = show . sexp | 22 | false | true | 0 | 6 | 12 | 26 | 13 | 13 | null | null |
koengit/cyphy | src/PastLTL.hs | mit | once (True:this) = repeat True | 30 | once (True:this) = repeat True | 30 | once (True:this) = repeat True | 30 | false | false | 0 | 7 | 4 | 19 | 9 | 10 | null | null |
keera-studios/hsQt | Qtc/ClassTypes/Gui.hs | bsd-2-clause | qCast_QStyleOptionDockWidgetV2 :: Object a -> IO (QStyleOptionDockWidgetV2 ())
qCast_QStyleOptionDockWidgetV2 _qobj
= return (objectCast _qobj) | 145 | qCast_QStyleOptionDockWidgetV2 :: Object a -> IO (QStyleOptionDockWidgetV2 ())
qCast_QStyleOptionDockWidgetV2 _qobj
= return (objectCast _qobj) | 145 | qCast_QStyleOptionDockWidgetV2 _qobj
= return (objectCast _qobj) | 66 | false | true | 0 | 9 | 15 | 41 | 19 | 22 | null | null |
Laar/OpenGLRawgen | src/Spec/Parsing.hs | bsd-3-clause | convertBaseType :: P.BaseType -> FType
convertBaseType bt = case bt of
P.Void -> UnitTCon
_ -> error $ show bt | 125 | convertBaseType :: P.BaseType -> FType
convertBaseType bt = case bt of
P.Void -> UnitTCon
_ -> error $ show bt | 125 | convertBaseType bt = case bt of
P.Void -> UnitTCon
_ -> error $ show bt | 86 | false | true | 0 | 9 | 34 | 45 | 22 | 23 | null | null |
gridaphobe/cabal | cabal-install/Distribution/Client/PackageIndex.hs | bsd-3-clause | -- | Does a lookup by package id (name & version).
--
-- Since multiple package DBs mask each other case-sensitively by package name,
-- then we get back at most one package.
--
lookupPackageId :: Package pkg => PackageIndex pkg -> PackageIdentifier -> Maybe pkg
lookupPackageId index pkgid =
case [ pkg | pkg <- looku... | 541 | lookupPackageId :: Package pkg => PackageIndex pkg -> PackageIdentifier -> Maybe pkg
lookupPackageId index pkgid =
case [ pkg | pkg <- lookup index (packageName pkgid)
, packageId pkg == pkgid ] of
[] -> Nothing
[pkg] -> Just pkg
_ -> internalError "lookupPackageIdentifier"
-- | Does ... | 363 | lookupPackageId index pkgid =
case [ pkg | pkg <- lookup index (packageName pkgid)
, packageId pkg == pkgid ] of
[] -> Nothing
[pkg] -> Just pkg
_ -> internalError "lookupPackageIdentifier"
-- | Does a case-sensitive search by package name.
-- | 278 | true | true | 0 | 11 | 122 | 114 | 57 | 57 | null | null |
mdsteele/fallback | src/Fallback/State/Resources.hs | gpl-3.0 | wordRect WordDodge = Rect 23 9 22 9 | 35 | wordRect WordDodge = Rect 23 9 22 9 | 35 | wordRect WordDodge = Rect 23 9 22 9 | 35 | false | false | 1 | 5 | 7 | 24 | 8 | 16 | null | null |
fmapfmapfmap/amazonka | amazonka-elastictranscoder/gen/Network/AWS/ElasticTranscoder/Types/Product.hs | mpl-2.0 | -- | The time the job began transcoding, in epoch milliseconds.
tStartTimeMillis :: Lens' Timing (Maybe Integer)
tStartTimeMillis = lens _tStartTimeMillis (\ s a -> s{_tStartTimeMillis = a}) | 190 | tStartTimeMillis :: Lens' Timing (Maybe Integer)
tStartTimeMillis = lens _tStartTimeMillis (\ s a -> s{_tStartTimeMillis = a}) | 126 | tStartTimeMillis = lens _tStartTimeMillis (\ s a -> s{_tStartTimeMillis = a}) | 77 | true | true | 0 | 9 | 27 | 46 | 25 | 21 | null | null |
mystor/matrix-detex | MatrixDetex.hs | mit | cleanUp :: [[String]] -> [[String]]
cleanUp (x : xs) = map trim x : cleanUp xs | 78 | cleanUp :: [[String]] -> [[String]]
cleanUp (x : xs) = map trim x : cleanUp xs | 78 | cleanUp (x : xs) = map trim x : cleanUp xs | 42 | false | true | 0 | 7 | 15 | 53 | 27 | 26 | null | null |
sol/wai | wai/Network/Wai.hs | mit | -- | Creating 'Response' from 'C.Source'.
responseStream :: H.Status
-> H.ResponseHeaders
-> StreamingBody
-> Response
responseStream = ResponseStream | 195 | responseStream :: H.Status
-> H.ResponseHeaders
-> StreamingBody
-> Response
responseStream = ResponseStream | 153 | responseStream = ResponseStream | 31 | true | true | 0 | 7 | 62 | 28 | 15 | 13 | null | null |
henrytill/deviser | src/Deviser/Types.hs | bsd-3-clause | unwordsList :: [LispVal] -> T.Text
unwordsList xs = T.unwords (showVal <$> xs) | 78 | unwordsList :: [LispVal] -> T.Text
unwordsList xs = T.unwords (showVal <$> xs) | 78 | unwordsList xs = T.unwords (showVal <$> xs) | 43 | false | true | 0 | 7 | 11 | 35 | 18 | 17 | null | null |
UCSD-PL/RefScript | src/Language/Rsc/SystemUtils.hs | bsd-3-clause | lineCol sp = (srcSpanStartLine sp, srcSpanStartCol sp) | 59 | lineCol sp = (srcSpanStartLine sp, srcSpanStartCol sp) | 59 | lineCol sp = (srcSpanStartLine sp, srcSpanStartCol sp) | 59 | false | false | 0 | 6 | 11 | 21 | 10 | 11 | null | null |
mapinguari/SC_HS_Proxy | src/Proxy/Server/Server.hs | mit | startup :: (Handle,HostName,PortNumber) -> IO (GameInfo,Handle)
startup connection@(_,host,_) = do
putStrLn $ "Connection Established - " ++ host
putStrLn $ unlines showBotOptions
players <- receive connection ack
send connection botOp... | 943 | startup :: (Handle,HostName,PortNumber) -> IO (GameInfo,Handle)
startup connection@(_,host,_) = do
putStrLn $ "Connection Established - " ++ host
putStrLn $ unlines showBotOptions
players <- receive connection ack
send connection botOp... | 943 | startup connection@(_,host,_) = do
putStrLn $ "Connection Established - " ++ host
putStrLn $ unlines showBotOptions
players <- receive connection ack
send connection botOptions
startingLocations <- receive connecti... | 879 | false | true | 1 | 11 | 347 | 198 | 91 | 107 | null | null |
abayley/punchclock | Main.hs | gpl-3.0 | parseReportArgs start (a:b:_) = if isDate a
then parseReportArgs2 start a b
else if isDate b
then parseReportArgs2 start b a
else parseReportArgs2 start "" a | 181 | parseReportArgs start (a:b:_) = if isDate a
then parseReportArgs2 start a b
else if isDate b
then parseReportArgs2 start b a
else parseReportArgs2 start "" a | 181 | parseReportArgs start (a:b:_) = if isDate a
then parseReportArgs2 start a b
else if isDate b
then parseReportArgs2 start b a
else parseReportArgs2 start "" a | 181 | false | false | 0 | 8 | 49 | 65 | 32 | 33 | null | null |
tsahyt/clingo-haskell | src/Clingo/Internal/Inspection/Theory.hs | mit | theoryAtomsTermName :: (MonadIO m, MonadThrow m)
=> TheoryAtoms s -> TermId -> m Text
theoryAtomsTermName (TheoryAtoms h) (TermId k) = pack <$>
(liftIO . peekCString =<< marshal1 (Raw.theoryAtomsTermName h k)) | 235 | theoryAtomsTermName :: (MonadIO m, MonadThrow m)
=> TheoryAtoms s -> TermId -> m Text
theoryAtomsTermName (TheoryAtoms h) (TermId k) = pack <$>
(liftIO . peekCString =<< marshal1 (Raw.theoryAtomsTermName h k)) | 235 | theoryAtomsTermName (TheoryAtoms h) (TermId k) = pack <$>
(liftIO . peekCString =<< marshal1 (Raw.theoryAtomsTermName h k)) | 128 | false | true | 0 | 11 | 55 | 85 | 42 | 43 | null | null |
frontrowed/stratosphere | library-gen/Stratosphere/ResourceProperties/SESReceiptRuleLambdaAction.hs | mit | sesReceiptRuleLambdaAction
:: Val Text -- ^ 'sesrrlaFunctionArn'
-> SESReceiptRuleLambdaAction
sesReceiptRuleLambdaAction functionArnarg =
SESReceiptRuleLambdaAction
{ _sESReceiptRuleLambdaActionFunctionArn = functionArnarg
, _sESReceiptRuleLambdaActionInvocationType = Nothing
, _sESReceiptRuleLambdaActionT... | 341 | sesReceiptRuleLambdaAction
:: Val Text -- ^ 'sesrrlaFunctionArn'
-> SESReceiptRuleLambdaAction
sesReceiptRuleLambdaAction functionArnarg =
SESReceiptRuleLambdaAction
{ _sESReceiptRuleLambdaActionFunctionArn = functionArnarg
, _sESReceiptRuleLambdaActionInvocationType = Nothing
, _sESReceiptRuleLambdaActionT... | 341 | sesReceiptRuleLambdaAction functionArnarg =
SESReceiptRuleLambdaAction
{ _sESReceiptRuleLambdaActionFunctionArn = functionArnarg
, _sESReceiptRuleLambdaActionInvocationType = Nothing
, _sESReceiptRuleLambdaActionTopicArn = Nothing
} | 242 | false | true | 0 | 7 | 39 | 51 | 26 | 25 | null | null |
phischu/fragnix | tests/packages/scotty/Control.Concurrent.MVar.Lifted.hs | bsd-3-clause | -- | Generalized version of 'MVar.modifyMVarMasked_'.
modifyMVarMasked_ :: (MonadBaseControl IO m) => MVar a -> (a -> m a) -> m ()
modifyMVarMasked_ mv = modifyMVarMasked mv . (fmap (, ()) .) | 191 | modifyMVarMasked_ :: (MonadBaseControl IO m) => MVar a -> (a -> m a) -> m ()
modifyMVarMasked_ mv = modifyMVarMasked mv . (fmap (, ()) .) | 137 | modifyMVarMasked_ mv = modifyMVarMasked mv . (fmap (, ()) .) | 60 | true | true | 0 | 10 | 31 | 72 | 37 | 35 | null | null |
paul-rouse/persistent | persistent/Database/Persist/SqlBackend.hs | mit | -- $utilities
--
-- The functions exported here are a bit more general than the record accessors.
-- The easiest way to use them is to provide the 'SqlBackend' directly to the
-- function. However, you can also use them in a 'ReaderT' context, and you can
-- even use them with any @backend@ type tht has a @'BackendComp... | 1,461 | getEscapedFieldName
:: (BackendCompatible SqlBackend backend, MonadReader backend m)
=> FieldNameDB -> m Text
getEscapedFieldName fieldName = do
func <- asks (SqlBackend.connEscapeFieldName . projectBackend)
pure (func fieldName)
-- | This function can be used directly with a 'SqlBackend' to escape
-- ... | 668 | getEscapedFieldName fieldName = do
func <- asks (SqlBackend.connEscapeFieldName . projectBackend)
pure (func fieldName)
-- | This function can be used directly with a 'SqlBackend' to escape
-- a raw 'Text'.
--
-- @
-- let conn :: SqlBackend
-- getEscapedRawName (FieldNameDB "asdf") conn
-- @
--
-- Alternativel... | 550 | true | true | 0 | 12 | 269 | 120 | 80 | 40 | null | null |
thomie/vector | Data/Vector.hs | bsd-3-clause | izipWith3 = G.izipWith3 | 23 | izipWith3 = G.izipWith3 | 23 | izipWith3 = G.izipWith3 | 23 | false | false | 0 | 5 | 2 | 8 | 4 | 4 | null | null |
kovach/ecstatic | Development/Ecstatic/Size.hs | bsd-2-clause | sizeOfTypeName _ (TyIntegral ty) =
case ty of
TyBool -> 1
TyInt -> 4
TyChar -> 1
TySChar -> 1 -- TODO ?
TyUChar -> 1
TyShort -> 2 -- TODO ?
_ -> error $ "sizeOfTypeName. unknown integral type: " ++ show ty | 235 | sizeOfTypeName _ (TyIntegral ty) =
case ty of
TyBool -> 1
TyInt -> 4
TyChar -> 1
TySChar -> 1 -- TODO ?
TyUChar -> 1
TyShort -> 2 -- TODO ?
_ -> error $ "sizeOfTypeName. unknown integral type: " ++ show ty | 235 | sizeOfTypeName _ (TyIntegral ty) =
case ty of
TyBool -> 1
TyInt -> 4
TyChar -> 1
TySChar -> 1 -- TODO ?
TyUChar -> 1
TyShort -> 2 -- TODO ?
_ -> error $ "sizeOfTypeName. unknown integral type: " ++ show ty | 235 | false | false | 7 | 7 | 73 | 88 | 38 | 50 | null | null |
GaloisInc/halvm-ghc | compiler/main/DriverPipeline.hs | bsd-3-clause | linkStaticLibCheck :: DynFlags -> [String] -> [UnitId] -> IO ()
linkStaticLibCheck dflags o_files dep_packages
= do
when (platformOS (targetPlatform dflags) `notElem` [OSiOS, OSDarwin]) $
throwGhcExceptionIO (ProgramError "Static archive creation only supported on Darwin/OS X/iOS")
linkBinary' True dflag... | 439 | linkStaticLibCheck :: DynFlags -> [String] -> [UnitId] -> IO ()
linkStaticLibCheck dflags o_files dep_packages
= do
when (platformOS (targetPlatform dflags) `notElem` [OSiOS, OSDarwin]) $
throwGhcExceptionIO (ProgramError "Static archive creation only supported on Darwin/OS X/iOS")
linkBinary' True dflag... | 439 | linkStaticLibCheck dflags o_files dep_packages
= do
when (platformOS (targetPlatform dflags) `notElem` [OSiOS, OSDarwin]) $
throwGhcExceptionIO (ProgramError "Static archive creation only supported on Darwin/OS X/iOS")
linkBinary' True dflags o_files dep_packages
-- -------------------------------------... | 375 | false | true | 0 | 13 | 59 | 98 | 50 | 48 | null | null |
nominolo/haddock2 | src/Haddock/Interface/Create.hs | bsd-2-clause | subordinates :: HsDecl Name -> [(Name, MaybeDocStrings, Map Int HsDocString)]
subordinates (TyClD d) = classDataSubs d | 118 | subordinates :: HsDecl Name -> [(Name, MaybeDocStrings, Map Int HsDocString)]
subordinates (TyClD d) = classDataSubs d | 118 | subordinates (TyClD d) = classDataSubs d | 40 | false | true | 0 | 8 | 15 | 47 | 24 | 23 | null | null |
SAdams601/HaRe | old/testing/unfoldDef/D3_temp.hs | bsd-3-clause | pow =2 | 6 | pow =2 | 6 | pow =2 | 6 | false | false | 1 | 5 | 1 | 10 | 3 | 7 | null | null |
bergmark/purescript | src/Language/PureScript/TypeChecker/Kinds.hs | mit | starIfUnknown (Row k) = Row (starIfUnknown k) | 45 | starIfUnknown (Row k) = Row (starIfUnknown k) | 45 | starIfUnknown (Row k) = Row (starIfUnknown k) | 45 | false | false | 0 | 6 | 6 | 25 | 11 | 14 | null | null |
feliposz/learning-stuff | haskell/learn_chapter6.hs | mit | fsmap :: (a -> b) -> [a] -> [b]
fsmap _ [] = [] | 47 | fsmap :: (a -> b) -> [a] -> [b]
fsmap _ [] = [] | 47 | fsmap _ [] = [] | 15 | false | true | 0 | 7 | 13 | 41 | 22 | 19 | null | null |
ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/realToFrac_1.hs | mit | primRationalToFloat :: Ratio Integer -> Float;
primRationalToFloat = rationalToFloat | 86 | primRationalToFloat :: Ratio Integer -> Float
primRationalToFloat = rationalToFloat | 85 | primRationalToFloat = rationalToFloat | 37 | false | true | 0 | 6 | 10 | 19 | 10 | 9 | null | null |
artuuge/IHaskell | ihaskell-display/ihaskell-rlangqq/IHaskell/Display/Rlangqq.hs | mit | displayInteraction (KnitError c) = display (plain c) | 52 | displayInteraction (KnitError c) = display (plain c) | 52 | displayInteraction (KnitError c) = display (plain c) | 52 | false | false | 0 | 7 | 6 | 24 | 11 | 13 | null | null |
hengchu/tiger-haskell | src/tigerparser.hs | mit | pLValue = liftM VarExp pLValue1 | 31 | pLValue = liftM VarExp pLValue1 | 31 | pLValue = liftM VarExp pLValue1 | 31 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
r-peck/Rome | src/Lib.hs | mit | s3ConfigFile :: MonadIO m => m FilePath
s3ConfigFile = (++ p) `liftM` liftIO getHomeDirectory
where
p = "/.aws/config" | 126 | s3ConfigFile :: MonadIO m => m FilePath
s3ConfigFile = (++ p) `liftM` liftIO getHomeDirectory
where
p = "/.aws/config" | 126 | s3ConfigFile = (++ p) `liftM` liftIO getHomeDirectory
where
p = "/.aws/config" | 86 | false | true | 0 | 6 | 25 | 42 | 22 | 20 | null | null |
AlexeyRaga/eta | compiler/ETA/TypeCheck/TcType.hs | bsd-3-clause | pprTcTyVarDetails (SkolemTv False) = ptext (sLit "sk") | 54 | pprTcTyVarDetails (SkolemTv False) = ptext (sLit "sk") | 54 | pprTcTyVarDetails (SkolemTv False) = ptext (sLit "sk") | 54 | false | false | 0 | 7 | 6 | 24 | 11 | 13 | null | null |
brendanhay/gogol | gogol-shopping-content/gen/Network/Google/ShoppingContent/Types/Product.hs | mpl-2.0 | -- | Identifies what kind of resource this is. Value: the fixed string
-- \"\`content#datafeedsListResponse\`\".
dlrKind :: Lens' DatafeedsListResponse (Maybe Text)
dlrKind = lens _dlrKind (\ s a -> s{_dlrKind = a}) | 215 | dlrKind :: Lens' DatafeedsListResponse (Maybe Text)
dlrKind = lens _dlrKind (\ s a -> s{_dlrKind = a}) | 102 | dlrKind = lens _dlrKind (\ s a -> s{_dlrKind = a}) | 50 | true | true | 0 | 9 | 31 | 47 | 26 | 21 | null | null |
beni55/ghcjs | src/Gen2/Optimizer.hs | mit | -- optimize sequences of assignments:
-- h$r3 = x
-- h$r2 = y
-- h$r1 = z
-- -> h$l3(x,y,z)
-- (only if y,z don't refer to the new value of h$r3)
optimizeSequences :: Cache -> Graph' -> Graph'
optimizeSequences c g0 = foldl' transformNodes g (IM.elems $ g ^. nodes)
where
(ls, g1) = addIdents (map (assignRegs'!) [... | 1,905 | optimizeSequences :: Cache -> Graph' -> Graph'
optimizeSequences c g0 = foldl' transformNodes g (IM.elems $ g ^. nodes)
where
(ls, g1) = addIdents (map (assignRegs'!) [1..32]) g0
g = flattenSequences g1
transformNodes :: Graph' -> Node' -> Graph'
transformNodes g' (SequenceNode xs) =
let xs' = ... | 1,759 | optimizeSequences c g0 = foldl' transformNodes g (IM.elems $ g ^. nodes)
where
(ls, g1) = addIdents (map (assignRegs'!) [1..32]) g0
g = flattenSequences g1
transformNodes :: Graph' -> Node' -> Graph'
transformNodes g' (SequenceNode xs) =
let xs' = f (map (\nid -> fromMaybe (error $ "optimizeSeq... | 1,712 | true | true | 1 | 19 | 520 | 951 | 482 | 469 | null | null |
nikhilunni/HaskellBoy | src/GPU.hs | gpl-2.0 | bgp_addr = 0xFF47 | 19 | bgp_addr = 0xFF47 | 19 | bgp_addr = 0xFF47 | 19 | false | false | 0 | 4 | 4 | 6 | 3 | 3 | null | null |
ekmett/ghc | compiler/nativeGen/X86/Regs.hs | bsd-3-clause | xmm3 = regSingle 27 | 20 | xmm3 = regSingle 27 | 20 | xmm3 = regSingle 27 | 20 | false | false | 1 | 5 | 4 | 12 | 4 | 8 | null | null |
haskell-tinc/hpack | src/Hpack/Syntax/DependencyVersion.hs | mit | withDependencyVersion
:: (DependencyVersion -> a)
-> (Object -> DependencyVersion -> Parser a)
-> Value
-> Parser a
withDependencyVersion k obj v = case v of
Null -> return $ k anyVersion
Object o -> objectDependency o >>= obj o
Number n -> return $ k (DependencyVersion Nothing $ numericVersionConstraint ... | 452 | withDependencyVersion
:: (DependencyVersion -> a)
-> (Object -> DependencyVersion -> Parser a)
-> Value
-> Parser a
withDependencyVersion k obj v = case v of
Null -> return $ k anyVersion
Object o -> objectDependency o >>= obj o
Number n -> return $ k (DependencyVersion Nothing $ numericVersionConstraint ... | 452 | withDependencyVersion k obj v = case v of
Null -> return $ k anyVersion
Object o -> objectDependency o >>= obj o
Number n -> return $ k (DependencyVersion Nothing $ numericVersionConstraint n)
String s -> k . DependencyVersion Nothing <$> stringVersionConstraint s
_ -> typeMismatch "Null, Object, Number, or S... | 328 | false | true | 7 | 11 | 86 | 138 | 67 | 71 | null | null |
oldmanmike/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | repTyConKey = mkPreludeTyConUnique 155 | 39 | repTyConKey = mkPreludeTyConUnique 155 | 39 | repTyConKey = mkPreludeTyConUnique 155 | 39 | false | false | 0 | 5 | 4 | 9 | 4 | 5 | null | null |
deepfire/mood | src/Graphics/FlatDraw.hs | agpl-3.0 | executeFeature ∷ Maybe (Co Double) → Maybe (Co Double) → WRoundRectFeature Double → GRC.Render ()
executeFeature !cStart !cEnd !(WRR (RRSide _ (Po (V2 sx sy)) (Po (V2 ex' ey')))) = do
-- pat ← UN.unsafeInterleaveIO $ coPatternGradLinear rrsFr cStart rrsTo cEnd
if | cStart ≢ cEnd → error "Not implemented: sidewis... | 452 | executeFeature ∷ Maybe (Co Double) → Maybe (Co Double) → WRoundRectFeature Double → GRC.Render ()
executeFeature !cStart !cEnd !(WRR (RRSide _ (Po (V2 sx sy)) (Po (V2 ex' ey')))) = do
-- pat ← UN.unsafeInterleaveIO $ coPatternGradLinear rrsFr cStart rrsTo cEnd
if | cStart ≢ cEnd → error "Not implemented: sidewis... | 452 | executeFeature !cStart !cEnd !(WRR (RRSide _ (Po (V2 sx sy)) (Po (V2 ex' ey')))) = do
-- pat ← UN.unsafeInterleaveIO $ coPatternGradLinear rrsFr cStart rrsTo cEnd
if | cStart ≢ cEnd → error "Not implemented: sidewise gradients."
| Nothing ← cStart → pure ()
| Just c ← cStart → coSetSourceColor c
GRC... | 354 | false | true | 0 | 14 | 94 | 182 | 82 | 100 | null | null |
vasily-kirichenko/haskell-book | src/Readers.hs | bsd-3-clause | x = [1, 2, 3] | 13 | x = [1, 2, 3] | 13 | x = [1, 2, 3] | 13 | false | false | 1 | 5 | 4 | 18 | 9 | 9 | null | null |
mmakowski/cabal | cabal-install/Main.hs | bsd-3-clause | haddockAction :: HaddockFlags -> [String] -> GlobalFlags -> IO ()
haddockAction haddockFlags extraArgs globalFlags = do
let verbosity = fromFlag (haddockVerbosity haddockFlags)
(_useSandbox, config, distPref) <-
reconfigure verbosity (haddockDistPref haddockFlags)
mempty [] globalFlags DontSkipA... | 746 | haddockAction :: HaddockFlags -> [String] -> GlobalFlags -> IO ()
haddockAction haddockFlags extraArgs globalFlags = do
let verbosity = fromFlag (haddockVerbosity haddockFlags)
(_useSandbox, config, distPref) <-
reconfigure verbosity (haddockDistPref haddockFlags)
mempty [] globalFlags DontSkipA... | 746 | haddockAction haddockFlags extraArgs globalFlags = do
let verbosity = fromFlag (haddockVerbosity haddockFlags)
(_useSandbox, config, distPref) <-
reconfigure verbosity (haddockDistPref haddockFlags)
mempty [] globalFlags DontSkipAddSourceDepsCheck
NoFlag (const Nothing)
let had... | 680 | false | true | 0 | 14 | 170 | 178 | 89 | 89 | null | null |
ssaavedra/liquidhaskell | benchmarks/unordered-containers-0.2.1.0/Data/HashMap/Base.hs | bsd-3-clause | -- | /O(n)/ Construct a map with the supplied mappings. If the list
-- contains duplicate mappings, the later mappings take precedence.
fromList :: (Eq k, Hashable k) => [(k, v)] -> HashMap k v
fromList = L.foldl' (\ m (k, v) -> unsafeInsert k v m) empty | 255 | fromList :: (Eq k, Hashable k) => [(k, v)] -> HashMap k v
fromList = L.foldl' (\ m (k, v) -> unsafeInsert k v m) empty | 118 | fromList = L.foldl' (\ m (k, v) -> unsafeInsert k v m) empty | 60 | true | true | 0 | 8 | 48 | 76 | 42 | 34 | null | null |
Soostone/data-filepath | Data/FilePath.hs | bsd-3-clause | showp (DirectoryPath u (PathSegment s)) = showp u ++ "/" ++ s | 61 | showp (DirectoryPath u (PathSegment s)) = showp u ++ "/" ++ s | 61 | showp (DirectoryPath u (PathSegment s)) = showp u ++ "/" ++ s | 61 | false | false | 0 | 8 | 11 | 35 | 16 | 19 | null | null |
pepijnkokke/unlit | src/Unlit/String.hs | bsd-3-clause | emitBird :: String -> String
emitBird l | stripStart l == "" = ">"
| otherwise = "> " <> l | 110 | emitBird :: String -> String
emitBird l | stripStart l == "" = ">"
| otherwise = "> " <> l | 110 | emitBird l | stripStart l == "" = ">"
| otherwise = "> " <> l | 81 | false | true | 0 | 9 | 40 | 44 | 20 | 24 | null | null |
kishoredbn/barrelfish | tools/sockeye/SockeyeBackendLISA.hs | mit | rangeLowerBound (SAST.BitsRange _ base _) = (generate base) | 59 | rangeLowerBound (SAST.BitsRange _ base _) = (generate base) | 59 | rangeLowerBound (SAST.BitsRange _ base _) = (generate base) | 59 | false | false | 0 | 7 | 7 | 28 | 13 | 15 | null | null |
mtesseract/silverratio-jeopardy | src/jeopardy.hs | gpl-2.0 | isJItemDoubleJeopardy :: State -> (Category, Price) -> Bool
isJItemDoubleJeopardy state (category, price) =
let jdatatable = jdataTable_ (stateJData state)
jitem' = M.lookup (category, price) jdatatable
jitem = assert (isJust jitem') $ fromJust jitem'
in jitemDouble_ jitem | 289 | isJItemDoubleJeopardy :: State -> (Category, Price) -> Bool
isJItemDoubleJeopardy state (category, price) =
let jdatatable = jdataTable_ (stateJData state)
jitem' = M.lookup (category, price) jdatatable
jitem = assert (isJust jitem') $ fromJust jitem'
in jitemDouble_ jitem | 289 | isJItemDoubleJeopardy state (category, price) =
let jdatatable = jdataTable_ (stateJData state)
jitem' = M.lookup (category, price) jdatatable
jitem = assert (isJust jitem') $ fromJust jitem'
in jitemDouble_ jitem | 229 | false | true | 0 | 12 | 51 | 98 | 50 | 48 | null | null |
mcdonndi/ChatServer | Main.hs | bsd-3-clause | messageHandler :: Handle -> String -> String -> (String -> IO()) -> IO() -> IO()
messageHandler hdl chatroom clientName broadcast loop = do
message_ <- hGetLine hdl
let message = dropWhile (/=' ') message_
broadcast ("CHAT: " ++ chatroom ++ "\nCLIENT_NAME: " ++ clientName ++ "\nMESSAGE: " ++ message) >> loo... | 321 | messageHandler :: Handle -> String -> String -> (String -> IO()) -> IO() -> IO()
messageHandler hdl chatroom clientName broadcast loop = do
message_ <- hGetLine hdl
let message = dropWhile (/=' ') message_
broadcast ("CHAT: " ++ chatroom ++ "\nCLIENT_NAME: " ++ clientName ++ "\nMESSAGE: " ++ message) >> loo... | 321 | messageHandler hdl chatroom clientName broadcast loop = do
message_ <- hGetLine hdl
let message = dropWhile (/=' ') message_
broadcast ("CHAT: " ++ chatroom ++ "\nCLIENT_NAME: " ++ clientName ++ "\nMESSAGE: " ++ message) >> loop | 240 | false | true | 0 | 14 | 62 | 125 | 60 | 65 | null | null |
denibertovic/haskell | kubernetes/lib/Kubernetes/OpenAPI/ModelLens.hs | bsd-3-clause | -- | 'v1APIGroupKind' Lens
v1APIGroupKindL :: Lens_' V1APIGroup (Maybe Text)
v1APIGroupKindL f V1APIGroup{..} = (\v1APIGroupKind -> V1APIGroup { v1APIGroupKind, ..} ) <$> f v1APIGroupKind | 187 | v1APIGroupKindL :: Lens_' V1APIGroup (Maybe Text)
v1APIGroupKindL f V1APIGroup{..} = (\v1APIGroupKind -> V1APIGroup { v1APIGroupKind, ..} ) <$> f v1APIGroupKind | 160 | v1APIGroupKindL f V1APIGroup{..} = (\v1APIGroupKind -> V1APIGroup { v1APIGroupKind, ..} ) <$> f v1APIGroupKind | 110 | true | true | 1 | 8 | 23 | 62 | 30 | 32 | null | null |
ghcjs/jsaddle-dom | src/JSDOM/Generated/WebKitCSSMatrix.hs | mit | -- | <https://developer.mozilla.org/en-US/docs/Web/API/WebKitCSSMatrix.skewX Mozilla WebKitCSSMatrix.skewX documentation>
skewX_ :: (MonadDOM m) => WebKitCSSMatrix -> Maybe Double -> m ()
skewX_ self angle
= liftDOM (void (self ^. jsf "skewX" [toJSVal angle])) | 263 | skewX_ :: (MonadDOM m) => WebKitCSSMatrix -> Maybe Double -> m ()
skewX_ self angle
= liftDOM (void (self ^. jsf "skewX" [toJSVal angle])) | 140 | skewX_ self angle
= liftDOM (void (self ^. jsf "skewX" [toJSVal angle])) | 74 | true | true | 0 | 12 | 32 | 74 | 35 | 39 | null | null |
rueshyna/gogol | gogol-games/gen/Network/Google/Games/Types/Product.hs | mpl-2.0 | -- | The status of the match. Possible values are: - \"MATCH_AUTO_MATCHING\"
-- - One or more slots need to be filled by auto-matching; the match cannot
-- be established until they are filled. - \"MATCH_ACTIVE\" - The match has
-- started. - \"MATCH_COMPLETE\" - The match has finished. -
-- \"MATCH_CANCELED\" - The ma... | 646 | tbmStatus :: Lens' TurnBasedMatch (Maybe Text)
tbmStatus
= lens _tbmStatus (\ s a -> s{_tbmStatus = a}) | 105 | tbmStatus
= lens _tbmStatus (\ s a -> s{_tbmStatus = a}) | 58 | true | true | 0 | 9 | 110 | 55 | 32 | 23 | null | null |
JoeyEremondi/haskelm | src/Parse/Helpers.hs | bsd-3-clause | innerVarChar :: IParser Char
innerVarChar = alphaNum <|> char '_' <|> char '\'' <?> "" | 86 | innerVarChar :: IParser Char
innerVarChar = alphaNum <|> char '_' <|> char '\'' <?> "" | 86 | innerVarChar = alphaNum <|> char '_' <|> char '\'' <?> "" | 57 | false | true | 3 | 7 | 14 | 41 | 18 | 23 | null | null |
adinapoli/xmonad-contrib | XMonad/Layout/WindowNavigation.hs | bsd-3-clause | noNavigateBorders :: WNConfig
noNavigateBorders =
defaultWNConfig {brightness = Just 0} | 91 | noNavigateBorders :: WNConfig
noNavigateBorders =
defaultWNConfig {brightness = Just 0} | 91 | noNavigateBorders =
defaultWNConfig {brightness = Just 0} | 61 | false | true | 0 | 8 | 13 | 32 | 14 | 18 | null | null |
cabrera/ghc-mod | src/Misc.hs | bsd-3-clause | prepareAutogen :: Cradle -> IO ()
prepareAutogen crdl = when (isJust $ cradleCabalFile crdl) $ do
prepared <- isAutogenPrepared
unless prepared $ do
hdl <- build
watch 30 hdl | 198 | prepareAutogen :: Cradle -> IO ()
prepareAutogen crdl = when (isJust $ cradleCabalFile crdl) $ do
prepared <- isAutogenPrepared
unless prepared $ do
hdl <- build
watch 30 hdl | 198 | prepareAutogen crdl = when (isJust $ cradleCabalFile crdl) $ do
prepared <- isAutogenPrepared
unless prepared $ do
hdl <- build
watch 30 hdl | 164 | false | true | 0 | 11 | 52 | 72 | 32 | 40 | null | null |
thelostt/climbu | src/Interpreter.hs | mit | typeof (Lambdac _ _) = LAMBDA | 29 | typeof (Lambdac _ _) = LAMBDA | 29 | typeof (Lambdac _ _) = LAMBDA | 29 | false | false | 0 | 7 | 5 | 17 | 8 | 9 | null | null |
dmjio/aeson | src/Data/Aeson/TH.hs | bsd-3-clause | conStr :: ToJSONFun -> Options -> Name -> Q Exp
conStr Value opts = appE [|String|] . conTxt opts | 97 | conStr :: ToJSONFun -> Options -> Name -> Q Exp
conStr Value opts = appE [|String|] . conTxt opts | 97 | conStr Value opts = appE [|String|] . conTxt opts | 49 | false | true | 0 | 8 | 18 | 44 | 22 | 22 | null | null |
romanb/amazonka | amazonka-ec2/gen/Network/AWS/EC2/Types.hs | mpl-2.0 | -- | The time when the modification request was created.
rimCreateDate :: Lens' ReservedInstancesModification (Maybe UTCTime)
rimCreateDate = lens _rimCreateDate (\s a -> s { _rimCreateDate = a }) . mapping _Time | 212 | rimCreateDate :: Lens' ReservedInstancesModification (Maybe UTCTime)
rimCreateDate = lens _rimCreateDate (\s a -> s { _rimCreateDate = a }) . mapping _Time | 155 | rimCreateDate = lens _rimCreateDate (\s a -> s { _rimCreateDate = a }) . mapping _Time | 86 | true | true | 1 | 10 | 31 | 58 | 28 | 30 | null | null |
ku-fpg/diagrams-canvas | examples/Geom.hs | bsd-3-clause | top = (1 ^& 0) ~~ (chordX ^& chordY) | 38 | top = (1 ^& 0) ~~ (chordX ^& chordY) | 38 | top = (1 ^& 0) ~~ (chordX ^& chordY) | 38 | false | false | 0 | 7 | 10 | 24 | 13 | 11 | null | null |
liyanchang/scheme-in-haskell | src/chp7.hs | mit | showError (NumArgs expected found) = "Expected " ++ show expected
++ " args: found values " ++ unwordsList found | 116 | showError (NumArgs expected found) = "Expected " ++ show expected
++ " args: found values " ++ unwordsList found | 116 | showError (NumArgs expected found) = "Expected " ++ show expected
++ " args: found values " ++ unwordsList found | 116 | false | false | 2 | 7 | 22 | 36 | 16 | 20 | null | null |
olsner/ghc | testsuite/tests/pmcheck/should_compile/pmc001.hs | bsd-3-clause | f (MkT2 _) (MkT2 _) = True | 26 | f (MkT2 _) (MkT2 _) = True | 26 | f (MkT2 _) (MkT2 _) = True | 26 | false | false | 1 | 6 | 6 | 26 | 11 | 15 | null | null |
keithodulaigh/Hets | THF/ParseTHF.hs | gpl-2.0 | positiveDecimal :: CharParser st String
positiveDecimal = do
nz <- satisfy (\ c -> isDigit c && c /= '0')
d <- many digit
return (nz : d)
<?> "positiv decimal" | 173 | positiveDecimal :: CharParser st String
positiveDecimal = do
nz <- satisfy (\ c -> isDigit c && c /= '0')
d <- many digit
return (nz : d)
<?> "positiv decimal" | 173 | positiveDecimal = do
nz <- satisfy (\ c -> isDigit c && c /= '0')
d <- many digit
return (nz : d)
<?> "positiv decimal" | 133 | false | true | 2 | 13 | 44 | 79 | 35 | 44 | null | null |
prezi/itsitsdangerous | tests/Foreign/Python.hs | bsd-3-clause | -- |@'toPyObject' object@ converts the raw @object@ into a managed pointer.
--
-- Returns the managed pointer, or @'Nothing'@ if @object@ was a null pointer.
--
-- A managed pointer will automatically de-reference the object pointed to when
-- it goes out of scope.
toPyObject :: RawPyObjectHandle -> IO (Maybe PyObject)... | 370 | toPyObject :: RawPyObjectHandle -> IO (Maybe PyObject)
toPyObject raw | raw == nullPtr = return Nothing | 104 | toPyObject raw | raw == nullPtr = return Nothing | 49 | true | true | 0 | 8 | 60 | 46 | 24 | 22 | null | null |
jefdaj/todotree | src/TodoTree/Parse.hs | gpl-3.0 | parseFile :: FilePath -> IO (Either ParseError File)
parseFile fp = do
putStrLn $ "Parsing '" ++ fp ++ "'..."
f <- parseFromFile (pForest <* eof) fp
case f of
-- TODO see if this can be handled by the Either monad
Left e -> return $ Left e
Right f' -> return $ Right File { fPath=fp, fForest=f' }
--... | 395 | parseFile :: FilePath -> IO (Either ParseError File)
parseFile fp = do
putStrLn $ "Parsing '" ++ fp ++ "'..."
f <- parseFromFile (pForest <* eof) fp
case f of
-- TODO see if this can be handled by the Either monad
Left e -> return $ Left e
Right f' -> return $ Right File { fPath=fp, fForest=f' }
--... | 395 | parseFile fp = do
putStrLn $ "Parsing '" ++ fp ++ "'..."
f <- parseFromFile (pForest <* eof) fp
case f of
-- TODO see if this can be handled by the Either monad
Left e -> return $ Left e
Right f' -> return $ Right File { fPath=fp, fForest=f' }
-- the 'x' that marks a task as completed
-- TODO shoul... | 342 | false | true | 0 | 14 | 95 | 124 | 60 | 64 | null | null |
haskell/haddock | haddock-api/src/Haddock/Backends/Hyperlinker/Renderer.hs | bsd-2-clause | internalAnchor _ _ content = content | 36 | internalAnchor _ _ content = content | 36 | internalAnchor _ _ content = content | 36 | false | false | 0 | 5 | 5 | 13 | 6 | 7 | null | null |
nickbart1980/pandoc | src/Text/Pandoc/Parsing.hs | gpl-2.0 | ---
-- Parse a grid table: starts with row of '-' on top, then header
-- (which may be grid), then the rows,
-- which may be grid, separated by blank lines, and
-- ending with a footer (dashed line followed by blank line).
gridTableWith :: Parser [Char] ParserState [Block] -- ^ Block list parser
-> Bo... | 571 | gridTableWith :: Parser [Char] ParserState [Block] -- ^ Block list parser
-> Bool -- ^ Headerless table
-> Parser [Char] ParserState Block
gridTableWith blocks headless =
tableWith (gridTableHeader headless blocks) (gridTableRow blocks)
(gridTab... | 346 | gridTableWith blocks headless =
tableWith (gridTableHeader headless blocks) (gridTableRow blocks)
(gridTableSep '-') gridTableFooter | 146 | true | true | 0 | 8 | 155 | 83 | 45 | 38 | null | null |
energyflowanalysis/efa-2.1 | src/EFA/Flow/Draw.hs | bsd-3-clause | dotFromTopology ::
(Node.C node) =>
Graph node Graph.DirEdge Unicode Unicode ->
DotGraph T.Text
dotFromTopology g =
DotGraph {
strictGraph = False,
directedGraph = False,
graphID = graphIDInt 1,
graphStatements =
DotStmts {
attrStmts = [],
subGraphs =... | 547 | dotFromTopology ::
(Node.C node) =>
Graph node Graph.DirEdge Unicode Unicode ->
DotGraph T.Text
dotFromTopology g =
DotGraph {
strictGraph = False,
directedGraph = False,
graphID = graphIDInt 1,
graphStatements =
DotStmts {
attrStmts = [],
subGraphs =... | 547 | dotFromTopology g =
DotGraph {
strictGraph = False,
directedGraph = False,
graphID = graphIDInt 1,
graphStatements =
DotStmts {
attrStmts = [],
subGraphs = [],
nodeStmts =
Map.elems $ Map.mapWithKey dotFromTopoNode $ Graph.nodeLabels... | 442 | false | true | 0 | 12 | 192 | 144 | 77 | 67 | null | null |
input-output-hk/rscoin-haskell | src/RSCoin/Notary/Worker.hs | gpl-3.0 | -- | This worker queries Bank each period to see if notary and bank periods match.
-- If they are not same then Notary stops serving requests until he becomes updated.
runFetchWorker
:: WorkMode m
=> NotaryState
-> m ()
runFetchWorker st = do
wait $ for 500 ms -- Short wait to make rscoin-deploy happy
... | 1,347 | runFetchWorker
:: WorkMode m
=> NotaryState
-> m ()
runFetchWorker st = do
wait $ for 500 ms -- Short wait to make rscoin-deploy happy
repeatForever (interval 30 sec) handler fetchWorker -- TODO: use not magic constant
where
fetchWorker = do
logDebug "Fetching HBlocks..."
--... | 1,179 | runFetchWorker st = do
wait $ for 500 ms -- Short wait to make rscoin-deploy happy
repeatForever (interval 30 sec) handler fetchWorker -- TODO: use not magic constant
where
fetchWorker = do
logDebug "Fetching HBlocks..."
-- TODO: atomicity problems? Notary period can change and we will ... | 1,115 | true | true | 2 | 12 | 412 | 251 | 111 | 140 | null | null |
nevrenato/HetsAlloy | Common/Id.hs | gpl-2.0 | -- | a prefix for generated names
genNamePrefix :: String
genNamePrefix = "gn_" | 79 | genNamePrefix :: String
genNamePrefix = "gn_" | 45 | genNamePrefix = "gn_" | 21 | true | true | 0 | 4 | 12 | 12 | 7 | 5 | null | null |
wereHamster/nauva | pkg/hs/nauva-catalog/src/Nauva/Catalog/TH.hs | mit | nauvaCatalogPage :: QuasiQuoter
nauvaCatalogPage = QuasiQuoter
{ quoteExp = catalogPage . T.encodeUtf8 . T.pack
, quotePat = error "nauvaCatalogPage: quotePat"
, quoteType = error "nauvaCatalogPage: quoteType"
, quoteDec = error "nauvaCatalogPage: quoteDec"
} | 282 | nauvaCatalogPage :: QuasiQuoter
nauvaCatalogPage = QuasiQuoter
{ quoteExp = catalogPage . T.encodeUtf8 . T.pack
, quotePat = error "nauvaCatalogPage: quotePat"
, quoteType = error "nauvaCatalogPage: quoteType"
, quoteDec = error "nauvaCatalogPage: quoteDec"
} | 282 | nauvaCatalogPage = QuasiQuoter
{ quoteExp = catalogPage . T.encodeUtf8 . T.pack
, quotePat = error "nauvaCatalogPage: quotePat"
, quoteType = error "nauvaCatalogPage: quoteType"
, quoteDec = error "nauvaCatalogPage: quoteDec"
} | 250 | false | true | 0 | 10 | 55 | 62 | 33 | 29 | null | null |
input-output-hk/pos-haskell-prototype | utxo/src/UTxO/DSL.hs | mit | -- | This returns the 'Output's that make up the unspent inputs. The
-- 'Output's contain the total value and owning address for their
-- respective 'Input's.
utxoRange :: Utxo h a -> [Output h a]
utxoRange = Map.elems . utxoToMap | 230 | utxoRange :: Utxo h a -> [Output h a]
utxoRange = Map.elems . utxoToMap | 71 | utxoRange = Map.elems . utxoToMap | 33 | true | true | 1 | 9 | 40 | 45 | 21 | 24 | null | null |
CrazyMerlyn/99problems-haskell | 21-28.hs | mit | -- lfsort
-- Sort a list of lists according to the frequency of length of sublists
lfsort :: [[a]] -> [[a]]
lfsort xss = sortBy (\xs ys -> compare (freq xs) (freq ys)) xss where
lengths = map length xss
freq xs = length $ elemIndices (length xs) lengths | 293 | lfsort :: [[a]] -> [[a]]
lfsort xss = sortBy (\xs ys -> compare (freq xs) (freq ys)) xss where
lengths = map length xss
freq xs = length $ elemIndices (length xs) lengths | 210 | lfsort xss = sortBy (\xs ys -> compare (freq xs) (freq ys)) xss where
lengths = map length xss
freq xs = length $ elemIndices (length xs) lengths | 185 | true | true | 0 | 10 | 88 | 99 | 52 | 47 | null | null |
jecisc/TP_PF_L3 | PF-TP3/.dist-buildwrapper/dist/build/autogen/Paths_PF_TP3.hs | mit | getSysconfDir = catchIO (getEnv "PF_TP3_sysconfdir") (\_ -> return sysconfdir) | 78 | getSysconfDir = catchIO (getEnv "PF_TP3_sysconfdir") (\_ -> return sysconfdir) | 78 | getSysconfDir = catchIO (getEnv "PF_TP3_sysconfdir") (\_ -> return sysconfdir) | 78 | false | false | 1 | 8 | 8 | 33 | 14 | 19 | null | null |
kawamuray/ganeti | src/Ganeti/Rpc.hs | gpl-2.0 | parseHttpReply call (Right (CurlOK, body)) = parseHttpResponse call body | 72 | parseHttpReply call (Right (CurlOK, body)) = parseHttpResponse call body | 72 | parseHttpReply call (Right (CurlOK, body)) = parseHttpResponse call body | 72 | false | false | 0 | 8 | 8 | 28 | 14 | 14 | null | null |
GregorySchwartz/fasta | src/Data/Fasta/String/Utility.hs | gpl-3.0 | -- | Gets the complement of the sequence.
compl :: FastaSequence -> FastaSequence
compl fs = fs { fastaSeq = fmap complRules . fastaSeq $ fs } | 142 | compl :: FastaSequence -> FastaSequence
compl fs = fs { fastaSeq = fmap complRules . fastaSeq $ fs } | 100 | compl fs = fs { fastaSeq = fmap complRules . fastaSeq $ fs } | 60 | true | true | 0 | 9 | 26 | 38 | 20 | 18 | null | null |
hdbc/hdbc-sqlite3 | testsrc/TestMisc.hs | bsd-3-clause | rowdata =
[[SqlInt32 0, toSql "Testing", SqlNull],
[SqlInt32 1, toSql "Foo", SqlInt32 5],
[SqlInt32 2, toSql "Bar", SqlInt32 9]] | 143 | rowdata =
[[SqlInt32 0, toSql "Testing", SqlNull],
[SqlInt32 1, toSql "Foo", SqlInt32 5],
[SqlInt32 2, toSql "Bar", SqlInt32 9]] | 143 | rowdata =
[[SqlInt32 0, toSql "Testing", SqlNull],
[SqlInt32 1, toSql "Foo", SqlInt32 5],
[SqlInt32 2, toSql "Bar", SqlInt32 9]] | 143 | false | false | 0 | 7 | 33 | 66 | 35 | 31 | null | null |
phischu/fragnix | builtins/ghc-prim/GHC.PrimopWrappers.hs | bsd-3-clause | clz16# :: Word# -> Word#
clz16# a1 = (GHC.Prim.clz16#) a1 | 57 | clz16# :: Word# -> Word#
clz16# a1 = (GHC.Prim.clz16#) a1 | 57 | clz16# a1 = (GHC.Prim.clz16#) a1 | 32 | false | true | 0 | 7 | 9 | 27 | 14 | 13 | null | null |
imalsogreg/realtime-streams | exec/Demo.hs | bsd-3-clause | main = demo | 11 | main = demo | 11 | main = demo | 11 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
tathougies/crane | src/Web/Crane/Types.hs | gpl-2.0 | getMaster :: CraneMonad app master master
getMaster = getMaster' id | 67 | getMaster :: CraneMonad app master master
getMaster = getMaster' id | 67 | getMaster = getMaster' id | 25 | false | true | 0 | 5 | 9 | 21 | 10 | 11 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.