th-test-utils-1.1.0: Utility functions for testing Template Haskell code

Safe HaskellNone
LanguageHaskell2010

Language.Haskell.TH.TestUtils.QState

Synopsis

Documentation

data QState (mode :: MockedMode) Source #

State information for mocking Q functionality.

Constructors

QState 

Fields

Instances
Show (QState mode) Source # 
Instance details

Defined in Language.Haskell.TH.TestUtils.QState

Methods

showsPrec :: Int -> QState mode -> ShowS #

show :: QState mode -> String #

showList :: [QState mode] -> ShowS #

Lift (QState mode) Source # 
Instance details

Defined in Language.Haskell.TH.TestUtils.QState

Methods

lift :: QState mode -> Q Exp #

loadNames :: [Name] -> ExpQ Source #

A helper for loading names for reifyInfo

Usage:

QState
  { reifyInfo = $(loadNames [''Int, ''Maybe])
  , ...
  }

unmockedState :: QState NotMocked Source #

A shortcut for defining an unmocked Q.