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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
jkpl/tagenerator | src/TaGenerator/GameEngine.hs | mit | unknownAction :: ActionType -> String -> String
unknownAction at s = concat ["Don't know how to ", (show at), " ", s, "."] | 122 | unknownAction :: ActionType -> String -> String
unknownAction at s = concat ["Don't know how to ", (show at), " ", s, "."] | 122 | unknownAction at s = concat ["Don't know how to ", (show at), " ", s, "."] | 74 | false | true | 0 | 8 | 22 | 48 | 26 | 22 | null | null |
urbanslug/ghc | compiler/ghci/ByteCodeItbls.hs | bsd-3-clause | fieldSz :: Storable b => (a -> b) -> a -> Int
fieldSz sel x = sizeOf (sel x) | 76 | fieldSz :: Storable b => (a -> b) -> a -> Int
fieldSz sel x = sizeOf (sel x) | 76 | fieldSz sel x = sizeOf (sel x) | 30 | false | true | 0 | 9 | 18 | 53 | 24 | 29 | null | null |
MgaMPKAy/language-sh | Language/Sh/Arithmetic.hs | bsd-3-clause | -- what is P?
whiteSpace = P.whiteSpace lexer | 45 | whiteSpace = P.whiteSpace lexer | 31 | whiteSpace = P.whiteSpace lexer | 31 | true | false | 0 | 6 | 7 | 12 | 6 | 6 | null | null |
ddssff/lens | src/Control/Lens/Tuple.hs | bsd-3-clause | proxyN10 :: Proxy N10
proxyN10 = Proxy | 38 | proxyN10 :: Proxy N10
proxyN10 = Proxy | 38 | proxyN10 = Proxy | 16 | false | true | 0 | 6 | 6 | 20 | 8 | 12 | null | null |
joelburget/interplanetary-computation | src/Planetary/Core/Syntax/Test.hs | bsd-3-clause | unitTests :: Test ()
unitTests = scope "syntax" $ tests
[ scope "extendAbility 1" $
let uidMap = [(unitId, [TyArgVal unitTy])]
actual :: Ability Cid
actual = extendAbility emptyAbility (Adjustment uidMap)
expected = Ability OpenAbility uidMap
in expect $ expected == actual
, scope "e... | 601 | unitTests :: Test ()
unitTests = scope "syntax" $ tests
[ scope "extendAbility 1" $
let uidMap = [(unitId, [TyArgVal unitTy])]
actual :: Ability Cid
actual = extendAbility emptyAbility (Adjustment uidMap)
expected = Ability OpenAbility uidMap
in expect $ expected == actual
, scope "e... | 601 | unitTests = scope "syntax" $ tests
[ scope "extendAbility 1" $
let uidMap = [(unitId, [TyArgVal unitTy])]
actual :: Ability Cid
actual = extendAbility emptyAbility (Adjustment uidMap)
expected = Ability OpenAbility uidMap
in expect $ expected == actual
, scope "extendAbility 2" $
... | 580 | false | true | 0 | 15 | 153 | 203 | 100 | 103 | null | null |
maciej-bendkowski/boltzmann-brain | Data/Boltzmann/System/Sampler.hs | bsd-3-clause | genRandomArgs sys ub (List t : xs) =
do guard (ub > 0)
(arg, s) <- genRandomStrL sys t ub
(args', ub') <- genRandomArgs sys (ub -s) xs
return (listStr arg : args', s + ub') | 201 | genRandomArgs sys ub (List t : xs) =
do guard (ub > 0)
(arg, s) <- genRandomStrL sys t ub
(args', ub') <- genRandomArgs sys (ub -s) xs
return (listStr arg : args', s + ub') | 201 | genRandomArgs sys ub (List t : xs) =
do guard (ub > 0)
(arg, s) <- genRandomStrL sys t ub
(args', ub') <- genRandomArgs sys (ub -s) xs
return (listStr arg : args', s + ub') | 201 | false | false | 0 | 10 | 64 | 108 | 52 | 56 | null | null |
ijt/kdtree | test/KdTreeTest.hs | bsd-3-clause | prop_kNearestNeighborsMatchesBrute :: [Kd.Point3d] -> Int -> Kd.Point3d -> Bool
prop_kNearestNeighborsMatchesBrute points k p =
L.sort (Kd.kNearestNeighbors tree k p) == L.sort (bruteKnearestNeighbors points k p)
where tree = Kd.fromList points
bruteKnearestNeighbors points k p =
take k . ... | 360 | prop_kNearestNeighborsMatchesBrute :: [Kd.Point3d] -> Int -> Kd.Point3d -> Bool
prop_kNearestNeighborsMatchesBrute points k p =
L.sort (Kd.kNearestNeighbors tree k p) == L.sort (bruteKnearestNeighbors points k p)
where tree = Kd.fromList points
bruteKnearestNeighbors points k p =
take k . ... | 360 | prop_kNearestNeighborsMatchesBrute points k p =
L.sort (Kd.kNearestNeighbors tree k p) == L.sort (bruteKnearestNeighbors points k p)
where tree = Kd.fromList points
bruteKnearestNeighbors points k p =
take k . L.sortBy (Kd.compareDistance p) $ points | 280 | false | true | 0 | 12 | 72 | 121 | 59 | 62 | null | null |
comonoidial/ALFIN | Backend/OptimizeAsm.hs | mit | optimCallExps vs (((Left s, nb) :<=: ccc):xs) -- FIXME only want RefVars from vs here
| s `notElem` vs = optimCallExps vs (((Right s, nb) :<=: ccc):xs) | 154 | optimCallExps vs (((Left s, nb) :<=: ccc):xs) -- FIXME only want RefVars from vs here
| s `notElem` vs = optimCallExps vs (((Right s, nb) :<=: ccc):xs) | 154 | optimCallExps vs (((Left s, nb) :<=: ccc):xs) -- FIXME only want RefVars from vs here
| s `notElem` vs = optimCallExps vs (((Right s, nb) :<=: ccc):xs) | 154 | false | false | 0 | 12 | 29 | 77 | 40 | 37 | null | null |
foreverbell/project-euler-solutions | src/58.hs | bsd-3-clause | ptotal = p + (wrap seq1) + (wrap seq2) + (wrap seq3) | 52 | ptotal = p + (wrap seq1) + (wrap seq2) + (wrap seq3) | 52 | ptotal = p + (wrap seq1) + (wrap seq2) + (wrap seq3) | 52 | false | false | 0 | 9 | 11 | 36 | 18 | 18 | null | null |
gcampax/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | stableNameTyConKey = mkPreludeTyConUnique 52 | 65 | stableNameTyConKey = mkPreludeTyConUnique 52 | 65 | stableNameTyConKey = mkPreludeTyConUnique 52 | 65 | false | false | 0 | 5 | 24 | 9 | 4 | 5 | null | null |
mpkh/Idris-dev | src/IRTS/Lang.hs | bsd-3-clause | lsubst n new (LLet v val sc) = LLet v (lsubst n new val) (lsubst n new sc) | 74 | lsubst n new (LLet v val sc) = LLet v (lsubst n new val) (lsubst n new sc) | 74 | lsubst n new (LLet v val sc) = LLet v (lsubst n new val) (lsubst n new sc) | 74 | false | false | 0 | 7 | 17 | 53 | 24 | 29 | null | null |
yamadapc/haskell-olhovivo | bin/WSClient.hs | gpl-2.0 | application :: WS.ClientApp ()
application conn = do
hSetBuffering stdin LineBuffering
putStrLn "Connected!"
_ <- forkIO $ forever $ do
d <- WS.receiveData conn
liftIO $ T.putStrLn d
let loop = do
line <- T.getLine
unless (T.null line) $ WS.sendTextData conn lin... | 338 | application :: WS.ClientApp ()
application conn = do
hSetBuffering stdin LineBuffering
putStrLn "Connected!"
_ <- forkIO $ forever $ do
d <- WS.receiveData conn
liftIO $ T.putStrLn d
let loop = do
line <- T.getLine
unless (T.null line) $ WS.sendTextData conn lin... | 338 | application conn = do
hSetBuffering stdin LineBuffering
putStrLn "Connected!"
_ <- forkIO $ forever $ do
d <- WS.receiveData conn
liftIO $ T.putStrLn d
let loop = do
line <- T.getLine
unless (T.null line) $ WS.sendTextData conn line >> loop
loop | 307 | false | true | 0 | 17 | 106 | 124 | 54 | 70 | null | null |
quchen/binary-typed | src/Data/Binary/Typed.hs | bsd-2-clause | -- Inlining is crucial for caching to work!
-- | Safely decode data, yielding 'Either' an error 'String' or the value.
-- Equivalent to 'decodeTypedOrFail' stripped of the non-essential data.
-- Based on 'decodeTypedOrFail'.
--
-- @
-- encoded = 'encodeTyped' 'Full' ("hello", 1 :: 'Int', 2.34 :: 'Double')
--
-- -- R... | 794 | decodeTyped :: (Typeable a, Binary a)
=> BSL.ByteString
-> Either String a
decodeTyped = \x -> case decodeTypedOrFail x of
Left (_,_,err) -> Left err
Right (_,_,value) -> Right value
| 223 | decodeTyped = \x -> case decodeTypedOrFail x of
Left (_,_,err) -> Left err
Right (_,_,value) -> Right value
| 124 | true | true | 0 | 10 | 161 | 105 | 61 | 44 | null | null |
walck/learn-physics | examples/src/sunEarthRK4.hs | bsd-3-clause | gGrav :: Double
gGrav = 6.67e-11 | 32 | gGrav :: Double
gGrav = 6.67e-11 | 32 | gGrav = 6.67e-11 | 16 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
soscpd/bee | root/tests/zguide/examples/Haskell/wuproxy.hs | mit | main :: IO ()
main = runZMQ $ do
-- This is where the weather service sits
frontend <- socket XSub
connect frontend "tcp://192.168.55.210:5556"
-- This is our public endpoint for subscribers
backend <- socket XPub
bind backend "tcp://10.1.1.0:8100"
-- Run the proxy until the user interrupt... | 359 | main :: IO ()
main = runZMQ $ do
-- This is where the weather service sits
frontend <- socket XSub
connect frontend "tcp://192.168.55.210:5556"
-- This is our public endpoint for subscribers
backend <- socket XPub
bind backend "tcp://10.1.1.0:8100"
-- Run the proxy until the user interrupt... | 359 | main = runZMQ $ do
-- This is where the weather service sits
frontend <- socket XSub
connect frontend "tcp://192.168.55.210:5556"
-- This is our public endpoint for subscribers
backend <- socket XPub
bind backend "tcp://10.1.1.0:8100"
-- Run the proxy until the user interrupts us
proxy... | 345 | false | true | 2 | 9 | 85 | 76 | 32 | 44 | null | null |
mightymoose/liquidhaskell | tests/neg/meas5.hs | bsd-3-clause | prop4 = liquidAssertB ((n1 + n2) == n3)
where n1 = mylen zs
n2 = mylen zs'
n3 = mylen $ myapp zs zs' | 120 | prop4 = liquidAssertB ((n1 + n2) == n3)
where n1 = mylen zs
n2 = mylen zs'
n3 = mylen $ myapp zs zs' | 120 | prop4 = liquidAssertB ((n1 + n2) == n3)
where n1 = mylen zs
n2 = mylen zs'
n3 = mylen $ myapp zs zs' | 120 | false | false | 2 | 9 | 43 | 57 | 28 | 29 | null | null |
Arguggi/documentator | data/Lens.hs | gpl-3.0 | -- | A version of ('Control.Lens.Setter.<.=') that works on 'ALens'.
(<#=) :: MonadState s m => ALens s s a b -> b -> m b
l <#= b = do
l #= b
return b
| 155 | (<#=) :: MonadState s m => ALens s s a b -> b -> m b
l <#= b = do
l #= b
return b
| 86 | l <#= b = do
l #= b
return b
| 33 | true | true | 0 | 10 | 40 | 65 | 30 | 35 | null | null |
DrSLDR/logoff | test/TestsMono.hs | mit | {------------------------------------------------------------------------------}
-- iMonoSum-1 - Simple, axiomatic test
-- [(x- (+) y-)] |- (x- .(+). y-) => [x-] |- x-; [y-] |- y-
iMonoSum_1 :: Test
iMonoSum_1 = ((==)
(iMonoSum
(Sequent
(FIStruct
(N (Sum
(N (Negative "x"))
(N (Ne... | 609 | iMonoSum_1 :: Test
iMonoSum_1 = ((==)
(iMonoSum
(Sequent
(FIStruct
(N (Sum
(N (Negative "x"))
(N (Negative "y")))))
(SSum
(OStruct (N (Negative "x")))
(OStruct (N (Negative "y"))))))
(Sequent
(FIStruct (N (Negative "x")))
(OStruct (N (Negative "x")... | 429 | iMonoSum_1 = ((==)
(iMonoSum
(Sequent
(FIStruct
(N (Sum
(N (Negative "x"))
(N (Negative "y")))))
(SSum
(OStruct (N (Negative "x")))
(OStruct (N (Negative "y"))))))
(Sequent
(FIStruct (N (Negative "x")))
(OStruct (N (Negative "x"))),
Sequent
(... | 410 | true | true | 0 | 21 | 156 | 227 | 115 | 112 | null | null |
dan3944/emojiscript | src/Transpile.hs | mit | getMappings :: String -> Mappings
getMappings = lines >>> map words >>> map ((unwords . tail) &&& head) >>> M.fromList | 118 | getMappings :: String -> Mappings
getMappings = lines >>> map words >>> map ((unwords . tail) &&& head) >>> M.fromList | 118 | getMappings = lines >>> map words >>> map ((unwords . tail) &&& head) >>> M.fromList | 84 | false | true | 0 | 11 | 19 | 49 | 25 | 24 | null | null |
ganeti-github-testing/ganeti-test-1 | src/Ganeti/Constants.hs | bsd-2-clause | defaultRapiPort :: Int
defaultRapiPort = 5080 | 45 | defaultRapiPort :: Int
defaultRapiPort = 5080 | 45 | defaultRapiPort = 5080 | 22 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
ghcjs/jsaddle-dom | src/JSDOM/Generated/CSSPrimitiveValue.hs | mit | -- | <https://developer.mozilla.org/en-US/docs/Web/API/CSSPrimitiveValue.getCounterValue Mozilla CSSPrimitiveValue.getCounterValue documentation>
getCounterValue_ :: (MonadDOM m) => CSSPrimitiveValue -> m ()
getCounterValue_ self
= liftDOM (void (self ^. jsf "getCounterValue" ())) | 284 | getCounterValue_ :: (MonadDOM m) => CSSPrimitiveValue -> m ()
getCounterValue_ self
= liftDOM (void (self ^. jsf "getCounterValue" ())) | 137 | getCounterValue_ self
= liftDOM (void (self ^. jsf "getCounterValue" ())) | 75 | true | true | 0 | 11 | 27 | 56 | 28 | 28 | null | null |
mlite/hLLVM | src/Llvm/Hir/Composer.hs | bsd-3-clause | half :: Type ScalarB F
half = TpHalf | 36 | half :: Type ScalarB F
half = TpHalf | 36 | half = TpHalf | 13 | false | true | 0 | 6 | 7 | 22 | 9 | 13 | null | null |
Alexander-Ignatyev/morpheus | hmatrix-morpheus/test/Numeric/Morpheus/StatisticsTest.hs | bsd-3-clause | columnStddevsRM = fromList [25.48202, 40.84116, 79.75797, 25.53429] | 67 | columnStddevsRM = fromList [25.48202, 40.84116, 79.75797, 25.53429] | 67 | columnStddevsRM = fromList [25.48202, 40.84116, 79.75797, 25.53429] | 67 | false | false | 1 | 5 | 6 | 24 | 12 | 12 | null | null |
joshuaclayton/timeline | src/Timeline/Parser/Internal.hs | mit | brackets :: Parser a -> Parser a
brackets = between (symbol "[") (symbol "]") | 77 | brackets :: Parser a -> Parser a
brackets = between (symbol "[") (symbol "]") | 77 | brackets = between (symbol "[") (symbol "]") | 44 | false | true | 0 | 7 | 13 | 38 | 18 | 20 | null | null |
diminishedprime/.org | programmey_stuff/write_yourself_a_scheme/ch_04/hello.hs | mit | showError (BadSpecialForm message form) = message ++ ": " ++ show form | 70 | showError (BadSpecialForm message form) = message ++ ": " ++ show form | 70 | showError (BadSpecialForm message form) = message ++ ": " ++ show form | 70 | false | false | 0 | 7 | 11 | 28 | 13 | 15 | null | null |
rueshyna/gogol | gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'AdvertiserGroup' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'agKind'
--
-- * 'agAccountId'
--
-- * 'agName'
--
-- * 'agId'
advertiserGroup
:: AdvertiserGroup
advertiserGroup =
AdvertiserGroup'
... | 443 | advertiserGroup
:: AdvertiserGroup
advertiserGroup =
AdvertiserGroup'
{ _agKind = "dfareporting#advertiserGroup"
, _agAccountId = Nothing
, _agName = Nothing
, _agId = Nothing
} | 205 | advertiserGroup =
AdvertiserGroup'
{ _agKind = "dfareporting#advertiserGroup"
, _agAccountId = Nothing
, _agName = Nothing
, _agId = Nothing
} | 166 | true | true | 0 | 7 | 96 | 58 | 36 | 22 | null | null |
rahulmutt/ghcvm | compiler/Eta/HsSyn/HsExpr.hs | bsd-3-clause | pprPendingSplice :: (OutputableBndr id)
=> SplicePointName -> LHsExpr id -> SDoc
pprPendingSplice n e = angleBrackets (ppr n <> comma <+> ppr e) | 161 | pprPendingSplice :: (OutputableBndr id)
=> SplicePointName -> LHsExpr id -> SDoc
pprPendingSplice n e = angleBrackets (ppr n <> comma <+> ppr e) | 161 | pprPendingSplice n e = angleBrackets (ppr n <> comma <+> ppr e) | 63 | false | true | 0 | 9 | 39 | 56 | 27 | 29 | null | null |
sacundim/tau-sigma | test/TauSigma/Statistics/SlopeTest.hs | bsd-3-clause | withSuccessors :: (a -> a -> r) -> [a] -> [r]
withSuccessors _ [] = [] | 70 | withSuccessors :: (a -> a -> r) -> [a] -> [r]
withSuccessors _ [] = [] | 70 | withSuccessors _ [] = [] | 24 | false | true | 0 | 8 | 15 | 45 | 24 | 21 | null | null |
martinra/hflint | test/HFlint/Test/FMPQ/Rational.hs | gpl-3.0 | zeroOneUnitTests :: TestTree
zeroOneUnitTests = testGroup "Zero & One Unit Tests"
[ testCase "zero" $
fromInteger (M.zero :: Integer) @=? (M.zero :: FMPQ)
, testCase "one" $
fromInteger (M.one :: Integer) @=? (M.one :: FMPQ)
] | 246 | zeroOneUnitTests :: TestTree
zeroOneUnitTests = testGroup "Zero & One Unit Tests"
[ testCase "zero" $
fromInteger (M.zero :: Integer) @=? (M.zero :: FMPQ)
, testCase "one" $
fromInteger (M.one :: Integer) @=? (M.one :: FMPQ)
] | 246 | zeroOneUnitTests = testGroup "Zero & One Unit Tests"
[ testCase "zero" $
fromInteger (M.zero :: Integer) @=? (M.zero :: FMPQ)
, testCase "one" $
fromInteger (M.one :: Integer) @=? (M.one :: FMPQ)
] | 217 | false | true | 0 | 10 | 55 | 83 | 44 | 39 | null | null |
sjakobi/stack | src/Stack/Types/StackT.hs | bsd-3-clause | -- | Write a "sticky" line to the terminal. Any subsequent lines will
-- overwrite this one, and that same line will be repeated below
-- again. In other words, the line sticks at the bottom of the output
-- forever. Running this function again will replace the sticky line
-- with a new sticky line. When you want to ge... | 425 | logSticky :: Q Exp
logSticky =
logOther "sticky" | 52 | logSticky =
logOther "sticky" | 33 | true | true | 0 | 5 | 81 | 24 | 15 | 9 | null | null |
forsyde/forsyde-atom | src/ForSyDe/Atom/MoC/DE/React/Lib.hs | bsd-3-clause | toDE4 s1 s2 s3 s4 = (toDE1 s1, toDE1 s2, toDE1 s3, toDE1 s4) | 60 | toDE4 s1 s2 s3 s4 = (toDE1 s1, toDE1 s2, toDE1 s3, toDE1 s4) | 60 | toDE4 s1 s2 s3 s4 = (toDE1 s1, toDE1 s2, toDE1 s3, toDE1 s4) | 60 | false | false | 0 | 6 | 13 | 39 | 19 | 20 | null | null |
armoredsoftware/protocol | demos/PaulPractice/BookSimpleTypedLambda.hs | bsd-3-clause | eval (App x y) | isValue x = App x (eval y)
| otherwise =eval (App (eval x) (eval y)) | 100 | eval (App x y) | isValue x = App x (eval y)
| otherwise =eval (App (eval x) (eval y)) | 100 | eval (App x y) | isValue x = App x (eval y)
| otherwise =eval (App (eval x) (eval y)) | 100 | false | false | 0 | 10 | 34 | 69 | 31 | 38 | null | null |
choener/GrammarProducts | old/MultiAlign.hs | gpl-3.0 | i :: Int
i = 1 | 14 | i :: Int
i = 1 | 14 | i = 1 | 5 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
dcreager/cabal | Distribution/Simple/Program.hs | bsd-3-clause | -- | Get any extra args that have been previously specified for a program.
--
userSpecifiedArgs :: Program -> ProgramConfiguration -> [ProgArg]
userSpecifiedArgs prog =
maybe [] (\(_,_,as)->as) . Map.lookup (programName prog) . unconfiguredProgs | 247 | userSpecifiedArgs :: Program -> ProgramConfiguration -> [ProgArg]
userSpecifiedArgs prog =
maybe [] (\(_,_,as)->as) . Map.lookup (programName prog) . unconfiguredProgs | 169 | userSpecifiedArgs prog =
maybe [] (\(_,_,as)->as) . Map.lookup (programName prog) . unconfiguredProgs | 103 | true | true | 0 | 9 | 35 | 75 | 39 | 36 | null | null |
coolhacks/scripts-hacks | examples/shellcheck-master/ShellCheck/Analytics.hs | mit | checkGlobbedRegex _ _ = return () | 33 | checkGlobbedRegex _ _ = return () | 33 | checkGlobbedRegex _ _ = return () | 33 | false | false | 0 | 6 | 5 | 16 | 7 | 9 | null | null |
reuleaux/pire | src/Pire/Pretty/PP.hs | bsd-3-clause | dispEps :: Eps -> M Doc
dispEps ErasedP = return $ text "ErasedP" | 66 | dispEps :: Eps -> M Doc
dispEps ErasedP = return $ text "ErasedP" | 65 | dispEps ErasedP = return $ text "ErasedP" | 41 | false | true | 0 | 7 | 13 | 32 | 14 | 18 | null | null |
Hi-Angel/yi | yi-core/src/Yi/Buffer/HighLevel.hs | gpl-2.0 | downScreensB :: Int -> BufferM ()
downScreensB = scrollScreensB | 63 | downScreensB :: Int -> BufferM ()
downScreensB = scrollScreensB | 63 | downScreensB = scrollScreensB | 29 | false | true | 0 | 7 | 8 | 20 | 10 | 10 | null | null |
elieux/ghc | compiler/hsSyn/HsDecls.hs | bsd-3-clause | pp_condecls cs -- In H98 syntax
= equals <+> sep (punctuate (ptext (sLit " |")) (map ppr cs)) | 114 | pp_condecls cs -- In H98 syntax
= equals <+> sep (punctuate (ptext (sLit " |")) (map ppr cs)) | 114 | pp_condecls cs -- In H98 syntax
= equals <+> sep (punctuate (ptext (sLit " |")) (map ppr cs)) | 114 | false | false | 0 | 12 | 38 | 45 | 22 | 23 | null | null |
alexander-at-github/eta | compiler/ETA/Prelude/PrimOp.hs | bsd-3-clause | tagOf_PrimOp Int64SrlOp = _ILIT(1085) | 37 | tagOf_PrimOp Int64SrlOp = _ILIT(1085) | 37 | tagOf_PrimOp Int64SrlOp = _ILIT(1085) | 37 | false | false | 0 | 6 | 3 | 15 | 7 | 8 | null | null |
lambdageek/insomnia | src/Insomnia/ToF/Module.hs | bsd-3-clause | typeAliasDefn :: ToF m
=> ModuleKind
-> Field
-> TypeAlias
-> (ModSummary -> m ans)
-> m ans
typeAliasDefn _mk f (ManifestTypeAlias bnd) kont =
U.lunbind bnd $ \ (tvks, rhs) -> do
(tlam, tK) <- withTyVars tvks $ \tvks' -> do
... | 775 | typeAliasDefn :: ToF m
=> ModuleKind
-> Field
-> TypeAlias
-> (ModSummary -> m ans)
-> m ans
typeAliasDefn _mk f (ManifestTypeAlias bnd) kont =
U.lunbind bnd $ \ (tvks, rhs) -> do
(tlam, tK) <- withTyVars tvks $ \tvks' -> do
... | 775 | typeAliasDefn _mk f (ManifestTypeAlias bnd) kont =
U.lunbind bnd $ \ (tvks, rhs) -> do
(tlam, tK) <- withTyVars tvks $ \tvks' -> do
(rhs', kcod) <- type' rhs
return (F.tLams tvks' rhs', F.kArrs (map snd tvks') kcod)
let tsig = F.TypeSem tlam tK
tc = U.s2n f :: TyConName
xc = U.s2n ... | 597 | false | true | 0 | 18 | 296 | 330 | 166 | 164 | null | null |
melted/llvm-pretty | src/Text/LLVM/AST.hs | bsd-3-clause | ppFCmpOp Fueq = text "ueq" | 28 | ppFCmpOp Fueq = text "ueq" | 28 | ppFCmpOp Fueq = text "ueq" | 28 | false | false | 1 | 5 | 6 | 15 | 5 | 10 | null | null |
ozgurakgun/Idris-dev | src/Idris/Core/TT.hs | bsd-3-clause | pureTerm _ = True | 17 | pureTerm _ = True | 17 | pureTerm _ = True | 17 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
gcampax/ghc | utils/genprimopcode/Main.hs | bsd-3-clause | ppType (TyVar "c") = "gammaTy" | 51 | ppType (TyVar "c") = "gammaTy" | 51 | ppType (TyVar "c") = "gammaTy" | 51 | false | false | 0 | 6 | 25 | 16 | 7 | 9 | null | null |
mattrrichard/darwin | src/Main.hs | bsd-3-clause | polygonConfig sourceImg s startingGen stepCount =
return Config { strategy = s
, readPop = return . PolygonImage sourceImg
, runName = "polygons"
, startingGenId = startingGen
, render = return . renderPolygonImage
, stepCount = stepCount... | 380 | polygonConfig sourceImg s startingGen stepCount =
return Config { strategy = s
, readPop = return . PolygonImage sourceImg
, runName = "polygons"
, startingGenId = startingGen
, render = return . renderPolygonImage
, stepCount = stepCount... | 380 | polygonConfig sourceImg s startingGen stepCount =
return Config { strategy = s
, readPop = return . PolygonImage sourceImg
, runName = "polygons"
, startingGenId = startingGen
, render = return . renderPolygonImage
, stepCount = stepCount... | 380 | false | false | 0 | 8 | 155 | 73 | 42 | 31 | null | null |
yav/alsa-haskell | Sound/Alsa/Sequencer/Client.hs | mit | query_next_client :: SndSeq -> ClientInfo
-> IO Bool -- ^ Was there a next client?
query_next_client (SndSeq h) info =
check_error' (const True)
(\x -> guard (x == -2) >> return False)
=<< with_client_info info (snd_seq_query_next_client h) | 285 | query_next_client :: SndSeq -> ClientInfo
-> IO Bool
query_next_client (SndSeq h) info =
check_error' (const True)
(\x -> guard (x == -2) >> return False)
=<< with_client_info info (snd_seq_query_next_client h) | 254 | query_next_client (SndSeq h) info =
check_error' (const True)
(\x -> guard (x == -2) >> return False)
=<< with_client_info info (snd_seq_query_next_client h) | 180 | true | true | 2 | 11 | 81 | 91 | 44 | 47 | null | null |
FranklinChen/Idris-dev | src/Idris/AbsSyntaxTree.hs | bsd-3-clause | eqDecl = PDatadecl eqTy primfc (piBindp impl [(n "A", PType bi), (n "B", PType bi)]
(piBind [(n "x", PRef bi [] (n "A")), (n "y", PRef bi [] (n "B"))]
(PType bi)))
[(reflDoc, reflParamDoc,
eqCon, primfc, PPi im... | 1,403 | eqDecl = PDatadecl eqTy primfc (piBindp impl [(n "A", PType bi), (n "B", PType bi)]
(piBind [(n "x", PRef bi [] (n "A")), (n "y", PRef bi [] (n "B"))]
(PType bi)))
[(reflDoc, reflParamDoc,
eqCon, primfc, PPi im... | 1,403 | eqDecl = PDatadecl eqTy primfc (piBindp impl [(n "A", PType bi), (n "B", PType bi)]
(piBind [(n "x", PRef bi [] (n "A")), (n "y", PRef bi [] (n "B"))]
(PType bi)))
[(reflDoc, reflParamDoc,
eqCon, primfc, PPi im... | 1,403 | false | false | 2 | 18 | 668 | 464 | 237 | 227 | null | null |
snowleopard/alga | src/Algebra/Graph/Label.hs | mit | -- | Get a finite value or @Nothing@ if the value is infinite.
getFinite :: NonNegative a -> Maybe a
getFinite (NonNegative x) = fromExtended x | 143 | getFinite :: NonNegative a -> Maybe a
getFinite (NonNegative x) = fromExtended x | 80 | getFinite (NonNegative x) = fromExtended x | 42 | true | true | 0 | 6 | 25 | 38 | 17 | 21 | null | null |
andrewthad/vinyl-vectors | src/Data/Vector/Vinyl/Default/NonEmpty/Monomorphic.hs | bsd-3-clause | -- | /O(n)/ Apply a function to every element of a vector and its index
imap :: (G.Vector Vector (Rec Identity rs), G.Vector Vector (Rec Identity ss))
=> (Int -> Rec Identity rs -> Rec Identity ss)
-> Vector (Rec Identity rs) -> Vector (Rec Identity ss)
imap = G.imap | 277 | imap :: (G.Vector Vector (Rec Identity rs), G.Vector Vector (Rec Identity ss))
=> (Int -> Rec Identity rs -> Rec Identity ss)
-> Vector (Rec Identity rs) -> Vector (Rec Identity ss)
imap = G.imap | 205 | imap = G.imap | 13 | true | true | 0 | 11 | 59 | 110 | 53 | 57 | null | null |
MedeaMelana/HoleyMonoid | Format.hs | bsd-3-clause | align :: FormatLike x a b => Dir -> Int -> x -> Format a b
align dir wid = mapFormat (align' dir wid) . toFormat | 112 | align :: FormatLike x a b => Dir -> Int -> x -> Format a b
align dir wid = mapFormat (align' dir wid) . toFormat | 112 | align dir wid = mapFormat (align' dir wid) . toFormat | 53 | false | true | 0 | 10 | 25 | 64 | 29 | 35 | null | null |
geraldus/yesod-form-richtext | src/Yesod/Form/Summernote.hs | mit | addStylesheet' :: (MonadWidget m, HandlerSite m ~ site)
=> (site -> Either (Route site) Text)
-> m ()
addStylesheet' f = do
y <- getYesod
addStylesheetEither $ f y | 201 | addStylesheet' :: (MonadWidget m, HandlerSite m ~ site)
=> (site -> Either (Route site) Text)
-> m ()
addStylesheet' f = do
y <- getYesod
addStylesheetEither $ f y | 201 | addStylesheet' f = do
y <- getYesod
addStylesheetEither $ f y | 69 | false | true | 0 | 11 | 66 | 78 | 37 | 41 | null | null |
bmsherman/haskell-vect | Data/Vect.hs | bsd-3-clause | foldr :: (a -> b -> b) -> b -> Vect n a -> b
foldr f z Nil = z | 62 | foldr :: (a -> b -> b) -> b -> Vect n a -> b
foldr f z Nil = z | 62 | foldr f z Nil = z | 17 | false | true | 0 | 9 | 20 | 52 | 24 | 28 | null | null |
Elastifile/git-sling | server/src/Sling.hs | gpl-2.0 | rejectProposal :: Options -> Git.Remote -> Proposal -> Text -> Maybe PrepushLogs -> Maybe (Text, ExitCode) -> EShell ()
rejectProposal options remote proposal reason prepushLogs err = do
let origBranchName = Proposal.toBranchName proposal
rejectedProposal = proposal { Proposal.proposalStatus = Proposal.Prop... | 1,588 | rejectProposal :: Options -> Git.Remote -> Proposal -> Text -> Maybe PrepushLogs -> Maybe (Text, ExitCode) -> EShell ()
rejectProposal options remote proposal reason prepushLogs err = do
let origBranchName = Proposal.toBranchName proposal
rejectedProposal = proposal { Proposal.proposalStatus = Proposal.Prop... | 1,588 | rejectProposal options remote proposal reason prepushLogs err = do
let origBranchName = Proposal.toBranchName proposal
rejectedProposal = proposal { Proposal.proposalStatus = Proposal.ProposalRejected }
rejectBranchName = Proposal.toBranchName rejectedProposal
suffix = case err of
... | 1,468 | false | true | 0 | 17 | 294 | 389 | 187 | 202 | null | null |
jekor/templatepg | Database/TemplatePG/SQL.hs | mit | -- |Like 'pgStringToType', but deal with possible @NULL@s. If the boolean
-- argument is 'False', that means that we know that the value is not nullable
-- and we can use 'fromJust' to keep the code simple. If it's 'True', then we
-- don't know if the value is nullable and must return a 'Maybe' value in case
-- it is.
... | 498 | pgStringToType' :: PGType
-> Bool -- ^ nullability indicator
-> Q Exp
pgStringToType' t False = [| ($(pgStringToType t)) . toString . fromJust |] | 178 | pgStringToType' t False = [| ($(pgStringToType t)) . toString . fromJust |] | 75 | true | true | 0 | 7 | 117 | 36 | 22 | 14 | null | null |
bkoropoff/Idris-dev | src/Idris/AbsSyntaxTree.hs | bsd-3-clause | getShowArgs (e@(PExp _ _ _ tm) : xs) = e : getShowArgs xs | 57 | getShowArgs (e@(PExp _ _ _ tm) : xs) = e : getShowArgs xs | 57 | getShowArgs (e@(PExp _ _ _ tm) : xs) = e : getShowArgs xs | 57 | false | false | 0 | 10 | 12 | 38 | 19 | 19 | null | null |
nevrenato/Hets_Fork | ExtModal/Keywords.hs | gpl-2.0 | nuS :: String
nuS = "nu" | 24 | nuS :: String
nuS = "nu" | 24 | nuS = "nu" | 10 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
markus1189/xmonad-contrib-710 | XMonad/Hooks/DebugEvents.hs | bsd-3-clause | mwmFuncs :: [String]
mwmFuncs = ["all except"
,"resize"
,"move"
,"minimize"
,"maximize"
,"close"
] | 171 | mwmFuncs :: [String]
mwmFuncs = ["all except"
,"resize"
,"move"
,"minimize"
,"maximize"
,"close"
] | 171 | mwmFuncs = ["all except"
,"resize"
,"move"
,"minimize"
,"maximize"
,"close"
] | 150 | false | true | 0 | 5 | 85 | 32 | 20 | 12 | null | null |
ssaavedra/liquidhaskell | benchmarks/esop2013-submission/Base.hs | bsd-3-clause | -- | /O(log n)/. Update the value at the minimal key.
--
-- > updateMinWithKey (\ k a -> Just ((show k) ++ ":" ++ a)) (fromList [(5,"a"), (3,"b")]) == fromList [(3,"3:b"), (5,"a")]
-- > updateMinWithKey (\ _ _ -> Nothing) (fromList [(5,"a"), (3,"b")]) == singleton 5 "a"
{-@ updateMinWithKey :: (k -... | 470 | updateMinWithKey :: (k -> a -> Maybe a) -> Map k a -> Map k a
updateMinWithKey _ Tip = Tip | 106 | updateMinWithKey _ Tip = Tip | 44 | true | true | 0 | 9 | 123 | 53 | 28 | 25 | null | null |
apyrgio/snf-ganeti | src/Ganeti/HTools/CLI.hs | bsd-2-clause | oIAllocSrc :: OptType
oIAllocSrc =
(Option "I" ["ialloc-src"]
(ReqArg (\ f opts -> Ok opts { optIAllocSrc = Just f }) "FILE")
"Specify an iallocator spec as the cluster data source",
OptComplFile) | 207 | oIAllocSrc :: OptType
oIAllocSrc =
(Option "I" ["ialloc-src"]
(ReqArg (\ f opts -> Ok opts { optIAllocSrc = Just f }) "FILE")
"Specify an iallocator spec as the cluster data source",
OptComplFile) | 207 | oIAllocSrc =
(Option "I" ["ialloc-src"]
(ReqArg (\ f opts -> Ok opts { optIAllocSrc = Just f }) "FILE")
"Specify an iallocator spec as the cluster data source",
OptComplFile) | 185 | false | true | 0 | 15 | 42 | 68 | 34 | 34 | null | null |
JoseD92/EasyGL | src/EasyGLUT.hs | bsd-3-clause | filterUp :: t -> t -> KeyState -> t
filterUp x _ Up = x | 62 | filterUp :: t -> t -> KeyState -> t
filterUp x _ Up = x | 61 | filterUp x _ Up = x | 25 | false | true | 0 | 9 | 21 | 36 | 16 | 20 | null | null |
shouya/thinking-dumps | sicp/chap2/2.56.hs | mit | mkP (I 0) _ = I 0 | 17 | mkP (I 0) _ = I 0 | 17 | mkP (I 0) _ = I 0 | 17 | false | false | 0 | 7 | 6 | 20 | 9 | 11 | null | null |
dan-t/cabal-bounds | lib/CabalBounds/Types.hs | bsd-3-clause | toList :: LibraryMap -> Libraries
toList libs =
map (\(name, version) -> (name, version ^. CL.versionBranchL)) $ HM.toList libs | 130 | toList :: LibraryMap -> Libraries
toList libs =
map (\(name, version) -> (name, version ^. CL.versionBranchL)) $ HM.toList libs | 130 | toList libs =
map (\(name, version) -> (name, version ^. CL.versionBranchL)) $ HM.toList libs | 96 | false | true | 0 | 11 | 21 | 56 | 30 | 26 | null | null |
ivan-m/jbi | lib/System/JBI/Commands.hs | mit | exec :: String -> Args -> Env -> WrappedTool Valid -> IO ExitCode
exec cmd args = runPrepared (\env cp -> commandExec env cp cmd args) | 134 | exec :: String -> Args -> Env -> WrappedTool Valid -> IO ExitCode
exec cmd args = runPrepared (\env cp -> commandExec env cp cmd args) | 134 | exec cmd args = runPrepared (\env cp -> commandExec env cp cmd args) | 68 | false | true | 0 | 10 | 25 | 64 | 30 | 34 | null | null |
abailly/acquire | chinese/src/Chinese/Game.hs | apache-2.0 | wrongAnswer :: Game -> Game
wrongAnswer g@Game{..} = g { playerState = failureAnswer playerState
, wordsList = tail wordsList
} | 182 | wrongAnswer :: Game -> Game
wrongAnswer g@Game{..} = g { playerState = failureAnswer playerState
, wordsList = tail wordsList
} | 182 | wrongAnswer g@Game{..} = g { playerState = failureAnswer playerState
, wordsList = tail wordsList
} | 153 | false | true | 0 | 8 | 74 | 47 | 25 | 22 | null | null |
fmapfmapfmap/amazonka | amazonka-glacier/gen/Network/AWS/Glacier/Types/Product.hs | mpl-2.0 | -- | The status code can be InProgress, Succeeded, or Failed, and indicates
-- the status of the job.
gjdStatusCode :: Lens' GlacierJobDescription (Maybe StatusCode)
gjdStatusCode = lens _gjdStatusCode (\ s a -> s{_gjdStatusCode = a}) | 234 | gjdStatusCode :: Lens' GlacierJobDescription (Maybe StatusCode)
gjdStatusCode = lens _gjdStatusCode (\ s a -> s{_gjdStatusCode = a}) | 132 | gjdStatusCode = lens _gjdStatusCode (\ s a -> s{_gjdStatusCode = a}) | 68 | true | true | 0 | 9 | 35 | 47 | 26 | 21 | null | null |
tchagnon/cs636-raytracer | a6/Math.hs | apache-2.0 | (Vec4f e0 e1 e2 e3) !. 1 = e1 | 29 | (Vec4f e0 e1 e2 e3) !. 1 = e1 | 29 | (Vec4f e0 e1 e2 e3) !. 1 = e1 | 29 | false | false | 0 | 7 | 8 | 24 | 11 | 13 | null | null |
bos/critbit | Data/CritBit/Set.hs | bsd-2-clause | -- | /O(k)/. The intersection of two sets. Elements of the
-- result come from the first set.
intersection :: (CritBitKey a) => Set a -> Set a -> Set a
intersection = wrapSS Set T.intersection | 192 | intersection :: (CritBitKey a) => Set a -> Set a -> Set a
intersection = wrapSS Set T.intersection | 98 | intersection = wrapSS Set T.intersection | 40 | true | true | 0 | 8 | 35 | 46 | 23 | 23 | null | null |
phadej/boolean-normal-forms | tests/FreeBooleanTests.hs | mit | tests :: TestTree
tests = testGroup "Free boolean"
[ monotoneLaws eq
, nonMonotoneLaws eq
, negableLaws eq
, simplifyLaws (undefined :: FreeBoolean (Either Bool Bool))
, booleanModelLaws (undefined :: FreeBoolean (Either Bool Bool))
] | 246 | tests :: TestTree
tests = testGroup "Free boolean"
[ monotoneLaws eq
, nonMonotoneLaws eq
, negableLaws eq
, simplifyLaws (undefined :: FreeBoolean (Either Bool Bool))
, booleanModelLaws (undefined :: FreeBoolean (Either Bool Bool))
] | 246 | tests = testGroup "Free boolean"
[ monotoneLaws eq
, nonMonotoneLaws eq
, negableLaws eq
, simplifyLaws (undefined :: FreeBoolean (Either Bool Bool))
, booleanModelLaws (undefined :: FreeBoolean (Either Bool Bool))
] | 228 | false | true | 0 | 10 | 45 | 81 | 41 | 40 | null | null |
yesodweb/persistent | persistent-mysql/Database/Persist/MySQL.hs | mit | mockMigrate :: MySQL.ConnectInfo
-> [EntityDef]
-> (Text -> IO Statement)
-> EntityDef
-> IO (Either [Text] [(Bool, Text)])
mockMigrate _connectInfo allDefs _getter val = do
let name = getEntityDBName val
let (newcols, udefs, fdefs) = mysqlMkColumns allDefs val
let udspai... | 2,184 | mockMigrate :: MySQL.ConnectInfo
-> [EntityDef]
-> (Text -> IO Statement)
-> EntityDef
-> IO (Either [Text] [(Bool, Text)])
mockMigrate _connectInfo allDefs _getter val = do
let name = getEntityDBName val
let (newcols, udefs, fdefs) = mysqlMkColumns allDefs val
let udspai... | 2,184 | mockMigrate _connectInfo allDefs _getter val = do
let name = getEntityDBName val
let (newcols, udefs, fdefs) = mysqlMkColumns allDefs val
let udspair = map udToPair udefs
case () of
-- Nothing found, create everything
() -> do
let uniques = flip concatMap udspair $ \(uname, ucols) ->... | 2,024 | false | true | 0 | 28 | 938 | 512 | 263 | 249 | null | null |
rgaiacs/pandoc | src/Text/Pandoc/Writers/Docx.hs | gpl-2.0 | renumIdMap :: Int -> [Element] -> M.Map String String
renumIdMap _ [] = M.empty | 79 | renumIdMap :: Int -> [Element] -> M.Map String String
renumIdMap _ [] = M.empty | 79 | renumIdMap _ [] = M.empty | 25 | false | true | 0 | 8 | 13 | 38 | 19 | 19 | null | null |
fros1y/patent-api | src/Data/Patent/Providers/EPO/Parsers/XMLDocDB.hs | agpl-3.0 | parseXMLtoCitation :: XML.Cursor -> Patent.Citation
parseXMLtoCitation cursor =
Patent.Citation
{ Patent._citationCountry = cc
, Patent._citationSerial = serialNo
, Patent._citationKind = Just kindCode
, Patent._citationPubDate = Nothing
, Patent._citationSpecialCase = Nothing
}
where
cc = headDef "... | 538 | parseXMLtoCitation :: XML.Cursor -> Patent.Citation
parseXMLtoCitation cursor =
Patent.Citation
{ Patent._citationCountry = cc
, Patent._citationSerial = serialNo
, Patent._citationKind = Just kindCode
, Patent._citationPubDate = Nothing
, Patent._citationSpecialCase = Nothing
}
where
cc = headDef "... | 538 | parseXMLtoCitation cursor =
Patent.Citation
{ Patent._citationCountry = cc
, Patent._citationSerial = serialNo
, Patent._citationKind = Just kindCode
, Patent._citationPubDate = Nothing
, Patent._citationSpecialCase = Nothing
}
where
cc = headDef "" $ cursor $/ XML.laxElement "country" &// XML.conte... | 486 | false | true | 0 | 8 | 98 | 157 | 80 | 77 | null | null |
ezyang/ghc | libraries/base/GHC/ByteOrder.hs | bsd-3-clause | targetByteOrder = BigEndian | 27 | targetByteOrder = BigEndian | 27 | targetByteOrder = BigEndian | 27 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
BartAdv/Idris-dev | src/Idris/Core/ProofState.hs | bsd-3-clause | processTactic EndUnify ps
= let (h, ns_in) = unified ps
ns = dropGiven (dontunify ps) ns_in (holes ps)
ns' = map (\ (n, t) -> (n, updateSolvedTerm ns t)) ns
(ns'', probs') = updateProblems ps ns' (problems ps)
tm' = updateSolved ns'' (pterm ps) in
traceWhen (unif... | 728 | processTactic EndUnify ps
= let (h, ns_in) = unified ps
ns = dropGiven (dontunify ps) ns_in (holes ps)
ns' = map (\ (n, t) -> (n, updateSolvedTerm ns t)) ns
(ns'', probs') = updateProblems ps ns' (problems ps)
tm' = updateSolved ns'' (pterm ps) in
traceWhen (unif... | 728 | processTactic EndUnify ps
= let (h, ns_in) = unified ps
ns = dropGiven (dontunify ps) ns_in (holes ps)
ns' = map (\ (n, t) -> (n, updateSolvedTerm ns t)) ns
(ns'', probs') = updateProblems ps ns' (problems ps)
tm' = updateSolved ns'' (pterm ps) in
traceWhen (unif... | 728 | false | false | 0 | 14 | 300 | 255 | 134 | 121 | null | null |
mathhun/stack | src/Stack/Build/Cache.hs | bsd-3-clause | writePrecompiledCache :: (MonadThrow m, MonadReader env m, HasEnvConfig env, MonadIO m)
=> BaseConfigOpts
-> PackageIdentifier
-> ConfigureOpts
-> Set GhcPkgId -- ^ dependencies
-> Installed -- ^ library
... | 1,218 | writePrecompiledCache :: (MonadThrow m, MonadReader env m, HasEnvConfig env, MonadIO m)
=> BaseConfigOpts
-> PackageIdentifier
-> ConfigureOpts
-> Set GhcPkgId -- ^ dependencies
-> Installed -- ^ library
... | 1,218 | writePrecompiledCache baseConfigOpts pkgident copts depIDs mghcPkgId exes = do
file <- precompiledCacheFile pkgident copts depIDs
createTree $ parent file
mlibpath <-
case mghcPkgId of
Executable _ -> return Nothing
Library _ ipid -> liftM Just $ do
ipid' <- p... | 823 | false | true | 0 | 17 | 421 | 285 | 136 | 149 | null | null |
niteria/haddock | haddock-api/src/Haddock/Interface/Rename.hs | bsd-2-clause | renameTyClD :: TyClDecl Name -> RnM (TyClDecl DocName)
renameTyClD d = case d of
-- TyFamily flav lname ltyvars kind tckind -> do
FamDecl { tcdFam = decl } -> do
decl' <- renameFamilyDecl decl
return (FamDecl { tcdFam = decl' })
SynDecl { tcdLName = lname, tcdTyVars = tyvars, tcdRhs = rhs, tcdFVs = _fvs }... | 1,944 | renameTyClD :: TyClDecl Name -> RnM (TyClDecl DocName)
renameTyClD d = case d of
-- TyFamily flav lname ltyvars kind tckind -> do
FamDecl { tcdFam = decl } -> do
decl' <- renameFamilyDecl decl
return (FamDecl { tcdFam = decl' })
SynDecl { tcdLName = lname, tcdTyVars = tyvars, tcdRhs = rhs, tcdFVs = _fvs }... | 1,944 | renameTyClD d = case d of
-- TyFamily flav lname ltyvars kind tckind -> do
FamDecl { tcdFam = decl } -> do
decl' <- renameFamilyDecl decl
return (FamDecl { tcdFam = decl' })
SynDecl { tcdLName = lname, tcdTyVars = tyvars, tcdRhs = rhs, tcdFVs = _fvs } -> do
lname' <- renameL lname
tyvars' <- ... | 1,889 | false | true | 5 | 14 | 490 | 616 | 321 | 295 | null | null |
rvl/hsoz | src/Network/Hawk/Internal.hs | bsd-3-clause | hawk1String :: HawkType -> HeaderArtifacts -> ByteString
-- corresponds to generateNormalizedString in crypto.js
hawk1String t HeaderArtifacts{..} = newlines $
[ hawk1Header t
, S8.pack . show . round $ haTimestamp
, haNonce
, S8.map toUpper haMethod
, haResource
, S8.map toLower haHost
, maybe "" (S8.pac... | 522 | hawk1String :: HawkType -> HeaderArtifacts -> ByteString
hawk1String t HeaderArtifacts{..} = newlines $
[ hawk1Header t
, S8.pack . show . round $ haTimestamp
, haNonce
, S8.map toUpper haMethod
, haResource
, S8.map toLower haHost
, maybe "" (S8.pack . show) haPort
, fromMaybe "" haHash
, maybe "" es... | 466 | hawk1String t HeaderArtifacts{..} = newlines $
[ hawk1Header t
, S8.pack . show . round $ haTimestamp
, haNonce
, S8.map toUpper haMethod
, haResource
, S8.map toLower haHost
, maybe "" (S8.pack . show) haPort
, fromMaybe "" haHash
, maybe "" escapeExt haExt
] ++ map encodeUtf8 (oz haApp haDlg)
wh... | 409 | true | true | 2 | 11 | 118 | 200 | 103 | 97 | null | null |
input-output-hk/pos-haskell-prototype | script-runner/common/PocMode.hs | mit | nodeHandles :: PocMode (TVar (Map (Types.NodeType,Integer) NodeHandle))
nodeHandles = view acNodeHandles | 104 | nodeHandles :: PocMode (TVar (Map (Types.NodeType,Integer) NodeHandle))
nodeHandles = view acNodeHandles | 104 | nodeHandles = view acNodeHandles | 32 | false | true | 0 | 11 | 10 | 39 | 20 | 19 | null | null |
wherkendell/diagrams-contrib | drv/Diagrams/Swimunit/DotmatrixModuleNameDriver.hs | bsd-3-clause | {-|
MAIN method. Call 'main' to produce output.
-}
main :: IO ()
main = mainWith (
let mname = (
dotmatrix defdot dotfont_B6x9 "SWIMUNIT.DOTMATRIX" # fc aqua # lc dodgerblue
<>
notdotmatrix defdot dotfont_B6x9 "SWIMUNIT.DOTMATRIX" # fc black # l... | 507 | main :: IO ()
main = mainWith (
let mname = (
dotmatrix defdot dotfont_B6x9 "SWIMUNIT.DOTMATRIX" # fc aqua # lc dodgerblue
<>
notdotmatrix defdot dotfont_B6x9 "SWIMUNIT.DOTMATRIX" # fc black # lc darkslategray
) # centerXY
... | 453 | main = mainWith (
let mname = (
dotmatrix defdot dotfont_B6x9 "SWIMUNIT.DOTMATRIX" # fc aqua # lc dodgerblue
<>
notdotmatrix defdot dotfont_B6x9 "SWIMUNIT.DOTMATRIX" # fc black # lc darkslategray
) # centerXY
in mname
... | 439 | true | true | 0 | 18 | 219 | 101 | 48 | 53 | null | null |
kim/amazonka | amazonka-redshift/gen/Network/AWS/Redshift/EnableLogging.hs | mpl-2.0 | -- | The name of an existing S3 bucket where the log files are to be stored.
--
-- Constraints:
--
-- Must be in the same region as the cluster The cluster must have read bucket
-- and put object permissions
elBucketName :: Lens' EnableLogging Text
elBucketName = lens _elBucketName (\s a -> s { _elBucketName = a }) | 316 | elBucketName :: Lens' EnableLogging Text
elBucketName = lens _elBucketName (\s a -> s { _elBucketName = a }) | 108 | elBucketName = lens _elBucketName (\s a -> s { _elBucketName = a }) | 67 | true | true | 0 | 9 | 59 | 45 | 27 | 18 | null | null |
clarissalittler/cs311 | DFALang.hs | mit | reservedOp = T.reservedOp lang | 30 | reservedOp = T.reservedOp lang | 30 | reservedOp = T.reservedOp lang | 30 | false | false | 0 | 6 | 3 | 11 | 5 | 6 | null | null |
urbanslug/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | rationalToDoubleName = varQual gHC_FLOAT (fsLit "rationalToDouble") rationalToDoubleIdKey | 89 | rationalToDoubleName = varQual gHC_FLOAT (fsLit "rationalToDouble") rationalToDoubleIdKey | 89 | rationalToDoubleName = varQual gHC_FLOAT (fsLit "rationalToDouble") rationalToDoubleIdKey | 89 | false | false | 0 | 7 | 6 | 19 | 9 | 10 | null | null |
daewon/til | haskell/haskell_by_example/values.hs | mpl-2.0 | main = do
putStrLn $ "haskell" ++ "lang"
putStrLn $ "1 + 1 = " ++ show (1 + 1)
putStrLn $ "7.0/3.0 = " ++ show (7.0 / 3.0)
print $ True && False
print $ True || False
print $ not True | 196 | main = do
putStrLn $ "haskell" ++ "lang"
putStrLn $ "1 + 1 = " ++ show (1 + 1)
putStrLn $ "7.0/3.0 = " ++ show (7.0 / 3.0)
print $ True && False
print $ True || False
print $ not True | 196 | main = do
putStrLn $ "haskell" ++ "lang"
putStrLn $ "1 + 1 = " ++ show (1 + 1)
putStrLn $ "7.0/3.0 = " ++ show (7.0 / 3.0)
print $ True && False
print $ True || False
print $ not True | 196 | false | false | 1 | 11 | 56 | 95 | 42 | 53 | null | null |
Happy0/lichess_csv | src/Web/Lichess/Conduit.hs | gpl-2.0 | tournamentStandings :: String -> Source IO Value
tournamentStandings tournamentId =
L.unfoldM (getTournamentStandingsPage tournamentId) 1 =$= L.concat | 157 | tournamentStandings :: String -> Source IO Value
tournamentStandings tournamentId =
L.unfoldM (getTournamentStandingsPage tournamentId) 1 =$= L.concat | 155 | tournamentStandings tournamentId =
L.unfoldM (getTournamentStandingsPage tournamentId) 1 =$= L.concat | 106 | false | true | 0 | 8 | 22 | 42 | 20 | 22 | null | null |
nevrenato/Hets_Fork | Common/Token.hs | gpl-2.0 | {- | any ('topMix1', 'topMix2', 'topMix3') mixfix components
that may follow a place ('placeT') at the top level -}
afterPlace :: ([String], [String]) -> GenParser Char st [Token]
afterPlace l = topMix1 l <|> topMix2 l <|> topMix3 l | 235 | afterPlace :: ([String], [String]) -> GenParser Char st [Token]
afterPlace l = topMix1 l <|> topMix2 l <|> topMix3 l | 116 | afterPlace l = topMix1 l <|> topMix2 l <|> topMix3 l | 52 | true | true | 0 | 8 | 41 | 62 | 31 | 31 | null | null |
chetant/LibClang | src/Clang/Cursor.hs | bsd-3-clause | getSpelling :: ClangBase m => FFI.Cursor s' -> ClangT s m (FFI.ClangString s)
getSpelling = FFI.getCursorSpelling | 113 | getSpelling :: ClangBase m => FFI.Cursor s' -> ClangT s m (FFI.ClangString s)
getSpelling = FFI.getCursorSpelling | 113 | getSpelling = FFI.getCursorSpelling | 35 | false | true | 0 | 11 | 15 | 50 | 22 | 28 | null | null |
oldmanmike/ghc | compiler/utils/Binary.hs | bsd-3-clause | tellBin :: BinHandle -> IO (Bin a)
tellBin (BinMem _ r _ _) = do ix <- readFastMutInt r; return (BinPtr ix) | 107 | tellBin :: BinHandle -> IO (Bin a)
tellBin (BinMem _ r _ _) = do ix <- readFastMutInt r; return (BinPtr ix) | 107 | tellBin (BinMem _ r _ _) = do ix <- readFastMutInt r; return (BinPtr ix) | 72 | false | true | 0 | 9 | 21 | 66 | 30 | 36 | null | null |
mgrebenets/hackerrank | alg/warmup/sherlock-and-gcd.hs | mit | subset (n, nums) = findGcd nums | 31 | subset (n, nums) = findGcd nums | 31 | subset (n, nums) = findGcd nums | 31 | false | false | 0 | 6 | 5 | 18 | 9 | 9 | null | null |
nfjinjing/yuuko | src/Text/HTML/TagSoup/Specification.hs | bsd-3-clause | charRefNum2 resume o hex S{..} = pos $ case hd of
_ | hexChar hex hd -> (if hex then EntityHex else EntityNum) & hd & charRefNum3 resume hex tl
_ -> errSeen "&" & '&' & resume o | 185 | charRefNum2 resume o hex S{..} = pos $ case hd of
_ | hexChar hex hd -> (if hex then EntityHex else EntityNum) & hd & charRefNum3 resume hex tl
_ -> errSeen "&" & '&' & resume o | 185 | charRefNum2 resume o hex S{..} = pos $ case hd of
_ | hexChar hex hd -> (if hex then EntityHex else EntityNum) & hd & charRefNum3 resume hex tl
_ -> errSeen "&" & '&' & resume o | 185 | false | false | 2 | 8 | 46 | 92 | 44 | 48 | null | null |
imalsogreg/reflex-dom | src/Reflex/Dom/Widget/Lazy.hs | bsd-3-clause | virtualListWithSelection :: forall t m k v. (MonadWidget t m, Ord k)
=> Int -- ^ The height of the visible region in pixels
-> Int -- ^ The height of each row in pixels
-> Dynamic t Int -- ^ The total number of items
-> Int -- ^ The index of the row to scroll to on initialization
-> Event t Int -- ^ An 'Event... | 3,368 | virtualListWithSelection :: forall t m k v. (MonadWidget t m, Ord k)
=> Int -- ^ The height of the visible region in pixels
-> Int -- ^ The height of each row in pixels
-> Dynamic t Int -- ^ The total number of items
-> Int -- ^ The index of the row to scroll to on initialization
-> Event t Int -- ^ An 'Event... | 3,198 | virtualListWithSelection heightPx rowPx maxIndex i0 setI listTag listAttrs rowTag rowAttrs itemBuilder items = do
totalHeightStyle <- mapDyn (toHeightStyle . (*) rowPx) maxIndex
rec (container, itemList) <- elAttr "div" outerStyle $ elAttr' "div" containerStyle $ do
currentTop <- mapDyn (listWrapperStyle . ... | 2,437 | true | true | 6 | 32 | 892 | 974 | 486 | 488 | null | null |
wz1000/haskell-lsp | lsp/example/Reactor.hs | mit | lspHandlers :: TChan ReactorInput -> Handlers (LspM Config)
lspHandlers rin = mapHandlers goReq goNot handle
where
goReq :: forall (a :: J.Method J.FromClient J.Request). Handler (LspM Config) a -> Handler (LspM Config) a
goReq f = \msg k -> do
env <- getLspEnv
liftIO $ atomically $ writeTChan rin... | 684 | lspHandlers :: TChan ReactorInput -> Handlers (LspM Config)
lspHandlers rin = mapHandlers goReq goNot handle
where
goReq :: forall (a :: J.Method J.FromClient J.Request). Handler (LspM Config) a -> Handler (LspM Config) a
goReq f = \msg k -> do
env <- getLspEnv
liftIO $ atomically $ writeTChan rin... | 684 | lspHandlers rin = mapHandlers goReq goNot handle
where
goReq :: forall (a :: J.Method J.FromClient J.Request). Handler (LspM Config) a -> Handler (LspM Config) a
goReq f = \msg k -> do
env <- getLspEnv
liftIO $ atomically $ writeTChan rin $ ReactorAction (runLspT env $ f msg k)
goNot :: foral... | 624 | false | true | 13 | 13 | 151 | 254 | 125 | 129 | null | null |
frantisekfarka/ghc-dsi | compiler/main/DynamicLoading.hs | bsd-3-clause | getHValueSafely :: HscEnv -> Name -> Type -> IO (Maybe HValue)
getHValueSafely hsc_env val_name expected_type = do
forceLoadNameModuleInterface hsc_env (ptext (sLit "contains a name used in an invocation of getHValueSafely")) val_name
-- Now look up the names for the value and type constructor in the type envir... | 1,661 | getHValueSafely :: HscEnv -> Name -> Type -> IO (Maybe HValue)
getHValueSafely hsc_env val_name expected_type = do
forceLoadNameModuleInterface hsc_env (ptext (sLit "contains a name used in an invocation of getHValueSafely")) val_name
-- Now look up the names for the value and type constructor in the type envir... | 1,661 | getHValueSafely hsc_env val_name expected_type = do
forceLoadNameModuleInterface hsc_env (ptext (sLit "contains a name used in an invocation of getHValueSafely")) val_name
-- Now look up the names for the value and type constructor in the type environment
mb_val_thing <- lookupTypeHscEnv hsc_env val_name
... | 1,598 | false | true | 0 | 21 | 494 | 246 | 117 | 129 | null | null |
talw/crisp-compiler | src/Emit.hs | bsd-3-clause | codegenExpr (SetExp symName expr) = do
mVarPtr <- getvar symName
let ptr = fromMaybe (extern $ AST.Name symName) mVarPtr
store ptr =<< codegenExpr expr
return $ constUint nilValue | 187 | codegenExpr (SetExp symName expr) = do
mVarPtr <- getvar symName
let ptr = fromMaybe (extern $ AST.Name symName) mVarPtr
store ptr =<< codegenExpr expr
return $ constUint nilValue | 187 | codegenExpr (SetExp symName expr) = do
mVarPtr <- getvar symName
let ptr = fromMaybe (extern $ AST.Name symName) mVarPtr
store ptr =<< codegenExpr expr
return $ constUint nilValue | 187 | false | false | 0 | 14 | 35 | 77 | 33 | 44 | null | null |
kylcarte/wangtiles | src/Tile.hs | bsd-3-clause | ppFilledTileMap :: (HandleIO n, TileLogic m t, CoordType c)
=> TileSet t -> TileMap c -> ErrorT n String
ppFilledTileMap ts tm = do
g <- T.mapM (tsLookup ts) $ tileMap tm
let pg = fmap ppTile g
return $ ppSparseStringRows $ gridList pg | 243 | ppFilledTileMap :: (HandleIO n, TileLogic m t, CoordType c)
=> TileSet t -> TileMap c -> ErrorT n String
ppFilledTileMap ts tm = do
g <- T.mapM (tsLookup ts) $ tileMap tm
let pg = fmap ppTile g
return $ ppSparseStringRows $ gridList pg | 243 | ppFilledTileMap ts tm = do
g <- T.mapM (tsLookup ts) $ tileMap tm
let pg = fmap ppTile g
return $ ppSparseStringRows $ gridList pg | 136 | false | true | 0 | 11 | 51 | 111 | 51 | 60 | null | null |
nevrenato/HetsAlloy | Fpl/As.der.hs | gpl-2.0 | constBool :: AParser st FplTerm
constBool = fmap Mixfix_token (asKey trueS <|> asKey falseS) | 92 | constBool :: AParser st FplTerm
constBool = fmap Mixfix_token (asKey trueS <|> asKey falseS) | 92 | constBool = fmap Mixfix_token (asKey trueS <|> asKey falseS) | 60 | false | true | 0 | 8 | 13 | 34 | 16 | 18 | null | null |
AidanDelaney/Mira | Setup.hs | bsd-3-clause | main = defaultMainWithHooks (simpleUserHooks {runTests = runzeTests}) | 69 | main = defaultMainWithHooks (simpleUserHooks {runTests = runzeTests}) | 69 | main = defaultMainWithHooks (simpleUserHooks {runTests = runzeTests}) | 69 | false | false | 1 | 8 | 6 | 23 | 11 | 12 | null | null |
mrakgr/futhark | src/Futhark/Representation/SOACS/SOAC.hs | bsd-3-clause | getStreamOrder :: StreamForm lore -> StreamOrd
getStreamOrder (MapLike o ) = o | 81 | getStreamOrder :: StreamForm lore -> StreamOrd
getStreamOrder (MapLike o ) = o | 81 | getStreamOrder (MapLike o ) = o | 34 | false | true | 0 | 6 | 14 | 31 | 14 | 17 | null | null |
tjhunter/karps | haskell/src/Spark/Core/Internal/ColumnFunctions.hs | apache-2.0 | -- Performs the data projection. This is unsafe, it does not check that the
-- field path is valid in this case, nor that the final type is valid either.
unsafeProjectCol :: ColumnData ref a -> FieldPath -> DataType -> ColumnData ref b
unsafeProjectCol cd (FieldPath p) dtTo =
-- If the column is already a projection,... | 687 | unsafeProjectCol :: ColumnData ref a -> FieldPath -> DataType -> ColumnData ref b
unsafeProjectCol cd (FieldPath p) dtTo =
-- If the column is already a projection, flatten it.
case colOp cd of
-- No previous parent on an extraction -> we can safely append to that one.
GenColExtraction (FieldPath p') ->
... | 533 | unsafeProjectCol cd (FieldPath p) dtTo =
-- If the column is already a projection, flatten it.
case colOp cd of
-- No previous parent on an extraction -> we can safely append to that one.
GenColExtraction (FieldPath p') ->
cd { _cOp = GenColExtraction . FieldPath $ (p V.++ p'),
_cType = dtT... | 451 | true | true | 6 | 10 | 170 | 134 | 71 | 63 | null | null |
vikraman/ghc | compiler/coreSyn/CoreUtils.hs | bsd-3-clause | -- | Tests whether we have to use a @case@ rather than @let@ binding for this expression
-- as per the invariants of 'CoreExpr': see "CoreSyn#let_app_invariant"
needsCaseBinding :: Type -> CoreExpr -> Bool
needsCaseBinding ty rhs = isUnliftedType ty && not (exprOkForSpeculation rhs) | 283 | needsCaseBinding :: Type -> CoreExpr -> Bool
needsCaseBinding ty rhs = isUnliftedType ty && not (exprOkForSpeculation rhs) | 122 | needsCaseBinding ty rhs = isUnliftedType ty && not (exprOkForSpeculation rhs) | 77 | true | true | 0 | 8 | 42 | 42 | 21 | 21 | null | null |
miguelpagano/equ | Equ/PreExpr/Zipper.hs | gpl-3.0 | freplicate :: (Focus -> Maybe Focus) -> Int -> (Focus -> Maybe Focus)
freplicate go 0 = go | 90 | freplicate :: (Focus -> Maybe Focus) -> Int -> (Focus -> Maybe Focus)
freplicate go 0 = go | 90 | freplicate go 0 = go | 20 | false | true | 0 | 9 | 17 | 44 | 22 | 22 | null | null |
Raveline/FQuoter | testsuite/FQuoter/Parser/ParserSpec.hs | gpl-3.0 | insertMultiauthorSource = insertS' sourceMultiauthor | 52 | insertMultiauthorSource = insertS' sourceMultiauthor | 52 | insertMultiauthorSource = insertS' sourceMultiauthor | 52 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
msakai/ptq | src/Parser.hs | lgpl-2.1 | fvs (F8 x y) = IS.union (fvs x) (fvs y) | 42 | fvs (F8 x y) = IS.union (fvs x) (fvs y) | 42 | fvs (F8 x y) = IS.union (fvs x) (fvs y) | 42 | false | false | 0 | 7 | 12 | 37 | 17 | 20 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.