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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
iansullivan88/site-archiver | src/SiteArchiver.hs | mit | main :: IO ()
main = do
directory <- getCurrentDirectory
ds <- createDataStore (directory </> "site-archiver.sqlite3")
scotty 3000 $ do
get (regex $ concat ["^", jobPath, "([0-9]+)(.*)$"]) $ do
jobId <- param "1"
pagePath <- param "2"
Just startUrlString <- liftIO $ getStartUrlForJob ds jobI... | 1,409 | main :: IO ()
main = do
directory <- getCurrentDirectory
ds <- createDataStore (directory </> "site-archiver.sqlite3")
scotty 3000 $ do
get (regex $ concat ["^", jobPath, "([0-9]+)(.*)$"]) $ do
jobId <- param "1"
pagePath <- param "2"
Just startUrlString <- liftIO $ getStartUrlForJob ds jobI... | 1,409 | main = do
directory <- getCurrentDirectory
ds <- createDataStore (directory </> "site-archiver.sqlite3")
scotty 3000 $ do
get (regex $ concat ["^", jobPath, "([0-9]+)(.*)$"]) $ do
jobId <- param "1"
pagePath <- param "2"
Just startUrlString <- liftIO $ getStartUrlForJob ds jobId
let Ju... | 1,395 | false | true | 0 | 19 | 361 | 467 | 201 | 266 | null | null |
luisnavarrodelangel/InnerEar | src/InnerEar/Database/Events.hs | gpl-3.0 | recordFromRow h t (Just "AuthenticationFailure") i c q a s e1 e2 r = do
let y = Right AuthenticationFailure
z <- Point y <$> t
(flip Record) z <$> h | 154 | recordFromRow h t (Just "AuthenticationFailure") i c q a s e1 e2 r = do
let y = Right AuthenticationFailure
z <- Point y <$> t
(flip Record) z <$> h | 154 | recordFromRow h t (Just "AuthenticationFailure") i c q a s e1 e2 r = do
let y = Right AuthenticationFailure
z <- Point y <$> t
(flip Record) z <$> h | 154 | false | false | 0 | 10 | 36 | 77 | 35 | 42 | null | null |
sixears/fluffy | src/Fluffy/Language/TH.hs | mit | -- stringE ---------------------------------------------------------------------
-- | a literal string as an Exp
stringE :: String -> Exp
stringE = LitE . StringL | 164 | stringE :: String -> Exp
stringE = LitE . StringL | 49 | stringE = LitE . StringL | 24 | true | true | 1 | 7 | 22 | 29 | 13 | 16 | null | null |
snoyberg/ghc | compiler/coreSyn/CoreSyn.hs | bsd-3-clause | -- | Retrieves the template of an unfolding: panics if none is known
unfoldingTemplate :: Unfolding -> CoreExpr
unfoldingTemplate = uf_tmpl | 139 | unfoldingTemplate :: Unfolding -> CoreExpr
unfoldingTemplate = uf_tmpl | 70 | unfoldingTemplate = uf_tmpl | 27 | true | true | 0 | 5 | 20 | 16 | 9 | 7 | null | null |
ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/enumFromThen_3.hs | mit | numericEnumFromThenToP1 xu xv xw MyFalse = numericEnumFromThenToP0 xu xv xw otherwise | 85 | numericEnumFromThenToP1 xu xv xw MyFalse = numericEnumFromThenToP0 xu xv xw otherwise | 85 | numericEnumFromThenToP1 xu xv xw MyFalse = numericEnumFromThenToP0 xu xv xw otherwise | 85 | false | false | 0 | 5 | 10 | 24 | 11 | 13 | null | null |
narurien/ganeti-ceph | src/Ganeti/Query/Query.hs | gpl-2.0 | execGetter cfg _ item (FieldConfig getter) = getter cfg item | 61 | execGetter cfg _ item (FieldConfig getter) = getter cfg item | 61 | execGetter cfg _ item (FieldConfig getter) = getter cfg item | 61 | false | false | 0 | 7 | 10 | 26 | 12 | 14 | null | null |
romildo/gsynt | src/nullable-first-follow.hs | isc | buildNullables = do
v@View{step = i, grammar, nts, nullable} <- get
let nterms = map anInfo nts
let nullable1 = map (An [(i,B,Vis),(i,BE,Alert)] False :) nullable
let (i1, grammar1) =
mapAccumLFliped grammar i $ \i x@(An a p@(_:rhs)) ->
if any isTerminal (map anInfo rhs)
then (i+1, A... | 1,626 | buildNullables = do
v@View{step = i, grammar, nts, nullable} <- get
let nterms = map anInfo nts
let nullable1 = map (An [(i,B,Vis),(i,BE,Alert)] False :) nullable
let (i1, grammar1) =
mapAccumLFliped grammar i $ \i x@(An a p@(_:rhs)) ->
if any isTerminal (map anInfo rhs)
then (i+1, A... | 1,626 | buildNullables = do
v@View{step = i, grammar, nts, nullable} <- get
let nterms = map anInfo nts
let nullable1 = map (An [(i,B,Vis),(i,BE,Alert)] False :) nullable
let (i1, grammar1) =
mapAccumLFliped grammar i $ \i x@(An a p@(_:rhs)) ->
if any isTerminal (map anInfo rhs)
then (i+1, A... | 1,626 | false | false | 0 | 29 | 563 | 957 | 536 | 421 | null | null |
goshakkk/Poker.hs | src/Utils.hs | mit | maybeList Nothing = [] | 23 | maybeList Nothing = [] | 23 | maybeList Nothing = [] | 23 | false | false | 1 | 6 | 4 | 15 | 5 | 10 | null | null |
wavewave/LHCOAnalysis | src/HEP/Parser/LHCOAnalysis/Parse.hs | bsd-3-clause | addEachObjtoClassified phyclass (idx,(EO met'@(ObjMET _)))
= phyclass { met = met' } | 96 | addEachObjtoClassified phyclass (idx,(EO met'@(ObjMET _)))
= phyclass { met = met' } | 96 | addEachObjtoClassified phyclass (idx,(EO met'@(ObjMET _)))
= phyclass { met = met' } | 96 | false | false | 0 | 11 | 23 | 45 | 23 | 22 | null | null |
noinia/balbst | src/Data/BalBST.hs | bsd-3-clause | joinNodeL (Node Red lc h _ rc) r = balance Red lc h (joinNodeL rc r) | 70 | joinNodeL (Node Red lc h _ rc) r = balance Red lc h (joinNodeL rc r) | 70 | joinNodeL (Node Red lc h _ rc) r = balance Red lc h (joinNodeL rc r) | 70 | false | false | 0 | 7 | 17 | 43 | 20 | 23 | null | null |
vladimir-ipatov/ganeti | src/Ganeti/Constants.hs | gpl-2.0 | ispecsMin :: String
ispecsMin = "min" | 37 | ispecsMin :: String
ispecsMin = "min" | 37 | ispecsMin = "min" | 17 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
fpinsight/hocilib | src/Database/Ocilib.hs | bsd-2-clause | ociEnableWarnings :: Bool -> IO Bool
ociEnableWarnings v = do
let vAsInt = fromIntegral $ fromEnum v
fmap toBool [C.exp| int { OCI_EnableWarnings($(int vAsInt)) } |]
-- | Set the global error user handler.
-- boolean OCI_SetErrorHandler (POCI_ERROR handler) | 266 | ociEnableWarnings :: Bool -> IO Bool
ociEnableWarnings v = do
let vAsInt = fromIntegral $ fromEnum v
fmap toBool [C.exp| int { OCI_EnableWarnings($(int vAsInt)) } |]
-- | Set the global error user handler.
-- boolean OCI_SetErrorHandler (POCI_ERROR handler) | 266 | ociEnableWarnings v = do
let vAsInt = fromIntegral $ fromEnum v
fmap toBool [C.exp| int { OCI_EnableWarnings($(int vAsInt)) } |]
-- | Set the global error user handler.
-- boolean OCI_SetErrorHandler (POCI_ERROR handler) | 229 | false | true | 0 | 11 | 47 | 53 | 27 | 26 | null | null |
GaloisInc/halvm-ghc | compiler/main/DynFlags.hs | bsd-3-clause | wayGeneralFlags _ WayThreaded = [] | 34 | wayGeneralFlags _ WayThreaded = [] | 34 | wayGeneralFlags _ WayThreaded = [] | 34 | false | false | 0 | 5 | 4 | 13 | 6 | 7 | null | null |
artuuge/xmonad-configuration | src/XMonadExt/Default.hs | gpl-3.0 | ----------
-- installation directory relative to $HOME
xmonadExt :: FilePath
xmonadExt = ".xmonad/xmonad-ext" | 110 | xmonadExt :: FilePath
xmonadExt = ".xmonad/xmonad-ext" | 54 | xmonadExt = ".xmonad/xmonad-ext" | 32 | true | true | 0 | 6 | 13 | 20 | 9 | 11 | null | null |
ganeti-github-testing/ganeti-test-1 | src/Ganeti/Constants.hs | bsd-2-clause | htDiskParavirtual :: String
htDiskParavirtual = "paravirtual" | 61 | htDiskParavirtual :: String
htDiskParavirtual = "paravirtual" | 61 | htDiskParavirtual = "paravirtual" | 33 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
substance/letterpress | Pandoc/Readers/HTML.hs | gpl-3.0 | "tbody" `closes` t | t `elem` ["tbody","tfoot","thead","colgroup"] = True | 73 | "tbody" `closes` t | t `elem` ["tbody","tfoot","thead","colgroup"] = True | 73 | "tbody" `closes` t | t `elem` ["tbody","tfoot","thead","colgroup"] = True | 73 | false | false | 0 | 9 | 8 | 42 | 22 | 20 | null | null |
Javran/misc | max-flow/src/Javran/MaxFlow/Lib.hs | mit | -- load, parse, and normalize a network from FilePath.
loadNetwork :: FilePath -> IO NormalizedNetwork
loadNetwork fName = do
raw <- T.readFile fName
case parseFromRaw raw of
Left msg -> do
putStrLn $ "parse error: " <> msg
exitFailure
Right nrRaw -> do
pure $ normalize nrRaw | 306 | loadNetwork :: FilePath -> IO NormalizedNetwork
loadNetwork fName = do
raw <- T.readFile fName
case parseFromRaw raw of
Left msg -> do
putStrLn $ "parse error: " <> msg
exitFailure
Right nrRaw -> do
pure $ normalize nrRaw | 251 | loadNetwork fName = do
raw <- T.readFile fName
case parseFromRaw raw of
Left msg -> do
putStrLn $ "parse error: " <> msg
exitFailure
Right nrRaw -> do
pure $ normalize nrRaw | 203 | true | true | 0 | 13 | 76 | 86 | 38 | 48 | null | null |
olorin/amazonka | amazonka-iam/gen/Network/AWS/IAM/GetGroup.hs | mpl-2.0 | -- | Information about the group.
ggrsGroup :: Lens' GetGroupResponse Group
ggrsGroup = lens _ggrsGroup (\ s a -> s{_ggrsGroup = a}) | 132 | ggrsGroup :: Lens' GetGroupResponse Group
ggrsGroup = lens _ggrsGroup (\ s a -> s{_ggrsGroup = a}) | 98 | ggrsGroup = lens _ggrsGroup (\ s a -> s{_ggrsGroup = a}) | 56 | true | true | 1 | 9 | 21 | 46 | 22 | 24 | null | null |
dysinger/amazonka | amazonka-s3/gen/Network/AWS/S3/Types.hs | mpl-2.0 | -- | The class of storage used to store the object.
oStorageClass :: Lens' Object ObjectStorageClass
oStorageClass = lens _oStorageClass (\s a -> s { _oStorageClass = a }) | 171 | oStorageClass :: Lens' Object ObjectStorageClass
oStorageClass = lens _oStorageClass (\s a -> s { _oStorageClass = a }) | 119 | oStorageClass = lens _oStorageClass (\s a -> s { _oStorageClass = a }) | 70 | true | true | 1 | 9 | 28 | 45 | 22 | 23 | null | null |
mmisamore/probabilities | src/Examples.hs | bsd-3-clause | -- Lift any pure distribution to a randomized distribution using n samples
rSampleDist :: Monoid a => Int -> Dist a -> RDist a
rSampleDist n d = rDist (if n <= 0 then [] else replicate n (rSample d)) | 199 | rSampleDist :: Monoid a => Int -> Dist a -> RDist a
rSampleDist n d = rDist (if n <= 0 then [] else replicate n (rSample d)) | 124 | rSampleDist n d = rDist (if n <= 0 then [] else replicate n (rSample d)) | 72 | true | true | 0 | 10 | 39 | 69 | 34 | 35 | null | null |
Kyarigwo/ki-component-store | test/Kyarigwo/ComponentStoreTest.hs | gpl-3.0 | hprop_Difference_rightId :: Property
hprop_Difference_rightId = property $ do
d <- forAll diff
d <> mempty === d | 116 | hprop_Difference_rightId :: Property
hprop_Difference_rightId = property $ do
d <- forAll diff
d <> mempty === d | 116 | hprop_Difference_rightId = property $ do
d <- forAll diff
d <> mempty === d | 79 | false | true | 0 | 9 | 20 | 36 | 17 | 19 | null | null |
urbanslug/ghc | compiler/deSugar/DsBinds.hs | bsd-3-clause | ------------------------
makeCorePair :: DynFlags -> Id -> Bool -> Arity -> CoreExpr -> (Id, CoreExpr)
makeCorePair dflags gbl_id is_default_method dict_arity rhs
| is_default_method -- Default methods are *always* inlined
= (gbl_id `setIdUnfolding` mkCompulsoryUnfolding rhs, rhs)
| DFunId is_new... | 2,111 | makeCorePair :: DynFlags -> Id -> Bool -> Arity -> CoreExpr -> (Id, CoreExpr)
makeCorePair dflags gbl_id is_default_method dict_arity rhs
| is_default_method -- Default methods are *always* inlined
= (gbl_id `setIdUnfolding` mkCompulsoryUnfolding rhs, rhs)
| DFunId is_newtype <- idDetails gbl_id
... | 2,086 | makeCorePair dflags gbl_id is_default_method dict_arity rhs
| is_default_method -- Default methods are *always* inlined
= (gbl_id `setIdUnfolding` mkCompulsoryUnfolding rhs, rhs)
| DFunId is_newtype <- idDetails gbl_id
= (mk_dfun_w_stuff is_newtype, rhs)
| otherwise
= case inlinePragmaSpec... | 2,008 | true | true | 0 | 11 | 579 | 461 | 237 | 224 | null | null |
RyanGlScott/nfa2dfa | src/NFA2DFA/Algorithm.hs | gpl-3.0 | -- | Retrieves a marked state in a set of marked states that has the same
-- set contents as another marked state.
lookupDStates :: MarkedAStateSet -> Set MarkedAStateSet -> MarkedAStateSet
lookupDStates (MarkedAStateSet _ _ set) dstates = fromJust . find ((==set) . markedSet) $ S.toList dstates | 298 | lookupDStates :: MarkedAStateSet -> Set MarkedAStateSet -> MarkedAStateSet
lookupDStates (MarkedAStateSet _ _ set) dstates = fromJust . find ((==set) . markedSet) $ S.toList dstates | 181 | lookupDStates (MarkedAStateSet _ _ set) dstates = fromJust . find ((==set) . markedSet) $ S.toList dstates | 106 | true | true | 0 | 10 | 48 | 71 | 35 | 36 | null | null |
DATx02-16-14/Hastings | src/Server.hs | bsd-3-clause | getClientName :: Server String
getClientName = do
plr <- getSessionID >>= liftIO . PlayerDB.retrieveOnlinePlayer
return $ maybe "No such sessionID" (Fields.playerUserName . Esql.entityVal) plr
-- |Write to the clients current game chan | 242 | getClientName :: Server String
getClientName = do
plr <- getSessionID >>= liftIO . PlayerDB.retrieveOnlinePlayer
return $ maybe "No such sessionID" (Fields.playerUserName . Esql.entityVal) plr
-- |Write to the clients current game chan | 242 | getClientName = do
plr <- getSessionID >>= liftIO . PlayerDB.retrieveOnlinePlayer
return $ maybe "No such sessionID" (Fields.playerUserName . Esql.entityVal) plr
-- |Write to the clients current game chan | 211 | false | true | 0 | 11 | 38 | 57 | 28 | 29 | null | null |
derekmcloughlin/BridgeBuddyServer | library/BridgeBuddy/Cards.hs | apache-2.0 | playingTricksInHonours :: String -> Double
playingTricksInHonours "K" = 0.5 | 80 | playingTricksInHonours :: String -> Double
playingTricksInHonours "K" = 0.5 | 80 | playingTricksInHonours "K" = 0.5 | 37 | false | true | 0 | 5 | 13 | 22 | 10 | 12 | null | null |
Heather/Idris-dev | src/Idris/IBC.hs | bsd-3-clause | processOptimise :: Archive -> Idris ()
processOptimise ar = do
cs <- getEntry [] "ibc_optimise" ar
mapM_ (\ (n, c) -> updateIState (\i ->
i { idris_optimisation = addDef n c (idris_optimisation i) })) cs | 235 | processOptimise :: Archive -> Idris ()
processOptimise ar = do
cs <- getEntry [] "ibc_optimise" ar
mapM_ (\ (n, c) -> updateIState (\i ->
i { idris_optimisation = addDef n c (idris_optimisation i) })) cs | 235 | processOptimise ar = do
cs <- getEntry [] "ibc_optimise" ar
mapM_ (\ (n, c) -> updateIState (\i ->
i { idris_optimisation = addDef n c (idris_optimisation i) })) cs | 196 | false | true | 0 | 17 | 66 | 93 | 47 | 46 | null | null |
svenkeidel/sdl2 | src/SDL/Audio.hs | bsd-3-clause | -- | Query SDL for the name of the currently initialized audio driver, if
-- possible. This will return 'Nothing' if no driver has been initialized.
currentAudioDriver :: MonadIO m => m (Maybe Text)
currentAudioDriver =
liftIO $ maybePeek (fmap Text.decodeUtf8 . BS.packCString) =<< Raw.getCurrentAudioDriver | 310 | currentAudioDriver :: MonadIO m => m (Maybe Text)
currentAudioDriver =
liftIO $ maybePeek (fmap Text.decodeUtf8 . BS.packCString) =<< Raw.getCurrentAudioDriver | 161 | currentAudioDriver =
liftIO $ maybePeek (fmap Text.decodeUtf8 . BS.packCString) =<< Raw.getCurrentAudioDriver | 111 | true | true | 0 | 11 | 46 | 56 | 28 | 28 | null | null |
bitemyapp/mueval | main.hs | bsd-3-clause | main :: IO ()
main = do args <- getArgs
-- force parse errors in main's thread
case interpreterOpts args of
Left (n,s) -> putStrLn s >> if n then exitSuccess else exitFailure
Right opts -> forkedMain $! opts | 255 | main :: IO ()
main = do args <- getArgs
-- force parse errors in main's thread
case interpreterOpts args of
Left (n,s) -> putStrLn s >> if n then exitSuccess else exitFailure
Right opts -> forkedMain $! opts | 255 | main = do args <- getArgs
-- force parse errors in main's thread
case interpreterOpts args of
Left (n,s) -> putStrLn s >> if n then exitSuccess else exitFailure
Right opts -> forkedMain $! opts | 241 | false | true | 0 | 11 | 86 | 77 | 38 | 39 | null | null |
phischu/fragnix | tests/packages/scotty/Data.Vector.hs | bsd-3-clause | iscanl' = G.iscanl' | 19 | iscanl' = G.iscanl' | 19 | iscanl' = G.iscanl' | 19 | false | false | 0 | 5 | 2 | 8 | 4 | 4 | null | null |
mcschroeder/ghc | compiler/main/TidyPgm.hs | bsd-3-clause | tidyTopIdInfo :: DynFlags -> TidyEnv -> Name -> CoreExpr -> CoreExpr
-> IdInfo -> Bool -> CafInfo -> IdInfo
tidyTopIdInfo dflags rhs_tidy_env name orig_rhs tidy_rhs idinfo show_unfold caf_info
| not is_external -- For internal Ids (not externally visible)
= vanillaIdInfo -- we only need enou... | 4,874 | tidyTopIdInfo :: DynFlags -> TidyEnv -> Name -> CoreExpr -> CoreExpr
-> IdInfo -> Bool -> CafInfo -> IdInfo
tidyTopIdInfo dflags rhs_tidy_env name orig_rhs tidy_rhs idinfo show_unfold caf_info
| not is_external -- For internal Ids (not externally visible)
= vanillaIdInfo -- we only need enou... | 4,874 | tidyTopIdInfo dflags rhs_tidy_env name orig_rhs tidy_rhs idinfo show_unfold caf_info
| not is_external -- For internal Ids (not externally visible)
= vanillaIdInfo -- we only need enough info for code generation
-- Arity and strictness info are enough;
-- ... | 4,752 | false | true | 0 | 12 | 1,387 | 388 | 214 | 174 | null | null |
holdenlee/fluidity | PTScan.hs | mit | --Carries out one "cycle" of the mind.
{-| Ask the nth agent for its activation level (and allow it to do scouting). -}
scoutOne :: Int -> Mind wksp mem -> (Double, Mind wksp mem)
scoutOne n w =
case (getAgent n w) of
Agent a' ->
case (_scout a') w a' of
(d, a2) -> (d, setAge... | 381 | scoutOne :: Int -> Mind wksp mem -> (Double, Mind wksp mem)
scoutOne n w =
case (getAgent n w) of
Agent a' ->
case (_scout a') w a' of
(d, a2) -> (d, setAgent n (Agent a2) w)
{-| Ask every active agent to scout. -} | 256 | scoutOne n w =
case (getAgent n w) of
Agent a' ->
case (_scout a') w a' of
(d, a2) -> (d, setAgent n (Agent a2) w)
{-| Ask every active agent to scout. -} | 196 | true | true | 0 | 15 | 116 | 116 | 58 | 58 | null | null |
forked-upstream-packages-for-ghcjs/ghcjs | ghcjs/src/Gen2/Object.hs | mit | readObjectFile :: FilePath -> IO [ObjUnit]
readObjectFile = readObjectFileKeys (\_ _ -> True) | 93 | readObjectFile :: FilePath -> IO [ObjUnit]
readObjectFile = readObjectFileKeys (\_ _ -> True) | 93 | readObjectFile = readObjectFileKeys (\_ _ -> True) | 50 | false | true | 0 | 8 | 12 | 39 | 19 | 20 | null | null |
OS2World/DEV-UTIL-HUGS | libraries/Text/Html.hs | bsd-3-clause | td = tag "TD" | 31 | td = tag "TD" | 31 | td = tag "TD" | 31 | false | false | 0 | 5 | 21 | 9 | 4 | 5 | null | null |
orion-42/cellular-automata-2d | Forest.hs | mit | -- | If a tree is burning, it becomes plain empty ground
-- A new tree grows one empty ground with probability `newTreeProb`.
-- If a tree as at least one burning neighbor tree it starts to burn itself witch probability `newFireProb`.
-- Otherwise everything stays the same.
-- The forest automaton uses the moor... | 824 | forestRule :: Rule Wood
forestRule = Rule moorIndexDeltas updateCell
where
updateCell Fire _ = return Empty
updateCell Tree friends = do
newFire <- randomRIO (0,1)
return $ if newFireProb >= newFire || Fire `elem` friends
then Fire
else Tree
... | 489 | forestRule = Rule moorIndexDeltas updateCell
where
updateCell Fire _ = return Empty
updateCell Tree friends = do
newFire <- randomRIO (0,1)
return $ if newFireProb >= newFire || Fire `elem` friends
then Fire
else Tree
updateCell Empty _... | 465 | true | true | 2 | 12 | 262 | 140 | 73 | 67 | null | null |
fmapfmapfmap/amazonka | amazonka-rds/gen/Network/AWS/RDS/AuthorizeDBSecurityGroupIngress.hs | mpl-2.0 | -- | Id of the EC2 security group to authorize. For VPC DB security groups,
-- 'EC2SecurityGroupId' must be provided. Otherwise,
-- 'EC2SecurityGroupOwnerId' and either 'EC2SecurityGroupName' or
-- 'EC2SecurityGroupId' must be provided.
adsgiEC2SecurityGroupId :: Lens' AuthorizeDBSecurityGroupIngress (Maybe Text)
adsgi... | 413 | adsgiEC2SecurityGroupId :: Lens' AuthorizeDBSecurityGroupIngress (Maybe Text)
adsgiEC2SecurityGroupId = lens _adsgiEC2SecurityGroupId (\ s a -> s{_adsgiEC2SecurityGroupId = a}) | 176 | adsgiEC2SecurityGroupId = lens _adsgiEC2SecurityGroupId (\ s a -> s{_adsgiEC2SecurityGroupId = a}) | 98 | true | true | 0 | 9 | 48 | 49 | 28 | 21 | null | null |
pbl64k/HackerRank-Contests | 2014-06-20-FP/BoleynSalary/bs.seqpw.hs | bsd-2-clause | tst q d ks = do
qstr <- getLine
let (v : k : _) = map read (words qstr)
let d' = snd $ (ks ! (v + d)) `Seq.index` (pred k)
putStrLn $ show d'
tst (pred q) d' ks | 180 | tst q d ks = do
qstr <- getLine
let (v : k : _) = map read (words qstr)
let d' = snd $ (ks ! (v + d)) `Seq.index` (pred k)
putStrLn $ show d'
tst (pred q) d' ks | 180 | tst q d ks = do
qstr <- getLine
let (v : k : _) = map read (words qstr)
let d' = snd $ (ks ! (v + d)) `Seq.index` (pred k)
putStrLn $ show d'
tst (pred q) d' ks | 180 | false | false | 0 | 15 | 61 | 120 | 57 | 63 | null | null |
gibiansky/nvim-hs | test-suite/Neovim/API/THSpec.hs | apache-2.0 | isNeovimException :: NeovimException -> Bool
isNeovimException _ = True | 71 | isNeovimException :: NeovimException -> Bool
isNeovimException _ = True | 71 | isNeovimException _ = True | 26 | false | true | 0 | 5 | 8 | 18 | 9 | 9 | null | null |
asmyczek/hreviewboard | ReviewBoard/Request.hs | bsd-3-clause | -- Path elements with optional parameter
reviewrequests = mkpup "reviewrequests" :: (Maybe Integer -> UrlPath -> UrlPath) | 130 | reviewrequests = mkpup "reviewrequests" :: (Maybe Integer -> UrlPath -> UrlPath) | 89 | reviewrequests = mkpup "reviewrequests" :: (Maybe Integer -> UrlPath -> UrlPath) | 89 | true | false | 0 | 7 | 25 | 30 | 15 | 15 | null | null |
jtobin/mwc-probability | src/System/Random/MWC/Probability.hs | mit | uniform :: (PrimMonad m, Variate a) => Prob m a
uniform = Prob QMWC.uniform | 75 | uniform :: (PrimMonad m, Variate a) => Prob m a
uniform = Prob QMWC.uniform | 75 | uniform = Prob QMWC.uniform | 27 | false | true | 0 | 6 | 13 | 36 | 18 | 18 | null | null |
scvalex/logorrhea | bot/tests.hs | bsd-3-clause | port = fromIntegral 6667 | 28 | port = fromIntegral 6667 | 28 | port = fromIntegral 6667 | 28 | false | false | 1 | 5 | 7 | 13 | 4 | 9 | null | null |
ku-fpg/marked-pretty | src/Text/PrettyPrint/MarkedHughesPJ.hs | bsd-3-clause | fits _ (Union {}) = error "fits Union" | 47 | fits _ (Union {}) = error "fits Union" | 47 | fits _ (Union {}) = error "fits Union" | 47 | false | false | 0 | 7 | 16 | 21 | 10 | 11 | null | null |
haroldcarr/learn-haskell-coq-ml-etc | haskell/topic/streaming/2018-10-tim-williams-streaming-haskellX/src/GGListT.hs | unlicense | fold :: Monad m => (x -> a -> x) -> x -> (x -> b) -> ListT m a -> m b
fold step begin done l = go begin l
where
go !x (ListT m) = do
s <- m
case s of
Cons a l' -> go (step x a) l'
Nil -> return (done x)
{-| Use this to fold a `ListT` into a single value. This is des... | 562 | fold :: Monad m => (x -> a -> x) -> x -> (x -> b) -> ListT m a -> m b
fold step begin done l = go begin l
where
go !x (ListT m) = do
s <- m
case s of
Cons a l' -> go (step x a) l'
Nil -> return (done x)
{-| Use this to fold a `ListT` into a single value. This is des... | 562 | fold step begin done l = go begin l
where
go !x (ListT m) = do
s <- m
case s of
Cons a l' -> go (step x a) l'
Nil -> return (done x)
{-| Use this to fold a `ListT` into a single value. This is designed to be
used with the @foldl@ library:
> import Control.Foldl... | 492 | false | true | 0 | 12 | 181 | 147 | 70 | 77 | null | null |
nh2/darcs-fastconvert | Stash.hs | bsd-3-clause | addMarkInventory :: IM.Key -> Inventory -> MarkInventories -> MarkInventories
addMarkInventory = IM.insert | 106 | addMarkInventory :: IM.Key -> Inventory -> MarkInventories -> MarkInventories
addMarkInventory = IM.insert | 106 | addMarkInventory = IM.insert | 28 | false | true | 0 | 7 | 11 | 27 | 14 | 13 | null | null |
mietek/mighttpd2 | src/WaiApp.hs | bsd-3-clause | getRoute key (m:ms)
| src `isPrefixOf` key = Found m
| src `isMountPointOf` key = Redirect
| otherwise = getRoute key ms
where
src = routeSource m | 177 | getRoute key (m:ms)
| src `isPrefixOf` key = Found m
| src `isMountPointOf` key = Redirect
| otherwise = getRoute key ms
where
src = routeSource m | 177 | getRoute key (m:ms)
| src `isPrefixOf` key = Found m
| src `isMountPointOf` key = Redirect
| otherwise = getRoute key ms
where
src = routeSource m | 177 | false | false | 1 | 8 | 57 | 83 | 37 | 46 | null | null |
TomMD/cbbgp | src/Main.hs | bsd-3-clause | kwTagger = "tagger" | 23 | kwTagger = "tagger" | 23 | kwTagger = "tagger" | 23 | false | false | 0 | 4 | 6 | 6 | 3 | 3 | null | null |
sgillespie/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | vecRepDataConKey :: Unique
vecRepDataConKey = mkPreludeDataConUnique 71 | 94 | vecRepDataConKey :: Unique
vecRepDataConKey = mkPreludeDataConUnique 71 | 94 | vecRepDataConKey = mkPreludeDataConUnique 71 | 67 | false | true | 0 | 5 | 29 | 14 | 7 | 7 | null | null |
abstools/habs | src/ABS/Compiler/Codegen/Exp.hs | bsd-3-clause | tPureExp (ABS.EParamConstr (ABS.U_ (ABS.U (_,"InsertAssoc"))) [l, r]) = do
(tl,_) <- tPureExp l
(tr,_) <- tPureExp r
pure ([hs|(insertAssoc $tl $tr)|], undefined) | 168 | tPureExp (ABS.EParamConstr (ABS.U_ (ABS.U (_,"InsertAssoc"))) [l, r]) = do
(tl,_) <- tPureExp l
(tr,_) <- tPureExp r
pure ([hs|(insertAssoc $tl $tr)|], undefined) | 168 | tPureExp (ABS.EParamConstr (ABS.U_ (ABS.U (_,"InsertAssoc"))) [l, r]) = do
(tl,_) <- tPureExp l
(tr,_) <- tPureExp r
pure ([hs|(insertAssoc $tl $tr)|], undefined) | 168 | false | false | 0 | 12 | 27 | 95 | 51 | 44 | null | null |
ghcjs/jsaddle-dom | src/JSDOM/Generated/Document.hs | mit | -- | <https://developer.mozilla.org/en-US/docs/Web/API/Document.createExpression Mozilla Document.createExpression documentation>
createExpression_ ::
(MonadDOM m, IsDocument self, ToJSString expression) =>
self -> Maybe expression -> Maybe XPathNSResolver -> m ()
createExpression... | 477 | createExpression_ ::
(MonadDOM m, IsDocument self, ToJSString expression) =>
self -> Maybe expression -> Maybe XPathNSResolver -> m ()
createExpression_ self expression resolver
= liftDOM
(void
((toDocument self) ^. jsf "createExpression"
[toJSVal expre... | 346 | createExpression_ self expression resolver
= liftDOM
(void
((toDocument self) ^. jsf "createExpression"
[toJSVal expression, toJSVal resolver])) | 173 | true | true | 0 | 12 | 108 | 102 | 50 | 52 | null | null |
georgeee/haskell-google-calendar-api | Network/Google/Calendar/CalendarList/Entities.hs | mit | extractRawCalendar x = CalendarLE { cleEtag = cleRawEtag x
, cleId = cleRawId x
, cleSummary = cleRawSummary x
, cleDescription = cleRawDescription x
, cleLocation = cleRawLocation x
... | 1,454 | extractRawCalendar x = CalendarLE { cleEtag = cleRawEtag x
, cleId = cleRawId x
, cleSummary = cleRawSummary x
, cleDescription = cleRawDescription x
, cleLocation = cleRawLocation x
... | 1,454 | extractRawCalendar x = CalendarLE { cleEtag = cleRawEtag x
, cleId = cleRawId x
, cleSummary = cleRawSummary x
, cleDescription = cleRawDescription x
, cleLocation = cleRawLocation x
... | 1,454 | false | false | 2 | 9 | 723 | 239 | 128 | 111 | null | null |
beni55/ghcjs | src/Gen2/Profiling.hs | mit | emitCostCentreDecl :: CostCentre -> G ()
emitCostCentreDecl cc = do
dflags <- use gsDynFlags
ccsLbl <- costCentreLbl cc
let is_caf = isCafCC cc
label = costCentreUserName cc
modl = Module.moduleNameString $ moduleName $ cc_mod cc
loc = showPpr dflags (costCentreSrcSpan cc)
... | 447 | emitCostCentreDecl :: CostCentre -> G ()
emitCostCentreDecl cc = do
dflags <- use gsDynFlags
ccsLbl <- costCentreLbl cc
let is_caf = isCafCC cc
label = costCentreUserName cc
modl = Module.moduleNameString $ moduleName $ cc_mod cc
loc = showPpr dflags (costCentreSrcSpan cc)
... | 447 | emitCostCentreDecl cc = do
dflags <- use gsDynFlags
ccsLbl <- costCentreLbl cc
let is_caf = isCafCC cc
label = costCentreUserName cc
modl = Module.moduleNameString $ moduleName $ cc_mod cc
loc = showPpr dflags (costCentreSrcSpan cc)
js =
decl ccsLbl <>
... | 406 | false | true | 0 | 12 | 134 | 119 | 57 | 62 | null | null |
sdiehl/ghc | compiler/nativeGen/RegAlloc/Graph/Spill.hs | bsd-3-clause | - | Allocate a new unique in the spiller monad.
newUnique :: SpillM Unique
newUnique
= do us <- gets stateUS
case takeUniqFromSupply us of
(uniq, us')
-> do modify $ \s -> s { stateUS = us' }
return uniq
-- | Add a spill/reload count to a stats record for a register.... | 321 | newUnique :: SpillM Unique
newUnique
= do us <- gets stateUS
case takeUniqFromSupply us of
(uniq, us')
-> do modify $ \s -> s { stateUS = us' }
return uniq
-- | Add a spill/reload count to a stats record for a register. | 272 | newUnique
= do us <- gets stateUS
case takeUniqFromSupply us of
(uniq, us')
-> do modify $ \s -> s { stateUS = us' }
return uniq
-- | Add a spill/reload count to a stats record for a register. | 245 | true | true | 1 | 16 | 107 | 97 | 47 | 50 | null | null |
kadena-io/pact | src-tool/Pact/Analyze/Model/Tags.hs | bsd-3-clause | allocStepChoices :: [VarId] -> Alloc (Map VarId (SBV Bool))
allocStepChoices vids = fmap Map.fromList $ for vids $ \vid ->
(vid,) <$> allocSbv @'TyBool "nondet" | 162 | allocStepChoices :: [VarId] -> Alloc (Map VarId (SBV Bool))
allocStepChoices vids = fmap Map.fromList $ for vids $ \vid ->
(vid,) <$> allocSbv @'TyBool "nondet" | 162 | allocStepChoices vids = fmap Map.fromList $ for vids $ \vid ->
(vid,) <$> allocSbv @'TyBool "nondet" | 102 | false | true | 0 | 10 | 26 | 76 | 38 | 38 | null | null |
andybab/Impala | thirdparty/thrift-0.9.0/test/hs/ThriftTest_Main.hs | apache-2.0 | server :: Network.PortNumber -> IO ()
server port = do
ThriftTestUtils.serverLog "Ready..."
(runBasicServer TestHandler ThriftTest.process port)
`Control.Exception.catch`
(\(TransportExn s _) -> error $ "FAILURE: " ++ s) | 236 | server :: Network.PortNumber -> IO ()
server port = do
ThriftTestUtils.serverLog "Ready..."
(runBasicServer TestHandler ThriftTest.process port)
`Control.Exception.catch`
(\(TransportExn s _) -> error $ "FAILURE: " ++ s) | 236 | server port = do
ThriftTestUtils.serverLog "Ready..."
(runBasicServer TestHandler ThriftTest.process port)
`Control.Exception.catch`
(\(TransportExn s _) -> error $ "FAILURE: " ++ s) | 198 | false | true | 0 | 10 | 42 | 81 | 41 | 40 | null | null |
notogawa/VideoCore4 | src/VideoCore4/QPU/Instruction/SmallImmediate.hs | bsd-3-clause | small_immed_14 :: SmallImmediate
small_immed_14 = SmallImmediate 14 | 67 | small_immed_14 :: SmallImmediate
small_immed_14 = SmallImmediate 14 | 67 | small_immed_14 = SmallImmediate 14 | 34 | false | true | 0 | 5 | 6 | 14 | 7 | 7 | null | null |
fpco/async | Control/Concurrent/Async.hs | bsd-3-clause | forkRepeat :: IO a -> IO ThreadId
forkRepeat action =
mask $ \restore ->
let go = do r <- tryAll (restore action)
case r of
Left _ -> go
_ -> return ()
in forkIO go | 231 | forkRepeat :: IO a -> IO ThreadId
forkRepeat action =
mask $ \restore ->
let go = do r <- tryAll (restore action)
case r of
Left _ -> go
_ -> return ()
in forkIO go | 231 | forkRepeat action =
mask $ \restore ->
let go = do r <- tryAll (restore action)
case r of
Left _ -> go
_ -> return ()
in forkIO go | 197 | false | true | 0 | 17 | 103 | 90 | 41 | 49 | null | null |
AlexanderPankiv/ghc | compiler/basicTypes/RdrName.hs | bsd-3-clause | plusParent p1 p2@(FldParent _ _) = hasParent p2 p1 | 50 | plusParent p1 p2@(FldParent _ _) = hasParent p2 p1 | 50 | plusParent p1 p2@(FldParent _ _) = hasParent p2 p1 | 50 | false | false | 0 | 8 | 8 | 27 | 13 | 14 | null | null |
maximilianhuber/softwareProjekt | src/GalFld/More/SpecialPolys.hs | bsd-3-clause | assozPoly :: (Show a, Num a, FiniteField a) => Polynom a -> Polynom a
assozPoly f = pTupUnsave $ map (A.first (q^)) $ p2Tup f
where q = elemCount $ getReprP f
| 163 | assozPoly :: (Show a, Num a, FiniteField a) => Polynom a -> Polynom a
assozPoly f = pTupUnsave $ map (A.first (q^)) $ p2Tup f
where q = elemCount $ getReprP f
| 163 | assozPoly f = pTupUnsave $ map (A.first (q^)) $ p2Tup f
where q = elemCount $ getReprP f
| 93 | false | true | 1 | 10 | 36 | 93 | 43 | 50 | null | null |
phischu/fragnix | tests/packages/scotty/Network.HTTP2.Encode.hs | bsd-3-clause | buildFramePayload einfo (RSTStreamFrame e) =
buildFramePayloadRSTStream einfo e | 83 | buildFramePayload einfo (RSTStreamFrame e) =
buildFramePayloadRSTStream einfo e | 83 | buildFramePayload einfo (RSTStreamFrame e) =
buildFramePayloadRSTStream einfo e | 83 | false | false | 0 | 7 | 11 | 22 | 10 | 12 | null | null |
shouya/projz | emulator/Processor.hs | bsd-2-clause | -- S Z 0 A 0 P 1 C
flagIso :: Iso' Flag Word8
flagIso = iso to_ from_
where to_ f = pack [_flg_s f, _flg_z f, False, _flg_ac f,
False, _flg_p f, True, _flg_c f]
from_ w = Flag { _flg_s = w `testBit` 7
, _flg_z = w `testBit` 6
, _flg_ac =... | 512 | flagIso :: Iso' Flag Word8
flagIso = iso to_ from_
where to_ f = pack [_flg_s f, _flg_z f, False, _flg_ac f,
False, _flg_p f, True, _flg_c f]
from_ w = Flag { _flg_s = w `testBit` 7
, _flg_z = w `testBit` 6
, _flg_ac = w `testBit` 4
... | 493 | flagIso = iso to_ from_
where to_ f = pack [_flg_s f, _flg_z f, False, _flg_ac f,
False, _flg_p f, True, _flg_c f]
from_ w = Flag { _flg_s = w `testBit` 7
, _flg_z = w `testBit` 6
, _flg_ac = w `testBit` 4
, _flg_p... | 466 | true | true | 3 | 9 | 246 | 195 | 101 | 94 | null | null |
snoyberg/photosorter | fay/Language/Fay/JQuery.hs | bsd-2-clause | parent :: JQuery -> Fay JQuery
parent = ffi "%1['parent']()" | 60 | parent :: JQuery -> Fay JQuery
parent = ffi "%1['parent']()" | 60 | parent = ffi "%1['parent']()" | 29 | false | true | 0 | 6 | 9 | 21 | 10 | 11 | null | null |
sfultong/stand-in-language | src/PrettyPrint.hs | apache-2.0 | showOneNExpr :: Int -> Int -> NExpr -> String
showOneNExpr l i expr =
let recur = showOneNExpr l i
showTwo c a b =
concat [c, "\n", indent i, showOneNExpr l (i + 1) a, "\n", indent i, showOneNExpr l (i + 1) b]
in case expr of
NZero -> "Z"
NEnv -> "E"
(NPair a b) -> showTwo "P" a b
... | 1,189 | showOneNExpr :: Int -> Int -> NExpr -> String
showOneNExpr l i expr =
let recur = showOneNExpr l i
showTwo c a b =
concat [c, "\n", indent i, showOneNExpr l (i + 1) a, "\n", indent i, showOneNExpr l (i + 1) b]
in case expr of
NZero -> "Z"
NEnv -> "E"
(NPair a b) -> showTwo "P" a b
... | 1,189 | showOneNExpr l i expr =
let recur = showOneNExpr l i
showTwo c a b =
concat [c, "\n", indent i, showOneNExpr l (i + 1) a, "\n", indent i, showOneNExpr l (i + 1) b]
in case expr of
NZero -> "Z"
NEnv -> "E"
(NPair a b) -> showTwo "P" a b
(NAbort x) -> concat ["A ", recur x]
... | 1,143 | false | true | 20 | 13 | 414 | 624 | 302 | 322 | null | null |
seereason/ansi-wl-pprint | Text/PrettyPrint/ANSI/Leijen.hs | bsd-2-clause | -- | The document @(vcat xs)@ concatenates all documents @xs@
-- vertically with @(\<$$\>)@. If a 'group' undoes the line breaks
-- inserted by @vcat@, all documents are directly concatenated.
vcat :: [Doc] -> Doc
vcat = fold (<$$>) | 243 | vcat :: [Doc] -> Doc
vcat = fold (<$$>) | 50 | vcat = fold (<$$>) | 29 | true | true | 0 | 6 | 49 | 26 | 16 | 10 | null | null |
kernelim/leveldb-haskell | src/Database/LevelDB/Iterator.hs | bsd-3-clause | -- | Return the value for the current entry if the iterator is currently
-- positioned at an entry, ie. 'iterValid'.
iterValue :: MonadIO m => Iterator -> m (Maybe ByteString)
iterValue = liftIO . flip iterString c_leveldb_iter_value | 233 | iterValue :: MonadIO m => Iterator -> m (Maybe ByteString)
iterValue = liftIO . flip iterString c_leveldb_iter_value | 116 | iterValue = liftIO . flip iterString c_leveldb_iter_value | 57 | true | true | 1 | 10 | 37 | 50 | 22 | 28 | null | null |
maoe/language-javascript | src/Language/JavaScript/Pretty/Printer.hs | bsd-3-clause | rJS :: [JSNode] -> Foo -> Foo
rJS xs foo = foldl' (flip rn) foo xs | 66 | rJS :: [JSNode] -> Foo -> Foo
rJS xs foo = foldl' (flip rn) foo xs | 66 | rJS xs foo = foldl' (flip rn) foo xs | 36 | false | true | 0 | 7 | 15 | 40 | 20 | 20 | null | null |
gchrupala/morfette | src/GramLab/Utils.hs | bsd-2-clause | padRight :: a -> Int -> [a] -> [a]
padRight pad size xs = take size (xs ++ (repeat pad)) | 100 | padRight :: a -> Int -> [a] -> [a]
padRight pad size xs = take size (xs ++ (repeat pad)) | 100 | padRight pad size xs = take size (xs ++ (repeat pad)) | 53 | false | true | 0 | 10 | 31 | 60 | 29 | 31 | null | null |
juhp/stack | test/integration/tests/366-non-root-dir/Main.hs | bsd-3-clause | main :: IO ()
main = do
removeDirIgnore ".stack-work"
stackErr ["exec", "hello-world"]
setCurrentDirectory "app"
stack ["build"]
stack ["exec", "hello-world"] | 178 | main :: IO ()
main = do
removeDirIgnore ".stack-work"
stackErr ["exec", "hello-world"]
setCurrentDirectory "app"
stack ["build"]
stack ["exec", "hello-world"] | 178 | main = do
removeDirIgnore ".stack-work"
stackErr ["exec", "hello-world"]
setCurrentDirectory "app"
stack ["build"]
stack ["exec", "hello-world"] | 164 | false | true | 0 | 8 | 38 | 61 | 28 | 33 | null | null |
brendanhay/gogol | gogol-android-enterprise/gen/Network/Google/AndroidEnterprise/Types/Product.hs | mpl-2.0 | -- | Notifications about app updates.
nAppUpdateEvent :: Lens' Notification (Maybe AppUpdateEvent)
nAppUpdateEvent
= lens _nAppUpdateEvent
(\ s a -> s{_nAppUpdateEvent = a}) | 181 | nAppUpdateEvent :: Lens' Notification (Maybe AppUpdateEvent)
nAppUpdateEvent
= lens _nAppUpdateEvent
(\ s a -> s{_nAppUpdateEvent = a}) | 143 | nAppUpdateEvent
= lens _nAppUpdateEvent
(\ s a -> s{_nAppUpdateEvent = a}) | 82 | true | true | 0 | 8 | 30 | 49 | 25 | 24 | null | null |
Mathnerd314/lamdu | src/Lamdu/CodeEdit/ExpressionEdit/DefinitionEdit.hs | gpl-3.0 | makeDefContentEdit ::
MonadA m => Guid -> Sugar.Name ->
Sugar.DefinitionContent Sugar.Name m (ExprGuiM.SugarExpr m) ->
ExprGuiM m (WidgetT m)
makeDefContentEdit guid name content = do
equals <- makeEquals myId
rhsJumperEquals <- jumpToRHS [E.ModKey E.noMods (E.charKey '=')] rhs
let
jumpToRHSViaEquals n ... | 2,506 | makeDefContentEdit ::
MonadA m => Guid -> Sugar.Name ->
Sugar.DefinitionContent Sugar.Name m (ExprGuiM.SugarExpr m) ->
ExprGuiM m (WidgetT m)
makeDefContentEdit guid name content = do
equals <- makeEquals myId
rhsJumperEquals <- jumpToRHS [E.ModKey E.noMods (E.charKey '=')] rhs
let
jumpToRHSViaEquals n ... | 2,506 | makeDefContentEdit guid name content = do
equals <- makeEquals myId
rhsJumperEquals <- jumpToRHS [E.ModKey E.noMods (E.charKey '=')] rhs
let
jumpToRHSViaEquals n widget
| nonOperatorName n =
widget
& Widget.wEventMap %~ E.filterSChars (curry (/= ('=', E.NotShifted)))
& Widget.wea... | 2,358 | false | true | 17 | 18 | 513 | 749 | 351 | 398 | null | null |
stevezhee/pec | Pec/IUtil.hs | bsd-3-clause | ttlit :: TLit -> Type
ttlit (TLit _ b) = b | 42 | ttlit :: TLit -> Type
ttlit (TLit _ b) = b | 42 | ttlit (TLit _ b) = b | 20 | false | true | 0 | 7 | 10 | 26 | 13 | 13 | null | null |
mikeizbicki/ifcxt | src/IfCxt.hs | bsd-3-clause | mkInstance :: Cxt -> Type -> Type -> Name -> [Dec]
mkInstance cxt classt t n = [
InstanceD
#if MIN_VERSION_template_haskell(2,11,0)
Nothing
#endif
(map relaxCxt cxt)
(relaxCxt (AppT (ConT n) t))
[ FunD 'ifCxt
[ Clause
[ VarP $ mkName "proxy"
... | 487 | mkInstance :: Cxt -> Type -> Type -> Name -> [Dec]
mkInstance cxt classt t n = [
InstanceD
#if MIN_VERSION_template_haskell(2,11,0)
Nothing
#endif
(map relaxCxt cxt)
(relaxCxt (AppT (ConT n) t))
[ FunD 'ifCxt
[ Clause
[ VarP $ mkName "proxy"
... | 487 | mkInstance cxt classt t n = [
InstanceD
#if MIN_VERSION_template_haskell(2,11,0)
Nothing
#endif
(map relaxCxt cxt)
(relaxCxt (AppT (ConT n) t))
[ FunD 'ifCxt
[ Clause
[ VarP $ mkName "proxy"
, VarP $ mkName "t"
, VarP $ mkNa... | 436 | false | true | 0 | 14 | 226 | 144 | 74 | 70 | null | null |
OpenXT/network | nws/Main.hs | gpl-2.0 | implementNetworkSlaveInterfaces :: App ()
implementNetworkSlaveInterfaces = do
appState <- getAppState
liftRpc $ rpcExpose (fromString nwsRootObj) . NWS.interfaces $ NetworkSlaveServer {
comCitrixXenclientNetworkslaveBackendVifNotify = \vif domid devid -> return ()
, comCitrixXenclientNetworksla... | 1,541 | implementNetworkSlaveInterfaces :: App ()
implementNetworkSlaveInterfaces = do
appState <- getAppState
liftRpc $ rpcExpose (fromString nwsRootObj) . NWS.interfaces $ NetworkSlaveServer {
comCitrixXenclientNetworkslaveBackendVifNotify = \vif domid devid -> return ()
, comCitrixXenclientNetworksla... | 1,541 | implementNetworkSlaveInterfaces = do
appState <- getAppState
liftRpc $ rpcExpose (fromString nwsRootObj) . NWS.interfaces $ NetworkSlaveServer {
comCitrixXenclientNetworkslaveBackendVifNotify = \vif domid devid -> return ()
, comCitrixXenclientNetworkslaveCreateInternalNetworks = \number -> runA... | 1,499 | false | true | 0 | 14 | 257 | 276 | 144 | 132 | null | null |
FranklinChen/Hugs | tests/rts/mvar.hs | bsd-3-clause | test9 =
newEmptyMVar >>= \ ack ->
newEmptyMVar >>= \ a1 ->
newEmptyMVar >>= \ a2 ->
forkIO (putMVar a1 () >> get ack) >>
forkIO (putMVar a2 () >> get ack) >>
takeMVar a2 >>
takeMVar a1 >>
put ack 'a' >>
put ack 'b' | 292 | test9 =
newEmptyMVar >>= \ ack ->
newEmptyMVar >>= \ a1 ->
newEmptyMVar >>= \ a2 ->
forkIO (putMVar a1 () >> get ack) >>
forkIO (putMVar a2 () >> get ack) >>
takeMVar a2 >>
takeMVar a1 >>
put ack 'a' >>
put ack 'b' | 292 | test9 =
newEmptyMVar >>= \ ack ->
newEmptyMVar >>= \ a1 ->
newEmptyMVar >>= \ a2 ->
forkIO (putMVar a1 () >> get ack) >>
forkIO (putMVar a2 () >> get ack) >>
takeMVar a2 >>
takeMVar a1 >>
put ack 'a' >>
put ack 'b' | 292 | false | false | 1 | 19 | 123 | 114 | 52 | 62 | null | null |
abayley/punchclock | Main.hs | gpl-3.0 | parseReportArgs start [a] = if isDate a
then parseReportArgs2 start a ""
else parseReportArgs2 start "" a | 113 | parseReportArgs start [a] = if isDate a
then parseReportArgs2 start a ""
else parseReportArgs2 start "" a | 113 | parseReportArgs start [a] = if isDate a
then parseReportArgs2 start a ""
else parseReportArgs2 start "" a | 113 | false | false | 0 | 6 | 24 | 39 | 19 | 20 | null | null |
travisbrown/sentlex | src/Liwc.hs | apache-2.0 | normal = many $ noneOf "\"," | 28 | normal = many $ noneOf "\"," | 28 | normal = many $ noneOf "\"," | 28 | false | false | 0 | 6 | 5 | 13 | 6 | 7 | null | null |
alexisVallet/hnn | src/HNN/NN/Mutable.hs | bsd-3-clause | mul :: forall a m s . (TensorDataType a, PrimMonad m, Shape s)
=> MTensor (PrimState m) s a
-> MTensor (PrimState m) s a
-> m ()
mul t1 t2 =
unsafePrimToPrim $ mulIO
(unsafeCoerce t1 :: IOTensor s a) (unsafeCoerce t2 :: IOTensor s a) | 249 | mul :: forall a m s . (TensorDataType a, PrimMonad m, Shape s)
=> MTensor (PrimState m) s a
-> MTensor (PrimState m) s a
-> m ()
mul t1 t2 =
unsafePrimToPrim $ mulIO
(unsafeCoerce t1 :: IOTensor s a) (unsafeCoerce t2 :: IOTensor s a) | 249 | mul t1 t2 =
unsafePrimToPrim $ mulIO
(unsafeCoerce t1 :: IOTensor s a) (unsafeCoerce t2 :: IOTensor s a) | 108 | false | true | 2 | 12 | 62 | 127 | 61 | 66 | null | null |
lukexi/ghc | compiler/nativeGen/X86/CodeGen.hs | bsd-3-clause | --------------------------------------------------------------------------------
getAmode :: CmmExpr -> NatM Amode
getAmode e = do is32Bit <- is32BitPlatform
getAmode' is32Bit e | 193 | getAmode :: CmmExpr -> NatM Amode
getAmode e = do is32Bit <- is32BitPlatform
getAmode' is32Bit e | 112 | getAmode e = do is32Bit <- is32BitPlatform
getAmode' is32Bit e | 78 | true | true | 0 | 8 | 32 | 42 | 18 | 24 | null | null |
mightymoose/liquidhaskell | tests/crash/AbsRef.hs | bsd-3-clause | foo :: [a] -> ()
{-@ foo :: [{v:a | v = 5}] -> () @-}
foo _ = () | 64 | foo :: [a] -> ()
foo _ = () | 27 | foo _ = () | 10 | true | true | 0 | 6 | 19 | 30 | 15 | 15 | null | null |
tinco/nanc | Nanc/IR/Expression/Binary.hs | mit | fCmpOp :: CBinaryOp -> (AST.Operand, QualifiedType) -> (AST.Operand, QualifiedType) -> Codegen AST.Operand
fCmpOp cmp (a,t) (b,_) = fcmp (fOpToPred cmp) a b | 156 | fCmpOp :: CBinaryOp -> (AST.Operand, QualifiedType) -> (AST.Operand, QualifiedType) -> Codegen AST.Operand
fCmpOp cmp (a,t) (b,_) = fcmp (fOpToPred cmp) a b | 156 | fCmpOp cmp (a,t) (b,_) = fcmp (fOpToPred cmp) a b | 49 | false | true | 0 | 9 | 21 | 76 | 41 | 35 | null | null |
fiigii/k-cfa | Parser.hs | mit | headExpr :: Parser Ast
headExpr = do whiteSpace
reserved "head"
l <- expr
return $ Car l | 130 | headExpr :: Parser Ast
headExpr = do whiteSpace
reserved "head"
l <- expr
return $ Car l | 130 | headExpr = do whiteSpace
reserved "head"
l <- expr
return $ Car l | 107 | false | true | 1 | 9 | 58 | 44 | 17 | 27 | null | null |
sampou-org/pfad | Code/Code17.hs | bsd-3-clause | left (u:us) vs = rep (split ws us)
where ws = u:(us++vs) | 75 | left (u:us) vs = rep (split ws us)
where ws = u:(us++vs) | 75 | left (u:us) vs = rep (split ws us)
where ws = u:(us++vs) | 75 | false | false | 2 | 8 | 30 | 56 | 24 | 32 | null | null |
traeger/fol-solver | Folsolver/Normalform/OperatorNF.hs | gpl-3.0 | onlyCDN (:<=:) left right = left .|. ((.~.) right) | 52 | onlyCDN (:<=:) left right = left .|. ((.~.) right) | 52 | onlyCDN (:<=:) left right = left .|. ((.~.) right) | 52 | false | false | 1 | 8 | 10 | 33 | 15 | 18 | null | null |
ComputationWithBoundedResources/tct-inttrs | src/Tct/IntTrs.hs | bsd-3-clause | cRep :: CFun -> String
cRep Lte = "<=" | 38 | cRep :: CFun -> String
cRep Lte = "<=" | 38 | cRep Lte = "<=" | 15 | false | true | 0 | 5 | 8 | 18 | 9 | 9 | null | null |
f1u77y/xmonad-contrib | XMonad/Util/DebugWindow.hs | bsd-3-clause | splitNul :: String -> [String]
splitNul "" = [] | 51 | splitNul :: String -> [String]
splitNul "" = [] | 51 | splitNul "" = [] | 17 | false | true | 0 | 6 | 12 | 23 | 12 | 11 | null | null |
sorpaas/munje | src/Main.hs | mit | readExp :: String -> IO ()
readExp inputText =
case parseExpression inputText of
Left err -> print err
Right result -> putStrLn $ "I parsed: " ++ show result | 167 | readExp :: String -> IO ()
readExp inputText =
case parseExpression inputText of
Left err -> print err
Right result -> putStrLn $ "I parsed: " ++ show result | 167 | readExp inputText =
case parseExpression inputText of
Left err -> print err
Right result -> putStrLn $ "I parsed: " ++ show result | 140 | false | true | 0 | 9 | 38 | 62 | 28 | 34 | null | null |
futufeld/eclogues | eclogues-impl/gen-hs/AuroraSchedulerManager_Client.hs | bsd-3-clause | scheduleCronJob (ip,op) arg_description arg_lock arg_session = do
send_scheduleCronJob op arg_description arg_lock arg_session
recv_scheduleCronJob ip | 154 | scheduleCronJob (ip,op) arg_description arg_lock arg_session = do
send_scheduleCronJob op arg_description arg_lock arg_session
recv_scheduleCronJob ip | 154 | scheduleCronJob (ip,op) arg_description arg_lock arg_session = do
send_scheduleCronJob op arg_description arg_lock arg_session
recv_scheduleCronJob ip | 154 | false | false | 0 | 7 | 17 | 41 | 18 | 23 | null | null |
uduki/hsQt | Qtc/Core/QCoreApplication.hs | bsd-2-clause | setEventFilter :: QCoreApplication a -> ((QVoid t1)) -> IO (QVoid ())
setEventFilter x0 (x1)
= withObjectRefResult $
withObjectPtr x0 $ \cobj_x0 ->
withObjectPtr x1 $ \cobj_x1 ->
qtc_QCoreApplication_setEventFilter cobj_x0 cobj_x1 | 244 | setEventFilter :: QCoreApplication a -> ((QVoid t1)) -> IO (QVoid ())
setEventFilter x0 (x1)
= withObjectRefResult $
withObjectPtr x0 $ \cobj_x0 ->
withObjectPtr x1 $ \cobj_x1 ->
qtc_QCoreApplication_setEventFilter cobj_x0 cobj_x1 | 244 | setEventFilter x0 (x1)
= withObjectRefResult $
withObjectPtr x0 $ \cobj_x0 ->
withObjectPtr x1 $ \cobj_x1 ->
qtc_QCoreApplication_setEventFilter cobj_x0 cobj_x1 | 174 | false | true | 0 | 10 | 43 | 83 | 41 | 42 | null | null |
nadavshemer/buildsome | src/Lib/FilePath.hs | gpl-2.0 | joinPath paths = BS8.intercalate "/" paths | 70 | joinPath paths = BS8.intercalate "/" paths | 70 | joinPath paths = BS8.intercalate "/" paths | 70 | false | false | 0 | 6 | 33 | 16 | 7 | 9 | null | null |
ancientlanguage/haskell-analysis | grammar/src/Grammar/Common/Decompose.hs | mit | decomposeChar '\x2F824' = "\x3515" | 34 | decomposeChar '\x2F824' = "\x3515" | 34 | decomposeChar '\x2F824' = "\x3515" | 34 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
ndmitchell/tagsoup | test/TagSoup/Generate/Convert.hs | bsd-3-clause | inPatt x = error $ show ("inPatt",x) | 36 | inPatt x = error $ show ("inPatt",x) | 36 | inPatt x = error $ show ("inPatt",x) | 36 | false | false | 0 | 7 | 6 | 22 | 11 | 11 | null | null |
crogers1/manager | xenmgr/XenMgr/Expose/VmObject.hs | gpl-2.0 | -- Put single VM on dbus
expose :: Uuid -> XM ()
expose uuid =
do xm <- xmContext
liftRpc $ rpcExpose (vmObjPath uuid) (interfaces $ implementationFor xm uuid)
info $ "exposed VM " ++ show uuid ++ " over DBUS"
disk_ids <- sort . M.keys <$> liftRpc (getDisks uuid)
mapM_ (VmDiskObj.expose... | 588 | expose :: Uuid -> XM ()
expose uuid =
do xm <- xmContext
liftRpc $ rpcExpose (vmObjPath uuid) (interfaces $ implementationFor xm uuid)
info $ "exposed VM " ++ show uuid ++ " over DBUS"
disk_ids <- sort . M.keys <$> liftRpc (getDisks uuid)
mapM_ (VmDiskObj.expose uuid) disk_ids
n... | 563 | expose uuid =
do xm <- xmContext
liftRpc $ rpcExpose (vmObjPath uuid) (interfaces $ implementationFor xm uuid)
info $ "exposed VM " ++ show uuid ++ " over DBUS"
disk_ids <- sort . M.keys <$> liftRpc (getDisks uuid)
mapM_ (VmDiskObj.expose uuid) disk_ids
nic_ids <- sort <$> liftR... | 539 | true | true | 0 | 11 | 140 | 159 | 74 | 85 | null | null |
vasily-kartashov/playground | euler/problem-058.hs | apache-2.0 | main =
print $ head $ dropWhile above10p $ drop 1 $ scanl evolve ((0, 1), 1) [3, 5 ..] | 88 | main =
print $ head $ dropWhile above10p $ drop 1 $ scanl evolve ((0, 1), 1) [3, 5 ..] | 88 | main =
print $ head $ dropWhile above10p $ drop 1 $ scanl evolve ((0, 1), 1) [3, 5 ..] | 88 | false | false | 5 | 8 | 21 | 59 | 29 | 30 | null | null |
rgleichman/glance | app/SimplifySyntax.hs | gpl-3.0 | simplifyExp :: SimpExp l -> SimpExp l
simplifyExp e = case e of
-- Reduce applications of function compositions (e.g. (f . g) x -> f (g x))
SeApp l2 (SeApp l1 (SeApp _ (SeName _ ".") f1) f2) arg
-> SeApp l1 f1 $ simplifyExp (SeApp l2 f2 arg)
SeApp l (SeApp _ (SeName _ "$") exp1) exp2
-> SeApp l exp1 exp2
... | 400 | simplifyExp :: SimpExp l -> SimpExp l
simplifyExp e = case e of
-- Reduce applications of function compositions (e.g. (f . g) x -> f (g x))
SeApp l2 (SeApp l1 (SeApp _ (SeName _ ".") f1) f2) arg
-> SeApp l1 f1 $ simplifyExp (SeApp l2 f2 arg)
SeApp l (SeApp _ (SeName _ "$") exp1) exp2
-> SeApp l exp1 exp2
... | 400 | simplifyExp e = case e of
-- Reduce applications of function compositions (e.g. (f . g) x -> f (g x))
SeApp l2 (SeApp l1 (SeApp _ (SeName _ ".") f1) f2) arg
-> SeApp l1 f1 $ simplifyExp (SeApp l2 f2 arg)
SeApp l (SeApp _ (SeName _ "$") exp1) exp2
-> SeApp l exp1 exp2
SeApp l1 (SeName l2 "<$>") arg
-... | 362 | false | true | 0 | 14 | 101 | 177 | 83 | 94 | null | null |
DougBurke/swish | tests/GraphTest.hs | lgpl-2.1 | gr4d = delete gr3a gr4a | 23 | gr4d = delete gr3a gr4a | 23 | gr4d = delete gr3a gr4a | 23 | false | false | 1 | 5 | 4 | 14 | 5 | 9 | null | null |
randen/cabal | Cabal/Distribution/Simple/Program/Db.hs | bsd-3-clause | lookupProgramVersion
:: Verbosity -> Program -> VersionRange -> ProgramDb
-> IO (Either String (ConfiguredProgram, Version, ProgramDb))
lookupProgramVersion verbosity prog range programDb = do
-- If it's not already been configured, try to configure it now
programDb' <- case lookupProgram prog programDb of
... | 1,859 | lookupProgramVersion
:: Verbosity -> Program -> VersionRange -> ProgramDb
-> IO (Either String (ConfiguredProgram, Version, ProgramDb))
lookupProgramVersion verbosity prog range programDb = do
-- If it's not already been configured, try to configure it now
programDb' <- case lookupProgram prog programDb of
... | 1,859 | lookupProgramVersion verbosity prog range programDb = do
-- If it's not already been configured, try to configure it now
programDb' <- case lookupProgram prog programDb of
Nothing -> configureProgram verbosity prog programDb
Just _ -> return programDb
case lookupProgram prog programDb' of
Nothing ... | 1,719 | false | true | 6 | 23 | 638 | 378 | 180 | 198 | null | null |
myShoggoth/shakespeare | Text/Hamlet.hs | mit | contentToExp _ hr _ (ContentD3Var (DerefBranch (DerefBranch (DerefIdent (Ident "d3Pull")) (DerefString s)) (DerefString d))) = do
os <- [|preEscapedText . pack|]
let s' = LitE $ StringL ("<script>function update" ++ d ++"(" ++ d ++ "){" ++ d ++ "Callbacks.forEach(function(callback){callback(" ++ d ++");});};spl... | 734 | contentToExp _ hr _ (ContentD3Var (DerefBranch (DerefBranch (DerefIdent (Ident "d3Pull")) (DerefString s)) (DerefString d))) = do
os <- [|preEscapedText . pack|]
let s' = LitE $ StringL ("<script>function update" ++ d ++"(" ++ d ++ "){" ++ d ++ "Callbacks.forEach(function(callback){callback(" ++ d ++");});};spl... | 734 | contentToExp _ hr _ (ContentD3Var (DerefBranch (DerefBranch (DerefIdent (Ident "d3Pull")) (DerefString s)) (DerefString d))) = do
os <- [|preEscapedText . pack|]
let s' = LitE $ StringL ("<script>function update" ++ d ++"(" ++ d ++ "){" ++ d ++ "Callbacks.forEach(function(callback){callback(" ++ d ++");});};spl... | 734 | false | false | 0 | 34 | 105 | 203 | 103 | 100 | null | null |
mpickering/hlint | src/Hint/ListRec.hs | bsd-3-clause | recursive = toNamed recursiveStr | 32 | recursive = toNamed recursiveStr | 32 | recursive = toNamed recursiveStr | 32 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
danr/hipspec | testsuite/prod/zeno_version/PropT46.hs | gpl-3.0 | revflat :: [[a]] -> [a]
revflat [] = [] | 49 | revflat :: [[a]] -> [a]
revflat [] = [] | 49 | revflat [] = [] | 25 | false | true | 0 | 8 | 18 | 37 | 18 | 19 | null | null |
eallik/haskell-hangman | src/Lib.hs | bsd-3-clause | missesG Game{phraseG,guessesG} = reverse $ filter noMatch guessesG
where noMatch = not . (`matchesG` phraseG) | 111 | missesG Game{phraseG,guessesG} = reverse $ filter noMatch guessesG
where noMatch = not . (`matchesG` phraseG) | 111 | missesG Game{phraseG,guessesG} = reverse $ filter noMatch guessesG
where noMatch = not . (`matchesG` phraseG) | 111 | false | false | 0 | 7 | 16 | 45 | 24 | 21 | null | null |
gafiatulin/monad-challenges | src/Set4.hs | mit | allCombs :: (a -> b -> c) -> [a] -> [b] -> [c]
allCombs = liftM2 | 64 | allCombs :: (a -> b -> c) -> [a] -> [b] -> [c]
allCombs = liftM2 | 64 | allCombs = liftM2 | 17 | false | true | 0 | 10 | 15 | 50 | 25 | 25 | null | null |
Paow/encore | src/ir/AST/Desugarer.hs | bsd-3-clause | desugar New{emeta, ty} = NewWithInit{emeta, ty, args = []} | 58 | desugar New{emeta, ty} = NewWithInit{emeta, ty, args = []} | 58 | desugar New{emeta, ty} = NewWithInit{emeta, ty, args = []} | 58 | false | false | 0 | 7 | 8 | 34 | 19 | 15 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.