Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
data QMode (mode :: MockedMode) where Source #
MockQ :: QMode FullyMocked | All Q actions are mocked and IO actions are disallowed. |
MockQAllowIO :: QMode FullyMockedWithIO | Same as MockQ, except IO actions are passed through. Useful if your TH code, for example, reads files with runIO. |
AllowQ :: QMode NotMocked | No mocking is done. Useful for running Q as normal, but you need to get error messages. |
class IsMockedMode (mode :: MockedMode) where Source #
type TestQResult mode a Source #
runResult :: Q a -> TestQResult mode a Source #
fmapResult :: (a -> b) -> TestQResult mode a -> TestQResult mode b Source #
Instances
IsMockedMode FullyMocked Source # | |
Defined in Language.Haskell.TH.TestUtils.QMode type TestQResult FullyMocked a :: Type Source # runResult :: Q a -> TestQResult FullyMocked a Source # fmapResult :: (a -> b) -> TestQResult FullyMocked a -> TestQResult FullyMocked b Source # | |
IsMockedMode FullyMockedWithIO Source # | |
Defined in Language.Haskell.TH.TestUtils.QMode type TestQResult FullyMockedWithIO a :: Type Source # runResult :: Q a -> TestQResult FullyMockedWithIO a Source # fmapResult :: (a -> b) -> TestQResult FullyMockedWithIO a -> TestQResult FullyMockedWithIO b Source # | |
IsMockedMode NotMocked Source # | |
Defined in Language.Haskell.TH.TestUtils.QMode type TestQResult NotMocked a :: Type Source # runResult :: Q a -> TestQResult NotMocked a Source # fmapResult :: (a -> b) -> TestQResult NotMocked a -> TestQResult NotMocked b Source # |