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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ocramz/petsc-hs | src/Numerical/PETSc/Internal/PutGet/SlepcMisc.hs | gpl-3.0 | slepcFin :: IO ()
slepcFin =
chk0 slepcFin' >> putStrLn ("\nSLEPc : finalized\n" ++ sep) | 90 | slepcFin :: IO ()
slepcFin =
chk0 slepcFin' >> putStrLn ("\nSLEPc : finalized\n" ++ sep) | 90 | slepcFin =
chk0 slepcFin' >> putStrLn ("\nSLEPc : finalized\n" ++ sep) | 72 | false | true | 0 | 8 | 16 | 33 | 16 | 17 | null | null |
dysinger/amazonka | amazonka-ecs/gen/Network/AWS/ECS/ListContainerInstances.hs | mpl-2.0 | -- | 'ListContainerInstancesResponse' constructor.
--
-- The fields accessible through corresponding lenses are:
--
-- * 'lcirContainerInstanceArns' @::@ ['Text']
--
-- * 'lcirNextToken' @::@ 'Maybe' 'Text'
--
listContainerInstancesResponse :: ListContainerInstancesResponse
listContainerInstancesResponse = ListContainerInstancesResponse
{ _lcirContainerInstanceArns = mempty
, _lcirNextToken = Nothing
} | 429 | listContainerInstancesResponse :: ListContainerInstancesResponse
listContainerInstancesResponse = ListContainerInstancesResponse
{ _lcirContainerInstanceArns = mempty
, _lcirNextToken = Nothing
} | 219 | listContainerInstancesResponse = ListContainerInstancesResponse
{ _lcirContainerInstanceArns = mempty
, _lcirNextToken = Nothing
} | 154 | true | true | 0 | 7 | 65 | 43 | 25 | 18 | null | null |
hvr/jhc | src/Doc/Chars.hs | mit | plus = char $ chr 0x253C | 28 | plus = char $ chr 0x253C | 28 | plus = char $ chr 0x253C | 28 | false | false | 0 | 6 | 9 | 13 | 6 | 7 | null | null |
momomimachli/Hedsql | src/Database/Hedsql/Common/Constructor.hs | gpl-3.0 | dropTableIfExists ::
ToTable a (Table dbVendor)
=> a -- ^ Table to drop.
-> Drop dbVendor
dropTableIfExists = DropTable True . table | 152 | dropTableIfExists ::
ToTable a (Table dbVendor)
=> a -- ^ Table to drop.
-> Drop dbVendor
dropTableIfExists = DropTable True . table | 152 | dropTableIfExists = DropTable True . table | 42 | false | true | 0 | 9 | 41 | 43 | 20 | 23 | null | null |
da-x/buildsome | src/Buildsome.hs | gpl-2.0 | buildExplicitWithParReleased ::
BuildTargetEnv -> Parallelism.Entity -> [SlaveRequest] ->
IO (ExplicitPathsBuilt, BuiltTargets)
buildExplicitWithParReleased bte@BuildTargetEnv{..} entity inputs = do
built <-
waitForSlavesWithParReleased bte entity . concat =<< mapM (slavesFor bte) inputs
explicitPathsBuilt <- assertExplicitInputsExist bte $ map inputFilePath inputs
return (explicitPathsBuilt, built) | 416 | buildExplicitWithParReleased ::
BuildTargetEnv -> Parallelism.Entity -> [SlaveRequest] ->
IO (ExplicitPathsBuilt, BuiltTargets)
buildExplicitWithParReleased bte@BuildTargetEnv{..} entity inputs = do
built <-
waitForSlavesWithParReleased bte entity . concat =<< mapM (slavesFor bte) inputs
explicitPathsBuilt <- assertExplicitInputsExist bte $ map inputFilePath inputs
return (explicitPathsBuilt, built) | 416 | buildExplicitWithParReleased bte@BuildTargetEnv{..} entity inputs = do
built <-
waitForSlavesWithParReleased bte entity . concat =<< mapM (slavesFor bte) inputs
explicitPathsBuilt <- assertExplicitInputsExist bte $ map inputFilePath inputs
return (explicitPathsBuilt, built) | 284 | false | true | 0 | 11 | 53 | 115 | 56 | 59 | null | null |
forked-upstream-packages-for-ghcjs/ghc | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | emitPrimOp dflags res (VecWriteOffAddrOp vcat n w) args = do
checkVecCompatibility dflags vcat n w
doWriteOffAddrOp Nothing ty res args
where
ty :: CmmType
ty = vecVmmType vcat n w | 198 | emitPrimOp dflags res (VecWriteOffAddrOp vcat n w) args = do
checkVecCompatibility dflags vcat n w
doWriteOffAddrOp Nothing ty res args
where
ty :: CmmType
ty = vecVmmType vcat n w | 198 | emitPrimOp dflags res (VecWriteOffAddrOp vcat n w) args = do
checkVecCompatibility dflags vcat n w
doWriteOffAddrOp Nothing ty res args
where
ty :: CmmType
ty = vecVmmType vcat n w | 198 | false | false | 1 | 7 | 47 | 70 | 32 | 38 | null | null |
jsavatgy/xroads-game | code/dark-green-points.hs | gpl-2.0 | setColor (RGBA r g b a) = setSourceRGBA r g b a | 47 | setColor (RGBA r g b a) = setSourceRGBA r g b a | 47 | setColor (RGBA r g b a) = setSourceRGBA r g b a | 47 | false | false | 0 | 6 | 11 | 31 | 14 | 17 | null | null |
elieux/ghc | compiler/rename/RnTypes.hs | bsd-3-clause | extract_mb f (Just x) acc = f x acc | 35 | extract_mb f (Just x) acc = f x acc | 35 | extract_mb f (Just x) acc = f x acc | 35 | false | false | 0 | 7 | 8 | 24 | 11 | 13 | null | null |
Lemmih/fvg | src/Parser.hs | bsd-3-clause | parseCase :: Parse Expr
parseCase = block $ do
reserved "case"
scrut <- parseExpr
reserved "of"
alts <- indent $ many1 (checkIndent >> parseAlt)
return $ Case scrut alts
-- pattern -> expr | 199 | parseCase :: Parse Expr
parseCase = block $ do
reserved "case"
scrut <- parseExpr
reserved "of"
alts <- indent $ many1 (checkIndent >> parseAlt)
return $ Case scrut alts
-- pattern -> expr | 199 | parseCase = block $ do
reserved "case"
scrut <- parseExpr
reserved "of"
alts <- indent $ many1 (checkIndent >> parseAlt)
return $ Case scrut alts
-- pattern -> expr | 175 | false | true | 0 | 12 | 43 | 71 | 32 | 39 | null | null |
sleepomeno/TForth | src/TF/CheckerUtils.hs | apache-2.0 | execEff :: StackEffect -> CompExecEffect
execEff s = (emptySt, s) | 65 | execEff :: StackEffect -> CompExecEffect
execEff s = (emptySt, s) | 65 | execEff s = (emptySt, s) | 24 | false | true | 0 | 5 | 9 | 24 | 13 | 11 | null | null |
akru/haste-compiler | src/Data/JSTarget/AST.hs | bsd-3-clause | expPrec (AssignEx _ _) = 0 | 40 | expPrec (AssignEx _ _) = 0 | 40 | expPrec (AssignEx _ _) = 0 | 40 | false | false | 0 | 7 | 19 | 17 | 8 | 9 | null | null |
AlexanderPankiv/ghc | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | translateOp _ FloatDivOp = Just (MO_F_Quot W32) | 55 | translateOp _ FloatDivOp = Just (MO_F_Quot W32) | 55 | translateOp _ FloatDivOp = Just (MO_F_Quot W32) | 55 | false | false | 0 | 7 | 14 | 20 | 9 | 11 | null | null |
tjakway/ghcjvm | compiler/ghci/ByteCodeTypes.hs | bsd-3-clause | -- | Construct an empty ModBreaks
emptyModBreaks :: ModBreaks
emptyModBreaks = ModBreaks
{ modBreaks_flags = error "ModBreaks.modBreaks_array not initialised"
-- ToDo: can we avoid this?
, modBreaks_locs = array (0,-1) []
, modBreaks_vars = array (0,-1) []
, modBreaks_decls = array (0,-1) []
, modBreaks_ccs = array (0,-1) []
, modBreaks_breakInfo = IntMap.empty
} | 397 | emptyModBreaks :: ModBreaks
emptyModBreaks = ModBreaks
{ modBreaks_flags = error "ModBreaks.modBreaks_array not initialised"
-- ToDo: can we avoid this?
, modBreaks_locs = array (0,-1) []
, modBreaks_vars = array (0,-1) []
, modBreaks_decls = array (0,-1) []
, modBreaks_ccs = array (0,-1) []
, modBreaks_breakInfo = IntMap.empty
} | 363 | emptyModBreaks = ModBreaks
{ modBreaks_flags = error "ModBreaks.modBreaks_array not initialised"
-- ToDo: can we avoid this?
, modBreaks_locs = array (0,-1) []
, modBreaks_vars = array (0,-1) []
, modBreaks_decls = array (0,-1) []
, modBreaks_ccs = array (0,-1) []
, modBreaks_breakInfo = IntMap.empty
} | 335 | true | true | 0 | 10 | 85 | 126 | 69 | 57 | null | null |
urbanslug/ghc | compiler/cmm/CmmCommonBlockElim.hs | bsd-3-clause | -- -----------------------------------------------------------------------------
-- Eliminate common blocks
-- If two blocks are identical except for the label on the first node,
-- then we can eliminate one of the blocks. To ensure that the semantics
-- of the program are preserved, we have to rewrite each predecessor of the
-- eliminated block to proceed with the block we keep.
-- The algorithm iterates over the blocks in the graph,
-- checking whether it has seen another block that is equal modulo labels.
-- If so, then it adds an entry in a map indicating that the new block
-- is made redundant by the old block.
-- Otherwise, it is added to the useful blocks.
-- To avoid comparing every block with every other block repeatedly, we group
-- them by
-- * a hash of the block, ignoring labels (explained below)
-- * the list of outgoing labels
-- The hash is invariant under relabeling, so we only ever compare within
-- the same group of blocks.
--
-- The list of outgoing labels is updated as we merge blocks (that is why they
-- are not included in the hash, which we want to calculate only once).
--
-- All in all, two blocks should never be compared if they have different
-- hashes, and at most once otherwise. Previously, we were slower, and people
-- rightfully complained: #10397
-- TODO: Use optimization fuel
elimCommonBlocks :: CmmGraph -> CmmGraph
elimCommonBlocks g = replaceLabels env $ copyTicks env g
where
env = iterate mapEmpty blocks_with_key
groups = groupByInt hash_block (postorderDfs g)
blocks_with_key = [ [ (successors b, [b]) | b <- bs] | bs <- groups]
-- Invariant: The blocks in the list are pairwise distinct
-- (so avoid comparing them again) | 1,709 | elimCommonBlocks :: CmmGraph -> CmmGraph
elimCommonBlocks g = replaceLabels env $ copyTicks env g
where
env = iterate mapEmpty blocks_with_key
groups = groupByInt hash_block (postorderDfs g)
blocks_with_key = [ [ (successors b, [b]) | b <- bs] | bs <- groups]
-- Invariant: The blocks in the list are pairwise distinct
-- (so avoid comparing them again) | 371 | elimCommonBlocks g = replaceLabels env $ copyTicks env g
where
env = iterate mapEmpty blocks_with_key
groups = groupByInt hash_block (postorderDfs g)
blocks_with_key = [ [ (successors b, [b]) | b <- bs] | bs <- groups]
-- Invariant: The blocks in the list are pairwise distinct
-- (so avoid comparing them again) | 330 | true | true | 2 | 9 | 317 | 126 | 77 | 49 | null | null |
GaloisInc/sk-dev-platform | libs/SCD/src/SCD/GenShrimp/FromSimpleLob.hs | bsd-3-clause | fromMPortDeclarationType :: S.MPortDeclarationType -> C.PositionValue
fromMPortDeclarationType mpdt = case mpdt of
S.EmptyPDT -> C.Unknown
S.FullPDT mptc -> fromMPortTypeConstraints mptc | 190 | fromMPortDeclarationType :: S.MPortDeclarationType -> C.PositionValue
fromMPortDeclarationType mpdt = case mpdt of
S.EmptyPDT -> C.Unknown
S.FullPDT mptc -> fromMPortTypeConstraints mptc | 190 | fromMPortDeclarationType mpdt = case mpdt of
S.EmptyPDT -> C.Unknown
S.FullPDT mptc -> fromMPortTypeConstraints mptc | 120 | false | true | 0 | 9 | 22 | 50 | 24 | 26 | null | null |
heathweiss/Tricad | src/Scan/Filter.hs | gpl-2.0 | averageValueOf :: [Radius] -> Radius
averageValueOf list = Radius $ (L.sum $ map (radius) list) / (fromIntegral $ length list) | 127 | averageValueOf :: [Radius] -> Radius
averageValueOf list = Radius $ (L.sum $ map (radius) list) / (fromIntegral $ length list) | 127 | averageValueOf list = Radius $ (L.sum $ map (radius) list) / (fromIntegral $ length list) | 90 | false | true | 0 | 10 | 20 | 56 | 29 | 27 | null | null |
willdonnelly/xdg-basedir | System/Environment/XDG/BaseDir.hs | bsd-3-clause | envLookup :: String -> IO String
envLookup key = do env <- getEnvironment
case lookup key env of
Just val -> return val
Nothing -> getDefault key | 213 | envLookup :: String -> IO String
envLookup key = do env <- getEnvironment
case lookup key env of
Just val -> return val
Nothing -> getDefault key | 213 | envLookup key = do env <- getEnvironment
case lookup key env of
Just val -> return val
Nothing -> getDefault key | 180 | false | true | 0 | 10 | 94 | 61 | 27 | 34 | null | null |
rueshyna/gogol | gogol-affiliates/gen/Network/Google/Affiliates/Types/Product.hs | mpl-2.0 | -- | Fee for setting up the card.
cInitialSetupAndProcessingFee :: Lens' CcOffer (Maybe Text)
cInitialSetupAndProcessingFee
= lens _cInitialSetupAndProcessingFee
(\ s a -> s{_cInitialSetupAndProcessingFee = a}) | 218 | cInitialSetupAndProcessingFee :: Lens' CcOffer (Maybe Text)
cInitialSetupAndProcessingFee
= lens _cInitialSetupAndProcessingFee
(\ s a -> s{_cInitialSetupAndProcessingFee = a}) | 184 | cInitialSetupAndProcessingFee
= lens _cInitialSetupAndProcessingFee
(\ s a -> s{_cInitialSetupAndProcessingFee = a}) | 124 | true | true | 1 | 9 | 32 | 51 | 25 | 26 | null | null |
david-caro/shellcheck | ShellCheck/Analytics.hs | gpl-3.0 | prop_checkConstantNoary = verify checkConstantNoary "[[ '$(foo)' ]]" | 68 | prop_checkConstantNoary = verify checkConstantNoary "[[ '$(foo)' ]]" | 68 | prop_checkConstantNoary = verify checkConstantNoary "[[ '$(foo)' ]]" | 68 | false | false | 0 | 5 | 6 | 11 | 5 | 6 | null | null |
ennocramer/hindent | src/HIndent/Styles/Cramer.hs | bsd-3-clause | --------------------------------------------------------------------------------
-- Printer for reused syntactical constructs
whereBinds :: Binds NodeInfo -> Printer State ()
whereBinds binds =
do newline
indentHalf $
do write "where"
newline
indentHalf $ pretty binds | 303 | whereBinds :: Binds NodeInfo -> Printer State ()
whereBinds binds =
do newline
indentHalf $
do write "where"
newline
indentHalf $ pretty binds | 176 | whereBinds binds =
do newline
indentHalf $
do write "where"
newline
indentHalf $ pretty binds | 127 | true | true | 0 | 11 | 64 | 59 | 26 | 33 | null | null |
miguel-negrao/srhack | src/Main.hs | gpl-3.0 | getFloat32 = fmap wordToFloat getWord32be | 42 | getFloat32 = fmap wordToFloat getWord32be | 42 | getFloat32 = fmap wordToFloat getWord32be | 42 | false | false | 1 | 5 | 5 | 16 | 5 | 11 | null | null |
szehk/Haskell-Carbonara-Library | src/Data/Carbonara/Maybe.hs | bsd-3-clause | (..>) :: Ord a => Maybe a -> a -> Bool
(..>) x y = x .>. Just y | 63 | (..>) :: Ord a => Maybe a -> a -> Bool
(..>) x y = x .>. Just y | 63 | (..>) x y = x .>. Just y | 24 | false | true | 0 | 7 | 18 | 49 | 24 | 25 | null | null |
jcpetruzza/haskell-ast | src/Language/Haskell/AST/HSE.hs | bsd-3-clause | fromHseFieldUpdate (E.FieldPun l n) = pure $ Sugar.FieldPun l (fromHseName n) | 83 | fromHseFieldUpdate (E.FieldPun l n) = pure $ Sugar.FieldPun l (fromHseName n) | 83 | fromHseFieldUpdate (E.FieldPun l n) = pure $ Sugar.FieldPun l (fromHseName n) | 83 | false | false | 0 | 8 | 16 | 37 | 17 | 20 | null | null |
bergmark/hlint | src/Util.hs | bsd-3-clause | readFile' :: FilePath -> IO String
readFile' x = listM' =<< readFile x | 70 | readFile' :: FilePath -> IO String
readFile' x = listM' =<< readFile x | 70 | readFile' x = listM' =<< readFile x | 35 | false | true | 0 | 6 | 12 | 28 | 13 | 15 | null | null |
ekmett/transformers | Control/Monad/Trans/State/Lazy.hs | bsd-3-clause | -- | Lift a @catchError@ operation to the new monad.
liftCatch :: (m (a,s) -> (e -> m (a,s)) -> m (a,s)) ->
StateT s m a -> (e -> StateT s m a) -> StateT s m a
liftCatch catchError m h =
StateT $ \s -> runStateT m s `catchError` \e -> runStateT (h e) s | 260 | liftCatch :: (m (a,s) -> (e -> m (a,s)) -> m (a,s)) ->
StateT s m a -> (e -> StateT s m a) -> StateT s m a
liftCatch catchError m h =
StateT $ \s -> runStateT m s `catchError` \e -> runStateT (h e) s | 207 | liftCatch catchError m h =
StateT $ \s -> runStateT m s `catchError` \e -> runStateT (h e) s | 96 | true | true | 2 | 13 | 65 | 145 | 74 | 71 | null | null |
barrucadu/spec | Test/CoCo/Gen.hs | mit | getTier :: Int -> Generator s o x -> Set (Schema s, (Maybe (Ann s o x), Ann s o x))
getTier tier = M.findWithDefault S.empty tier . tiers | 137 | getTier :: Int -> Generator s o x -> Set (Schema s, (Maybe (Ann s o x), Ann s o x))
getTier tier = M.findWithDefault S.empty tier . tiers | 137 | getTier tier = M.findWithDefault S.empty tier . tiers | 53 | false | true | 0 | 13 | 28 | 85 | 40 | 45 | null | null |
saltlang/compiler-toolbox | src/Text/Numbers/ByteString.hs | bsd-3-clause | -- | Parse a string representing a floating point number in decimal, with
-- an optional exponent. The result will be represented with a
-- @Rational@. The format is @<whole part>.<fractional part>@, with
-- an optional leading @+@ or @-@, optionally followed by @e@, @E@,
-- @p@, or @P@ and a whole number exponent with an optional leading
-- @+@ or @-@.
decLiteral :: ByteString -> Rational
decLiteral = Numbers.decLiteral . toString | 437 | decLiteral :: ByteString -> Rational
decLiteral = Numbers.decLiteral . toString | 79 | decLiteral = Numbers.decLiteral . toString | 42 | true | true | 0 | 7 | 73 | 34 | 18 | 16 | null | null |
kumasento/accelerate | Data/Array/Accelerate/AST.hs | bsd-3-clause | prj :: Idx env t -> Val env -> t
prj ZeroIdx (Push _ v) = v | 67 | prj :: Idx env t -> Val env -> t
prj ZeroIdx (Push _ v) = v | 67 | prj ZeroIdx (Push _ v) = v | 34 | false | true | 0 | 7 | 24 | 40 | 19 | 21 | null | null |
emilaxelsson/operational-alacarte | examples/Simple.hs | bsd-3-clause | iff :: Exp Bool -> MyProgram a -> MyProgram a -> MyProgram a
iff c thn els = singleInj $ If c thn els | 101 | iff :: Exp Bool -> MyProgram a -> MyProgram a -> MyProgram a
iff c thn els = singleInj $ If c thn els | 101 | iff c thn els = singleInj $ If c thn els | 40 | false | true | 0 | 8 | 23 | 53 | 24 | 29 | null | null |
kmilner/tamarin-prover | lib/term/src/Term/Builtin/Convenience.hs | gpl-3.0 | var :: String -> Integer -> LNTerm
var s i = varTerm $ LVar s LSortMsg i | 72 | var :: String -> Integer -> LNTerm
var s i = varTerm $ LVar s LSortMsg i | 72 | var s i = varTerm $ LVar s LSortMsg i | 37 | false | true | 0 | 6 | 16 | 39 | 18 | 21 | null | null |
shlevy/ghc | includes/CodeGen.Platform.hs | bsd-3-clause | globalRegMaybe (YmmReg 6) = Just (RealRegSingle REG_YMM6) | 71 | globalRegMaybe (YmmReg 6) = Just (RealRegSingle REG_YMM6) | 71 | globalRegMaybe (YmmReg 6) = Just (RealRegSingle REG_YMM6) | 71 | false | false | 0 | 7 | 20 | 24 | 11 | 13 | null | null |
ghcjs/ghcjs | src/Gen2/Optimizer.hs | mit | renameGlobals :: M.Map Ident Ident -> ([Ident],JStat) -> ([Ident],JStat)
renameGlobals m f@(args,s) = (args, localIdents %~ renameVar $ s')
where
(_, s') = nestedFuns %~ renameGlobals m' $ f
renameVar i = fromMaybe i (M.lookup i m')
locals = L.nub $ args ++ localVars s
m' = m M.\\ (M.fromList $ zip locals (repeat (TxtI "_"))) | 363 | renameGlobals :: M.Map Ident Ident -> ([Ident],JStat) -> ([Ident],JStat)
renameGlobals m f@(args,s) = (args, localIdents %~ renameVar $ s')
where
(_, s') = nestedFuns %~ renameGlobals m' $ f
renameVar i = fromMaybe i (M.lookup i m')
locals = L.nub $ args ++ localVars s
m' = m M.\\ (M.fromList $ zip locals (repeat (TxtI "_"))) | 363 | renameGlobals m f@(args,s) = (args, localIdents %~ renameVar $ s')
where
(_, s') = nestedFuns %~ renameGlobals m' $ f
renameVar i = fromMaybe i (M.lookup i m')
locals = L.nub $ args ++ localVars s
m' = m M.\\ (M.fromList $ zip locals (repeat (TxtI "_"))) | 290 | false | true | 0 | 12 | 91 | 176 | 93 | 83 | null | null |
enolan/emp-pl-site | Handler/Home.hs | agpl-3.0 | ratingsBoxW :: Hidden -> Ratings -> Widget
ratingsBoxW hide Ratings{..} =
let noRatings = null ratingsRatings
ratingsList =
(map addCostAndEditable $ if noRatings then exampleRatings else ratingsRatings)
++
[("", 0, 0, True)] -- blank line for new entries
addCostAndEditable (name, score) = (name, score, score ^ (2 :: Int), False)
ptsSpent = if noRatings
then (sum $ map ((^(2::Int)) . snd) exampleRatings)
else ratingsPtsSpent
totalBudget = if noRatings
then (length exampleRatings * 25)
else ratingsTotalBudget
averageSpent =
toFixed 2 ((fromIntegral ptsSpent :: Double) / fromIntegral (length ratingsList))
in [whamlet|
<#ratingsBox :hidden hide:style="display: none">
$if noRatings
^{explainBoxW}
<table .table .table-bordered #points-table>
<thead>
<tr>
<td>Total budget
<td>Points remaining
<td>Average spent per program
<tbody>
<tr>
<td #total-budget>#{totalBudget}
<td #available-points>#{totalBudget - ptsSpent}
<td #average-points-spent>#{averageSpent}
<table .table #ratings-table>
<thead>
<tr>
<td .rating-btn-col>
<td .program-name-col .program-name>Program name
<td .rating-btn-col>
<td .score-col>Score
<td .cost-col>Cost
<td .rating-btn-col>
<tbody>
$forall (name, score, cost, editable) <- ratingsList
<tr :not editable && noRatings:.example-data>
<td>
<button .btn-minus .btn-score>
<td .program-name>
<input class="program-name" type="text" value="#{name}" :not editable:readonly>
<td>
<button .btn-plus .btn-score>
<td>
<span .score>#{score}
<td>
<span .cost>#{cost}
<td>
<button .btn-score .btn-delete>
|] | 1,953 | ratingsBoxW :: Hidden -> Ratings -> Widget
ratingsBoxW hide Ratings{..} =
let noRatings = null ratingsRatings
ratingsList =
(map addCostAndEditable $ if noRatings then exampleRatings else ratingsRatings)
++
[("", 0, 0, True)] -- blank line for new entries
addCostAndEditable (name, score) = (name, score, score ^ (2 :: Int), False)
ptsSpent = if noRatings
then (sum $ map ((^(2::Int)) . snd) exampleRatings)
else ratingsPtsSpent
totalBudget = if noRatings
then (length exampleRatings * 25)
else ratingsTotalBudget
averageSpent =
toFixed 2 ((fromIntegral ptsSpent :: Double) / fromIntegral (length ratingsList))
in [whamlet|
<#ratingsBox :hidden hide:style="display: none">
$if noRatings
^{explainBoxW}
<table .table .table-bordered #points-table>
<thead>
<tr>
<td>Total budget
<td>Points remaining
<td>Average spent per program
<tbody>
<tr>
<td #total-budget>#{totalBudget}
<td #available-points>#{totalBudget - ptsSpent}
<td #average-points-spent>#{averageSpent}
<table .table #ratings-table>
<thead>
<tr>
<td .rating-btn-col>
<td .program-name-col .program-name>Program name
<td .rating-btn-col>
<td .score-col>Score
<td .cost-col>Cost
<td .rating-btn-col>
<tbody>
$forall (name, score, cost, editable) <- ratingsList
<tr :not editable && noRatings:.example-data>
<td>
<button .btn-minus .btn-score>
<td .program-name>
<input class="program-name" type="text" value="#{name}" :not editable:readonly>
<td>
<button .btn-plus .btn-score>
<td>
<span .score>#{score}
<td>
<span .cost>#{cost}
<td>
<button .btn-score .btn-delete>
|] | 1,953 | ratingsBoxW hide Ratings{..} =
let noRatings = null ratingsRatings
ratingsList =
(map addCostAndEditable $ if noRatings then exampleRatings else ratingsRatings)
++
[("", 0, 0, True)] -- blank line for new entries
addCostAndEditable (name, score) = (name, score, score ^ (2 :: Int), False)
ptsSpent = if noRatings
then (sum $ map ((^(2::Int)) . snd) exampleRatings)
else ratingsPtsSpent
totalBudget = if noRatings
then (length exampleRatings * 25)
else ratingsTotalBudget
averageSpent =
toFixed 2 ((fromIntegral ptsSpent :: Double) / fromIntegral (length ratingsList))
in [whamlet|
<#ratingsBox :hidden hide:style="display: none">
$if noRatings
^{explainBoxW}
<table .table .table-bordered #points-table>
<thead>
<tr>
<td>Total budget
<td>Points remaining
<td>Average spent per program
<tbody>
<tr>
<td #total-budget>#{totalBudget}
<td #available-points>#{totalBudget - ptsSpent}
<td #average-points-spent>#{averageSpent}
<table .table #ratings-table>
<thead>
<tr>
<td .rating-btn-col>
<td .program-name-col .program-name>Program name
<td .rating-btn-col>
<td .score-col>Score
<td .cost-col>Cost
<td .rating-btn-col>
<tbody>
$forall (name, score, cost, editable) <- ratingsList
<tr :not editable && noRatings:.example-data>
<td>
<button .btn-minus .btn-score>
<td .program-name>
<input class="program-name" type="text" value="#{name}" :not editable:readonly>
<td>
<button .btn-plus .btn-score>
<td>
<span .score>#{score}
<td>
<span .cost>#{cost}
<td>
<button .btn-score .btn-delete>
|] | 1,910 | false | true | 16 | 13 | 604 | 237 | 130 | 107 | null | null |
alexlegg/couchgames | test/CouchGames/ResistanceSpec.hs | bsd-3-clause | tenPlayers = [p1, p2, p3, p4, p5, p6, p7, p8, p9, p10] | 54 | tenPlayers = [p1, p2, p3, p4, p5, p6, p7, p8, p9, p10] | 54 | tenPlayers = [p1, p2, p3, p4, p5, p6, p7, p8, p9, p10] | 54 | false | false | 0 | 5 | 11 | 36 | 23 | 13 | null | null |
forked-upstream-packages-for-ghcjs/ghc | compiler/basicTypes/IdInfo.hs | bsd-3-clause | pprIdDetails :: IdDetails -> SDoc
pprIdDetails VanillaId = empty | 64 | pprIdDetails :: IdDetails -> SDoc
pprIdDetails VanillaId = empty | 64 | pprIdDetails VanillaId = empty | 30 | false | true | 0 | 5 | 8 | 18 | 9 | 9 | null | null |
fmapfmapfmap/amazonka | amazonka-ses/test/Test/AWS/Gen/SES.hs | mpl-2.0 | testGetIdentityPolicies :: GetIdentityPolicies -> TestTree
testGetIdentityPolicies = req
"GetIdentityPolicies"
"fixture/GetIdentityPolicies.yaml" | 153 | testGetIdentityPolicies :: GetIdentityPolicies -> TestTree
testGetIdentityPolicies = req
"GetIdentityPolicies"
"fixture/GetIdentityPolicies.yaml" | 153 | testGetIdentityPolicies = req
"GetIdentityPolicies"
"fixture/GetIdentityPolicies.yaml" | 94 | false | true | 0 | 5 | 17 | 21 | 10 | 11 | null | null |
lukexi/ghc | compiler/codeGen/StgCmmUtils.hs | bsd-3-clause | newUnboxedTupleRegs :: Type -> FCode ([LocalReg], [ForeignHint])
-- Choose suitable local regs to use for the components
-- of an unboxed tuple that we are about to return to
-- the Sequel. If the Sequel is a join point, using the
-- regs it wants will save later assignments.
newUnboxedTupleRegs res_ty
= ASSERT( isUnboxedTupleType res_ty )
do { dflags <- getDynFlags
; sequel <- getSequel
; regs <- choose_regs dflags sequel
; ASSERT( regs `equalLength` reps )
return (regs, map primRepForeignHint reps) }
where
UbxTupleRep ty_args = repType res_ty
reps = [ rep
| ty <- ty_args
, let rep = typePrimRep ty
, not (isVoidRep rep) ]
choose_regs _ (AssignTo regs _) = return regs
choose_regs dflags _ = mapM (newTemp . primRepCmmType dflags) reps
-------------------------------------------------------------------------
-- emitMultiAssign
------------------------------------------------------------------------- | 1,022 | newUnboxedTupleRegs :: Type -> FCode ([LocalReg], [ForeignHint])
newUnboxedTupleRegs res_ty
= ASSERT( isUnboxedTupleType res_ty )
do { dflags <- getDynFlags
; sequel <- getSequel
; regs <- choose_regs dflags sequel
; ASSERT( regs `equalLength` reps )
return (regs, map primRepForeignHint reps) }
where
UbxTupleRep ty_args = repType res_ty
reps = [ rep
| ty <- ty_args
, let rep = typePrimRep ty
, not (isVoidRep rep) ]
choose_regs _ (AssignTo regs _) = return regs
choose_regs dflags _ = mapM (newTemp . primRepCmmType dflags) reps
-------------------------------------------------------------------------
-- emitMultiAssign
------------------------------------------------------------------------- | 809 | newUnboxedTupleRegs res_ty
= ASSERT( isUnboxedTupleType res_ty )
do { dflags <- getDynFlags
; sequel <- getSequel
; regs <- choose_regs dflags sequel
; ASSERT( regs `equalLength` reps )
return (regs, map primRepForeignHint reps) }
where
UbxTupleRep ty_args = repType res_ty
reps = [ rep
| ty <- ty_args
, let rep = typePrimRep ty
, not (isVoidRep rep) ]
choose_regs _ (AssignTo regs _) = return regs
choose_regs dflags _ = mapM (newTemp . primRepCmmType dflags) reps
-------------------------------------------------------------------------
-- emitMultiAssign
------------------------------------------------------------------------- | 744 | true | true | 1 | 10 | 241 | 219 | 111 | 108 | null | null |
spanners/cis194 | 11-applicative/AParser.hs | unlicense | first ∷ (a → b) → (a,c) → (b,c)
first f (x,y) = (f x, y) | 56 | first ∷ (a → b) → (a,c) → (b,c)
first f (x,y) = (f x, y) | 56 | first f (x,y) = (f x, y) | 24 | false | true | 0 | 7 | 15 | 58 | 33 | 25 | null | null |
google/codeworld | codeworld-requirements/src/CodeWorld/Requirements/Checker/Types.hs | apache-2.0 | hasCardinality (Cardinality _ (Just k)) n | n > k = False | 57 | hasCardinality (Cardinality _ (Just k)) n | n > k = False | 57 | hasCardinality (Cardinality _ (Just k)) n | n > k = False | 57 | false | false | 1 | 8 | 11 | 36 | 16 | 20 | null | null |
dsorokin/aivika-experiment-chart | examples/TruckHaulingSituation/Experiment.hs | bsd-3-clause | -- | The simulation specs.
specs = Specs { spcStartTime = 0.0,
spcStopTime = 1000.0,
spcDT = 0.1,
spcMethod = RungeKutta4,
spcGeneratorType = SimpleGenerator } | 223 | specs = Specs { spcStartTime = 0.0,
spcStopTime = 1000.0,
spcDT = 0.1,
spcMethod = RungeKutta4,
spcGeneratorType = SimpleGenerator } | 196 | specs = Specs { spcStartTime = 0.0,
spcStopTime = 1000.0,
spcDT = 0.1,
spcMethod = RungeKutta4,
spcGeneratorType = SimpleGenerator } | 196 | true | false | 0 | 6 | 88 | 39 | 25 | 14 | null | null |
keithodulaigh/Hets | ExtModal/Parse_AS.hs | gpl-2.0 | parseInterModality :: AParser st MODALITY
parseInterModality = parseBinModality Intersection parseCompModality | 110 | parseInterModality :: AParser st MODALITY
parseInterModality = parseBinModality Intersection parseCompModality | 110 | parseInterModality = parseBinModality Intersection parseCompModality | 68 | false | true | 0 | 5 | 9 | 21 | 10 | 11 | null | null |
olorin/amazonka | core/src/Network/AWS/Sign/V4.hs | mpl-2.0 | sign :: Algorithm a
sign rq a r ts =
case _rqBody rq of
Chunked x -> chunked x rq a r ts
Hashed x -> hashed x rq a r ts | 141 | sign :: Algorithm a
sign rq a r ts =
case _rqBody rq of
Chunked x -> chunked x rq a r ts
Hashed x -> hashed x rq a r ts | 141 | sign rq a r ts =
case _rqBody rq of
Chunked x -> chunked x rq a r ts
Hashed x -> hashed x rq a r ts | 121 | false | true | 0 | 8 | 53 | 74 | 33 | 41 | null | null |
tamarin-prover/tamarin-prover | lib/theory/src/Theory/Model/Atom.hs | gpl-3.0 | toAtom (EqE t t') = EqE t t' | 31 | toAtom (EqE t t') = EqE t t' | 31 | toAtom (EqE t t') = EqE t t' | 31 | false | false | 0 | 6 | 10 | 23 | 10 | 13 | null | null |
dmvianna/haskellbook | src/Ch18-MonadComposition.hs | unlicense | genId :: Arbitrary a => Gen (Identity a)
genId = do
x <- arbitrary
return $ Identity x | 90 | genId :: Arbitrary a => Gen (Identity a)
genId = do
x <- arbitrary
return $ Identity x | 90 | genId = do
x <- arbitrary
return $ Identity x | 49 | false | true | 0 | 8 | 21 | 44 | 20 | 24 | null | null |
oldmanmike/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | pRELUDE_NAME, mAIN_NAME :: ModuleName
pRELUDE_NAME = mkModuleNameFS (fsLit "Prelude") | 87 | pRELUDE_NAME, mAIN_NAME :: ModuleName
pRELUDE_NAME = mkModuleNameFS (fsLit "Prelude") | 87 | pRELUDE_NAME = mkModuleNameFS (fsLit "Prelude") | 49 | false | true | 0 | 7 | 10 | 22 | 12 | 10 | null | null |
iblumenfeld/Haxl | Haxl/Core/Monad.hs | bsd-3-clause | uncachedRequest :: (DataSource u r, Request r a) => r a -> GenHaxl u a
uncachedRequest req = GenHaxl $ \_env ref -> do
rvar <- newEmptyResult
modifyIORef' ref $ \bs -> addRequest (BlockedFetch req rvar) bs
return $ Blocked (continueFetch req rvar) | 253 | uncachedRequest :: (DataSource u r, Request r a) => r a -> GenHaxl u a
uncachedRequest req = GenHaxl $ \_env ref -> do
rvar <- newEmptyResult
modifyIORef' ref $ \bs -> addRequest (BlockedFetch req rvar) bs
return $ Blocked (continueFetch req rvar) | 253 | uncachedRequest req = GenHaxl $ \_env ref -> do
rvar <- newEmptyResult
modifyIORef' ref $ \bs -> addRequest (BlockedFetch req rvar) bs
return $ Blocked (continueFetch req rvar) | 182 | false | true | 0 | 13 | 48 | 109 | 52 | 57 | null | null |
wangbj/hexdump | src/Hexdump.hs | bsd-3-clause | hexPrintToHandle' :: Handle -> IO ()
hexPrintToHandle' hdl = LBS.hGetContents hdl >>= hexDumpIO | 95 | hexPrintToHandle' :: Handle -> IO ()
hexPrintToHandle' hdl = LBS.hGetContents hdl >>= hexDumpIO | 95 | hexPrintToHandle' hdl = LBS.hGetContents hdl >>= hexDumpIO | 58 | false | true | 0 | 7 | 12 | 32 | 15 | 17 | null | null |
vincenthz/hs-crypto-pubkey-types | Crypto/Types/PubKey/RSA.hs | bsd-3-clause | -- | get the size in bytes from a private key
private_size = public_size . private_pub | 86 | private_size = public_size . private_pub | 40 | private_size = public_size . private_pub | 40 | true | false | 0 | 5 | 15 | 11 | 6 | 5 | null | null |
akhileshs/stack | src/Path/Find.hs | bsd-3-clause | findFiles :: Path Abs Dir -- ^ Root directory to begin with.
-> (Path Abs File -> Bool) -- ^ Predicate to match files.
-> (Path Abs Dir -> Bool) -- ^ Predicate for which directories to traverse.
-> IO [Path Abs File] -- ^ List of matching files.
findFiles dir p traversep =
do (dirs,files) <- catchJust (\ e -> if isPermissionError e
then Just ()
else Nothing)
(listDirectory dir)
(\ _ -> return ([], []))
subResults <-
forM dirs
(\entry ->
if traversep entry
then findFiles entry p traversep
else return [])
return (concat (filter p files : subResults)) | 827 | findFiles :: Path Abs Dir -- ^ Root directory to begin with.
-> (Path Abs File -> Bool) -- ^ Predicate to match files.
-> (Path Abs Dir -> Bool) -- ^ Predicate for which directories to traverse.
-> IO [Path Abs File]
findFiles dir p traversep =
do (dirs,files) <- catchJust (\ e -> if isPermissionError e
then Just ()
else Nothing)
(listDirectory dir)
(\ _ -> return ([], []))
subResults <-
forM dirs
(\entry ->
if traversep entry
then findFiles entry p traversep
else return [])
return (concat (filter p files : subResults)) | 793 | findFiles dir p traversep =
do (dirs,files) <- catchJust (\ e -> if isPermissionError e
then Just ()
else Nothing)
(listDirectory dir)
(\ _ -> return ([], []))
subResults <-
forM dirs
(\entry ->
if traversep entry
then findFiles entry p traversep
else return [])
return (concat (filter p files : subResults)) | 534 | true | true | 0 | 13 | 373 | 212 | 108 | 104 | null | null |
pgj/bead | src/Bead/Controller/UserStories.hs | bsd-3-clause | blockedSubmission = msg_UserStoryError_BlockedSubmission "The submission is blocked by an isolated assignment." | 111 | blockedSubmission = msg_UserStoryError_BlockedSubmission "The submission is blocked by an isolated assignment." | 111 | blockedSubmission = msg_UserStoryError_BlockedSubmission "The submission is blocked by an isolated assignment." | 111 | false | false | 0 | 5 | 10 | 9 | 4 | 5 | null | null |
skogsbaer/roundtrip | src/Text/Roundtrip/GeneratorTest.hs | bsd-3-clause | sample3 = [EventBeginDocument
,EventBeginElement _SAMPLE3_ELEM_FOO_NAME [attr (ns "key" Nothing Nothing) "val\"'&<>ue"]
,EventContent $ ContentText $ pack "<&;'"
,EventEndElement _SAMPLE3_ELEM_FOO_NAME
,EventEndDocument] | 260 | sample3 = [EventBeginDocument
,EventBeginElement _SAMPLE3_ELEM_FOO_NAME [attr (ns "key" Nothing Nothing) "val\"'&<>ue"]
,EventContent $ ContentText $ pack "<&;'"
,EventEndElement _SAMPLE3_ELEM_FOO_NAME
,EventEndDocument] | 260 | sample3 = [EventBeginDocument
,EventBeginElement _SAMPLE3_ELEM_FOO_NAME [attr (ns "key" Nothing Nothing) "val\"'&<>ue"]
,EventContent $ ContentText $ pack "<&;'"
,EventEndElement _SAMPLE3_ELEM_FOO_NAME
,EventEndDocument] | 260 | false | false | 0 | 10 | 59 | 58 | 30 | 28 | null | null |
msakai/ptq | src/Parser.hs | lgpl-2.1 | fvs (F12 x y) = IS.union (fvs x) (fvs y) | 42 | fvs (F12 x y) = IS.union (fvs x) (fvs y) | 42 | fvs (F12 x y) = IS.union (fvs x) (fvs y) | 42 | false | false | 0 | 7 | 11 | 37 | 17 | 20 | null | null |
tpltnt/Tidal | Sound/Tidal/Dirt.hs | gpl-3.0 | kriole :: OscShape
kriole = OscShape {path = "/trigger",
params = [ I "ksymbol" Nothing,
F "kpitch" (Just 1)
],
cpsStamp = False,
timestamp = MessageStamp,
latency = 0.04,
namedParams = False,
preamble = []
} | 380 | kriole :: OscShape
kriole = OscShape {path = "/trigger",
params = [ I "ksymbol" Nothing,
F "kpitch" (Just 1)
],
cpsStamp = False,
timestamp = MessageStamp,
latency = 0.04,
namedParams = False,
preamble = []
} | 380 | kriole = OscShape {path = "/trigger",
params = [ I "ksymbol" Nothing,
F "kpitch" (Just 1)
],
cpsStamp = False,
timestamp = MessageStamp,
latency = 0.04,
namedParams = False,
preamble = []
} | 361 | false | true | 0 | 11 | 207 | 89 | 49 | 40 | null | null |
denibertovic/haskell | kubernetes/lib/Kubernetes/OpenAPI/ModelLens.hs | bsd-3-clause | -- * V1EventList
-- | 'v1EventListApiVersion' Lens
v1EventListApiVersionL :: Lens_' V1EventList (Maybe Text)
v1EventListApiVersionL f V1EventList{..} = (\v1EventListApiVersion -> V1EventList { v1EventListApiVersion, ..} ) <$> f v1EventListApiVersion | 250 | v1EventListApiVersionL :: Lens_' V1EventList (Maybe Text)
v1EventListApiVersionL f V1EventList{..} = (\v1EventListApiVersion -> V1EventList { v1EventListApiVersion, ..} ) <$> f v1EventListApiVersion | 198 | v1EventListApiVersionL f V1EventList{..} = (\v1EventListApiVersion -> V1EventList { v1EventListApiVersion, ..} ) <$> f v1EventListApiVersion | 140 | true | true | 1 | 8 | 27 | 63 | 31 | 32 | null | null |
raichoo/Idris-dev | src/Idris/AbsSyntaxTree.hs | bsd-3-clause | highestFC (PReturn fc) = Just fc | 32 | highestFC (PReturn fc) = Just fc | 32 | highestFC (PReturn fc) = Just fc | 32 | false | false | 0 | 7 | 5 | 18 | 8 | 10 | null | null |
rfranek/duckling | Duckling/Ordinal/DA/Corpus.hs | bsd-3-clause | allExamples :: [Example]
allExamples =
examples (OrdinalData 4)
[ "4."
, "fjerde"
, "Fjerde"
] | 140 | allExamples :: [Example]
allExamples =
examples (OrdinalData 4)
[ "4."
, "fjerde"
, "Fjerde"
] | 140 | allExamples =
examples (OrdinalData 4)
[ "4."
, "fjerde"
, "Fjerde"
] | 115 | false | true | 0 | 7 | 60 | 34 | 19 | 15 | null | null |
barrucadu/spec | Test/CoCo/Expr.hs | mit | isApplication :: Expr s h -> Bool
isApplication = isJust . unApplication | 72 | isApplication :: Expr s h -> Bool
isApplication = isJust . unApplication | 72 | isApplication = isJust . unApplication | 38 | false | true | 0 | 6 | 11 | 24 | 12 | 12 | null | null |
seereason/ansi-wl-pprint | Text/PrettyPrint/ANSI/Leijen.hs | bsd-2-clause | -----------------------------------------------------------
-- semi primitive: Alignment and indentation
-----------------------------------------------------------
-- | The document @(indent i x)@ indents document @x@ with @i@ spaces.
--
-- > test = indent 4 (fillSep (map text
-- > (words "the indent combinator indents these words !")))
--
-- Which lays out with a page width of 20 as:
--
-- @
-- the indent
-- combinator
-- indents these
-- words !
-- @
indent :: Int -> Doc -> Doc
indent i d = hang i (text (spaces i) <> d) | 559 | indent :: Int -> Doc -> Doc
indent i d = hang i (text (spaces i) <> d) | 75 | indent i d = hang i (text (spaces i) <> d) | 47 | true | true | 0 | 10 | 117 | 61 | 38 | 23 | null | null |
SKA-ScienceDataProcessor/RC | MS2/lib/DSL_Gridder/DGridding.hs | apache-2.0 | rawSystemActor :: Actor (String, [String]) (Maybe Int)
rawSystemActor = actor $ \(cmd, args) ->
log_duration "rawSystemActor" (unwords $ cmd:args) $ liftIO (fmap ec2mb $ rawSystem cmd args)
where
-- We have no binary instance for ExitCode, hence this conversion
ec2mb ExitSuccess = Nothing
ec2mb (ExitFailure n) = Just n
-- No bother with special return type. 'String' at the moment. | 402 | rawSystemActor :: Actor (String, [String]) (Maybe Int)
rawSystemActor = actor $ \(cmd, args) ->
log_duration "rawSystemActor" (unwords $ cmd:args) $ liftIO (fmap ec2mb $ rawSystem cmd args)
where
-- We have no binary instance for ExitCode, hence this conversion
ec2mb ExitSuccess = Nothing
ec2mb (ExitFailure n) = Just n
-- No bother with special return type. 'String' at the moment. | 402 | rawSystemActor = actor $ \(cmd, args) ->
log_duration "rawSystemActor" (unwords $ cmd:args) $ liftIO (fmap ec2mb $ rawSystem cmd args)
where
-- We have no binary instance for ExitCode, hence this conversion
ec2mb ExitSuccess = Nothing
ec2mb (ExitFailure n) = Just n
-- No bother with special return type. 'String' at the moment. | 347 | false | true | 3 | 9 | 78 | 125 | 60 | 65 | null | null |
airobert/yices_haskell | Math/SMT/Yices/Parser.hs | bsd-3-clause | lambda = tok "lambda" >> liftM2 LAMBDA (paren $ many1 idty) expY | 64 | lambda = tok "lambda" >> liftM2 LAMBDA (paren $ many1 idty) expY | 64 | lambda = tok "lambda" >> liftM2 LAMBDA (paren $ many1 idty) expY | 64 | false | false | 3 | 8 | 11 | 34 | 14 | 20 | null | null |
ghorn/monadic-modeling-test | Estimator.hs | bsd-3-clause | estimatorSummary :: Estimator a -> IO ()
estimatorSummary est = do
let (result, messages, x) = buildEstimator est
showLog messages
putStr "\nresult: "
case result of
Left (ErrorMessage msg) -> putStrLn $ "Failure: " ++ msg
Right _ -> do
putStrLn "Success!"
putStrLn ""
showSymbols (x ^. symbols x)
putStrLn ""
showIntermediateStates (x ^. intermediateStates x)
putStrLn ""
showNext (x ^. eNext) | 452 | estimatorSummary :: Estimator a -> IO ()
estimatorSummary est = do
let (result, messages, x) = buildEstimator est
showLog messages
putStr "\nresult: "
case result of
Left (ErrorMessage msg) -> putStrLn $ "Failure: " ++ msg
Right _ -> do
putStrLn "Success!"
putStrLn ""
showSymbols (x ^. symbols x)
putStrLn ""
showIntermediateStates (x ^. intermediateStates x)
putStrLn ""
showNext (x ^. eNext) | 452 | estimatorSummary est = do
let (result, messages, x) = buildEstimator est
showLog messages
putStr "\nresult: "
case result of
Left (ErrorMessage msg) -> putStrLn $ "Failure: " ++ msg
Right _ -> do
putStrLn "Success!"
putStrLn ""
showSymbols (x ^. symbols x)
putStrLn ""
showIntermediateStates (x ^. intermediateStates x)
putStrLn ""
showNext (x ^. eNext) | 411 | false | true | 0 | 15 | 119 | 168 | 73 | 95 | null | null |
gafiatulin/codewars | src/7 kyu/Strength.hs | mit | alexMistakes :: Int -> Int -> Int
alexMistakes numberOfKatas timeLimit = floor . logBase 2 . (/ 5.0) . fromIntegral $ (timeLimit - (6 * numberOfKatas)) | 151 | alexMistakes :: Int -> Int -> Int
alexMistakes numberOfKatas timeLimit = floor . logBase 2 . (/ 5.0) . fromIntegral $ (timeLimit - (6 * numberOfKatas)) | 151 | alexMistakes numberOfKatas timeLimit = floor . logBase 2 . (/ 5.0) . fromIntegral $ (timeLimit - (6 * numberOfKatas)) | 117 | false | true | 0 | 10 | 25 | 67 | 33 | 34 | null | null |
pasberth/binal1 | Language/Binal/Verifier.hs | mit | freshPoly' (ObjectTy i xs) = do
xs' <- mapM (\(key, val) -> do { x <- freshPoly' val ; return (key, x) }) (HashMap.toList xs)
return (ObjectTy i (HashMap.fromList xs')) | 172 | freshPoly' (ObjectTy i xs) = do
xs' <- mapM (\(key, val) -> do { x <- freshPoly' val ; return (key, x) }) (HashMap.toList xs)
return (ObjectTy i (HashMap.fromList xs')) | 172 | freshPoly' (ObjectTy i xs) = do
xs' <- mapM (\(key, val) -> do { x <- freshPoly' val ; return (key, x) }) (HashMap.toList xs)
return (ObjectTy i (HashMap.fromList xs')) | 172 | false | false | 0 | 14 | 33 | 98 | 49 | 49 | null | null |
mfpi/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/ARB/Compatibility/Tokens.hs | bsd-3-clause | gl_COLOR_TABLE_BIAS :: GLenum
gl_COLOR_TABLE_BIAS = 0x80D7 | 58 | gl_COLOR_TABLE_BIAS :: GLenum
gl_COLOR_TABLE_BIAS = 0x80D7 | 58 | gl_COLOR_TABLE_BIAS = 0x80D7 | 28 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
fiigii/AbstractInterpretation | LabeledAst.hs | mit | labelOf (BinaryExpr _ _ _ l) = l | 32 | labelOf (BinaryExpr _ _ _ l) = l | 32 | labelOf (BinaryExpr _ _ _ l) = l | 32 | false | false | 0 | 7 | 7 | 21 | 10 | 11 | null | null |
Dronte/Operads | examples/monomial.hs | bsd-3-clause | monomial n = makeBasis n ts | 27 | monomial n = makeBasis n ts | 27 | monomial n = makeBasis n ts | 27 | false | false | 0 | 5 | 5 | 14 | 6 | 8 | null | null |
sol/uu-parsinglib | src/Text/ParserCombinators/UU/Derived.hs | mit | pFoldr1_ng :: IsParser p => (v -> b -> b, b) -> p v -> p b
pFoldr1_ng alg@(op,e) p = must_be_non_empty "pFoldr1_ng" p (op <$> p <*> pFoldr_ng alg p) | 159 | pFoldr1_ng :: IsParser p => (v -> b -> b, b) -> p v -> p b
pFoldr1_ng alg@(op,e) p = must_be_non_empty "pFoldr1_ng" p (op <$> p <*> pFoldr_ng alg p) | 159 | pFoldr1_ng alg@(op,e) p = must_be_non_empty "pFoldr1_ng" p (op <$> p <*> pFoldr_ng alg p) | 99 | false | true | 0 | 9 | 41 | 83 | 42 | 41 | null | null |
vito/atomo | src/Atomo/Format/Parser.hs | bsd-3-clause | sExponent :: Parser Segment
sExponent = char 'e' >> return SExponent | 68 | sExponent :: Parser Segment
sExponent = char 'e' >> return SExponent | 68 | sExponent = char 'e' >> return SExponent | 40 | false | true | 0 | 6 | 10 | 24 | 11 | 13 | null | null |
cpettitt/tamien | Tamien/GM/Eval.hs | mit | step :: GmState -> GmState
step state = dispatch i (state { gmCode = is })
where (i:is) = gmCode state | 106 | step :: GmState -> GmState
step state = dispatch i (state { gmCode = is })
where (i:is) = gmCode state | 106 | step state = dispatch i (state { gmCode = is })
where (i:is) = gmCode state | 79 | false | true | 0 | 8 | 24 | 55 | 28 | 27 | null | null |
GaroBrik/haskell-compiler | src/CodeBuilders.hs | gpl-3.0 | showCond Sge = "sge" | 20 | showCond Sge = "sge" | 20 | showCond Sge = "sge" | 20 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
tomberek/rulestesting | src/Control/Arrow/CCA/AExp.hs | bsd-3-clause | fromCCA (Delay i) = [|delay $i |] | 33 | fromCCA (Delay i) = [|delay $i |] | 33 | fromCCA (Delay i) = [|delay $i |] | 33 | false | false | 0 | 6 | 6 | 19 | 10 | 9 | null | null |
UoYCS-plasma/LazySmallCheck2012 | suite/Functionality.hs | bsd-3-clause | expect :: Bool -> IO () -> IO ()
expect True = id | 50 | expect :: Bool -> IO () -> IO ()
expect True = id | 50 | expect True = id | 17 | false | true | 0 | 8 | 13 | 32 | 15 | 17 | null | null |
sdiehl/ghc | libraries/base/GHC/IO/Handle/Internals.hs | bsd-3-clause | flushCharBuffer :: Handle__ -> IO ()
flushCharBuffer h_@Handle__{..} = do
cbuf <- readIORef haCharBuffer
case bufState cbuf of
ReadBuffer -> do
flushCharReadBuffer h_
WriteBuffer ->
-- Nothing to do here. Char buffer on a write Handle is always empty
-- between Handle operations.
-- See [note Buffer Flushing], GHC.IO.Handle.Types.
when (not (isEmptyBuffer cbuf)) $
error "internal IO library error: Char buffer non-empty"
-- -----------------------------------------------------------------------------
-- Writing data (flushing write buffers)
-- flushWriteBuffer flushes the byte buffer iff it contains pending write
-- data. Because the Char buffer on a write Handle is always empty between
-- Handle operations (see [note Buffer Flushing], GHC.IO.Handle.Types),
-- both buffers are empty after this. | 870 | flushCharBuffer :: Handle__ -> IO ()
flushCharBuffer h_@Handle__{..} = do
cbuf <- readIORef haCharBuffer
case bufState cbuf of
ReadBuffer -> do
flushCharReadBuffer h_
WriteBuffer ->
-- Nothing to do here. Char buffer on a write Handle is always empty
-- between Handle operations.
-- See [note Buffer Flushing], GHC.IO.Handle.Types.
when (not (isEmptyBuffer cbuf)) $
error "internal IO library error: Char buffer non-empty"
-- -----------------------------------------------------------------------------
-- Writing data (flushing write buffers)
-- flushWriteBuffer flushes the byte buffer iff it contains pending write
-- data. Because the Char buffer on a write Handle is always empty between
-- Handle operations (see [note Buffer Flushing], GHC.IO.Handle.Types),
-- both buffers are empty after this. | 870 | flushCharBuffer h_@Handle__{..} = do
cbuf <- readIORef haCharBuffer
case bufState cbuf of
ReadBuffer -> do
flushCharReadBuffer h_
WriteBuffer ->
-- Nothing to do here. Char buffer on a write Handle is always empty
-- between Handle operations.
-- See [note Buffer Flushing], GHC.IO.Handle.Types.
when (not (isEmptyBuffer cbuf)) $
error "internal IO library error: Char buffer non-empty"
-- -----------------------------------------------------------------------------
-- Writing data (flushing write buffers)
-- flushWriteBuffer flushes the byte buffer iff it contains pending write
-- data. Because the Char buffer on a write Handle is always empty between
-- Handle operations (see [note Buffer Flushing], GHC.IO.Handle.Types),
-- both buffers are empty after this. | 833 | false | true | 0 | 15 | 175 | 101 | 51 | 50 | null | null |
prb/perpubplat | src/Blog/FrontEnd/Urls.hs | bsd-3-clause | posts_by_tag :: String -> String
posts_by_tag t = "/t/" ++ t | 60 | posts_by_tag :: String -> String
posts_by_tag t = "/t/" ++ t | 60 | posts_by_tag t = "/t/" ++ t | 27 | false | true | 0 | 5 | 10 | 22 | 11 | 11 | null | null |
nick8325/kbc | src/Twee/Term.hs | bsd-3-clause | -- | Construct a substitution from a list.
-- Returns @Nothing@ if a variable is bound to several different terms.
listToSubst :: [(Var, Term f)] -> Maybe (Subst f)
listToSubst sub = matchList pat t
where
pat = buildList (map (var . fst) sub)
t = buildList (map snd sub)
--------------------------------------------------------------------------------
-- Matching.
--------------------------------------------------------------------------------
-- | @'match' pat t@ matches the term @t@ against the pattern @pat@.
| 529 | listToSubst :: [(Var, Term f)] -> Maybe (Subst f)
listToSubst sub = matchList pat t
where
pat = buildList (map (var . fst) sub)
t = buildList (map snd sub)
--------------------------------------------------------------------------------
-- Matching.
--------------------------------------------------------------------------------
-- | @'match' pat t@ matches the term @t@ against the pattern @pat@.
| 414 | listToSubst sub = matchList pat t
where
pat = buildList (map (var . fst) sub)
t = buildList (map snd sub)
--------------------------------------------------------------------------------
-- Matching.
--------------------------------------------------------------------------------
-- | @'match' pat t@ matches the term @t@ against the pattern @pat@.
| 364 | true | true | 0 | 9 | 81 | 92 | 49 | 43 | null | null |
rgrinberg/wai | warp/Network/Wai/Handler/Warp/HTTP2/Receiver.hs | mit | stream FrameWindowUpdate header@FrameHeader{streamId} bs _ s Stream{streamWindow} = do
WindowUpdateFrame n <- guardIt $ decodeWindowUpdateFrame header bs
w <- (n +) <$> atomically (readTVar streamWindow)
when (isWindowOverflow w) $
E.throwIO $ StreamError FlowControlError streamId
atomically $ writeTVar streamWindow w
return s | 356 | stream FrameWindowUpdate header@FrameHeader{streamId} bs _ s Stream{streamWindow} = do
WindowUpdateFrame n <- guardIt $ decodeWindowUpdateFrame header bs
w <- (n +) <$> atomically (readTVar streamWindow)
when (isWindowOverflow w) $
E.throwIO $ StreamError FlowControlError streamId
atomically $ writeTVar streamWindow w
return s | 356 | stream FrameWindowUpdate header@FrameHeader{streamId} bs _ s Stream{streamWindow} = do
WindowUpdateFrame n <- guardIt $ decodeWindowUpdateFrame header bs
w <- (n +) <$> atomically (readTVar streamWindow)
when (isWindowOverflow w) $
E.throwIO $ StreamError FlowControlError streamId
atomically $ writeTVar streamWindow w
return s | 356 | false | false | 0 | 11 | 68 | 124 | 56 | 68 | null | null |
harendra-kumar/asyncly | src/Streamly/Streams/StreamK/Type.hs | bsd-3-clause | map :: IsStream t => (a -> b) -> t m a -> t m b
map f xs = buildS (\c n -> foldrS (mapFB c f) n xs) | 99 | map :: IsStream t => (a -> b) -> t m a -> t m b
map f xs = buildS (\c n -> foldrS (mapFB c f) n xs) | 99 | map f xs = buildS (\c n -> foldrS (mapFB c f) n xs) | 51 | false | true | 0 | 10 | 29 | 81 | 38 | 43 | null | null |
brendanhay/gogol | gogol-compute/gen/Network/Google/Resource/Compute/Instances/SetLabels.hs | mpl-2.0 | -- | Creates a value of 'InstancesSetLabels' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'islRequestId'
--
-- * 'islProject'
--
-- * 'islZone'
--
-- * 'islPayload'
--
-- * 'islInstance'
instancesSetLabels
:: Text -- ^ 'islProject'
-> Text -- ^ 'islZone'
-> InstancesSetLabelsRequest -- ^ 'islPayload'
-> Text -- ^ 'islInstance'
-> InstancesSetLabels
instancesSetLabels pIslProject_ pIslZone_ pIslPayload_ pIslInstance_ =
InstancesSetLabels'
{ _islRequestId = Nothing
, _islProject = pIslProject_
, _islZone = pIslZone_
, _islPayload = pIslPayload_
, _islInstance = pIslInstance_
} | 715 | instancesSetLabels
:: Text -- ^ 'islProject'
-> Text -- ^ 'islZone'
-> InstancesSetLabelsRequest -- ^ 'islPayload'
-> Text -- ^ 'islInstance'
-> InstancesSetLabels
instancesSetLabels pIslProject_ pIslZone_ pIslPayload_ pIslInstance_ =
InstancesSetLabels'
{ _islRequestId = Nothing
, _islProject = pIslProject_
, _islZone = pIslZone_
, _islPayload = pIslPayload_
, _islInstance = pIslInstance_
} | 440 | instancesSetLabels pIslProject_ pIslZone_ pIslPayload_ pIslInstance_ =
InstancesSetLabels'
{ _islRequestId = Nothing
, _islProject = pIslProject_
, _islZone = pIslZone_
, _islPayload = pIslPayload_
, _islInstance = pIslInstance_
} | 256 | true | true | 0 | 8 | 146 | 85 | 56 | 29 | null | null |
gridaphobe/ghc | utils/genapply/Main.hs | bsd-3-clause | argRep L = text "L_" | 22 | argRep L = text "L_" | 22 | argRep L = text "L_" | 22 | false | false | 0 | 5 | 6 | 12 | 5 | 7 | null | null |
freebsd-haskell/hsporter | Distribution/FreeBSD/Port.hs | bsd-3-clause | format :: Int -> Maybe Char -> [String] -> [String]
format w t =
map DT.unpack . reverse . uncurry (:) .
(head &&& (map (flip DT.append term) . tail)) .
reverse . map stuff . cut . map DT.pack
where
cut [] = []
cut ws = i : cut (drop (length i) ws)
where i = ideal ws
(width,term) =
case t of
Just x -> (w - 2, DT.pack (' ':x:[]))
Nothing -> (w, DT.pack "")
ideal = minimumBy (compare `on` (dist width . estimate)) . inits
estimate = DT.length . stuff
stuff = DT.intercalate (DT.pack " ")
dist x y = abs (x - y) | 589 | format :: Int -> Maybe Char -> [String] -> [String]
format w t =
map DT.unpack . reverse . uncurry (:) .
(head &&& (map (flip DT.append term) . tail)) .
reverse . map stuff . cut . map DT.pack
where
cut [] = []
cut ws = i : cut (drop (length i) ws)
where i = ideal ws
(width,term) =
case t of
Just x -> (w - 2, DT.pack (' ':x:[]))
Nothing -> (w, DT.pack "")
ideal = minimumBy (compare `on` (dist width . estimate)) . inits
estimate = DT.length . stuff
stuff = DT.intercalate (DT.pack " ")
dist x y = abs (x - y) | 589 | format w t =
map DT.unpack . reverse . uncurry (:) .
(head &&& (map (flip DT.append term) . tail)) .
reverse . map stuff . cut . map DT.pack
where
cut [] = []
cut ws = i : cut (drop (length i) ws)
where i = ideal ws
(width,term) =
case t of
Just x -> (w - 2, DT.pack (' ':x:[]))
Nothing -> (w, DT.pack "")
ideal = minimumBy (compare `on` (dist width . estimate)) . inits
estimate = DT.length . stuff
stuff = DT.intercalate (DT.pack " ")
dist x y = abs (x - y) | 537 | false | true | 14 | 14 | 186 | 349 | 161 | 188 | null | null |
haslab/SecreC | src/Language/SecreC/TypeChecker/Expression.hs | gpl-3.0 | tcExprTy' :: (ProverK loc m) => Type -> Expression GIdentifier (Typed loc) -> TcM m (Expression GIdentifier (Typed loc))
tcExprTy' ty e' = do
let Typed l ty' = loc e'
ppe' <- pp e'
x2 <- tcCoerces l True Nothing (fmap typed e') ty
return $ fmap (Typed l) x2 | 273 | tcExprTy' :: (ProverK loc m) => Type -> Expression GIdentifier (Typed loc) -> TcM m (Expression GIdentifier (Typed loc))
tcExprTy' ty e' = do
let Typed l ty' = loc e'
ppe' <- pp e'
x2 <- tcCoerces l True Nothing (fmap typed e') ty
return $ fmap (Typed l) x2 | 273 | tcExprTy' ty e' = do
let Typed l ty' = loc e'
ppe' <- pp e'
x2 <- tcCoerces l True Nothing (fmap typed e') ty
return $ fmap (Typed l) x2 | 152 | false | true | 0 | 13 | 66 | 142 | 64 | 78 | null | null |
scott-fleischman/greek-grammar | haskell/greek-grammar/src/Data/Unicode/DecomposeChar.hs | mit | decomposeChar '\xF95E' = "\x4E39" | 33 | decomposeChar '\xF95E' = "\x4E39" | 33 | decomposeChar '\xF95E' = "\x4E39" | 33 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
qnikst/distributed-process-client-server | src/Control/Distributed/Process/ManagedProcess/Server/Restricted.hs | bsd-3-clause | -- | A version of "Control.Distributed.Process.ManagedProcess.Server.handleCast"
-- that takes a handler which executes in 'RestrictedProcess'.
--
handleCast :: forall s a . (Serializable a)
=> (a -> RestrictedProcess s RestrictedAction)
-> Dispatcher s
handleCast = handleCastIf (Server.state (const True)) | 329 | handleCast :: forall s a . (Serializable a)
=> (a -> RestrictedProcess s RestrictedAction)
-> Dispatcher s
handleCast = handleCastIf (Server.state (const True)) | 182 | handleCast = handleCastIf (Server.state (const True)) | 53 | true | true | 0 | 10 | 60 | 65 | 35 | 30 | null | null |
jeroennoels/exact-real | src/Ternary/List/FiniteExact.hs | mit | finiteExactToTriad :: FiniteExact -> Triad
finiteExactToTriad (Finite (Exact x p)) = exp3 p * phi x | 99 | finiteExactToTriad :: FiniteExact -> Triad
finiteExactToTriad (Finite (Exact x p)) = exp3 p * phi x | 99 | finiteExactToTriad (Finite (Exact x p)) = exp3 p * phi x | 56 | false | true | 0 | 8 | 15 | 46 | 21 | 25 | null | null |
feumilieu/sicp-haskell | src/SICP/DB.hs | bsd-3-clause | properList Nil = Just [] | 24 | properList Nil = Just [] | 24 | properList Nil = Just [] | 24 | false | false | 1 | 6 | 4 | 17 | 6 | 11 | null | null |
kadena-io/pact | src/Pact/Eval.hs | bsd-3-clause | reduceApp (App (TLam (Lam lamName funTy body _) _) as ai) =
functionApp (DefName lamName) funTy Nothing as body Nothing ai | 124 | reduceApp (App (TLam (Lam lamName funTy body _) _) as ai) =
functionApp (DefName lamName) funTy Nothing as body Nothing ai | 124 | reduceApp (App (TLam (Lam lamName funTy body _) _) as ai) =
functionApp (DefName lamName) funTy Nothing as body Nothing ai | 124 | false | false | 0 | 11 | 22 | 60 | 29 | 31 | null | null |
rueshyna/gogol | gogol-dataflow/gen/Network/Google/Dataflow/Types/Product.hs | mpl-2.0 | -- | True if this counter is reported as the total cumulative aggregate value
-- accumulated since the worker started working on this WorkItem. By
-- default this is false, indicating that this counter is reported as a
-- delta.
cuCumulative :: Lens' CounterUpdate (Maybe Bool)
cuCumulative
= lens _cuCumulative (\ s a -> s{_cuCumulative = a}) | 345 | cuCumulative :: Lens' CounterUpdate (Maybe Bool)
cuCumulative
= lens _cuCumulative (\ s a -> s{_cuCumulative = a}) | 116 | cuCumulative
= lens _cuCumulative (\ s a -> s{_cuCumulative = a}) | 67 | true | true | 1 | 9 | 58 | 55 | 28 | 27 | null | null |
tolysz/yesod | yesod-core/Yesod/Core/Widget.hs | mit | addScriptEither :: MonadWidget m
=> Either (Route (HandlerSite m)) Text
-> m ()
addScriptEither = either addScript addScriptRemote | 162 | addScriptEither :: MonadWidget m
=> Either (Route (HandlerSite m)) Text
-> m ()
addScriptEither = either addScript addScriptRemote | 162 | addScriptEither = either addScript addScriptRemote | 50 | false | true | 0 | 11 | 49 | 49 | 23 | 26 | null | null |
FranklinChen/hugs98-plus-Sep2006 | packages/xhtml/Text/XHtml/Strict/Elements.hs | bsd-3-clause | thecode = tag "code" | 33 | thecode = tag "code" | 33 | thecode = tag "code" | 33 | false | false | 0 | 5 | 16 | 9 | 4 | 5 | null | null |
brendanhay/gogol | gogol-youtube/gen/Network/Google/YouTube/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'PageInfo' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'piResultsPerPage'
--
-- * 'piTotalResults'
pageInfo
:: PageInfo
pageInfo = PageInfo' {_piResultsPerPage = Nothing, _piTotalResults = Nothing} | 314 | pageInfo
:: PageInfo
pageInfo = PageInfo' {_piResultsPerPage = Nothing, _piTotalResults = Nothing} | 102 | pageInfo = PageInfo' {_piResultsPerPage = Nothing, _piTotalResults = Nothing} | 77 | true | true | 0 | 6 | 53 | 32 | 22 | 10 | null | null |
ekmett/generic-deriving | src/Generics/Deriving/TH.hs | bsd-3-clause | rep0Con d (InfixC t1 n t2) = rep0Con d (NormalC n [t1,t2]) | 58 | rep0Con d (InfixC t1 n t2) = rep0Con d (NormalC n [t1,t2]) | 58 | rep0Con d (InfixC t1 n t2) = rep0Con d (NormalC n [t1,t2]) | 58 | false | false | 0 | 8 | 11 | 40 | 20 | 20 | null | null |
fffej/codekatas | GameOfLife/GameOfLife.hs | mit | tickCell' :: [Int] -> Int -> CellState
tickCell' xs s = s `elem` xs | 67 | tickCell' :: [Int] -> Int -> CellState
tickCell' xs s = s `elem` xs | 67 | tickCell' xs s = s `elem` xs | 28 | false | true | 0 | 6 | 13 | 33 | 18 | 15 | null | null |
andorp/hs-bluesnap | src/Bluesnap/API/Response.hs | gpl-3.0 | elementToXMLApplicable_cycles :: Xs.Int -> [Content ()]
elementToXMLApplicable_cycles = schemaTypeToXML "applicable-cycles" | 123 | elementToXMLApplicable_cycles :: Xs.Int -> [Content ()]
elementToXMLApplicable_cycles = schemaTypeToXML "applicable-cycles" | 123 | elementToXMLApplicable_cycles = schemaTypeToXML "applicable-cycles" | 67 | false | true | 0 | 8 | 9 | 28 | 14 | 14 | null | null |
mbelicki/valdemar | src/TypeChecker.hs | gpl-3.0 | hasTheSameLayout (S.TypePointer t1) (S.TypePointer t2) = True | 61 | hasTheSameLayout (S.TypePointer t1) (S.TypePointer t2) = True | 61 | hasTheSameLayout (S.TypePointer t1) (S.TypePointer t2) = True | 61 | false | false | 0 | 8 | 6 | 27 | 13 | 14 | null | null |
alexander-at-github/eta | compiler/ETA/Parser/ApiAnnotation.hs | bsd-3-clause | -- | Retrieve a list of annotation 'SrcSpan's based on the 'SrcSpan'
-- of the annotated AST element, and the known type of the annotation.
getAnnotation :: ApiAnns -> SrcSpan -> AnnKeywordId -> [SrcSpan]
getAnnotation (anns,_) span ann
= case Map.lookup (span,ann) anns of
Nothing -> []
Just ss -> ss
-- | Retrieve a list of annotation 'SrcSpan's based on the 'SrcSpan'
-- of the annotated AST element, and the known type of the annotation.
-- The list is removed from the annotations. | 504 | getAnnotation :: ApiAnns -> SrcSpan -> AnnKeywordId -> [SrcSpan]
getAnnotation (anns,_) span ann
= case Map.lookup (span,ann) anns of
Nothing -> []
Just ss -> ss
-- | Retrieve a list of annotation 'SrcSpan's based on the 'SrcSpan'
-- of the annotated AST element, and the known type of the annotation.
-- The list is removed from the annotations. | 364 | getAnnotation (anns,_) span ann
= case Map.lookup (span,ann) anns of
Nothing -> []
Just ss -> ss
-- | Retrieve a list of annotation 'SrcSpan's based on the 'SrcSpan'
-- of the annotated AST element, and the known type of the annotation.
-- The list is removed from the annotations. | 299 | true | true | 0 | 8 | 101 | 78 | 43 | 35 | null | null |
MaxDaten/yage | src/Yage/Rendering/Pipeline/Deferred/LightPass.hs | mit | spotMesh = mkFromVerticesF "Spotlight" $ map V.Position . vertices . triangles $ cone 1 1 24 | 93 | spotMesh = mkFromVerticesF "Spotlight" $ map V.Position . vertices . triangles $ cone 1 1 24 | 93 | spotMesh = mkFromVerticesF "Spotlight" $ map V.Position . vertices . triangles $ cone 1 1 24 | 93 | false | false | 0 | 10 | 16 | 37 | 17 | 20 | null | null |
JoeyEremondi/utrecht-apa-p1 | src/Generate/Cases.hs | bsd-3-clause | isVar :: ([P.Pattern var], expr) -> Bool
isVar p = not (isCon p) | 64 | isVar :: ([P.Pattern var], expr) -> Bool
isVar p = not (isCon p) | 64 | isVar p = not (isCon p) | 23 | false | true | 0 | 9 | 12 | 41 | 21 | 20 | null | null |
haroldcarr/learn-haskell-coq-ml-etc | haskell/course/2013-11-coursera-fp-odersky-but-in-haskell/FP03ObjSetsTweetSetTest.hs | unlicense | appleKeywords = ["ios", "iOS", "iphone", "iPhone", "ipad", "iPad"] | 67 | appleKeywords = ["ios", "iOS", "iphone", "iPhone", "ipad", "iPad"] | 67 | appleKeywords = ["ios", "iOS", "iphone", "iPhone", "ipad", "iPad"] | 67 | false | false | 0 | 5 | 8 | 24 | 15 | 9 | null | null |
DaMSL/K3 | src/Language/K3/Analysis/Provenance/Inference.hs | apache-2.0 | palkups :: PAEnv -> Identifier -> Except Text PMEnv
palkups env x = BEnv.lookup env x | 85 | palkups :: PAEnv -> Identifier -> Except Text PMEnv
palkups env x = BEnv.lookup env x | 85 | palkups env x = BEnv.lookup env x | 33 | false | true | 0 | 7 | 15 | 36 | 17 | 19 | null | null |
gokhankici/symmetry | checker/src/Symmetry/SymbEx.hs | mit | opPred :: IL.Op -> AbsVal a -> AbsVal a -> IL.Pred
opPred o (AInt _ (Just i)) (AInt _ (Just j))
= IL.ILBop o (IL.EInt i) (IL.EInt j) | 134 | opPred :: IL.Op -> AbsVal a -> AbsVal a -> IL.Pred
opPred o (AInt _ (Just i)) (AInt _ (Just j))
= IL.ILBop o (IL.EInt i) (IL.EInt j) | 134 | opPred o (AInt _ (Just i)) (AInt _ (Just j))
= IL.ILBop o (IL.EInt i) (IL.EInt j) | 83 | false | true | 0 | 13 | 29 | 100 | 46 | 54 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.