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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
parsonsmatt/lambda | test/Lambda/UntypedSpec.hs | bsd-3-clause | spec :: Spec
spec = do
describe "with standard library" $ do
Right stdlib <- runIO . loadFromFile $ "std.lm"
let eval' = fmap fullyReduce . flip evaluate stdlib
e = eval' >=> eval' >=> eval' >=> eval'
describe "arithmetic" $ do
let zero = FreeVar "zero"
plus = FreeVar "plus"
one = FreeVar "one"
succ = FreeVar "succ"
otherOne = FreeVar "otherOne"
it "succ zero == one" $ do
e (App succ zero) `shouldBe` e one
it "plus one zero == succ zero" $ do
e (App (App plus one) zero) `shouldBe` e (App succ zero)
it "plus one one == succ one" $ do
pendingWith "the evaluation isn't strongly normalizing"
e (App (App plus one) one) `shouldBe` e (App succ one)
it "one == otherOne" $ do
e one `shouldBe` e otherOne | 947 | spec :: Spec
spec = do
describe "with standard library" $ do
Right stdlib <- runIO . loadFromFile $ "std.lm"
let eval' = fmap fullyReduce . flip evaluate stdlib
e = eval' >=> eval' >=> eval' >=> eval'
describe "arithmetic" $ do
let zero = FreeVar "zero"
plus = FreeVar "plus"
one = FreeVar "one"
succ = FreeVar "succ"
otherOne = FreeVar "otherOne"
it "succ zero == one" $ do
e (App succ zero) `shouldBe` e one
it "plus one zero == succ zero" $ do
e (App (App plus one) zero) `shouldBe` e (App succ zero)
it "plus one one == succ one" $ do
pendingWith "the evaluation isn't strongly normalizing"
e (App (App plus one) one) `shouldBe` e (App succ one)
it "one == otherOne" $ do
e one `shouldBe` e otherOne | 947 | spec = do
describe "with standard library" $ do
Right stdlib <- runIO . loadFromFile $ "std.lm"
let eval' = fmap fullyReduce . flip evaluate stdlib
e = eval' >=> eval' >=> eval' >=> eval'
describe "arithmetic" $ do
let zero = FreeVar "zero"
plus = FreeVar "plus"
one = FreeVar "one"
succ = FreeVar "succ"
otherOne = FreeVar "otherOne"
it "succ zero == one" $ do
e (App succ zero) `shouldBe` e one
it "plus one zero == succ zero" $ do
e (App (App plus one) zero) `shouldBe` e (App succ zero)
it "plus one one == succ one" $ do
pendingWith "the evaluation isn't strongly normalizing"
e (App (App plus one) one) `shouldBe` e (App succ one)
it "one == otherOne" $ do
e one `shouldBe` e otherOne | 934 | false | true | 0 | 21 | 377 | 300 | 136 | 164 | null | null |
sdiehl/ghc | compiler/types/TyCoRep.hs | bsd-3-clause | mkTyVarTys :: [TyVar] -> [Type]
mkTyVarTys = map mkTyVarTy | 58 | mkTyVarTys :: [TyVar] -> [Type]
mkTyVarTys = map mkTyVarTy | 58 | mkTyVarTys = map mkTyVarTy | 26 | false | true | 0 | 6 | 8 | 24 | 13 | 11 | null | null |
jml/graphql-api | src/GraphQL/Internal/Syntax/Parser.hs | bsd-3-clause | inputValueDefinition :: Parser AST.InputValueDefinition
inputValueDefinition = AST.InputValueDefinition
<$> nameParser
<* tok ":"
<*> type_
<*> optional defaultValue | 174 | inputValueDefinition :: Parser AST.InputValueDefinition
inputValueDefinition = AST.InputValueDefinition
<$> nameParser
<* tok ":"
<*> type_
<*> optional defaultValue | 174 | inputValueDefinition = AST.InputValueDefinition
<$> nameParser
<* tok ":"
<*> type_
<*> optional defaultValue | 118 | false | true | 11 | 6 | 25 | 53 | 24 | 29 | null | null |
mtsch/basic-lisp | src/Primitives.hs | bsd-2-clause | stringPrim :: [SExpr] -> IO SExpr
stringPrim = return . String . unwords . map show | 83 | stringPrim :: [SExpr] -> IO SExpr
stringPrim = return . String . unwords . map show | 83 | stringPrim = return . String . unwords . map show | 49 | false | true | 0 | 7 | 15 | 36 | 18 | 18 | null | null |
olsner/ghc | compiler/prelude/THNames.hs | bsd-3-clause | dataFamilyDName = libFun (fsLit "dataFamilyD") dataFamilyDIdKey | 74 | dataFamilyDName = libFun (fsLit "dataFamilyD") dataFamilyDIdKey | 74 | dataFamilyDName = libFun (fsLit "dataFamilyD") dataFamilyDIdKey | 74 | false | false | 0 | 7 | 16 | 17 | 8 | 9 | null | null |
micknelso/language-c | src/Language/CFamily/C/Syntax/Ops.hs | bsd-3-clause | assignBinop COrAssOp = COrOp | 29 | assignBinop COrAssOp = COrOp | 29 | assignBinop COrAssOp = COrOp | 29 | false | false | 0 | 5 | 4 | 9 | 4 | 5 | null | null |
dsorokin/aivika-experiment-chart | Simulation/Aivika/Experiment/Chart/DeviationChartView.hs | bsd-3-clause | deviationChartTOCHtml :: DeviationChartViewState r -> Int -> HtmlWriter ()
deviationChartTOCHtml st index =
writeHtmlListItem $
writeHtmlLink ("#id" ++ show index) $
writeHtmlText (deviationChartTitle $ deviationChartView st) | 231 | deviationChartTOCHtml :: DeviationChartViewState r -> Int -> HtmlWriter ()
deviationChartTOCHtml st index =
writeHtmlListItem $
writeHtmlLink ("#id" ++ show index) $
writeHtmlText (deviationChartTitle $ deviationChartView st) | 231 | deviationChartTOCHtml st index =
writeHtmlListItem $
writeHtmlLink ("#id" ++ show index) $
writeHtmlText (deviationChartTitle $ deviationChartView st) | 156 | false | true | 0 | 10 | 31 | 66 | 31 | 35 | null | null |
ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/shows_2.hs | mit | primModNatS0 x y MyFalse = Succ x | 33 | primModNatS0 x y MyFalse = Succ x | 33 | primModNatS0 x y MyFalse = Succ x | 33 | false | false | 0 | 5 | 6 | 16 | 7 | 9 | null | null |
bacchanalia/KitchenSink | KitchenSink/Qualified.hs | gpl-3.0 | -- |'ArraySR.withStorableArray'
a_withStorableArray = ArraySR.withStorableArray | 79 | a_withStorableArray = ArraySR.withStorableArray | 47 | a_withStorableArray = ArraySR.withStorableArray | 47 | true | false | 0 | 5 | 4 | 9 | 5 | 4 | null | null |
PipocaQuemada/ermine | src/Ermine/Parser.hs | bsd-2-clause | parseState :: Parser ParseState
parseState = Parser $ \s -> Pure s mempty | 73 | parseState :: Parser ParseState
parseState = Parser $ \s -> Pure s mempty | 73 | parseState = Parser $ \s -> Pure s mempty | 41 | false | true | 0 | 7 | 12 | 28 | 14 | 14 | null | null |
martin-kolinek/stack | src/Stack/BuildPlan.hs | bsd-3-clause | selectPackageBuildPlan
:: Platform
-> CompilerVersion 'CVActual
-> Map PackageName Version
-> GenericPackageDescription
-> (Map PackageName (Map FlagName Bool), DepErrors)
selectPackageBuildPlan platform compiler pool gpd =
(selectPlan . limitSearchSpace . NonEmpty.map makePlan) flagCombinations
where
selectPlan :: NonEmpty (a, DepErrors) -> (a, DepErrors)
selectPlan = F.foldr1 fewerErrors
where
fewerErrors p1 p2
| nErrors p1 == 0 = p1
| nErrors p1 <= nErrors p2 = p1
| otherwise = p2
where nErrors = Map.size . snd
-- Avoid exponential complexity in flag combinations making us sad pandas.
-- See: https://github.com/commercialhaskell/stack/issues/543
limitSearchSpace :: NonEmpty a -> NonEmpty a
limitSearchSpace (x :| xs) = x :| take (maxFlagCombinations - 1) xs
where maxFlagCombinations = 128
makePlan :: [(FlagName, Bool)] -> (Map PackageName (Map FlagName Bool), DepErrors)
makePlan flags = checkPackageBuildPlan platform compiler pool (Map.fromList flags) gpd
flagCombinations :: NonEmpty [(FlagName, Bool)]
flagCombinations = mapM getOptions (genPackageFlags gpd)
where
getOptions :: C.Flag -> NonEmpty (FlagName, Bool)
getOptions f
| flagManual f = (fname, flagDefault f) :| []
| flagDefault f = (fname, True) :| [(fname, False)]
| otherwise = (fname, False) :| [(fname, True)]
where fname = (fromCabalFlagName . flagName) f
-- | Check whether with the given set of flags a package's dependency
-- constraints can be satisfied against a given build plan or pool of packages. | 1,692 | selectPackageBuildPlan
:: Platform
-> CompilerVersion 'CVActual
-> Map PackageName Version
-> GenericPackageDescription
-> (Map PackageName (Map FlagName Bool), DepErrors)
selectPackageBuildPlan platform compiler pool gpd =
(selectPlan . limitSearchSpace . NonEmpty.map makePlan) flagCombinations
where
selectPlan :: NonEmpty (a, DepErrors) -> (a, DepErrors)
selectPlan = F.foldr1 fewerErrors
where
fewerErrors p1 p2
| nErrors p1 == 0 = p1
| nErrors p1 <= nErrors p2 = p1
| otherwise = p2
where nErrors = Map.size . snd
-- Avoid exponential complexity in flag combinations making us sad pandas.
-- See: https://github.com/commercialhaskell/stack/issues/543
limitSearchSpace :: NonEmpty a -> NonEmpty a
limitSearchSpace (x :| xs) = x :| take (maxFlagCombinations - 1) xs
where maxFlagCombinations = 128
makePlan :: [(FlagName, Bool)] -> (Map PackageName (Map FlagName Bool), DepErrors)
makePlan flags = checkPackageBuildPlan platform compiler pool (Map.fromList flags) gpd
flagCombinations :: NonEmpty [(FlagName, Bool)]
flagCombinations = mapM getOptions (genPackageFlags gpd)
where
getOptions :: C.Flag -> NonEmpty (FlagName, Bool)
getOptions f
| flagManual f = (fname, flagDefault f) :| []
| flagDefault f = (fname, True) :| [(fname, False)]
| otherwise = (fname, False) :| [(fname, True)]
where fname = (fromCabalFlagName . flagName) f
-- | Check whether with the given set of flags a package's dependency
-- constraints can be satisfied against a given build plan or pool of packages. | 1,692 | selectPackageBuildPlan platform compiler pool gpd =
(selectPlan . limitSearchSpace . NonEmpty.map makePlan) flagCombinations
where
selectPlan :: NonEmpty (a, DepErrors) -> (a, DepErrors)
selectPlan = F.foldr1 fewerErrors
where
fewerErrors p1 p2
| nErrors p1 == 0 = p1
| nErrors p1 <= nErrors p2 = p1
| otherwise = p2
where nErrors = Map.size . snd
-- Avoid exponential complexity in flag combinations making us sad pandas.
-- See: https://github.com/commercialhaskell/stack/issues/543
limitSearchSpace :: NonEmpty a -> NonEmpty a
limitSearchSpace (x :| xs) = x :| take (maxFlagCombinations - 1) xs
where maxFlagCombinations = 128
makePlan :: [(FlagName, Bool)] -> (Map PackageName (Map FlagName Bool), DepErrors)
makePlan flags = checkPackageBuildPlan platform compiler pool (Map.fromList flags) gpd
flagCombinations :: NonEmpty [(FlagName, Bool)]
flagCombinations = mapM getOptions (genPackageFlags gpd)
where
getOptions :: C.Flag -> NonEmpty (FlagName, Bool)
getOptions f
| flagManual f = (fname, flagDefault f) :| []
| flagDefault f = (fname, True) :| [(fname, False)]
| otherwise = (fname, False) :| [(fname, True)]
where fname = (fromCabalFlagName . flagName) f
-- | Check whether with the given set of flags a package's dependency
-- constraints can be satisfied against a given build plan or pool of packages. | 1,500 | false | true | 4 | 14 | 416 | 517 | 252 | 265 | null | null |
thomaseding/cgs | src/Hoops/SegPath.hs | bsd-3-clause | parsePathParts :: SegParser [PathPart]
parsePathParts = parsePathPart `sepBy1` char '/' | 87 | parsePathParts :: SegParser [PathPart]
parsePathParts = parsePathPart `sepBy1` char '/' | 87 | parsePathParts = parsePathPart `sepBy1` char '/' | 48 | false | true | 0 | 6 | 9 | 26 | 14 | 12 | null | null |
pjones/xmonad-test | vendor/xmonad-contrib/XMonad/Layout/BoringWindows.hs | bsd-2-clause | focusDown = sendMessage UpdateBoring >> sendMessage FocusDown | 61 | focusDown = sendMessage UpdateBoring >> sendMessage FocusDown | 61 | focusDown = sendMessage UpdateBoring >> sendMessage FocusDown | 61 | false | false | 1 | 6 | 6 | 19 | 7 | 12 | null | null |
kim/amazonka | amazonka-cloudformation/gen/Network/AWS/CloudFormation/Types.hs | mpl-2.0 | -- | The time the stack was last updated. This field will only be returned if the
-- stack has been updated at least once.
ssLastUpdatedTime :: Lens' StackSummary (Maybe UTCTime)
ssLastUpdatedTime =
lens _ssLastUpdatedTime (\s a -> s { _ssLastUpdatedTime = a })
. mapping _Time | 289 | ssLastUpdatedTime :: Lens' StackSummary (Maybe UTCTime)
ssLastUpdatedTime =
lens _ssLastUpdatedTime (\s a -> s { _ssLastUpdatedTime = a })
. mapping _Time | 166 | ssLastUpdatedTime =
lens _ssLastUpdatedTime (\s a -> s { _ssLastUpdatedTime = a })
. mapping _Time | 110 | true | true | 0 | 10 | 58 | 54 | 29 | 25 | null | null |
brendanhay/gogol | gogol-androidmanagement/gen/Network/Google/Resource/AndroidManagement/SignupURLs/Create.hs | mpl-2.0 | -- | The ID of the Google Cloud Platform project which will own the
-- enterprise.
sucProjectId :: Lens' SignupURLsCreate (Maybe Text)
sucProjectId
= lens _sucProjectId (\ s a -> s{_sucProjectId = a}) | 202 | sucProjectId :: Lens' SignupURLsCreate (Maybe Text)
sucProjectId
= lens _sucProjectId (\ s a -> s{_sucProjectId = a}) | 119 | sucProjectId
= lens _sucProjectId (\ s a -> s{_sucProjectId = a}) | 67 | true | true | 0 | 9 | 34 | 49 | 26 | 23 | null | null |
josuf107/Adverb | Adverb/Common.hs | gpl-3.0 | fractionally = id | 17 | fractionally = id | 17 | fractionally = id | 17 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
yav/allegro | cbits/wrap_colors.hs | bsd-3-clause | float :: Type
float = DirectType (TyFloating TyFloat) noTypeQuals [] | 68 | float :: Type
float = DirectType (TyFloating TyFloat) noTypeQuals [] | 68 | float = DirectType (TyFloating TyFloat) noTypeQuals [] | 54 | false | true | 0 | 7 | 9 | 33 | 14 | 19 | null | null |
beni55/haste-compiler | libraries/ghc-7.10/ghc-prim/GHC/Prim.hs | bsd-3-clause | -- | Divide two vectors element-wise.
divideFloatX4# :: FloatX4# -> FloatX4# -> FloatX4#
divideFloatX4# = let x = x in x | 122 | divideFloatX4# :: FloatX4# -> FloatX4# -> FloatX4#
divideFloatX4# = let x = x in x | 82 | divideFloatX4# = let x = x in x | 31 | true | true | 0 | 8 | 22 | 38 | 17 | 21 | null | null |
punitrathore/haskell-first-principles | src/Programmer.hs | bsd-3-clause | allLanguages :: [ProgrammingLanguage]
allLanguages = [Haskell, Agda, Idris, PureScript, Haskell] | 96 | allLanguages :: [ProgrammingLanguage]
allLanguages = [Haskell, Agda, Idris, PureScript, Haskell] | 96 | allLanguages = [Haskell, Agda, Idris, PureScript, Haskell] | 58 | false | true | 0 | 5 | 9 | 29 | 18 | 11 | null | null |
walck/cyclotomic | src/Data/Complex/Cyclotomic.hs | gpl-3.0 | removeExps :: Integer -> Integer -> Integer -> [Integer]
removeExps n 2 q = concatMap (includeMods n q) $ map ((n `div` q) *) [q `div` 2..q-1] | 142 | removeExps :: Integer -> Integer -> Integer -> [Integer]
removeExps n 2 q = concatMap (includeMods n q) $ map ((n `div` q) *) [q `div` 2..q-1] | 142 | removeExps n 2 q = concatMap (includeMods n q) $ map ((n `div` q) *) [q `div` 2..q-1] | 85 | false | true | 0 | 10 | 26 | 86 | 45 | 41 | null | null |
todays-mitsui/lambda2ski | src/PPrint.hs | mit | render' :: [Phrase] -> ByteString
render' [] = "" | 56 | render' :: [Phrase] -> ByteString
render' [] = "" | 56 | render' [] = "" | 22 | false | true | 0 | 6 | 15 | 23 | 12 | 11 | null | null |
ekmett/wl-pprint-terminfo | src/System/Console/Terminfo/PrettyPrint.hs | bsd-2-clause | eval (Push Bold) = modify (Bold:) *> lift boldOn | 58 | eval (Push Bold) = modify (Bold:) *> lift boldOn | 58 | eval (Push Bold) = modify (Bold:) *> lift boldOn | 58 | false | false | 0 | 7 | 18 | 30 | 14 | 16 | null | null |
sjoerdvisscher/icfp2011 | src/Brain/Tom.hs | bsd-3-clause | deadSlots :: B [SlotNr]
deadSlots = do
slts <- slots opponent
let ss = map snd . reverse . sort . (map . first $ size . Core.field)
$ filter (dead . fst) $ zip (V.toList slts) [0 :: Int ..]
return $ ss
-- | Proponent's slots that are empty, sorted by vitality | 279 | deadSlots :: B [SlotNr]
deadSlots = do
slts <- slots opponent
let ss = map snd . reverse . sort . (map . first $ size . Core.field)
$ filter (dead . fst) $ zip (V.toList slts) [0 :: Int ..]
return $ ss
-- | Proponent's slots that are empty, sorted by vitality | 279 | deadSlots = do
slts <- slots opponent
let ss = map snd . reverse . sort . (map . first $ size . Core.field)
$ filter (dead . fst) $ zip (V.toList slts) [0 :: Int ..]
return $ ss
-- | Proponent's slots that are empty, sorted by vitality | 255 | false | true | 0 | 16 | 73 | 114 | 57 | 57 | null | null |
rueshyna/gogol | gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/ServiceAccountkeys/Delete.hs | mpl-2.0 | -- | Creates a value of 'ServiceAccountkeysDelete' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'sadKeyId'
--
-- * 'sadEnterpriseId'
serviceAccountkeysDelete
:: Text -- ^ 'sadKeyId'
-> Text -- ^ 'sadEnterpriseId'
-> ServiceAccountkeysDelete
serviceAccountkeysDelete pSadKeyId_ pSadEnterpriseId_ =
ServiceAccountkeysDelete'
{ _sadKeyId = pSadKeyId_
, _sadEnterpriseId = pSadEnterpriseId_
} | 504 | serviceAccountkeysDelete
:: Text -- ^ 'sadKeyId'
-> Text -- ^ 'sadEnterpriseId'
-> ServiceAccountkeysDelete
serviceAccountkeysDelete pSadKeyId_ pSadEnterpriseId_ =
ServiceAccountkeysDelete'
{ _sadKeyId = pSadKeyId_
, _sadEnterpriseId = pSadEnterpriseId_
} | 283 | serviceAccountkeysDelete pSadKeyId_ pSadEnterpriseId_ =
ServiceAccountkeysDelete'
{ _sadKeyId = pSadKeyId_
, _sadEnterpriseId = pSadEnterpriseId_
} | 163 | true | true | 0 | 8 | 92 | 56 | 32 | 24 | null | null |
blanu/arbre-go | Arbre/Native.hs | gpl-2.0 | functionsToObject :: [String] -> ObjectDef
functionsToObject methods = ObjectDef [] | 83 | functionsToObject :: [String] -> ObjectDef
functionsToObject methods = ObjectDef [] | 83 | functionsToObject methods = ObjectDef [] | 40 | false | true | 0 | 6 | 9 | 26 | 13 | 13 | null | null |
sethfowler/hslibvoyeur | src/System/Process/Voyeur/FFI.hs | bsd-3-clause | createContext :: IO VoyeurContext
createContext = VoyeurContext <$> voyeur_context_create | 89 | createContext :: IO VoyeurContext
createContext = VoyeurContext <$> voyeur_context_create | 89 | createContext = VoyeurContext <$> voyeur_context_create | 55 | false | true | 2 | 6 | 8 | 25 | 10 | 15 | null | null |
ssaavedra/liquidhaskell | src/Language/Haskell/Liquid/Desugar710/Coverage.hs | bsd-3-clause | isGoodSrcSpan' (UnhelpfulSpan _) = False | 40 | isGoodSrcSpan' (UnhelpfulSpan _) = False | 40 | isGoodSrcSpan' (UnhelpfulSpan _) = False | 40 | false | false | 0 | 7 | 4 | 15 | 7 | 8 | null | null |
ihc/futhark | src/Futhark/Construct.hs | isc | letTupExp' name ses = do vs <- letTupExp name ses
return $ map Var vs | 94 | letTupExp' name ses = do vs <- letTupExp name ses
return $ map Var vs | 94 | letTupExp' name ses = do vs <- letTupExp name ses
return $ map Var vs | 94 | false | false | 0 | 8 | 39 | 35 | 15 | 20 | null | null |
thoughtpolice/calc | Parser.hs | bsd-3-clause | lexer ('+':xs) = TAdd : lexer xs | 35 | lexer ('+':xs) = TAdd : lexer xs | 35 | lexer ('+':xs) = TAdd : lexer xs | 35 | false | false | 0 | 6 | 9 | 24 | 11 | 13 | null | null |
limaner2002/EPC-tools | app/Main.hs | bsd-3-clause | readTime' :: ParseTime a => String -> ReadM a
readTime' fmt = do
input <- readerAsk
parseTimeM True defaultTimeLocale fmt input | 131 | readTime' :: ParseTime a => String -> ReadM a
readTime' fmt = do
input <- readerAsk
parseTimeM True defaultTimeLocale fmt input | 131 | readTime' fmt = do
input <- readerAsk
parseTimeM True defaultTimeLocale fmt input | 85 | false | true | 0 | 7 | 24 | 47 | 21 | 26 | null | null |
jkoppel/compstrat | Data/Comp/Multi/Strategic.hs | bsd-3-clause | foldT :: (HFoldable f, Monoid t, Applicative m) => GTranslateM m (Term f) t -> TranslateM m (Term f) l t
foldT t (Term tree) = hfoldl (\s x -> liftA2 mappend s (t x)) (pure mempty) tree | 185 | foldT :: (HFoldable f, Monoid t, Applicative m) => GTranslateM m (Term f) t -> TranslateM m (Term f) l t
foldT t (Term tree) = hfoldl (\s x -> liftA2 mappend s (t x)) (pure mempty) tree | 185 | foldT t (Term tree) = hfoldl (\s x -> liftA2 mappend s (t x)) (pure mempty) tree | 80 | false | true | 0 | 10 | 37 | 116 | 56 | 60 | null | null |
brendanhay/gogol | gogol-accessapproval/gen/Network/Google/Resource/AccessApproval/Organizations/GetAccessApprovalSettings.hs | mpl-2.0 | -- | V1 error format.
ogaasXgafv :: Lens' OrganizationsGetAccessApprovalSettings (Maybe Xgafv)
ogaasXgafv
= lens _ogaasXgafv (\ s a -> s{_ogaasXgafv = a}) | 156 | ogaasXgafv :: Lens' OrganizationsGetAccessApprovalSettings (Maybe Xgafv)
ogaasXgafv
= lens _ogaasXgafv (\ s a -> s{_ogaasXgafv = a}) | 134 | ogaasXgafv
= lens _ogaasXgafv (\ s a -> s{_ogaasXgafv = a}) | 61 | true | true | 0 | 9 | 23 | 48 | 25 | 23 | null | null |
futtetennista/IntroductionToFunctionalProgramming | RWH/src/Ch26/test/Spec.hs | mit | prop :: Testable prop => Int -> String -> prop -> SpecWith ()
prop size title =
modifyMaxSize (const size) . it title . property | 130 | prop :: Testable prop => Int -> String -> prop -> SpecWith ()
prop size title =
modifyMaxSize (const size) . it title . property | 130 | prop size title =
modifyMaxSize (const size) . it title . property | 68 | false | true | 0 | 10 | 26 | 60 | 28 | 32 | null | null |
5outh/wyas | Evaluator.hs | gpl-2.0 | unpackStr a = throwError $ TypeMismatch "string" a | 50 | unpackStr a = throwError $ TypeMismatch "string" a | 50 | unpackStr a = throwError $ TypeMismatch "string" a | 50 | false | false | 0 | 6 | 7 | 18 | 8 | 10 | null | null |
rumblesan/improviz | src/Gfx/FontHandling.hs | bsd-3-clause | fontFaceFromMemory :: FT_Library -> IO FT_Face
fontFaceFromMemory ft = do
B.useAsCStringLen defaultFont $ \(cstr, len) -> do
let custr = castPtr cstr
alloca $ \ptr -> do
runFreeType $ ft_New_Memory_Face ft custr (fromIntegral len) 0 ptr
peek ptr | 267 | fontFaceFromMemory :: FT_Library -> IO FT_Face
fontFaceFromMemory ft = do
B.useAsCStringLen defaultFont $ \(cstr, len) -> do
let custr = castPtr cstr
alloca $ \ptr -> do
runFreeType $ ft_New_Memory_Face ft custr (fromIntegral len) 0 ptr
peek ptr | 267 | fontFaceFromMemory ft = do
B.useAsCStringLen defaultFont $ \(cstr, len) -> do
let custr = castPtr cstr
alloca $ \ptr -> do
runFreeType $ ft_New_Memory_Face ft custr (fromIntegral len) 0 ptr
peek ptr | 220 | false | true | 0 | 19 | 59 | 102 | 47 | 55 | null | null |
ilikebits/euler | src/Group4.hs | bsd-3-clause | {-
The decimal number, 585 = 1001001001_2 (binary), is palindromic in both bases.
Find the sum of all numbers, less than one million, which are palindromic in
base 10 and base 2.
(Please note that the palindromic number, in either base, may not include
leading zeros.)
-}
isDoublePalindrome :: (Integral a, Show a) => a -> Bool
isDoublePalindrome n = isPalindrome n && isPalindrome (showIntAtBase 2 intToDigit n "") | 418 | isDoublePalindrome :: (Integral a, Show a) => a -> Bool
isDoublePalindrome n = isPalindrome n && isPalindrome (showIntAtBase 2 intToDigit n "") | 143 | isDoublePalindrome n = isPalindrome n && isPalindrome (showIntAtBase 2 intToDigit n "") | 87 | true | true | 0 | 8 | 71 | 56 | 28 | 28 | null | null |
akc/gfscript | HOPS/GF/CFrac/Reference.hs | bsd-3-clause | stieltjes' (x:xs) = x : map snd (solve es (map (/x) xs))
where
Series (1:es) = sfrac n 0
n = length xs | 112 | stieltjes' (x:xs) = x : map snd (solve es (map (/x) xs))
where
Series (1:es) = sfrac n 0
n = length xs | 112 | stieltjes' (x:xs) = x : map snd (solve es (map (/x) xs))
where
Series (1:es) = sfrac n 0
n = length xs | 112 | false | false | 1 | 11 | 32 | 75 | 38 | 37 | null | null |
jean-edouard/manager | updatemgr/UpdateMgr/UpdateReqHandler.hs | gpl-2.0 | handleUpdateReq (CancelDownload h) = eitherErr . catchingLiftIO $ curlCancelDownload h | 86 | handleUpdateReq (CancelDownload h) = eitherErr . catchingLiftIO $ curlCancelDownload h | 86 | handleUpdateReq (CancelDownload h) = eitherErr . catchingLiftIO $ curlCancelDownload h | 86 | false | false | 0 | 7 | 9 | 26 | 12 | 14 | null | null |
lukexi/ghc-7.8-arm64 | testsuite/tests/lib/integer/integerGmpInternals.hs | bsd-3-clause | main :: IO ()
main = do
print $ I.powModInteger b e m
print $ I.powModInteger b e (m-1)
print $ I.powModSecInteger b e (m-1)
print $ gcdExtInteger b e
print $ gcdExtInteger e b
print $ gcdExtInteger x y
print $ gcdExtInteger y x
print $ powInteger 12345 0
print $ powInteger 12345 1
print $ powInteger 12345 30
print $ [ (x,i) | x <- [0..71], let i = I.recipModInteger x (2*3*11*11*17*17), i /= 0 ]
print $ I.nextPrimeInteger b
print $ I.nextPrimeInteger e
print $ [ k | k <- [ 0 .. 200 ], S# (I.testPrimeInteger k 25#) `elem` [1,2] ]
print $ rle [ S# (I.testPrimeInteger k 25#) | k <- [ x .. x + 1000 ] ]
print $ rle [ S# (I.testPrimeInteger k 25#) | k <- [ e .. e + 1000 ] ]
-- import/export primitives
print $ [ W# (I.sizeInBaseInteger x 2#) | x <- [b1024,b*e,b,e,m,x,y,-1,0,1] ]
print $ [ W# (I.sizeInBaseInteger x 256#) | x <- [b1024,b*e,b,e,m,x,y,-1,0,1] ]
BA ba <- do
MBA mba <- newByteArray 128##
forM_ (zip [0..127] [0x01..]) $ \(I# i, w) -> do
writeByteArray mba i w
let a = byteArrayContents# (unsafeCoerce# mba)
print =<< importIntegerAddr a 0## 1#
print =<< importIntegerAddr a 0## -1#
print =<< importIntegerAddr (plusAddr# a 22#) 1## 1#
print =<< importIntegerAddr (plusAddr# a 97#) 1## -1#
print =<< importIntegerAddr a 23## 1#
print =<< importIntegerAddr a 23## -1#
-- no-op
print =<< exportIntegerAddr 0 (plusAddr# a 0#) 1#
-- write into array
print =<< exportIntegerAddr b (plusAddr# a 5#) 1#
print =<< exportIntegerAddr e (plusAddr# a 50#) -1#
print =<< exportInteger m mba 85## 1#
print =<< exportInteger m mba 105## -1#
print =<< importIntegerAddr (plusAddr# a 85#) 17## 1#
print =<< importIntegerAddr (plusAddr# a 105#) 17## -1#
-- read back full array
print =<< importIntegerAddr a 128## 1#
print =<< importIntegerAddr a 128## -1#
freezeByteArray mba
print $ importInteger ba 0## 0## 1#
print $ importInteger ba 0## 0## -1#
print $ importInteger ba 5## 29## 1#
print $ importInteger ba 50## 29## -1#
print $ importInteger ba 0## 128## 1#
print $ importInteger ba 0## 128## -1#
return ()
where
b = 2988348162058574136915891421498819466320163312926952423791023078876139
e = 2351399303373464486466122544523690094744975233415544072992656881240319
m = 10^(40::Int)
x = 5328841272400314897981163497728751426
y = 32052182750761975518649228050096851724
b1024 = roll (map fromIntegral (take 128 [0x80::Int .. ]))
rle = map (\x -> (length x, head x)) . group
roll :: [Word8] -> Integer
roll = foldr (\b a -> a `shiftL` 8 .|. fromIntegral b) 0 | 2,815 | main :: IO ()
main = do
print $ I.powModInteger b e m
print $ I.powModInteger b e (m-1)
print $ I.powModSecInteger b e (m-1)
print $ gcdExtInteger b e
print $ gcdExtInteger e b
print $ gcdExtInteger x y
print $ gcdExtInteger y x
print $ powInteger 12345 0
print $ powInteger 12345 1
print $ powInteger 12345 30
print $ [ (x,i) | x <- [0..71], let i = I.recipModInteger x (2*3*11*11*17*17), i /= 0 ]
print $ I.nextPrimeInteger b
print $ I.nextPrimeInteger e
print $ [ k | k <- [ 0 .. 200 ], S# (I.testPrimeInteger k 25#) `elem` [1,2] ]
print $ rle [ S# (I.testPrimeInteger k 25#) | k <- [ x .. x + 1000 ] ]
print $ rle [ S# (I.testPrimeInteger k 25#) | k <- [ e .. e + 1000 ] ]
-- import/export primitives
print $ [ W# (I.sizeInBaseInteger x 2#) | x <- [b1024,b*e,b,e,m,x,y,-1,0,1] ]
print $ [ W# (I.sizeInBaseInteger x 256#) | x <- [b1024,b*e,b,e,m,x,y,-1,0,1] ]
BA ba <- do
MBA mba <- newByteArray 128##
forM_ (zip [0..127] [0x01..]) $ \(I# i, w) -> do
writeByteArray mba i w
let a = byteArrayContents# (unsafeCoerce# mba)
print =<< importIntegerAddr a 0## 1#
print =<< importIntegerAddr a 0## -1#
print =<< importIntegerAddr (plusAddr# a 22#) 1## 1#
print =<< importIntegerAddr (plusAddr# a 97#) 1## -1#
print =<< importIntegerAddr a 23## 1#
print =<< importIntegerAddr a 23## -1#
-- no-op
print =<< exportIntegerAddr 0 (plusAddr# a 0#) 1#
-- write into array
print =<< exportIntegerAddr b (plusAddr# a 5#) 1#
print =<< exportIntegerAddr e (plusAddr# a 50#) -1#
print =<< exportInteger m mba 85## 1#
print =<< exportInteger m mba 105## -1#
print =<< importIntegerAddr (plusAddr# a 85#) 17## 1#
print =<< importIntegerAddr (plusAddr# a 105#) 17## -1#
-- read back full array
print =<< importIntegerAddr a 128## 1#
print =<< importIntegerAddr a 128## -1#
freezeByteArray mba
print $ importInteger ba 0## 0## 1#
print $ importInteger ba 0## 0## -1#
print $ importInteger ba 5## 29## 1#
print $ importInteger ba 50## 29## -1#
print $ importInteger ba 0## 128## 1#
print $ importInteger ba 0## 128## -1#
return ()
where
b = 2988348162058574136915891421498819466320163312926952423791023078876139
e = 2351399303373464486466122544523690094744975233415544072992656881240319
m = 10^(40::Int)
x = 5328841272400314897981163497728751426
y = 32052182750761975518649228050096851724
b1024 = roll (map fromIntegral (take 128 [0x80::Int .. ]))
rle = map (\x -> (length x, head x)) . group
roll :: [Word8] -> Integer
roll = foldr (\b a -> a `shiftL` 8 .|. fromIntegral b) 0 | 2,815 | main = do
print $ I.powModInteger b e m
print $ I.powModInteger b e (m-1)
print $ I.powModSecInteger b e (m-1)
print $ gcdExtInteger b e
print $ gcdExtInteger e b
print $ gcdExtInteger x y
print $ gcdExtInteger y x
print $ powInteger 12345 0
print $ powInteger 12345 1
print $ powInteger 12345 30
print $ [ (x,i) | x <- [0..71], let i = I.recipModInteger x (2*3*11*11*17*17), i /= 0 ]
print $ I.nextPrimeInteger b
print $ I.nextPrimeInteger e
print $ [ k | k <- [ 0 .. 200 ], S# (I.testPrimeInteger k 25#) `elem` [1,2] ]
print $ rle [ S# (I.testPrimeInteger k 25#) | k <- [ x .. x + 1000 ] ]
print $ rle [ S# (I.testPrimeInteger k 25#) | k <- [ e .. e + 1000 ] ]
-- import/export primitives
print $ [ W# (I.sizeInBaseInteger x 2#) | x <- [b1024,b*e,b,e,m,x,y,-1,0,1] ]
print $ [ W# (I.sizeInBaseInteger x 256#) | x <- [b1024,b*e,b,e,m,x,y,-1,0,1] ]
BA ba <- do
MBA mba <- newByteArray 128##
forM_ (zip [0..127] [0x01..]) $ \(I# i, w) -> do
writeByteArray mba i w
let a = byteArrayContents# (unsafeCoerce# mba)
print =<< importIntegerAddr a 0## 1#
print =<< importIntegerAddr a 0## -1#
print =<< importIntegerAddr (plusAddr# a 22#) 1## 1#
print =<< importIntegerAddr (plusAddr# a 97#) 1## -1#
print =<< importIntegerAddr a 23## 1#
print =<< importIntegerAddr a 23## -1#
-- no-op
print =<< exportIntegerAddr 0 (plusAddr# a 0#) 1#
-- write into array
print =<< exportIntegerAddr b (plusAddr# a 5#) 1#
print =<< exportIntegerAddr e (plusAddr# a 50#) -1#
print =<< exportInteger m mba 85## 1#
print =<< exportInteger m mba 105## -1#
print =<< importIntegerAddr (plusAddr# a 85#) 17## 1#
print =<< importIntegerAddr (plusAddr# a 105#) 17## -1#
-- read back full array
print =<< importIntegerAddr a 128## 1#
print =<< importIntegerAddr a 128## -1#
freezeByteArray mba
print $ importInteger ba 0## 0## 1#
print $ importInteger ba 0## 0## -1#
print $ importInteger ba 5## 29## 1#
print $ importInteger ba 50## 29## -1#
print $ importInteger ba 0## 128## 1#
print $ importInteger ba 0## 128## -1#
return ()
where
b = 2988348162058574136915891421498819466320163312926952423791023078876139
e = 2351399303373464486466122544523690094744975233415544072992656881240319
m = 10^(40::Int)
x = 5328841272400314897981163497728751426
y = 32052182750761975518649228050096851724
b1024 = roll (map fromIntegral (take 128 [0x80::Int .. ]))
rle = map (\x -> (length x, head x)) . group
roll :: [Word8] -> Integer
roll = foldr (\b a -> a `shiftL` 8 .|. fromIntegral b) 0 | 2,801 | false | true | 10 | 19 | 775 | 1,188 | 574 | 614 | null | null |
micknelso/language-c | test-framework/Language/C/Test/Framework.hs | bsd-3-clause | emptyTestResults :: String -> [FilePath] -> TestRun
emptyTestResults obj inpFs = TestResults { testObject = obj, testInputFiles = inpFs, testResults = Map.empty } | 162 | emptyTestResults :: String -> [FilePath] -> TestRun
emptyTestResults obj inpFs = TestResults { testObject = obj, testInputFiles = inpFs, testResults = Map.empty } | 162 | emptyTestResults obj inpFs = TestResults { testObject = obj, testInputFiles = inpFs, testResults = Map.empty } | 110 | false | true | 0 | 7 | 22 | 49 | 28 | 21 | null | null |
vdweegen/UvA-Software_Testing | Lab2/Bauke/Exercises.hs | gpl-3.0 | prop_other (Positive a) (Positive b) (Positive c) = triangleCombinations a b c Other | 84 | prop_other (Positive a) (Positive b) (Positive c) = triangleCombinations a b c Other | 84 | prop_other (Positive a) (Positive b) (Positive c) = triangleCombinations a b c Other | 84 | false | false | 1 | 7 | 12 | 42 | 19 | 23 | null | null |
monostable/haskell-kicad-data | Data/Kicad/PcbnewExpr/PcbnewExpr.hs | mit | toSxStr :: String -> String -> SExpr
toSxStr kw s = List pos [Atom pos kw, Atom pos s] | 86 | toSxStr :: String -> String -> SExpr
toSxStr kw s = List pos [Atom pos kw, Atom pos s] | 86 | toSxStr kw s = List pos [Atom pos kw, Atom pos s] | 49 | false | true | 0 | 7 | 18 | 45 | 22 | 23 | null | null |
zhiyuanshi/fcore | frontend/typecheck/TypeCheck.hs | bsd-2-clause | checkMethodCall :: JReceiver ClassName -> MethodName -> [ClassName] -> Checker ClassName
checkMethodCall receiver m args
= do conn <- getTypeServer
res <- liftIO (JvmTypeQuery.findMethodReturnType conn c (is_static, m) args)
case res of
Nothing -> throwError (L NoLoc (NoSuchMethod receiver m args)) -- FIXME: Should be the location of the method name
Just return_class -> return return_class
where
(is_static, c) = unwrapJReceiver receiver | 495 | checkMethodCall :: JReceiver ClassName -> MethodName -> [ClassName] -> Checker ClassName
checkMethodCall receiver m args
= do conn <- getTypeServer
res <- liftIO (JvmTypeQuery.findMethodReturnType conn c (is_static, m) args)
case res of
Nothing -> throwError (L NoLoc (NoSuchMethod receiver m args)) -- FIXME: Should be the location of the method name
Just return_class -> return return_class
where
(is_static, c) = unwrapJReceiver receiver | 495 | checkMethodCall receiver m args
= do conn <- getTypeServer
res <- liftIO (JvmTypeQuery.findMethodReturnType conn c (is_static, m) args)
case res of
Nothing -> throwError (L NoLoc (NoSuchMethod receiver m args)) -- FIXME: Should be the location of the method name
Just return_class -> return return_class
where
(is_static, c) = unwrapJReceiver receiver | 406 | false | true | 0 | 14 | 116 | 141 | 68 | 73 | null | null |
jrraymond/ray-tracer | src/SceneParser.hs | gpl-3.0 | {- Factor := (Expression) | Float -}
factor :: Stream s m Char => ParsecT s u m Expr
factor = (revFloat >>= return . NumN)
<||> (char 't' >> return VarT)
<|> (char ')' >> expr >>= \e -> char '(' >> return e) | 216 | factor :: Stream s m Char => ParsecT s u m Expr
factor = (revFloat >>= return . NumN)
<||> (char 't' >> return VarT)
<|> (char ')' >> expr >>= \e -> char '(' >> return e) | 179 | factor = (revFloat >>= return . NumN)
<||> (char 't' >> return VarT)
<|> (char ')' >> expr >>= \e -> char '(' >> return e) | 131 | true | true | 6 | 10 | 53 | 106 | 52 | 54 | null | null |
sgillespie/ghc | compiler/coreSyn/TrieMap.hs | bsd-3-clause | emptyCoreMap :: CoreMap a
emptyCoreMap = emptyTM | 48 | emptyCoreMap :: CoreMap a
emptyCoreMap = emptyTM | 48 | emptyCoreMap = emptyTM | 22 | false | true | 0 | 5 | 6 | 14 | 7 | 7 | null | null |
btipling/machine-vm | src/Machine/Memory.hs | bsd-3-clause | functionFromAddress4 a b c d fn address = let
r = Gates.dmux4Way True address
result = case r of (True, False, False, False) -> fn a
(False, True, False, False) -> fn b
(False, False, True, False) -> fn c
(False, False, False, True) -> fn d
in (result) | 333 | functionFromAddress4 a b c d fn address = let
r = Gates.dmux4Way True address
result = case r of (True, False, False, False) -> fn a
(False, True, False, False) -> fn b
(False, False, True, False) -> fn c
(False, False, False, True) -> fn d
in (result) | 333 | functionFromAddress4 a b c d fn address = let
r = Gates.dmux4Way True address
result = case r of (True, False, False, False) -> fn a
(False, True, False, False) -> fn b
(False, False, True, False) -> fn c
(False, False, False, True) -> fn d
in (result) | 333 | false | false | 0 | 12 | 129 | 133 | 72 | 61 | null | null |
mitar/nxt | tests/Robotics/NXT/Basic.hs | lgpl-3.0 | testNXT :: IORef NXTInternals -> NXT a -> IO a
testNXT ref t = do
let t' = do r <- t
maybeKeepAlive
return r
nxt <- readIORef ref
(res, nxt') <- runNXT t' nxt
writeIORef ref nxt'
return res | 227 | testNXT :: IORef NXTInternals -> NXT a -> IO a
testNXT ref t = do
let t' = do r <- t
maybeKeepAlive
return r
nxt <- readIORef ref
(res, nxt') <- runNXT t' nxt
writeIORef ref nxt'
return res | 227 | testNXT ref t = do
let t' = do r <- t
maybeKeepAlive
return r
nxt <- readIORef ref
(res, nxt') <- runNXT t' nxt
writeIORef ref nxt'
return res | 180 | false | true | 0 | 13 | 77 | 105 | 44 | 61 | null | null |
alexander-at-github/eta | compiler/ETA/Prelude/PrimOp.hs | bsd-3-clause | primOpOutOfLine MaskStatus = True | 33 | primOpOutOfLine MaskStatus = True | 33 | primOpOutOfLine MaskStatus = True | 33 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
ian-ross/cabal | Cabal/tests/PackageTests/TestSuiteExeV10/Check.hs | bsd-3-clause | correctHpcVersion :: IO Bool
correctHpcVersion = do
let programDb' = emptyProgramDb
let verbosity = Verbosity.normal
let verRange = orLaterVersion (Version [0,7] [])
programDb <- configureProgram verbosity hpcProgram programDb'
(requireProgramVersion verbosity hpcProgram verRange programDb
>> return True) `catchIO` (\_ -> return False)
where
-- Distribution.Compat.Exception is hidden.
catchIO :: IO a -> (E.IOException -> IO a) -> IO a
catchIO = E.catch | 496 | correctHpcVersion :: IO Bool
correctHpcVersion = do
let programDb' = emptyProgramDb
let verbosity = Verbosity.normal
let verRange = orLaterVersion (Version [0,7] [])
programDb <- configureProgram verbosity hpcProgram programDb'
(requireProgramVersion verbosity hpcProgram verRange programDb
>> return True) `catchIO` (\_ -> return False)
where
-- Distribution.Compat.Exception is hidden.
catchIO :: IO a -> (E.IOException -> IO a) -> IO a
catchIO = E.catch | 496 | correctHpcVersion = do
let programDb' = emptyProgramDb
let verbosity = Verbosity.normal
let verRange = orLaterVersion (Version [0,7] [])
programDb <- configureProgram verbosity hpcProgram programDb'
(requireProgramVersion verbosity hpcProgram verRange programDb
>> return True) `catchIO` (\_ -> return False)
where
-- Distribution.Compat.Exception is hidden.
catchIO :: IO a -> (E.IOException -> IO a) -> IO a
catchIO = E.catch | 467 | false | true | 0 | 13 | 100 | 157 | 77 | 80 | null | null |
rahulmutt/ghcvm | compiler/Eta/Prelude/PrimOp.hs | bsd-3-clause | primOpInfo BSwap32Op = mkMonadic (fsLit "byteSwap32#") wordPrimTy | 65 | primOpInfo BSwap32Op = mkMonadic (fsLit "byteSwap32#") wordPrimTy | 65 | primOpInfo BSwap32Op = mkMonadic (fsLit "byteSwap32#") wordPrimTy | 65 | false | false | 0 | 7 | 6 | 20 | 9 | 11 | null | null |
tylerjl/cis194 | Haskeleton.hs | mit | main :: IO ()
main = do
ms <- getArgs
mapM_ createDirectories ms
mapM_ writeFiles ms
mapM_ updateFiles ms
where
createDirectories m = do
createBenchmarkDirectory m
createLibraryDirectory m
createTestSuiteDirectory m
writeFiles m = do
writeBenchmarkFile m
writeLibraryFile m
writeTestSuiteFile m
updateFiles m = do
updateCabal m
updateCriterion m
updateLibrary m
-- | 467 | main :: IO ()
main = do
ms <- getArgs
mapM_ createDirectories ms
mapM_ writeFiles ms
mapM_ updateFiles ms
where
createDirectories m = do
createBenchmarkDirectory m
createLibraryDirectory m
createTestSuiteDirectory m
writeFiles m = do
writeBenchmarkFile m
writeLibraryFile m
writeTestSuiteFile m
updateFiles m = do
updateCabal m
updateCriterion m
updateLibrary m
-- | 467 | main = do
ms <- getArgs
mapM_ createDirectories ms
mapM_ writeFiles ms
mapM_ updateFiles ms
where
createDirectories m = do
createBenchmarkDirectory m
createLibraryDirectory m
createTestSuiteDirectory m
writeFiles m = do
writeBenchmarkFile m
writeLibraryFile m
writeTestSuiteFile m
updateFiles m = do
updateCabal m
updateCriterion m
updateLibrary m
-- | 453 | false | true | 1 | 8 | 153 | 133 | 52 | 81 | null | null |
nushio3/ghc | compiler/typecheck/TcBinds.hs | bsd-3-clause | tcTySig (L loc (PatSynSig (L _ name) sig_ty))
= setSrcSpan loc $
do { tpsi <- tcPatSynSig name sig_ty
; return [TcPatSynSig tpsi] } | 144 | tcTySig (L loc (PatSynSig (L _ name) sig_ty))
= setSrcSpan loc $
do { tpsi <- tcPatSynSig name sig_ty
; return [TcPatSynSig tpsi] } | 144 | tcTySig (L loc (PatSynSig (L _ name) sig_ty))
= setSrcSpan loc $
do { tpsi <- tcPatSynSig name sig_ty
; return [TcPatSynSig tpsi] } | 144 | false | false | 0 | 11 | 36 | 67 | 32 | 35 | null | null |
jetho/syncthing-hs | Network/Syncthing/Internal/Request.hs | bsd-3-clause | postRequest :: SyncRequest
postRequest = SyncRequest {
path = "/rest/system/ping"
, method = post ()
, params = []
} | 136 | postRequest :: SyncRequest
postRequest = SyncRequest {
path = "/rest/system/ping"
, method = post ()
, params = []
} | 136 | postRequest = SyncRequest {
path = "/rest/system/ping"
, method = post ()
, params = []
} | 109 | false | true | 0 | 8 | 39 | 38 | 22 | 16 | null | null |
emmanueltouzery/cigale-timesheet | src/EventProviders/Hg.hs | mit | getRepoCommits :: HgConfigRecord -> GlobalSettings -> Day -> (() -> Url) -> ExceptT String IO [TsEvent]
getRepoCommits (HgConfigRecord username projectPath) _ day _ = do
output <- Util.runProcess "hg" projectPath
[
"log", "-k", T.unpack username, "-d", showGregorian day,
"--template", "{date|isodate}\n{desc}\n--->>>\n{files}\n--->>>\n"
]
timezone <- liftIO $ getTimeZone (UTCTime day 8)
commits <- hoistEither $ fmapL show $ parse parseCommits "" output
return $ map (toEvent timezone) commits | 551 | getRepoCommits :: HgConfigRecord -> GlobalSettings -> Day -> (() -> Url) -> ExceptT String IO [TsEvent]
getRepoCommits (HgConfigRecord username projectPath) _ day _ = do
output <- Util.runProcess "hg" projectPath
[
"log", "-k", T.unpack username, "-d", showGregorian day,
"--template", "{date|isodate}\n{desc}\n--->>>\n{files}\n--->>>\n"
]
timezone <- liftIO $ getTimeZone (UTCTime day 8)
commits <- hoistEither $ fmapL show $ parse parseCommits "" output
return $ map (toEvent timezone) commits | 551 | getRepoCommits (HgConfigRecord username projectPath) _ day _ = do
output <- Util.runProcess "hg" projectPath
[
"log", "-k", T.unpack username, "-d", showGregorian day,
"--template", "{date|isodate}\n{desc}\n--->>>\n{files}\n--->>>\n"
]
timezone <- liftIO $ getTimeZone (UTCTime day 8)
commits <- hoistEither $ fmapL show $ parse parseCommits "" output
return $ map (toEvent timezone) commits | 447 | false | true | 0 | 11 | 121 | 173 | 85 | 88 | null | null |
afcowie/metrics | src/HttpServer.hs | gpl-2.0 | --
-- Error responses. Terminate handling the request and flush to client.
--
terminate :: Snap a
terminate = do
r <- getResponse
finishWith r | 151 | terminate :: Snap a
terminate = do
r <- getResponse
finishWith r | 72 | terminate = do
r <- getResponse
finishWith r | 52 | true | true | 0 | 7 | 33 | 30 | 15 | 15 | null | null |
olorin/amazonka | amazonka-rds/gen/Network/AWS/RDS/Types/Product.hs | mpl-2.0 | -- | Indicates the source of the parameter value.
pSource :: Lens' Parameter (Maybe Text)
pSource = lens _pSource (\ s a -> s{_pSource = a}) | 140 | pSource :: Lens' Parameter (Maybe Text)
pSource = lens _pSource (\ s a -> s{_pSource = a}) | 90 | pSource = lens _pSource (\ s a -> s{_pSource = a}) | 50 | true | true | 0 | 9 | 25 | 46 | 25 | 21 | null | null |
ml9951/ghc | compiler/specialise/Rules.hs | bsd-3-clause | isMoreSpecific :: CoreRule -> CoreRule -> Bool
-- This tests if one rule is more specific than another
-- We take the view that a BuiltinRule is less specific than
-- anything else, because we want user-define rules to "win"
-- In particular, class ops have a built-in rule, but we
-- any user-specific rules to win
-- eg (Trac #4397)
-- truncate :: (RealFrac a, Integral b) => a -> b
-- {-# RULES "truncate/Double->Int" truncate = double2Int #-}
-- double2Int :: Double -> Int
-- We want the specific RULE to beat the built-in class-op rule
isMoreSpecific (BuiltinRule {}) _ = False | 617 | isMoreSpecific :: CoreRule -> CoreRule -> Bool
isMoreSpecific (BuiltinRule {}) _ = False | 103 | isMoreSpecific (BuiltinRule {}) _ = False | 56 | true | true | 0 | 7 | 137 | 41 | 26 | 15 | null | null |
ekmett/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxPAPER_A5_TRANSVERSE :: Int
wxPAPER_A5_TRANSVERSE = 59 | 55 | wxPAPER_A5_TRANSVERSE :: Int
wxPAPER_A5_TRANSVERSE = 59 | 55 | wxPAPER_A5_TRANSVERSE = 59 | 26 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
amcphail/hsignal | lib/Numeric/Signal/Internal.hs | bsd-3-clause | polyEval :: Vector Double -- ^ the real coefficients
-> Vector (Complex Double) -- ^ the points at which to be evaluated
-> Vector (Complex Double) -- ^ the values
polyEval c z = unsafePerformIO $ do
r <- createVector (size z)
(c # z # r # id) signal_real_poly_complex_eval #| "polyEval"
return r | 369 | polyEval :: Vector Double -- ^ the real coefficients
-> Vector (Complex Double) -- ^ the points at which to be evaluated
-> Vector (Complex Double)
polyEval c z = unsafePerformIO $ do
r <- createVector (size z)
(c # z # r # id) signal_real_poly_complex_eval #| "polyEval"
return r | 353 | polyEval c z = unsafePerformIO $ do
r <- createVector (size z)
(c # z # r # id) signal_real_poly_complex_eval #| "polyEval"
return r | 177 | true | true | 0 | 13 | 126 | 99 | 47 | 52 | null | null |
nushio3/unittyped | src/UnitTyped/Type.hs | lgpl-2.1 | d /| u = mkVal (d / val u) | 26 | d /| u = mkVal (d / val u) | 26 | d /| u = mkVal (d / val u) | 26 | false | false | 3 | 8 | 8 | 29 | 12 | 17 | null | null |
DavidEichmann/GameGeometry | src/Geometry/Geometry.hs | bsd-3-clause | ray :: (Eq p, Num p) => Pos p -> Vec p -> Maybe (Ray p)
ray p d
| d == zero = Nothing
| otherwise = Just $ Ray' p d | 123 | ray :: (Eq p, Num p) => Pos p -> Vec p -> Maybe (Ray p)
ray p d
| d == zero = Nothing
| otherwise = Just $ Ray' p d | 123 | ray p d
| d == zero = Nothing
| otherwise = Just $ Ray' p d | 67 | false | true | 1 | 10 | 40 | 84 | 39 | 45 | null | null |
garetht/jsons-to-schema | test/TestUtils.hs | mit | shouldNotValidate :: D4.Schema -> [AE.Value] -> IO ()
shouldNotValidate schema jsons = do
let validatableSchema = D4.SchemaWithURI schema Nothing
results <- sequence $ fmap (D4.fetchFilesystemAndValidate validatableSchema) jsons
all isLeft results `shouldBe` True | 269 | shouldNotValidate :: D4.Schema -> [AE.Value] -> IO ()
shouldNotValidate schema jsons = do
let validatableSchema = D4.SchemaWithURI schema Nothing
results <- sequence $ fmap (D4.fetchFilesystemAndValidate validatableSchema) jsons
all isLeft results `shouldBe` True | 269 | shouldNotValidate schema jsons = do
let validatableSchema = D4.SchemaWithURI schema Nothing
results <- sequence $ fmap (D4.fetchFilesystemAndValidate validatableSchema) jsons
all isLeft results `shouldBe` True | 215 | false | true | 0 | 12 | 37 | 95 | 44 | 51 | null | null |
bamboo/idris-cil | src/IRTS/Cil/MaxStack.hs | bsd-3-clause | netStackChange _ Ldind_ref = 0 | 35 | netStackChange _ Ldind_ref = 0 | 35 | netStackChange _ Ldind_ref = 0 | 35 | false | false | 0 | 5 | 9 | 11 | 5 | 6 | null | null |
michalkonecny/aern2 | aern2-mp/src/AERN2/MP/Float/Operators.hs | bsd-3-clause | fromRationalDown :: Precision -> Rational -> MPFloat
fromRationalDown p = down1 (fromRationalCEDU p) | 100 | fromRationalDown :: Precision -> Rational -> MPFloat
fromRationalDown p = down1 (fromRationalCEDU p) | 100 | fromRationalDown p = down1 (fromRationalCEDU p) | 47 | false | true | 0 | 8 | 12 | 37 | 16 | 21 | null | null |
RoboNickBot/interactive-tree-demos | src/Rotate.hs | bsd-2-clause | main = prep >>= treestuff | 25 | main = prep >>= treestuff | 25 | main = prep >>= treestuff | 25 | false | false | 0 | 5 | 4 | 10 | 5 | 5 | null | null |
xu-hao/QueryArrow | QueryArrow-common/src/QueryArrow/Parser.hs | bsd-3-clause | litsp :: FOParser [Lit]
litsp = many1 litp | 42 | litsp :: FOParser [Lit]
litsp = many1 litp | 42 | litsp = many1 litp | 18 | false | true | 0 | 7 | 7 | 26 | 11 | 15 | null | null |
yesodweb/persistent | persistent/test/Database/Persist/PersistValueSpec.hs | mit | takePrefix :: Value -> Value
takePrefix (String a) = String (T.take 1 a) | 72 | takePrefix :: Value -> Value
takePrefix (String a) = String (T.take 1 a) | 72 | takePrefix (String a) = String (T.take 1 a) | 43 | false | true | 0 | 9 | 12 | 42 | 19 | 23 | null | null |
ancientlanguage/haskell-analysis | grammar/src/Grammar/Common/Decompose.hs | mit | decomposeChar '\x2F8A6' = "\x6148" | 34 | decomposeChar '\x2F8A6' = "\x6148" | 34 | decomposeChar '\x2F8A6' = "\x6148" | 34 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
thalerjonathan/phd | public/ArtIterating/code/haskell/PureAgentsSeq/src/HeroesAndCowards/HACModel.hs | gpl-3.0 | createRandomHACAgents :: RandomGen g => g -> Int -> Double -> ([HACAgent], g)
createRandomHACAgents gInit n p = (as', g')
where
(randStates, g') = createRandomStates gInit 0 n p
as = map (\idx -> PA.createAgent idx (randStates !! idx) hacTransformer) [0..n-1]
as' = map (\a -> PA.addNeighbours a as) as -- TODO: filter for friend and enemy
createRandomStates :: RandomGen g => g -> Int -> Int -> Double -> ([HACAgentState], g)
createRandomStates g id n p
| id == n = ([], g)
| otherwise = (rands, g'')
where
(randState, g') = randomAgentState g id n p
(ras, g'') = createRandomStates g' (id+1) n p
rands = randState : ras
----------------------------------------------------------------------------------------------------------------------
-- PRIVATES
---------------------------------------------------------------------------------------------------------------------- | 1,006 | createRandomHACAgents :: RandomGen g => g -> Int -> Double -> ([HACAgent], g)
createRandomHACAgents gInit n p = (as', g')
where
(randStates, g') = createRandomStates gInit 0 n p
as = map (\idx -> PA.createAgent idx (randStates !! idx) hacTransformer) [0..n-1]
as' = map (\a -> PA.addNeighbours a as) as -- TODO: filter for friend and enemy
createRandomStates :: RandomGen g => g -> Int -> Int -> Double -> ([HACAgentState], g)
createRandomStates g id n p
| id == n = ([], g)
| otherwise = (rands, g'')
where
(randState, g') = randomAgentState g id n p
(ras, g'') = createRandomStates g' (id+1) n p
rands = randState : ras
----------------------------------------------------------------------------------------------------------------------
-- PRIVATES
---------------------------------------------------------------------------------------------------------------------- | 1,006 | createRandomHACAgents gInit n p = (as', g')
where
(randStates, g') = createRandomStates gInit 0 n p
as = map (\idx -> PA.createAgent idx (randStates !! idx) hacTransformer) [0..n-1]
as' = map (\a -> PA.addNeighbours a as) as -- TODO: filter for friend and enemy
createRandomStates :: RandomGen g => g -> Int -> Int -> Double -> ([HACAgentState], g)
createRandomStates g id n p
| id == n = ([], g)
| otherwise = (rands, g'')
where
(randState, g') = randomAgentState g id n p
(ras, g'') = createRandomStates g' (id+1) n p
rands = randState : ras
----------------------------------------------------------------------------------------------------------------------
-- PRIVATES
---------------------------------------------------------------------------------------------------------------------- | 928 | false | true | 0 | 13 | 249 | 291 | 156 | 135 | null | null |
accraze/discogs-haskell | src/Discogs/Types/Discogs.hs | mit | builder :: Builder
builder = Builder "Discogs API"
mainBaseURL
addAPIType
(addHeader Nothing) | 147 | builder :: Builder
builder = Builder "Discogs API"
mainBaseURL
addAPIType
(addHeader Nothing) | 147 | builder = Builder "Discogs API"
mainBaseURL
addAPIType
(addHeader Nothing) | 128 | false | true | 0 | 7 | 65 | 36 | 14 | 22 | null | null |
ardumont/snake | src/Lib.hs | bsd-3-clause | nextMove DirDown (Coord x y) = Coord x (y - 1) | 46 | nextMove DirDown (Coord x y) = Coord x (y - 1) | 46 | nextMove DirDown (Coord x y) = Coord x (y - 1) | 46 | false | false | 0 | 7 | 10 | 33 | 15 | 18 | null | null |
ajnsit/packman | Test/QCTest.hs | bsd-3-clause | square x = x*x | 14 | square x = x*x | 14 | square x = x*x | 14 | false | false | 0 | 5 | 3 | 13 | 6 | 7 | null | null |
cliffano/swaggy-jenkins | clients/haskell-http-client/generated/lib/SwaggyJenkins/ModelLens.hs | mit | -- | 'pipelineBranchesitemLatestRun' Lens
pipelineBranchesitemLatestRunL :: Lens_' PipelineBranchesitem (Maybe PipelineBranchesitemlatestRun)
pipelineBranchesitemLatestRunL f PipelineBranchesitem{..} = (\pipelineBranchesitemLatestRun -> PipelineBranchesitem { pipelineBranchesitemLatestRun, ..} ) <$> f pipelineBranchesitemLatestRun | 332 | pipelineBranchesitemLatestRunL :: Lens_' PipelineBranchesitem (Maybe PipelineBranchesitemlatestRun)
pipelineBranchesitemLatestRunL f PipelineBranchesitem{..} = (\pipelineBranchesitemLatestRun -> PipelineBranchesitem { pipelineBranchesitemLatestRun, ..} ) <$> f pipelineBranchesitemLatestRun | 290 | pipelineBranchesitemLatestRunL f PipelineBranchesitem{..} = (\pipelineBranchesitemLatestRun -> PipelineBranchesitem { pipelineBranchesitemLatestRun, ..} ) <$> f pipelineBranchesitemLatestRun | 190 | true | true | 0 | 8 | 23 | 57 | 30 | 27 | null | null |
vrom911/hs-init | summoner-cli/src/Summoner/CLI.hs | mit | ghcVerP :: Parser GhcVer
ghcVerP = option
(maybeReader $ parseGhcVer . toText)
( long "ghc"
<> short 'g'
<> value defaultGHC
<> showDefault
<> metavar "GHC_VERSION"
<> help "Version of the compiler to be used for script"
) | 255 | ghcVerP :: Parser GhcVer
ghcVerP = option
(maybeReader $ parseGhcVer . toText)
( long "ghc"
<> short 'g'
<> value defaultGHC
<> showDefault
<> metavar "GHC_VERSION"
<> help "Version of the compiler to be used for script"
) | 255 | ghcVerP = option
(maybeReader $ parseGhcVer . toText)
( long "ghc"
<> short 'g'
<> value defaultGHC
<> showDefault
<> metavar "GHC_VERSION"
<> help "Version of the compiler to be used for script"
) | 230 | false | true | 0 | 11 | 70 | 69 | 32 | 37 | null | null |
egison/egison | hs-src/Language/Egison/Primitives.hs | mit | --
-- Primitives
--
primitives :: [(String, EgisonValue)]
primitives =
map (\(name, fn) -> (name, PrimitiveFunc (fn name))) strictPrimitives
++ map (\(name, fn) -> (name, LazyPrimitiveFunc (fn name))) lazyPrimitives
++ primitiveArithFunctions
++ primitiveStringFunctions
++ primitiveTypeFunctions
where
strictPrimitives =
[ ("addSubscript", addSubscript)
, ("addSuperscript", addSuperscript)
, ("assert", assert)
, ("assertEqual", assertEqual)
]
lazyPrimitives =
[ ("tensorShape", tensorShape')
, ("tensorToList", tensorToList')
, ("dfOrder", dfOrder')
]
--
-- Miscellaneous primitive functions
-- | 703 | primitives :: [(String, EgisonValue)]
primitives =
map (\(name, fn) -> (name, PrimitiveFunc (fn name))) strictPrimitives
++ map (\(name, fn) -> (name, LazyPrimitiveFunc (fn name))) lazyPrimitives
++ primitiveArithFunctions
++ primitiveStringFunctions
++ primitiveTypeFunctions
where
strictPrimitives =
[ ("addSubscript", addSubscript)
, ("addSuperscript", addSuperscript)
, ("assert", assert)
, ("assertEqual", assertEqual)
]
lazyPrimitives =
[ ("tensorShape", tensorShape')
, ("tensorToList", tensorToList')
, ("dfOrder", dfOrder')
]
--
-- Miscellaneous primitive functions
-- | 682 | primitives =
map (\(name, fn) -> (name, PrimitiveFunc (fn name))) strictPrimitives
++ map (\(name, fn) -> (name, LazyPrimitiveFunc (fn name))) lazyPrimitives
++ primitiveArithFunctions
++ primitiveStringFunctions
++ primitiveTypeFunctions
where
strictPrimitives =
[ ("addSubscript", addSubscript)
, ("addSuperscript", addSuperscript)
, ("assert", assert)
, ("assertEqual", assertEqual)
]
lazyPrimitives =
[ ("tensorShape", tensorShape')
, ("tensorToList", tensorToList')
, ("dfOrder", dfOrder')
]
--
-- Miscellaneous primitive functions
-- | 644 | true | true | 9 | 11 | 174 | 192 | 113 | 79 | null | null |
spechub/Hets | Driver/Options.hs | gpl-2.0 | collectSpecOpts :: [Flag] -> [Flag]
collectSpecOpts fs =
let (specs, fs') = foldr (\ f (os, rs) -> case f of
Specs ot -> (ot ++ os, rs)
_ -> (os, f : rs)) ([], []) fs
in if null specs then fs' else Specs specs : fs' | 245 | collectSpecOpts :: [Flag] -> [Flag]
collectSpecOpts fs =
let (specs, fs') = foldr (\ f (os, rs) -> case f of
Specs ot -> (ot ++ os, rs)
_ -> (os, f : rs)) ([], []) fs
in if null specs then fs' else Specs specs : fs' | 245 | collectSpecOpts fs =
let (specs, fs') = foldr (\ f (os, rs) -> case f of
Specs ot -> (ot ++ os, rs)
_ -> (os, f : rs)) ([], []) fs
in if null specs then fs' else Specs specs : fs' | 209 | false | true | 0 | 16 | 77 | 132 | 71 | 61 | null | null |
JPMoresmau/leksah-server | src/IDE/Utils/FileUtils.hs | gpl-2.0 | getSysLibDir :: IO FilePath
getSysLibDir = E.catch (do
(!output,_) <- runTool' "ghc" ["--print-libdir"] Nothing
let libDir = head [line | ToolOutput line <- output]
libDir2 = if ord (T.last libDir) == 13
then T.init libDir
else libDir
output `deepseq` return $ normalise $ T.unpack libDir2
) $ \ (e :: SomeException) -> error ("FileUtils>>getSysLibDir failed with " ++ show e) | 440 | getSysLibDir :: IO FilePath
getSysLibDir = E.catch (do
(!output,_) <- runTool' "ghc" ["--print-libdir"] Nothing
let libDir = head [line | ToolOutput line <- output]
libDir2 = if ord (T.last libDir) == 13
then T.init libDir
else libDir
output `deepseq` return $ normalise $ T.unpack libDir2
) $ \ (e :: SomeException) -> error ("FileUtils>>getSysLibDir failed with " ++ show e) | 440 | getSysLibDir = E.catch (do
(!output,_) <- runTool' "ghc" ["--print-libdir"] Nothing
let libDir = head [line | ToolOutput line <- output]
libDir2 = if ord (T.last libDir) == 13
then T.init libDir
else libDir
output `deepseq` return $ normalise $ T.unpack libDir2
) $ \ (e :: SomeException) -> error ("FileUtils>>getSysLibDir failed with " ++ show e) | 412 | false | true | 0 | 18 | 123 | 156 | 78 | 78 | null | null |
WraithM/HCatmullClark | src/Main.hs | gpl-3.0 | -- This handles the input for the camera, blockI, and misc.
keyboardMouse angle paused blockI key state mod pos = do
keyboard angle paused key state
keyboardBlockI blockI key state
-- Window reshape | 207 | keyboardMouse angle paused blockI key state mod pos = do
keyboard angle paused key state
keyboardBlockI blockI key state
-- Window reshape | 147 | keyboardMouse angle paused blockI key state mod pos = do
keyboard angle paused key state
keyboardBlockI blockI key state
-- Window reshape | 147 | true | false | 0 | 7 | 41 | 45 | 21 | 24 | null | null |
prashant007/AMPL | myAMPL/src/TEMP/Printparser.hs | mit | doc :: ShowS -> Doc
doc = (:) | 29 | doc :: ShowS -> Doc
doc = (:) | 29 | doc = (:) | 9 | false | true | 0 | 7 | 7 | 24 | 11 | 13 | null | null |
thalerjonathan/phd | coding/prototyping/haskell/declarativeABM/haskell/MinABS/src/SpacialGame/RunSG.hs | gpl-3.0 | defectorCoord = (49, 49) | 24 | defectorCoord = (49, 49) | 24 | defectorCoord = (49, 49) | 24 | false | false | 0 | 5 | 3 | 12 | 7 | 5 | null | null |
nomeata/ghc | compiler/codeGen/CgPrimOp.hs | bsd-3-clause | translateOp WordLtOp = Just mo_wordULt | 44 | translateOp WordLtOp = Just mo_wordULt | 44 | translateOp WordLtOp = Just mo_wordULt | 44 | false | false | 1 | 5 | 10 | 16 | 5 | 11 | null | null |
RossMeikleham/Idris-dev | src/Idris/AbsSyntaxTree.hs | bsd-3-clause | highestFC (PUnifyLog tm) = highestFC tm | 39 | highestFC (PUnifyLog tm) = highestFC tm | 39 | highestFC (PUnifyLog tm) = highestFC tm | 39 | false | false | 0 | 7 | 5 | 18 | 8 | 10 | null | null |
rueshyna/gogol | gogol-useraccounts/gen/Network/Google/UserAccounts/Types.hs | mpl-2.0 | -- | View your data across Google Cloud Platform services
cloudPlatformReadOnlyScope :: Proxy '["https://www.googleapis.com/auth/cloud-platform.read-only"]
cloudPlatformReadOnlyScope = Proxy | 190 | cloudPlatformReadOnlyScope :: Proxy '["https://www.googleapis.com/auth/cloud-platform.read-only"]
cloudPlatformReadOnlyScope = Proxy | 132 | cloudPlatformReadOnlyScope = Proxy | 34 | true | true | 0 | 7 | 16 | 20 | 11 | 9 | null | null |
donnie4w/tim | protocols/gen-hs/ITim_Client.hs | apache-2.0 | timRemoteUserEdit (ip,op) arg_tid arg_ub arg_auth = do
send_timRemoteUserEdit op arg_tid arg_ub arg_auth
recv_timRemoteUserEdit ip | 134 | timRemoteUserEdit (ip,op) arg_tid arg_ub arg_auth = do
send_timRemoteUserEdit op arg_tid arg_ub arg_auth
recv_timRemoteUserEdit ip | 134 | timRemoteUserEdit (ip,op) arg_tid arg_ub arg_auth = do
send_timRemoteUserEdit op arg_tid arg_ub arg_auth
recv_timRemoteUserEdit ip | 134 | false | false | 1 | 8 | 17 | 42 | 18 | 24 | null | null |
mrd/camfort | src/Camfort/Output.hs | apache-2.0 | countLines xs =
case B.uncons xs of
Nothing -> 0
Just ('\n', xs) -> 1 + countLines xs
Just (_, xs) -> countLines xs
{- 'removeNewLines xs n' removes at most 'n' new lines characters from
the input string xs, returning the new string and the number of new
lines that were removed. Note that the number of new lines removed
might actually be less than 'n'- but in principle this should not
happen with the usaage in 'refactorDecl' -} | 449 | countLines xs =
case B.uncons xs of
Nothing -> 0
Just ('\n', xs) -> 1 + countLines xs
Just (_, xs) -> countLines xs
{- 'removeNewLines xs n' removes at most 'n' new lines characters from
the input string xs, returning the new string and the number of new
lines that were removed. Note that the number of new lines removed
might actually be less than 'n'- but in principle this should not
happen with the usaage in 'refactorDecl' -} | 449 | countLines xs =
case B.uncons xs of
Nothing -> 0
Just ('\n', xs) -> 1 + countLines xs
Just (_, xs) -> countLines xs
{- 'removeNewLines xs n' removes at most 'n' new lines characters from
the input string xs, returning the new string and the number of new
lines that were removed. Note that the number of new lines removed
might actually be less than 'n'- but in principle this should not
happen with the usaage in 'refactorDecl' -} | 449 | false | false | 0 | 9 | 97 | 65 | 32 | 33 | null | null |
tjakway/ghcjvm | utils/hpc/HpcMarkup.hs | bsd-3-clause | openTick (TopLevelDecl True 1)
= "<span class=\"funcount\">-- entered once</span>" ++
openTopDecl | 117 | openTick (TopLevelDecl True 1)
= "<span class=\"funcount\">-- entered once</span>" ++
openTopDecl | 117 | openTick (TopLevelDecl True 1)
= "<span class=\"funcount\">-- entered once</span>" ++
openTopDecl | 117 | false | false | 0 | 7 | 30 | 21 | 10 | 11 | null | null |
beni55/wai | warp/Network/Wai/Handler/Warp/Response.hs | mit | sendResponseNoBody :: Connection
-> H.HttpVersion
-> H.Status
-> H.ResponseHeaders
-> IO ()
sendResponseNoBody conn ver s hs = composeHeader ver s hs >>= connSendAll conn | 246 | sendResponseNoBody :: Connection
-> H.HttpVersion
-> H.Status
-> H.ResponseHeaders
-> IO ()
sendResponseNoBody conn ver s hs = composeHeader ver s hs >>= connSendAll conn | 246 | sendResponseNoBody conn ver s hs = composeHeader ver s hs >>= connSendAll conn | 78 | false | true | 0 | 10 | 100 | 61 | 29 | 32 | null | null |
Chattered/PhilEdCommon | Philed/Data/NNeg.hs | mit | lengthN :: Foldable f => f a -> N
lengthN = getSumN . foldMap (const $ SumN (S Z)) | 82 | lengthN :: Foldable f => f a -> N
lengthN = getSumN . foldMap (const $ SumN (S Z)) | 82 | lengthN = getSumN . foldMap (const $ SumN (S Z)) | 48 | false | true | 0 | 11 | 18 | 48 | 23 | 25 | null | null |
joelburget/haste-compiler | libraries/haste-lib/src/Haste/Binary/Types.hs | bsd-3-clause | -- | Convert a BlobData to a ByteString. Only usable server-side.
toByteString :: BlobData -> BS.ByteString
toByteString =
error "Haste.Binary.Types.toByteString called in browser context!" | 191 | toByteString :: BlobData -> BS.ByteString
toByteString =
error "Haste.Binary.Types.toByteString called in browser context!" | 125 | toByteString =
error "Haste.Binary.Types.toByteString called in browser context!" | 83 | true | true | 0 | 6 | 25 | 21 | 11 | 10 | null | null |
rueshyna/gogol | gogol-games-configuration/gen/Network/Google/GamesConfiguration/Types/Product.hs | mpl-2.0 | -- | The number of decimal places for number. Only used for NUMERIC format
-- type.
gnfcNumDecimalPlaces :: Lens' GamesNumberFormatConfiguration (Maybe Int32)
gnfcNumDecimalPlaces
= lens _gnfcNumDecimalPlaces
(\ s a -> s{_gnfcNumDecimalPlaces = a})
. mapping _Coerce | 280 | gnfcNumDecimalPlaces :: Lens' GamesNumberFormatConfiguration (Maybe Int32)
gnfcNumDecimalPlaces
= lens _gnfcNumDecimalPlaces
(\ s a -> s{_gnfcNumDecimalPlaces = a})
. mapping _Coerce | 196 | gnfcNumDecimalPlaces
= lens _gnfcNumDecimalPlaces
(\ s a -> s{_gnfcNumDecimalPlaces = a})
. mapping _Coerce | 121 | true | true | 2 | 8 | 49 | 61 | 29 | 32 | null | null |
GaloisInc/halvm-ghc | compiler/typecheck/TcRnTypes.hs | bsd-3-clause | exprCtOrigin (HsTickPragma _ _ _ (L _ e)) = exprCtOrigin e | 58 | exprCtOrigin (HsTickPragma _ _ _ (L _ e)) = exprCtOrigin e | 58 | exprCtOrigin (HsTickPragma _ _ _ (L _ e)) = exprCtOrigin e | 58 | false | false | 0 | 8 | 10 | 33 | 15 | 18 | null | null |
Fuuzetsu/cabal2nix | src/Distribution/Nixpkgs/Haskell/FromCabal/Name.hs | bsd-3-clause | libNixName "yaml-0.1" = return "libyaml" | 66 | libNixName "yaml-0.1" = return "libyaml" | 66 | libNixName "yaml-0.1" = return "libyaml" | 66 | false | false | 0 | 5 | 30 | 12 | 5 | 7 | null | null |
erijonhson/ufcg-plp-e-aplicacoes | praticando_programacao_funcional_parte_2/conjuntoUniao.hs | apache-2.0 | main = do
lista1 <- getLine
lista2 <- getLine
print (uniao (read lista1) (read lista2)) | 93 | main = do
lista1 <- getLine
lista2 <- getLine
print (uniao (read lista1) (read lista2)) | 93 | main = do
lista1 <- getLine
lista2 <- getLine
print (uniao (read lista1) (read lista2)) | 93 | false | false | 1 | 12 | 20 | 50 | 21 | 29 | null | null |
QuickChick/Luck | luck/src/Core/IntRep.hs | mit | -- | Inject a single value into a representation
singleton :: tt -> Rep tt
singleton = Point | 93 | singleton :: tt -> Rep tt
singleton = Point | 43 | singleton = Point | 17 | true | true | 0 | 6 | 18 | 19 | 10 | 9 | null | null |
yesodweb/yesod | yesod-form/Yesod/Form/I18n/French.hs | mit | frenchFormMessage (MsgInvalidHour t) = "Heure invalide : " `mappend` t | 70 | frenchFormMessage (MsgInvalidHour t) = "Heure invalide : " `mappend` t | 70 | frenchFormMessage (MsgInvalidHour t) = "Heure invalide : " `mappend` t | 70 | false | false | 0 | 7 | 9 | 21 | 11 | 10 | null | null |
mstksg/hledger | hledger-lib/Hledger/Query.hs | gpl-3.0 | parseQueryTerm _ "" = Left $ Any | 32 | parseQueryTerm _ "" = Left $ Any | 32 | parseQueryTerm _ "" = Left $ Any | 32 | false | false | 0 | 5 | 6 | 15 | 7 | 8 | null | null |
frontrowed/stratosphere | library-gen/Stratosphere/ResourceProperties/CloudWatchAlarmMetricDataQuery.hs | mit | cloudWatchAlarmMetricDataQuery
:: Val Text -- ^ 'cwamdqId'
-> CloudWatchAlarmMetricDataQuery
cloudWatchAlarmMetricDataQuery idarg =
CloudWatchAlarmMetricDataQuery
{ _cloudWatchAlarmMetricDataQueryExpression = Nothing
, _cloudWatchAlarmMetricDataQueryId = idarg
, _cloudWatchAlarmMetricDataQueryLabel = Nothing
, _cloudWatchAlarmMetricDataQueryMetricStat = Nothing
, _cloudWatchAlarmMetricDataQueryReturnData = Nothing
} | 437 | cloudWatchAlarmMetricDataQuery
:: Val Text -- ^ 'cwamdqId'
-> CloudWatchAlarmMetricDataQuery
cloudWatchAlarmMetricDataQuery idarg =
CloudWatchAlarmMetricDataQuery
{ _cloudWatchAlarmMetricDataQueryExpression = Nothing
, _cloudWatchAlarmMetricDataQueryId = idarg
, _cloudWatchAlarmMetricDataQueryLabel = Nothing
, _cloudWatchAlarmMetricDataQueryMetricStat = Nothing
, _cloudWatchAlarmMetricDataQueryReturnData = Nothing
} | 437 | cloudWatchAlarmMetricDataQuery idarg =
CloudWatchAlarmMetricDataQuery
{ _cloudWatchAlarmMetricDataQueryExpression = Nothing
, _cloudWatchAlarmMetricDataQueryId = idarg
, _cloudWatchAlarmMetricDataQueryLabel = Nothing
, _cloudWatchAlarmMetricDataQueryMetricStat = Nothing
, _cloudWatchAlarmMetricDataQueryReturnData = Nothing
} | 340 | false | true | 0 | 7 | 51 | 63 | 34 | 29 | null | null |
dimara/ganeti | src/Ganeti/OpParams.hs | bsd-2-clause | pJQueueLogMessages :: Field
pJQueueLogMessages =
withDoc "'OpTestJQueue' log_messages" .
defaultField [| [] |] $ simpleField "log_messages" [t| [String] |] | 159 | pJQueueLogMessages :: Field
pJQueueLogMessages =
withDoc "'OpTestJQueue' log_messages" .
defaultField [| [] |] $ simpleField "log_messages" [t| [String] |] | 159 | pJQueueLogMessages =
withDoc "'OpTestJQueue' log_messages" .
defaultField [| [] |] $ simpleField "log_messages" [t| [String] |] | 131 | false | true | 0 | 7 | 22 | 37 | 21 | 16 | null | null |
andorp/hs-bluesnap | src/Bluesnap/API/Response.hs | gpl-3.0 | elementCompany_name :: XMLParser Xsd.XsdString
elementCompany_name = parseSchemaType "company-name" | 99 | elementCompany_name :: XMLParser Xsd.XsdString
elementCompany_name = parseSchemaType "company-name" | 99 | elementCompany_name = parseSchemaType "company-name" | 52 | false | true | 0 | 6 | 7 | 19 | 9 | 10 | null | null |
bombpersons/HaskellAsteroids | src/Utils.hs | bsd-3-clause | getForwardVecFromRotation :: Float -> Vec2f
getForwardVecFromRotation a = Vec2f (sin (-a)) (cos (-a)) | 101 | getForwardVecFromRotation :: Float -> Vec2f
getForwardVecFromRotation a = Vec2f (sin (-a)) (cos (-a)) | 101 | getForwardVecFromRotation a = Vec2f (sin (-a)) (cos (-a)) | 57 | false | true | 0 | 9 | 12 | 45 | 23 | 22 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.