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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
gelisam/hawk | src/System/Console/Hawk/Interpreter.hs | apache-2.0 | errorString :: InterpreterError -> String
errorString (WontCompile es) = intercalate "\n" (header : map indent es)
where
header = "Won't compile:"
indent (GhcError e) = ('\t':e) | 187 | errorString :: InterpreterError -> String
errorString (WontCompile es) = intercalate "\n" (header : map indent es)
where
header = "Won't compile:"
indent (GhcError e) = ('\t':e) | 187 | errorString (WontCompile es) = intercalate "\n" (header : map indent es)
where
header = "Won't compile:"
indent (GhcError e) = ('\t':e) | 145 | false | true | 1 | 8 | 35 | 79 | 36 | 43 | null | null |
brendanhay/gogol | gogol-remotebuildexecution/gen/Network/Google/RemoteBuildExecution/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'BuildBazelRemoteExecutionV2Action' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'bbrevaPlatform'
--
-- * 'bbrevaDoNotCache'
--
-- * 'bbrevaCommandDigest'
--
-- * 'bbrevaSalt'
--
-- * 'bbrevaInputRootDigest'
... | 698 | buildBazelRemoteExecutionV2Action
:: BuildBazelRemoteExecutionV2Action
buildBazelRemoteExecutionV2Action =
BuildBazelRemoteExecutionV2Action'
{ _bbrevaPlatform = Nothing
, _bbrevaDoNotCache = Nothing
, _bbrevaCommandDigest = Nothing
, _bbrevaSalt = Nothing
, _bbrevaInputRootDigest = Nothing
... | 354 | buildBazelRemoteExecutionV2Action =
BuildBazelRemoteExecutionV2Action'
{ _bbrevaPlatform = Nothing
, _bbrevaDoNotCache = Nothing
, _bbrevaCommandDigest = Nothing
, _bbrevaSalt = Nothing
, _bbrevaInputRootDigest = Nothing
, _bbrevaTimeout = Nothing
} | 279 | true | true | 0 | 6 | 118 | 64 | 46 | 18 | null | null |
mcmaniac/ghc | compiler/nativeGen/X86/Ppr.hs | bsd-3-clause | pprGInstr platform (GDTOF src dst) = pprSizeSizeRegReg platform (sLit "gdtof") FF64 FF32 src dst | 96 | pprGInstr platform (GDTOF src dst) = pprSizeSizeRegReg platform (sLit "gdtof") FF64 FF32 src dst | 96 | pprGInstr platform (GDTOF src dst) = pprSizeSizeRegReg platform (sLit "gdtof") FF64 FF32 src dst | 96 | false | false | 0 | 7 | 13 | 38 | 18 | 20 | null | null |
ygale/yesod | yesod-core/Yesod/Core/Class/Yesod.hs | mit | jsToHtml :: Javascript -> Html
jsToHtml (Javascript b) = preEscapedToMarkup $ toLazyText b | 90 | jsToHtml :: Javascript -> Html
jsToHtml (Javascript b) = preEscapedToMarkup $ toLazyText b | 90 | jsToHtml (Javascript b) = preEscapedToMarkup $ toLazyText b | 59 | false | true | 0 | 7 | 12 | 31 | 15 | 16 | null | null |
vladimir-ipatov/ganeti | src/Ganeti/Constants.hs | gpl-2.0 | -- * inic* constants are used in opcodes, to create/change nics
inicBridge :: String
inicBridge = "bridge" | 107 | inicBridge :: String
inicBridge = "bridge" | 42 | inicBridge = "bridge" | 21 | true | true | 0 | 6 | 17 | 19 | 8 | 11 | null | null |
bitemyapp/Haskell-Turtle-Library | src/Turtle/Pattern.hs | bsd-3-clause | {-| Match the newline character (@\'\n\'@)
>>> match newline "\n"
"\n"
>>> match newline " "
""
-}
newline :: Pattern Char
newline = char '\n' | 143 | newline :: Pattern Char
newline = char '\n' | 43 | newline = char '\n' | 19 | true | true | 0 | 6 | 26 | 24 | 10 | 14 | null | null |
TOSPIO/yi | src/library/Yi/Syntax/JavaScript.hs | gpl-2.0 | -- | Better name for 'tokT'.
fromTT :: Tok t -> t
fromTT = tokT | 63 | fromTT :: Tok t -> t
fromTT = tokT | 34 | fromTT = tokT | 13 | true | true | 0 | 6 | 14 | 19 | 10 | 9 | null | null |
AlexeyRaga/eta | compiler/ETA/Main/DynFlags.hs | bsd-3-clause | flagsAll :: [Flag (CmdLineP DynFlags)]
flagsAll = package_flags ++ dynamic_flags | 84 | flagsAll :: [Flag (CmdLineP DynFlags)]
flagsAll = package_flags ++ dynamic_flags | 84 | flagsAll = package_flags ++ dynamic_flags | 45 | false | true | 0 | 8 | 13 | 27 | 14 | 13 | null | null |
kmcallister/detrospector | Detrospector/Types.hs | bsd-3-clause | queueToList :: Queue a -> [a]
queueToList = F.toList | 52 | queueToList :: Queue a -> [a]
queueToList = F.toList | 52 | queueToList = F.toList | 22 | false | true | 0 | 6 | 8 | 23 | 12 | 11 | null | null |
elben/typing-haskell-in-haskell | StaticPrelude.hs | bsd-3-clause | mthenMfun
= ">>" :>: (Forall [Kfun Star Star, Star, Star]
([isIn1 cMonad (TGen 0)] :=>
(TAp (TGen 0) (TGen 1) `fn` TAp (TGen 0) (TGen 2) `fn` TAp (TGen 0) (TGen 2)))) | 200 | mthenMfun
= ">>" :>: (Forall [Kfun Star Star, Star, Star]
([isIn1 cMonad (TGen 0)] :=>
(TAp (TGen 0) (TGen 1) `fn` TAp (TGen 0) (TGen 2) `fn` TAp (TGen 0) (TGen 2)))) | 200 | mthenMfun
= ">>" :>: (Forall [Kfun Star Star, Star, Star]
([isIn1 cMonad (TGen 0)] :=>
(TAp (TGen 0) (TGen 1) `fn` TAp (TGen 0) (TGen 2) `fn` TAp (TGen 0) (TGen 2)))) | 200 | false | false | 3 | 15 | 65 | 124 | 62 | 62 | null | null |
xmonad/xmonad-contrib | XMonad/Layout/ThreeColumns.hs | bsd-3-clause | doL :: Bool-> Int-> Rational-> Rectangle-> W.Stack a-> [(a, Rectangle)]
doL m n f r = ap zip (tile3 m f r n . length) . W.integrate | 131 | doL :: Bool-> Int-> Rational-> Rectangle-> W.Stack a-> [(a, Rectangle)]
doL m n f r = ap zip (tile3 m f r n . length) . W.integrate | 131 | doL m n f r = ap zip (tile3 m f r n . length) . W.integrate | 59 | false | true | 0 | 11 | 26 | 81 | 41 | 40 | null | null |
willsam100/bankStatement | src/Bassbull.hs | bsd-3-clause | empty dollar desc = Transaction "" dollar desc "" "" "" "" | 58 | empty dollar desc = Transaction "" dollar desc "" "" "" "" | 58 | empty dollar desc = Transaction "" dollar desc "" "" "" "" | 58 | false | false | 0 | 5 | 11 | 26 | 12 | 14 | null | null |
deyaaeldeen/GTLC | src/GTLC/TypeChecker.hs | gpl-3.0 | typeof (B _) = BoolTy | 21 | typeof (B _) = BoolTy | 21 | typeof (B _) = BoolTy | 21 | false | false | 0 | 7 | 4 | 15 | 7 | 8 | null | null |
tjakway/ghcjvm | compiler/nativeGen/RegAlloc/Graph/SpillClean.hs | bsd-3-clause | ------------------------------------------------------------------------------
-- | Clean out unneeded spill instructions,
-- while walking backwards over the code.
--
-- If there were no reloads from a slot between a spill and the last one
-- then the slot was never read and we don't need the spill.
--
-- ... | 1,569 | cleanTopBackward
:: Instruction instr
=> LiveCmmDecl statics instr
-> CleanM (LiveCmmDecl statics instr)
cleanTopBackward cmm
= case cmm of
CmmData{}
-> return cmm
CmmProc info label live sccs
| LiveInfo _ _ _ liveSlotsOnEntry <- info
-> do sccs' <... | 435 | cleanTopBackward cmm
= case cmm of
CmmData{}
-> return cmm
CmmProc info label live sccs
| LiveInfo _ _ _ liveSlotsOnEntry <- info
-> do sccs' <- mapM (mapSCCM (cleanBlockBackward liveSlotsOnEntry)) sccs
return $ CmmProc info label live sccs' | 306 | true | true | 0 | 16 | 479 | 163 | 91 | 72 | null | null |
JPMoresmau/haskell-ide-engine | hie-plugin-api/Haskell/Ide/Engine/MonadFunctions.hs | bsd-3-clause | isDefaultLoc :: Loc -> Bool
isDefaultLoc (Loc "<unknown>" "<unknown>" "<unknown>" (0,0) (0,0)) = True | 101 | isDefaultLoc :: Loc -> Bool
isDefaultLoc (Loc "<unknown>" "<unknown>" "<unknown>" (0,0) (0,0)) = True | 101 | isDefaultLoc (Loc "<unknown>" "<unknown>" "<unknown>" (0,0) (0,0)) = True | 73 | false | true | 0 | 8 | 13 | 44 | 24 | 20 | null | null |
davdar/quals | writeup-old/sections/04MonadicAAM/04Optimizations/00Widen/07NondetTMonadState.hs | bsd-3-clause | put s = NondetT $ do
put s
return [()] | 46 | put s = NondetT $ do
put s
return [()] | 46 | put s = NondetT $ do
put s
return [()] | 46 | false | false | 0 | 10 | 17 | 30 | 13 | 17 | null | null |
Philonous/pontarius-xmpp | source/Network/Xmpp/Lens.hs | bsd-3-clause | stanzaErrorConditionL :: Lens StanzaError StanzaErrorCondition
stanzaErrorConditionL inj se@StanzaError{stanzaErrorCondition = x} =
(\x' -> se{stanzaErrorCondition = x'}) <$> inj x | 184 | stanzaErrorConditionL :: Lens StanzaError StanzaErrorCondition
stanzaErrorConditionL inj se@StanzaError{stanzaErrorCondition = x} =
(\x' -> se{stanzaErrorCondition = x'}) <$> inj x | 184 | stanzaErrorConditionL inj se@StanzaError{stanzaErrorCondition = x} =
(\x' -> se{stanzaErrorCondition = x'}) <$> inj x | 121 | false | true | 0 | 9 | 22 | 56 | 30 | 26 | null | null |
k0001/hacker-rank | src/HR/InsertionSort2.hs | unlicense | insertionSortTrace :: Seq Int -> Writer [String] (Seq Int)
insertionSortTrace s0 = foldlM ((dbg.).move) s0 [1..smax]
where
dbg s = tell [renderSeq s] >> return s
smax = Seq.length s0 - 1
move s i
| i == 0 || i > smax = s
| iVal < pVal = move pSwap p
| otherwise ... | 544 | insertionSortTrace :: Seq Int -> Writer [String] (Seq Int)
insertionSortTrace s0 = foldlM ((dbg.).move) s0 [1..smax]
where
dbg s = tell [renderSeq s] >> return s
smax = Seq.length s0 - 1
move s i
| i == 0 || i > smax = s
| iVal < pVal = move pSwap p
| otherwise ... | 544 | insertionSortTrace s0 = foldlM ((dbg.).move) s0 [1..smax]
where
dbg s = tell [renderSeq s] >> return s
smax = Seq.length s0 - 1
move s i
| i == 0 || i > smax = s
| iVal < pVal = move pSwap p
| otherwise = s
where
iVal = Seq.index s i -- valu... | 485 | false | true | 6 | 14 | 204 | 216 | 108 | 108 | null | null |
CharlesRandles/musicTools | scales.hs | gpl-2.0 | nextNoteName :: Note -> Note
nextNoteName note = noteNames !! (((indexOf (take 1 note) noteNames) + 1) `mod` 7) | 111 | nextNoteName :: Note -> Note
nextNoteName note = noteNames !! (((indexOf (take 1 note) noteNames) + 1) `mod` 7) | 111 | nextNoteName note = noteNames !! (((indexOf (take 1 note) noteNames) + 1) `mod` 7) | 82 | false | true | 0 | 14 | 18 | 58 | 30 | 28 | null | null |
haroldcarr/learn-haskell-coq-ml-etc | haskell/topic/type-level/2021-03-alexis-king-typeclass-metaprogramming/test/TestSpec.hs | unlicense | ------------------------------------------------------------------------------
spec :: Spec
spec =
fromHUnitTest $ TestList $
ttypeOf1 ++ ttypeOf ++
treifyNatZ ++ treifyNatSZ ++ treifyNatSSZ ++
tisUnitT ++ tisUnitF ++
tSum ++
tflatten1 ++ tflatten2 ++
tgnumFieldsL ++ tg... | 361 | spec :: Spec
spec =
fromHUnitTest $ TestList $
ttypeOf1 ++ ttypeOf ++
treifyNatZ ++ treifyNatSZ ++ treifyNatSSZ ++
tisUnitT ++ tisUnitF ++
tSum ++
tflatten1 ++ tflatten2 ++
tgnumFieldsL ++ tgnumFieldsR ++ tnumFieldsL ++ tnumFieldsR | 281 | spec =
fromHUnitTest $ TestList $
ttypeOf1 ++ ttypeOf ++
treifyNatZ ++ treifyNatSZ ++ treifyNatSSZ ++
tisUnitT ++ tisUnitF ++
tSum ++
tflatten1 ++ tflatten2 ++
tgnumFieldsL ++ tgnumFieldsR ++ tnumFieldsL ++ tnumFieldsR | 268 | true | true | 14 | 6 | 87 | 86 | 38 | 48 | null | null |
dpieroux/euler | 0/0066.hs | mit | approximations [a] = repeat (a%1) | 33 | approximations [a] = repeat (a%1) | 33 | approximations [a] = repeat (a%1) | 33 | false | false | 0 | 7 | 4 | 22 | 11 | 11 | null | null |
fivetanley/osxmonad | OSXMonad/Keys.hs | bsd-3-clause | osxKeyToX11 0x74 = xK_Page_Up | 29 | osxKeyToX11 0x74 = xK_Page_Up | 29 | osxKeyToX11 0x74 = xK_Page_Up | 29 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
cryptica/slapnet | src/Printer/SPEC.hs | gpl-3.0 | renderConjunction f@(LinearInequation {}) =
error $ "linear inequation not supported for spec: " <> show f | 114 | renderConjunction f@(LinearInequation {}) =
error $ "linear inequation not supported for spec: " <> show f | 114 | renderConjunction f@(LinearInequation {}) =
error $ "linear inequation not supported for spec: " <> show f | 114 | false | false | 0 | 8 | 23 | 30 | 15 | 15 | null | null |
yaccz/saturnin | library/Saturnin/Server.hs | bsd-3-clause | ybsCloseStdin :: YBServer ()
ybsCloseStdin = liftIO $ hClose stdin | 66 | ybsCloseStdin :: YBServer ()
ybsCloseStdin = liftIO $ hClose stdin | 66 | ybsCloseStdin = liftIO $ hClose stdin | 37 | false | true | 0 | 6 | 9 | 23 | 11 | 12 | null | null |
MasseR/introitu | Foundation.hs | bsd-2-clause | permissionsRequiredFor NewLinkR _ = [Post] | 42 | permissionsRequiredFor NewLinkR _ = [Post] | 42 | permissionsRequiredFor NewLinkR _ = [Post] | 42 | false | false | 0 | 5 | 4 | 14 | 7 | 7 | null | null |
Raveline/Rocketfuel | src/Rocketfuel/Input.hs | mit | dragIfNeeded _ c = c | 20 | dragIfNeeded _ c = c | 20 | dragIfNeeded _ c = c | 20 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
asztal/transact-sql | Language/TransactSql/Parser.hs | bsd-3-clause | lineSpace :: P ()
lineSpace = satisfy (\c -> isSpace c && c /= '\n') *> return () | 81 | lineSpace :: P ()
lineSpace = satisfy (\c -> isSpace c && c /= '\n') *> return () | 81 | lineSpace = satisfy (\c -> isSpace c && c /= '\n') *> return () | 63 | false | true | 0 | 11 | 17 | 47 | 23 | 24 | null | null |
zchn/ethereum-analyzer | ethereum-analyzer/src/Ethereum/Analyzer/Common.hs | apache-2.0 | varBytesToWord256 :: [Word8] -> Word256
varBytesToWord256 w8l =
let extended = (zero256 `append` DB.pack w8l)
in bytesToWord256 $ DB.unpack $ DB.drop (DB.length extended - 32) extended | 188 | varBytesToWord256 :: [Word8] -> Word256
varBytesToWord256 w8l =
let extended = (zero256 `append` DB.pack w8l)
in bytesToWord256 $ DB.unpack $ DB.drop (DB.length extended - 32) extended | 188 | varBytesToWord256 w8l =
let extended = (zero256 `append` DB.pack w8l)
in bytesToWord256 $ DB.unpack $ DB.drop (DB.length extended - 32) extended | 148 | false | true | 0 | 12 | 29 | 75 | 38 | 37 | null | null |
fizruk/impossible-geometry-sample | isometry.hs | bsd-3-clause | faceTo2D :: Face -> Maybe Face2D
faceTo2D ps@(p:q:r:_)
| visible = Just $ Face2D (map posTo2D ps) light
| otherwise = Nothing
where
n = normal (p - q) (q - r)
lightN = Pos 1 (- 3) (- 1)
light = 0.5 * (1 + scalar n lightN)
(p':q':r':_) = map posTo2D ps
visible = orientation p' q' r' == GT | 319 | faceTo2D :: Face -> Maybe Face2D
faceTo2D ps@(p:q:r:_)
| visible = Just $ Face2D (map posTo2D ps) light
| otherwise = Nothing
where
n = normal (p - q) (q - r)
lightN = Pos 1 (- 3) (- 1)
light = 0.5 * (1 + scalar n lightN)
(p':q':r':_) = map posTo2D ps
visible = orientation p' q' r' == GT | 319 | faceTo2D ps@(p:q:r:_)
| visible = Just $ Face2D (map posTo2D ps) light
| otherwise = Nothing
where
n = normal (p - q) (q - r)
lightN = Pos 1 (- 3) (- 1)
light = 0.5 * (1 + scalar n lightN)
(p':q':r':_) = map posTo2D ps
visible = orientation p' q' r' == GT | 286 | false | true | 5 | 11 | 92 | 183 | 92 | 91 | null | null |
kmilner/tamarin-prover | lib/theory/src/Theory/Constraint/System.hs | gpl-3.0 | -- | Returns the constraint system that has to be proven to show that given
-- formula holds in the context of the given theory.
formulaToSystem :: [LNGuarded] -- ^ Restrictions to add
-> SourceKind -- ^ Source kind
-> SystemTraceQuantifier -- ^ Trace quantifier
... | 1,133 | formulaToSystem :: [LNGuarded] -- ^ Restrictions to add
-> SourceKind -- ^ Source kind
-> SystemTraceQuantifier -- ^ Trace quantifier
-> Bool -- ^ In diff proofs, all action goals have to be resolved
-> LNFormula
... | 1,004 | formulaToSystem restrictions kind traceQuantifier isdiff fm =
insertLemmas safetyRestrictions
$ L.set sFormulas (S.singleton gf2)
$ (emptySystem kind isdiff)
where
(safetyRestrictions, otherRestrictions) = partition isSafetyFormula restrictions
gf0 = formulaToGuarded_ fm
gf1 = case traceQua... | 663 | true | true | 10 | 11 | 321 | 169 | 82 | 87 | null | null |
azadbolour/boardgame | haskell-server/src/BoardGame/Server/Service/GameJsonSqlPersister.hs | agpl-3.0 | clearGames :: ConnectionProvider -> Result ()
clearGames provider =
liftIO $ PersistRunner.runQuery provider clearGamesReader | 127 | clearGames :: ConnectionProvider -> Result ()
clearGames provider =
liftIO $ PersistRunner.runQuery provider clearGamesReader | 127 | clearGames provider =
liftIO $ PersistRunner.runQuery provider clearGamesReader | 81 | false | true | 0 | 7 | 15 | 34 | 16 | 18 | null | null |
kaoskorobase/mescaline | resources/hugs/packages/base/Data/Map.hs | gpl-3.0 | -- | /O(n)/. Build a map from an ascending list in linear time with a combining function for equal keys.
-- /The precondition (input list is ascending) is not checked./
fromAscListWith :: Eq k => (a -> a -> a) -> [(k,a)] -> Map k a
fromAscListWith f xs
= fromAscListWithKey (\k x y -> f x y) xs | 297 | fromAscListWith :: Eq k => (a -> a -> a) -> [(k,a)] -> Map k a
fromAscListWith f xs
= fromAscListWithKey (\k x y -> f x y) xs | 127 | fromAscListWith f xs
= fromAscListWithKey (\k x y -> f x y) xs | 64 | true | true | 0 | 9 | 61 | 80 | 42 | 38 | null | null |
fmapfmapfmap/amazonka | amazonka-elasticache/test/Test/AWS/Gen/ElastiCache.hs | mpl-2.0 | testDescribeEvents :: DescribeEvents -> TestTree
testDescribeEvents = req
"DescribeEvents"
"fixture/DescribeEvents.yaml" | 128 | testDescribeEvents :: DescribeEvents -> TestTree
testDescribeEvents = req
"DescribeEvents"
"fixture/DescribeEvents.yaml" | 128 | testDescribeEvents = req
"DescribeEvents"
"fixture/DescribeEvents.yaml" | 79 | false | true | 0 | 7 | 17 | 28 | 11 | 17 | null | null |
da-x/ghc | libraries/template-haskell/Language/Haskell/TH/Ppr.hs | bsd-3-clause | pprCxt [t] = ppr t <+> text "=>" | 32 | pprCxt [t] = ppr t <+> text "=>" | 32 | pprCxt [t] = ppr t <+> text "=>" | 32 | false | false | 0 | 6 | 7 | 22 | 10 | 12 | null | null |
timthelion/fenfire | Fenfire/Utils.hs | gpl-2.0 | mputs :: MonadState outer m => ChangerM m inner outer -> inner -> m ()
mputs chg x = mmodify (msets chg x) | 106 | mputs :: MonadState outer m => ChangerM m inner outer -> inner -> m ()
mputs chg x = mmodify (msets chg x) | 106 | mputs chg x = mmodify (msets chg x) | 35 | false | true | 0 | 10 | 22 | 60 | 27 | 33 | null | null |
keera-studios/hsQt | Qtc/Enums/Core/QVariant.hs | bsd-2-clause | ePixmap :: QVariantType
ePixmap
= ieQVariantType $ 65 | 55 | ePixmap :: QVariantType
ePixmap
= ieQVariantType $ 65 | 55 | ePixmap
= ieQVariantType $ 65 | 31 | false | true | 0 | 6 | 9 | 18 | 8 | 10 | null | null |
romanb/amazonka | amazonka-route53/gen/Network/AWS/Route53/GetGeoLocation.hs | mpl-2.0 | -- | The code for a continent geo location. Note: only continent locations have a
-- continent code.
--
-- Valid values: 'AF' | 'AN' | 'AS' | 'EU' | 'OC' | 'NA' | 'SA'
--
-- Constraint: Specifying 'ContinentCode' with either 'CountryCode' or 'SubdivisionCode' returns an 'InvalidInput' error.
gglContinentCode :: Lens' G... | 426 | gglContinentCode :: Lens' GetGeoLocation (Maybe Text)
gglContinentCode = lens _gglContinentCode (\s a -> s { _gglContinentCode = a }) | 133 | gglContinentCode = lens _gglContinentCode (\s a -> s { _gglContinentCode = a }) | 79 | true | true | 0 | 9 | 67 | 51 | 30 | 21 | null | null |
geophf/1HaskellADay | exercises/HAD/Y2017/M10/D31/Solution.hs | mit | printSpecialCharContext :: [(String, [String])] -> IO ()
printSpecialCharContext =
mapM_ (\(k,vs) -> putStrLn k >> mapM_ (putStrLn . ('\t':)) (take 2 vs)) | 157 | printSpecialCharContext :: [(String, [String])] -> IO ()
printSpecialCharContext =
mapM_ (\(k,vs) -> putStrLn k >> mapM_ (putStrLn . ('\t':)) (take 2 vs)) | 157 | printSpecialCharContext =
mapM_ (\(k,vs) -> putStrLn k >> mapM_ (putStrLn . ('\t':)) (take 2 vs)) | 100 | false | true | 0 | 11 | 24 | 80 | 44 | 36 | null | null |
Concomitant/LambdaHack | Game/LambdaHack/Client/Key.hs | bsd-3-clause | showKey Delete = "DELETE" | 27 | showKey Delete = "DELETE" | 27 | showKey Delete = "DELETE" | 27 | false | false | 0 | 5 | 5 | 9 | 4 | 5 | null | null |
soscpd/bee | root/tests/zguide/examples/Haskell/peering2.hs | mit | replaceLast :: a -> [a] -> NonEmpty a
replaceLast y (_:[]) = [y] | 64 | replaceLast :: a -> [a] -> NonEmpty a
replaceLast y (_:[]) = [y] | 64 | replaceLast y (_:[]) = [y] | 26 | false | true | 0 | 8 | 12 | 42 | 22 | 20 | null | null |
MateVM/harpy | Harpy/X86Assembler.hs | gpl-2.0 | fucomi (FPReg idx) = ensureBufferSize x86_max_instruction_bytes >> x86_fucomi idx | 81 | fucomi (FPReg idx) = ensureBufferSize x86_max_instruction_bytes >> x86_fucomi idx | 81 | fucomi (FPReg idx) = ensureBufferSize x86_max_instruction_bytes >> x86_fucomi idx | 81 | false | false | 0 | 7 | 8 | 25 | 11 | 14 | null | null |
AlbinTheander/oden | src/Oden/Backend/Go.hs | mit | toFilePath :: GoBackend -> PackageName -> Codegen FilePath
toFilePath _ [] = throwError (UnexpectedError "Package name cannot be empty") | 136 | toFilePath :: GoBackend -> PackageName -> Codegen FilePath
toFilePath _ [] = throwError (UnexpectedError "Package name cannot be empty") | 136 | toFilePath _ [] = throwError (UnexpectedError "Package name cannot be empty") | 77 | false | true | 0 | 7 | 18 | 38 | 18 | 20 | null | null |
sizur/haskell-i18n | Text/I18n/Printf.hs | bsd-3-clause | toint :: UPrintf -> Int
toint (UInteger _ i) = fromInteger i | 60 | toint :: UPrintf -> Int
toint (UInteger _ i) = fromInteger i | 60 | toint (UInteger _ i) = fromInteger i | 36 | false | true | 0 | 7 | 11 | 29 | 14 | 15 | null | null |
ojw/relaxation | src/Main.hs | mit | renderStreak :: GameState -> Picture
renderStreak game = color black $ translate (-300) (-270) $ scale 0.5 0.5 $ text . show $ game ^. breath.currentStreak | 155 | renderStreak :: GameState -> Picture
renderStreak game = color black $ translate (-300) (-270) $ scale 0.5 0.5 $ text . show $ game ^. breath.currentStreak | 155 | renderStreak game = color black $ translate (-300) (-270) $ scale 0.5 0.5 $ text . show $ game ^. breath.currentStreak | 118 | false | true | 0 | 13 | 25 | 73 | 34 | 39 | null | null |
CindyLinz/Haskell.js | trans/src/Desugar/String.hs | mit | deStringExp :: Exp l -> Exp l
deStringExp (Var l qName) = Var (id l) (deStringQName qName) | 90 | deStringExp :: Exp l -> Exp l
deStringExp (Var l qName) = Var (id l) (deStringQName qName) | 90 | deStringExp (Var l qName) = Var (id l) (deStringQName qName) | 60 | false | true | 0 | 7 | 16 | 49 | 23 | 26 | null | null |
dylanmc/Haskell-PDF-Parsing-Library | Text/PDF/Parser.hs | bsd-3-clause | intLex :: Parser String
intLex = do
_ <- whiteSpace
cs <- many1 digit
return cs | 115 | intLex :: Parser String
intLex = do
_ <- whiteSpace
cs <- many1 digit
return cs | 115 | intLex = do
_ <- whiteSpace
cs <- many1 digit
return cs | 91 | false | true | 1 | 9 | 51 | 41 | 16 | 25 | null | null |
RayRacine/aws | Aws/Iam/Internal.hs | bsd-3-clause | -- | Similar to 'iamSignQuery'. Accepts parameters in @Text@ form and UTF-8
-- encodes them. Accepts the @Action@ parameter separately since it's always
-- required.
iamAction
:: ByteString
-> [(ByteString, Text)]
-> IamConfiguration qt
-> SignatureData
-> SignedQuery
iamAction action = iamSignQuery... | 410 | iamAction
:: ByteString
-> [(ByteString, Text)]
-> IamConfiguration qt
-> SignatureData
-> SignedQuery
iamAction action = iamSignQuery
. (:) ("Action", action)
. map (second Text.encodeUtf8) | 244 | iamAction action = iamSignQuery
. (:) ("Action", action)
. map (second Text.encodeUtf8) | 121 | true | true | 3 | 10 | 103 | 79 | 42 | 37 | null | null |
brendanhay/gogol | gogol-servicenetworking/gen/Network/Google/ServiceNetworking/Types/Product.hs | mpl-2.0 | -- | URL of the provider\'s public key set to validate signature of the JWT.
-- See [OpenID
-- Discovery](https:\/\/openid.net\/specs\/openid-connect-discovery-1_0.html#ProviderMetadata).
-- Optional if the key set document: - can be retrieved from [OpenID
-- Discovery](https:\/\/openid.net\/specs\/openid-connect-disco... | 606 | apJWKsURI :: Lens' AuthProvider (Maybe Text)
apJWKsURI
= lens _apJWKsURI (\ s a -> s{_apJWKsURI = a}) | 103 | apJWKsURI
= lens _apJWKsURI (\ s a -> s{_apJWKsURI = a}) | 58 | true | true | 0 | 9 | 77 | 55 | 32 | 23 | null | null |
DavidEGrayson/drvdiff | src/DrvDiffToString.hs | mit | setDiffToString :: ([String], [String]) -> String
setDiffToString (l, r) = (joinLines "- " l) ++ (joinLines "+ " r) | 115 | setDiffToString :: ([String], [String]) -> String
setDiffToString (l, r) = (joinLines "- " l) ++ (joinLines "+ " r) | 115 | setDiffToString (l, r) = (joinLines "- " l) ++ (joinLines "+ " r) | 65 | false | true | 0 | 7 | 18 | 60 | 32 | 28 | null | null |
jmikkola/Athena | src/Inference.hs | mit | -- TODO: this should also start with prelude and imported names
startingEnv :: Environment
startingEnv =
Map.fromList
[ ("print", Scheme 1 (TFunc [TGen 1] tUnit)) ] | 168 | startingEnv :: Environment
startingEnv =
Map.fromList
[ ("print", Scheme 1 (TFunc [TGen 1] tUnit)) ] | 104 | startingEnv =
Map.fromList
[ ("print", Scheme 1 (TFunc [TGen 1] tUnit)) ] | 77 | true | true | 0 | 11 | 29 | 45 | 24 | 21 | null | null |
m0ar/safe-streaming | src/Streaming/Prelude.hs | bsd-3-clause | partitionEithers (Effect m) = Effect $ fmap partitionEithers (lift m) | 69 | partitionEithers (Effect m) = Effect $ fmap partitionEithers (lift m) | 69 | partitionEithers (Effect m) = Effect $ fmap partitionEithers (lift m) | 69 | false | false | 0 | 8 | 9 | 30 | 14 | 16 | null | null |
ellej/mire | test/Mire/Test/Text.hs | bsd-3-clause | textTestGroup :: TestTree
textTestGroup = testGroup "Text tests" [
testProperty "Utf8 stream decoder" utf8StreamDecoderTest
] | 134 | textTestGroup :: TestTree
textTestGroup = testGroup "Text tests" [
testProperty "Utf8 stream decoder" utf8StreamDecoderTest
] | 134 | textTestGroup = testGroup "Text tests" [
testProperty "Utf8 stream decoder" utf8StreamDecoderTest
] | 108 | false | true | 0 | 7 | 23 | 30 | 13 | 17 | null | null |
anchor/vaultaire-collector-ceilometer | lib/Vaultaire/Collector/Ceilometer/Process/Instance.hs | mit | parseInstanceStatus "paused" = Just InstancePaused | 61 | parseInstanceStatus "paused" = Just InstancePaused | 61 | parseInstanceStatus "paused" = Just InstancePaused | 61 | false | false | 0 | 5 | 15 | 12 | 5 | 7 | null | null |
NickAger/LearningHaskell | haskellForMacMiscPlayground/UnderstandingReader.hsproj/SimpleReader.hs | mit | tomAndJerry2 :: Reader String Int
tomAndJerry2 = do
t <- tom
j <- jerry
return $ length (t ++ "\n" ++ j) | 116 | tomAndJerry2 :: Reader String Int
tomAndJerry2 = do
t <- tom
j <- jerry
return $ length (t ++ "\n" ++ j) | 116 | tomAndJerry2 = do
t <- tom
j <- jerry
return $ length (t ++ "\n" ++ j) | 82 | false | true | 0 | 11 | 33 | 51 | 24 | 27 | null | null |
juodaspaulius/clafer | src/Language/Clafer/Intermediate/SimpleScopeAnalyzer.hs | mit | findConstraints _ = [] | 22 | findConstraints _ = [] | 22 | findConstraints _ = [] | 22 | false | false | 0 | 5 | 3 | 11 | 5 | 6 | null | null |
prl-tokyo/bigul-configuration-adaptation | Transformations/src/BiFlux/Trans/Translation.hs | mit | req tv@(Prod tl tr) (RProd rpatl rpatr) tv'@(Prod tl' tr') (RProd rpatl' rpatr') =
case teq tv tv' of
Just BType.Eq -> do
REq <- req tl rpatl tl' rpatl'
REq <- req tr rpatr tr' rpatr'
return REq
otherwise -> mzero | 256 | req tv@(Prod tl tr) (RProd rpatl rpatr) tv'@(Prod tl' tr') (RProd rpatl' rpatr') =
case teq tv tv' of
Just BType.Eq -> do
REq <- req tl rpatl tl' rpatl'
REq <- req tr rpatr tr' rpatr'
return REq
otherwise -> mzero | 256 | req tv@(Prod tl tr) (RProd rpatl rpatr) tv'@(Prod tl' tr') (RProd rpatl' rpatr') =
case teq tv tv' of
Just BType.Eq -> do
REq <- req tl rpatl tl' rpatl'
REq <- req tr rpatr tr' rpatr'
return REq
otherwise -> mzero | 256 | false | false | 0 | 11 | 84 | 117 | 55 | 62 | null | null |
fmapfmapfmap/amazonka | amazonka-ecs/gen/Network/AWS/ECS/Types/Product.hs | mpl-2.0 | -- | The number of tasks on the container instance that are in the 'RUNNING'
-- status.
ciRunningTasksCount :: Lens' ContainerInstance (Maybe Int)
ciRunningTasksCount = lens _ciRunningTasksCount (\ s a -> s{_ciRunningTasksCount = a}) | 233 | ciRunningTasksCount :: Lens' ContainerInstance (Maybe Int)
ciRunningTasksCount = lens _ciRunningTasksCount (\ s a -> s{_ciRunningTasksCount = a}) | 145 | ciRunningTasksCount = lens _ciRunningTasksCount (\ s a -> s{_ciRunningTasksCount = a}) | 86 | true | true | 0 | 9 | 33 | 47 | 26 | 21 | null | null |
etu-fkti5301-bgu/alt-exam_automated_theorem_proving | src/Formula.hs | bsd-3-clause | tImp :: Formula -> (Formula, Formula)
destImp [form| $a ⊃ $b |] = (a, b)
de | 75 | destImp :: Formula -> (Formula, Formula)
destImp [form| $a ⊃ $b |] = (a, b) | 75 | destImp [form| $a ⊃ $b |] = (a, b) | 34 | false | true | 0 | 8 | 15 | 43 | 23 | 20 | null | null |
rootzlevel/yasam | Main.hs | bsd-3-clause | fromVariant' :: (IsVariant t) => Variant -> Either String t
fromVariant' v =
note ("Couldn't cast Variant of type " ++ show (variantType v)) $ fromVariant v | 158 | fromVariant' :: (IsVariant t) => Variant -> Either String t
fromVariant' v =
note ("Couldn't cast Variant of type " ++ show (variantType v)) $ fromVariant v | 158 | fromVariant' v =
note ("Couldn't cast Variant of type " ++ show (variantType v)) $ fromVariant v | 98 | false | true | 0 | 11 | 28 | 58 | 28 | 30 | null | null |
peddie/gol | src/Algorithm/GameOfLife3D.hs | gpl-3.0 | transition :: Word8 -> Word8 -> Word8
-- TODO(MP): Tweak these a bit.
transition 1 2 = 1 | 88 | transition :: Word8 -> Word8 -> Word8
transition 1 2 = 1 | 56 | transition 1 2 = 1 | 18 | true | true | 0 | 6 | 17 | 25 | 13 | 12 | null | null |
beni55/text | tests/Tests/Properties.hs | bsd-2-clause | t_map f = map f `eqP` (unpackS . T.map f) | 52 | t_map f = map f `eqP` (unpackS . T.map f) | 52 | t_map f = map f `eqP` (unpackS . T.map f) | 52 | false | false | 0 | 9 | 20 | 30 | 15 | 15 | null | null |
rfranek/duckling | Duckling/Rules/MY.hs | bsd-3-clause | rules (This Url) = [] | 21 | rules (This Url) = [] | 21 | rules (This Url) = [] | 21 | false | false | 0 | 6 | 4 | 18 | 8 | 10 | null | null |
brendanhay/gogol | gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Placements/List.hs | mpl-2.0 | -- | Select only placements that are associated with these directory sites.
pDirectorySiteIds :: Lens' PlacementsList [Int64]
pDirectorySiteIds
= lens _pDirectorySiteIds
(\ s a -> s{_pDirectorySiteIds = a})
. _Default
. _Coerce | 247 | pDirectorySiteIds :: Lens' PlacementsList [Int64]
pDirectorySiteIds
= lens _pDirectorySiteIds
(\ s a -> s{_pDirectorySiteIds = a})
. _Default
. _Coerce | 171 | pDirectorySiteIds
= lens _pDirectorySiteIds
(\ s a -> s{_pDirectorySiteIds = a})
. _Default
. _Coerce | 121 | true | true | 0 | 11 | 51 | 53 | 28 | 25 | null | null |
ziman/idris-py | src/IRTS/CodegenPython.hs | bsd-3-clause | emit :: Stmts -> CG ()
emit stmts = CG $ return (stmts, ()) | 59 | emit :: Stmts -> CG ()
emit stmts = CG $ return (stmts, ()) | 59 | emit stmts = CG $ return (stmts, ()) | 36 | false | true | 2 | 8 | 13 | 43 | 20 | 23 | null | null |
nushio3/Paraiso | attic/newexp/Differential.hs | bsd-3-clause | -- A 4-th order implementation of partial differentiation.
partial4 :: (Typeable a, Fractional a) => Axis -> Expr (Pt->a) -> (Expr Pt-> Expr a)
partial4 i f p = (fromRational $ 9%8)*((f :$ (p + 0.5 * e(i))) - (f :$ (p - 0.5 * e(i))))
- (fromRational $ 1%24)*((f :$ (p + 1.5 * e(i))) - (f :$ (p - 1.5 * ... | 433 | partial4 :: (Typeable a, Fractional a) => Axis -> Expr (Pt->a) -> (Expr Pt-> Expr a)
partial4 i f p = (fromRational $ 9%8)*((f :$ (p + 0.5 * e(i))) - (f :$ (p - 0.5 * e(i))))
- (fromRational $ 1%24)*((f :$ (p + 1.5 * e(i))) - (f :$ (p - 1.5 * e(i))))
where
e :: Axis -> Expr Pt
e i = Static ... | 374 | partial4 i f p = (fromRational $ 9%8)*((f :$ (p + 0.5 * e(i))) - (f :$ (p - 0.5 * e(i))))
- (fromRational $ 1%24)*((f :$ (p + 1.5 * e(i))) - (f :$ (p - 1.5 * e(i))))
where
e :: Axis -> Expr Pt
e i = Static ("\\mathbf{e}_"++show i) (\j -> if i==j then 1 else 0) | 289 | true | true | 0 | 15 | 113 | 267 | 141 | 126 | null | null |
moonKimura/conduit-1.0.8 | Data/Conduit/Internal.hs | mit | -- | Wait for input forever, calling the given inner @Pipe@ for each piece of
-- new input. Returns the upstream result type.
--
-- Since 0.5.0
awaitForever :: Monad m => (i -> Pipe l i o r m r') -> Pipe l i o r m r
awaitForever inner =
self
where
self = awaitE >>= either return (\i -> inner i >> self)
| 314 | awaitForever :: Monad m => (i -> Pipe l i o r m r') -> Pipe l i o r m r
awaitForever inner =
self
where
self = awaitE >>= either return (\i -> inner i >> self)
| 170 | awaitForever inner =
self
where
self = awaitE >>= either return (\i -> inner i >> self)
| 98 | true | true | 0 | 10 | 76 | 94 | 48 | 46 | null | null |
mpickering/HaRe | old/testing/unfoldDef/FunIn1.hs | bsd-3-clause | --The application of a function is replaced by the right-hand side of the definition,
--with actual parameters replacing formals.
--In this example, unfold 'addthree'.
--This example aims to test unfolding a constant.
main :: Int -> Int
main = \x -> case x of
1 -> 1 + main 0
0 -> (app ... | 336 | main :: Int -> Int
main = \x -> case x of
1 -> 1 + main 0
0 -> (app addthree 1 2 3) | 116 | main = \x -> case x of
1 -> 1 + main 0
0 -> (app addthree 1 2 3) | 97 | true | true | 0 | 10 | 91 | 65 | 33 | 32 | null | null |
rahulmutt/ghcvm | compiler/Eta/Utils/Outputable.hs | bsd-3-clause | fsep ds = SDoc $ \sty -> Pretty.fsep [runSDoc d sty | d <- ds] | 62 | fsep ds = SDoc $ \sty -> Pretty.fsep [runSDoc d sty | d <- ds] | 62 | fsep ds = SDoc $ \sty -> Pretty.fsep [runSDoc d sty | d <- ds] | 62 | false | false | 0 | 10 | 14 | 39 | 19 | 20 | null | null |
GaloisInc/sk-dev-platform | libs/SCD/src/SCD/M4/ErrorsXml.hs | bsd-3-clause | -- | Same as nameAttr, but pretty-prints the given value
ppNameAttr :: Pp alpha => alpha -> Attr
ppNameAttr = mkPPAttr "name" | 125 | ppNameAttr :: Pp alpha => alpha -> Attr
ppNameAttr = mkPPAttr "name" | 68 | ppNameAttr = mkPPAttr "name" | 28 | true | true | 0 | 8 | 21 | 32 | 14 | 18 | null | null |
robx/puzzle-draw | src/Draw/Grid.hs | mit | -- | `irregularGridPaths g` is a pair `(outer, inner)` of paths.
--
-- `outer` consists of the loops that make up the border of the
-- grid (assuming the grid is connected orthogonally). They are
-- reoriented to be compatible with `outLine`; for some reason,
-- reversePath on the immediate result does not work.
--
-- ... | 914 | irregularGridPaths :: Grid C a -> (Path V2 Double, Path V2 Double)
irregularGridPaths m = (path' (map Data.revEdge outer), path inner)
where
(outer, inner) = Data.edges (Map.keysSet m) (`Map.member` m)
path es = mconcat . map (conn . Data.ends) $ es
path' es = case loops (map Data.ends' es) of
Just ... | 543 | irregularGridPaths m = (path' (map Data.revEdge outer), path inner)
where
(outer, inner) = Data.edges (Map.keysSet m) (`Map.member` m)
path es = mconcat . map (conn . Data.ends) $ es
path' es = case loops (map Data.ends' es) of
Just ls -> mconcat . map (pathFromLoopVertices . map toPoint) $ ls
... | 476 | true | true | 4 | 19 | 186 | 242 | 125 | 117 | null | null |
plaimi/tempuhs-server | src/Tempuhs/Server/Requests.hs | agpl-3.0 | metaRequests :: ConnectionPool -> ScottyE ()
metaRequests _ =
get "/src" src | 78 | metaRequests :: ConnectionPool -> ScottyE ()
metaRequests _ =
get "/src" src | 78 | metaRequests _ =
get "/src" src | 33 | false | true | 0 | 7 | 13 | 28 | 13 | 15 | null | null |
alexbiehl/StringMap | tests/StringMapStrict.hs | mit | -- some simple test data
m0, m1, m2, m3, m5, m6, m7, m8 :: Map
m0 = insert "" (mkA [0,1+2]) empty | 97 | m0, m1, m2, m3, m5, m6, m7, m8 :: Map
m0 = insert "" (mkA [0,1+2]) empty | 72 | m0 = insert "" (mkA [0,1+2]) empty | 34 | true | true | 13 | 9 | 21 | 78 | 33 | 45 | null | null |
nevrenato/Hets_Fork | CSL/Analysis.hs | gpl-2.0 | addEPDefVals :: Sign.Sign -> [(Token, APInt)] -> Sign.Sign
addEPDefVals = addPairsToSig addEPDefValToSig | 104 | addEPDefVals :: Sign.Sign -> [(Token, APInt)] -> Sign.Sign
addEPDefVals = addPairsToSig addEPDefValToSig | 104 | addEPDefVals = addPairsToSig addEPDefValToSig | 45 | false | true | 0 | 8 | 11 | 35 | 19 | 16 | null | null |
yav/parsimony | examples/ParsimonyJSON.hs | bsd-2-clause | tok :: Parser String a -> Parser String a
tok p = p <* spaces | 86 | tok :: Parser String a -> Parser String a
tok p = p <* spaces | 86 | tok p = p <* spaces | 31 | false | true | 2 | 7 | 39 | 39 | 17 | 22 | null | null |
aelyasov/Haslog | src/Eu/Fittest/Logging/Compression/Serializer.hs | bsd-3-clause | saveFullyDecompressedLog :: FilePath -> IO ()
saveFullyDecompressedLog path =
do compressThenSaveRawLog path
(dic, clog) <- loadCompressedLog path
writeFile newpath $ show $ fullyDecompress (dic, clog)
where
bname = takeBaseName path
newpath = replaceBaseName path (bname ++ "_") | 316 | saveFullyDecompressedLog :: FilePath -> IO ()
saveFullyDecompressedLog path =
do compressThenSaveRawLog path
(dic, clog) <- loadCompressedLog path
writeFile newpath $ show $ fullyDecompress (dic, clog)
where
bname = takeBaseName path
newpath = replaceBaseName path (bname ++ "_") | 315 | saveFullyDecompressedLog path =
do compressThenSaveRawLog path
(dic, clog) <- loadCompressedLog path
writeFile newpath $ show $ fullyDecompress (dic, clog)
where
bname = takeBaseName path
newpath = replaceBaseName path (bname ++ "_") | 269 | false | true | 1 | 9 | 73 | 96 | 46 | 50 | null | null |
Bodigrim/arithmoi | Math/NumberTheory/Primes/Factorisation/Montgomery.hs | mit | findParms :: Int -> (Word, Word, Word)
findParms digs = maybe (wheel, 1000, 7) snd (IM.lookupLT digs testParms) | 111 | findParms :: Int -> (Word, Word, Word)
findParms digs = maybe (wheel, 1000, 7) snd (IM.lookupLT digs testParms) | 111 | findParms digs = maybe (wheel, 1000, 7) snd (IM.lookupLT digs testParms) | 72 | false | true | 0 | 8 | 17 | 53 | 29 | 24 | null | null |
pmiddend/jumpie | lib/Jumpie/Game.hs | gpl-3.0 | processGameObject :: (MonadIO m,Functor m,MonadGame m,Monad m,MonadState GameState m,MonadWriter [OutgoingAction] m) => ObjectProcessor m GameObject
processGameObject actions o = case o of
ObjectPlayer _ -> error "player given to processGameObject, check the code"
ObjectPlatform _ -> error "You shouldn't process pl... | 515 | processGameObject :: (MonadIO m,Functor m,MonadGame m,Monad m,MonadState GameState m,MonadWriter [OutgoingAction] m) => ObjectProcessor m GameObject
processGameObject actions o = case o of
ObjectPlayer _ -> error "player given to processGameObject, check the code"
ObjectPlatform _ -> error "You shouldn't process pl... | 515 | processGameObject actions o = case o of
ObjectPlayer _ -> error "player given to processGameObject, check the code"
ObjectPlatform _ -> error "You shouldn't process platforms indirectly"
ObjectParticle b -> do
(newParticle,objects) <- processParticle actions b
return (ObjectParticle <$> newParticle,object... | 366 | false | true | 0 | 12 | 75 | 162 | 78 | 84 | null | null |
pjones/xmonad-test | vendor/xmonad-contrib/XMonad/Actions/CopyWindow.hs | bsd-2-clause | kill1 :: X ()
kill1 = do ss <- gets windowset
whenJust (W.peek ss) $ \w -> if W.member w $ delete'' w ss
then windows $ delete'' w
else kill
where delete'' w = W.modify Nothing (W.filter (/= w))
-- | Kill all other copies of foc... | 428 | kill1 :: X ()
kill1 = do ss <- gets windowset
whenJust (W.peek ss) $ \w -> if W.member w $ delete'' w ss
then windows $ delete'' w
else kill
where delete'' w = W.modify Nothing (W.filter (/= w))
-- | Kill all other copies of foc... | 428 | kill1 = do ss <- gets windowset
whenJust (W.peek ss) $ \w -> if W.member w $ delete'' w ss
then windows $ delete'' w
else kill
where delete'' w = W.modify Nothing (W.filter (/= w))
-- | Kill all other copies of focused window (i... | 414 | false | true | 0 | 12 | 156 | 115 | 55 | 60 | null | null |
massysett/prednote | lib/Prednote/Expressions/Infix.hs | bsd-3-clause | popper :: [OpStackVal] -> [R.RPNToken f a] -> ([OpStackVal], [R.RPNToken f a])
popper os ts = case os of
[] -> (os, ts)
x:xs -> case x of
StkOp R.OpAnd ->
let os' = xs
ts' = R.TokOperator R.OpAnd : ts
in popper os' ts'
_ -> (os, ts)
-- | Pops operators off the operator stack and onto ... | 547 | popper :: [OpStackVal] -> [R.RPNToken f a] -> ([OpStackVal], [R.RPNToken f a])
popper os ts = case os of
[] -> (os, ts)
x:xs -> case x of
StkOp R.OpAnd ->
let os' = xs
ts' = R.TokOperator R.OpAnd : ts
in popper os' ts'
_ -> (os, ts)
-- | Pops operators off the operator stack and onto ... | 547 | popper os ts = case os of
[] -> (os, ts)
x:xs -> case x of
StkOp R.OpAnd ->
let os' = xs
ts' = R.TokOperator R.OpAnd : ts
in popper os' ts'
_ -> (os, ts)
-- | Pops operators off the operator stack and onto the output stack
-- as long as the top of the operator stack is not an open
-- ... | 468 | false | true | 0 | 17 | 137 | 154 | 80 | 74 | null | null |
shayan-najd/QFeldspar | QFeldspar/TraversalGenerator.hs | gpl-3.0 | getNameCount :: Con -> (Name, [Type])
getNameCount (NormalC n ts) = (n , map snd ts) | 86 | getNameCount :: Con -> (Name, [Type])
getNameCount (NormalC n ts) = (n , map snd ts) | 86 | getNameCount (NormalC n ts) = (n , map snd ts) | 48 | false | true | 0 | 7 | 17 | 46 | 25 | 21 | null | null |
ghc-android/ghc | testsuite/tests/ghci/should_run/ghcirun004.hs | bsd-3-clause | 3511 = 3510 | 11 | 3511 = 3510 | 11 | 3511 = 3510 | 11 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
bitemyapp/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | ldpPool :: String
ldpPool = "pool" | 34 | ldpPool :: String
ldpPool = "pool" | 34 | ldpPool = "pool" | 16 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
jwiegley/ghc-release | libraries/Cabal/cabal-install/Distribution/Client/Sandbox/PackageEnvironment.hs | gpl-3.0 | -- | Pretty-print the package environment with default values for empty fields
-- commented out (just like the default ~/.cabal/config).
showPackageEnvironmentWithComments :: (Maybe PackageEnvironment)
-> PackageEnvironment
-> String
showPackag... | 655 | showPackageEnvironmentWithComments :: (Maybe PackageEnvironment)
-> PackageEnvironment
-> String
showPackageEnvironmentWithComments mdefPkgEnv pkgEnv = Disp.render $
ppFields pkgEnvFieldDescrs mdefPkgEnv pkgEnv
$+$ Disp.text ""
$+$ pp... | 518 | showPackageEnvironmentWithComments mdefPkgEnv pkgEnv = Disp.render $
ppFields pkgEnvFieldDescrs mdefPkgEnv pkgEnv
$+$ Disp.text ""
$+$ ppSection "install-dirs" "" installDirsFields
(fmap installDirsSection mdefPkgEnv) (installDirsSection pkgEnv)
where
installDirsSection = savedUserInstal... | 345 | true | true | 4 | 7 | 164 | 98 | 47 | 51 | null | null |
zlizta/PiSigma | src/Language/PiSigma/Lexer.hs | bsd-3-clause | tokArr :: Parser Loc
tokArr = locate (choice [ reservedOp "->"
, reservedOp "→"
] <?> "->") | 182 | tokArr :: Parser Loc
tokArr = locate (choice [ reservedOp "->"
, reservedOp "→"
] <?> "->") | 182 | tokArr = locate (choice [ reservedOp "->"
, reservedOp "→"
] <?> "->") | 151 | false | true | 0 | 10 | 107 | 39 | 19 | 20 | null | null |
vincent23/hsfuck | Hsfuck.hs | isc | addMem state diff = do value <- getMem state
setMem state $ value + diff | 95 | addMem state diff = do value <- getMem state
setMem state $ value + diff | 95 | addMem state diff = do value <- getMem state
setMem state $ value + diff | 95 | false | false | 0 | 9 | 37 | 36 | 15 | 21 | null | null |
mrakgr/futhark | src/Language/Futhark/Attributes.hs | bsd-3-clause | funsFromProg :: ProgBase f vn -> [FunDefBase f vn]
funsFromProg prog = mapMaybe isFun $ progDecs prog | 101 | funsFromProg :: ProgBase f vn -> [FunDefBase f vn]
funsFromProg prog = mapMaybe isFun $ progDecs prog | 101 | funsFromProg prog = mapMaybe isFun $ progDecs prog | 50 | false | true | 0 | 7 | 16 | 41 | 19 | 22 | null | null |
google/codeworld | codeworld-account/src/CodeWorld/Account/Actions.hs | apache-2.0 | initStore :: Store -> IO ()
initStore store = withStore store $ \conn -> do
execute_ conn "DROP TABLE IF EXISTS accounts"
execute_
conn
"CREATE TABLE IF NOT EXISTS accounts ( \
\ id INTEGER PRIMARY KEY NOT NULL \
\ , userId TEXT NOT NULL UNIQUE \
\ , status TEXT NOT NULL \
\ , passwordHash... | 379 | initStore :: Store -> IO ()
initStore store = withStore store $ \conn -> do
execute_ conn "DROP TABLE IF EXISTS accounts"
execute_
conn
"CREATE TABLE IF NOT EXISTS accounts ( \
\ id INTEGER PRIMARY KEY NOT NULL \
\ , userId TEXT NOT NULL UNIQUE \
\ , status TEXT NOT NULL \
\ , passwordHash... | 379 | initStore store = withStore store $ \conn -> do
execute_ conn "DROP TABLE IF EXISTS accounts"
execute_
conn
"CREATE TABLE IF NOT EXISTS accounts ( \
\ id INTEGER PRIMARY KEY NOT NULL \
\ , userId TEXT NOT NULL UNIQUE \
\ , status TEXT NOT NULL \
\ , passwordHash TEXT NOT NULL \
\ , tok... | 351 | false | true | 0 | 10 | 107 | 56 | 24 | 32 | null | null |
energyflowanalysis/efa-2.1 | hlint/efa2.hs | bsd-3-clause | warn "tail" = tail ==> NonEmpty.tail | 36 | warn "tail" = tail ==> NonEmpty.tail | 36 | warn "tail" = tail ==> NonEmpty.tail | 36 | false | false | 0 | 6 | 5 | 15 | 7 | 8 | null | null |
fredmorcos/attic | snippets/haskell/ChainEndos.hs | isc | main :: IO ()
main = do print $ chainEndos [('h':),('e':)] "llo"
print $ chainEndos [(+ 1),(* 3)] (2 :: Int)
print $ chainEndos [] (12 :: Int) | 162 | main :: IO ()
main = do print $ chainEndos [('h':),('e':)] "llo"
print $ chainEndos [(+ 1),(* 3)] (2 :: Int)
print $ chainEndos [] (12 :: Int) | 162 | main = do print $ chainEndos [('h':),('e':)] "llo"
print $ chainEndos [(+ 1),(* 3)] (2 :: Int)
print $ chainEndos [] (12 :: Int) | 148 | false | true | 0 | 10 | 47 | 94 | 52 | 42 | null | null |
fmapfmapfmap/amazonka | amazonka-ec2/gen/Network/AWS/EC2/CreateSubnet.hs | mpl-2.0 | -- | The network range for the subnet, in CIDR notation. For example,
-- '10.0.0.0\/24'.
cssCIdRBlock :: Lens' CreateSubnet Text
cssCIdRBlock = lens _cssCIdRBlock (\ s a -> s{_cssCIdRBlock = a}) | 194 | cssCIdRBlock :: Lens' CreateSubnet Text
cssCIdRBlock = lens _cssCIdRBlock (\ s a -> s{_cssCIdRBlock = a}) | 105 | cssCIdRBlock = lens _cssCIdRBlock (\ s a -> s{_cssCIdRBlock = a}) | 65 | true | true | 1 | 9 | 30 | 46 | 23 | 23 | null | null |
Norberg/gui_scad | src/ScadTreeView.hs | gpl-3.0 | treeStoreDragDestIface :: DragDestIface TreeStore Scad
treeStoreDragDestIface = DragDestIface {
treeDragDestRowDropPossible = \model dest -> do
mModelPath <- treeGetRowDragData
case mModelPath of
Nothing -> return False
Just (model', source) ->
if (toTreeMode... | 1,270 | treeStoreDragDestIface :: DragDestIface TreeStore Scad
treeStoreDragDestIface = DragDestIface {
treeDragDestRowDropPossible = \model dest -> do
mModelPath <- treeGetRowDragData
case mModelPath of
Nothing -> return False
Just (model', source) ->
if (toTreeMode... | 1,270 | treeStoreDragDestIface = DragDestIface {
treeDragDestRowDropPossible = \model dest -> do
mModelPath <- treeGetRowDragData
case mModelPath of
Nothing -> return False
Just (model', source) ->
if (toTreeModel model/=toTreeModel model') then return False
... | 1,215 | false | true | 0 | 28 | 484 | 346 | 170 | 176 | null | null |
olsner/ghc | libraries/ghci/GHCi/CreateBCO.hs | bsd-3-clause | emptyArr :: EmptyArr
emptyArr = unsafeDupablePerformIO $ IO $ \s ->
case newByteArray# 0# s of { (# s, arr #) ->
case unsafeFreezeByteArray# arr s of { (# s, farr #) ->
(# s, EmptyArr farr #)
}} | 202 | emptyArr :: EmptyArr
emptyArr = unsafeDupablePerformIO $ IO $ \s ->
case newByteArray# 0# s of { (# s, arr #) ->
case unsafeFreezeByteArray# arr s of { (# s, farr #) ->
(# s, EmptyArr farr #)
}} | 202 | emptyArr = unsafeDupablePerformIO $ IO $ \s ->
case newByteArray# 0# s of { (# s, arr #) ->
case unsafeFreezeByteArray# arr s of { (# s, farr #) ->
(# s, EmptyArr farr #)
}} | 181 | false | true | 0 | 14 | 46 | 76 | 41 | 35 | null | null |
jdavidberger/project-euler | prob100.hs | lgpl-3.0 | a046090 0 = 1 | 13 | a046090 0 = 1 | 13 | a046090 0 = 1 | 13 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
ristovao/haskell | arvo.hs | gpl-2.0 | elementoOrdem (No x esq dir) = (elementoOrdem esq) ++ [x] ++(elementoOrdem dir) | 81 | elementoOrdem (No x esq dir) = (elementoOrdem esq) ++ [x] ++(elementoOrdem dir) | 81 | elementoOrdem (No x esq dir) = (elementoOrdem esq) ++ [x] ++(elementoOrdem dir) | 81 | false | false | 0 | 8 | 13 | 43 | 21 | 22 | null | null |
nickbart1980/pandoc | src/Text/Pandoc/Pretty.hs | gpl-2.0 | -- | Concatenate a list of 'Doc's.
cat :: [Doc] -> Doc
cat = mconcat | 68 | cat :: [Doc] -> Doc
cat = mconcat | 33 | cat = mconcat | 13 | true | true | 0 | 7 | 14 | 26 | 12 | 14 | null | null |
mazelife/agilulf | src/Agiluf/File.hs | bsd-3-clause | getCommand :: (String, C.Config) -> IO String
getCommand (base_directory, conf) = liftA addEnv (lookupDefault post_publish_command conf (pack "post_publish_command"))
where addEnv command = "( export AGILUF_ROOT=\"" ++ base_directory ++ "\"; " ++ command ++ " )" | 266 | getCommand :: (String, C.Config) -> IO String
getCommand (base_directory, conf) = liftA addEnv (lookupDefault post_publish_command conf (pack "post_publish_command"))
where addEnv command = "( export AGILUF_ROOT=\"" ++ base_directory ++ "\"; " ++ command ++ " )" | 266 | getCommand (base_directory, conf) = liftA addEnv (lookupDefault post_publish_command conf (pack "post_publish_command"))
where addEnv command = "( export AGILUF_ROOT=\"" ++ base_directory ++ "\"; " ++ command ++ " )" | 220 | false | true | 0 | 9 | 38 | 82 | 42 | 40 | null | null |
urbanslug/ghc | compiler/basicTypes/BasicTypes.hs | bsd-3-clause | hasNoOneShotInfo NoOneShotInfo = True | 37 | hasNoOneShotInfo NoOneShotInfo = True | 37 | hasNoOneShotInfo NoOneShotInfo = True | 37 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
mbakke/ganeti | src/Ganeti/Utils/Atomic.hs | bsd-2-clause | -- | Atomically write a file, by first writing the contents into a temporary
-- file and then renaming it to the old position.
atomicWriteFile :: FilePath -> String -> IO ()
atomicWriteFile path contents = atomicUpdateFile path
(\_ fh -> hPutStr fh contents) | 292 | atomicWriteFile :: FilePath -> String -> IO ()
atomicWriteFile path contents = atomicUpdateFile path
(\_ fh -> hPutStr fh contents) | 165 | atomicWriteFile path contents = atomicUpdateFile path
(\_ fh -> hPutStr fh contents) | 118 | true | true | 0 | 8 | 77 | 51 | 26 | 25 | null | null |
alexander-at-github/eta | compiler/ETA/SimplCore/LiberateCase.hs | bsd-3-clause | libCase :: LibCaseEnv
-> CoreExpr
-> CoreExpr
libCase env (Var v) = libCaseId env v | 112 | libCase :: LibCaseEnv
-> CoreExpr
-> CoreExpr
libCase env (Var v) = libCaseId env v | 111 | libCase env (Var v) = libCaseId env v | 49 | false | true | 0 | 7 | 43 | 35 | 17 | 18 | null | null |
uduki/hsQt | Qtc/Core/QDate.hs | bsd-2-clause | dayOfYear :: QDate a -> (()) -> IO (Int)
dayOfYear x0 ()
= withIntResult $
withObjectPtr x0 $ \cobj_x0 ->
qtc_QDate_dayOfYear cobj_x0 | 143 | dayOfYear :: QDate a -> (()) -> IO (Int)
dayOfYear x0 ()
= withIntResult $
withObjectPtr x0 $ \cobj_x0 ->
qtc_QDate_dayOfYear cobj_x0 | 143 | dayOfYear x0 ()
= withIntResult $
withObjectPtr x0 $ \cobj_x0 ->
qtc_QDate_dayOfYear cobj_x0 | 102 | false | true | 0 | 8 | 31 | 59 | 29 | 30 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.