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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
jwvg0425/HaskellScratchPad | src/testFunctions.hs | mit | uppercase' :: Char -> Char
uppercase' ch = changeFromList ch alphabetPair
where alphabetPair = zip ['a'..'z'] ['A'..'Z'] | 123 | uppercase' :: Char -> Char
uppercase' ch = changeFromList ch alphabetPair
where alphabetPair = zip ['a'..'z'] ['A'..'Z'] | 123 | uppercase' ch = changeFromList ch alphabetPair
where alphabetPair = zip ['a'..'z'] ['A'..'Z'] | 96 | false | true | 0 | 8 | 19 | 45 | 23 | 22 | null | null |
mwahab1/pandoc | src/Text/Pandoc/Writers/LaTeX.hs | gpl-2.0 | toLabel :: String -> State WriterState String
toLabel z = go `fmap` stringToLaTeX URLString z
where go [] = ""
go (x:xs)
| (isLetter x || isDigit x) && isAscii x = x:go xs
| elem x ("-+=:;." :: String) = x:go xs
| otherwise = "ux" ++ printf "%x" (ord x) ++ go xs
-- | Puts contents in... | 337 | toLabel :: String -> State WriterState String
toLabel z = go `fmap` stringToLaTeX URLString z
where go [] = ""
go (x:xs)
| (isLetter x || isDigit x) && isAscii x = x:go xs
| elem x ("-+=:;." :: String) = x:go xs
| otherwise = "ux" ++ printf "%x" (ord x) ++ go xs
-- | Puts contents in... | 337 | toLabel z = go `fmap` stringToLaTeX URLString z
where go [] = ""
go (x:xs)
| (isLetter x || isDigit x) && isAscii x = x:go xs
| elem x ("-+=:;." :: String) = x:go xs
| otherwise = "ux" ++ printf "%x" (ord x) ++ go xs
-- | Puts contents into LaTeX command. | 291 | false | true | 5 | 12 | 97 | 151 | 73 | 78 | null | null |
sdiehl/ghc | hadrian/src/Rules/Compile.hs | bsd-3-clause | compileHsObjectAndHi
:: [(Resource, Int)] -> FilePath -> Action ()
compileHsObjectAndHi rs objpath = do
root <- buildRoot
b@(BuildPath _root stage _path _o)
<- parsePath (parseBuildObject root) "<object file path parser>" objpath
let ctx = objectContext b
way = C.way ctx
ctxPath <- contextPath ctx... | 970 | compileHsObjectAndHi
:: [(Resource, Int)] -> FilePath -> Action ()
compileHsObjectAndHi rs objpath = do
root <- buildRoot
b@(BuildPath _root stage _path _o)
<- parsePath (parseBuildObject root) "<object file path parser>" objpath
let ctx = objectContext b
way = C.way ctx
ctxPath <- contextPath ctx... | 970 | compileHsObjectAndHi rs objpath = do
root <- buildRoot
b@(BuildPath _root stage _path _o)
<- parsePath (parseBuildObject root) "<object file path parser>" objpath
let ctx = objectContext b
way = C.way ctx
ctxPath <- contextPath ctx
(src, deps) <- lookupDependencies (ctxPath -/- ".dependencies") objp... | 899 | false | true | 0 | 12 | 196 | 218 | 107 | 111 | null | null |
brendanhay/gogol | gogol-analytics/gen/Network/Google/Resource/Analytics/Management/WebPropertyAdWordsLinks/Delete.hs | mpl-2.0 | -- | Web property Google Ads link ID.
mwpawldWebPropertyAdWordsLinkId :: Lens' ManagementWebPropertyAdWordsLinksDelete Text
mwpawldWebPropertyAdWordsLinkId
= lens _mwpawldWebPropertyAdWordsLinkId
(\ s a -> s{_mwpawldWebPropertyAdWordsLinkId = a}) | 254 | mwpawldWebPropertyAdWordsLinkId :: Lens' ManagementWebPropertyAdWordsLinksDelete Text
mwpawldWebPropertyAdWordsLinkId
= lens _mwpawldWebPropertyAdWordsLinkId
(\ s a -> s{_mwpawldWebPropertyAdWordsLinkId = a}) | 216 | mwpawldWebPropertyAdWordsLinkId
= lens _mwpawldWebPropertyAdWordsLinkId
(\ s a -> s{_mwpawldWebPropertyAdWordsLinkId = a}) | 130 | true | true | 0 | 9 | 31 | 42 | 22 | 20 | null | null |
adept/hledger | hledger/Hledger/Cli/Commands/Prices.hs | gpl-3.0 | amountPriceDirectiveFromCost :: Day -> Amount -> Maybe PriceDirective
amountPriceDirectiveFromCost d a =
case aprice a of
Just (UnitPrice pa) -> Just
PriceDirective { pddate = d, pdcommodity = acommodity a, pdamount = pa }
Just (TotalPrice pa) | aquantity a /= 0 -> Just
Price... | 619 | amountPriceDirectiveFromCost :: Day -> Amount -> Maybe PriceDirective
amountPriceDirectiveFromCost d a =
case aprice a of
Just (UnitPrice pa) -> Just
PriceDirective { pddate = d, pdcommodity = acommodity a, pdamount = pa }
Just (TotalPrice pa) | aquantity a /= 0 -> Just
Price... | 619 | amountPriceDirectiveFromCost d a =
case aprice a of
Just (UnitPrice pa) -> Just
PriceDirective { pddate = d, pdcommodity = acommodity a, pdamount = pa }
Just (TotalPrice pa) | aquantity a /= 0 -> Just
PriceDirective { pddate = d, pdcommodity = acommodity a, pdamount = abs (aq... | 549 | false | true | 0 | 15 | 147 | 158 | 80 | 78 | null | null |
jcberentsen/causality | tests/Main.hs | bsd-3-clause | all_tests =
testGroup "All"
[ causal_model_test_group
, population_test_group
, monohybrid_test_group
, dihybrid_test_group
, chained_model_test_group
, join_model_test_group
, monty_hall_test_group
] | 268 | all_tests =
testGroup "All"
[ causal_model_test_group
, population_test_group
, monohybrid_test_group
, dihybrid_test_group
, chained_model_test_group
, join_model_test_group
, monty_hall_test_group
] | 268 | all_tests =
testGroup "All"
[ causal_model_test_group
, population_test_group
, monohybrid_test_group
, dihybrid_test_group
, chained_model_test_group
, join_model_test_group
, monty_hall_test_group
] | 268 | false | false | 0 | 5 | 86 | 33 | 19 | 14 | null | null |
rad1al/hutton_exercises | ch11.hs | gpl-2.0 | tictactoe :: IO ()
tictactoe = run empty O | 42 | tictactoe :: IO ()
tictactoe = run empty O | 42 | tictactoe = run empty O | 23 | false | true | 0 | 7 | 8 | 28 | 11 | 17 | null | null |
zjhmale/HMF | src/State.hs | bsd-3-clause | readState :: IORef a -> a
readState = unsafePerformIO . readIORef | 65 | readState :: IORef a -> a
readState = unsafePerformIO . readIORef | 65 | readState = unsafePerformIO . readIORef | 39 | false | true | 0 | 6 | 10 | 22 | 11 | 11 | null | null |
bj4rtmar/sdl2 | src/SDL/Raw/Event.hs | bsd-3-clause | numJoysticks :: MonadIO m => m CInt
numJoysticks = liftIO numJoysticks' | 71 | numJoysticks :: MonadIO m => m CInt
numJoysticks = liftIO numJoysticks' | 71 | numJoysticks = liftIO numJoysticks' | 35 | false | true | 0 | 6 | 10 | 24 | 11 | 13 | null | null |
RichardBarrell/snippets | euler/Euler12.hs | isc | -- ghc --make Euler12 -O2 -main-is Euler12.euler12
euler12 = putStrLn . show . head . dropWhile ((<500) . snd) . map (augSnd countDivisors) $ triangles | 151 | euler12 = putStrLn . show . head . dropWhile ((<500) . snd) . map (augSnd countDivisors) $ triangles | 100 | euler12 = putStrLn . show . head . dropWhile ((<500) . snd) . map (augSnd countDivisors) $ triangles | 100 | true | false | 0 | 11 | 24 | 50 | 26 | 24 | null | null |
olorin/amazonka | amazonka-iam/gen/Network/AWS/IAM/GetAccountAuthorizationDetails.hs | mpl-2.0 | -- | A list containing information about IAM roles.
gaadrsRoleDetailList :: Lens' GetAccountAuthorizationDetailsResponse [RoleDetail]
gaadrsRoleDetailList = lens _gaadrsRoleDetailList (\ s a -> s{_gaadrsRoleDetailList = a}) . _Default . _Coerce | 244 | gaadrsRoleDetailList :: Lens' GetAccountAuthorizationDetailsResponse [RoleDetail]
gaadrsRoleDetailList = lens _gaadrsRoleDetailList (\ s a -> s{_gaadrsRoleDetailList = a}) . _Default . _Coerce | 192 | gaadrsRoleDetailList = lens _gaadrsRoleDetailList (\ s a -> s{_gaadrsRoleDetailList = a}) . _Default . _Coerce | 110 | true | true | 1 | 11 | 28 | 55 | 28 | 27 | null | null |
genos/online_problems | advent_of_code_2019/day06/src/Main.hs | mit | readGraph :: Text -> AdjacencyMap Text
readGraph = overlays . fmap readEdge . T.lines
where
readEdge = uncurry edge . second T.tail . T.breakOn ")" | 153 | readGraph :: Text -> AdjacencyMap Text
readGraph = overlays . fmap readEdge . T.lines
where
readEdge = uncurry edge . second T.tail . T.breakOn ")" | 153 | readGraph = overlays . fmap readEdge . T.lines
where
readEdge = uncurry edge . second T.tail . T.breakOn ")" | 114 | false | true | 0 | 8 | 30 | 60 | 28 | 32 | null | null |
copumpkin/vector-static | Data/Fin.hs | bsd-3-clause | finToInt :: Fin n -> Int
finToInt (Fin i) = i | 45 | finToInt :: Fin n -> Int
finToInt (Fin i) = i | 45 | finToInt (Fin i) = i | 20 | false | true | 0 | 7 | 10 | 27 | 13 | 14 | null | null |
ducis/haAni | hs/common/Graphics/Rendering/OpenGL/GL/CoordTrans.hs | gpl-2.0 | matrix :: (Matrix m, MatrixComponent c) => Maybe MatrixMode -> StateVar (m c)
matrix maybeMode =
makeStateVar
(maybe (get matrixMode) return maybeMode >>= (getMatrix' . matrixModeToGetMatrix))
(maybe id withMatrixMode maybeMode . setMatrix) | 255 | matrix :: (Matrix m, MatrixComponent c) => Maybe MatrixMode -> StateVar (m c)
matrix maybeMode =
makeStateVar
(maybe (get matrixMode) return maybeMode >>= (getMatrix' . matrixModeToGetMatrix))
(maybe id withMatrixMode maybeMode . setMatrix) | 255 | matrix maybeMode =
makeStateVar
(maybe (get matrixMode) return maybeMode >>= (getMatrix' . matrixModeToGetMatrix))
(maybe id withMatrixMode maybeMode . setMatrix) | 177 | false | true | 0 | 10 | 46 | 91 | 45 | 46 | null | null |
swift-nav/plover | src/Language/Plover/Unify.hs | mit | typeCheck (VecLit pos ty []) = typeCheckType pos ty | 51 | typeCheck (VecLit pos ty []) = typeCheckType pos ty | 51 | typeCheck (VecLit pos ty []) = typeCheckType pos ty | 51 | false | false | 0 | 7 | 8 | 27 | 12 | 15 | null | null |
fffej/HS-Poker | LookupPatternMatch.hs | bsd-3-clause | getValueFromProduct 377377 = 5020 | 33 | getValueFromProduct 377377 = 5020 | 33 | getValueFromProduct 377377 = 5020 | 33 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
phischu/fragnix | tests/packages/scotty/Data.ByteString.Internal.hs | bsd-3-clause | append :: ByteString -> ByteString -> ByteString
append (PS _ _ 0) b = b | 97 | append :: ByteString -> ByteString -> ByteString
append (PS _ _ 0) b = b | 97 | append (PS _ _ 0) b = b | 48 | false | true | 0 | 7 | 39 | 34 | 17 | 17 | null | null |
ezyang/ghc | compiler/utils/IOEnv.hs | bsd-3-clause | -- | Strict variant of 'atomicUpdMutVar'.
atomicUpdMutVar' :: IORef a -> (a -> (a, b)) -> IOEnv env b
atomicUpdMutVar' var upd = liftIO (atomicModifyIORef' var upd) | 164 | atomicUpdMutVar' :: IORef a -> (a -> (a, b)) -> IOEnv env b
atomicUpdMutVar' var upd = liftIO (atomicModifyIORef' var upd) | 122 | atomicUpdMutVar' var upd = liftIO (atomicModifyIORef' var upd) | 62 | true | true | 0 | 9 | 26 | 57 | 29 | 28 | null | null |
spechub/Hets | Isabelle/IsaConsts.hs | gpl-2.0 | mkContProduct :: Typ -> Typ -> Typ
mkContProduct = mkBinDomType lProdS | 70 | mkContProduct :: Typ -> Typ -> Typ
mkContProduct = mkBinDomType lProdS | 70 | mkContProduct = mkBinDomType lProdS | 35 | false | true | 0 | 6 | 10 | 22 | 11 | 11 | null | null |
fmapfmapfmap/amazonka | amazonka-sqs/test/Test/AWS/Gen/SQS.hs | mpl-2.0 | testRemovePermissionResponse :: RemovePermissionResponse -> TestTree
testRemovePermissionResponse = res
"RemovePermissionResponse"
"fixture/RemovePermissionResponse.proto"
sQS
(Proxy :: Proxy RemovePermission) | 225 | testRemovePermissionResponse :: RemovePermissionResponse -> TestTree
testRemovePermissionResponse = res
"RemovePermissionResponse"
"fixture/RemovePermissionResponse.proto"
sQS
(Proxy :: Proxy RemovePermission) | 225 | testRemovePermissionResponse = res
"RemovePermissionResponse"
"fixture/RemovePermissionResponse.proto"
sQS
(Proxy :: Proxy RemovePermission) | 156 | false | true | 0 | 7 | 30 | 33 | 17 | 16 | null | null |
neothemachine/monadiccp | src/Control/Search/Language.hs | bsd-3-clause | spacetype ModeGecode = "State" | 30 | spacetype ModeGecode = "State" | 30 | spacetype ModeGecode = "State" | 30 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
zepto-lang/zepto | src/Zepto/Types/Export.hs | gpl-2.0 | unfoldrBVec = B.unfoldr | 23 | unfoldrBVec = B.unfoldr | 23 | unfoldrBVec = B.unfoldr | 23 | false | false | 0 | 5 | 2 | 8 | 4 | 4 | null | null |
yiannist/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | osScriptCreateUntrusted :: String
osScriptCreateUntrusted = "create_untrusted" | 78 | osScriptCreateUntrusted :: String
osScriptCreateUntrusted = "create_untrusted" | 78 | osScriptCreateUntrusted = "create_untrusted" | 44 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
thalerjonathan/phd | thesis/code/concurrent/sugarscape/SugarScapeSTMTVar/src/GlossRunner.hs | gpl-3.0 | runWithGloss :: RandomGen g
=> Double
-> DTime
-> SimContext g
-> SugContext
-> SimStepOut
-> Bool
-> String
-> IO ()
runWithGloss durSecs dt initSimCtx sugCtx initOut stmStatsFlag perfFile = do
let freq = 0
... | 1,155 | runWithGloss :: RandomGen g
=> Double
-> DTime
-> SimContext g
-> SugContext
-> SimStepOut
-> Bool
-> String
-> IO ()
runWithGloss durSecs dt initSimCtx sugCtx initOut stmStatsFlag perfFile = do
let freq = 0
... | 1,155 | runWithGloss durSecs dt initSimCtx sugCtx initOut stmStatsFlag perfFile = do
let freq = 0
winSize = (800, 800)
winTitle = "SugarScape"
outRef <- newIORef initSimCtx
if freq > 0
then
simulateIO
(displayGlossWindow winTitle winSize) -- window title and size
white ... | 932 | false | true | 0 | 14 | 425 | 223 | 112 | 111 | null | null |
frontrowed/stratosphere | library-gen/Stratosphere/ResourceProperties/AutoScalingAutoScalingGroupInstancesDistribution.hs | mit | -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancesdistribution.html#cfn-autoscaling-autoscalinggroup-instancesdistribution-ondemandallocationstrategy
asasgidOnDemandAllocationStrategy :: Lens' AutoScalingAutoScalingGroupInstancesDistribution (Maybe (Val Text))
asasg... | 527 | asasgidOnDemandAllocationStrategy :: Lens' AutoScalingAutoScalingGroupInstancesDistribution (Maybe (Val Text))
asasgidOnDemandAllocationStrategy = lens _autoScalingAutoScalingGroupInstancesDistributionOnDemandAllocationStrategy (\s a -> s { _autoScalingAutoScalingGroupInstancesDistributionOnDemandAllocationStrategy = a... | 323 | asasgidOnDemandAllocationStrategy = lens _autoScalingAutoScalingGroupInstancesDistributionOnDemandAllocationStrategy (\s a -> s { _autoScalingAutoScalingGroupInstancesDistributionOnDemandAllocationStrategy = a }) | 212 | true | true | 0 | 9 | 22 | 52 | 28 | 24 | null | null |
bgw/hs-rpal | src/Parser.hs | gpl-3.0 | -- Bt -> Bt '&' Bs
-- -> Bs
parseBt :: [Token] -> ParserResult
parseBt tokens =
leftRecursive tokens parseBs (TokenOperator "&") AstAmp | 142 | parseBt :: [Token] -> ParserResult
parseBt tokens =
leftRecursive tokens parseBs (TokenOperator "&") AstAmp | 111 | parseBt tokens =
leftRecursive tokens parseBs (TokenOperator "&") AstAmp | 76 | true | true | 0 | 7 | 29 | 38 | 20 | 18 | null | null |
xnning/fcore | lib/Examples.hs | bsd-2-clause | multiple_if = lam (javaInt) (\n -> If ((var n) `eq` zero) (If ((App identity (var n)) `eq` one) one zero) negOne) | 113 | multiple_if = lam (javaInt) (\n -> If ((var n) `eq` zero) (If ((App identity (var n)) `eq` one) one zero) negOne) | 113 | multiple_if = lam (javaInt) (\n -> If ((var n) `eq` zero) (If ((App identity (var n)) `eq` one) one zero) negOne) | 113 | false | false | 0 | 16 | 20 | 77 | 42 | 35 | null | null |
flipstone/orville | orville-postgresql-libpq/src/Orville/PostgreSQL/Internal/SelectOptions/WhereCondition.hs | mit | {- |
Constructs a 'WhereCondition' from a 'Expr.BooleanExpr'. You can use this to
together with the 'RawSql.RawSql' related functions in the 'Expr' module to
use SQL expressions that Orville does not directly support in your queries.
-}
whereBooleanExpr :: Expr.BooleanExpr -> WhereCondition
whereBooleanExpr =
W... | 333 | whereBooleanExpr :: Expr.BooleanExpr -> WhereCondition
whereBooleanExpr =
WhereCondition | 90 | whereBooleanExpr =
WhereCondition | 35 | true | true | 0 | 6 | 52 | 18 | 10 | 8 | null | null |
MichielDeCuyper/Algebraic-Effect-Handlers | src/Benchmarks.hs | mit | benchmark1m :: Int -> MTL.State Int Int
benchmark1m n
| n <= 0 = MTL.get
| otherwise = do
a <- MTL.get
MTL.put (a + n)
benchmark1m (n - 1) | 171 | benchmark1m :: Int -> MTL.State Int Int
benchmark1m n
| n <= 0 = MTL.get
| otherwise = do
a <- MTL.get
MTL.put (a + n)
benchmark1m (n - 1) | 171 | benchmark1m n
| n <= 0 = MTL.get
| otherwise = do
a <- MTL.get
MTL.put (a + n)
benchmark1m (n - 1) | 130 | false | true | 0 | 10 | 62 | 83 | 38 | 45 | null | null |
scsibug/hS3 | Tests.hs | bsd-3-clause | headersToIgnore = ["x-amz-id-2", "x-amz-request-id"] | 52 | headersToIgnore = ["x-amz-id-2", "x-amz-request-id"] | 52 | headersToIgnore = ["x-amz-id-2", "x-amz-request-id"] | 52 | false | false | 1 | 5 | 3 | 15 | 7 | 8 | null | null |
snoyberg/ghc | compiler/llvmGen/Llvm/Types.hs | bsd-3-clause | fixEndian = id | 14 | fixEndian = id | 14 | fixEndian = id | 14 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
input-output-hk/pos-haskell-prototype | chain/test/Test/Pos/Chain/Update/Bi.hs | mit | roundTripBlockVersionModifier :: Property
roundTripBlockVersionModifier = eachOf 50 genBlockVersionModifier roundTripsBiBuildable | 129 | roundTripBlockVersionModifier :: Property
roundTripBlockVersionModifier = eachOf 50 genBlockVersionModifier roundTripsBiBuildable | 129 | roundTripBlockVersionModifier = eachOf 50 genBlockVersionModifier roundTripsBiBuildable | 87 | false | true | 0 | 5 | 8 | 18 | 9 | 9 | null | null |
brendanhay/gogol | gogol-container/gen/Network/Google/Container/Types/Product.hs | mpl-2.0 | ncmAddtional :: Lens' NodeConfigMetadata (HashMap Text Text)
ncmAddtional
= lens _ncmAddtional (\ s a -> s{_ncmAddtional = a})
. _Coerce | 144 | ncmAddtional :: Lens' NodeConfigMetadata (HashMap Text Text)
ncmAddtional
= lens _ncmAddtional (\ s a -> s{_ncmAddtional = a})
. _Coerce | 144 | ncmAddtional
= lens _ncmAddtional (\ s a -> s{_ncmAddtional = a})
. _Coerce | 83 | false | true | 2 | 8 | 27 | 58 | 27 | 31 | null | null |
bvdelft/parac2 | src/Language/Java/Paragon/NameResolution.hs | bsd-3-clause | rnActor :: Resolve Actor
rnActor (Actor pos an) = Actor pos <$> rnActorName an | 78 | rnActor :: Resolve Actor
rnActor (Actor pos an) = Actor pos <$> rnActorName an | 78 | rnActor (Actor pos an) = Actor pos <$> rnActorName an | 53 | false | true | 0 | 7 | 13 | 35 | 16 | 19 | null | null |
alexander-at-github/eta | compiler/ETA/BasicTypes/BasicTypes.hs | bsd-3-clause | succeeded, failed :: SuccessFlag -> Bool
succeeded Succeeded = True | 67 | succeeded, failed :: SuccessFlag -> Bool
succeeded Succeeded = True | 67 | succeeded Succeeded = True | 26 | false | true | 0 | 5 | 9 | 20 | 11 | 9 | null | null |
substack/hs-disappoint | src/Language/Haskell/Pointfree/PrettyPrinter.hs | mit | toSExpr (Lambda v e) = case toSExpr e of
(SLambda vs e') -> SLambda (v:vs) e'
e' -> SLambda [v] e' | 115 | toSExpr (Lambda v e) = case toSExpr e of
(SLambda vs e') -> SLambda (v:vs) e'
e' -> SLambda [v] e' | 115 | toSExpr (Lambda v e) = case toSExpr e of
(SLambda vs e') -> SLambda (v:vs) e'
e' -> SLambda [v] e' | 115 | false | false | 0 | 10 | 37 | 65 | 31 | 34 | null | null |
HaskellCNOrg/snap-web | src/Views/UserForm.hs | bsd-3-clause | signupForm :: Monad m => Form Text m LoginUser
signupForm = check "Two Input password must be same" samePasswordValidator $
LoginUser
<$> "loginName" .: (checkValidEmail . checkRequired loginNameRequired) (text Nothing)
<*> "password" .: passwordValidator (text Nothing)
<*> "repeatPassword"... | 387 | signupForm :: Monad m => Form Text m LoginUser
signupForm = check "Two Input password must be same" samePasswordValidator $
LoginUser
<$> "loginName" .: (checkValidEmail . checkRequired loginNameRequired) (text Nothing)
<*> "password" .: passwordValidator (text Nothing)
<*> "repeatPassword"... | 387 | signupForm = check "Two Input password must be same" samePasswordValidator $
LoginUser
<$> "loginName" .: (checkValidEmail . checkRequired loginNameRequired) (text Nothing)
<*> "password" .: passwordValidator (text Nothing)
<*> "repeatPassword" .: checkRequired "Please input the password a... | 340 | false | true | 8 | 9 | 76 | 109 | 51 | 58 | null | null |
seckcoder/lang-learn | haskell/lambda-calculus/src/Main.hs | unlicense | demo22 = runEval2 (eval2 empty exampleExp2) | 43 | demo22 = runEval2 (eval2 empty exampleExp2) | 43 | demo22 = runEval2 (eval2 empty exampleExp2) | 43 | false | false | 1 | 7 | 5 | 21 | 8 | 13 | null | null |
li-zhirui/EoplLangs | src/MutablePairs/Data.hs | bsd-3-clause | newRef :: ExpressedValue -> StatedTry Ref
newRef val = do
store <- get
let refList = refs store
put $ Store (val:refList)
return . Ref . toInteger . length $ refList | 173 | newRef :: ExpressedValue -> StatedTry Ref
newRef val = do
store <- get
let refList = refs store
put $ Store (val:refList)
return . Ref . toInteger . length $ refList | 173 | newRef val = do
store <- get
let refList = refs store
put $ Store (val:refList)
return . Ref . toInteger . length $ refList | 131 | false | true | 0 | 10 | 38 | 81 | 36 | 45 | null | null |
michaelficarra/purescript | psc-docs/Main.hs | mit | dumpTags :: [FilePath] -> ([(String, P.Module)] -> [String]) -> IO ()
dumpTags input renderTags = do
e <- P.parseModulesFromFiles (fromMaybe "") <$> mapM (fmap (first Just) . parseFile) (nub input)
case e of
Left err -> do
hPutStrLn stderr (show err)
exitFailure
Right ms ->
ldump (renderTa... | 483 | dumpTags :: [FilePath] -> ([(String, P.Module)] -> [String]) -> IO ()
dumpTags input renderTags = do
e <- P.parseModulesFromFiles (fromMaybe "") <$> mapM (fmap (first Just) . parseFile) (nub input)
case e of
Left err -> do
hPutStrLn stderr (show err)
exitFailure
Right ms ->
ldump (renderTa... | 483 | dumpTags input renderTags = do
e <- P.parseModulesFromFiles (fromMaybe "") <$> mapM (fmap (first Just) . parseFile) (nub input)
case e of
Left err -> do
hPutStrLn stderr (show err)
exitFailure
Right ms ->
ldump (renderTags (pairs ms))
where
pairs :: [(Maybe String, m)] -> [(String, m)... | 413 | false | true | 0 | 14 | 115 | 253 | 122 | 131 | null | null |
brendanhay/gogol | gogol-apps-calendar/gen/Network/Google/AppsCalendar/Types/Product.hs | mpl-2.0 | -- | The type of notification. Possible values are: - \"eventCreation\" -
-- Notification sent when a new event is put on the calendar. -
-- \"eventChange\" - Notification sent when an event is changed. -
-- \"eventCancellation\" - Notification sent when an event is cancelled. -
-- \"eventResponse\" - Notification sent... | 591 | cnType :: Lens' CalendarNotification (Maybe Text)
cnType = lens _cnType (\ s a -> s{_cnType = a}) | 97 | cnType = lens _cnType (\ s a -> s{_cnType = a}) | 47 | true | true | 1 | 9 | 99 | 57 | 31 | 26 | null | null |
iblumenfeld/saw-core | src/Verifier/SAW/Typechecker/Simplification.hs | bsd-3-clause | extendPatContext :: TermContext s -> TCPat -> TermContext s
extendPatContext tc0 pat = V.foldl (flip $ uncurry consBoundVar) tc0 (patBoundVars pat) | 147 | extendPatContext :: TermContext s -> TCPat -> TermContext s
extendPatContext tc0 pat = V.foldl (flip $ uncurry consBoundVar) tc0 (patBoundVars pat) | 147 | extendPatContext tc0 pat = V.foldl (flip $ uncurry consBoundVar) tc0 (patBoundVars pat) | 87 | false | true | 0 | 8 | 20 | 59 | 27 | 32 | null | null |
brendanhay/gogol | gogol-firestore/gen/Network/Google/Resource/FireStore/Projects/Databases/Operations/List.hs | mpl-2.0 | -- | Upload protocol for media (e.g. \"raw\", \"multipart\").
pdolUploadProtocol :: Lens' ProjectsDatabasesOperationsList (Maybe Text)
pdolUploadProtocol
= lens _pdolUploadProtocol
(\ s a -> s{_pdolUploadProtocol = a}) | 226 | pdolUploadProtocol :: Lens' ProjectsDatabasesOperationsList (Maybe Text)
pdolUploadProtocol
= lens _pdolUploadProtocol
(\ s a -> s{_pdolUploadProtocol = a}) | 164 | pdolUploadProtocol
= lens _pdolUploadProtocol
(\ s a -> s{_pdolUploadProtocol = a}) | 91 | true | true | 0 | 9 | 33 | 48 | 25 | 23 | null | null |
brendanhay/gogol | gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Settings/UpdatePop.hs | mpl-2.0 | -- | JSONP
usupCallback :: Lens' UsersSettingsUpdatePop (Maybe Text)
usupCallback
= lens _usupCallback (\ s a -> s{_usupCallback = a}) | 136 | usupCallback :: Lens' UsersSettingsUpdatePop (Maybe Text)
usupCallback
= lens _usupCallback (\ s a -> s{_usupCallback = a}) | 125 | usupCallback
= lens _usupCallback (\ s a -> s{_usupCallback = a}) | 67 | true | true | 0 | 9 | 21 | 49 | 25 | 24 | null | null |
kcharter/erl | Erl/Test/MonadTests.hs | bsd-2-clause | someBinRelIds :: ErlState d -> Gen [BinRelId]
someBinRelIds s = someOf s binRelIds | 82 | someBinRelIds :: ErlState d -> Gen [BinRelId]
someBinRelIds s = someOf s binRelIds | 82 | someBinRelIds s = someOf s binRelIds | 36 | false | true | 0 | 7 | 12 | 32 | 15 | 17 | null | null |
GaloisInc/galua | galua-rts/src/Galua/Util/ByteString.hs | mit | cons :: Word8 -> ShortByteString -> ShortByteString
cons (W8# w) (SBS p) = unsafeDupablePerformIO $ IO $ \s0 ->
let sz = sizeofByteArray# p in
case newByteArray# (sz +# 1#) s0 of { (# s1, x #) ->
case copyByteArray# p 0# x 1# sz s1 of { s2 ->
case writeWord8Array# x 0# w s2 of { s3 ... | 409 | cons :: Word8 -> ShortByteString -> ShortByteString
cons (W8# w) (SBS p) = unsafeDupablePerformIO $ IO $ \s0 ->
let sz = sizeofByteArray# p in
case newByteArray# (sz +# 1#) s0 of { (# s1, x #) ->
case copyByteArray# p 0# x 1# sz s1 of { s2 ->
case writeWord8Array# x 0# w s2 of { s3 ... | 409 | cons (W8# w) (SBS p) = unsafeDupablePerformIO $ IO $ \s0 ->
let sz = sizeofByteArray# p in
case newByteArray# (sz +# 1#) s0 of { (# s1, x #) ->
case copyByteArray# p 0# x 1# sz s1 of { s2 ->
case writeWord8Array# x 0# w s2 of { s3 ->
case unsafeFreezeByteArray# x s3 of { (#... | 357 | false | true | 0 | 22 | 126 | 168 | 87 | 81 | null | null |
ownclo/alohas | src/NoMemStation.hs | bsd-3-clause | initStation :: Station
initStation = Station | 44 | initStation :: Station
initStation = Station | 44 | initStation = Station | 21 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
tibbe/ghc | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | shouldInlinePrimOp dflags FreezeSmallArrayOp [src, src_off, (CmmLit (CmmInt n _))]
| wordsToBytes dflags (fromInteger n) <= maxInlineAllocSize dflags =
Just $ \ [res] -> emitCloneSmallArray mkSMAP_FROZEN_infoLabel res src src_off (fromInteger n) | 253 | shouldInlinePrimOp dflags FreezeSmallArrayOp [src, src_off, (CmmLit (CmmInt n _))]
| wordsToBytes dflags (fromInteger n) <= maxInlineAllocSize dflags =
Just $ \ [res] -> emitCloneSmallArray mkSMAP_FROZEN_infoLabel res src src_off (fromInteger n) | 253 | shouldInlinePrimOp dflags FreezeSmallArrayOp [src, src_off, (CmmLit (CmmInt n _))]
| wordsToBytes dflags (fromInteger n) <= maxInlineAllocSize dflags =
Just $ \ [res] -> emitCloneSmallArray mkSMAP_FROZEN_infoLabel res src src_off (fromInteger n) | 253 | false | false | 0 | 11 | 37 | 89 | 44 | 45 | null | null |
hausdorff/pyli | src/Parser.hs | mit | expr :: Parser String
expr = xorExpr <~> zeroPlusXors ==> emitExpr | 66 | expr :: Parser String
expr = xorExpr <~> zeroPlusXors ==> emitExpr | 66 | expr = xorExpr <~> zeroPlusXors ==> emitExpr | 44 | false | true | 2 | 6 | 10 | 28 | 12 | 16 | null | null |
quyse/flaw | flaw-font/Flaw/Graphics/Font/Script.hs | mit | fontScriptDevanagari :: FontScript
fontScriptDevanagari = fontScript "Deva" | 96 | fontScriptDevanagari :: FontScript
fontScriptDevanagari = fontScript "Deva" | 96 | fontScriptDevanagari = fontScript "Deva" | 51 | false | true | 0 | 5 | 27 | 14 | 7 | 7 | null | null |
matonix/pfds | src/PFDS/Sec9/Ex13.hs | bsd-3-clause | consTree t1 (Threes ((t2, t3, t4) : ts) : ds) = Four (t1, t2, t3, t4) : threes ts ds | 84 | consTree t1 (Threes ((t2, t3, t4) : ts) : ds) = Four (t1, t2, t3, t4) : threes ts ds | 84 | consTree t1 (Threes ((t2, t3, t4) : ts) : ds) = Four (t1, t2, t3, t4) : threes ts ds | 84 | false | false | 0 | 10 | 19 | 63 | 33 | 30 | null | null |
oherrala/haskell-stun | src/Network/STUN/Internal.hs | mit | hasUsername :: STUNAttributes -> Bool
hasUsername = isJust . getRealm | 69 | hasUsername :: STUNAttributes -> Bool
hasUsername = isJust . getRealm | 69 | hasUsername = isJust . getRealm | 31 | false | true | 0 | 5 | 9 | 19 | 10 | 9 | null | null |
ssaavedra/liquidhaskell | benchmarks/unordered-containers-0.2.1.0/Data/HashMap/Base.hs | bsd-3-clause | member :: (Eq k, Hashable k) => k -> HashMap k a -> Bool
member k m = case lookup k m of
Nothing -> False
Just _ -> True
#if __GLASGOW_HASKELL__ >= 700
| 161 | member :: (Eq k, Hashable k) => k -> HashMap k a -> Bool
member k m = case lookup k m of
Nothing -> False
Just _ -> True
#if __GLASGOW_HASKELL__ >= 700
| 161 | member k m = case lookup k m of
Nothing -> False
Just _ -> True
#if __GLASGOW_HASKELL__ >= 700
| 104 | false | true | 0 | 8 | 43 | 69 | 34 | 35 | null | null |
sgord512/Algebra | Algebra/Base.hs | mit | (.^) :: P -> Integer -> P
(.^) p n = foldr (.*.) one $ genericReplicate n p | 75 | (.^) :: P -> Integer -> P
(.^) p n = foldr (.*.) one $ genericReplicate n p | 75 | (.^) p n = foldr (.*.) one $ genericReplicate n p | 49 | false | true | 0 | 8 | 17 | 50 | 25 | 25 | null | null |
input-output-hk/pos-haskell-prototype | util/test/Test/Pos/Util/Tripping.hs | mit | runTests :: [IO Bool] -> IO ()
runTests tests' = do
-- ensure UTF-8. As that's what hedgehog needs.
hSetEncoding stdout utf8
hSetEncoding stderr utf8
result <- and <$> sequence tests'
unless result
exitFailure | 238 | runTests :: [IO Bool] -> IO ()
runTests tests' = do
-- ensure UTF-8. As that's what hedgehog needs.
hSetEncoding stdout utf8
hSetEncoding stderr utf8
result <- and <$> sequence tests'
unless result
exitFailure | 238 | runTests tests' = do
-- ensure UTF-8. As that's what hedgehog needs.
hSetEncoding stdout utf8
hSetEncoding stderr utf8
result <- and <$> sequence tests'
unless result
exitFailure | 207 | false | true | 0 | 9 | 62 | 68 | 30 | 38 | null | null |
gridaphobe/ghc | compiler/hsSyn/HsUtils.hs | bsd-3-clause | nlVarPat :: id -> LPat id
nlVarPat n = noLoc (VarPat (noLoc n)) | 63 | nlVarPat :: id -> LPat id
nlVarPat n = noLoc (VarPat (noLoc n)) | 63 | nlVarPat n = noLoc (VarPat (noLoc n)) | 37 | false | true | 0 | 9 | 12 | 36 | 17 | 19 | null | null |
zebbo/stack-machine | test/SMAssemblerTests.hs | gpl-3.0 | testPrsD = TestCase $ assertEqual "test Prs assembly - D"
([fromEnum Prs,memSize-2], [0,fromEnum 'c',fromEnum 'b',fromEnum ' ',fromEnum 'a',0])
(assemble "0 Prs 'a bc'") | 237 | testPrsD = TestCase $ assertEqual "test Prs assembly - D"
([fromEnum Prs,memSize-2], [0,fromEnum 'c',fromEnum 'b',fromEnum ' ',fromEnum 'a',0])
(assemble "0 Prs 'a bc'") | 237 | testPrsD = TestCase $ assertEqual "test Prs assembly - D"
([fromEnum Prs,memSize-2], [0,fromEnum 'c',fromEnum 'b',fromEnum ' ',fromEnum 'a',0])
(assemble "0 Prs 'a bc'") | 237 | false | false | 1 | 9 | 90 | 75 | 38 | 37 | null | null |
gspia/reflex-dom-htmlea | lib/src/Reflex/Dom/HTML5/Elements/Metadata.hs | bsd-3-clause | head' ∷ forall t m a. DomBuilder t m ⇒ Head → m a → m (Element EventResult (DomBuilderSpace m) t, a)
head' bm = elAttr' "head" (A.attrMap bm) | 141 | head' ∷ forall t m a. DomBuilder t m ⇒ Head → m a → m (Element EventResult (DomBuilderSpace m) t, a)
head' bm = elAttr' "head" (A.attrMap bm) | 141 | head' bm = elAttr' "head" (A.attrMap bm) | 40 | false | true | 0 | 13 | 28 | 76 | 38 | 38 | null | null |
gridaphobe/ghc | compiler/deSugar/Coverage.hs | bsd-3-clause | addTickHsExpr e@(HsTcBracketOut {}) = return e | 47 | addTickHsExpr e@(HsTcBracketOut {}) = return e | 47 | addTickHsExpr e@(HsTcBracketOut {}) = return e | 47 | false | false | 0 | 8 | 6 | 22 | 11 | 11 | null | null |
mathfur/grep-tree | src/Types.hs | mit | getWord (Corner (JsFunc w) _) = w | 33 | getWord (Corner (JsFunc w) _) = w | 33 | getWord (Corner (JsFunc w) _) = w | 33 | false | false | 0 | 9 | 6 | 23 | 11 | 12 | null | null |
gres147679/MaDMaG | Input.hs | gpl-2.0 | readFromFile :: String -> IO (Either String String)
readFromFile f = do
-- h <- openFile f ReadMode
s <- readFile f
-- hClose h
return (Right s) | 151 | readFromFile :: String -> IO (Either String String)
readFromFile f = do
-- h <- openFile f ReadMode
s <- readFile f
-- hClose h
return (Right s) | 151 | readFromFile f = do
-- h <- openFile f ReadMode
s <- readFile f
-- hClose h
return (Right s) | 99 | false | true | 0 | 10 | 34 | 58 | 26 | 32 | null | null |
ocharles/hackage-server | Distribution/Server/Features/BuildReports/Backup.hs | bsd-3-clause | importReport :: PackageId -> String -> ByteString -> BuildReports -> PartialLogs -> Restore (BuildReports, PartialLogs)
importReport pkgId repIdStr contents buildReps partialLogs = do
reportId <- parseText "report id" repIdStr
report <- either fail return $ Report.parse (unpackUTF8 contents)
let (mlog, partialL... | 549 | importReport :: PackageId -> String -> ByteString -> BuildReports -> PartialLogs -> Restore (BuildReports, PartialLogs)
importReport pkgId repIdStr contents buildReps partialLogs = do
reportId <- parseText "report id" repIdStr
report <- either fail return $ Report.parse (unpackUTF8 contents)
let (mlog, partialL... | 549 | importReport pkgId repIdStr contents buildReps partialLogs = do
reportId <- parseText "report id" repIdStr
report <- either fail return $ Report.parse (unpackUTF8 contents)
let (mlog, partialLogs') = Map.updateLookupWithKey (\_ _ -> Nothing) (pkgId, reportId) partialLogs
buildReps' = Reports.unsafeSetRepo... | 429 | false | true | 0 | 12 | 80 | 166 | 84 | 82 | null | null |
lpenz/realworldhaskell-exercises | ch12/barcode.hs | mit | leftOddList = ["0001101", "0011001", "0010011", "0111101", "0100011",
"0110001", "0101111", "0111011", "0110111", "0001011"] | 139 | leftOddList = ["0001101", "0011001", "0010011", "0111101", "0100011",
"0110001", "0101111", "0111011", "0110111", "0001011"] | 139 | leftOddList = ["0001101", "0011001", "0010011", "0111101", "0100011",
"0110001", "0101111", "0111011", "0110111", "0001011"] | 139 | false | false | 0 | 5 | 26 | 36 | 23 | 13 | null | null |
diku-dk/futhark | src/Language/Futhark/TypeChecker/Types.hs | isc | unifyScalarTypes uf (Record ts1) (Record ts2)
| length ts1 == length ts2,
sort (M.keys ts1) == sort (M.keys ts2) =
Record
<$> traverse
(uncurry (unifyTypesU uf))
(M.intersectionWith (,) ts1 ts2) | 226 | unifyScalarTypes uf (Record ts1) (Record ts2)
| length ts1 == length ts2,
sort (M.keys ts1) == sort (M.keys ts2) =
Record
<$> traverse
(uncurry (unifyTypesU uf))
(M.intersectionWith (,) ts1 ts2) | 226 | unifyScalarTypes uf (Record ts1) (Record ts2)
| length ts1 == length ts2,
sort (M.keys ts1) == sort (M.keys ts2) =
Record
<$> traverse
(uncurry (unifyTypesU uf))
(M.intersectionWith (,) ts1 ts2) | 226 | false | false | 0 | 12 | 61 | 107 | 50 | 57 | null | null |
uduki/hsQt | Qtc/ClassTypes/Gui.hs | bsd-2-clause | qCastList_QPainterPath x = qcl_QPainterPath [] x | 48 | qCastList_QPainterPath x = qcl_QPainterPath [] x | 48 | qCastList_QPainterPath x = qcl_QPainterPath [] x | 48 | false | false | 0 | 6 | 5 | 16 | 7 | 9 | null | null |
diegomachadosoares/hcomp | Commands.hs | gpl-3.0 | -- | Desalocação de memoria
free :: (E, S, M, C, O) -> String -> (E, S, M, C, O)
free (e,s,m,c,o) a = (e,s,Map.delete (rBnd(Map.findWithDefault (BndLoc (Loc (-1))) a e)) m,c,o) | 176 | free :: (E, S, M, C, O) -> String -> (E, S, M, C, O)
free (e,s,m,c,o) a = (e,s,Map.delete (rBnd(Map.findWithDefault (BndLoc (Loc (-1))) a e)) m,c,o) | 148 | free (e,s,m,c,o) a = (e,s,Map.delete (rBnd(Map.findWithDefault (BndLoc (Loc (-1))) a e)) m,c,o) | 95 | true | true | 0 | 17 | 31 | 132 | 75 | 57 | null | null |
Potregon/while | src/Parser/Functional.hs | gpl-3.0 | bfactor :: TokenParser A.BoolExpression
bfactor = do
_ <- token Eof
return A.Eof
<|> do
bool <- boolean
return $ A.Boolean bool
<|> do
_ <- token Not
be <- bfactor
return $ A.Not be
<|> do
_ <- token $ Token '('
be <- bexpr
_ <- token $ Token ')'
return be
<|> do
... | 448 | bfactor :: TokenParser A.BoolExpression
bfactor = do
_ <- token Eof
return A.Eof
<|> do
bool <- boolean
return $ A.Boolean bool
<|> do
_ <- token Not
be <- bfactor
return $ A.Not be
<|> do
_ <- token $ Token '('
be <- bexpr
_ <- token $ Token ')'
return be
<|> do
... | 448 | bfactor = do
_ <- token Eof
return A.Eof
<|> do
bool <- boolean
return $ A.Boolean bool
<|> do
_ <- token Not
be <- bfactor
return $ A.Not be
<|> do
_ <- token $ Token '('
be <- bexpr
_ <- token $ Token ')'
return be
<|> do
e1 <- expr
rel <- relop
e2 <- ex... | 408 | false | true | 12 | 10 | 147 | 190 | 85 | 105 | null | null |
mihaimaruseac/blog-demos | resistances/r.hs | mit | {-
Reduce a list of wires by reducing parallel resistors to a single one.
-}
parallel :: (Eq a) => [WireTo a] -> [WireTo a]
parallel [] = [] | 140 | parallel :: (Eq a) => [WireTo a] -> [WireTo a]
parallel [] = [] | 63 | parallel [] = [] | 16 | true | true | 0 | 8 | 28 | 44 | 23 | 21 | null | null |
tkonolige/haskell-cci | test/Worker.hs | bsd-3-clause | handleConnectionRequest :: ConnReqs -> Event s -> ByteString -> ConnectionAttributes -> IO ()
handleConnectionRequest rcrs ev bs _cattrs = do
r <- atomicModifyIORef rcrs$ \cr ->
if S.member w (connAccept cr) then (cr { connAccept = S.delete w (connAccept cr) } , ReqAccepted w)
else if S.member w (... | 685 | handleConnectionRequest :: ConnReqs -> Event s -> ByteString -> ConnectionAttributes -> IO ()
handleConnectionRequest rcrs ev bs _cattrs = do
r <- atomicModifyIORef rcrs$ \cr ->
if S.member w (connAccept cr) then (cr { connAccept = S.delete w (connAccept cr) } , ReqAccepted w)
else if S.member w (... | 685 | handleConnectionRequest rcrs ev bs _cattrs = do
r <- atomicModifyIORef rcrs$ \cr ->
if S.member w (connAccept cr) then (cr { connAccept = S.delete w (connAccept cr) } , ReqAccepted w)
else if S.member w (connReject cr) then (cr { connReject = S.delete w (connReject cr) } , ReqRejected w)
... | 591 | false | true | 1 | 17 | 169 | 270 | 132 | 138 | null | null |
josuf107/Adverb | Adverb/Common.hs | gpl-3.0 | depreciatorily = id | 19 | depreciatorily = id | 19 | depreciatorily = id | 19 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
kadena-io/pact | tests/PactContinuationSpec.hs | bsd-3-clause | failsWith :: HasCallStack => Command Text -> Maybe String ->
ReaderT (HM.HashMap RequestKey (CommandResult Hash)) IO ()
failsWith cmd r = shouldMatch cmd (resultShouldBe $ Left $ r) | 194 | failsWith :: HasCallStack => Command Text -> Maybe String ->
ReaderT (HM.HashMap RequestKey (CommandResult Hash)) IO ()
failsWith cmd r = shouldMatch cmd (resultShouldBe $ Left $ r) | 194 | failsWith cmd r = shouldMatch cmd (resultShouldBe $ Left $ r) | 61 | false | true | 0 | 12 | 40 | 76 | 36 | 40 | null | null |
wereHamster/yag | Git/Command/FetchPack.hs | unlicense | run :: [String] -> IO ()
run args = return () | 45 | run :: [String] -> IO ()
run args = return () | 45 | run args = return () | 20 | false | true | 0 | 7 | 10 | 34 | 16 | 18 | null | null |
robstewart57/ripl | src/SkeletonTemplates/IUnzipFilter2D.hs | bsd-3-clause | topRowAction width = C.AnActn (C.ActnTagsStmts tag head stmts)
where
tag = C.ActnTagDecl [C.Ident "topRow"]
head =
C.ActnHeadGuardedVars
[streamInPattern]
[streamOutPattern "Out1"]
[guardExp]
localVars
guardExp = C.BELT (mkVar "midPtr") (mkInt (width - 1))
localVa... | 2,027 | topRowAction width = C.AnActn (C.ActnTagsStmts tag head stmts)
where
tag = C.ActnTagDecl [C.Ident "topRow"]
head =
C.ActnHeadGuardedVars
[streamInPattern]
[streamOutPattern "Out1"]
[guardExp]
localVars
guardExp = C.BELT (mkVar "midPtr") (mkInt (width - 1))
localVa... | 2,027 | topRowAction width = C.AnActn (C.ActnTagsStmts tag head stmts)
where
tag = C.ActnTagDecl [C.Ident "topRow"]
head =
C.ActnHeadGuardedVars
[streamInPattern]
[streamOutPattern "Out1"]
[guardExp]
localVars
guardExp = C.BELT (mkVar "midPtr") (mkInt (width - 1))
localVa... | 2,027 | false | false | 6 | 15 | 735 | 650 | 319 | 331 | null | null |
rueshyna/gogol | gogol-shopping-content/gen/Network/Google/ShoppingContent/Types/Product.hs | mpl-2.0 | -- | Email address of the customer.
tocEmail :: Lens' TestOrderCustomer (Maybe Text)
tocEmail = lens _tocEmail (\ s a -> s{_tocEmail = a}) | 138 | tocEmail :: Lens' TestOrderCustomer (Maybe Text)
tocEmail = lens _tocEmail (\ s a -> s{_tocEmail = a}) | 102 | tocEmail = lens _tocEmail (\ s a -> s{_tocEmail = a}) | 53 | true | true | 0 | 9 | 23 | 46 | 25 | 21 | null | null |
JustinUnger/haskell-book | ch24/ch24-ipv6.hs | mit | addr6ToWords :: IPAddress6 -> [Word16]
addr6ToWords (IPAddress6 h l) = padTo 0 4 highWords ++ padTo 0 4 loWords
where highWords = word64ToWords16BE h
loWords = word64ToWords16BE l | 195 | addr6ToWords :: IPAddress6 -> [Word16]
addr6ToWords (IPAddress6 h l) = padTo 0 4 highWords ++ padTo 0 4 loWords
where highWords = word64ToWords16BE h
loWords = word64ToWords16BE l | 195 | addr6ToWords (IPAddress6 h l) = padTo 0 4 highWords ++ padTo 0 4 loWords
where highWords = word64ToWords16BE h
loWords = word64ToWords16BE l | 156 | false | true | 1 | 7 | 43 | 66 | 32 | 34 | null | null |
mtolly/jammittools | Main.hs | gpl-3.0 | charPartMap :: [(Char, Part)]
charPartMap = [ (partToChar p, p) | p <- [minBound .. maxBound] ] | 95 | charPartMap :: [(Char, Part)]
charPartMap = [ (partToChar p, p) | p <- [minBound .. maxBound] ] | 95 | charPartMap = [ (partToChar p, p) | p <- [minBound .. maxBound] ] | 65 | false | true | 0 | 9 | 16 | 53 | 28 | 25 | null | null |
wavewave/qft | old/lib/Graph.hs | gpl-3.0 | -- |
undirToDirected :: forall n. (KnownNat n) => UndirGraph n -> Graph
undirToDirected = assocMapToGraph . mkAssocMap | 118 | undirToDirected :: forall n. (KnownNat n) => UndirGraph n -> Graph
undirToDirected = assocMapToGraph . mkAssocMap | 113 | undirToDirected = assocMapToGraph . mkAssocMap | 46 | true | true | 0 | 8 | 17 | 37 | 20 | 17 | null | null |
ganeti/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | sfSize :: String
sfSize = Types.storageFieldToRaw SFSize | 56 | sfSize :: String
sfSize = Types.storageFieldToRaw SFSize | 56 | sfSize = Types.storageFieldToRaw SFSize | 39 | false | true | 0 | 6 | 6 | 16 | 8 | 8 | null | null |
mettekou/ghc | compiler/prelude/TysWiredIn.hs | bsd-3-clause | pairTyCon :: TyCon
pairTyCon = tupleTyCon Boxed 2 | 49 | pairTyCon :: TyCon
pairTyCon = tupleTyCon Boxed 2 | 49 | pairTyCon = tupleTyCon Boxed 2 | 30 | false | true | 0 | 5 | 7 | 16 | 8 | 8 | null | null |
konn/gitolist | GitUtils.hs | bsd-2-clause | permissionForUser :: UserName -> Repository -> [Permission]
permissionForUser uName repo =
map fst $ filter ((uName `elem`).snd) $ repoPermissions repo | 155 | permissionForUser :: UserName -> Repository -> [Permission]
permissionForUser uName repo =
map fst $ filter ((uName `elem`).snd) $ repoPermissions repo | 155 | permissionForUser uName repo =
map fst $ filter ((uName `elem`).snd) $ repoPermissions repo | 95 | false | true | 2 | 9 | 23 | 61 | 30 | 31 | null | null |
mfpi/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/Core31/Tokens.hs | bsd-3-clause | gl_POINT :: GLenum
gl_POINT = 0x1B00 | 36 | gl_POINT :: GLenum
gl_POINT = 0x1B00 | 36 | gl_POINT = 0x1B00 | 17 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
VictorDenisov/mongodb | Database/MongoDB/Internal/Protocol.hs | apache-2.0 | pcall :: Pipeline -> Message -> IO (IO Response)
-- ^ Send message to destination and return /promise/ of response from one message only. The destination must reply to the message (otherwise promises will have the wrong responses in them).
-- Throw IOError and closes pipeline if send fails, likewise for promised respon... | 798 | pcall :: Pipeline -> Message -> IO (IO Response)
pcall p@Pipeline{..} message = do
listenerStopped <- isFinished p
if listenerStopped
then ioError $ mkIOError doesNotExistErrorType "Handle has been closed" Nothing Nothing
else withMVar vStream doCall `onException` close p
where
doCall stream = do
... | 523 | pcall p@Pipeline{..} message = do
listenerStopped <- isFinished p
if listenerStopped
then ioError $ mkIOError doesNotExistErrorType "Handle has been closed" Nothing Nothing
else withMVar vStream doCall `onException` close p
where
doCall stream = do
writeMessage stream message
var <- ne... | 474 | true | true | 0 | 9 | 164 | 155 | 74 | 81 | null | null |
oldmanmike/ghc | compiler/deSugar/Coverage.hs | bsd-3-clause | -- Others should never happen in a command context.
addTickCmdStmt stmt = pprPanic "addTickHsCmd" (ppr stmt) | 109 | addTickCmdStmt stmt = pprPanic "addTickHsCmd" (ppr stmt) | 57 | addTickCmdStmt stmt = pprPanic "addTickHsCmd" (ppr stmt) | 57 | true | false | 0 | 7 | 16 | 21 | 10 | 11 | null | null |
liamoc/tea-hs | Tea/Event.hs | bsd-3-clause | getEventQuery (NoMouseDown) = not <$> queryMouseDown | 59 | getEventQuery (NoMouseDown) = not <$> queryMouseDown | 59 | getEventQuery (NoMouseDown) = not <$> queryMouseDown | 59 | false | false | 0 | 6 | 12 | 16 | 8 | 8 | null | null |
flocknroll/haskell_cis194 | H7/JoinList.hs | mit | getJSize :: (Sized b, Monoid b) => JoinList b a -> Int
getJSize = getSize . size . tag | 86 | getJSize :: (Sized b, Monoid b) => JoinList b a -> Int
getJSize = getSize . size . tag | 86 | getJSize = getSize . size . tag | 31 | false | true | 0 | 7 | 18 | 43 | 22 | 21 | null | null |
Rydgel/advent-of-code-2016 | src/Day2.hs | bsd-3-clause | instructions RightD = ( 1, 0) | 30 | instructions RightD = ( 1, 0) | 30 | instructions RightD = ( 1, 0) | 30 | false | false | 0 | 5 | 6 | 15 | 8 | 7 | null | null |
asakamirai/experiment-concurrent-primitives-bench | app/Main.hs | bsd-3-clause | withMVar :: IO (MVar Int)
withMVar = MVar.newMVar 0 | 51 | withMVar :: IO (MVar Int)
withMVar = MVar.newMVar 0 | 51 | withMVar = MVar.newMVar 0 | 25 | false | true | 0 | 7 | 8 | 25 | 12 | 13 | null | null |
snut/erl-consult-shake | src/Development/Shake/Erl/Consult.hs | bsd-3-clause | binary = ErlBinary . B.pack . map read <$> between (string "<<") (string ">>") bytes | 85 | binary = ErlBinary . B.pack . map read <$> between (string "<<") (string ">>") bytes | 85 | binary = ErlBinary . B.pack . map read <$> between (string "<<") (string ">>") bytes | 85 | false | false | 0 | 8 | 15 | 42 | 20 | 22 | null | null |
mightymoose/liquidhaskell | benchmarks/containers-0.5.0.0/Data/IntSet/Base.hs | bsd-3-clause | findMin (Bin _ m l r)
| m < 0 = find r
| otherwise = find l
where find (Tip kx bm) = kx + lowestBitSet bm
find (Bin _ _ l' _) = find l'
find Nil = error "findMin Nil"
-- | /O(min(n,W))/. The maximal element of a set. | 260 | findMin (Bin _ m l r)
| m < 0 = find r
| otherwise = find l
where find (Tip kx bm) = kx + lowestBitSet bm
find (Bin _ _ l' _) = find l'
find Nil = error "findMin Nil"
-- | /O(min(n,W))/. The maximal element of a set. | 260 | findMin (Bin _ m l r)
| m < 0 = find r
| otherwise = find l
where find (Tip kx bm) = kx + lowestBitSet bm
find (Bin _ _ l' _) = find l'
find Nil = error "findMin Nil"
-- | /O(min(n,W))/. The maximal element of a set. | 260 | false | false | 1 | 8 | 95 | 115 | 50 | 65 | null | null |
brendanhay/gogol | gogol-containeranalysis/gen/Network/Google/Resource/ContainerAnalysis/Projects/ScanConfigs/Get.hs | mpl-2.0 | -- | Creates a value of 'ProjectsScanConfigsGet' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'pscgXgafv'
--
-- * 'pscgUploadProtocol'
--
-- * 'pscgAccessToken'
--
-- * 'pscgUploadType'
--
-- * 'pscgName'
--
-- * 'pscgCallback'
proj... | 651 | projectsScanConfigsGet
:: Text -- ^ 'pscgName'
-> ProjectsScanConfigsGet
projectsScanConfigsGet pPscgName_ =
ProjectsScanConfigsGet'
{ _pscgXgafv = Nothing
, _pscgUploadProtocol = Nothing
, _pscgAccessToken = Nothing
, _pscgUploadType = Nothing
, _pscgName = pPscgName_
, _pscgCallback ... | 335 | projectsScanConfigsGet pPscgName_ =
ProjectsScanConfigsGet'
{ _pscgXgafv = Nothing
, _pscgUploadProtocol = Nothing
, _pscgAccessToken = Nothing
, _pscgUploadType = Nothing
, _pscgName = pPscgName_
, _pscgCallback = Nothing
} | 254 | true | true | 0 | 6 | 128 | 72 | 50 | 22 | null | null |
tamarin-prover/tamarin-prover | lib/theory/src/Theory/Sapic.hs | gpl-3.0 | prettySapicAction' _ (Event a ) = "event " ++ render (prettyLNFact a) | 70 | prettySapicAction' _ (Event a ) = "event " ++ render (prettyLNFact a) | 70 | prettySapicAction' _ (Event a ) = "event " ++ render (prettyLNFact a) | 70 | false | false | 0 | 8 | 12 | 30 | 14 | 16 | null | null |
atwupack/LearnOpenGL | app/1_Getting-started/7_Camera/Camera-mouse.hs | bsd-3-clause | radians :: GLfloat -> GLfloat
radians deg = pi / 180.0 * deg | 60 | radians :: GLfloat -> GLfloat
radians deg = pi / 180.0 * deg | 60 | radians deg = pi / 180.0 * deg | 30 | false | true | 3 | 7 | 12 | 34 | 14 | 20 | null | null |
brendanhay/gogol | gogol-sqladmin/gen/Network/Google/Resource/SQL/Databases/Patch.hs | mpl-2.0 | -- | Upload protocol for media (e.g. \"raw\", \"multipart\").
dpUploadProtocol :: Lens' DatabasesPatch (Maybe Text)
dpUploadProtocol
= lens _dpUploadProtocol
(\ s a -> s{_dpUploadProtocol = a}) | 201 | dpUploadProtocol :: Lens' DatabasesPatch (Maybe Text)
dpUploadProtocol
= lens _dpUploadProtocol
(\ s a -> s{_dpUploadProtocol = a}) | 139 | dpUploadProtocol
= lens _dpUploadProtocol
(\ s a -> s{_dpUploadProtocol = a}) | 85 | true | true | 0 | 8 | 33 | 49 | 25 | 24 | null | null |
brendanhay/gogol | gogol-consumersurveys/gen/Network/Google/Resource/ConsumerSurveys/MobileApppanels/Update.hs | mpl-2.0 | -- | External URL ID for the panel.
mauPanelId :: Lens' MobileApppanelsUpdate Text
mauPanelId
= lens _mauPanelId (\ s a -> s{_mauPanelId = a}) | 144 | mauPanelId :: Lens' MobileApppanelsUpdate Text
mauPanelId
= lens _mauPanelId (\ s a -> s{_mauPanelId = a}) | 108 | mauPanelId
= lens _mauPanelId (\ s a -> s{_mauPanelId = a}) | 61 | true | true | 1 | 9 | 25 | 46 | 22 | 24 | null | null |
kseo/fp | src/FP/Function.hs | bsd-3-clause | length :: Object -> Object
length (SequenceObject os) = makeNumber $ fromIntegral $ Prelude.length os | 101 | length :: Object -> Object
length (SequenceObject os) = makeNumber $ fromIntegral $ Prelude.length os | 101 | length (SequenceObject os) = makeNumber $ fromIntegral $ Prelude.length os | 74 | false | true | 0 | 7 | 14 | 37 | 18 | 19 | null | null |
yxm4109/pandoc | src/Text/Pandoc/Readers/HTML.hs | gpl-2.0 | anyHtmlTag :: GenParser Char ParserState [Char]
anyHtmlTag = try $ do
char '<'
spaces
tag <- many1 alphaNum
attribs <- many htmlAttribute
spaces
ender <- option "" (string "/")
let ender' = if null ender then "" else " /"
spaces
char '>'
let result = "<" ++ tag ++
concatMap (\(_, _, ... | 487 | anyHtmlTag :: GenParser Char ParserState [Char]
anyHtmlTag = try $ do
char '<'
spaces
tag <- many1 alphaNum
attribs <- many htmlAttribute
spaces
ender <- option "" (string "/")
let ender' = if null ender then "" else " /"
spaces
char '>'
let result = "<" ++ tag ++
concatMap (\(_, _, ... | 487 | anyHtmlTag = try $ do
char '<'
spaces
tag <- many1 alphaNum
attribs <- many htmlAttribute
spaces
ender <- option "" (string "/")
let ender' = if null ender then "" else " /"
spaces
char '>'
let result = "<" ++ tag ++
concatMap (\(_, _, raw) -> (' ':raw)) attribs ++ ender' ++ ">"
un... | 439 | false | true | 0 | 18 | 128 | 186 | 88 | 98 | null | null |
tolysz/prepare-ghcjs | spec-lts8/cabal/cabal-install/Distribution/Client/ProjectPlanning.hs | bsd-3-clause | setupHsConfigureFlags :: ElaboratedReadyPackage
-> ElaboratedSharedConfig
-> Verbosity
-> FilePath
-> Cabal.ConfigFlags
setupHsConfigureFlags (ReadyPackage
pkg@ElaboratedConfiguredPackage{..}
... | 3,939 | setupHsConfigureFlags :: ElaboratedReadyPackage
-> ElaboratedSharedConfig
-> Verbosity
-> FilePath
-> Cabal.ConfigFlags
setupHsConfigureFlags (ReadyPackage
pkg@ElaboratedConfiguredPackage{..}
... | 3,939 | setupHsConfigureFlags (ReadyPackage
pkg@ElaboratedConfiguredPackage{..}
pkgdeps)
sharedConfig@ElaboratedSharedConfig{..}
verbosity builddir =
assert (sanityCheckElaboratedConfiguredPackage sharedConfig pkg)
Cabal.Confi... | 3,731 | false | true | 62 | 10 | 1,269 | 549 | 293 | 256 | null | null |
Zankoku-Okuno/ammonite | Language/Ammonite/Syntax/Parser.hs | gpl-3.0 | brackets = inBrackets . between2 ws0 | 36 | brackets = inBrackets . between2 ws0 | 36 | brackets = inBrackets . between2 ws0 | 36 | false | false | 0 | 6 | 5 | 13 | 6 | 7 | null | null |
NCrashed/hjass | test-suites/Language/Jass/Semantic/CheckTest.hs | mit | commonSemanticTest :: TestTree
commonSemanticTest = testGroup "common.j and blizzard.j semantic analysis"
[ testCase "common.j" $ checkJassFile "tests/common.j",
testCase "blizzard.j" $ checkJassFiles ["tests/common.j", "tests/blizzard.j"]
] | 249 | commonSemanticTest :: TestTree
commonSemanticTest = testGroup "common.j and blizzard.j semantic analysis"
[ testCase "common.j" $ checkJassFile "tests/common.j",
testCase "blizzard.j" $ checkJassFiles ["tests/common.j", "tests/blizzard.j"]
] | 249 | commonSemanticTest = testGroup "common.j and blizzard.j semantic analysis"
[ testCase "common.j" $ checkJassFile "tests/common.j",
testCase "blizzard.j" $ checkJassFiles ["tests/common.j", "tests/blizzard.j"]
] | 218 | false | true | 0 | 8 | 31 | 49 | 24 | 25 | null | null |
ozgurakgun/Idris-dev | src/Idris/REPL/Parser.hs | bsd-3-clause | allHelp :: [([String], CmdArg, String)]
allHelp = [ (map (':' :) names, args, text)
| (names, args, text, _) <- parserCommandsForHelp ++ parserCommands ] | 163 | allHelp :: [([String], CmdArg, String)]
allHelp = [ (map (':' :) names, args, text)
| (names, args, text, _) <- parserCommandsForHelp ++ parserCommands ] | 163 | allHelp = [ (map (':' :) names, args, text)
| (names, args, text, _) <- parserCommandsForHelp ++ parserCommands ] | 123 | false | true | 0 | 8 | 33 | 71 | 43 | 28 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.