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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
mapinguari/SC_HS_Proxy | src/Proxy/Query/Unit.hs | mit | isWorker CritterRhynadon = False | 32 | isWorker CritterRhynadon = False | 32 | isWorker CritterRhynadon = False | 32 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
harendra-kumar/asyncly | benchmark/StreamDOps.hs | bsd-3-clause | filterMap n = composeN n $ S.map (subtract 1) . S.filter (<= maxValue) | 71 | filterMap n = composeN n $ S.map (subtract 1) . S.filter (<= maxValue) | 71 | filterMap n = composeN n $ S.map (subtract 1) . S.filter (<= maxValue) | 71 | false | false | 0 | 9 | 13 | 40 | 19 | 21 | null | null |
kadena-io/pact | src/Pact/Types/Util.hs | bsd-3-clause | -- | Text-y show
tShow :: Show a => a -> Text
tShow = pack . show | 65 | tShow :: Show a => a -> Text
tShow = pack . show | 48 | tShow = pack . show | 19 | true | true | 0 | 6 | 16 | 27 | 14 | 13 | null | null |
apyrgio/snf-ganeti | src/Ganeti/OpParams.hs | bsd-2-clause | pVmCapable :: Field
pVmCapable =
withDoc "Whether node can host instances" .
optionalField $ booleanField "vm_capable" | 122 | pVmCapable :: Field
pVmCapable =
withDoc "Whether node can host instances" .
optionalField $ booleanField "vm_capable" | 122 | pVmCapable =
withDoc "Whether node can host instances" .
optionalField $ booleanField "vm_capable" | 102 | false | true | 0 | 7 | 19 | 25 | 12 | 13 | null | null |
lukemaurer/sequent-core | src/Language/SequentCore/OccurAnal.hs | bsd-3-clause | occurAnalyseJoin :: SeqCoreJoin -> SeqCoreJoin
occurAnalyseJoin pk
= snd (occAnalJoin env pk)
where
env = initOccEnv all_active_rules
all_active_rules = \_ -> True
{-
%************************************************************************
%* ... | 564 | occurAnalyseJoin :: SeqCoreJoin -> SeqCoreJoin
occurAnalyseJoin pk
= snd (occAnalJoin env pk)
where
env = initOccEnv all_active_rules
all_active_rules = \_ -> True
{-
%************************************************************************
%* ... | 564 | occurAnalyseJoin pk
= snd (occAnalJoin env pk)
where
env = initOccEnv all_active_rules
all_active_rules = \_ -> True
{-
%************************************************************************
%* *
\subsection[OccurAnal-main]{Counting o... | 517 | false | true | 0 | 7 | 189 | 51 | 26 | 25 | null | null |
DanielSchiavini/ampersand | src/Database/Design/Ampersand/Input/ADL1/FilePos.hs | gpl-3.0 | updatePos pos _ = addPos 1 pos | 33 | updatePos pos _ = addPos 1 pos | 33 | updatePos pos _ = addPos 1 pos | 33 | false | false | 0 | 5 | 9 | 16 | 7 | 9 | null | null |
zlizta/PiSigma | src/Language/PiSigma/Lexer.hs | bsd-3-clause | semi :: Parser String
semi = Token.semi tokenParser | 88 | semi :: Parser String
semi = Token.semi tokenParser | 88 | semi = Token.semi tokenParser | 53 | false | true | 0 | 6 | 44 | 19 | 9 | 10 | null | null |
icyfork/shellcheck | ShellCheck/Parser.hs | gpl-3.0 | makeErrorFor parsecError =
ParseNote (errorPos parsecError) ErrorC 1072 $
getStringFromParsec $ errorMessages parsecError | 133 | makeErrorFor parsecError =
ParseNote (errorPos parsecError) ErrorC 1072 $
getStringFromParsec $ errorMessages parsecError | 133 | makeErrorFor parsecError =
ParseNote (errorPos parsecError) ErrorC 1072 $
getStringFromParsec $ errorMessages parsecError | 133 | false | false | 0 | 9 | 24 | 33 | 15 | 18 | null | null |
yesodweb/shakespeare | test/Text/CssSpec.hs | mit | caseCassiusSingleComment :: Assertion
caseCassiusSingleComment =
flip celper [cassius|
/*
this is a comment
*/
|] "" | 152 | caseCassiusSingleComment :: Assertion
caseCassiusSingleComment =
flip celper [cassius|
/*
this is a comment
*/
|] "" | 152 | caseCassiusSingleComment =
flip celper [cassius|
/*
this is a comment
*/
|] "" | 114 | false | true | 0 | 5 | 51 | 22 | 13 | 9 | null | null |
RefactoringTools/HaRe | old/testing/evalAddEvalMon/Scope3.hs | bsd-3-clause | b = f 76 | 8 | b = f 76 | 8 | b = f 76 | 8 | false | false | 1 | 5 | 3 | 12 | 4 | 8 | null | null |
sboosali/commands-spiros | config/Commands/Plugins/Spiros/Macros.hs | gpl-2.0 | renderMagicSymbol = \case
ColoredMagicSymbol x -> renderMagicColor x
HybridMagicColor x y -> (renderMagicColor x) ++ (renderMagicColor y)
GenericHybridMagicColor x -> "2" ++ renderMagicColor x
LifeMagicColor x -> "P" ++ renderMagicColor x | 250 | renderMagicSymbol = \case
ColoredMagicSymbol x -> renderMagicColor x
HybridMagicColor x y -> (renderMagicColor x) ++ (renderMagicColor y)
GenericHybridMagicColor x -> "2" ++ renderMagicColor x
LifeMagicColor x -> "P" ++ renderMagicColor x | 250 | renderMagicSymbol = \case
ColoredMagicSymbol x -> renderMagicColor x
HybridMagicColor x y -> (renderMagicColor x) ++ (renderMagicColor y)
GenericHybridMagicColor x -> "2" ++ renderMagicColor x
LifeMagicColor x -> "P" ++ renderMagicColor x | 250 | false | false | 0 | 10 | 42 | 79 | 36 | 43 | null | null |
prowdsponsor/mangopay | yesod-mangopay/app/Handler/Card.hs | bsd-3-clause | postCardR :: AnyUserId -> Handler Html
postCardR uid=do
((result, _), _) <- runFormPost cardTokenForm
mjcr<-lookupSession "cardReg"
deleteSession "cardReg"
case result of
FormSuccess (Token dat)->
case mjcr of
Nothing->do
$(logError) $ "lookupSession->Nothing"
setMessageI M... | 938 | postCardR :: AnyUserId -> Handler Html
postCardR uid=do
((result, _), _) <- runFormPost cardTokenForm
mjcr<-lookupSession "cardReg"
deleteSession "cardReg"
case result of
FormSuccess (Token dat)->
case mjcr of
Nothing->do
$(logError) $ "lookupSession->Nothing"
setMessageI M... | 938 | postCardR uid=do
((result, _), _) <- runFormPost cardTokenForm
mjcr<-lookupSession "cardReg"
deleteSession "cardReg"
case result of
FormSuccess (Token dat)->
case mjcr of
Nothing->do
$(logError) $ "lookupSession->Nothing"
setMessageI MsgErrorData
redirect $ CardR ... | 899 | false | true | 0 | 26 | 313 | 293 | 129 | 164 | null | null |
beni55/haste-compiler | libraries/ghc-7.10/base/Text/Printf.hs | bsd-3-clause | errorShortFormat, errorMissingArgument, errorBadArgument :: a
-- | Calls 'perror' to indicate that the format string ended
-- early.
--
-- @since 4.7.0.0
errorShortFormat = perror "formatting string ended prematurely" | 217 | errorShortFormat, errorMissingArgument, errorBadArgument :: a
errorShortFormat = perror "formatting string ended prematurely" | 125 | errorShortFormat = perror "formatting string ended prematurely" | 63 | true | true | 0 | 5 | 28 | 22 | 15 | 7 | null | null |
JakDar/lab6-project | src/Ex1.hs | bsd-3-clause | -- | Packs a type into Maybe context
insertMaybe :: a -> Maybe a
insertMaybe = Just | 83 | insertMaybe :: a -> Maybe a
insertMaybe = Just | 46 | insertMaybe = Just | 18 | true | true | 0 | 6 | 16 | 19 | 10 | 9 | null | null |
DanielSchiavini/ampersand | src/Database/Design/Ampersand/Input/ADL1/ParsingLib.hs | gpl-3.0 | pComma :: AmpParser String
pComma = pSpec ',' | 46 | pComma :: AmpParser String
pComma = pSpec ',' | 46 | pComma = pSpec ',' | 19 | false | true | 0 | 5 | 8 | 17 | 8 | 9 | null | null |
gigavinyl/ordermage | src/Api/User.hs | mit | userServer :: Server UserApi
userServer =
getUsers :<|>
getUserById | 71 | userServer :: Server UserApi
userServer =
getUsers :<|>
getUserById | 71 | userServer =
getUsers :<|>
getUserById | 42 | false | true | 0 | 5 | 12 | 18 | 9 | 9 | null | null |
alexander-at-github/eta | compiler/ETA/Main/DriverPipeline.hs | bsd-3-clause | compileOne :: HscEnv
-> ModSummary -- ^ summary for module being compiled
-> Int -- ^ module N ...
-> Int -- ^ ... of M
-> Maybe ModIface -- ^ old interface, if we have one
-> Maybe Linkable -- ^ old linkable, if we have one
... | 465 | compileOne :: HscEnv
-> ModSummary -- ^ summary for module being compiled
-> Int -- ^ module N ...
-> Int -- ^ ... of M
-> Maybe ModIface -- ^ old interface, if we have one
-> Maybe Linkable -- ^ old linkable, if we have one
... | 417 | compileOne = compileOne' Nothing (Just batchMsg) | 48 | true | true | 0 | 12 | 176 | 65 | 34 | 31 | null | null |
spechub/Hets | Common/Keywords.hs | gpl-2.0 | whenS :: String
whenS = "when" | 30 | whenS :: String
whenS = "when" | 30 | whenS = "when" | 14 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
rueshyna/gogol | gogol-youtube/gen/Network/Google/YouTube/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'CaptionListResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'cEtag'
--
-- * 'cKind'
--
-- * 'cItems'
--
-- * 'cVisitorId'
--
-- * 'cEventId'
captionListResponse
:: CaptionListResponse
captionListRe... | 505 | captionListResponse
:: CaptionListResponse
captionListResponse =
CaptionListResponse'
{ _cEtag = Nothing
, _cKind = "youtube#captionListResponse"
, _cItems = Nothing
, _cVisitorId = Nothing
, _cEventId = Nothing
} | 245 | captionListResponse =
CaptionListResponse'
{ _cEtag = Nothing
, _cKind = "youtube#captionListResponse"
, _cItems = Nothing
, _cVisitorId = Nothing
, _cEventId = Nothing
} | 198 | true | true | 0 | 6 | 108 | 56 | 40 | 16 | null | null |
joehillen/aura | src/Aura/Languages.hs | gpl-3.0 | cleanABSTree_1 :: Language -> String
cleanABSTree_1 = \case
Japanese -> "ABS Treeの中身を削除?"
Croatian -> "Obrisati cijelo ABS stablo?"
German -> "Den gesamten ABS-Baum löschen?"
Norwegian -> "Slett hele ABS-treet?"
Italian -> "Cancellare l'intero albero ABS?"
Portuguese -> "Remover a ár... | 566 | cleanABSTree_1 :: Language -> String
cleanABSTree_1 = \case
Japanese -> "ABS Treeの中身を削除?"
Croatian -> "Obrisati cijelo ABS stablo?"
German -> "Den gesamten ABS-Baum löschen?"
Norwegian -> "Slett hele ABS-treet?"
Italian -> "Cancellare l'intero albero ABS?"
Portuguese -> "Remover a ár... | 566 | cleanABSTree_1 = \case
Japanese -> "ABS Treeの中身を削除?"
Croatian -> "Obrisati cijelo ABS stablo?"
German -> "Den gesamten ABS-Baum löschen?"
Norwegian -> "Slett hele ABS-treet?"
Italian -> "Cancellare l'intero albero ABS?"
Portuguese -> "Remover a árvore ABS inteira?"
French -> ... | 529 | false | true | 0 | 8 | 142 | 85 | 41 | 44 | null | null |
bgamari/shaking-up-ghc | src/Settings/Default.hs | bsd-3-clause | defaultBuilderArgs :: Args
defaultBuilderArgs = mconcat
-- GHC-specific builders:
[ alexBuilderArgs
, ccBuilderArgs
, configureBuilderArgs
, deriveConstantsBuilderArgs
, genPrimopCodeBuilderArgs
, ghcBuilderArgs
, ghcCabalBuilderArgs
, ghcPkgBuilderArgs
, haddockBuilderArgs
,... | 969 | defaultBuilderArgs :: Args
defaultBuilderArgs = mconcat
-- GHC-specific builders:
[ alexBuilderArgs
, ccBuilderArgs
, configureBuilderArgs
, deriveConstantsBuilderArgs
, genPrimopCodeBuilderArgs
, ghcBuilderArgs
, ghcCabalBuilderArgs
, ghcPkgBuilderArgs
, haddockBuilderArgs
,... | 969 | defaultBuilderArgs = mconcat
-- GHC-specific builders:
[ alexBuilderArgs
, ccBuilderArgs
, configureBuilderArgs
, deriveConstantsBuilderArgs
, genPrimopCodeBuilderArgs
, ghcBuilderArgs
, ghcCabalBuilderArgs
, ghcPkgBuilderArgs
, haddockBuilderArgs
, happyBuilderArgs
, hsc... | 942 | false | true | 0 | 9 | 211 | 225 | 125 | 100 | null | null |
phaazon/linear | src/Linear/Matrix.hs | bsd-3-clause | -- |3x3 matrix inverse.
--
-- >>> inv33 $ V3 (V3 1 2 4) (V3 4 2 2) (V3 1 1 1)
-- Just (V3 (V3 0.0 0.5 (-1.0)) (V3 (-0.5) (-0.75) 3.5) (V3 0.5 0.25 (-1.5)))
inv33 :: (Epsilon a, Floating a) => M33 a -> Maybe (M33 a)
inv33 m@(V3 (V3 a b c)
(V3 d e f)
(V3 g h i))
| nearZero det = Nothing
| othe... | 842 | inv33 :: (Epsilon a, Floating a) => M33 a -> Maybe (M33 a)
inv33 m@(V3 (V3 a b c)
(V3 d e f)
(V3 g h i))
| nearZero det = Nothing
| otherwise = Just $ (1 / det) *!! V3 (V3 a' b' c')
(V3 d' e' f')
(V3 g' h' i')
... | 686 | inv33 m@(V3 (V3 a b c)
(V3 d e f)
(V3 g h i))
| nearZero det = Nothing
| otherwise = Just $ (1 / det) *!! V3 (V3 a' b' c')
(V3 d' e' f')
(V3 g' h' i')
where a' = cofactor (e,f,h,i)
b' = cofactor (c,b,i,... | 627 | true | true | 11 | 10 | 333 | 397 | 219 | 178 | null | null |
bmillwood/stepeval | src/Language/Haskell/Stepeval.hs | bsd-3-clause | funName (Match _ n _ _ _ _ : ms) = foldr match n ms
where
match (Match _ m _ _ _ _) n | m == n = n
match m n = error $ "Match names don't? " ++ show (m, n)
-- | Counts the number of patterns on the LHS of function equations.
-- Error if the patterns have different numbers of arguments | 291 | funName (Match _ n _ _ _ _ : ms) = foldr match n ms
where
match (Match _ m _ _ _ _) n | m == n = n
match m n = error $ "Match names don't? " ++ show (m, n)
-- | Counts the number of patterns on the LHS of function equations.
-- Error if the patterns have different numbers of arguments | 291 | funName (Match _ n _ _ _ _ : ms) = foldr match n ms
where
match (Match _ m _ _ _ _) n | m == n = n
match m n = error $ "Match names don't? " ++ show (m, n)
-- | Counts the number of patterns on the LHS of function equations.
-- Error if the patterns have different numbers of arguments | 291 | false | false | 0 | 8 | 73 | 104 | 51 | 53 | null | null |
jstolarek/ghc | compiler/main/DriverPipeline.hs | bsd-3-clause | runPhase (RealPhase LlvmLlc) input_fn dflags
= do
ver <- liftIO $ readIORef (llvmVersion dflags)
let opt_lvl = max 0 (min 2 $ optLevel dflags)
-- iOS requires external references to be loaded indirectly from the
-- DATA segment or dyld traps at runtime writing into TEXT: see #7722
rmo... | 4,646 | runPhase (RealPhase LlvmLlc) input_fn dflags
= do
ver <- liftIO $ readIORef (llvmVersion dflags)
let opt_lvl = max 0 (min 2 $ optLevel dflags)
-- iOS requires external references to be loaded indirectly from the
-- DATA segment or dyld traps at runtime writing into TEXT: see #7722
rmo... | 4,646 | runPhase (RealPhase LlvmLlc) input_fn dflags
= do
ver <- liftIO $ readIORef (llvmVersion dflags)
let opt_lvl = max 0 (min 2 $ optLevel dflags)
-- iOS requires external references to be loaded indirectly from the
-- DATA segment or dyld traps at runtime writing into TEXT: see #7722
rmo... | 4,646 | false | false | 0 | 20 | 1,911 | 897 | 441 | 456 | null | null |
TomHammersley/HaskellRenderer | app/src/Tests/ColourTest.hs | gpl-2.0 | test_Luminance0 = TestCase (assertEqual "Luminance = 0" expected (luminance v1))
where
v1 = Colour 0 0 0 0
expected = 0 | 135 | test_Luminance0 = TestCase (assertEqual "Luminance = 0" expected (luminance v1))
where
v1 = Colour 0 0 0 0
expected = 0 | 135 | test_Luminance0 = TestCase (assertEqual "Luminance = 0" expected (luminance v1))
where
v1 = Colour 0 0 0 0
expected = 0 | 135 | false | false | 3 | 8 | 36 | 60 | 23 | 37 | null | null |
zcleghern/hchess | src/ChessBoard.hs | mit | southOf :: Coord -> Coord -> Bool
southOf (Coord _ y1) (Coord _ y2) = y1 > y2 | 77 | southOf :: Coord -> Coord -> Bool
southOf (Coord _ y1) (Coord _ y2) = y1 > y2 | 77 | southOf (Coord _ y1) (Coord _ y2) = y1 > y2 | 43 | false | true | 0 | 10 | 17 | 50 | 23 | 27 | null | null |
NightRa/Idris-dev | src/IRTS/CodegenC.hs | bsd-3-clause | doOp v (LSLt (ATInt ITNative)) [l, r] = v ++ "INTOP(<," ++ creg l ++ ", " ++ creg r ++ ")" | 90 | doOp v (LSLt (ATInt ITNative)) [l, r] = v ++ "INTOP(<," ++ creg l ++ ", " ++ creg r ++ ")" | 90 | doOp v (LSLt (ATInt ITNative)) [l, r] = v ++ "INTOP(<," ++ creg l ++ ", " ++ creg r ++ ")" | 90 | false | false | 0 | 9 | 21 | 57 | 28 | 29 | null | null |
themoritz/cabal | Cabal/Distribution/PackageDescription/PrettyPrint.hs | bsd-3-clause | ppCondition (CAnd c1 c2) = parens (hsep [ppCondition c1, text "&&"
<+> ppCondition c2]) | 160 | ppCondition (CAnd c1 c2) = parens (hsep [ppCondition c1, text "&&"
<+> ppCondition c2]) | 160 | ppCondition (CAnd c1 c2) = parens (hsep [ppCondition c1, text "&&"
<+> ppCondition c2]) | 160 | false | false | 0 | 10 | 86 | 46 | 21 | 25 | null | null |
tjhunter/karps | haskell/test/Spark/Core/Internal/PathsSpec.hs | apache-2.0 | gatherings :: [(String, [[String]])] -> M.Map VertexId [[VertexId]]
gatherings [] = M.empty | 91 | gatherings :: [(String, [[String]])] -> M.Map VertexId [[VertexId]]
gatherings [] = M.empty | 91 | gatherings [] = M.empty | 23 | false | true | 0 | 9 | 11 | 50 | 28 | 22 | null | null |
tolysz/vector-algorithms | bench/Main.hs | bsd-3-clause | options :: [OptDescr OptionsT]
options = [ Option ['A'] ["algorithm"] (ReqArg parseAlgo "ALGO")
("Specify an algorithm to be run. Options:\n" ++ algoOpts)
, Option ['n'] ["num-elems"] (ReqArg parseN "INT")
"Specify the size of arrays in algorithms."
, Option ... | 944 | options :: [OptDescr OptionsT]
options = [ Option ['A'] ["algorithm"] (ReqArg parseAlgo "ALGO")
("Specify an algorithm to be run. Options:\n" ++ algoOpts)
, Option ['n'] ["num-elems"] (ReqArg parseN "INT")
"Specify the size of arrays in algorithms."
, Option ... | 944 | options = [ Option ['A'] ["algorithm"] (ReqArg parseAlgo "ALGO")
("Specify an algorithm to be run. Options:\n" ++ algoOpts)
, Option ['n'] ["num-elems"] (ReqArg parseN "INT")
"Specify the size of arrays in algorithms."
, Option ['k'] ["portion"] (ReqArg... | 913 | false | true | 0 | 12 | 299 | 319 | 168 | 151 | null | null |
xrchz/ot | OpenTheory/Write.hs | gpl-3.0 | -- |Run an article-writing action on the supplied destination.
-- The article-writing state starts empty.
evalWM :: WM a -> Handle -> IO a
evalWM m h = evalWMState m h initialState | 180 | evalWM :: WM a -> Handle -> IO a
evalWM m h = evalWMState m h initialState | 74 | evalWM m h = evalWMState m h initialState | 41 | true | true | 0 | 7 | 31 | 39 | 19 | 20 | null | null |
Happstack/happstack-server | src/Happstack/Server/Internal/Types.hs | bsd-3-clause | continueHTTP :: Request -> Response -> Bool
continueHTTP rq rs =
(isHTTP1_0 rq && checkHeaderBS connectionC keepaliveC rq &&
(rsfLength (rsFlags rs) == ContentLength || isNoMessageBodyResponse rs)) ||
(isHTTP1_1 rq && not (checkHeaderBS connectionC closeC rq) &&
(rsfLength (rsFlags rs) /= NoCont... | 901 | continueHTTP :: Request -> Response -> Bool
continueHTTP rq rs =
(isHTTP1_0 rq && checkHeaderBS connectionC keepaliveC rq &&
(rsfLength (rsFlags rs) == ContentLength || isNoMessageBodyResponse rs)) ||
(isHTTP1_1 rq && not (checkHeaderBS connectionC closeC rq) &&
(rsfLength (rsFlags rs) /= NoCont... | 901 | continueHTTP rq rs =
(isHTTP1_0 rq && checkHeaderBS connectionC keepaliveC rq &&
(rsfLength (rsFlags rs) == ContentLength || isNoMessageBodyResponse rs)) ||
(isHTTP1_1 rq && not (checkHeaderBS connectionC closeC rq) &&
(rsfLength (rsFlags rs) /= NoContentLength || isNoMessageBodyResponse rs))
... | 857 | false | true | 0 | 13 | 224 | 211 | 107 | 104 | null | null |
matthewSorensen/weft | Robotics/Thingomatic/Setup.hs | gpl-3.0 | zig::Double->Point2->[Point2]
zig dx (x',dy) = zipWith (<+>) [(x,y)| x <- [0,dx..x'],y<-[0,0]] $ cycle [(0,0),(0,dy),(0,dy),(0,0)] | 131 | zig::Double->Point2->[Point2]
zig dx (x',dy) = zipWith (<+>) [(x,y)| x <- [0,dx..x'],y<-[0,0]] $ cycle [(0,0),(0,dy),(0,dy),(0,0)] | 131 | zig dx (x',dy) = zipWith (<+>) [(x,y)| x <- [0,dx..x'],y<-[0,0]] $ cycle [(0,0),(0,dy),(0,dy),(0,0)] | 101 | false | true | 0 | 10 | 14 | 122 | 72 | 50 | null | null |
jmitchell/Idris-dev | src/Idris/REPL.hs | bsd-3-clause | pprintDef :: Bool -> Name -> Idris [Doc OutputAnnotation]
pprintDef asCore n =
do ist <- getIState
ctxt <- getContext
let ambiguous = length (lookupNames n ctxt) > 1
patdefs = idris_patdefs ist
tyinfo = idris_datatypes ist
if asCore
then return $ map (ppCoreDef ist) (lookupCtxt... | 2,586 | pprintDef :: Bool -> Name -> Idris [Doc OutputAnnotation]
pprintDef asCore n =
do ist <- getIState
ctxt <- getContext
let ambiguous = length (lookupNames n ctxt) > 1
patdefs = idris_patdefs ist
tyinfo = idris_datatypes ist
if asCore
then return $ map (ppCoreDef ist) (lookupCtxt... | 2,586 | pprintDef asCore n =
do ist <- getIState
ctxt <- getContext
let ambiguous = length (lookupNames n ctxt) > 1
patdefs = idris_patdefs ist
tyinfo = idris_datatypes ist
if asCore
then return $ map (ppCoreDef ist) (lookupCtxtName n patdefs)
else return $ map (ppDef ambiguous ... | 2,528 | false | true | 56 | 15 | 921 | 958 | 498 | 460 | null | null |
vikraman/ghc | compiler/typecheck/TcRnTypes.hs | bsd-3-clause | -- | Get the role relevant for a 'CtEvidence'
ctEvRole :: CtEvidence -> Role
ctEvRole = eqRelRole . ctEvEqRel | 109 | ctEvRole :: CtEvidence -> Role
ctEvRole = eqRelRole . ctEvEqRel | 63 | ctEvRole = eqRelRole . ctEvEqRel | 32 | true | true | 1 | 7 | 18 | 28 | 12 | 16 | null | null |
AlexeyRaga/eta | compiler/ETA/Main/DynFlags.hs | bsd-3-clause | -- -----------------------------------------------------------------------------
-- Standard sets of warning options
-- Note [Documenting warning flags]
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
-- If you change the list of warning enabled by default
-- please remember to update the User's Guide. The relevant file is:
--... | 1,206 | standardWarnings :: [WarningFlag]
standardWarnings -- see Note [Documenting warning flags]
= [ Opt_WarnOverlappingPatterns,
Opt_WarnWarningsDeprecations,
Opt_WarnDeprecatedFlags,
Opt_WarnTypedHoles,
Opt_WarnPartialTypeSignatures,
Opt_WarnUnrecognisedPragmas,
Opt_WarnP... | 851 | standardWarnings -- see Note [Documenting warning flags]
= [ Opt_WarnOverlappingPatterns,
Opt_WarnWarningsDeprecations,
Opt_WarnDeprecatedFlags,
Opt_WarnTypedHoles,
Opt_WarnPartialTypeSignatures,
Opt_WarnUnrecognisedPragmas,
Opt_WarnPointlessPragmas,
Opt_WarnD... | 817 | true | true | 0 | 5 | 249 | 87 | 60 | 27 | null | null |
joshuaunderwood7/HaskeLinGeom | Piece.hs | gpl-3.0 | transColor piece
| color piece == Black = makeChessPiece White (rank piece) (location piece)
| color piece == White = makeChessPiece Black (rank piece) (location piece)
| otherwise = piece | 201 | transColor piece
| color piece == Black = makeChessPiece White (rank piece) (location piece)
| color piece == White = makeChessPiece Black (rank piece) (location piece)
| otherwise = piece | 201 | transColor piece
| color piece == Black = makeChessPiece White (rank piece) (location piece)
| color piece == White = makeChessPiece Black (rank piece) (location piece)
| otherwise = piece | 201 | false | false | 0 | 9 | 42 | 93 | 41 | 52 | null | null |
bbangert/hermes-hs | test/HermesSpec.hs | mpl-2.0 | main :: IO ()
main = hspec spec | 31 | main :: IO ()
main = hspec spec | 31 | main = hspec spec | 17 | false | true | 1 | 6 | 7 | 22 | 9 | 13 | null | null |
mauroblanco/fpnla-examples | src-test/TestBase.hs | bsd-3-clause | arbitraryTransMatrix :: (Arbitrary e, Matrix m e) => TransType a -> Int -> Int -> Gen (TransType (m e))
arbitraryTransMatrix (NoTrans _) m n = liftA NoTrans $ arbitraryMatrix m n | 178 | arbitraryTransMatrix :: (Arbitrary e, Matrix m e) => TransType a -> Int -> Int -> Gen (TransType (m e))
arbitraryTransMatrix (NoTrans _) m n = liftA NoTrans $ arbitraryMatrix m n | 178 | arbitraryTransMatrix (NoTrans _) m n = liftA NoTrans $ arbitraryMatrix m n | 74 | false | true | 0 | 13 | 30 | 83 | 40 | 43 | null | null |
nevvi/Declarative-D7012E | pre2/expr.hs | gpl-3.0 | eval (Op "+" left right) env = eval left env + eval right env | 61 | eval (Op "+" left right) env = eval left env + eval right env | 61 | eval (Op "+" left right) env = eval left env + eval right env | 61 | false | false | 1 | 8 | 13 | 37 | 16 | 21 | null | null |
pdarragh/HaskQuest | src/HaskQuest/Game/Objects/Room.hs | mit | emptyRoom :: Room
emptyRoom = Room "Empty" "An empty room with no way out." [] [] | 81 | emptyRoom :: Room
emptyRoom = Room "Empty" "An empty room with no way out." [] [] | 81 | emptyRoom = Room "Empty" "An empty room with no way out." [] [] | 63 | false | true | 0 | 6 | 15 | 30 | 13 | 17 | null | null |
minad/omega | mosaic/OmegaParser.hs | bsd-3-clause | integer = lexeme $ do ds <- many1 digit; return $ IntLit (read ds)
-- TH helpers | 81 | integer = lexeme $ do ds <- many1 digit; return $ IntLit (read ds)
-- TH helpers | 81 | integer = lexeme $ do ds <- many1 digit; return $ IntLit (read ds)
-- TH helpers | 81 | false | false | 3 | 11 | 17 | 43 | 18 | 25 | null | null |
eji/mix-kenall-geocode | src/cli/Main.hs | mit | parsedAreaNameToAreaName (AreaNameOpt s1 s2) = s1 ++ s2 | 55 | parsedAreaNameToAreaName (AreaNameOpt s1 s2) = s1 ++ s2 | 55 | parsedAreaNameToAreaName (AreaNameOpt s1 s2) = s1 ++ s2 | 55 | false | false | 0 | 7 | 7 | 21 | 10 | 11 | null | null |
siddhanathan/ghc | libraries/base/Data/List/NonEmpty.hs | bsd-3-clause | -- | The 'isPrefix' function returns @True@ if the first argument is
-- a prefix of the second.
isPrefixOf :: Eq a => [a] -> NonEmpty a -> Bool
isPrefixOf [] _ = True | 166 | isPrefixOf :: Eq a => [a] -> NonEmpty a -> Bool
isPrefixOf [] _ = True | 70 | isPrefixOf [] _ = True | 22 | true | true | 0 | 8 | 33 | 41 | 21 | 20 | null | null |
mainland/nikola | src/Data/Array/Nikola/Language/Optimize/Occ.hs | bsd-3-clause | occsJoin :: Map Var Occ -> Map Var Occ -> Map Var Occ
occsJoin occs1 occs2 = Map.unionWith occJoin occs1 occs2 | 110 | occsJoin :: Map Var Occ -> Map Var Occ -> Map Var Occ
occsJoin occs1 occs2 = Map.unionWith occJoin occs1 occs2 | 110 | occsJoin occs1 occs2 = Map.unionWith occJoin occs1 occs2 | 56 | false | true | 0 | 7 | 20 | 48 | 22 | 26 | null | null |
ocean0yohsuke/Scheme | test/UnitTest.hs | bsd-3-clause | testCase_Scheme_LISP = (\t -> "Scheme" ~: "LISP" ~: t) |$>
[
(show $ L.append NIL
(CELL (INT 1) NIL)) ~?= "(1)"
, (show $ L.append NIL NIL) ~?= "()"
, (show $ L.append (CELL (INT 1) NIL)
NIL) ... | 1,184 | testCase_Scheme_LISP = (\t -> "Scheme" ~: "LISP" ~: t) |$>
[
(show $ L.append NIL
(CELL (INT 1) NIL)) ~?= "(1)"
, (show $ L.append NIL NIL) ~?= "()"
, (show $ L.append (CELL (INT 1) NIL)
NIL) ... | 1,184 | testCase_Scheme_LISP = (\t -> "Scheme" ~: "LISP" ~: t) |$>
[
(show $ L.append NIL
(CELL (INT 1) NIL)) ~?= "(1)"
, (show $ L.append NIL NIL) ~?= "()"
, (show $ L.append (CELL (INT 1) NIL)
NIL) ... | 1,184 | false | false | 0 | 18 | 470 | 561 | 288 | 273 | null | null |
tsuraan/optimal-blocks | src/Algorithm/OptimalBlocks/BuzzHash.hs | bsd-3-clause | {- |A pre-calculated array of hashes of bytes.
-}
hs :: Vector Word64
hs = generate 256 fn
where
fn n = hashByteString 2 4 k0 k1 $ pack [toEnum n]
k0 = 0x4a7330fae70f52e8
k1 = 0x919ea5953a9a1ec9
| 204 | hs :: Vector Word64
hs = generate 256 fn
where
fn n = hashByteString 2 4 k0 k1 $ pack [toEnum n]
k0 = 0x4a7330fae70f52e8
k1 = 0x919ea5953a9a1ec9
| 153 | hs = generate 256 fn
where
fn n = hashByteString 2 4 k0 k1 $ pack [toEnum n]
k0 = 0x4a7330fae70f52e8
k1 = 0x919ea5953a9a1ec9
| 133 | true | true | 0 | 8 | 46 | 63 | 31 | 32 | null | null |
FranklinChen/hugs98-plus-Sep2006 | packages/GLUT/examples/BOGLGP/Chapter03/TrianglesQuads.hs | bsd-3-clause | -- draw grid of points showing dataset we are working with
drawPoints :: IO ()
drawPoints = do
pointSize $= 4
renderPrimitive Points $
for [ 0 .. 3 ] $ \x ->
for [ 0 .. 3 ] $ \z ->
vertex (Vertex3 x 0 z)
-- draw grid as individual triangles | 274 | drawPoints :: IO ()
drawPoints = do
pointSize $= 4
renderPrimitive Points $
for [ 0 .. 3 ] $ \x ->
for [ 0 .. 3 ] $ \z ->
vertex (Vertex3 x 0 z)
-- draw grid as individual triangles | 215 | drawPoints = do
pointSize $= 4
renderPrimitive Points $
for [ 0 .. 3 ] $ \x ->
for [ 0 .. 3 ] $ \z ->
vertex (Vertex3 x 0 z)
-- draw grid as individual triangles | 195 | true | true | 0 | 13 | 86 | 84 | 43 | 41 | null | null |
mydaum/cabal | Cabal/Distribution/Simple/Setup.hs | bsd-3-clause | showPackageDbList :: [Maybe PackageDB] -> [String]
showPackageDbList = map showPackageDb
where
showPackageDb Nothing = "clear"
showPackageDb (Just GlobalPackageDB) = "global"
showPackageDb (Just UserPackageDB) = "user"
showPackageDb (Just (SpecificPackageDB db)) =... | 323 | showPackageDbList :: [Maybe PackageDB] -> [String]
showPackageDbList = map showPackageDb
where
showPackageDb Nothing = "clear"
showPackageDb (Just GlobalPackageDB) = "global"
showPackageDb (Just UserPackageDB) = "user"
showPackageDb (Just (SpecificPackageDB db)) =... | 323 | showPackageDbList = map showPackageDb
where
showPackageDb Nothing = "clear"
showPackageDb (Just GlobalPackageDB) = "global"
showPackageDb (Just UserPackageDB) = "user"
showPackageDb (Just (SpecificPackageDB db)) = db | 272 | false | true | 0 | 8 | 86 | 97 | 44 | 53 | null | null |
jwiegley/hnix | src/Nix/Pretty.hs | bsd-3-clause | valueToExpr :: forall t f m . MonadDataContext f m => NValue t f m -> NExpr
valueToExpr = iterNValue (\_ _ -> thk) phi
where
thk = Fix . NSym . pack $ "<CYCLE>"
phi :: NValue' t f m NExpr -> NExpr
phi (NVConstant' a ) = Fix $ NConstant a
phi (NVStr' ns) = mkStr ns
phi (NVList' l ) = Fix $ NList l
... | 789 | valueToExpr :: forall t f m . MonadDataContext f m => NValue t f m -> NExpr
valueToExpr = iterNValue (\_ _ -> thk) phi
where
thk = Fix . NSym . pack $ "<CYCLE>"
phi :: NValue' t f m NExpr -> NExpr
phi (NVConstant' a ) = Fix $ NConstant a
phi (NVStr' ns) = mkStr ns
phi (NVList' l ) = Fix $ NList l
... | 789 | valueToExpr = iterNValue (\_ _ -> thk) phi
where
thk = Fix . NSym . pack $ "<CYCLE>"
phi :: NValue' t f m NExpr -> NExpr
phi (NVConstant' a ) = Fix $ NConstant a
phi (NVStr' ns) = mkStr ns
phi (NVList' l ) = Fix $ NList l
phi (NVSet' s p ) = Fix $ NSet
[ NamedVar (StaticKey k :| []) v (fro... | 713 | false | true | 3 | 11 | 227 | 377 | 177 | 200 | null | null |
the-real-blackh/hexpat | Text/XML/Expat/Cursor.hs | bsd-3-clause | removeGoUp :: MkElementClass n c => CursorG n c tag text -> Maybe (CursorG n c tag text)
removeGoUp loc =
case (parents loc) of
[] -> Nothing
(pls, v, prs):ps -> Just $
Cur { current = fromTag v (reverseL (lefts loc) `mplus` rights loc)
, lefts = pls, rights = prs, parent... | 472 | removeGoUp :: MkElementClass n c => CursorG n c tag text -> Maybe (CursorG n c tag text)
removeGoUp loc =
case (parents loc) of
[] -> Nothing
(pls, v, prs):ps -> Just $
Cur { current = fromTag v (reverseL (lefts loc) `mplus` rights loc)
, lefts = pls, rights = prs, parent... | 472 | removeGoUp loc =
case (parents loc) of
[] -> Nothing
(pls, v, prs):ps -> Just $
Cur { current = fromTag v (reverseL (lefts loc) `mplus` rights loc)
, lefts = pls, rights = prs, parents = ps
}
-- | private: Gets the given element of a list.
-- Also return... | 383 | false | true | 0 | 16 | 143 | 146 | 78 | 68 | null | null |
facebookincubator/duckling | Duckling/Time/EL/Rules.hs | bsd-3-clause | ruleDayofmonthNonOrdinalNamedmonth :: Rule
ruleDayofmonthNonOrdinalNamedmonth = Rule
{ name = "<day-of-month> (non-ordinal) <named-month>"
, pattern =
[ Predicate isDOMInteger
, Predicate isAMonth
]
, prod = \tokens -> case tokens of
(Token Time td:token:_) -> Token Time <$> intersectDOM td toke... | 344 | ruleDayofmonthNonOrdinalNamedmonth :: Rule
ruleDayofmonthNonOrdinalNamedmonth = Rule
{ name = "<day-of-month> (non-ordinal) <named-month>"
, pattern =
[ Predicate isDOMInteger
, Predicate isAMonth
]
, prod = \tokens -> case tokens of
(Token Time td:token:_) -> Token Time <$> intersectDOM td toke... | 344 | ruleDayofmonthNonOrdinalNamedmonth = Rule
{ name = "<day-of-month> (non-ordinal) <named-month>"
, pattern =
[ Predicate isDOMInteger
, Predicate isAMonth
]
, prod = \tokens -> case tokens of
(Token Time td:token:_) -> Token Time <$> intersectDOM td token
_ -> Nothing
} | 301 | false | true | 0 | 14 | 75 | 96 | 50 | 46 | null | null |
rloewe/petulant-octo-wallhack | Repl.hs | mit | main :: IO ()
main = runMoreCode M.empty M.empty | 48 | main :: IO ()
main = runMoreCode M.empty M.empty | 48 | main = runMoreCode M.empty M.empty | 34 | false | true | 0 | 6 | 8 | 25 | 12 | 13 | null | null |
alanz/hroq | src/Data/Concurrent/Queue/Roq/Mnesia.hs | bsd-3-clause | do_dirty_all_keys :: TableName -> Process [QKey]
do_dirty_all_keys tableName = do
logm $ "HroqMnesia.unimplemented dirty_all_keys:" ++ (show tableName)
return []
-- --------------------------------------------------------------------- | 239 | do_dirty_all_keys :: TableName -> Process [QKey]
do_dirty_all_keys tableName = do
logm $ "HroqMnesia.unimplemented dirty_all_keys:" ++ (show tableName)
return []
-- --------------------------------------------------------------------- | 239 | do_dirty_all_keys tableName = do
logm $ "HroqMnesia.unimplemented dirty_all_keys:" ++ (show tableName)
return []
-- --------------------------------------------------------------------- | 190 | false | true | 0 | 9 | 25 | 50 | 24 | 26 | null | null |
dec9ue/jhc_copygc | src/FrontEnd/TypeSyns.hs | gpl-2.0 | renameHsNames :: [HsName] -> SubTable -> ScopeSM ([HsName])
renameHsNames ns _ = return ns | 90 | renameHsNames :: [HsName] -> SubTable -> ScopeSM ([HsName])
renameHsNames ns _ = return ns | 90 | renameHsNames ns _ = return ns | 30 | false | true | 0 | 9 | 13 | 39 | 20 | 19 | null | null |
PavelClaudiuStefan/FMI | An_3_Semestru_1/ProgramareDeclarativa/Laboratoare/Laborator2/PicturesSVG.hs | cc0-1.0 | clear = Img $ Image (Name "images/clear.png") (50,50) | 66 | clear = Img $ Image (Name "images/clear.png") (50,50) | 66 | clear = Img $ Image (Name "images/clear.png") (50,50) | 66 | false | false | 3 | 7 | 20 | 32 | 14 | 18 | null | null |
pjones/xmonad-test | vendor/xmonad-contrib/XMonad/Util/Stack.hs | bsd-2-clause | focusDownZ (Just (W.Stack f up _)) = Just $ W.Stack (last up) [] (reverse (init up) ++ [f]) | 91 | focusDownZ (Just (W.Stack f up _)) = Just $ W.Stack (last up) [] (reverse (init up) ++ [f]) | 91 | focusDownZ (Just (W.Stack f up _)) = Just $ W.Stack (last up) [] (reverse (init up) ++ [f]) | 91 | false | false | 0 | 11 | 17 | 68 | 33 | 35 | null | null |
danidiaz/lens | src/Control/Lens/Wrapped.hs | bsd-3-clause | getRecUpdError :: RecUpdError -> String
getRecUpdError (RecUpdError x) = x | 74 | getRecUpdError :: RecUpdError -> String
getRecUpdError (RecUpdError x) = x | 74 | getRecUpdError (RecUpdError x) = x | 34 | false | true | 0 | 7 | 9 | 24 | 12 | 12 | null | null |
JamieBeverley/InnerEar | src/InnerEar/Exercises/FiveBandBoostCut.hs | gpl-3.0 | renderAnswer _ db (src, dur) _ = buildSynth $ do
let env = maybe (return EmptyGraph) (unitRectEnv (Millis 1)) dur
synthSource src >> gain (Db $ -10) >> env >> destination
maybeDelete (fmap (+Sec 0.2) dur) | 210 | renderAnswer _ db (src, dur) _ = buildSynth $ do
let env = maybe (return EmptyGraph) (unitRectEnv (Millis 1)) dur
synthSource src >> gain (Db $ -10) >> env >> destination
maybeDelete (fmap (+Sec 0.2) dur) | 210 | renderAnswer _ db (src, dur) _ = buildSynth $ do
let env = maybe (return EmptyGraph) (unitRectEnv (Millis 1)) dur
synthSource src >> gain (Db $ -10) >> env >> destination
maybeDelete (fmap (+Sec 0.2) dur) | 210 | false | false | 2 | 16 | 41 | 116 | 53 | 63 | null | null |
sampou-org/pfad | Code/Code05.hs | bsd-3-clause | subs1 :: [A] -> [A] -> [Label A]
subs1 xs ys = [(x ⊖ y, (i,j)) | (x,i) <- zip xs [1..], (y,j) <- zip ys [1..]] | 115 | subs1 :: [A] -> [A] -> [Label A]
subs1 xs ys = [(x ⊖ y, (i,j)) | (x,i) <- zip xs [1..], (y,j) <- zip ys [1..]] | 115 | subs1 xs ys = [(x ⊖ y, (i,j)) | (x,i) <- zip xs [1..], (y,j) <- zip ys [1..]] | 80 | false | true | 0 | 9 | 31 | 99 | 55 | 44 | null | null |
dsalisbury/xmobar | src/Plugins/Monitors/Disk.hs | bsd-3-clause | devTemplates :: [(String, String)]
-> [(DevName, Path)]
-> [(DevName, [Float])]
-> [(String, [Float])]
devTemplates disks mounted dat =
map (\(d, p) -> (findTempl d p disks, findData d)) mounted
where findData dev = case find ((==dev) . fst) dat of
... | 390 | devTemplates :: [(String, String)]
-> [(DevName, Path)]
-> [(DevName, [Float])]
-> [(String, [Float])]
devTemplates disks mounted dat =
map (\(d, p) -> (findTempl d p disks, findData d)) mounted
where findData dev = case find ((==dev) . fst) dat of
... | 390 | devTemplates disks mounted dat =
map (\(d, p) -> (findTempl d p disks, findData d)) mounted
where findData dev = case find ((==dev) . fst) dat of
Nothing -> [0, 0, 0]
Just (_, xs) -> xs | 239 | false | true | 0 | 10 | 151 | 167 | 95 | 72 | null | null |
matterhorn-chat/matterhorn | src/Matterhorn/Draw/RichText/Flatten.hs | bsd-3-clause | flattenInlineSeq' :: SemEq a
=> FlattenEnv a
-> Int
-> Inlines
-> (Int, Seq (Seq (FlattenedValue a)))
flattenInlineSeq' env c is =
(fsNameIndex finalState, fsCompletedLines finalState)
where
finalState = execState stBody initialStat... | 641 | flattenInlineSeq' :: SemEq a
=> FlattenEnv a
-> Int
-> Inlines
-> (Int, Seq (Seq (FlattenedValue a)))
flattenInlineSeq' env c is =
(fsNameIndex finalState, fsCompletedLines finalState)
where
finalState = execState stBody initialStat... | 641 | flattenInlineSeq' env c is =
(fsNameIndex finalState, fsCompletedLines finalState)
where
finalState = execState stBody initialState
initialState = FlattenState { fsCompletedLines = mempty
, fsCurLine = mempty
, fsNameIndex =... | 467 | false | true | 3 | 14 | 302 | 138 | 69 | 69 | null | null |
brendanhay/gogol | gogol-drive/gen/Network/Google/Drive/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'AboutStorageQuota' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'asqUsageInDriveTrash'
--
-- * 'asqLimit'
--
-- * 'asqUsage'
--
-- * 'asqUsageInDrive'
aboutStorageQuota
:: AboutStorageQuota
aboutStorageQ... | 476 | aboutStorageQuota
:: AboutStorageQuota
aboutStorageQuota =
AboutStorageQuota'
{ _asqUsageInDriveTrash = Nothing
, _asqLimit = Nothing
, _asqUsage = Nothing
, _asqUsageInDrive = Nothing
} | 212 | aboutStorageQuota =
AboutStorageQuota'
{ _asqUsageInDriveTrash = Nothing
, _asqLimit = Nothing
, _asqUsage = Nothing
, _asqUsageInDrive = Nothing
} | 169 | true | true | 0 | 6 | 94 | 48 | 34 | 14 | null | null |
dterei/Scraps | haskell/SplitAt_LazyPatterns.hs | bsd-3-clause | splitAt_ :: Int -> [a] -> ([a], [a])
splitAt_ n xs | n <= 0 = ([], xs) | 70 | splitAt_ :: Int -> [a] -> ([a], [a])
splitAt_ n xs | n <= 0 = ([], xs) | 70 | splitAt_ n xs | n <= 0 = ([], xs) | 33 | false | true | 0 | 10 | 17 | 63 | 32 | 31 | null | null |
ezyang/ghc | libraries/base/Data/OldList.hs | bsd-3-clause | inits :: [a] -> [[a]]
inits = map toListSB . scanl' snocSB emptySB | 102 | inits :: [a] -> [[a]]
inits = map toListSB . scanl' snocSB emptySB | 102 | inits = map toListSB . scanl' snocSB emptySB | 62 | false | true | 0 | 7 | 48 | 36 | 19 | 17 | null | null |
Zolomon/edan40-functional-parsing | Parser.hs | mit | -- Parse for the requirement of a substring
require :: String -> Parser String
require w = accept w ! (err ("Program error: expecting " ++ w)) | 143 | require :: String -> Parser String
require w = accept w ! (err ("Program error: expecting " ++ w)) | 99 | require w = accept w ! (err ("Program error: expecting " ++ w)) | 64 | true | true | 0 | 9 | 27 | 42 | 21 | 21 | null | null |
kindl/Hypatia | src/Compiler.hs | mit | toLuaS (Ret (Func vs sts)) =
toLuaFun (text "return") vs sts | 64 | toLuaS (Ret (Func vs sts)) =
toLuaFun (text "return") vs sts | 64 | toLuaS (Ret (Func vs sts)) =
toLuaFun (text "return") vs sts | 64 | false | false | 0 | 8 | 14 | 38 | 17 | 21 | null | null |
Helium4Haskell/helium | src/Helium/Parser/ParseLibrary.hs | gpl-3.0 | lexHOLE :: HParser ()
lexHOLE = lexeme (LexResVarSym hole) | 64 | lexHOLE :: HParser ()
lexHOLE = lexeme (LexResVarSym hole) | 63 | lexHOLE = lexeme (LexResVarSym hole) | 41 | false | true | 1 | 7 | 14 | 28 | 12 | 16 | null | null |
leepike/SmartCheck | qc-tests/Tests.hs | bsd-3-clause | main :: IO ()
main = do
Q.quickCheck prop_getReplaceIdem
Q.quickCheck prop_forestTreeEq
-------------------------------------------------------------------------------- | 173 | main :: IO ()
main = do
Q.quickCheck prop_getReplaceIdem
Q.quickCheck prop_forestTreeEq
-------------------------------------------------------------------------------- | 173 | main = do
Q.quickCheck prop_getReplaceIdem
Q.quickCheck prop_forestTreeEq
-------------------------------------------------------------------------------- | 159 | false | true | 0 | 9 | 16 | 39 | 16 | 23 | null | null |
noraesae/euler | src/Problem55.hs | bsd-3-clause | reverseAdd :: Integer -> Integer
reverseAdd n = n + (unDigits 10.reverse.digits 10) n | 85 | reverseAdd :: Integer -> Integer
reverseAdd n = n + (unDigits 10.reverse.digits 10) n | 85 | reverseAdd n = n + (unDigits 10.reverse.digits 10) n | 52 | false | true | 0 | 10 | 13 | 37 | 18 | 19 | null | null |
dec9ue/jhc_copygc | src/Grin/Grin.hs | gpl-2.0 | findTyTy _ a | "@hole" `isPrefixOf` fromAtom a = return tyTy { tySlots = [], tyReturn = [TyNode] } | 99 | findTyTy _ a | "@hole" `isPrefixOf` fromAtom a = return tyTy { tySlots = [], tyReturn = [TyNode] } | 99 | findTyTy _ a | "@hole" `isPrefixOf` fromAtom a = return tyTy { tySlots = [], tyReturn = [TyNode] } | 99 | false | false | 0 | 9 | 19 | 48 | 25 | 23 | null | null |
SWP-Ubau-SoSe2014-Haskell/SWPSoSe14 | src/RailEditor/Selection.hs | mit | getMaximum positions = (x,y)
where (y,x) = maximum $ Prelude.map (\(x1,y1) -> (y1,x1)) positions | 99 | getMaximum positions = (x,y)
where (y,x) = maximum $ Prelude.map (\(x1,y1) -> (y1,x1)) positions | 99 | getMaximum positions = (x,y)
where (y,x) = maximum $ Prelude.map (\(x1,y1) -> (y1,x1)) positions | 99 | false | false | 0 | 9 | 16 | 60 | 34 | 26 | null | null |
plumlife/cabal | Cabal/Distribution/PackageDescription/Configuration.hs | bsd-3-clause | constrainBy :: DependencyMap -- ^ Input map
-> DependencyMap -- ^ Extra constraints
-> DependencyMap
constrainBy left extra =
DependencyMap $
Map.foldWithKey tightenConstraint (unDependencyMap left)
(unDependencyMap extra)
where tightenConstr... | 565 | constrainBy :: DependencyMap -- ^ Input map
-> DependencyMap -- ^ Extra constraints
-> DependencyMap
constrainBy left extra =
DependencyMap $
Map.foldWithKey tightenConstraint (unDependencyMap left)
(unDependencyMap extra)
where tightenConstr... | 565 | constrainBy left extra =
DependencyMap $
Map.foldWithKey tightenConstraint (unDependencyMap left)
(unDependencyMap extra)
where tightenConstraint n c l =
case Map.lookup n l of
Nothing -> l
Just vr -> Map.insert n (intersectVers... | 438 | false | true | 2 | 10 | 187 | 118 | 56 | 62 | null | null |
aaronc/Idris-dev | src/Idris/Reflection.hs | bsd-3-clause | getArgs _ r = ([], r) | 21 | getArgs _ r = ([], r) | 21 | getArgs _ r = ([], r) | 21 | false | false | 1 | 7 | 5 | 20 | 10 | 10 | null | null |
TomMD/ghc | compiler/types/FamInstEnv.hs | bsd-3-clause | normaliseType _env role ty@(LitTy {}) = (mkReflCo role ty, ty) | 62 | normaliseType _env role ty@(LitTy {}) = (mkReflCo role ty, ty) | 62 | normaliseType _env role ty@(LitTy {}) = (mkReflCo role ty, ty) | 62 | false | false | 0 | 8 | 9 | 34 | 18 | 16 | null | null |
facebookincubator/duckling | Duckling/Time/UK/Rules.hs | bsd-3-clause | ruleThisnextDayofweek :: Rule
ruleThisnextDayofweek = Rule
{ name = "this|next <day-of-week>"
, pattern =
[ regex "наступн(ого|а)"
, Predicate isADayOfWeek
]
, prod = \tokens -> case tokens of
(_:Token Time td:_) ->
tt $ predNth 0 True td
_ -> Nothing
} | 293 | ruleThisnextDayofweek :: Rule
ruleThisnextDayofweek = Rule
{ name = "this|next <day-of-week>"
, pattern =
[ regex "наступн(ого|а)"
, Predicate isADayOfWeek
]
, prod = \tokens -> case tokens of
(_:Token Time td:_) ->
tt $ predNth 0 True td
_ -> Nothing
} | 293 | ruleThisnextDayofweek = Rule
{ name = "this|next <day-of-week>"
, pattern =
[ regex "наступн(ого|а)"
, Predicate isADayOfWeek
]
, prod = \tokens -> case tokens of
(_:Token Time td:_) ->
tt $ predNth 0 True td
_ -> Nothing
} | 263 | false | true | 0 | 15 | 82 | 95 | 50 | 45 | null | null |
vito/atomo-old | Atomo/Internals.hs | mit | fromAString (AString s) = map fromAChar (fromAList s) | 53 | fromAString (AString s) = map fromAChar (fromAList s) | 53 | fromAString (AString s) = map fromAChar (fromAList s) | 53 | false | false | 0 | 7 | 7 | 27 | 12 | 15 | null | null |
sleexyz/syzygy | src/Syzygy/Core.hs | bsd-3-clause | waitTil :: Integer -> IO ()
waitTil t = do
now <- Clock.toNanoSecs <$> Clock.getTime Clock.Realtime
let timeToWait = t - now
threadDelay (fromIntegral $ (timeToWait `div` 1000)) | 183 | waitTil :: Integer -> IO ()
waitTil t = do
now <- Clock.toNanoSecs <$> Clock.getTime Clock.Realtime
let timeToWait = t - now
threadDelay (fromIntegral $ (timeToWait `div` 1000)) | 183 | waitTil t = do
now <- Clock.toNanoSecs <$> Clock.getTime Clock.Realtime
let timeToWait = t - now
threadDelay (fromIntegral $ (timeToWait `div` 1000)) | 155 | false | true | 0 | 11 | 33 | 78 | 38 | 40 | null | null |
iteloo/tsuru-sample | iteratee-0.8.9.6/Examples/Tiff.hs | bsd-3-clause | u32_to_float :: Word32 -> Double
u32_to_float _x = -- unsigned 32-bit int -> IEEE float
error "u32->float is not yet implemented" | 145 | u32_to_float :: Word32 -> Double
u32_to_float _x = -- unsigned 32-bit int -> IEEE float
error "u32->float is not yet implemented" | 145 | u32_to_float _x = -- unsigned 32-bit int -> IEEE float
error "u32->float is not yet implemented" | 112 | false | true | 0 | 5 | 36 | 22 | 11 | 11 | null | null |
tategakibunko/hml | Mahjong/Yaku.hs | gpl-2.0 | yakuConflicts :: [(Yaku, [Yaku])]
yakuConflicts =
[(RYANPEKO, [CHITOITSU]),
(ITTSU, [ITTSU_NAKI]),
(CHANTA, [CHANTA_NAKI]),
(SANSHOKU_DOJUN, [SANSHOKU_DOJUN_NAKI]),
(SANSHOKU_DOKO, [SANSHOKU_DOKO_NAKI]),
(JUNCHANTA, [CHANTA, CHANTA_NAKI, JUNCHANTA_NAKI]),
(... | 983 | yakuConflicts :: [(Yaku, [Yaku])]
yakuConflicts =
[(RYANPEKO, [CHITOITSU]),
(ITTSU, [ITTSU_NAKI]),
(CHANTA, [CHANTA_NAKI]),
(SANSHOKU_DOJUN, [SANSHOKU_DOJUN_NAKI]),
(SANSHOKU_DOKO, [SANSHOKU_DOKO_NAKI]),
(JUNCHANTA, [CHANTA, CHANTA_NAKI, JUNCHANTA_NAKI]),
(... | 983 | yakuConflicts =
[(RYANPEKO, [CHITOITSU]),
(ITTSU, [ITTSU_NAKI]),
(CHANTA, [CHANTA_NAKI]),
(SANSHOKU_DOJUN, [SANSHOKU_DOJUN_NAKI]),
(SANSHOKU_DOKO, [SANSHOKU_DOKO_NAKI]),
(JUNCHANTA, [CHANTA, CHANTA_NAKI, JUNCHANTA_NAKI]),
(HONITSU, [HONITSU_NAKI]),
... | 949 | false | true | 0 | 8 | 243 | 316 | 206 | 110 | null | null |
fffej/HS-Poker | LookupPatternMatch.hs | bsd-3-clause | getValueFromProduct 12987 = 2352 | 32 | getValueFromProduct 12987 = 2352 | 32 | getValueFromProduct 12987 = 2352 | 32 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
gereeter/bounded-intmap | src/Data/WordSet/Internal.hs | mit | (\\) :: WordSet -> WordSet -> WordSet
(\\) = difference | 55 | (\\) :: WordSet -> WordSet -> WordSet
(\\) = difference | 55 | (\\) = difference | 17 | false | true | 0 | 6 | 9 | 23 | 14 | 9 | null | null |
hguenther/language-promela | Language/Promela/Pretty.hs | bsd-3-clause | prettyDeclarations :: [Declaration] -> Doc
prettyDeclarations = hsep . punctuate semi . map prettyDeclaration | 109 | prettyDeclarations :: [Declaration] -> Doc
prettyDeclarations = hsep . punctuate semi . map prettyDeclaration | 109 | prettyDeclarations = hsep . punctuate semi . map prettyDeclaration | 66 | false | true | 0 | 7 | 13 | 32 | 16 | 16 | null | null |
sordina/Diagrams-AST | src/Diagrams/Gloss.hs | bsd-3-clause | {-| Gloss:
data Picture - A 2D picture
Constructors:
Blank
Polygon Path
Line Path
Circle Float
ThickCircle Float Float
Text String
Bitmap Int Int ByteString
Color Color Picture
Translate Float Float Picture
Rotate Float Picture
Scale Float Float Picture
Pictures [Picture]
... | 394 | fromGloss :: G.Picture -> Image
fromGloss (G.Blank) = Blank | 70 | fromGloss (G.Blank) = Blank | 38 | true | true | 0 | 7 | 109 | 26 | 14 | 12 | null | null |
IreneKnapp/Faction | libfaction/Distribution/PackageDescription.hs | bsd-3-clause | -- |If the package description has a library section, call the given
-- function with the library build info as argument.
withLib :: PackageDescription -> (Library -> IO ()) -> IO ()
withLib pkg_descr f =
maybe (return ()) f (maybeHasLibs pkg_descr) | 253 | withLib :: PackageDescription -> (Library -> IO ()) -> IO ()
withLib pkg_descr f =
maybe (return ()) f (maybeHasLibs pkg_descr) | 130 | withLib pkg_descr f =
maybe (return ()) f (maybeHasLibs pkg_descr) | 69 | true | true | 0 | 10 | 45 | 64 | 32 | 32 | null | null |
mstksg/hledger | hledger/Hledger/Cli/CliOptions.hs | gpl-3.0 | -- | Parse raw option string values to the desired final data types.
-- Any relative smart dates will be converted to fixed dates based on
-- today's date. Parsing failures will raise an error.
-- Also records the terminal width, if supported.
rawOptsToCliOpts :: RawOpts -> IO CliOpts
rawOptsToCliOpts rawopts = checkCl... | 1,722 | rawOptsToCliOpts :: RawOpts -> IO CliOpts
rawOptsToCliOpts rawopts = checkCliOpts <$> do
ropts <- rawOptsToReportOpts rawopts
mcolumns <- readMay <$> getEnvSafe "COLUMNS"
mtermwidth <-
#ifdef mingw32_HOST_OS
return Nothing
#else
setupTermFromEnv >>= return . flip getCapability termColumns
-- XXX Throw... | 1,478 | rawOptsToCliOpts rawopts = checkCliOpts <$> do
ropts <- rawOptsToReportOpts rawopts
mcolumns <- readMay <$> getEnvSafe "COLUMNS"
mtermwidth <-
#ifdef mingw32_HOST_OS
return Nothing
#else
setupTermFromEnv >>= return . flip getCapability termColumns
-- XXX Throws a SetupTermError if the terminfo databas... | 1,436 | true | true | 0 | 16 | 477 | 276 | 146 | 130 | null | null |
svenssonjoel/GCDObsidian | Obsidian/GCDObsidian/CodeGen/SPMDC.hs | bsd-3-clause | ppCExpr ppc (CExpr (CBinOp bop e1 e2 _)) = line "(" >>
ppCExpr ppc e1 >>
ppBinOp bop >>
ppCExpr ppc e2 >>
line ")" | 291 | ppCExpr ppc (CExpr (CBinOp bop e1 e2 _)) = line "(" >>
ppCExpr ppc e1 >>
ppBinOp bop >>
ppCExpr ppc e2 >>
line ")" | 291 | ppCExpr ppc (CExpr (CBinOp bop e1 e2 _)) = line "(" >>
ppCExpr ppc e1 >>
ppBinOp bop >>
ppCExpr ppc e2 >>
line ")" | 291 | false | false | 0 | 9 | 201 | 66 | 29 | 37 | null | null |
bvdelft/paragon | src/Language/Java/Paragon/Interaction/Debugging.hs | bsd-3-clause | -- | Reports mile-stone steps for each compilation phase. Default when
-- argument is omitted (verbosity >= 3).
finePrint :: MonadBase m => String -> m ()
finePrint = verbosePrint 3 | 183 | finePrint :: MonadBase m => String -> m ()
finePrint = verbosePrint 3 | 71 | finePrint = verbosePrint 3 | 28 | true | true | 0 | 8 | 32 | 32 | 16 | 16 | null | null |
typelead/epm | Cabal/Distribution/PackageDescription/Parse.hs | bsd-3-clause | findIndentTabs :: String -> [(Int,Int)]
findIndentTabs = concatMap checkLine
. zip [1..]
. lines
where
checkLine (lineno, l) =
let (indent, _content) = span isSpace l
tabCols = map fst . filter ((== '\t') . snd) . zip [0..]
addLineNo = map (\... | 639 | findIndentTabs :: String -> [(Int,Int)]
findIndentTabs = concatMap checkLine
. zip [1..]
. lines
where
checkLine (lineno, l) =
let (indent, _content) = span isSpace l
tabCols = map fst . filter ((== '\t') . snd) . zip [0..]
addLineNo = map (\... | 639 | findIndentTabs = concatMap checkLine
. zip [1..]
. lines
where
checkLine (lineno, l) =
let (indent, _content) = span isSpace l
tabCols = map fst . filter ((== '\t') . snd) . zip [0..]
addLineNo = map (\col -> (lineno,col))
in addLin... | 599 | false | true | 2 | 14 | 185 | 162 | 83 | 79 | null | null |
byorgey/Idris-dev | src/IRTS/CodegenC.hs | bsd-3-clause | irts_c (FInt ITNative) x = "GETINT(" ++ x ++ ")" | 48 | irts_c (FInt ITNative) x = "GETINT(" ++ x ++ ")" | 48 | irts_c (FInt ITNative) x = "GETINT(" ++ x ++ ")" | 48 | false | false | 0 | 7 | 9 | 25 | 12 | 13 | null | null |
kaoskorobase/hsc3-server | tests/test.hs | gpl-2.0 | tests :: [Test]
tests =
Sound.SC3.Server.Allocator.Range.Test.tests
++ Sound.SC3.Server.Allocator.Test.tests | 113 | tests :: [Test]
tests =
Sound.SC3.Server.Allocator.Range.Test.tests
++ Sound.SC3.Server.Allocator.Test.tests | 113 | tests =
Sound.SC3.Server.Allocator.Range.Test.tests
++ Sound.SC3.Server.Allocator.Test.tests | 97 | false | true | 2 | 7 | 12 | 39 | 22 | 17 | null | null |
martinvlk/cabal | cabal-install/Distribution/Client/Sandbox.hs | bsd-3-clause | sandboxDeleteSource :: Verbosity -> [FilePath] -> SandboxFlags -> GlobalFlags
-> IO ()
sandboxDeleteSource verbosity buildTreeRefs _sandboxFlags globalFlags = do
(sandboxDir, pkgEnv) <- tryLoadSandboxConfig verbosity globalFlags
indexFile <- tryGetIndexFilePath (pkgEnvSavedConfig p... | 2,187 | sandboxDeleteSource :: Verbosity -> [FilePath] -> SandboxFlags -> GlobalFlags
-> IO ()
sandboxDeleteSource verbosity buildTreeRefs _sandboxFlags globalFlags = do
(sandboxDir, pkgEnv) <- tryLoadSandboxConfig verbosity globalFlags
indexFile <- tryGetIndexFilePath (pkgEnvSavedConfig p... | 2,187 | sandboxDeleteSource verbosity buildTreeRefs _sandboxFlags globalFlags = do
(sandboxDir, pkgEnv) <- tryLoadSandboxConfig verbosity globalFlags
indexFile <- tryGetIndexFilePath (pkgEnvSavedConfig pkgEnv)
(results, convDict) <-
Index.removeBuildTreeRefs verbosity indexFile buildTreeRefs
let (faile... | 2,077 | false | true | 11 | 14 | 474 | 475 | 242 | 233 | null | null |
roberth/uu-helium | src/Helium/CodeGeneration/PatternMatch.hs | gpl-3.0 | freshIds :: String -> Int -> [Id]
freshIds prefix number = fst (freshIds' prefix 0 number) | 90 | freshIds :: String -> Int -> [Id]
freshIds prefix number = fst (freshIds' prefix 0 number) | 90 | freshIds prefix number = fst (freshIds' prefix 0 number) | 56 | false | true | 0 | 7 | 15 | 40 | 20 | 20 | null | null |
nejla/nejla-common | src/NejlaCommon/Persistence.hs | bsd-3-clause | replaceUniqueConflict
:: ( Eq a
, Eq (Unique a)
, DescribeUnique a
, PersistEntityBackend a ~ SqlBackend
)
=> Key a
-> a
-> App st 'Privileged 'ReadCommitted ()
replaceUniqueConflict k v = do
mbCfl <- db' $ E.replaceUnique k v
case mbCfl of
Nothing -> return ()
Just cfl -> li... | 595 | replaceUniqueConflict
:: ( Eq a
, Eq (Unique a)
, DescribeUnique a
, PersistEntityBackend a ~ SqlBackend
)
=> Key a
-> a
-> App st 'Privileged 'ReadCommitted ()
replaceUniqueConflict k v = do
mbCfl <- db' $ E.replaceUnique k v
case mbCfl of
Nothing -> return ()
Just cfl -> li... | 595 | replaceUniqueConflict k v = do
mbCfl <- db' $ E.replaceUnique k v
case mbCfl of
Nothing -> return ()
Just cfl -> liftIO . Ex.throwM $ conflict cfl
--------------------------------------------------------------------------------
-- Getters with possible 404s ---------------------------------------------... | 406 | false | true | 0 | 13 | 109 | 146 | 69 | 77 | null | null |
jacekszymanski/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/Layout.hs | lgpl-2.1 | -- | Align the layout in the center of the assigned area.
centre :: Layout -> Layout
centre
= alignCentre | 107 | centre :: Layout -> Layout
centre
= alignCentre | 49 | centre
= alignCentre | 22 | true | true | 0 | 7 | 21 | 19 | 9 | 10 | null | null |
caneroj1/median-stream | src/Data/MedianStream.hs | bsd-3-clause | median :: MedianStream a -> Maybe Double
median ms@(MedianStream lh rh)
| even $ size ms = average <$> Heap.viewHead lh <*> Heap.viewHead rh
| otherwise = (fromRational . toRational) <$> Heap.viewHead lh | 212 | median :: MedianStream a -> Maybe Double
median ms@(MedianStream lh rh)
| even $ size ms = average <$> Heap.viewHead lh <*> Heap.viewHead rh
| otherwise = (fromRational . toRational) <$> Heap.viewHead lh | 212 | median ms@(MedianStream lh rh)
| even $ size ms = average <$> Heap.viewHead lh <*> Heap.viewHead rh
| otherwise = (fromRational . toRational) <$> Heap.viewHead lh | 171 | false | true | 1 | 9 | 41 | 89 | 42 | 47 | null | null |
DavidAlphaFox/ghc | libraries/Cabal/Cabal/Distribution/ParseUtils.hs | bsd-3-clause | parseVersionRangeQ :: ReadP r VersionRange
parseVersionRangeQ = parseQuoted parse <++ parse | 91 | parseVersionRangeQ :: ReadP r VersionRange
parseVersionRangeQ = parseQuoted parse <++ parse | 91 | parseVersionRangeQ = parseQuoted parse <++ parse | 48 | false | true | 0 | 6 | 10 | 29 | 12 | 17 | null | null |
CarstenKoenig/MyWebSite | src/Models/Events/Database.hs | mit | appendEvents :: Int64 -> [SiteEvent] -> EventQuery ()
appendEvents blogId events = do
time <- liftIO getCurrentTime
nrs <- lift $ forM events (\ev -> insert (DB.Event blogId (json ev) time))
tell $ map (wrap time) $ zip nrs events
where
next [] = 1
next (x:_) = DB.eventAggregateId (entityVal x) + 1
... | 486 | appendEvents :: Int64 -> [SiteEvent] -> EventQuery ()
appendEvents blogId events = do
time <- liftIO getCurrentTime
nrs <- lift $ forM events (\ev -> insert (DB.Event blogId (json ev) time))
tell $ map (wrap time) $ zip nrs events
where
next [] = 1
next (x:_) = DB.eventAggregateId (entityVal x) + 1
... | 486 | appendEvents blogId events = do
time <- liftIO getCurrentTime
nrs <- lift $ forM events (\ev -> insert (DB.Event blogId (json ev) time))
tell $ map (wrap time) $ zip nrs events
where
next [] = 1
next (x:_) = DB.eventAggregateId (entityVal x) + 1
json = toStrict . encode
wrap time (nr, ev) =
... | 432 | false | true | 2 | 16 | 102 | 211 | 97 | 114 | null | null |
glguy/simple-spreadsheet-tools | lib/Spreadsheet/Sorting.hs | bsd-3-clause | -- | 'sortSpreadsheet' sorts the rows of a spreadsheet
-- given the sort orders specified in the header row
sortSpreadsheet :: Spreadsheet -> Spreadsheet
sortSpreadsheet (Spreadsheet hs xs) = Spreadsheet hs (sortBy rowCompare xs)
where
ss = map columnSort hs
rowCompare a b = mconcat (zipWith3 aux ss a b)
aux ... | 688 | sortSpreadsheet :: Spreadsheet -> Spreadsheet
sortSpreadsheet (Spreadsheet hs xs) = Spreadsheet hs (sortBy rowCompare xs)
where
ss = map columnSort hs
rowCompare a b = mconcat (zipWith3 aux ss a b)
aux Nothing _ _ = EQ
aux (Just Ascending) a b = compareData a b
aux (Just Descending) a b = compa... | 580 | sortSpreadsheet (Spreadsheet hs xs) = Spreadsheet hs (sortBy rowCompare xs)
where
ss = map columnSort hs
rowCompare a b = mconcat (zipWith3 aux ss a b)
aux Nothing _ _ = EQ
aux (Just Ascending) a b = compareData a b
aux (Just Descending) a b = compareData b a
-- | 'compareData' compares two d... | 534 | true | true | 3 | 7 | 142 | 153 | 72 | 81 | null | null |
talw/crisp-compiler | src/Emit.hs | bsd-3-clause | argsTypeList :: Int -> [AST.Type]
argsTypeList n = replicate n uint | 67 | argsTypeList :: Int -> [AST.Type]
argsTypeList n = replicate n uint | 67 | argsTypeList n = replicate n uint | 33 | false | true | 0 | 7 | 10 | 28 | 14 | 14 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.