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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
yxm4109/pandoc
|
src/Text/Pandoc/Readers/HTML.hs
|
gpl-2.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
| 38
| 21
| 17
| null | null |
susoDominguez/eNominalTerms-Alpha
|
ConstraintsX.hs
|
unlicense
|
isEConstr:: ConstrX Trm -> Bool
isEConstr (E _ _) = True
| 56
|
isEConstr:: ConstrX Trm -> Bool
isEConstr (E _ _) = True
| 56
|
isEConstr (E _ _) = True
| 24
| false
| true
| 0
| 9
| 10
| 36
| 15
| 21
| null | null |
FranklinChen/Idris-dev
|
src/Idris/Core/TT.hs
|
bsd-3-clause
|
nextName (UN x) = let (num', nm') = T.span isDigit (T.reverse x)
nm = T.reverse nm'
num = readN (T.reverse num') in
UN (nm `T.append` txt (show (num+1)))
where
readN x | not (T.null x) = read (T.unpack x)
readN x = 0
| 296
|
nextName (UN x) = let (num', nm') = T.span isDigit (T.reverse x)
nm = T.reverse nm'
num = readN (T.reverse num') in
UN (nm `T.append` txt (show (num+1)))
where
readN x | not (T.null x) = read (T.unpack x)
readN x = 0
| 296
|
nextName (UN x) = let (num', nm') = T.span isDigit (T.reverse x)
nm = T.reverse nm'
num = readN (T.reverse num') in
UN (nm `T.append` txt (show (num+1)))
where
readN x | not (T.null x) = read (T.unpack x)
readN x = 0
| 296
| false
| false
| 1
| 14
| 122
| 159
| 74
| 85
| null | null |
shlevy/ghc
|
compiler/typecheck/TcRnTypes.hs
|
bsd-3-clause
|
-- | Extract the flavour, role, and boxity from a 'CtEvidence'
ctEvFlavourRole :: CtEvidence -> CtFlavourRole
ctEvFlavourRole ev = (ctEvFlavour ev, ctEvEqRel ev)
| 161
|
ctEvFlavourRole :: CtEvidence -> CtFlavourRole
ctEvFlavourRole ev = (ctEvFlavour ev, ctEvEqRel ev)
| 98
|
ctEvFlavourRole ev = (ctEvFlavour ev, ctEvEqRel ev)
| 51
| true
| true
| 0
| 7
| 22
| 37
| 17
| 20
| null | null |
peddie/latc
|
Numeric/LATC/NestedList.hs
|
gpl-3.0
|
-- | Transpose a matrix
transpose :: Matrix a -> Matrix a
transpose = Matrix . DL.transpose . unmatrix
| 102
|
transpose :: Matrix a -> Matrix a
transpose = Matrix . DL.transpose . unmatrix
| 78
|
transpose = Matrix . DL.transpose . unmatrix
| 44
| true
| true
| 1
| 7
| 18
| 39
| 17
| 22
| null | null |
fmapfmapfmap/amazonka
|
amazonka-ec2/test/Test/AWS/Gen/EC2.hs
|
mpl-2.0
|
testCreateReservedInstancesListingResponse :: CreateReservedInstancesListingResponse -> TestTree
testCreateReservedInstancesListingResponse = res
"CreateReservedInstancesListingResponse"
"fixture/CreateReservedInstancesListingResponse.proto"
eC2
(Proxy :: Proxy CreateReservedInstancesListing)
| 309
|
testCreateReservedInstancesListingResponse :: CreateReservedInstancesListingResponse -> TestTree
testCreateReservedInstancesListingResponse = res
"CreateReservedInstancesListingResponse"
"fixture/CreateReservedInstancesListingResponse.proto"
eC2
(Proxy :: Proxy CreateReservedInstancesListing)
| 309
|
testCreateReservedInstancesListingResponse = res
"CreateReservedInstancesListingResponse"
"fixture/CreateReservedInstancesListingResponse.proto"
eC2
(Proxy :: Proxy CreateReservedInstancesListing)
| 212
| false
| true
| 0
| 7
| 30
| 33
| 17
| 16
| null | null |
michaelt/foldm
|
src/Control/FoldM.hs
|
bsd-3-clause
|
handles :: Monad m => HandlerM m a b -> FoldM m b r -> FoldM m a r
handles = L.handlesM
| 87
|
handles :: Monad m => HandlerM m a b -> FoldM m b r -> FoldM m a r
handles = L.handlesM
| 87
|
handles = L.handlesM
| 20
| false
| true
| 0
| 8
| 21
| 49
| 23
| 26
| null | null |
mightymoose/liquidhaskell
|
benchmarks/ghc-7.4.1/IO/FD.hs
|
bsd-3-clause
|
devType :: FD -> IO IODeviceType
devType fd = do (ty,_,_) <- fdStat (fdFD fd); return ty
| 88
|
devType :: FD -> IO IODeviceType
devType fd = do (ty,_,_) <- fdStat (fdFD fd); return ty
| 88
|
devType fd = do (ty,_,_) <- fdStat (fdFD fd); return ty
| 55
| false
| true
| 0
| 10
| 16
| 53
| 26
| 27
| null | null |
Undeterminant/config-home-gui
|
home/.xmonad/xmonad.hs
|
cc0-1.0
|
myKeyHome2 Dvorak = xK_o
| 28
|
myKeyHome2 Dvorak = xK_o
| 28
|
myKeyHome2 Dvorak = xK_o
| 28
| false
| false
| 0
| 5
| 7
| 9
| 4
| 5
| null | null |
aaronc/Idris-dev
|
src/Idris/ElabDecls.hs
|
bsd-3-clause
|
elabDecl' what info (PInstance doc argDocs s f cs n nfc ps t expn ds)
= do logElab 1 $ "Elaborating instance " ++ show n
elabInstance info s doc argDocs what f cs n nfc ps t expn ds
| 194
|
elabDecl' what info (PInstance doc argDocs s f cs n nfc ps t expn ds)
= do logElab 1 $ "Elaborating instance " ++ show n
elabInstance info s doc argDocs what f cs n nfc ps t expn ds
| 194
|
elabDecl' what info (PInstance doc argDocs s f cs n nfc ps t expn ds)
= do logElab 1 $ "Elaborating instance " ++ show n
elabInstance info s doc argDocs what f cs n nfc ps t expn ds
| 194
| false
| false
| 0
| 9
| 52
| 86
| 40
| 46
| null | null |
mightymoose/liquidhaskell
|
tests/pos/meas0.hs
|
bsd-3-clause
|
z1 _ = False
| 13
|
z1 _ = False
| 13
|
z1 _ = False
| 13
| false
| false
| 0
| 4
| 4
| 10
| 4
| 6
| null | null |
bixuanzju/fcore
|
lib/JavaEDSL.hs
|
bsd-2-clause
|
-- method member
methodDecl :: [Modifier] -> Maybe Type -> String -> [FormalParam] -> Maybe Block -> MemberDecl
methodDecl modi ty nam params body = MethodDecl modi [] ty (Ident nam) params [] (MethodBody body)
| 210
|
methodDecl :: [Modifier] -> Maybe Type -> String -> [FormalParam] -> Maybe Block -> MemberDecl
methodDecl modi ty nam params body = MethodDecl modi [] ty (Ident nam) params [] (MethodBody body)
| 193
|
methodDecl modi ty nam params body = MethodDecl modi [] ty (Ident nam) params [] (MethodBody body)
| 98
| true
| true
| 0
| 11
| 34
| 91
| 44
| 47
| null | null |
ganeti/ganeti
|
src/Ganeti/Constants.hs
|
bsd-2-clause
|
opcodeReasonSources :: FrozenSet String
opcodeReasonSources =
ConstantUtils.mkSet [opcodeReasonSrcClient,
opcodeReasonSrcNoded,
opcodeReasonSrcOpcode,
opcodeReasonSrcPickup,
opcodeReasonSrcWatcher,
opcodeReasonSrcRlib2,
opcodeReasonSrcUser]
| 380
|
opcodeReasonSources :: FrozenSet String
opcodeReasonSources =
ConstantUtils.mkSet [opcodeReasonSrcClient,
opcodeReasonSrcNoded,
opcodeReasonSrcOpcode,
opcodeReasonSrcPickup,
opcodeReasonSrcWatcher,
opcodeReasonSrcRlib2,
opcodeReasonSrcUser]
| 380
|
opcodeReasonSources =
ConstantUtils.mkSet [opcodeReasonSrcClient,
opcodeReasonSrcNoded,
opcodeReasonSrcOpcode,
opcodeReasonSrcPickup,
opcodeReasonSrcWatcher,
opcodeReasonSrcRlib2,
opcodeReasonSrcUser]
| 340
| false
| true
| 0
| 6
| 153
| 40
| 23
| 17
| null | null |
google-research/dex-lang
|
src/lib/Type.hs
|
bsd-3-clause
|
checkApp :: Typer m => Type o -> NonEmpty (Atom i) -> m i o (Type o)
checkApp fTy xs = case fromNaryPiType (length xs) fTy of
Just (NaryPiType bs effs resultTy) -> do
xs' <- mapM substM xs
checkArgTys (nonEmptyToNest bs) (toList xs')
let subst = bs @@> fmap SubstVal xs'
PairE effs' resultTy' <- applySubst subst $ PairE effs resultTy
declareEffs effs'
return resultTy'
Nothing -> throw TypeErr $
"Not a " ++ show (length xs) ++ "-argument pi type: " ++ pprint fTy
++ " (tried to apply it to: " ++ pprint xs ++ ")"
| 552
|
checkApp :: Typer m => Type o -> NonEmpty (Atom i) -> m i o (Type o)
checkApp fTy xs = case fromNaryPiType (length xs) fTy of
Just (NaryPiType bs effs resultTy) -> do
xs' <- mapM substM xs
checkArgTys (nonEmptyToNest bs) (toList xs')
let subst = bs @@> fmap SubstVal xs'
PairE effs' resultTy' <- applySubst subst $ PairE effs resultTy
declareEffs effs'
return resultTy'
Nothing -> throw TypeErr $
"Not a " ++ show (length xs) ++ "-argument pi type: " ++ pprint fTy
++ " (tried to apply it to: " ++ pprint xs ++ ")"
| 552
|
checkApp fTy xs = case fromNaryPiType (length xs) fTy of
Just (NaryPiType bs effs resultTy) -> do
xs' <- mapM substM xs
checkArgTys (nonEmptyToNest bs) (toList xs')
let subst = bs @@> fmap SubstVal xs'
PairE effs' resultTy' <- applySubst subst $ PairE effs resultTy
declareEffs effs'
return resultTy'
Nothing -> throw TypeErr $
"Not a " ++ show (length xs) ++ "-argument pi type: " ++ pprint fTy
++ " (tried to apply it to: " ++ pprint xs ++ ")"
| 483
| false
| true
| 2
| 13
| 136
| 230
| 102
| 128
| null | null |
snoyberg/haskell-impatient-poker-players
|
src/Helper/Multiplayer.hs
|
mit
|
withPlayerName :: (Player -> Handler a) -> Handler a
withPlayerName f = do
mpn <- lookupSession "player-name"
case mpn of
Nothing -> do
setUltDestCurrent
redirect SetPlayerNameR
Just pn -> f $ Player pn
| 250
|
withPlayerName :: (Player -> Handler a) -> Handler a
withPlayerName f = do
mpn <- lookupSession "player-name"
case mpn of
Nothing -> do
setUltDestCurrent
redirect SetPlayerNameR
Just pn -> f $ Player pn
| 250
|
withPlayerName f = do
mpn <- lookupSession "player-name"
case mpn of
Nothing -> do
setUltDestCurrent
redirect SetPlayerNameR
Just pn -> f $ Player pn
| 197
| false
| true
| 0
| 13
| 80
| 80
| 35
| 45
| null | null |
fmapfmapfmap/amazonka
|
amazonka-rds/gen/Network/AWS/RDS/ModifyDBCluster.hs
|
mpl-2.0
|
-- | The response status code.
mdcrsResponseStatus :: Lens' ModifyDBClusterResponse Int
mdcrsResponseStatus = lens _mdcrsResponseStatus (\ s a -> s{_mdcrsResponseStatus = a})
| 174
|
mdcrsResponseStatus :: Lens' ModifyDBClusterResponse Int
mdcrsResponseStatus = lens _mdcrsResponseStatus (\ s a -> s{_mdcrsResponseStatus = a})
| 143
|
mdcrsResponseStatus = lens _mdcrsResponseStatus (\ s a -> s{_mdcrsResponseStatus = a})
| 86
| true
| true
| 1
| 9
| 21
| 45
| 22
| 23
| null | null |
seereason/data-lens
|
src/Data/Lens/Common.hs
|
bsd-3-clause
|
l ^!+= n = l ^!%= (+ n)
| 23
|
l ^!+= n = l ^!%= (+ n)
| 23
|
l ^!+= n = l ^!%= (+ n)
| 23
| false
| false
| 2
| 7
| 7
| 21
| 11
| 10
| null | null |
thsutton/rossum
|
src/Rossum/LC.hs
|
bsd-3-clause
|
arseVar :: Parser
parseVar = do
v <- parseName
(scope, syms) <- getState
case (elemIndex v scope, elemIndex v syms) of
(Just n, _) -> do
pos <- getPosition
return (Var (loc pos) v)
(Nothing, Just n) -> do
pos <- getPosition
return (Sym (loc pos) v)
_ -> fail ("Variable `" ++ v ++ "' is not in scope.")
| 345
|
parseVar :: Parser
parseVar = do
v <- parseName
(scope, syms) <- getState
case (elemIndex v scope, elemIndex v syms) of
(Just n, _) -> do
pos <- getPosition
return (Var (loc pos) v)
(Nothing, Just n) -> do
pos <- getPosition
return (Sym (loc pos) v)
_ -> fail ("Variable `" ++ v ++ "' is not in scope.")
| 345
|
parseVar = do
v <- parseName
(scope, syms) <- getState
case (elemIndex v scope, elemIndex v syms) of
(Just n, _) -> do
pos <- getPosition
return (Var (loc pos) v)
(Nothing, Just n) -> do
pos <- getPosition
return (Sym (loc pos) v)
_ -> fail ("Variable `" ++ v ++ "' is not in scope.")
| 326
| false
| true
| 0
| 16
| 102
| 158
| 77
| 81
| null | null |
forked-upstream-packages-for-ghcjs/ghc
|
compiler/simplCore/SimplEnv.hs
|
bsd-3-clause
|
mkSimplEnv :: SimplifierMode -> SimplEnv
mkSimplEnv mode
= SimplEnv { seMode = mode
, seInScope = init_in_scope
, seFloats = emptyFloats
, seTvSubst = emptyVarEnv
, seCvSubst = emptyVarEnv
, seIdSubst = emptyVarEnv }
| 283
|
mkSimplEnv :: SimplifierMode -> SimplEnv
mkSimplEnv mode
= SimplEnv { seMode = mode
, seInScope = init_in_scope
, seFloats = emptyFloats
, seTvSubst = emptyVarEnv
, seCvSubst = emptyVarEnv
, seIdSubst = emptyVarEnv }
| 283
|
mkSimplEnv mode
= SimplEnv { seMode = mode
, seInScope = init_in_scope
, seFloats = emptyFloats
, seTvSubst = emptyVarEnv
, seCvSubst = emptyVarEnv
, seIdSubst = emptyVarEnv }
| 242
| false
| true
| 0
| 6
| 100
| 56
| 34
| 22
| null | null |
DougBurke/swish
|
src/Swish/Commands.hs
|
lgpl-2.1
|
swishReadGraph :: Maybe String -> SwishStateIO (Maybe RDFGraph)
swishReadGraph = swishReadFile swishParse Nothing
| 113
|
swishReadGraph :: Maybe String -> SwishStateIO (Maybe RDFGraph)
swishReadGraph = swishReadFile swishParse Nothing
| 113
|
swishReadGraph = swishReadFile swishParse Nothing
| 49
| false
| true
| 0
| 9
| 12
| 38
| 16
| 22
| null | null |
fpco/stackage-setup
|
main/StackageSetup.hs
|
mit
|
justUnpackInstructions :: (MonadIO m) => Download -> FilePath -> FilePath -> m ()
justUnpackInstructions Download{..} dir _ = do
liftIO $ go downloadInstructions
where
go :: [Text] -> IO ()
go [] = return ()
go ( (stripPrefix "tar xJf " -> Just file)
: next
) = unzipXZ dir (Text.unpack file) >> go next
go ( (stripPrefix "rm " -> Just _file)
: next
) = go next -- already done in unzipXZ
go (t:_) = fail $ "command not recognized: " <> unpack t
| 499
|
justUnpackInstructions :: (MonadIO m) => Download -> FilePath -> FilePath -> m ()
justUnpackInstructions Download{..} dir _ = do
liftIO $ go downloadInstructions
where
go :: [Text] -> IO ()
go [] = return ()
go ( (stripPrefix "tar xJf " -> Just file)
: next
) = unzipXZ dir (Text.unpack file) >> go next
go ( (stripPrefix "rm " -> Just _file)
: next
) = go next -- already done in unzipXZ
go (t:_) = fail $ "command not recognized: " <> unpack t
| 499
|
justUnpackInstructions Download{..} dir _ = do
liftIO $ go downloadInstructions
where
go :: [Text] -> IO ()
go [] = return ()
go ( (stripPrefix "tar xJf " -> Just file)
: next
) = unzipXZ dir (Text.unpack file) >> go next
go ( (stripPrefix "rm " -> Just _file)
: next
) = go next -- already done in unzipXZ
go (t:_) = fail $ "command not recognized: " <> unpack t
| 417
| false
| true
| 7
| 12
| 139
| 188
| 94
| 94
| null | null |
scrive/hpqtypes
|
test/Main.hs
|
bsd-3-clause
|
----------------------------------------
tsNoTrans :: TransactionSettings
tsNoTrans = defaultTransactionSettings { tsAutoTransaction = False }
| 143
|
tsNoTrans :: TransactionSettings
tsNoTrans = defaultTransactionSettings { tsAutoTransaction = False }
| 101
|
tsNoTrans = defaultTransactionSettings { tsAutoTransaction = False }
| 68
| true
| true
| 0
| 6
| 12
| 20
| 12
| 8
| null | null |
acowley/ghc
|
compiler/hsSyn/HsImpExp.hs
|
bsd-3-clause
|
simpleImportDecl :: ModuleName -> ImportDecl name
simpleImportDecl mn = ImportDecl {
ideclSourceSrc = Nothing,
ideclName = noLoc mn,
ideclPkgQual = Nothing,
ideclSource = False,
ideclSafe = False,
ideclImplicit = False,
ideclQualified = False,
ideclAs = Nothing,
ideclHiding = Nothing
}
| 370
|
simpleImportDecl :: ModuleName -> ImportDecl name
simpleImportDecl mn = ImportDecl {
ideclSourceSrc = Nothing,
ideclName = noLoc mn,
ideclPkgQual = Nothing,
ideclSource = False,
ideclSafe = False,
ideclImplicit = False,
ideclQualified = False,
ideclAs = Nothing,
ideclHiding = Nothing
}
| 370
|
simpleImportDecl mn = ImportDecl {
ideclSourceSrc = Nothing,
ideclName = noLoc mn,
ideclPkgQual = Nothing,
ideclSource = False,
ideclSafe = False,
ideclImplicit = False,
ideclQualified = False,
ideclAs = Nothing,
ideclHiding = Nothing
}
| 320
| false
| true
| 0
| 7
| 123
| 80
| 48
| 32
| null | null |
jonsterling/singletons
|
Data/Singletons/Singletons.hs
|
bsd-3-clause
|
singExp :: ExpTable -> Exp -> Q Exp
singExp vars (VarE name) = case Map.lookup name vars of
Just exp -> return exp
Nothing -> return (singVal name)
| 151
|
singExp :: ExpTable -> Exp -> Q Exp
singExp vars (VarE name) = case Map.lookup name vars of
Just exp -> return exp
Nothing -> return (singVal name)
| 151
|
singExp vars (VarE name) = case Map.lookup name vars of
Just exp -> return exp
Nothing -> return (singVal name)
| 115
| false
| true
| 0
| 10
| 31
| 75
| 34
| 41
| null | null |
shlevy/ghc
|
compiler/hsSyn/HsUtils.hs
|
bsd-3-clause
|
mkUntypedSplice :: SpliceDecoration -> LHsExpr GhcPs -> HsSplice GhcPs
mkUntypedSplice hasParen e = HsUntypedSplice hasParen unqualSplice e
| 139
|
mkUntypedSplice :: SpliceDecoration -> LHsExpr GhcPs -> HsSplice GhcPs
mkUntypedSplice hasParen e = HsUntypedSplice hasParen unqualSplice e
| 139
|
mkUntypedSplice hasParen e = HsUntypedSplice hasParen unqualSplice e
| 68
| false
| true
| 0
| 7
| 16
| 37
| 17
| 20
| null | null |
a-ford/notghc
|
LlvmCodeGen/Base.hs
|
bsd-3-clause
|
-- | Translate a Cmm Bit Width to a LlvmType.
widthToLlvmInt :: Width -> LlvmType
widthToLlvmInt w = LMInt $ widthInBits w
| 122
|
widthToLlvmInt :: Width -> LlvmType
widthToLlvmInt w = LMInt $ widthInBits w
| 76
|
widthToLlvmInt w = LMInt $ widthInBits w
| 40
| true
| true
| 0
| 6
| 21
| 26
| 13
| 13
| null | null |
bjpop/blip
|
blipinterpreter/src/Blip/Interpreter/HashTable/Utils.hs
|
bsd-3-clause
|
nextHighestPowerOf2 :: Word -> Word
nextHighestPowerOf2 w = highestBitMask (w-1) + 1
| 84
|
nextHighestPowerOf2 :: Word -> Word
nextHighestPowerOf2 w = highestBitMask (w-1) + 1
| 84
|
nextHighestPowerOf2 w = highestBitMask (w-1) + 1
| 48
| false
| true
| 0
| 8
| 11
| 32
| 16
| 16
| null | null |
jdimond/diplomarbeit
|
lib/Search/Processing/GOV2.hs
|
bsd-3-clause
|
tagToText (TagOpen "h5" _) = Just "\n"
| 38
|
tagToText (TagOpen "h5" _) = Just "\n"
| 38
|
tagToText (TagOpen "h5" _) = Just "\n"
| 38
| false
| false
| 0
| 7
| 6
| 20
| 9
| 11
| null | null |
alexander-at-github/eta
|
compiler/ETA/Utils/UniqSet.hs
|
bsd-3-clause
|
unionManyUniqSets sets = foldr1 unionUniqSets sets
| 50
|
unionManyUniqSets sets = foldr1 unionUniqSets sets
| 50
|
unionManyUniqSets sets = foldr1 unionUniqSets sets
| 50
| false
| false
| 0
| 5
| 5
| 14
| 6
| 8
| null | null |
Lysxia/twentyseven
|
src/Rubik/Cube/Facelet/Internal.hs
|
mit
|
ubr = [ 2, 36, 29]
| 18
|
ubr = [ 2, 36, 29]
| 18
|
ubr = [ 2, 36, 29]
| 18
| false
| false
| 0
| 5
| 5
| 15
| 9
| 6
| null | null |
shlevy/ghc
|
compiler/types/Type.hs
|
bsd-3-clause
|
splitTyConApp_maybe :: HasDebugCallStack => Type -> Maybe (TyCon, [Type])
splitTyConApp_maybe ty | Just ty' <- coreView ty = splitTyConApp_maybe ty'
| 148
|
splitTyConApp_maybe :: HasDebugCallStack => Type -> Maybe (TyCon, [Type])
splitTyConApp_maybe ty | Just ty' <- coreView ty = splitTyConApp_maybe ty'
| 148
|
splitTyConApp_maybe ty | Just ty' <- coreView ty = splitTyConApp_maybe ty'
| 74
| false
| true
| 0
| 9
| 19
| 57
| 26
| 31
| null | null |
rueshyna/gogol
|
gogol-iam/gen/Network/Google/IAM/Types/Product.hs
|
mpl-2.0
|
-- | A single identity requesting access for a Cloud Platform resource.
-- Follows the same format of Binding.members. Required
bdMember :: Lens' BindingDelta (Maybe Text)
bdMember = lens _bdMember (\ s a -> s{_bdMember = a})
| 225
|
bdMember :: Lens' BindingDelta (Maybe Text)
bdMember = lens _bdMember (\ s a -> s{_bdMember = a})
| 97
|
bdMember = lens _bdMember (\ s a -> s{_bdMember = a})
| 53
| true
| true
| 1
| 9
| 36
| 53
| 26
| 27
| null | null |
anttisalonen/freekick2
|
src/BinHelpers.hs
|
gpl-3.0
|
putBytes :: Int -> C.ByteString -> Put
putBytes n s =
let s' = C.take n s
pad = C.replicate (n - C.length s') '\0'
in putByteString $ s' `C.append` pad
| 162
|
putBytes :: Int -> C.ByteString -> Put
putBytes n s =
let s' = C.take n s
pad = C.replicate (n - C.length s') '\0'
in putByteString $ s' `C.append` pad
| 162
|
putBytes n s =
let s' = C.take n s
pad = C.replicate (n - C.length s') '\0'
in putByteString $ s' `C.append` pad
| 123
| false
| true
| 2
| 13
| 41
| 87
| 41
| 46
| null | null |
ml9951/ghc
|
compiler/utils/Panic.hs
|
bsd-3-clause
|
popInterruptTargetThread :: IO ()
popInterruptTargetThread =
modifyMVar_ interruptTargetThread $
\tids -> return $! case tids of [] -> []
(_:ts) -> ts
| 194
|
popInterruptTargetThread :: IO ()
popInterruptTargetThread =
modifyMVar_ interruptTargetThread $
\tids -> return $! case tids of [] -> []
(_:ts) -> ts
| 194
|
popInterruptTargetThread =
modifyMVar_ interruptTargetThread $
\tids -> return $! case tids of [] -> []
(_:ts) -> ts
| 160
| false
| true
| 0
| 12
| 65
| 59
| 30
| 29
| null | null |
roldugin/LiveFusion
|
Data/LiveFusion/Util.hs
|
bsd-3-clause
|
-- | Neatly index multiple lines.
indexed :: String -> String
indexed = unlines . indexed' . lines
where
indexed' :: [String] -> [String]
indexed' = zipWith space
(map linum [2..]) -- GHC errors are off by 1 line
linum (i::Int) = printf "%2d" i
| 282
|
indexed :: String -> String
indexed = unlines . indexed' . lines
where
indexed' :: [String] -> [String]
indexed' = zipWith space
(map linum [2..]) -- GHC errors are off by 1 line
linum (i::Int) = printf "%2d" i
| 248
|
indexed = unlines . indexed' . lines
where
indexed' :: [String] -> [String]
indexed' = zipWith space
(map linum [2..]) -- GHC errors are off by 1 line
linum (i::Int) = printf "%2d" i
| 220
| true
| true
| 1
| 8
| 82
| 98
| 47
| 51
| null | null |
jwiegley/ghc-release
|
libraries/Cabal/cabal-install/Distribution/Client/Dependency/Modular/Preference.hs
|
gpl-3.0
|
processPackageConstraintP _ _ _ r = r
| 73
|
processPackageConstraintP _ _ _ r = r
| 73
|
processPackageConstraintP _ _ _ r = r
| 73
| false
| false
| 0
| 5
| 42
| 15
| 7
| 8
| null | null |
io7m/r2
|
com.io7m.r2.documentation/src/main/resources/com/io7m/r2/documentation/haskell/Matrix4f.hs
|
isc
|
- XXX: Omitted
inverse :: T -> Maybe T
inverse _ = undefined
| 61
|
inverse :: T -> Maybe T
inverse _ = undefined
| 45
|
inverse _ = undefined
| 21
| true
| true
| 2
| 7
| 13
| 35
| 15
| 20
| null | null |
simpss/hirc
|
Calculator.hs
|
gpl-3.0
|
functions :: [(String, Double -> Double)]
functions =
[("abs", abs), ("acos", acos), ("asin", asin), ("atan", atan),
("sqrt", sqrt), ("cos", cos), ("sin", sin), ("tan", tan),
("exp", exp), ("ln", log), ("log", logBase 10), ("bits", logBase 2),
("ceil", fromIntegral . ceiling), ("floor", fromIntegral . floor),
("round", fromIntegral . round), ("int", fromIntegral . truncate),
("~", fromIntegral . (complement :: Integer -> Integer) . truncate)]
| 469
|
functions :: [(String, Double -> Double)]
functions =
[("abs", abs), ("acos", acos), ("asin", asin), ("atan", atan),
("sqrt", sqrt), ("cos", cos), ("sin", sin), ("tan", tan),
("exp", exp), ("ln", log), ("log", logBase 10), ("bits", logBase 2),
("ceil", fromIntegral . ceiling), ("floor", fromIntegral . floor),
("round", fromIntegral . round), ("int", fromIntegral . truncate),
("~", fromIntegral . (complement :: Integer -> Integer) . truncate)]
| 469
|
functions =
[("abs", abs), ("acos", acos), ("asin", asin), ("atan", atan),
("sqrt", sqrt), ("cos", cos), ("sin", sin), ("tan", tan),
("exp", exp), ("ln", log), ("log", logBase 10), ("bits", logBase 2),
("ceil", fromIntegral . ceiling), ("floor", fromIntegral . floor),
("round", fromIntegral . round), ("int", fromIntegral . truncate),
("~", fromIntegral . (complement :: Integer -> Integer) . truncate)]
| 427
| false
| true
| 0
| 11
| 82
| 224
| 137
| 87
| null | null |
adunning/pandoc-citeproc
|
src/Text/CSL/Style.hs
|
bsd-3-clause
|
startWithCapital' _ = False
| 37
|
startWithCapital' _ = False
| 37
|
startWithCapital' _ = False
| 37
| false
| false
| 0
| 4
| 13
| 10
| 4
| 6
| null | null |
talanis85/mudblood
|
src/Mudblood/Trigger.hs
|
gpl-3.0
|
-- | If the first trigger succeeds, subsequent events will run the second trigger
-- until one of these fails.
loopT :: (Monad m)
=> (a -> TriggerM m [a] a [a])
-> (a -> TriggerM m [a] a [a])
-> (a -> TriggerM m [a] a [a])
loopT startt nextt = startt >=> yieldT >=> loop
where
loop x = ((nextt >=> yieldT >=> loop) x) `mplus` (return [x])
-- | Colorize an AttrString
| 399
|
loopT :: (Monad m)
=> (a -> TriggerM m [a] a [a])
-> (a -> TriggerM m [a] a [a])
-> (a -> TriggerM m [a] a [a])
loopT startt nextt = startt >=> yieldT >=> loop
where
loop x = ((nextt >=> yieldT >=> loop) x) `mplus` (return [x])
-- | Colorize an AttrString
| 286
|
loopT startt nextt = startt >=> yieldT >=> loop
where
loop x = ((nextt >=> yieldT >=> loop) x) `mplus` (return [x])
-- | Colorize an AttrString
| 156
| true
| true
| 0
| 11
| 107
| 152
| 83
| 69
| null | null |
albertov/hs-mapnik
|
pure/src/Mapnik/QuickCheck.hs
|
bsd-3-clause
|
arbitraryGroupSymProperties :: FontSetMap -> Gen GroupSymProperties
arbitraryGroupSymProperties fontMap = do
layout <- arbitrary
rules <- resize 3 (listOf (arbitraryGroupRule fontMap))
return GroupSymProperties{..}
| 220
|
arbitraryGroupSymProperties :: FontSetMap -> Gen GroupSymProperties
arbitraryGroupSymProperties fontMap = do
layout <- arbitrary
rules <- resize 3 (listOf (arbitraryGroupRule fontMap))
return GroupSymProperties{..}
| 220
|
arbitraryGroupSymProperties fontMap = do
layout <- arbitrary
rules <- resize 3 (listOf (arbitraryGroupRule fontMap))
return GroupSymProperties{..}
| 152
| false
| true
| 0
| 12
| 27
| 63
| 29
| 34
| null | null |
badp/ganeti
|
src/Ganeti/OpParams.hs
|
gpl-2.0
|
pIgnoreStatus :: Field
pIgnoreStatus =
withDoc "Ignores the node offline status for power off" $
defaultFalse "ignore_status"
| 129
|
pIgnoreStatus :: Field
pIgnoreStatus =
withDoc "Ignores the node offline status for power off" $
defaultFalse "ignore_status"
| 129
|
pIgnoreStatus =
withDoc "Ignores the node offline status for power off" $
defaultFalse "ignore_status"
| 106
| false
| true
| 0
| 6
| 20
| 21
| 10
| 11
| null | null |
keithodulaigh/Hets
|
HasCASL/Builtin.hs
|
gpl-2.0
|
-- | builtin class map
cpoMap :: ClassMap
cpoMap = Map.fromList
[ (cpoId, ClassInfo rStar $ Set.singleton universe)
, (cppoId, ClassInfo rStar $ Set.singleton cpoCl)]
| 170
|
cpoMap :: ClassMap
cpoMap = Map.fromList
[ (cpoId, ClassInfo rStar $ Set.singleton universe)
, (cppoId, ClassInfo rStar $ Set.singleton cpoCl)]
| 147
|
cpoMap = Map.fromList
[ (cpoId, ClassInfo rStar $ Set.singleton universe)
, (cppoId, ClassInfo rStar $ Set.singleton cpoCl)]
| 128
| true
| true
| 0
| 9
| 28
| 59
| 31
| 28
| null | null |
tilarids/ohammer
|
OLEStorage.hs
|
lgpl-3.0
|
getEntryBytes :: OLEDocument -> Entry -> B.ByteString
getEntryBytes doc entry
| (entryType entry /= RootStorageEntry)
&& (streamSize entry) < (minStreamSize (header doc)) = getSSATChainedBytes chain doc
where chain = getSSATChain doc (streamSectorID entry)
| 273
|
getEntryBytes :: OLEDocument -> Entry -> B.ByteString
getEntryBytes doc entry
| (entryType entry /= RootStorageEntry)
&& (streamSize entry) < (minStreamSize (header doc)) = getSSATChainedBytes chain doc
where chain = getSSATChain doc (streamSectorID entry)
| 273
|
getEntryBytes doc entry
| (entryType entry /= RootStorageEntry)
&& (streamSize entry) < (minStreamSize (header doc)) = getSSATChainedBytes chain doc
where chain = getSSATChain doc (streamSectorID entry)
| 219
| false
| true
| 0
| 12
| 49
| 92
| 44
| 48
| null | null |
hjwylde/omnifmt
|
src/Omnifmt/Config.hs
|
bsd-3-clause
|
- | @fromJust . programFor@
unsafeProgramFor :: Config -> Text -> Program
unsafeProgramFor config = fromJust . programFor config
| 129
|
unsafeProgramFor :: Config -> Text -> Program
unsafeProgramFor config = fromJust . programFor config
| 100
|
unsafeProgramFor config = fromJust . programFor config
| 54
| true
| true
| 3
| 7
| 19
| 41
| 21
| 20
| null | null |
oakfang/DemiLang
|
src/Demi/VM.hs
|
mit
|
subSolve LesserThan (DblVar x) (DblVar y) = return $ BoolVar $ x < y
| 76
|
subSolve LesserThan (DblVar x) (DblVar y) = return $ BoolVar $ x < y
| 76
|
subSolve LesserThan (DblVar x) (DblVar y) = return $ BoolVar $ x < y
| 76
| false
| false
| 0
| 7
| 21
| 37
| 18
| 19
| null | null |
Sventimir/game-of-life
|
testSuite.hs
|
apache-2.0
|
main = do
counts <- runTestTT $ TestList [testSuite]
if errors counts > 0
then exitWith $ ExitFailure 2
else if failures counts > 0
then exitWith $ ExitFailure 1
else exitSuccess
| 212
|
main = do
counts <- runTestTT $ TestList [testSuite]
if errors counts > 0
then exitWith $ ExitFailure 2
else if failures counts > 0
then exitWith $ ExitFailure 1
else exitSuccess
| 212
|
main = do
counts <- runTestTT $ TestList [testSuite]
if errors counts > 0
then exitWith $ ExitFailure 2
else if failures counts > 0
then exitWith $ ExitFailure 1
else exitSuccess
| 212
| false
| false
| 1
| 10
| 65
| 74
| 34
| 40
| null | null |
noughtmare/yi
|
yi-core/src/Yi/Editor.hs
|
gpl-2.0
|
statusLine :: Editor -> [T.Text]
statusLine = fst . statusLineInfo
| 66
|
statusLine :: Editor -> [T.Text]
statusLine = fst . statusLineInfo
| 66
|
statusLine = fst . statusLineInfo
| 33
| false
| true
| 0
| 7
| 9
| 24
| 13
| 11
| null | null |
NicolasDP/hs-smtp
|
Network/SMTP.hs
|
bsd-3-clause
|
prettyPrintCommand :: String -> String -> Command -> String
prettyPrintCommand indentation time cmd =
indentation ++ "[" ++ time ++ "][CMD] " ++ (BC.unpack $ showCommand cmd)
| 178
|
prettyPrintCommand :: String -> String -> Command -> String
prettyPrintCommand indentation time cmd =
indentation ++ "[" ++ time ++ "][CMD] " ++ (BC.unpack $ showCommand cmd)
| 178
|
prettyPrintCommand indentation time cmd =
indentation ++ "[" ++ time ++ "][CMD] " ++ (BC.unpack $ showCommand cmd)
| 118
| false
| true
| 0
| 8
| 30
| 58
| 29
| 29
| null | null |
xu-hao/QueryArrow
|
QueryArrow-db-filesystem/src/QueryArrow/FileSystem/Interpreter.hs
|
bsd-3-clause
|
parSendDir0 :: String -> Int -> String -> Pool Handle -> TaskGroup -> IO ()
parSendDir0 a blocksize b pool g = do
withResource pool $ \h -> do
sendMsgPack h (LocalizedCommandWrapper (LMakeDir b))
Just () <- receiveMsgPack h
return ()
files <- listDirectory a
mapM_ (\n -> do
bool <- doesFileExist (a </> n)
if bool
then parSendFile0 (a</>n) blocksize (b </> n) pool g
else parSendDir0 (a</>n) blocksize (b </> n) pool g
) files
| 485
|
parSendDir0 :: String -> Int -> String -> Pool Handle -> TaskGroup -> IO ()
parSendDir0 a blocksize b pool g = do
withResource pool $ \h -> do
sendMsgPack h (LocalizedCommandWrapper (LMakeDir b))
Just () <- receiveMsgPack h
return ()
files <- listDirectory a
mapM_ (\n -> do
bool <- doesFileExist (a </> n)
if bool
then parSendFile0 (a</>n) blocksize (b </> n) pool g
else parSendDir0 (a</>n) blocksize (b </> n) pool g
) files
| 484
|
parSendDir0 a blocksize b pool g = do
withResource pool $ \h -> do
sendMsgPack h (LocalizedCommandWrapper (LMakeDir b))
Just () <- receiveMsgPack h
return ()
files <- listDirectory a
mapM_ (\n -> do
bool <- doesFileExist (a </> n)
if bool
then parSendFile0 (a</>n) blocksize (b </> n) pool g
else parSendDir0 (a</>n) blocksize (b </> n) pool g
) files
| 408
| false
| true
| 0
| 15
| 134
| 212
| 101
| 111
| null | null |
snoyberg/ghc
|
compiler/coreSyn/PprCore.hs
|
bsd-3-clause
|
pprTopBind :: OutputableBndr a => Annotation a -> Bind a -> SDoc
pprTopBind ann (NonRec binder expr)
= ppr_binding ann (binder,expr) $$ blankLine
| 146
|
pprTopBind :: OutputableBndr a => Annotation a -> Bind a -> SDoc
pprTopBind ann (NonRec binder expr)
= ppr_binding ann (binder,expr) $$ blankLine
| 146
|
pprTopBind ann (NonRec binder expr)
= ppr_binding ann (binder,expr) $$ blankLine
| 81
| false
| true
| 0
| 8
| 23
| 60
| 29
| 31
| null | null |
mbakke/ganeti
|
src/Ganeti/HTools/Program/Hspace.hs
|
bsd-2-clause
|
printFRScores :: Node.List -> Node.List -> [(FailMode, Int)] -> IO ()
printFRScores ini_nl fin_nl sreason = do
printf " - most likely failure reason: %s\n" $ failureReason sreason::IO ()
printClusterScores ini_nl fin_nl
printClusterEff (Cluster.totalResources fin_nl) (Node.haveExclStorage fin_nl)
-- | Print final stats and related metrics.
| 349
|
printFRScores :: Node.List -> Node.List -> [(FailMode, Int)] -> IO ()
printFRScores ini_nl fin_nl sreason = do
printf " - most likely failure reason: %s\n" $ failureReason sreason::IO ()
printClusterScores ini_nl fin_nl
printClusterEff (Cluster.totalResources fin_nl) (Node.haveExclStorage fin_nl)
-- | Print final stats and related metrics.
| 349
|
printFRScores ini_nl fin_nl sreason = do
printf " - most likely failure reason: %s\n" $ failureReason sreason::IO ()
printClusterScores ini_nl fin_nl
printClusterEff (Cluster.totalResources fin_nl) (Node.haveExclStorage fin_nl)
-- | Print final stats and related metrics.
| 279
| false
| true
| 0
| 10
| 52
| 102
| 49
| 53
| null | null |
GaloisInc/halvm-ghc
|
compiler/cmm/CmmLint.hs
|
bsd-3-clause
|
lintCmmGraph :: DynFlags -> CmmGraph -> CmmLint ()
lintCmmGraph dflags g =
cmmLocalLiveness dflags g `seq` mapM_ (lintCmmBlock labels) blocks
-- cmmLiveness throws an error if there are registers
-- live on entry to the graph (i.e. undefined
-- variables)
where
blocks = toBlockList g
labels = setFromList (map entryLabel blocks)
| 361
|
lintCmmGraph :: DynFlags -> CmmGraph -> CmmLint ()
lintCmmGraph dflags g =
cmmLocalLiveness dflags g `seq` mapM_ (lintCmmBlock labels) blocks
-- cmmLiveness throws an error if there are registers
-- live on entry to the graph (i.e. undefined
-- variables)
where
blocks = toBlockList g
labels = setFromList (map entryLabel blocks)
| 361
|
lintCmmGraph dflags g =
cmmLocalLiveness dflags g `seq` mapM_ (lintCmmBlock labels) blocks
-- cmmLiveness throws an error if there are registers
-- live on entry to the graph (i.e. undefined
-- variables)
where
blocks = toBlockList g
labels = setFromList (map entryLabel blocks)
| 310
| false
| true
| 1
| 8
| 82
| 81
| 41
| 40
| null | null |
denibertovic/haskell
|
kubernetes/lib/Kubernetes/OpenAPI/ModelLens.hs
|
bsd-3-clause
|
-- | 'v1ProbeSuccessThreshold' Lens
v1ProbeSuccessThresholdL :: Lens_' V1Probe (Maybe Int)
v1ProbeSuccessThresholdL f V1Probe{..} = (\v1ProbeSuccessThreshold -> V1Probe { v1ProbeSuccessThreshold, ..} ) <$> f v1ProbeSuccessThreshold
| 231
|
v1ProbeSuccessThresholdL :: Lens_' V1Probe (Maybe Int)
v1ProbeSuccessThresholdL f V1Probe{..} = (\v1ProbeSuccessThreshold -> V1Probe { v1ProbeSuccessThreshold, ..} ) <$> f v1ProbeSuccessThreshold
| 195
|
v1ProbeSuccessThresholdL f V1Probe{..} = (\v1ProbeSuccessThreshold -> V1Probe { v1ProbeSuccessThreshold, ..} ) <$> f v1ProbeSuccessThreshold
| 140
| true
| true
| 1
| 8
| 23
| 61
| 30
| 31
| null | null |
oldmanmike/ghc
|
compiler/nativeGen/Dwarf/Constants.hs
|
bsd-3-clause
|
dW_FORM_block1 = 0x0a
| 21
|
dW_FORM_block1 = 0x0a
| 21
|
dW_FORM_block1 = 0x0a
| 21
| false
| false
| 1
| 5
| 2
| 10
| 3
| 7
| null | null |
Ferdinand-vW/sessiontypes
|
src/Control/SessionTypes/Debug.hs
|
gpl-3.0
|
evalOutput (O_OffZ s) = evalOutput s
| 36
|
evalOutput (O_OffZ s) = evalOutput s
| 36
|
evalOutput (O_OffZ s) = evalOutput s
| 36
| false
| false
| 0
| 6
| 5
| 19
| 8
| 11
| null | null |
haskell/ghc-builder
|
server/server.hs
|
bsd-3-clause
|
mkBuildInstructions :: Instructions -> BuildNum -> [BuildStep] -> BuildInstructions
mkBuildInstructions instructions bn buildSteps
= BuildInstructions {
bi_instructions = instructions,
bi_buildNum = bn,
bi_buildSteps = zip [1..] buildSteps
}
| 266
|
mkBuildInstructions :: Instructions -> BuildNum -> [BuildStep] -> BuildInstructions
mkBuildInstructions instructions bn buildSteps
= BuildInstructions {
bi_instructions = instructions,
bi_buildNum = bn,
bi_buildSteps = zip [1..] buildSteps
}
| 266
|
mkBuildInstructions instructions bn buildSteps
= BuildInstructions {
bi_instructions = instructions,
bi_buildNum = bn,
bi_buildSteps = zip [1..] buildSteps
}
| 182
| false
| true
| 0
| 9
| 52
| 69
| 36
| 33
| null | null |
lancelet/inner-change
|
src/Network/InnerChange/Proxy.hs
|
bsd-3-clause
|
defaultExceptionResponse :: SomeException -> Wai.Response
defaultExceptionResponse e =
Wai.responseLBS Types.internalServerError500
[ (Types.hContentType, "text/plain; charset=utf-8") ]
$ LBS.fromChunks [ BS.pack $ show e ]
| 239
|
defaultExceptionResponse :: SomeException -> Wai.Response
defaultExceptionResponse e =
Wai.responseLBS Types.internalServerError500
[ (Types.hContentType, "text/plain; charset=utf-8") ]
$ LBS.fromChunks [ BS.pack $ show e ]
| 239
|
defaultExceptionResponse e =
Wai.responseLBS Types.internalServerError500
[ (Types.hContentType, "text/plain; charset=utf-8") ]
$ LBS.fromChunks [ BS.pack $ show e ]
| 181
| false
| true
| 2
| 8
| 38
| 63
| 31
| 32
| null | null |
jean-edouard/manager
|
disksync/Disk.hs
|
gpl-2.0
|
diskIncFailureCount :: DiskId -> DiskSync ()
diskIncFailureCount disk_id =
do c <- diskGetFailureCount disk_id
liftRpc $ dbWrite (diskDBPath disk_id ++ "/failure-count") (c+1)
-----------------
-- queues
-----------------
| 233
|
diskIncFailureCount :: DiskId -> DiskSync ()
diskIncFailureCount disk_id =
do c <- diskGetFailureCount disk_id
liftRpc $ dbWrite (diskDBPath disk_id ++ "/failure-count") (c+1)
-----------------
-- queues
-----------------
| 233
|
diskIncFailureCount disk_id =
do c <- diskGetFailureCount disk_id
liftRpc $ dbWrite (diskDBPath disk_id ++ "/failure-count") (c+1)
-----------------
-- queues
-----------------
| 188
| false
| true
| 0
| 11
| 37
| 65
| 32
| 33
| null | null |
listx/miro
|
lib/Miro/Option.hs
|
bsd-2-clause
|
mkShowOptHash :: (Enum a, ShowOpt a) => a -> [(String, a)]
mkShowOptHash a = map (\a' -> (showOpt a', a') ) [a ..]
| 114
|
mkShowOptHash :: (Enum a, ShowOpt a) => a -> [(String, a)]
mkShowOptHash a = map (\a' -> (showOpt a', a') ) [a ..]
| 114
|
mkShowOptHash a = map (\a' -> (showOpt a', a') ) [a ..]
| 55
| false
| true
| 0
| 10
| 22
| 74
| 39
| 35
| null | null |
suhailshergill/liboleg
|
Control/CCRef.hs
|
bsd-3-clause
|
runCC :: (Monad m, Mutation m) => CC m a -> m a
runCC m = do
ptop <- newRef [] -- make the parallel stack
-- where to store the answer to
ans <- newRef (error "runCC: no prompt was ever set!")
unCC m (writeRef ans) ptop
readRef ans
-- --------------------------------------------------------------------
-- Utilities
-- | Mark is Ref m Bool rather than Ref m () as was in OCaml,
-- since we use equi-mutability rather than physical equality when
-- comparing marks. Normally, mark is Ref False; we flip it to
-- True when we do the equi-mutability test.
| 607
|
runCC :: (Monad m, Mutation m) => CC m a -> m a
runCC m = do
ptop <- newRef [] -- make the parallel stack
-- where to store the answer to
ans <- newRef (error "runCC: no prompt was ever set!")
unCC m (writeRef ans) ptop
readRef ans
-- --------------------------------------------------------------------
-- Utilities
-- | Mark is Ref m Bool rather than Ref m () as was in OCaml,
-- since we use equi-mutability rather than physical equality when
-- comparing marks. Normally, mark is Ref False; we flip it to
-- True when we do the equi-mutability test.
| 607
|
runCC m = do
ptop <- newRef [] -- make the parallel stack
-- where to store the answer to
ans <- newRef (error "runCC: no prompt was ever set!")
unCC m (writeRef ans) ptop
readRef ans
-- --------------------------------------------------------------------
-- Utilities
-- | Mark is Ref m Bool rather than Ref m () as was in OCaml,
-- since we use equi-mutability rather than physical equality when
-- comparing marks. Normally, mark is Ref False; we flip it to
-- True when we do the equi-mutability test.
| 559
| false
| true
| 0
| 11
| 153
| 104
| 50
| 54
| null | null |
573/leksah
|
src/IDE/LogRef.hs
|
gpl-2.0
|
markLogRefs :: IDEAction
markLogRefs = do
forOpenLogRefs $ \index logRef buf -> markRefInSourceBuf index buf logRef False
| 125
|
markLogRefs :: IDEAction
markLogRefs = do
forOpenLogRefs $ \index logRef buf -> markRefInSourceBuf index buf logRef False
| 125
|
markLogRefs = do
forOpenLogRefs $ \index logRef buf -> markRefInSourceBuf index buf logRef False
| 100
| false
| true
| 0
| 9
| 20
| 36
| 18
| 18
| null | null |
adarqui/ToyBox
|
haskell/adarqui/useless/src/TB/Useless/Permutations.hs
|
gpl-3.0
|
dupPerms :: [a] -> [[a]]
dupPerms xs = dupPerms' xs [[]]
| 56
|
dupPerms :: [a] -> [[a]]
dupPerms xs = dupPerms' xs [[]]
| 56
|
dupPerms xs = dupPerms' xs [[]]
| 31
| false
| true
| 0
| 7
| 10
| 37
| 20
| 17
| null | null |
rocio/rethinkdb
|
scripts/adtproto/Parse.hs
|
agpl-3.0
|
parseCXXBlock :: Parse String
parseCXXBlock = between (char '{') (char '}') parseCXXFragment
| 92
|
parseCXXBlock :: Parse String
parseCXXBlock = between (char '{') (char '}') parseCXXFragment
| 92
|
parseCXXBlock = between (char '{') (char '}') parseCXXFragment
| 62
| false
| true
| 1
| 7
| 11
| 36
| 16
| 20
| null | null |
patrickgombert/Hisp
|
Kernel.hs
|
mit
|
addition :: Value
addition = Vbuiltinfn "+" (\vals -> return $ foldl add (Vint 0) vals)
| 87
|
addition :: Value
addition = Vbuiltinfn "+" (\vals -> return $ foldl add (Vint 0) vals)
| 87
|
addition = Vbuiltinfn "+" (\vals -> return $ foldl add (Vint 0) vals)
| 69
| false
| true
| 0
| 11
| 15
| 49
| 22
| 27
| null | null |
SnipyJulmy/mcs_notes_and_resume
|
fun-and-log-prog/exercices/s02/s02.hs
|
lgpl-3.0
|
scalarProduct :: Num a => [a] -> [a] -> [a]
scalarProduct [] _ = []
| 67
|
scalarProduct :: Num a => [a] -> [a] -> [a]
scalarProduct [] _ = []
| 67
|
scalarProduct [] _ = []
| 23
| false
| true
| 0
| 8
| 14
| 44
| 23
| 21
| null | null |
vladimir-ipatov/ganeti
|
test/hs/Test/Ganeti/TestCommon.hs
|
gpl-2.0
|
-- | Return the source directory of Ganeti.
getSourceDir :: IO FilePath
getSourceDir = catchJust (guard . isDoesNotExistError)
(getEnv "TOP_SRCDIR")
(const (return "."))
| 193
|
getSourceDir :: IO FilePath
getSourceDir = catchJust (guard . isDoesNotExistError)
(getEnv "TOP_SRCDIR")
(const (return "."))
| 149
|
getSourceDir = catchJust (guard . isDoesNotExistError)
(getEnv "TOP_SRCDIR")
(const (return "."))
| 121
| true
| true
| 0
| 9
| 46
| 55
| 25
| 30
| null | null |
nadirs/hearts-hs
|
src/Hearts/Deck.hs
|
mit
|
deckScore :: Deck -> Score
deckScore deck = if allScoreCards == (allScoreCards `S.intersection` unDeck deck) then 0 else foldr (\card acc -> acc + cardScore card) 0 (unDeck deck)
where
allScoreCards = S.fromList $ Card Queen Spades : [Card rank Hearts | rank <- [Two ..]]
| 277
|
deckScore :: Deck -> Score
deckScore deck = if allScoreCards == (allScoreCards `S.intersection` unDeck deck) then 0 else foldr (\card acc -> acc + cardScore card) 0 (unDeck deck)
where
allScoreCards = S.fromList $ Card Queen Spades : [Card rank Hearts | rank <- [Two ..]]
| 277
|
deckScore deck = if allScoreCards == (allScoreCards `S.intersection` unDeck deck) then 0 else foldr (\card acc -> acc + cardScore card) 0 (unDeck deck)
where
allScoreCards = S.fromList $ Card Queen Spades : [Card rank Hearts | rank <- [Two ..]]
| 250
| false
| true
| 0
| 10
| 51
| 117
| 61
| 56
| null | null |
brendanhay/khan
|
khan/Khan/Internal/Options.hs
|
mpl-2.0
|
checkDir :: MonadIO m => FilePath -> String -> EitherT AWSError m ()
checkDir p e = check p msg >> checkIO (not <$> FS.isDirectory p) msg
where
msg = Text.unpack ("directory '" <> toTextIgnore p <> "'") ++ e
| 213
|
checkDir :: MonadIO m => FilePath -> String -> EitherT AWSError m ()
checkDir p e = check p msg >> checkIO (not <$> FS.isDirectory p) msg
where
msg = Text.unpack ("directory '" <> toTextIgnore p <> "'") ++ e
| 213
|
checkDir p e = check p msg >> checkIO (not <$> FS.isDirectory p) msg
where
msg = Text.unpack ("directory '" <> toTextIgnore p <> "'") ++ e
| 144
| false
| true
| 0
| 10
| 45
| 97
| 46
| 51
| null | null |
hesiod/OpenGL
|
src/Graphics/Rendering/OpenGL/GL/BufferObjects.hs
|
bsd-3-clause
|
vertexAttribArrayBufferBinding :: AttribLocation -> GettableStateVar (Maybe BufferObject)
vertexAttribArrayBufferBinding location =
makeGettableStateVar $ do
buf <- getVertexAttribInteger1 (BufferObject . fromIntegral) location GetVertexAttribArrayBufferBinding
return $ if buf == noBufferObject then Nothing else Just buf
--------------------------------------------------------------------------------
| 419
|
vertexAttribArrayBufferBinding :: AttribLocation -> GettableStateVar (Maybe BufferObject)
vertexAttribArrayBufferBinding location =
makeGettableStateVar $ do
buf <- getVertexAttribInteger1 (BufferObject . fromIntegral) location GetVertexAttribArrayBufferBinding
return $ if buf == noBufferObject then Nothing else Just buf
--------------------------------------------------------------------------------
| 419
|
vertexAttribArrayBufferBinding location =
makeGettableStateVar $ do
buf <- getVertexAttribInteger1 (BufferObject . fromIntegral) location GetVertexAttribArrayBufferBinding
return $ if buf == noBufferObject then Nothing else Just buf
--------------------------------------------------------------------------------
| 329
| false
| true
| 0
| 11
| 48
| 75
| 37
| 38
| null | null |
abakst/symmetry
|
checker/tests/todo/SrcStutter.hs
|
mit
|
b_msg :: DSL repr => repr Msg
b_msg = inr tt
| 44
|
b_msg :: DSL repr => repr Msg
b_msg = inr tt
| 44
|
b_msg = inr tt
| 14
| false
| true
| 0
| 6
| 10
| 24
| 11
| 13
| null | null |
bens/libmpd-haskell
|
src/Network/MPD/Applicative/Internal.hs
|
lgpl-2.1
|
emptyResponse :: Parser ()
emptyResponse = do
r <- getResponse
unless (null r) $
unexpected r
-- | Fail with unexpected response.
| 146
|
emptyResponse :: Parser ()
emptyResponse = do
r <- getResponse
unless (null r) $
unexpected r
-- | Fail with unexpected response.
| 146
|
emptyResponse = do
r <- getResponse
unless (null r) $
unexpected r
-- | Fail with unexpected response.
| 119
| false
| true
| 0
| 10
| 38
| 43
| 20
| 23
| null | null |
quyse/flaw
|
flaw-base/Flaw/Book.hs
|
mit
|
withSpecialBook :: (Book -> IO a) -> IO (a, IO ())
withSpecialBook f = do
bk <- newBook
r <- onException (f bk) (freeBook bk)
return (r, freeBook bk)
| 155
|
withSpecialBook :: (Book -> IO a) -> IO (a, IO ())
withSpecialBook f = do
bk <- newBook
r <- onException (f bk) (freeBook bk)
return (r, freeBook bk)
| 155
|
withSpecialBook f = do
bk <- newBook
r <- onException (f bk) (freeBook bk)
return (r, freeBook bk)
| 104
| false
| true
| 0
| 11
| 34
| 92
| 43
| 49
| null | null |
beijaflor-io/haskell-language-dockerfile
|
src/Language/Dockerfile/Rules.hs
|
gpl-3.0
|
noRootUser = instructionRule code severity message check
where code = "DL3002"
severity = ErrorC
message = "Do not switch to root USER"
check (User "root") = False
check (User _) = True
check _ = True
| 254
|
noRootUser = instructionRule code severity message check
where code = "DL3002"
severity = ErrorC
message = "Do not switch to root USER"
check (User "root") = False
check (User _) = True
check _ = True
| 254
|
noRootUser = instructionRule code severity message check
where code = "DL3002"
severity = ErrorC
message = "Do not switch to root USER"
check (User "root") = False
check (User _) = True
check _ = True
| 254
| false
| false
| 5
| 7
| 89
| 72
| 35
| 37
| null | null |
GaloisInc/saw-script
|
src/SAWScript/Crucible/Common/Override.hs
|
bsd-3-clause
|
runOverrideMatcher ::
Monad m =>
sym {- ^ simulator -} ->
Crucible.SymGlobalState sym {- ^ initial global variables -} ->
Map AllocIndex (Pointer' ext sym) {- ^ initial allocation substitution -} ->
Map VarIndex Term {- ^ initial term substitution -} ->
Set VarIndex {- ^ initial free variables -} ->
W4.ProgramLoc {- ^ override location information -} ->
OverrideMatcher' sym ext md m a {- ^ matching action -} ->
m (Either (OverrideFailure ext) (a, OverrideState' sym ext))
runOverrideMatcher sym g a t free loc (OM m) =
runExceptT (runStateT m (initialState sym g a t free loc))
| 735
|
runOverrideMatcher ::
Monad m =>
sym {- ^ simulator -} ->
Crucible.SymGlobalState sym {- ^ initial global variables -} ->
Map AllocIndex (Pointer' ext sym) {- ^ initial allocation substitution -} ->
Map VarIndex Term {- ^ initial term substitution -} ->
Set VarIndex {- ^ initial free variables -} ->
W4.ProgramLoc {- ^ override location information -} ->
OverrideMatcher' sym ext md m a {- ^ matching action -} ->
m (Either (OverrideFailure ext) (a, OverrideState' sym ext))
runOverrideMatcher sym g a t free loc (OM m) =
runExceptT (runStateT m (initialState sym g a t free loc))
| 735
|
runOverrideMatcher sym g a t free loc (OM m) =
runExceptT (runStateT m (initialState sym g a t free loc))
| 107
| false
| true
| 0
| 17
| 252
| 168
| 84
| 84
| null | null |
tonyfloatersu/solution-haskell-craft-of-FP
|
Chapter_10_my_note.hs
|
mit
|
getLine len f (x : xs)
| f x <= len = x : getLine (len - f x - 1) f xs
| otherwise = []
| 102
|
getLine len f (x : xs)
| f x <= len = x : getLine (len - f x - 1) f xs
| otherwise = []
| 102
|
getLine len f (x : xs)
| f x <= len = x : getLine (len - f x - 1) f xs
| otherwise = []
| 102
| false
| false
| 2
| 9
| 41
| 76
| 33
| 43
| null | null |
naoto-ogawa/h-xproto-mysql
|
src/DataBase/MySQLX/ExprParser.hs
|
mit
|
-- from https://stackoverflow.com/a/24106749
escape :: Char -> Parser String
escape l = do
d <- char '\\'
c <- oneOf $ l : "\\\"0nrvtbf" -- all the characters which can be escaped
return [d, c]
| 205
|
escape :: Char -> Parser String
escape l = do
d <- char '\\'
c <- oneOf $ l : "\\\"0nrvtbf" -- all the characters which can be escaped
return [d, c]
| 160
|
escape l = do
d <- char '\\'
c <- oneOf $ l : "\\\"0nrvtbf" -- all the characters which can be escaped
return [d, c]
| 128
| true
| true
| 0
| 9
| 46
| 60
| 29
| 31
| null | null |
sinelaw/stackage
|
Stackage/Util.hs
|
mit
|
getModifiedEnv :: BuildSettings -> IO [(String, String)]
getModifiedEnv settings = do
fmap (map $ fixEnv $ binDir settings) getEnvironment
where
fixEnv :: FilePath -> (String, String) -> (String, String)
fixEnv bin (p, x)
-- Thank you Windows having case-insensitive environment variables...
| map toUpper p == "PATH" = (p, bin ++ pathSep : x)
| otherwise = (p, x)
-- | Separate for the PATH environment variable
pathSep :: Char
#ifdef mingw32_HOST_OS
pathSep = ';'
#else
pathSep = ':'
#endif
-- | Minor fixes, such as making paths absolute.
--
-- Note: creates the sandbox root in the process.
| 650
|
getModifiedEnv :: BuildSettings -> IO [(String, String)]
getModifiedEnv settings = do
fmap (map $ fixEnv $ binDir settings) getEnvironment
where
fixEnv :: FilePath -> (String, String) -> (String, String)
fixEnv bin (p, x)
-- Thank you Windows having case-insensitive environment variables...
| map toUpper p == "PATH" = (p, bin ++ pathSep : x)
| otherwise = (p, x)
-- | Separate for the PATH environment variable
pathSep :: Char
#ifdef mingw32_HOST_OS
pathSep = ';'
#else
pathSep = ':'
#endif
-- | Minor fixes, such as making paths absolute.
--
-- Note: creates the sandbox root in the process.
| 650
|
getModifiedEnv settings = do
fmap (map $ fixEnv $ binDir settings) getEnvironment
where
fixEnv :: FilePath -> (String, String) -> (String, String)
fixEnv bin (p, x)
-- Thank you Windows having case-insensitive environment variables...
| map toUpper p == "PATH" = (p, bin ++ pathSep : x)
| otherwise = (p, x)
-- | Separate for the PATH environment variable
pathSep :: Char
#ifdef mingw32_HOST_OS
pathSep = ';'
#else
pathSep = ':'
#endif
-- | Minor fixes, such as making paths absolute.
--
-- Note: creates the sandbox root in the process.
| 593
| false
| true
| 0
| 10
| 154
| 175
| 91
| 84
| null | null |
jeffreyrosenbluth/flourine
|
src/Fluorine/HTML.hs
|
bsd-3-clause
|
rt :: [A.Attr i] -> [HTML i] -> HTML i
rt xs = element (tagName "rt") xs
| 72
|
rt :: [A.Attr i] -> [HTML i] -> HTML i
rt xs = element (tagName "rt") xs
| 72
|
rt xs = element (tagName "rt") xs
| 33
| false
| true
| 0
| 9
| 16
| 56
| 25
| 31
| null | null |
koengit/symbo
|
Main.hs
|
bsd-2-clause
|
sR = Cons "R" [stratT,stratT] stratT
| 45
|
sR = Cons "R" [stratT,stratT] stratT
| 45
|
sR = Cons "R" [stratT,stratT] stratT
| 45
| false
| false
| 1
| 6
| 14
| 23
| 10
| 13
| null | null |
michiexile/hplex
|
pershom/src/Math/Simplicial/LandmarkSelection.hs
|
bsd-3-clause
|
numLandmarks :: LandmarkSelection a -> Int
numLandmarks = V.length . landmarks
| 78
|
numLandmarks :: LandmarkSelection a -> Int
numLandmarks = V.length . landmarks
| 78
|
numLandmarks = V.length . landmarks
| 35
| false
| true
| 0
| 6
| 10
| 24
| 12
| 12
| null | null |
mainland/dph
|
dph-prim-interface/Data/Array/Parallel/Unlifted.hs
|
bsd-3-clause
|
isContiguousSSegd = notImplemented "isContiguousSSegd"
| 68
|
isContiguousSSegd = notImplemented "isContiguousSSegd"
| 68
|
isContiguousSSegd = notImplemented "isContiguousSSegd"
| 68
| false
| false
| 0
| 5
| 17
| 9
| 4
| 5
| null | null |
brendanhay/gogol
|
gogol-securitycenter/gen/Network/Google/SecurityCenter/Types/Product.hs
|
mpl-2.0
|
-- | The relative resource name of the SecurityMarks. See:
-- https:\/\/cloud.google.com\/apis\/design\/resource_names#relative_resource_name
-- Examples:
-- \"organizations\/{organization_id}\/assets\/{asset_id}\/securityMarks\"
-- \"organizations\/{organization_id}\/sources\/{source_id}\/findings\/{finding_id}\/securityMarks\".
smName :: Lens' SecurityMarks (Maybe Text)
smName = lens _smName (\ s a -> s{_smName = a})
| 422
|
smName :: Lens' SecurityMarks (Maybe Text)
smName = lens _smName (\ s a -> s{_smName = a})
| 90
|
smName = lens _smName (\ s a -> s{_smName = a})
| 47
| true
| true
| 0
| 9
| 34
| 50
| 29
| 21
| null | null |
phaazon/OpenGLRaw
|
src/Graphics/Rendering/OpenGL/Raw/Tokens.hs
|
bsd-3-clause
|
gl_DEBUG_TYPE_PUSH_GROUP :: GLenum
gl_DEBUG_TYPE_PUSH_GROUP = 0x8269
| 68
|
gl_DEBUG_TYPE_PUSH_GROUP :: GLenum
gl_DEBUG_TYPE_PUSH_GROUP = 0x8269
| 68
|
gl_DEBUG_TYPE_PUSH_GROUP = 0x8269
| 33
| false
| true
| 0
| 4
| 5
| 11
| 6
| 5
| null | null |
ChrisLane/leksah
|
src/IDE/Metainfo/Provider.hs
|
gpl-2.0
|
injectSourceInPack (Just pp) pd = pd{
pdMbSourcePath = Just pp,
pdModules = map (injectSourceInMod (Just (dropFileName pp))) (pdModules pd)}
| 153
|
injectSourceInPack (Just pp) pd = pd{
pdMbSourcePath = Just pp,
pdModules = map (injectSourceInMod (Just (dropFileName pp))) (pdModules pd)}
| 153
|
injectSourceInPack (Just pp) pd = pd{
pdMbSourcePath = Just pp,
pdModules = map (injectSourceInMod (Just (dropFileName pp))) (pdModules pd)}
| 153
| false
| false
| 0
| 13
| 31
| 63
| 32
| 31
| null | null |
lostbean/Hammer
|
profile/TestGrainFinder.hs
|
gpl-3.0
|
test_checkPosBound :: VoxBoxRange -> VoxelPos -> Property
test_checkPosBound vbr vp@(VoxelPos x y z) =
checkPosBound vbr vp ==>
let (VoxBoxDim dx dy dz) = vbrDim vbr
in abs (dx*dy*dz) >= vbr %@ vp
| 202
|
test_checkPosBound :: VoxBoxRange -> VoxelPos -> Property
test_checkPosBound vbr vp@(VoxelPos x y z) =
checkPosBound vbr vp ==>
let (VoxBoxDim dx dy dz) = vbrDim vbr
in abs (dx*dy*dz) >= vbr %@ vp
| 202
|
test_checkPosBound vbr vp@(VoxelPos x y z) =
checkPosBound vbr vp ==>
let (VoxBoxDim dx dy dz) = vbrDim vbr
in abs (dx*dy*dz) >= vbr %@ vp
| 144
| false
| true
| 2
| 11
| 38
| 100
| 47
| 53
| null | null |
jozefg/hasquito
|
src/Language/Hasquito/JSify.hs
|
mit
|
prim :: S.Op -> Expr -> Expr -> CodeGenM [Stmt]
prim op l r = sequence [ pushArg r
, ExprName <$> opCont op >>= pushCont
, eval >>= pushCont
, enter l]
| 220
|
prim :: S.Op -> Expr -> Expr -> CodeGenM [Stmt]
prim op l r = sequence [ pushArg r
, ExprName <$> opCont op >>= pushCont
, eval >>= pushCont
, enter l]
| 220
|
prim op l r = sequence [ pushArg r
, ExprName <$> opCont op >>= pushCont
, eval >>= pushCont
, enter l]
| 172
| false
| true
| 0
| 9
| 101
| 74
| 37
| 37
| null | null |
brendanhay/gogol
|
gogol-youtube-reporting/gen/Network/Google/YouTubeReporting/Types/Product.hs
|
mpl-2.0
|
-- | The date\/time when this report type was\/will be deprecated.
rtDeprecateTime :: Lens' ReportType (Maybe UTCTime)
rtDeprecateTime
= lens _rtDeprecateTime
(\ s a -> s{_rtDeprecateTime = a})
. mapping _DateTime
| 227
|
rtDeprecateTime :: Lens' ReportType (Maybe UTCTime)
rtDeprecateTime
= lens _rtDeprecateTime
(\ s a -> s{_rtDeprecateTime = a})
. mapping _DateTime
| 160
|
rtDeprecateTime
= lens _rtDeprecateTime
(\ s a -> s{_rtDeprecateTime = a})
. mapping _DateTime
| 108
| true
| true
| 1
| 8
| 44
| 57
| 28
| 29
| null | null |
yggr/hit
|
src/Envi/Readers/EnviFileReader.hs
|
bsd-3-clause
|
listValueParser :: Parsec String () [String]
listValueParser = between (spaces >> char '{' >> spaces) (char '}') $ val `sepBy1` valueSeparator >>= return
| 153
|
listValueParser :: Parsec String () [String]
listValueParser = between (spaces >> char '{' >> spaces) (char '}') $ val `sepBy1` valueSeparator >>= return
| 153
|
listValueParser = between (spaces >> char '{' >> spaces) (char '}') $ val `sepBy1` valueSeparator >>= return
| 108
| false
| true
| 0
| 12
| 22
| 62
| 32
| 30
| null | null |
scott-fleischman/greek-grammar
|
haskell/greek-grammar/src/Data/Unicode/DecomposeChar.hs
|
mit
|
decomposeChar '\x2F966' = "\x7CD2"
| 34
|
decomposeChar '\x2F966' = "\x7CD2"
| 34
|
decomposeChar '\x2F966' = "\x7CD2"
| 34
| false
| false
| 0
| 4
| 3
| 10
| 4
| 6
| null | null |
hth313/hthforth
|
src/Util/Memory.hs
|
bsd-2-clause
|
read32 :: Address a => a -> Memory a -> Maybe Word32
read32 adr mem = toValue 4 mem <$> (sequence $ map fetch [0..3])
where fetch n = read8 (addAddress adr n) mem
| 166
|
read32 :: Address a => a -> Memory a -> Maybe Word32
read32 adr mem = toValue 4 mem <$> (sequence $ map fetch [0..3])
where fetch n = read8 (addAddress adr n) mem
| 166
|
read32 adr mem = toValue 4 mem <$> (sequence $ map fetch [0..3])
where fetch n = read8 (addAddress adr n) mem
| 113
| false
| true
| 1
| 9
| 37
| 96
| 42
| 54
| null | null |
christiaanb/ghc
|
compiler/types/Type.hs
|
bsd-3-clause
|
eqTyVarBndrs _ _ _= Nothing
| 27
|
eqTyVarBndrs _ _ _= Nothing
| 27
|
eqTyVarBndrs _ _ _= Nothing
| 27
| false
| false
| 1
| 5
| 4
| 14
| 5
| 9
| null | null |
brendanhay/gogol
|
gogol-logging/gen/Network/Google/Resource/Logging/Organizations/Exclusions/Get.hs
|
mpl-2.0
|
-- | Creates a value of 'OrganizationsExclusionsGet' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'oegXgafv'
--
-- * 'oegUploadProtocol'
--
-- * 'oegAccessToken'
--
-- * 'oegUploadType'
--
-- * 'oegName'
--
-- * 'oegCallback'
organizationsExclusionsGet
:: Text -- ^ 'oegName'
-> OrganizationsExclusionsGet
organizationsExclusionsGet pOegName_ =
OrganizationsExclusionsGet'
{ _oegXgafv = Nothing
, _oegUploadProtocol = Nothing
, _oegAccessToken = Nothing
, _oegUploadType = Nothing
, _oegName = pOegName_
, _oegCallback = Nothing
}
| 656
|
organizationsExclusionsGet
:: Text -- ^ 'oegName'
-> OrganizationsExclusionsGet
organizationsExclusionsGet pOegName_ =
OrganizationsExclusionsGet'
{ _oegXgafv = Nothing
, _oegUploadProtocol = Nothing
, _oegAccessToken = Nothing
, _oegUploadType = Nothing
, _oegName = pOegName_
, _oegCallback = Nothing
}
| 342
|
organizationsExclusionsGet pOegName_ =
OrganizationsExclusionsGet'
{ _oegXgafv = Nothing
, _oegUploadProtocol = Nothing
, _oegAccessToken = Nothing
, _oegUploadType = Nothing
, _oegName = pOegName_
, _oegCallback = Nothing
}
| 254
| true
| true
| 0
| 6
| 128
| 72
| 50
| 22
| null | null |
AlephAlpha/Samau
|
OldSamau/Eval.hs
|
gpl-2.0
|
builtins = M.fromList [('!', smPop),
('#', smSize),
('$', smSwap),
('%', smMod),
('&', smAnd),
('(', smPred),
(')', smSucc),
('*', smTimes),
('+', smAdd),
(',', smRange0),
('-', smMinus),
('.', smJoin),
('/', smDivide),
(':', smCons),
(';', smDup),
('<', smLess),
('=', smSame),
('>', smGreater),
('?', smIf),
('@', smRoll),
('A', smAnswer),
('B', smFromBase),
('D', smToBase),
('E', smE),
('F', smFoldList),
('G', smFold1List),
('N', smNaturals),
('O', smPi),
('P', smPrimes),
('W', smNestList),
('Y', smFixedPointList),
('\\', smUncons),
('^', smPower),
('_', smNegative),
('c', smTake),
('d', smDip),
('e', smDrop),
('f', smFold),
('g', smFold1),
('i', smI),
('m', smMap),
('o', smOuter),
('s', smFilter),
('t', smTwice),
('x', smX),
('w', smNest),
('y', smFixedPoint),
('z', smZipWith),
('{', smUnstack),
('|', smOr),
('}', smStack),
('~', smNot),
('Ξ', smAbs),
('Ξ', smDiff),
('Ξ', smExp),
('Ξ', smLog),
('Ξ ', smProduct),
('Ξ£', smSum),
('Ξ¦', smFactor),
('Ξ³', smGcd),
('Ξ»', smLcm),
('Ξ½', smNthPrime),
('ΞΎ', smMin),
('ΞΏ', smMax),
('Ο', smPrimePi),
('Ο', smDivisorSigma),
('Ο', smEulerPhi),
('β', smToInt),
('β', smToFloat),
('β', smToChar),
('β', smDivisible),
('β‘', smIndex),
('β’', smElem),
('β', smTail),
('β', smHead),
('β£', smSubsets),
('β', smReverse),
('β', smTails),
('β', smIntersperse),
('β', smSort),
('β', smNub),
('β', smFloor),
('β', smRound),
('β', smPosition),
('β', smConcat),
('β', smInits),
('β¦', smRotate),
('β ', smPermutations),
('β', smEq),
('β§', smCycle),
('β', smLast),
('β', smInit),
('β', smCeiling),
('β', smToString),
('β', smToList),
('β', smReadOneNumber),
('β', smReadNumbers),
('Ξ', smBitAnd),
('Ξ', smBitOr),
('Ξ', smBitXor),
('Ξ', smBitNot),
('Β±', smSign),
('β₯', smGreaterEq),
('β€', smLessEq),
('Γ·', smDiv),
('β', smConvolve),
('Β·', smDot),
('β', smSqrt),
('Β²', smIsSquare),
('βΏ', smConvPower)]
| 4,337
|
builtins = M.fromList [('!', smPop),
('#', smSize),
('$', smSwap),
('%', smMod),
('&', smAnd),
('(', smPred),
(')', smSucc),
('*', smTimes),
('+', smAdd),
(',', smRange0),
('-', smMinus),
('.', smJoin),
('/', smDivide),
(':', smCons),
(';', smDup),
('<', smLess),
('=', smSame),
('>', smGreater),
('?', smIf),
('@', smRoll),
('A', smAnswer),
('B', smFromBase),
('D', smToBase),
('E', smE),
('F', smFoldList),
('G', smFold1List),
('N', smNaturals),
('O', smPi),
('P', smPrimes),
('W', smNestList),
('Y', smFixedPointList),
('\\', smUncons),
('^', smPower),
('_', smNegative),
('c', smTake),
('d', smDip),
('e', smDrop),
('f', smFold),
('g', smFold1),
('i', smI),
('m', smMap),
('o', smOuter),
('s', smFilter),
('t', smTwice),
('x', smX),
('w', smNest),
('y', smFixedPoint),
('z', smZipWith),
('{', smUnstack),
('|', smOr),
('}', smStack),
('~', smNot),
('Ξ', smAbs),
('Ξ', smDiff),
('Ξ', smExp),
('Ξ', smLog),
('Ξ ', smProduct),
('Ξ£', smSum),
('Ξ¦', smFactor),
('Ξ³', smGcd),
('Ξ»', smLcm),
('Ξ½', smNthPrime),
('ΞΎ', smMin),
('ΞΏ', smMax),
('Ο', smPrimePi),
('Ο', smDivisorSigma),
('Ο', smEulerPhi),
('β', smToInt),
('β', smToFloat),
('β', smToChar),
('β', smDivisible),
('β‘', smIndex),
('β’', smElem),
('β', smTail),
('β', smHead),
('β£', smSubsets),
('β', smReverse),
('β', smTails),
('β', smIntersperse),
('β', smSort),
('β', smNub),
('β', smFloor),
('β', smRound),
('β', smPosition),
('β', smConcat),
('β', smInits),
('β¦', smRotate),
('β ', smPermutations),
('β', smEq),
('β§', smCycle),
('β', smLast),
('β', smInit),
('β', smCeiling),
('β', smToString),
('β', smToList),
('β', smReadOneNumber),
('β', smReadNumbers),
('Ξ', smBitAnd),
('Ξ', smBitOr),
('Ξ', smBitXor),
('Ξ', smBitNot),
('Β±', smSign),
('β₯', smGreaterEq),
('β€', smLessEq),
('Γ·', smDiv),
('β', smConvolve),
('Β·', smDot),
('β', smSqrt),
('Β²', smIsSquare),
('βΏ', smConvPower)]
| 4,337
|
builtins = M.fromList [('!', smPop),
('#', smSize),
('$', smSwap),
('%', smMod),
('&', smAnd),
('(', smPred),
(')', smSucc),
('*', smTimes),
('+', smAdd),
(',', smRange0),
('-', smMinus),
('.', smJoin),
('/', smDivide),
(':', smCons),
(';', smDup),
('<', smLess),
('=', smSame),
('>', smGreater),
('?', smIf),
('@', smRoll),
('A', smAnswer),
('B', smFromBase),
('D', smToBase),
('E', smE),
('F', smFoldList),
('G', smFold1List),
('N', smNaturals),
('O', smPi),
('P', smPrimes),
('W', smNestList),
('Y', smFixedPointList),
('\\', smUncons),
('^', smPower),
('_', smNegative),
('c', smTake),
('d', smDip),
('e', smDrop),
('f', smFold),
('g', smFold1),
('i', smI),
('m', smMap),
('o', smOuter),
('s', smFilter),
('t', smTwice),
('x', smX),
('w', smNest),
('y', smFixedPoint),
('z', smZipWith),
('{', smUnstack),
('|', smOr),
('}', smStack),
('~', smNot),
('Ξ', smAbs),
('Ξ', smDiff),
('Ξ', smExp),
('Ξ', smLog),
('Ξ ', smProduct),
('Ξ£', smSum),
('Ξ¦', smFactor),
('Ξ³', smGcd),
('Ξ»', smLcm),
('Ξ½', smNthPrime),
('ΞΎ', smMin),
('ΞΏ', smMax),
('Ο', smPrimePi),
('Ο', smDivisorSigma),
('Ο', smEulerPhi),
('β', smToInt),
('β', smToFloat),
('β', smToChar),
('β', smDivisible),
('β‘', smIndex),
('β’', smElem),
('β', smTail),
('β', smHead),
('β£', smSubsets),
('β', smReverse),
('β', smTails),
('β', smIntersperse),
('β', smSort),
('β', smNub),
('β', smFloor),
('β', smRound),
('β', smPosition),
('β', smConcat),
('β', smInits),
('β¦', smRotate),
('β ', smPermutations),
('β', smEq),
('β§', smCycle),
('β', smLast),
('β', smInit),
('β', smCeiling),
('β', smToString),
('β', smToList),
('β', smReadOneNumber),
('β', smReadNumbers),
('Ξ', smBitAnd),
('Ξ', smBitOr),
('Ξ', smBitXor),
('Ξ', smBitNot),
('Β±', smSign),
('β₯', smGreaterEq),
('β€', smLessEq),
('Γ·', smDiv),
('β', smConvolve),
('Β·', smDot),
('β', smSqrt),
('Β²', smIsSquare),
('βΏ', smConvPower)]
| 4,337
| false
| false
| 0
| 7
| 2,729
| 1,001
| 665
| 336
| null | null |
ambiata/tatooine-cli
|
main/ambiata-daemon.hs
|
apache-2.0
|
main :: IO ()
main = do
hSetBuffering stdout LineBuffering
hSetBuffering stderr LineBuffering
logh <- streamHandler stdout DEBUG >>= \h ->
pure $ setFormatter h logFmt
updateGlobalLogger rootLoggerName (setHandlers [logh])
dispatch cli >>= \case
VersionCommand -> putStrLn ("ambiata-daemon: " <> buildInfoVersion) >> exitSuccess
RunCommand DryRun c -> print c >> exitSuccess
RunCommand RealRun c -> run c
where cli = safeCommand cmd
logFmt = simpleLogFormatter "$utcTime - $prio - $msg"
| 531
|
main :: IO ()
main = do
hSetBuffering stdout LineBuffering
hSetBuffering stderr LineBuffering
logh <- streamHandler stdout DEBUG >>= \h ->
pure $ setFormatter h logFmt
updateGlobalLogger rootLoggerName (setHandlers [logh])
dispatch cli >>= \case
VersionCommand -> putStrLn ("ambiata-daemon: " <> buildInfoVersion) >> exitSuccess
RunCommand DryRun c -> print c >> exitSuccess
RunCommand RealRun c -> run c
where cli = safeCommand cmd
logFmt = simpleLogFormatter "$utcTime - $prio - $msg"
| 531
|
main = do
hSetBuffering stdout LineBuffering
hSetBuffering stderr LineBuffering
logh <- streamHandler stdout DEBUG >>= \h ->
pure $ setFormatter h logFmt
updateGlobalLogger rootLoggerName (setHandlers [logh])
dispatch cli >>= \case
VersionCommand -> putStrLn ("ambiata-daemon: " <> buildInfoVersion) >> exitSuccess
RunCommand DryRun c -> print c >> exitSuccess
RunCommand RealRun c -> run c
where cli = safeCommand cmd
logFmt = simpleLogFormatter "$utcTime - $prio - $msg"
| 517
| false
| true
| 1
| 14
| 114
| 162
| 74
| 88
| null | null |
input-output-hk/pos-haskell-prototype
|
node/test/Translation.hs
|
mit
|
oAbs1 = Abs.Output
{ outAddr = addr
, outVal = val
, outRepartition = rep
}
where
addr = addrs !! 1
val = 5 :: DSL.Value
Right rep = mkRepartitionT (error "This shouldn't happen") [(addr, val)]
| 254
|
oAbs1 = Abs.Output
{ outAddr = addr
, outVal = val
, outRepartition = rep
}
where
addr = addrs !! 1
val = 5 :: DSL.Value
Right rep = mkRepartitionT (error "This shouldn't happen") [(addr, val)]
| 254
|
oAbs1 = Abs.Output
{ outAddr = addr
, outVal = val
, outRepartition = rep
}
where
addr = addrs !! 1
val = 5 :: DSL.Value
Right rep = mkRepartitionT (error "This shouldn't happen") [(addr, val)]
| 254
| false
| false
| 3
| 6
| 97
| 80
| 44
| 36
| null | null |
spechub/Hets
|
GUI/HTkGenericATP.hs
|
gpl-2.0
|
{- |
Generates a ('ProofStatusColour', 'String') tuple representing a Proved proof
status.
-}
statusProved :: (ProofStatusColour, String)
statusProved = (Green, "Proved")
| 174
|
statusProved :: (ProofStatusColour, String)
statusProved = (Green, "Proved")
| 76
|
statusProved = (Green, "Proved")
| 32
| true
| true
| 0
| 5
| 24
| 24
| 15
| 9
| null | null |
spechub/Hets
|
Maude/Maude2DG.hs
|
gpl-2.0
|
incPredImpME :: ModExp -> DGraph -> UpdtPredefs -> UpdtPredefs
incPredImpME (ModExp m_id) pdg (ptim, tim, dg) = up where
ModId q = m_id
q' = mkFreeName q
up = if Map.member q ptim then let
(n, sg1, sys1, tts1, ps1) = ptim Map.! q
(n', sg2, sys2, tts2, ps2) = ptim Map.! q'
refInfo = newRefInfo preludeLib n
refInfo' = newRefInfo preludeLib n'
ptim1 = Map.delete q ptim
ptim2 = Map.delete q' ptim1
ext_sg1 = makeExtSign Maude sg1
gt1 = maudeTheory ext_sg1 startSigId noSens startThId
name1 = makeName $ simpleIdToIRI q
new = newInfoNodeLab name1 refInfo gt1
newNode = getNewNodeDG dg
refLab = labDG pdg n
nodeCont = new { globalTheory = globalTheory refLab }
-- (ns1, dg1) = insGTheory dg name1 DGBasic gt1
dg1 = insNodeDG (newNode, nodeCont) dg
ext_sg2 = makeExtSign Maude sg2
gt2 = maudeTheory ext_sg2 startSigId noSens startThId
name2 = makeName $ simpleIdToIRI q'
new' = newInfoNodeLab name2 refInfo' gt2
newNode' = getNewNodeDG dg1
refLab' = labDG pdg n'
nodeCont' = new' { globalTheory = globalTheory refLab' }
-- (ns2, dg2) = insGTheory dg1 name2 DGBasic gt2
dg2 = insNodeDG (newNode', nodeCont') dg1
tim1 = Map.insert q (newNode, sg1, sys1, tts1, ps1) tim
tim2 = Map.insert q' (newNode', sg2, sys2, tts2, ps2) tim1
in (ptim2, tim2, dg2)
else (ptim, tim, dg)
| 1,520
|
incPredImpME :: ModExp -> DGraph -> UpdtPredefs -> UpdtPredefs
incPredImpME (ModExp m_id) pdg (ptim, tim, dg) = up where
ModId q = m_id
q' = mkFreeName q
up = if Map.member q ptim then let
(n, sg1, sys1, tts1, ps1) = ptim Map.! q
(n', sg2, sys2, tts2, ps2) = ptim Map.! q'
refInfo = newRefInfo preludeLib n
refInfo' = newRefInfo preludeLib n'
ptim1 = Map.delete q ptim
ptim2 = Map.delete q' ptim1
ext_sg1 = makeExtSign Maude sg1
gt1 = maudeTheory ext_sg1 startSigId noSens startThId
name1 = makeName $ simpleIdToIRI q
new = newInfoNodeLab name1 refInfo gt1
newNode = getNewNodeDG dg
refLab = labDG pdg n
nodeCont = new { globalTheory = globalTheory refLab }
-- (ns1, dg1) = insGTheory dg name1 DGBasic gt1
dg1 = insNodeDG (newNode, nodeCont) dg
ext_sg2 = makeExtSign Maude sg2
gt2 = maudeTheory ext_sg2 startSigId noSens startThId
name2 = makeName $ simpleIdToIRI q'
new' = newInfoNodeLab name2 refInfo' gt2
newNode' = getNewNodeDG dg1
refLab' = labDG pdg n'
nodeCont' = new' { globalTheory = globalTheory refLab' }
-- (ns2, dg2) = insGTheory dg1 name2 DGBasic gt2
dg2 = insNodeDG (newNode', nodeCont') dg1
tim1 = Map.insert q (newNode, sg1, sys1, tts1, ps1) tim
tim2 = Map.insert q' (newNode', sg2, sys2, tts2, ps2) tim1
in (ptim2, tim2, dg2)
else (ptim, tim, dg)
| 1,520
|
incPredImpME (ModExp m_id) pdg (ptim, tim, dg) = up where
ModId q = m_id
q' = mkFreeName q
up = if Map.member q ptim then let
(n, sg1, sys1, tts1, ps1) = ptim Map.! q
(n', sg2, sys2, tts2, ps2) = ptim Map.! q'
refInfo = newRefInfo preludeLib n
refInfo' = newRefInfo preludeLib n'
ptim1 = Map.delete q ptim
ptim2 = Map.delete q' ptim1
ext_sg1 = makeExtSign Maude sg1
gt1 = maudeTheory ext_sg1 startSigId noSens startThId
name1 = makeName $ simpleIdToIRI q
new = newInfoNodeLab name1 refInfo gt1
newNode = getNewNodeDG dg
refLab = labDG pdg n
nodeCont = new { globalTheory = globalTheory refLab }
-- (ns1, dg1) = insGTheory dg name1 DGBasic gt1
dg1 = insNodeDG (newNode, nodeCont) dg
ext_sg2 = makeExtSign Maude sg2
gt2 = maudeTheory ext_sg2 startSigId noSens startThId
name2 = makeName $ simpleIdToIRI q'
new' = newInfoNodeLab name2 refInfo' gt2
newNode' = getNewNodeDG dg1
refLab' = labDG pdg n'
nodeCont' = new' { globalTheory = globalTheory refLab' }
-- (ns2, dg2) = insGTheory dg1 name2 DGBasic gt2
dg2 = insNodeDG (newNode', nodeCont') dg1
tim1 = Map.insert q (newNode, sg1, sys1, tts1, ps1) tim
tim2 = Map.insert q' (newNode', sg2, sys2, tts2, ps2) tim1
in (ptim2, tim2, dg2)
else (ptim, tim, dg)
| 1,457
| false
| true
| 0
| 12
| 470
| 461
| 250
| 211
| null | null |
gcampax/ghc
|
compiler/prelude/TysPrim.hs
|
bsd-3-clause
|
mutableArrayArrayPrimTyConName= mkPrimTc (fsLit "MutableArrayArray#") mutableArrayArrayPrimTyConKey mutableArrayArrayPrimTyCon
| 126
|
mutableArrayArrayPrimTyConName= mkPrimTc (fsLit "MutableArrayArray#") mutableArrayArrayPrimTyConKey mutableArrayArrayPrimTyCon
| 126
|
mutableArrayArrayPrimTyConName= mkPrimTc (fsLit "MutableArrayArray#") mutableArrayArrayPrimTyConKey mutableArrayArrayPrimTyCon
| 126
| false
| false
| 0
| 7
| 5
| 19
| 9
| 10
| null | null |
mightymoose/liquidhaskell
|
src/Language/Haskell/Liquid/Fresh.hs
|
bsd-3-clause
|
refreshRef (RProp s t) = RProp <$> mapM freshSym s <*> refreshRefType t
| 71
|
refreshRef (RProp s t) = RProp <$> mapM freshSym s <*> refreshRefType t
| 71
|
refreshRef (RProp s t) = RProp <$> mapM freshSym s <*> refreshRefType t
| 71
| false
| false
| 0
| 7
| 12
| 33
| 15
| 18
| null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.