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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cutsea110/aop
|
src/DualityOfSorts.hs
|
bsd-3-clause
|
swop :: List (SList $*$ x) -> SList (List $+$ x)
swop Nil = SNil
| 64 |
swop :: List (SList $*$ x) -> SList (List $+$ x)
swop Nil = SNil
| 64 |
swop Nil = SNil
| 15 | false | true | 0 | 8 | 14 | 38 | 19 | 19 | null | null |
d12frosted/environment
|
melkor/src/Melkor/Types/Eff.hs
|
gpl-3.0
|
runEff :: (HasContext env) => Eff a -> RIO env a
runEff = runEff' (\env -> Context $ env ^. logFuncL)
| 101 |
runEff :: (HasContext env) => Eff a -> RIO env a
runEff = runEff' (\env -> Context $ env ^. logFuncL)
| 101 |
runEff = runEff' (\env -> Context $ env ^. logFuncL)
| 52 | false | true | 0 | 9 | 20 | 51 | 26 | 25 | null | null |
DaMSL/K3
|
src/Language/K3/Parser/ProgramBuilder.hs
|
apache-2.0
|
crName :: Identifier -> Identifier
crName n = n++"Read"
| 55 |
crName :: Identifier -> Identifier
crName n = n++"Read"
| 55 |
crName n = n++"Read"
| 20 | false | true | 0 | 5 | 8 | 22 | 11 | 11 | null | null |
linusyang/barrelfish
|
tools/mackerel/CAbsSyntax.hs
|
mit
|
pp_expr (StringConstant s) = "\"" ++ (concat $ map (\x -> showLitChar x "") s) ++ "\""
| 86 |
pp_expr (StringConstant s) = "\"" ++ (concat $ map (\x -> showLitChar x "") s) ++ "\""
| 86 |
pp_expr (StringConstant s) = "\"" ++ (concat $ map (\x -> showLitChar x "") s) ++ "\""
| 86 | false | false | 0 | 12 | 16 | 48 | 24 | 24 | null | null |
ZSarver/DungeonDash
|
src/Enemy.hs
|
gpl-3.0
|
chaseStep :: Double -> Double -> Time -> Position -> Position -> Position
chaseStep speed goalDistance time target start =
if d > goalDistance then closer else start
where
vec = target ^-^ start
d = distance start target
closer = start ^+^ ((speed * time / d) *^ vec)
| 286 |
chaseStep :: Double -> Double -> Time -> Position -> Position -> Position
chaseStep speed goalDistance time target start =
if d > goalDistance then closer else start
where
vec = target ^-^ start
d = distance start target
closer = start ^+^ ((speed * time / d) *^ vec)
| 286 |
chaseStep speed goalDistance time target start =
if d > goalDistance then closer else start
where
vec = target ^-^ start
d = distance start target
closer = start ^+^ ((speed * time / d) *^ vec)
| 212 | false | true | 0 | 10 | 68 | 103 | 54 | 49 | null | null |
sdiehl/ghc
|
libraries/template-haskell/Language/Haskell/TH/Lib/Internal.hs
|
bsd-3-clause
|
tupleT :: Quote m => Int -> m Type
tupleT i = pure (TupleT i)
| 61 |
tupleT :: Quote m => Int -> m Type
tupleT i = pure (TupleT i)
| 61 |
tupleT i = pure (TupleT i)
| 26 | false | true | 0 | 7 | 14 | 37 | 17 | 20 | null | null |
tidalcycles/tidal-midi
|
Sound/Tidal/MIDI/Ambika.hs
|
gpl-3.0
|
(env3d, env3d_p) = pF "env3d" (Just 0)
| 38 |
(env3d, env3d_p) = pF "env3d" (Just 0)
| 38 |
(env3d, env3d_p) = pF "env3d" (Just 0)
| 38 | false | false | 0 | 7 | 6 | 24 | 12 | 12 | null | null |
wavewave/hoodle-core
|
src/Hoodle/ModelAction/File.hs
|
gpl-3.0
|
makeEmbeddedPdfSrcString :: C.ByteString -> C.ByteString
makeEmbeddedPdfSrcString = ("data:application/x-pdf;base64," <>) . encode
| 131 |
makeEmbeddedPdfSrcString :: C.ByteString -> C.ByteString
makeEmbeddedPdfSrcString = ("data:application/x-pdf;base64," <>) . encode
| 130 |
makeEmbeddedPdfSrcString = ("data:application/x-pdf;base64," <>) . encode
| 73 | false | true | 0 | 6 | 11 | 27 | 15 | 12 | null | null |
SimSaladin/hajong
|
hajong-server/src/Mahjong/Hand/Algo.hs
|
mit
|
isShuntsuWait _ = False
| 45 |
isShuntsuWait _ = False
| 45 |
isShuntsuWait _ = False
| 45 | false | false | 0 | 5 | 25 | 9 | 4 | 5 | null | null |
KaneTW/Idris-dev
|
src/Idris/REPL.hs
|
bsd-3-clause
|
showTotal :: Totality -> IState -> Doc OutputAnnotation
showTotal t@(Partial (Other ns)) i
= text "possibly not total due to:" <$>
vsep (map (showTotalN i) ns)
| 167 |
showTotal :: Totality -> IState -> Doc OutputAnnotation
showTotal t@(Partial (Other ns)) i
= text "possibly not total due to:" <$>
vsep (map (showTotalN i) ns)
| 167 |
showTotal t@(Partial (Other ns)) i
= text "possibly not total due to:" <$>
vsep (map (showTotalN i) ns)
| 111 | false | true | 0 | 10 | 33 | 66 | 32 | 34 | null | null |
brendanhay/gogol
|
gogol-youtube/gen/Network/Google/YouTube/Types/Product.hs
|
mpl-2.0
|
-- | Creates a value of 'LiveBroadcastSnippet' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'lbsActualEndTime'
--
-- * 'lbsLiveChatId'
--
-- * 'lbsPublishedAt'
--
-- * 'lbsScheduledEndTime'
--
-- * 'lbsChannelId'
--
-- * 'lbsScheduledStartTime'
--
-- * 'lbsThumbnails'
--
-- * 'lbsTitle'
--
-- * 'lbsActualStartTime'
--
-- * 'lbsIsDefaultBroadcast'
--
-- * 'lbsDescription'
liveBroadcastSnippet
:: LiveBroadcastSnippet
liveBroadcastSnippet =
LiveBroadcastSnippet'
{ _lbsActualEndTime = Nothing
, _lbsLiveChatId = Nothing
, _lbsPublishedAt = Nothing
, _lbsScheduledEndTime = Nothing
, _lbsChannelId = Nothing
, _lbsScheduledStartTime = Nothing
, _lbsThumbnails = Nothing
, _lbsTitle = Nothing
, _lbsActualStartTime = Nothing
, _lbsIsDefaultBroadcast = Nothing
, _lbsDescription = Nothing
}
| 930 |
liveBroadcastSnippet
:: LiveBroadcastSnippet
liveBroadcastSnippet =
LiveBroadcastSnippet'
{ _lbsActualEndTime = Nothing
, _lbsLiveChatId = Nothing
, _lbsPublishedAt = Nothing
, _lbsScheduledEndTime = Nothing
, _lbsChannelId = Nothing
, _lbsScheduledStartTime = Nothing
, _lbsThumbnails = Nothing
, _lbsTitle = Nothing
, _lbsActualStartTime = Nothing
, _lbsIsDefaultBroadcast = Nothing
, _lbsDescription = Nothing
}
| 468 |
liveBroadcastSnippet =
LiveBroadcastSnippet'
{ _lbsActualEndTime = Nothing
, _lbsLiveChatId = Nothing
, _lbsPublishedAt = Nothing
, _lbsScheduledEndTime = Nothing
, _lbsChannelId = Nothing
, _lbsScheduledStartTime = Nothing
, _lbsThumbnails = Nothing
, _lbsTitle = Nothing
, _lbsActualStartTime = Nothing
, _lbsIsDefaultBroadcast = Nothing
, _lbsDescription = Nothing
}
| 419 | true | true | 0 | 6 | 178 | 104 | 76 | 28 | null | null |
balez/lambda-coinduction
|
Auxiliary/Composition.hs
|
gpl-3.0
|
fan3 = res3 app1 fan2
| 21 |
fan3 = res3 app1 fan2
| 21 |
fan3 = res3 app1 fan2
| 21 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
leichunfeng/learnyouahaskell
|
baby.hs
|
mit
|
lucky x = "Sorry, you're out of luck, pal!"
| 43 |
lucky x = "Sorry, you're out of luck, pal!"
| 43 |
lucky x = "Sorry, you're out of luck, pal!"
| 43 | false | false | 1 | 5 | 8 | 13 | 4 | 9 | null | null |
ununsept/lambdaHTTP
|
Engine.hs
|
mit
|
getStatus :: StatusCodes -> String
getStatus status = case status of
OK -> "HTTP/1.1 200 OK\r\n"
NotFound -> "HTTP/1.1 404 Not Found\r\n"
BadRequest -> "HTTP/1.1 400 Bad Request\r\n"
| 204 |
getStatus :: StatusCodes -> String
getStatus status = case status of
OK -> "HTTP/1.1 200 OK\r\n"
NotFound -> "HTTP/1.1 404 Not Found\r\n"
BadRequest -> "HTTP/1.1 400 Bad Request\r\n"
| 204 |
getStatus status = case status of
OK -> "HTTP/1.1 200 OK\r\n"
NotFound -> "HTTP/1.1 404 Not Found\r\n"
BadRequest -> "HTTP/1.1 400 Bad Request\r\n"
| 169 | false | true | 3 | 5 | 49 | 45 | 20 | 25 | null | null |
wizzup/advent_of_code
|
templates/multi-line.hs
|
mit
|
process :: (String -> Int) -> IO Int
process f = combine . map f . lines <$> readFile "../input/X.txt"
| 102 |
process :: (String -> Int) -> IO Int
process f = combine . map f . lines <$> readFile "../input/X.txt"
| 102 |
process f = combine . map f . lines <$> readFile "../input/X.txt"
| 65 | false | true | 0 | 8 | 19 | 46 | 22 | 24 | null | null |
NickAger/LearningHaskell
|
HaskellProgrammingFromFirstPrinciples/Chapter24/LearnParsers/src/LearnParsers.hs
|
mit
|
testParseBottom :: Parser () -> IO ()
testParseBottom p =
print $ parseString p mempty "123"
| 96 |
testParseBottom :: Parser () -> IO ()
testParseBottom p =
print $ parseString p mempty "123"
| 96 |
testParseBottom p =
print $ parseString p mempty "123"
| 58 | false | true | 0 | 7 | 19 | 39 | 18 | 21 | null | null |
spechub/Hets
|
Comorphisms/SuleCFOL2SoftFOL.hs
|
gpl-2.0
|
toVar :: Monad m => RMap -> SPTerm -> m VAR_DECL
toVar m sp = case sp of
SPComplexTerm (SPCustomSymbol cst) [] | isVar cst -> case Map.lookup cst m of
Just (CVar s, _) -> return $ Var_decl [cst] s nullRange
_ -> fail $ "unknown variable: " ++ show cst
_ -> fail $ "quantified term as variable: " ++ showDoc sp ""
| 324 |
toVar :: Monad m => RMap -> SPTerm -> m VAR_DECL
toVar m sp = case sp of
SPComplexTerm (SPCustomSymbol cst) [] | isVar cst -> case Map.lookup cst m of
Just (CVar s, _) -> return $ Var_decl [cst] s nullRange
_ -> fail $ "unknown variable: " ++ show cst
_ -> fail $ "quantified term as variable: " ++ showDoc sp ""
| 324 |
toVar m sp = case sp of
SPComplexTerm (SPCustomSymbol cst) [] | isVar cst -> case Map.lookup cst m of
Just (CVar s, _) -> return $ Var_decl [cst] s nullRange
_ -> fail $ "unknown variable: " ++ show cst
_ -> fail $ "quantified term as variable: " ++ showDoc sp ""
| 275 | false | true | 2 | 10 | 76 | 145 | 68 | 77 | null | null |
ezyang/ghc
|
testsuite/tests/programs/andy_cherry/Main.hs
|
bsd-3-clause
|
replayQ (QuantumMove _ _ _ brd:rest) std_in
= "\027[H" ++ userFormat brd ++ waitQ rest std_in
| 101 |
replayQ (QuantumMove _ _ _ brd:rest) std_in
= "\027[H" ++ userFormat brd ++ waitQ rest std_in
| 101 |
replayQ (QuantumMove _ _ _ brd:rest) std_in
= "\027[H" ++ userFormat brd ++ waitQ rest std_in
| 101 | false | false | 0 | 8 | 23 | 43 | 20 | 23 | null | null |
shlevy/ghc
|
compiler/simplCore/OccurAnal.hs
|
bsd-3-clause
|
occAnal env expr@(Var _) = occAnalApp env (expr, [], [])
| 57 |
occAnal env expr@(Var _) = occAnalApp env (expr, [], [])
| 57 |
occAnal env expr@(Var _) = occAnalApp env (expr, [], [])
| 57 | false | false | 0 | 8 | 10 | 38 | 20 | 18 | null | null |
HIPERFIT/futhark
|
src/Futhark/IR/Parse.hs
|
isc
|
pLParams :: PR rep -> Parser [LParam rep]
pLParams pr = braces $ pLParam pr `sepBy` pComma
| 90 |
pLParams :: PR rep -> Parser [LParam rep]
pLParams pr = braces $ pLParam pr `sepBy` pComma
| 90 |
pLParams pr = braces $ pLParam pr `sepBy` pComma
| 48 | false | true | 0 | 9 | 16 | 48 | 22 | 26 | null | null |
martindavid/code-sandbox
|
haskell/exercises.hs
|
mit
|
myMap :: (a -> b) -> [a] -> [b]
myMap f [] = []
| 51 |
myMap :: (a -> b) -> [a] -> [b]
myMap f [] = []
| 51 |
myMap f [] = []
| 19 | false | true | 0 | 9 | 17 | 47 | 23 | 24 | null | null |
ditto/ditto
|
src/Ditto/Check.hs
|
gpl-3.0
|
inferAtom EType = return (EType, EType)
| 39 |
inferAtom EType = return (EType, EType)
| 39 |
inferAtom EType = return (EType, EType)
| 39 | false | false | 1 | 6 | 5 | 21 | 9 | 12 | null | null |
DavidAlphaFox/ghc
|
compiler/hsSyn/HsPat.hs
|
bsd-3-clause
|
isStrictLPat _ = False
| 49 |
isStrictLPat _ = False
| 49 |
isStrictLPat _ = False
| 49 | false | false | 0 | 5 | 30 | 9 | 4 | 5 | null | null |
evancz/builder
|
src/Elm/Install.hs
|
bsd-3-clause
|
withApproval :: (a -> String) -> Map Name (Change a) -> Task.Task () -> Task.Task ()
withApproval toString changes attemptInstall =
let
widths =
Map.foldrWithKey (widen toString) (Widths 0 0 0) changes
changeDocs =
Map.foldrWithKey (addChange toString widths) (Docs [] [] []) changes
printDoc doc =
P.displayIO IO.stdout $ P.renderPretty 1 80 doc
in
case changeDocs of
Docs [] [] [] ->
do liftIO $ putStrLn "Already installed. No changes necessary!"
Docs inserts [] [] ->
do liftIO $ putStrLn "Adding the following dependencies:\n"
liftIO $ printDoc $ P.indent 2 (P.vcat (reverse inserts))
liftIO $ putStrLn "\n"
attemptInstall
Docs _ _ _ ->
do liftIO $ putStrLn "Here is my plan:"
liftIO $ printDoc $ viewChangeDocs changeDocs
liftIO $ putStrLn "\nDo you approve? [Y/n]: "
Task.withApproval attemptInstall
-- VIEW CHANGE DOCS
| 988 |
withApproval :: (a -> String) -> Map Name (Change a) -> Task.Task () -> Task.Task ()
withApproval toString changes attemptInstall =
let
widths =
Map.foldrWithKey (widen toString) (Widths 0 0 0) changes
changeDocs =
Map.foldrWithKey (addChange toString widths) (Docs [] [] []) changes
printDoc doc =
P.displayIO IO.stdout $ P.renderPretty 1 80 doc
in
case changeDocs of
Docs [] [] [] ->
do liftIO $ putStrLn "Already installed. No changes necessary!"
Docs inserts [] [] ->
do liftIO $ putStrLn "Adding the following dependencies:\n"
liftIO $ printDoc $ P.indent 2 (P.vcat (reverse inserts))
liftIO $ putStrLn "\n"
attemptInstall
Docs _ _ _ ->
do liftIO $ putStrLn "Here is my plan:"
liftIO $ printDoc $ viewChangeDocs changeDocs
liftIO $ putStrLn "\nDo you approve? [Y/n]: "
Task.withApproval attemptInstall
-- VIEW CHANGE DOCS
| 988 |
withApproval toString changes attemptInstall =
let
widths =
Map.foldrWithKey (widen toString) (Widths 0 0 0) changes
changeDocs =
Map.foldrWithKey (addChange toString widths) (Docs [] [] []) changes
printDoc doc =
P.displayIO IO.stdout $ P.renderPretty 1 80 doc
in
case changeDocs of
Docs [] [] [] ->
do liftIO $ putStrLn "Already installed. No changes necessary!"
Docs inserts [] [] ->
do liftIO $ putStrLn "Adding the following dependencies:\n"
liftIO $ printDoc $ P.indent 2 (P.vcat (reverse inserts))
liftIO $ putStrLn "\n"
attemptInstall
Docs _ _ _ ->
do liftIO $ putStrLn "Here is my plan:"
liftIO $ printDoc $ viewChangeDocs changeDocs
liftIO $ putStrLn "\nDo you approve? [Y/n]: "
Task.withApproval attemptInstall
-- VIEW CHANGE DOCS
| 903 | false | true | 3 | 12 | 292 | 328 | 150 | 178 | null | null |
danchoi/jsontsv
|
Main.hs
|
mit
|
parseOpts :: O.Parser Options
parseOpts = Options
<$> O.argument O.str (O.metavar "FIELDS")
<*> (T.pack
<$> O.strOption (O.metavar "DELIM" <> O.value "," <> O.short 'a' <> O.help "Concatentated array elem delimiter. Defaults to comma."))
<*> (parseCSVMode <|> parseTSVMode)
<*> O.flag False True (O.short 'H' <> O.help "Include headers")
<*> (T.pack
<$> O.strOption (O.value "null"
<> O.short 'n' <> O.long "null-string"
<> O.metavar "STRING" <> O.help "String to represent null value. Default: 'null'"))
<*> (T.pack
<$> O.strOption (O.value "t"
<> O.short 't' <> O.long "true-string"
<> O.metavar "STRING" <> O.help "String to represent boolean true. Default: 't'"))
<*> (T.pack
<$> O.strOption (O.value "f"
<> O.short 'f' <> O.long "false-string"
<> O.metavar "STRING" <> O.help "String to represent boolean false. Default: 'f'"))
<*> O.option O.auto (O.value ' '
<> O.short 'N' <> O.long "newline"
<> O.metavar "STRING" <> O.help "String to replace newlines in field text. Default: ' '")
<*> O.switch (O.long "debug" <> O.help "Debug keypaths")
| 1,202 |
parseOpts :: O.Parser Options
parseOpts = Options
<$> O.argument O.str (O.metavar "FIELDS")
<*> (T.pack
<$> O.strOption (O.metavar "DELIM" <> O.value "," <> O.short 'a' <> O.help "Concatentated array elem delimiter. Defaults to comma."))
<*> (parseCSVMode <|> parseTSVMode)
<*> O.flag False True (O.short 'H' <> O.help "Include headers")
<*> (T.pack
<$> O.strOption (O.value "null"
<> O.short 'n' <> O.long "null-string"
<> O.metavar "STRING" <> O.help "String to represent null value. Default: 'null'"))
<*> (T.pack
<$> O.strOption (O.value "t"
<> O.short 't' <> O.long "true-string"
<> O.metavar "STRING" <> O.help "String to represent boolean true. Default: 't'"))
<*> (T.pack
<$> O.strOption (O.value "f"
<> O.short 'f' <> O.long "false-string"
<> O.metavar "STRING" <> O.help "String to represent boolean false. Default: 'f'"))
<*> O.option O.auto (O.value ' '
<> O.short 'N' <> O.long "newline"
<> O.metavar "STRING" <> O.help "String to replace newlines in field text. Default: ' '")
<*> O.switch (O.long "debug" <> O.help "Debug keypaths")
| 1,202 |
parseOpts = Options
<$> O.argument O.str (O.metavar "FIELDS")
<*> (T.pack
<$> O.strOption (O.metavar "DELIM" <> O.value "," <> O.short 'a' <> O.help "Concatentated array elem delimiter. Defaults to comma."))
<*> (parseCSVMode <|> parseTSVMode)
<*> O.flag False True (O.short 'H' <> O.help "Include headers")
<*> (T.pack
<$> O.strOption (O.value "null"
<> O.short 'n' <> O.long "null-string"
<> O.metavar "STRING" <> O.help "String to represent null value. Default: 'null'"))
<*> (T.pack
<$> O.strOption (O.value "t"
<> O.short 't' <> O.long "true-string"
<> O.metavar "STRING" <> O.help "String to represent boolean true. Default: 't'"))
<*> (T.pack
<$> O.strOption (O.value "f"
<> O.short 'f' <> O.long "false-string"
<> O.metavar "STRING" <> O.help "String to represent boolean false. Default: 'f'"))
<*> O.option O.auto (O.value ' '
<> O.short 'N' <> O.long "newline"
<> O.metavar "STRING" <> O.help "String to replace newlines in field text. Default: ' '")
<*> O.switch (O.long "debug" <> O.help "Debug keypaths")
| 1,172 | false | true | 27 | 14 | 308 | 431 | 204 | 227 | null | null |
ghc-android/ghc
|
testsuite/tests/ghci/should_run/ghcirun004.hs
|
bsd-3-clause
|
4411 = 4410
| 11 |
4411 = 4410
| 11 |
4411 = 4410
| 11 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
HJvT/com
|
System/Win32/Com/Exception.hs
|
bsd-3-clause
|
mEM_E_INVALID_LINK :: HRESULT
mEM_E_INVALID_LINK = word32ToInt32 (0x80080010 ::Word32)
| 86 |
mEM_E_INVALID_LINK :: HRESULT
mEM_E_INVALID_LINK = word32ToInt32 (0x80080010 ::Word32)
| 86 |
mEM_E_INVALID_LINK = word32ToInt32 (0x80080010 ::Word32)
| 56 | false | true | 0 | 6 | 7 | 26 | 12 | 14 | null | null |
haroldcarr/learn-haskell-coq-ml-etc
|
haskell/topic/streaming/2018-10-tim-williams-streaming-haskellX/src/TimWilliamsStreaming.hs
|
unlicense
|
example :: IO ()
example = mapMS_ print (return 1 <> return 2 <> return 3 :: Stream' Int)
| 89 |
example :: IO ()
example = mapMS_ print (return 1 <> return 2 <> return 3 :: Stream' Int)
| 89 |
example = mapMS_ print (return 1 <> return 2 <> return 3 :: Stream' Int)
| 72 | false | true | 0 | 9 | 18 | 47 | 22 | 25 | null | null |
timsears/species
|
Math/Combinatorics/Species/Types.hs
|
bsd-3-clause
|
liftEGF2 :: (PS.T Rational -> PS.T Rational -> PS.T Rational)
-> EGF -> EGF -> EGF
liftEGF2 f (EGF x) (EGF y) = EGF (f x y)
| 132 |
liftEGF2 :: (PS.T Rational -> PS.T Rational -> PS.T Rational)
-> EGF -> EGF -> EGF
liftEGF2 f (EGF x) (EGF y) = EGF (f x y)
| 132 |
liftEGF2 f (EGF x) (EGF y) = EGF (f x y)
| 40 | false | true | 0 | 10 | 35 | 79 | 38 | 41 | null | null |
traunio/helen-haskell
|
src/Lib.hs
|
gpl-2.0
|
lastReq (Empty loss) (x:xs) = lastReq (Full loss $ value x) xs
| 62 |
lastReq (Empty loss) (x:xs) = lastReq (Full loss $ value x) xs
| 62 |
lastReq (Empty loss) (x:xs) = lastReq (Full loss $ value x) xs
| 62 | false | false | 1 | 8 | 11 | 44 | 20 | 24 | null | null |
keithodulaigh/Hets
|
TopHybrid/Parse_AS.hs
|
gpl-2.0
|
-- Parses the declaration of nominals and modalities
itemParser :: AParser st TH_BASIC_ITEM
itemParser =
do
asKey "modalities"
ms <- ids
return $ Simple_mod_decl ms
<|>
do
asKey "nominals"
ns <- ids
return $ Simple_nom_decl ns
where ids = sepBy simpleId anSemiOrComma
-- Formula parser with annotations
| 384 |
itemParser :: AParser st TH_BASIC_ITEM
itemParser =
do
asKey "modalities"
ms <- ids
return $ Simple_mod_decl ms
<|>
do
asKey "nominals"
ns <- ids
return $ Simple_nom_decl ns
where ids = sepBy simpleId anSemiOrComma
-- Formula parser with annotations
| 331 |
itemParser =
do
asKey "modalities"
ms <- ids
return $ Simple_mod_decl ms
<|>
do
asKey "nominals"
ns <- ids
return $ Simple_nom_decl ns
where ids = sepBy simpleId anSemiOrComma
-- Formula parser with annotations
| 292 | true | true | 4 | 8 | 128 | 93 | 39 | 54 | null | null |
nyorem/cghs
|
viewer/Graphics/RenderableItem.hs
|
mit
|
-- | Get a line from a renderable.
getRenderableLine :: RenderableItem a -> Line2 a
getRenderableLine (RenderableLine2 l) = l
| 125 |
getRenderableLine :: RenderableItem a -> Line2 a
getRenderableLine (RenderableLine2 l) = l
| 90 |
getRenderableLine (RenderableLine2 l) = l
| 41 | true | true | 0 | 7 | 19 | 31 | 15 | 16 | null | null |
dysinger/amazonka
|
amazonka-opsworks/gen/Network/AWS/OpsWorks/Types.hs
|
mpl-2.0
|
-- | The number of instances in the Registering state.
icRegistering :: Lens' InstancesCount (Maybe Int)
icRegistering = lens _icRegistering (\s a -> s { _icRegistering = a })
| 175 |
icRegistering :: Lens' InstancesCount (Maybe Int)
icRegistering = lens _icRegistering (\s a -> s { _icRegistering = a })
| 120 |
icRegistering = lens _icRegistering (\s a -> s { _icRegistering = a })
| 70 | true | true | 0 | 9 | 28 | 46 | 25 | 21 | null | null |
mainland/nikola
|
src/Data/Array/Nikola/Backend/CUDA.hs
|
bsd-3-clause
|
sizeOfT BoolT = sizeOf (undefined :: Word8)
| 45 |
sizeOfT BoolT = sizeOf (undefined :: Word8)
| 45 |
sizeOfT BoolT = sizeOf (undefined :: Word8)
| 45 | false | false | 0 | 6 | 8 | 18 | 9 | 9 | null | null |
kojiromike/Idris-dev
|
src/Idris/Coverage.hs
|
bsd-3-clause
|
checkRec p@(Constant _) (App _ f a) = checkRec p f
| 50 |
checkRec p@(Constant _) (App _ f a) = checkRec p f
| 50 |
checkRec p@(Constant _) (App _ f a) = checkRec p f
| 50 | false | false | 0 | 8 | 10 | 35 | 17 | 18 | null | null |
frantisekfarka/ghc-dsi
|
compiler/cmm/MkGraph.hs
|
bsd-3-clause
|
mkFinalCall :: DynFlags
-> CmmExpr -> CCallConv -> [CmmActual] -> UpdFrameOffset
-> CmmAGraph
mkFinalCall dflags f _ actuals updfr_off =
lastWithArgs dflags Call Old NativeDirectCall actuals updfr_off $
toCall f Nothing updfr_off 0
| 267 |
mkFinalCall :: DynFlags
-> CmmExpr -> CCallConv -> [CmmActual] -> UpdFrameOffset
-> CmmAGraph
mkFinalCall dflags f _ actuals updfr_off =
lastWithArgs dflags Call Old NativeDirectCall actuals updfr_off $
toCall f Nothing updfr_off 0
| 267 |
mkFinalCall dflags f _ actuals updfr_off =
lastWithArgs dflags Call Old NativeDirectCall actuals updfr_off $
toCall f Nothing updfr_off 0
| 143 | false | true | 0 | 11 | 68 | 79 | 36 | 43 | null | null |
phaazon/OpenGLRaw
|
src/Graphics/Rendering/OpenGL/Raw/Tokens.hs
|
bsd-3-clause
|
gl_INT_IMAGE_1D_ARRAY_EXT :: GLenum
gl_INT_IMAGE_1D_ARRAY_EXT = 0x905D
| 70 |
gl_INT_IMAGE_1D_ARRAY_EXT :: GLenum
gl_INT_IMAGE_1D_ARRAY_EXT = 0x905D
| 70 |
gl_INT_IMAGE_1D_ARRAY_EXT = 0x905D
| 34 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
ChrisLane/leksah
|
src/IDE/Metainfo/Provider.hs
|
gpl-2.0
|
keywords :: [Text]
keywords = [
"as"
, "case"
, "of"
, "class"
, "data"
, "default"
, "deriving"
, "do"
, "forall"
, "foreign"
, "hiding"
, "if"
, "then"
, "else"
, "import"
, "infix"
, "infixl"
, "infixr"
, "instance"
, "let"
, "in"
, "mdo"
, "module"
, "newtype"
, "qualified"
, "type"
, "where"]
| 462 |
keywords :: [Text]
keywords = [
"as"
, "case"
, "of"
, "class"
, "data"
, "default"
, "deriving"
, "do"
, "forall"
, "foreign"
, "hiding"
, "if"
, "then"
, "else"
, "import"
, "infix"
, "infixl"
, "infixr"
, "instance"
, "let"
, "in"
, "mdo"
, "module"
, "newtype"
, "qualified"
, "type"
, "where"]
| 462 |
keywords = [
"as"
, "case"
, "of"
, "class"
, "data"
, "default"
, "deriving"
, "do"
, "forall"
, "foreign"
, "hiding"
, "if"
, "then"
, "else"
, "import"
, "infix"
, "infixl"
, "infixr"
, "instance"
, "let"
, "in"
, "mdo"
, "module"
, "newtype"
, "qualified"
, "type"
, "where"]
| 443 | false | true | 0 | 5 | 222 | 95 | 62 | 33 | null | null |
expipiplus1/vulkan
|
examples/sdl-triangle/Main.hs
|
bsd-3-clause
|
-- | Create an SDL window and use it
withWindow :: Text -> Int -> Int -> Managed SDL.Window
withWindow title width height = managed $ bracket
(SDL.createWindow
title
(SDL.defaultWindow
{ SDL.windowInitialSize = SDL.V2 (fromIntegral width)
(fromIntegral height)
, SDL.windowGraphicsContext = SDL.VulkanContext
}
)
)
SDL.destroyWindow
| 415 |
withWindow :: Text -> Int -> Int -> Managed SDL.Window
withWindow title width height = managed $ bracket
(SDL.createWindow
title
(SDL.defaultWindow
{ SDL.windowInitialSize = SDL.V2 (fromIntegral width)
(fromIntegral height)
, SDL.windowGraphicsContext = SDL.VulkanContext
}
)
)
SDL.destroyWindow
| 378 |
withWindow title width height = managed $ bracket
(SDL.createWindow
title
(SDL.defaultWindow
{ SDL.windowInitialSize = SDL.V2 (fromIntegral width)
(fromIntegral height)
, SDL.windowGraphicsContext = SDL.VulkanContext
}
)
)
SDL.destroyWindow
| 323 | true | true | 0 | 12 | 128 | 102 | 52 | 50 | null | null |
adarqui/todomvc-haskell-servant-purescript
|
haskell_src/Web/TodoMVC/Servant/Shared.hs
|
mit
|
-- | newBigState
--
newBigState :: IO (TVar BigState)
newBigState = newTVarIO $ BigState newTodoApp
| 99 |
newBigState :: IO (TVar BigState)
newBigState = newTVarIO $ BigState newTodoApp
| 79 |
newBigState = newTVarIO $ BigState newTodoApp
| 45 | true | true | 4 | 6 | 14 | 36 | 15 | 21 | null | null |
ghcjs/jsaddle-dom
|
src/JSDOM/Generated/Enums.hs
|
mit
|
js_MediaKeysRequirementOptional = "optional"
| 44 |
js_MediaKeysRequirementOptional = "optional"
| 44 |
js_MediaKeysRequirementOptional = "optional"
| 44 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
tylerkahn/dcpu16-haskell
|
DCPU16/Emulator.hs
|
mit
|
runProgram p = map fst $ runIdentity $
runUntil (\cpu -> brk cpu > 0) pulse (loadProgram p startingDCPUState)
| 117 |
runProgram p = map fst $ runIdentity $
runUntil (\cpu -> brk cpu > 0) pulse (loadProgram p startingDCPUState)
| 117 |
runProgram p = map fst $ runIdentity $
runUntil (\cpu -> brk cpu > 0) pulse (loadProgram p startingDCPUState)
| 117 | false | false | 1 | 9 | 26 | 54 | 24 | 30 | null | null |
three/codeworld
|
codeworld-api/src/CodeWorld/Color.hs
|
apache-2.0
|
toHSL :: Color -> Maybe (Double, Double, Double)
toHSL c@(RGBA _ _ _ 1) = Just (hue c, saturation c, luminosity c)
| 114 |
toHSL :: Color -> Maybe (Double, Double, Double)
toHSL c@(RGBA _ _ _ 1) = Just (hue c, saturation c, luminosity c)
| 114 |
toHSL c@(RGBA _ _ _ 1) = Just (hue c, saturation c, luminosity c)
| 65 | false | true | 0 | 8 | 21 | 66 | 34 | 32 | null | null |
hanshoglund/modulo
|
src/Language/Modulo/Haskell.hs
|
gpl-3.0
|
-- typedef T N;
convertDecl st (FunctionDecl n t) = return $ declFun st n t
| 78 |
convertDecl st (FunctionDecl n t) = return $ declFun st n t
| 62 |
convertDecl st (FunctionDecl n t) = return $ declFun st n t
| 62 | true | false | 0 | 7 | 18 | 31 | 15 | 16 | null | null |
abhinav-mehta/CipherSolver
|
src/MorseEncode.hs
|
bsd-3-clause
|
lowerCase (x:xs) = (toLower x):(lowerCase xs)
| 45 |
lowerCase (x:xs) = (toLower x):(lowerCase xs)
| 45 |
lowerCase (x:xs) = (toLower x):(lowerCase xs)
| 45 | false | false | 2 | 7 | 5 | 36 | 16 | 20 | null | null |
urv/fixhs
|
src/Data/FIX/Spec/FIX43.hs
|
lgpl-2.1
|
tPutOrCall :: FIXTag
tPutOrCall = FIXTag
{ tName = "PutOrCall"
, tnum = 201
, tparser = toFIXInt
, arbitraryValue = FIXInt <$> arbitrary }
| 151 |
tPutOrCall :: FIXTag
tPutOrCall = FIXTag
{ tName = "PutOrCall"
, tnum = 201
, tparser = toFIXInt
, arbitraryValue = FIXInt <$> arbitrary }
| 151 |
tPutOrCall = FIXTag
{ tName = "PutOrCall"
, tnum = 201
, tparser = toFIXInt
, arbitraryValue = FIXInt <$> arbitrary }
| 130 | false | true | 0 | 8 | 37 | 45 | 26 | 19 | null | null |
oldmanmike/ghc
|
compiler/prelude/PrelNames.hs
|
bsd-3-clause
|
rec0TyConName = tcQual gHC_GENERICS (fsLit "Rec0") rec0TyConKey
| 64 |
rec0TyConName = tcQual gHC_GENERICS (fsLit "Rec0") rec0TyConKey
| 64 |
rec0TyConName = tcQual gHC_GENERICS (fsLit "Rec0") rec0TyConKey
| 64 | false | false | 0 | 7 | 7 | 19 | 9 | 10 | null | null |
geophf/1HaskellADay
|
exercises/HAD/Y2017/M11/D17/Solution.hs
|
mit
|
{--
>>> connectInfo
ConnectInfo {connectHost = "...",...}
>>> conn <- connect it
>>> keys <- fetchKW conn
>>> length keys
0
--}
-- init your memoizing table with the keywords, then partition pre-stored
-- keywords and new keywords. Add the new keywords to the datastore and get
-- back the new indicies then update the memoizing table
{--
>>> kwmt = MT.initMemTable (Map.empty, Map.empty)
--}
{-- MARRYING KEYPHRASES ----------------------------------------------------
Now here is the meat of today's exercise. Let's say you've stored a set of
key-phrases on a new set of articles you've processed ('processed' meaning
'extracted the key-phrases from') under a key-phrase 'kind' (therefore
versioning the key-phrase insert). So, we're going to fetch those key-phrases
with their ids, associate these keywords with the indexed key-phrases.
Then, from Y2017.M11.D13, we have IndexedArticles, and, as we have the ids of
keywords, we can join article ids to keyword ids via the memoizing table.
--}
-- JOINING KEYWORDS AND KEYPHRASES -----------------------------------------
{--
instance FromRow Keyphrase where
fromRow = KW <$> field <*> (SQS <$> field)
--}
fetchKPhrsStmt :: Query
fetchKPhrsStmt =
[sql|SELECT id,strength,keyphrase FROM keyphrase WHERE kind = ?|]
| 1,279 |
fetchKPhrsStmt :: Query
fetchKPhrsStmt =
[sql|SELECT id,strength,keyphrase FROM keyphrase WHERE kind = ?|]
| 109 |
fetchKPhrsStmt =
[sql|SELECT id,strength,keyphrase FROM keyphrase WHERE kind = ?|]
| 85 | true | true | 0 | 6 | 201 | 30 | 19 | 11 | null | null |
Haskell-Praxis/hakyll-cms
|
client/Main.hs
|
bsd-2-clause
|
routedContent :: MonadWidget t m => m ()
routedContent = do
-- rec
-- r <- partialPathRoute "" . switchPromptlyDyn =<< holdDyn never views
-- gotoRoute <- dyn $ ffor r routingMappingOld -- don't need this. we're using fragment identifiers (i.e. the browser handles clicks on links for us)
-- browser handles route changes for us, so we don't need to pass in an event to trigger that
r <- route never
let views = fmap routingMapping r
dyn views
return ()
| 474 |
routedContent :: MonadWidget t m => m ()
routedContent = do
-- rec
-- r <- partialPathRoute "" . switchPromptlyDyn =<< holdDyn never views
-- gotoRoute <- dyn $ ffor r routingMappingOld -- don't need this. we're using fragment identifiers (i.e. the browser handles clicks on links for us)
-- browser handles route changes for us, so we don't need to pass in an event to trigger that
r <- route never
let views = fmap routingMapping r
dyn views
return ()
| 474 |
routedContent = do
-- rec
-- r <- partialPathRoute "" . switchPromptlyDyn =<< holdDyn never views
-- gotoRoute <- dyn $ ffor r routingMappingOld -- don't need this. we're using fragment identifiers (i.e. the browser handles clicks on links for us)
-- browser handles route changes for us, so we don't need to pass in an event to trigger that
r <- route never
let views = fmap routingMapping r
dyn views
return ()
| 433 | false | true | 0 | 11 | 102 | 73 | 32 | 41 | null | null |
orclev/sprint-logic-rest
|
Api/Version.hs
|
gpl-3.0
|
resource :: Resource SiteApi VersionHandler () Void Void
resource = mkResourceReader
{ R.name = "version"
, R.schema = singleton () (unnamedSingle (\_ -> ()))
, R.get = Just get
}
| 187 |
resource :: Resource SiteApi VersionHandler () Void Void
resource = mkResourceReader
{ R.name = "version"
, R.schema = singleton () (unnamedSingle (\_ -> ()))
, R.get = Just get
}
| 187 |
resource = mkResourceReader
{ R.name = "version"
, R.schema = singleton () (unnamedSingle (\_ -> ()))
, R.get = Just get
}
| 130 | false | true | 1 | 13 | 37 | 83 | 42 | 41 | null | null |
laser/haste-experiment
|
demos/canvas/canvas.hs
|
mit
|
main = do
Just canvas <- getCanvasById "canvas"
animate canvas 0
| 68 |
main = do
Just canvas <- getCanvasById "canvas"
animate canvas 0
| 68 |
main = do
Just canvas <- getCanvasById "canvas"
animate canvas 0
| 68 | false | false | 0 | 8 | 14 | 27 | 11 | 16 | null | null |
cdxr/haskell-interface
|
src/LoadModuleInterface.hs
|
bsd-3-clause
|
tyThingNamespace :: GHC.TyThing -> Interface.Namespace
tyThingNamespace tyThing = case tyThing of
AnId{} -> Values
AConLike{} -> Values
ATyCon{} -> Types
ACoAxiom{} -> Types
| 195 |
tyThingNamespace :: GHC.TyThing -> Interface.Namespace
tyThingNamespace tyThing = case tyThing of
AnId{} -> Values
AConLike{} -> Values
ATyCon{} -> Types
ACoAxiom{} -> Types
| 195 |
tyThingNamespace tyThing = case tyThing of
AnId{} -> Values
AConLike{} -> Values
ATyCon{} -> Types
ACoAxiom{} -> Types
| 140 | false | true | 2 | 6 | 44 | 47 | 30 | 17 | null | null |
ianagbip1oti/ProC
|
src/ProC/Parser/Statement.hs
|
mit
|
statements :: Parser Statement
statements = do
whiteSpace
-- TODO: We allow input that doens't finish with a final ;
list <- many1 (blockStatement <|> whlStatement <|> statement <* semi)
eof
return $ Seq list
| 220 |
statements :: Parser Statement
statements = do
whiteSpace
-- TODO: We allow input that doens't finish with a final ;
list <- many1 (blockStatement <|> whlStatement <|> statement <* semi)
eof
return $ Seq list
| 220 |
statements = do
whiteSpace
-- TODO: We allow input that doens't finish with a final ;
list <- many1 (blockStatement <|> whlStatement <|> statement <* semi)
eof
return $ Seq list
| 189 | false | true | 0 | 13 | 46 | 62 | 27 | 35 | null | null |
ducis/haAni
|
hs/common/Graphics/Rendering/OpenGL/GL/BufferObjects.hs
|
gpl-2.0
|
getBufferPointer :: BufferTarget -> IO (Ptr a)
getBufferPointer t = alloca $ \buf -> do
glGetBufferPointerv (marshalBufferTarget t) gl_BUFFER_MAP_POINTER buf
peek buf
--------------------------------------------------------------------------------
| 254 |
getBufferPointer :: BufferTarget -> IO (Ptr a)
getBufferPointer t = alloca $ \buf -> do
glGetBufferPointerv (marshalBufferTarget t) gl_BUFFER_MAP_POINTER buf
peek buf
--------------------------------------------------------------------------------
| 254 |
getBufferPointer t = alloca $ \buf -> do
glGetBufferPointerv (marshalBufferTarget t) gl_BUFFER_MAP_POINTER buf
peek buf
--------------------------------------------------------------------------------
| 207 | false | true | 0 | 11 | 29 | 59 | 28 | 31 | null | null |
stevenremot/fronsduk
|
src/Bytecode.hs
|
gpl-3.0
|
handleOperator Sel = do
true <- deserializeLimitedControl
false <- deserializeLimitedControl
return $ true ++ false
| 121 |
handleOperator Sel = do
true <- deserializeLimitedControl
false <- deserializeLimitedControl
return $ true ++ false
| 121 |
handleOperator Sel = do
true <- deserializeLimitedControl
false <- deserializeLimitedControl
return $ true ++ false
| 121 | false | false | 0 | 8 | 20 | 34 | 15 | 19 | null | null |
anton-k/language-css
|
src/Language/Css/Build/Tags.hs
|
bsd-3-clause
|
-- | @caption@ tag
caption :: Sel'
caption = ident "caption"
| 60 |
caption :: Sel'
caption = ident "caption"
| 41 |
caption = ident "caption"
| 25 | true | true | 0 | 6 | 10 | 22 | 9 | 13 | null | null |
betaveros/bcodex
|
Text/Bcodex/Radix.hs
|
mit
|
toUpperRadixTokens :: Int -> Int -> CxList Int -> CxList Char
toUpperRadixTokens radix blockSize = mapRights toUpper . toRadixTokens radix blockSize
| 148 |
toUpperRadixTokens :: Int -> Int -> CxList Int -> CxList Char
toUpperRadixTokens radix blockSize = mapRights toUpper . toRadixTokens radix blockSize
| 148 |
toUpperRadixTokens radix blockSize = mapRights toUpper . toRadixTokens radix blockSize
| 86 | false | true | 0 | 8 | 20 | 46 | 21 | 25 | null | null |
david-caro/shellcheck
|
ShellCheck/ASTLib.hs
|
gpl-3.0
|
-- Return a list of NormalWords that would result from brace expansion
braceExpand (T_NormalWord id list) = take 1000 $ do
items <- mapM part list
return $ T_NormalWord id items
where
part (T_BraceExpansion id items) = do
item <- items
braceExpand item
part x = return x
-- Maybe get the command name of a token representing a command
| 369 |
braceExpand (T_NormalWord id list) = take 1000 $ do
items <- mapM part list
return $ T_NormalWord id items
where
part (T_BraceExpansion id items) = do
item <- items
braceExpand item
part x = return x
-- Maybe get the command name of a token representing a command
| 298 |
braceExpand (T_NormalWord id list) = take 1000 $ do
items <- mapM part list
return $ T_NormalWord id items
where
part (T_BraceExpansion id items) = do
item <- items
braceExpand item
part x = return x
-- Maybe get the command name of a token representing a command
| 298 | true | false | 1 | 9 | 94 | 99 | 42 | 57 | null | null |
brendanhay/gogol
|
gogol-youtube/gen/Network/Google/Resource/YouTube/LiveBroadcasts/List.hs
|
mpl-2.0
|
-- | Creates a value of 'LiveBroadcastsList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'lblXgafv'
--
-- * 'lblPart'
--
-- * 'lblMine'
--
-- * 'lblUploadProtocol'
--
-- * 'lblAccessToken'
--
-- * 'lblUploadType'
--
-- * 'lblBroadcastStatus'
--
-- * 'lblOnBehalfOfContentOwner'
--
-- * 'lblBroadcastType'
--
-- * 'lblOnBehalfOfContentOwnerChannel'
--
-- * 'lblId'
--
-- * 'lblPageToken'
--
-- * 'lblMaxResults'
--
-- * 'lblCallback'
liveBroadcastsList
:: [Text] -- ^ 'lblPart'
-> LiveBroadcastsList
liveBroadcastsList pLblPart_ =
LiveBroadcastsList'
{ _lblXgafv = Nothing
, _lblPart = _Coerce # pLblPart_
, _lblMine = Nothing
, _lblUploadProtocol = Nothing
, _lblAccessToken = Nothing
, _lblUploadType = Nothing
, _lblBroadcastStatus = Nothing
, _lblOnBehalfOfContentOwner = Nothing
, _lblBroadcastType = Event
, _lblOnBehalfOfContentOwnerChannel = Nothing
, _lblId = Nothing
, _lblPageToken = Nothing
, _lblMaxResults = 5
, _lblCallback = Nothing
}
| 1,108 |
liveBroadcastsList
:: [Text] -- ^ 'lblPart'
-> LiveBroadcastsList
liveBroadcastsList pLblPart_ =
LiveBroadcastsList'
{ _lblXgafv = Nothing
, _lblPart = _Coerce # pLblPart_
, _lblMine = Nothing
, _lblUploadProtocol = Nothing
, _lblAccessToken = Nothing
, _lblUploadType = Nothing
, _lblBroadcastStatus = Nothing
, _lblOnBehalfOfContentOwner = Nothing
, _lblBroadcastType = Event
, _lblOnBehalfOfContentOwnerChannel = Nothing
, _lblId = Nothing
, _lblPageToken = Nothing
, _lblMaxResults = 5
, _lblCallback = Nothing
}
| 586 |
liveBroadcastsList pLblPart_ =
LiveBroadcastsList'
{ _lblXgafv = Nothing
, _lblPart = _Coerce # pLblPart_
, _lblMine = Nothing
, _lblUploadProtocol = Nothing
, _lblAccessToken = Nothing
, _lblUploadType = Nothing
, _lblBroadcastStatus = Nothing
, _lblOnBehalfOfContentOwner = Nothing
, _lblBroadcastType = Event
, _lblOnBehalfOfContentOwnerChannel = Nothing
, _lblId = Nothing
, _lblPageToken = Nothing
, _lblMaxResults = 5
, _lblCallback = Nothing
}
| 512 | true | true | 0 | 8 | 226 | 152 | 104 | 48 | null | null |
ezyang/ghc
|
compiler/codeGen/StgCmmPrim.hs
|
bsd-3-clause
|
emitPrimOp dflags res ReadOffAddrOp_Word16 args = doIndexOffAddrOp (Just (mo_u_16ToWord dflags)) b16 res args
| 121 |
emitPrimOp dflags res ReadOffAddrOp_Word16 args = doIndexOffAddrOp (Just (mo_u_16ToWord dflags)) b16 res args
| 121 |
emitPrimOp dflags res ReadOffAddrOp_Word16 args = doIndexOffAddrOp (Just (mo_u_16ToWord dflags)) b16 res args
| 121 | false | false | 0 | 9 | 24 | 40 | 17 | 23 | null | null |
opqdonut/riot
|
Riot/UI.hs
|
gpl-2.0
|
do_move_tagged :: Entry a => Status a -> InsertWhere -> Status a
do_move_tagged s insw =
do_clear_tags $ do_move s insw tagged
where
tagged = entrytree_get_tagged (entries s)
| 190 |
do_move_tagged :: Entry a => Status a -> InsertWhere -> Status a
do_move_tagged s insw =
do_clear_tags $ do_move s insw tagged
where
tagged = entrytree_get_tagged (entries s)
| 190 |
do_move_tagged s insw =
do_clear_tags $ do_move s insw tagged
where
tagged = entrytree_get_tagged (entries s)
| 125 | false | true | 0 | 8 | 43 | 65 | 30 | 35 | null | null |
rvion/ride
|
jetpack/src/Control/Monad/Trans/State/Lazy/AsTrans.hs
|
bsd-3-clause
|
-- trans_withStateT :: forall s (m :: * -> *) a. (s -> s) -> StateT s m a -> StateT s m a
trans_withStateT = I.withStateT
| 121 |
trans_withStateT = I.withStateT
| 31 |
trans_withStateT = I.withStateT
| 31 | true | false | 0 | 5 | 26 | 9 | 5 | 4 | null | null |
tonyfloatersu/solution-haskell-craft-of-FP
|
Chapter4.hs
|
mit
|
-- Local definitions
-- ^^^^^^^^^^^^^^^^^
-- Four ways of defining a Picture using
-- different combinations of loca definitions.
fourPics1 :: Picture -> Picture
fourPics1 pic =
left `beside` right
where
left = pic `above` invertColour pic
right = invertColour (flipV pic) `above` flipV pic
| 321 |
fourPics1 :: Picture -> Picture
fourPics1 pic =
left `beside` right
where
left = pic `above` invertColour pic
right = invertColour (flipV pic) `above` flipV pic
| 187 |
fourPics1 pic =
left `beside` right
where
left = pic `above` invertColour pic
right = invertColour (flipV pic) `above` flipV pic
| 155 | true | true | 0 | 10 | 75 | 67 | 38 | 29 | null | null |
burz/Rayzer
|
Base/Light.hs
|
mit
|
specular' :: Color -> Unit3 -> Unit3 -> Color -> Double -> Color
specular' k v r i n = k * (((v &. r) ** n) *& i)
| 113 |
specular' :: Color -> Unit3 -> Unit3 -> Color -> Double -> Color
specular' k v r i n = k * (((v &. r) ** n) *& i)
| 113 |
specular' k v r i n = k * (((v &. r) ** n) *& i)
| 48 | false | true | 0 | 11 | 28 | 67 | 35 | 32 | null | null |
asm-products/ccar-websockets
|
CCAR/Main/Driver.hs
|
agpl-3.0
|
checkPassword :: CheckPassword -> IO (DestinationType, CheckPassword)
checkPassword b@(CheckPassword personNickName password _ attempts) = do
chk <- checkLoginExists(personNickName)
case chk of
Nothing -> return $ (GroupCommunication.Reply, b {passwordValid = (Just False)})
Just (Entity aid a) -> do
return $ (Reply, b {passwordValid = validatePassword (personPassword a) b
, numberOfAttemmpts = attempts + 1 })
| 483 |
checkPassword :: CheckPassword -> IO (DestinationType, CheckPassword)
checkPassword b@(CheckPassword personNickName password _ attempts) = do
chk <- checkLoginExists(personNickName)
case chk of
Nothing -> return $ (GroupCommunication.Reply, b {passwordValid = (Just False)})
Just (Entity aid a) -> do
return $ (Reply, b {passwordValid = validatePassword (personPassword a) b
, numberOfAttemmpts = attempts + 1 })
| 482 |
checkPassword b@(CheckPassword personNickName password _ attempts) = do
chk <- checkLoginExists(personNickName)
case chk of
Nothing -> return $ (GroupCommunication.Reply, b {passwordValid = (Just False)})
Just (Entity aid a) -> do
return $ (Reply, b {passwordValid = validatePassword (personPassword a) b
, numberOfAttemmpts = attempts + 1 })
| 412 | false | true | 0 | 18 | 124 | 153 | 80 | 73 | null | null |
NCrashed/hjass
|
src/library/Language/Jass/Parser/Grammar.hs
|
mit
|
nativeDecl :: JassParser NativeDecl
nativeDecl = do
pos <- getPosition'
cnst <- isConstant
reserved "native"
fdecl <- functionDecl
return $ NativeDecl pos cnst fdecl
| 175 |
nativeDecl :: JassParser NativeDecl
nativeDecl = do
pos <- getPosition'
cnst <- isConstant
reserved "native"
fdecl <- functionDecl
return $ NativeDecl pos cnst fdecl
| 175 |
nativeDecl = do
pos <- getPosition'
cnst <- isConstant
reserved "native"
fdecl <- functionDecl
return $ NativeDecl pos cnst fdecl
| 139 | false | true | 0 | 8 | 33 | 55 | 24 | 31 | null | null |
k0001/gtk2hs
|
tools/apiGen/src/ModuleScan.hs
|
gpl-3.0
|
scanAuthor :: [String] -> Line
scanAuthor =
Authors
. map unwords
. splitBy ","
| 87 |
scanAuthor :: [String] -> Line
scanAuthor =
Authors
. map unwords
. splitBy ","
| 87 |
scanAuthor =
Authors
. map unwords
. splitBy ","
| 56 | false | true | 2 | 6 | 21 | 34 | 16 | 18 | null | null |
chrisbouchard/bartender
|
src/BarTender/Util.hs
|
gpl-3.0
|
maybeToEither (Just x) _ = Right x
| 34 |
maybeToEither (Just x) _ = Right x
| 34 |
maybeToEither (Just x) _ = Right x
| 34 | false | false | 0 | 7 | 6 | 20 | 9 | 11 | null | null |
jeffreyrosenbluth/Halgorithms
|
test/Sorting/QuickSpec.hs
|
bsd-3-clause
|
spec :: Spec
spec =
describe "Quick Sort" $ do
it "Sorts a vector using quick sort." $
sort (V.fromList "sortexample") `shouldBe` V.fromList "aeelmoprstx"
it "Sorts a list of Ints." $ property $
\x -> (sort . V.fromList) x == V.fromList (L.sort (x :: [Int]))
| 280 |
spec :: Spec
spec =
describe "Quick Sort" $ do
it "Sorts a vector using quick sort." $
sort (V.fromList "sortexample") `shouldBe` V.fromList "aeelmoprstx"
it "Sorts a list of Ints." $ property $
\x -> (sort . V.fromList) x == V.fromList (L.sort (x :: [Int]))
| 280 |
spec =
describe "Quick Sort" $ do
it "Sorts a vector using quick sort." $
sort (V.fromList "sortexample") `shouldBe` V.fromList "aeelmoprstx"
it "Sorts a list of Ints." $ property $
\x -> (sort . V.fromList) x == V.fromList (L.sort (x :: [Int]))
| 267 | false | true | 0 | 15 | 66 | 107 | 53 | 54 | null | null |
dysinger/amazonka
|
amazonka-config/gen/Network/AWS/Config/DeliverConfigSnapshot.hs
|
mpl-2.0
|
-- | 'DeliverConfigSnapshotResponse' constructor.
--
-- The fields accessible through corresponding lenses are:
--
-- * 'dcsrConfigSnapshotId' @::@ 'Maybe' 'Text'
--
deliverConfigSnapshotResponse :: DeliverConfigSnapshotResponse
deliverConfigSnapshotResponse = DeliverConfigSnapshotResponse
{ _dcsrConfigSnapshotId = Nothing
}
| 334 |
deliverConfigSnapshotResponse :: DeliverConfigSnapshotResponse
deliverConfigSnapshotResponse = DeliverConfigSnapshotResponse
{ _dcsrConfigSnapshotId = Nothing
}
| 168 |
deliverConfigSnapshotResponse = DeliverConfigSnapshotResponse
{ _dcsrConfigSnapshotId = Nothing
}
| 105 | true | true | 0 | 6 | 39 | 25 | 17 | 8 | null | null |
alonho/bottle
|
src/Graphics/UI/Bottle/Widgets/TextEdit.hs
|
gpl-3.0
|
makeTextEditCursor :: Anim.AnimId -> Int -> Anim.AnimId
makeTextEditCursor myId = Anim.joinId myId . (:[]) . BinUtils.encodeS
| 125 |
makeTextEditCursor :: Anim.AnimId -> Int -> Anim.AnimId
makeTextEditCursor myId = Anim.joinId myId . (:[]) . BinUtils.encodeS
| 125 |
makeTextEditCursor myId = Anim.joinId myId . (:[]) . BinUtils.encodeS
| 69 | false | true | 0 | 8 | 15 | 47 | 24 | 23 | null | null |
graninas/The-Amoeba-World
|
src/Amoeba/Test/Experiments/TypeFamilies/TypeFamilyTest1.hs
|
gpl-3.0
|
main = do
print $ getProperty (IntProperty "a" 10)
print $ getProperty (IntResource "b" (20, 20))
putStrLn "Ok."
| 125 |
main = do
print $ getProperty (IntProperty "a" 10)
print $ getProperty (IntResource "b" (20, 20))
putStrLn "Ok."
| 125 |
main = do
print $ getProperty (IntProperty "a" 10)
print $ getProperty (IntResource "b" (20, 20))
putStrLn "Ok."
| 125 | false | false | 0 | 11 | 30 | 54 | 25 | 29 | null | null |
getyourguide/fbthrift
|
thrift/compiler/test/fixtures/qualified/gen-hs/Module1_Types.hs
|
apache-2.0
|
to_Struct _ = error "not a struct"
| 34 |
to_Struct _ = error "not a struct"
| 34 |
to_Struct _ = error "not a struct"
| 34 | false | false | 0 | 5 | 6 | 12 | 5 | 7 | null | null |
verement/etamoo
|
src/MOO/Compiler.hs
|
bsd-3-clause
|
lValue expr = LValue fetch store change
where fetch = evaluate expr
store _ = error "Unmodifiable LValue"
change = fetch >>= \value -> return (value, store)
| 177 |
lValue expr = LValue fetch store change
where fetch = evaluate expr
store _ = error "Unmodifiable LValue"
change = fetch >>= \value -> return (value, store)
| 177 |
lValue expr = LValue fetch store change
where fetch = evaluate expr
store _ = error "Unmodifiable LValue"
change = fetch >>= \value -> return (value, store)
| 177 | false | false | 2 | 8 | 47 | 61 | 30 | 31 | null | null |
eklavya/Idris-dev
|
src/Idris/Core/ProofState.hs
|
bsd-3-clause
|
intro :: Maybe Name -> RunTactic
intro mn ctxt env (Bind x (Hole t) (P _ x' _)) | x == x' =
do let t' = case t of
x@(Bind y (Pi _ s _) _) -> x
_ -> normalise ctxt env t
case t' of
Bind y (Pi _ s _) t ->
let n = case mn of
Just name -> name
Nothing -> y
-- It's important that this be subst and not updsubst,
-- because we want to substitute even in portions of
-- terms that we know do not contain holes.
t' = subst y (P Bound n s) t
in return $ Bind n (Lam s) (Bind x (Hole t') (P Bound x t'))
_ -> lift $ tfail $ CantIntroduce t'
| 742 |
intro :: Maybe Name -> RunTactic
intro mn ctxt env (Bind x (Hole t) (P _ x' _)) | x == x' =
do let t' = case t of
x@(Bind y (Pi _ s _) _) -> x
_ -> normalise ctxt env t
case t' of
Bind y (Pi _ s _) t ->
let n = case mn of
Just name -> name
Nothing -> y
-- It's important that this be subst and not updsubst,
-- because we want to substitute even in portions of
-- terms that we know do not contain holes.
t' = subst y (P Bound n s) t
in return $ Bind n (Lam s) (Bind x (Hole t') (P Bound x t'))
_ -> lift $ tfail $ CantIntroduce t'
| 742 |
intro mn ctxt env (Bind x (Hole t) (P _ x' _)) | x == x' =
do let t' = case t of
x@(Bind y (Pi _ s _) _) -> x
_ -> normalise ctxt env t
case t' of
Bind y (Pi _ s _) t ->
let n = case mn of
Just name -> name
Nothing -> y
-- It's important that this be subst and not updsubst,
-- because we want to substitute even in portions of
-- terms that we know do not contain holes.
t' = subst y (P Bound n s) t
in return $ Bind n (Lam s) (Bind x (Hole t') (P Bound x t'))
_ -> lift $ tfail $ CantIntroduce t'
| 709 | false | true | 0 | 18 | 340 | 263 | 128 | 135 | null | null |
alexvong1995/pandoc
|
src/Text/Pandoc/Readers/LaTeX.hs
|
gpl-2.0
|
environment :: LP Blocks
environment = do
controlSeq "begin"
name <- braced
M.findWithDefault mzero name environments
<|> rawEnv name
| 143 |
environment :: LP Blocks
environment = do
controlSeq "begin"
name <- braced
M.findWithDefault mzero name environments
<|> rawEnv name
| 143 |
environment = do
controlSeq "begin"
name <- braced
M.findWithDefault mzero name environments
<|> rawEnv name
| 118 | false | true | 0 | 9 | 28 | 46 | 20 | 26 | null | null |
dlgd/monoid-average
|
test/Spec.hs
|
bsd-3-clause
|
maybeEq (Just x') (Just y') = x' `testEq` y'
| 44 |
maybeEq (Just x') (Just y') = x' `testEq` y'
| 44 |
maybeEq (Just x') (Just y') = x' `testEq` y'
| 44 | false | false | 0 | 6 | 8 | 31 | 15 | 16 | null | null |
brendanhay/gogol
|
gogol-vault/gen/Network/Google/Vault/Types/Product.hs
|
mpl-2.0
|
-- | The matter ID, which is generated by the server. Leave blank when
-- creating a matter.
mMatterId :: Lens' Matter (Maybe Text)
mMatterId
= lens _mMatterId (\ s a -> s{_mMatterId = a})
| 190 |
mMatterId :: Lens' Matter (Maybe Text)
mMatterId
= lens _mMatterId (\ s a -> s{_mMatterId = a})
| 97 |
mMatterId
= lens _mMatterId (\ s a -> s{_mMatterId = a})
| 58 | true | true | 0 | 9 | 36 | 49 | 26 | 23 | null | null |
brendanhay/gogol
|
gogol-cloudidentity/gen/Network/Google/Resource/CloudIdentity/Groups/Memberships/Create.hs
|
mpl-2.0
|
-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
gmcUploadProtocol :: Lens' GroupsMembershipsCreate (Maybe Text)
gmcUploadProtocol
= lens _gmcUploadProtocol
(\ s a -> s{_gmcUploadProtocol = a})
| 214 |
gmcUploadProtocol :: Lens' GroupsMembershipsCreate (Maybe Text)
gmcUploadProtocol
= lens _gmcUploadProtocol
(\ s a -> s{_gmcUploadProtocol = a})
| 152 |
gmcUploadProtocol
= lens _gmcUploadProtocol
(\ s a -> s{_gmcUploadProtocol = a})
| 88 | true | true | 0 | 9 | 33 | 48 | 25 | 23 | null | null |
the-real-blackh/hexpat
|
test/suite/Text/XML/Expat/Tests.hs
|
bsd-3-clause
|
testAttrSet :: [ByteString]
testAttrSet = [ "sheep"
, "ram"
, "quail"
, "penguin"
, "ox"
, "narwhal" ]
| 172 |
testAttrSet :: [ByteString]
testAttrSet = [ "sheep"
, "ram"
, "quail"
, "penguin"
, "ox"
, "narwhal" ]
| 172 |
testAttrSet = [ "sheep"
, "ram"
, "quail"
, "penguin"
, "ox"
, "narwhal" ]
| 144 | false | true | 0 | 7 | 87 | 39 | 21 | 18 | null | null |
urbanslug/ghc
|
compiler/utils/UniqSet.hs
|
bsd-3-clause
|
delOneFromUniqSet = delFromUFM
| 30 |
delOneFromUniqSet = delFromUFM
| 30 |
delOneFromUniqSet = delFromUFM
| 30 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
ksaveljev/hake-2
|
src/QCommon/QCommon.hs
|
bsd-3-clause
|
handleLogStats :: CVarT -> Quake ()
handleLogStats logStats
| not (logStats^.cvModified) = return ()
| otherwise = do
CVar.update (logStats & cvModified .~ False)
closeLogStatsFile
when ((logStats^.cvValue) /= 0) $
openLogStatsFile "stats.log" >>= addLogStatsHeader
| 309 |
handleLogStats :: CVarT -> Quake ()
handleLogStats logStats
| not (logStats^.cvModified) = return ()
| otherwise = do
CVar.update (logStats & cvModified .~ False)
closeLogStatsFile
when ((logStats^.cvValue) /= 0) $
openLogStatsFile "stats.log" >>= addLogStatsHeader
| 309 |
handleLogStats logStats
| not (logStats^.cvModified) = return ()
| otherwise = do
CVar.update (logStats & cvModified .~ False)
closeLogStatsFile
when ((logStats^.cvValue) /= 0) $
openLogStatsFile "stats.log" >>= addLogStatsHeader
| 273 | false | true | 1 | 13 | 77 | 105 | 49 | 56 | null | null |
stain/jdk8u
|
src/macosx/native/jobjc/src/core/PrimitiveCoder.hs
|
gpl-2.0
|
popAddr W32 Nulong = "rt.unsafe.getInt(addr)"
| 45 |
popAddr W32 Nulong = "rt.unsafe.getInt(addr)"
| 45 |
popAddr W32 Nulong = "rt.unsafe.getInt(addr)"
| 45 | false | false | 1 | 5 | 4 | 16 | 5 | 11 | null | null |
WraithM/haskell-opaleye
|
src/Opaleye/Internal/HaskellDB/Sql/Default.hs
|
bsd-3-clause
|
showBinOp (:?|) = "?|"
| 30 |
showBinOp (:?|) = "?|"
| 30 |
showBinOp (:?|) = "?|"
| 30 | false | false | 0 | 5 | 11 | 11 | 6 | 5 | null | null |
laszlopandy/elm-compiler
|
src/Parse/Helpers.hs
|
bsd-3-clause
|
newline :: IParser String
newline =
simpleNewline <|> lineComment <?> Syntax.newline
| 86 |
newline :: IParser String
newline =
simpleNewline <|> lineComment <?> Syntax.newline
| 86 |
newline =
simpleNewline <|> lineComment <?> Syntax.newline
| 60 | false | true | 0 | 6 | 12 | 24 | 12 | 12 | null | null |
Athas/Sindre
|
Sindre/ANSI.hs
|
mit
|
-- | Execute Sindre in the ANSI backend.
sindreANSI :: SindreANSIM ExitCode
-- ^ The function returned by
-- 'Sindre.Compiler.compileSindre' after command line
-- options have been given
-> IO ExitCode
sindreANSI start = do
cfg <- sindreANSICfg
rows <- read <$> getEnv "LINES"
cols <- read <$> getEnv "COLUMNS"
runSindreANSI start cfg $ Rectangle 0 0 rows cols
| 412 |
sindreANSI :: SindreANSIM ExitCode
-- ^ The function returned by
-- 'Sindre.Compiler.compileSindre' after command line
-- options have been given
-> IO ExitCode
sindreANSI start = do
cfg <- sindreANSICfg
rows <- read <$> getEnv "LINES"
cols <- read <$> getEnv "COLUMNS"
runSindreANSI start cfg $ Rectangle 0 0 rows cols
| 371 |
sindreANSI start = do
cfg <- sindreANSICfg
rows <- read <$> getEnv "LINES"
cols <- read <$> getEnv "COLUMNS"
runSindreANSI start cfg $ Rectangle 0 0 rows cols
| 166 | true | true | 0 | 10 | 110 | 89 | 40 | 49 | null | null |
geekrelief/as3tohaxe
|
ActionhaXe/Prim.hs
|
gpl-3.0
|
mid' i = mytoken $ \t -> case tokenItem t of
TokenIdent i' | i == i' -> Just [t]
_ -> Nothing
| 144 |
mid' i = mytoken $ \t -> case tokenItem t of
TokenIdent i' | i == i' -> Just [t]
_ -> Nothing
| 144 |
mid' i = mytoken $ \t -> case tokenItem t of
TokenIdent i' | i == i' -> Just [t]
_ -> Nothing
| 144 | false | false | 0 | 13 | 73 | 56 | 26 | 30 | null | null |
nobsun/hs-uc
|
src/Language/SIMPLE/PrettyPrint.hs
|
bsd-3-clause
|
pprExpr' :: Show a => Expr a -> Doc
pprExpr' expr | isAtom expr = pprExpr expr
| otherwise = parens (pprExpr expr)
| 132 |
pprExpr' :: Show a => Expr a -> Doc
pprExpr' expr | isAtom expr = pprExpr expr
| otherwise = parens (pprExpr expr)
| 132 |
pprExpr' expr | isAtom expr = pprExpr expr
| otherwise = parens (pprExpr expr)
| 96 | false | true | 0 | 8 | 40 | 58 | 25 | 33 | null | null |
olsner/ghc
|
ghc/GHCi/UI/Tags.hs
|
bsd-3-clause
|
createCTagsWithRegExesCmd "" =
ghciCreateTagsFile CTagsWithRegExes "tags"
| 77 |
createCTagsWithRegExesCmd "" =
ghciCreateTagsFile CTagsWithRegExes "tags"
| 77 |
createCTagsWithRegExesCmd "" =
ghciCreateTagsFile CTagsWithRegExes "tags"
| 77 | false | false | 0 | 5 | 9 | 14 | 6 | 8 | null | null |
redongjun/haskellschool
|
homework/HW01.hs
|
unlicense
|
hanoi :: Integer -> Peg -> Peg -> Peg -> [Move] -- disc from to temp
hanoi 0 _ _ _ = []
| 87 |
hanoi :: Integer -> Peg -> Peg -> Peg -> [Move]
hanoi 0 _ _ _ = []
| 66 |
hanoi 0 _ _ _ = []
| 18 | true | true | 0 | 9 | 22 | 42 | 22 | 20 | null | null |
alang9/qp
|
src/Numeric/QpOases.hs
|
bsd-3-clause
|
withSQProblemSchur :: SQProblemSchur -> (Ptr SQProblemSchur -> IO a) -> IO a
withSQProblemSchur (SQProblemSchur fPtr) f = withForeignPtr fPtr f
| 143 |
withSQProblemSchur :: SQProblemSchur -> (Ptr SQProblemSchur -> IO a) -> IO a
withSQProblemSchur (SQProblemSchur fPtr) f = withForeignPtr fPtr f
| 143 |
withSQProblemSchur (SQProblemSchur fPtr) f = withForeignPtr fPtr f
| 66 | false | true | 0 | 9 | 19 | 51 | 24 | 27 | null | null |
yesodweb/persistent
|
persistent/Database/Persist/TH.hs
|
mit
|
-- | TODO:
--
-- if we keep mpsGeneric
-- then
-- let's make this fully qualify the generic name
-- else
-- let's delete it
genericDataType
:: MkPersistSettings
-> EntityNameHS
-> Type -- ^ backend
-> Type
genericDataType mps name backend
| mpsGeneric mps =
ConT (mkEntityNameHSGenericName name) `AppT` backend
| otherwise =
ConT $ mkEntityNameHSName name
| 405 |
genericDataType
:: MkPersistSettings
-> EntityNameHS
-> Type -- ^ backend
-> Type
genericDataType mps name backend
| mpsGeneric mps =
ConT (mkEntityNameHSGenericName name) `AppT` backend
| otherwise =
ConT $ mkEntityNameHSName name
| 271 |
genericDataType mps name backend
| mpsGeneric mps =
ConT (mkEntityNameHSGenericName name) `AppT` backend
| otherwise =
ConT $ mkEntityNameHSName name
| 173 | true | true | 1 | 9 | 107 | 81 | 42 | 39 | null | null |
mfine/ghc
|
compiler/typecheck/FamInst.hs
|
bsd-3-clause
|
makeInjectivityErrors
:: TyCon -- ^ Type family tycon for which we generate errors
-> CoAxBranch -- ^ Currently checked equation (represented by axiom)
-> [Bool] -- ^ Injectivity annotation
-> [CoAxBranch] -- ^ List of injectivity conflicts
-> [(SDoc, SrcSpan)]
makeInjectivityErrors tycon axiom inj conflicts
= ASSERT2( any id inj, text "No injective type variables" )
let lhs = coAxBranchLHS axiom
rhs = coAxBranchRHS axiom
are_conflicts = not $ null conflicts
unused_inj_tvs = unusedInjTvsInRHS inj lhs rhs
inj_tvs_unused = not $ isEmptyVarSet unused_inj_tvs
tf_headed = isTFHeaded rhs
bare_variables = bareTvInRHSViolated lhs rhs
wrong_bare_rhs = not $ null bare_variables
err_builder herald eqns
= ( herald $$ vcat (map (pprCoAxBranch tycon) eqns)
, coAxBranchSpan (head eqns) )
errorIf p f = if p then [f err_builder axiom] else []
in errorIf are_conflicts (conflictInjInstErr conflicts )
++ errorIf inj_tvs_unused (unusedInjectiveVarsErr unused_inj_tvs)
++ errorIf tf_headed tfHeadedErr
++ errorIf wrong_bare_rhs (bareVariableInRHSErr bare_variables)
| 1,306 |
makeInjectivityErrors
:: TyCon -- ^ Type family tycon for which we generate errors
-> CoAxBranch -- ^ Currently checked equation (represented by axiom)
-> [Bool] -- ^ Injectivity annotation
-> [CoAxBranch] -- ^ List of injectivity conflicts
-> [(SDoc, SrcSpan)]
makeInjectivityErrors tycon axiom inj conflicts
= ASSERT2( any id inj, text "No injective type variables" )
let lhs = coAxBranchLHS axiom
rhs = coAxBranchRHS axiom
are_conflicts = not $ null conflicts
unused_inj_tvs = unusedInjTvsInRHS inj lhs rhs
inj_tvs_unused = not $ isEmptyVarSet unused_inj_tvs
tf_headed = isTFHeaded rhs
bare_variables = bareTvInRHSViolated lhs rhs
wrong_bare_rhs = not $ null bare_variables
err_builder herald eqns
= ( herald $$ vcat (map (pprCoAxBranch tycon) eqns)
, coAxBranchSpan (head eqns) )
errorIf p f = if p then [f err_builder axiom] else []
in errorIf are_conflicts (conflictInjInstErr conflicts )
++ errorIf inj_tvs_unused (unusedInjectiveVarsErr unused_inj_tvs)
++ errorIf tf_headed tfHeadedErr
++ errorIf wrong_bare_rhs (bareVariableInRHSErr bare_variables)
| 1,306 |
makeInjectivityErrors tycon axiom inj conflicts
= ASSERT2( any id inj, text "No injective type variables" )
let lhs = coAxBranchLHS axiom
rhs = coAxBranchRHS axiom
are_conflicts = not $ null conflicts
unused_inj_tvs = unusedInjTvsInRHS inj lhs rhs
inj_tvs_unused = not $ isEmptyVarSet unused_inj_tvs
tf_headed = isTFHeaded rhs
bare_variables = bareTvInRHSViolated lhs rhs
wrong_bare_rhs = not $ null bare_variables
err_builder herald eqns
= ( herald $$ vcat (map (pprCoAxBranch tycon) eqns)
, coAxBranchSpan (head eqns) )
errorIf p f = if p then [f err_builder axiom] else []
in errorIf are_conflicts (conflictInjInstErr conflicts )
++ errorIf inj_tvs_unused (unusedInjectiveVarsErr unused_inj_tvs)
++ errorIf tf_headed tfHeadedErr
++ errorIf wrong_bare_rhs (bareVariableInRHSErr bare_variables)
| 1,014 | false | true | 6 | 15 | 395 | 295 | 146 | 149 | null | null |
lunaris/hdevtools
|
src/CommandArgs.hs
|
mit
|
dummyModuleFile :: HDevTools
dummyModuleFile = ModuleFile
{ socket = Nothing
, ghcOpts = []
, module_ = ""
}
| 125 |
dummyModuleFile :: HDevTools
dummyModuleFile = ModuleFile
{ socket = Nothing
, ghcOpts = []
, module_ = ""
}
| 125 |
dummyModuleFile = ModuleFile
{ socket = Nothing
, ghcOpts = []
, module_ = ""
}
| 96 | false | true | 0 | 7 | 35 | 33 | 20 | 13 | null | null |
input-output-hk/daedalus
|
installers/common/MacInstaller.hs
|
apache-2.0
|
readCardanoVersionFile :: FilePath -> IO Text
readCardanoVersionFile bridge = prefix <$> handle handler (readTextFile verFile)
where
verFile = bridge </> "version"
prefix = fromMaybe "UNKNOWN" . safeHead . T.lines
handler :: IOError -> IO Text
handler e | isDoesNotExistError e = pure ""
| otherwise = throwM e
| 342 |
readCardanoVersionFile :: FilePath -> IO Text
readCardanoVersionFile bridge = prefix <$> handle handler (readTextFile verFile)
where
verFile = bridge </> "version"
prefix = fromMaybe "UNKNOWN" . safeHead . T.lines
handler :: IOError -> IO Text
handler e | isDoesNotExistError e = pure ""
| otherwise = throwM e
| 342 |
readCardanoVersionFile bridge = prefix <$> handle handler (readTextFile verFile)
where
verFile = bridge </> "version"
prefix = fromMaybe "UNKNOWN" . safeHead . T.lines
handler :: IOError -> IO Text
handler e | isDoesNotExistError e = pure ""
| otherwise = throwM e
| 296 | false | true | 5 | 8 | 79 | 129 | 54 | 75 | null | null |
dysinger/amazonka
|
amazonka-storagegateway/gen/Network/AWS/StorageGateway/ActivateGateway.hs
|
mpl-2.0
|
-- | Your gateway activation key. You can obtain the activation key by sending an
-- HTTP GET request with redirects enabled to the gateway IP address (port 80).
-- The redirect URL returned in the response provides you the activation key for
-- your gateway in the query string parameter 'activationKey'. It may also include
-- other activation-related parameters, however, these are merely defaults --
-- the arguments you pass to the 'ActivateGateway' API call determine the actual
-- configuration of your gateway.
agActivationKey :: Lens' ActivateGateway Text
agActivationKey = lens _agActivationKey (\s a -> s { _agActivationKey = a })
| 641 |
agActivationKey :: Lens' ActivateGateway Text
agActivationKey = lens _agActivationKey (\s a -> s { _agActivationKey = a })
| 122 |
agActivationKey = lens _agActivationKey (\s a -> s { _agActivationKey = a })
| 76 | true | true | 0 | 9 | 101 | 46 | 28 | 18 | null | null |
alphalambda/k12math
|
lib/Drawing.hs
|
mit
|
drawGraph f = drawPath $ map f' xs
where xs = [-margin,-next..margin]
margin = 2.0 * modelSize
next = margin - plot_resolution
f' x = (x,f x)
| 179 |
drawGraph f = drawPath $ map f' xs
where xs = [-margin,-next..margin]
margin = 2.0 * modelSize
next = margin - plot_resolution
f' x = (x,f x)
| 179 |
drawGraph f = drawPath $ map f' xs
where xs = [-margin,-next..margin]
margin = 2.0 * modelSize
next = margin - plot_resolution
f' x = (x,f x)
| 179 | false | false | 3 | 9 | 64 | 78 | 38 | 40 | null | null |
cblp/haskell-telegram-api
|
src/Web/Telegram/API/Bot/API/Get.hs
|
bsd-3-clause
|
-- | See 'getUserProfilePhotos'
getUserProfilePhotosM :: Integer -> Maybe Int -> Maybe Int -> TelegramClient UserProfilePhotosResponse
getUserProfilePhotosM userId offset limit = asking $ \t -> getUserProfilePhotos_ t (Just userId) offset limit
| 244 |
getUserProfilePhotosM :: Integer -> Maybe Int -> Maybe Int -> TelegramClient UserProfilePhotosResponse
getUserProfilePhotosM userId offset limit = asking $ \t -> getUserProfilePhotos_ t (Just userId) offset limit
| 212 |
getUserProfilePhotosM userId offset limit = asking $ \t -> getUserProfilePhotos_ t (Just userId) offset limit
| 109 | true | true | 0 | 9 | 30 | 64 | 31 | 33 | null | null |
rahulmutt/ghcvm
|
compiler/Eta/Prelude/PrimOp.hs
|
bsd-3-clause
|
tagOf_PrimOp WriteByteArrayOp_Int8 = _ILIT(221)
| 47 |
tagOf_PrimOp WriteByteArrayOp_Int8 = _ILIT(221)
| 47 |
tagOf_PrimOp WriteByteArrayOp_Int8 = _ILIT(221)
| 47 | false | false | 0 | 6 | 3 | 15 | 7 | 8 | null | null |
graydon/metrics
|
tests/CounterTest.hs
|
mit
|
counterTests :: [Property]
counterTests =
[ testIncrement
, testIncrement'
, testDecrement
, testDecrement'
, testConcurrent
]
| 138 |
counterTests :: [Property]
counterTests =
[ testIncrement
, testIncrement'
, testDecrement
, testDecrement'
, testConcurrent
]
| 138 |
counterTests =
[ testIncrement
, testIncrement'
, testDecrement
, testDecrement'
, testConcurrent
]
| 111 | false | true | 0 | 5 | 27 | 29 | 18 | 11 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.