Skip to content
  • Matthew Pickering's avatar
    Overloaded Quotation Brackets (#246) · 9129210f
    Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
    This patch implements overloaded quotation brackets which generalise the
    desugaring of all quotation forms in terms of a new minimal interface.
    
    The main change is that a quotation, for example, [e| 5 |], will now
    have type `Quote m => m Exp` rather than `Q Exp`. The `Quote` typeclass
    contains a single method for generating new names which is used when
    desugaring binding structures.
    
    The return type of functions from the `Lift` type class, `lift` and `liftTyped` have
    been restricted to `forall m . Quote m => m Exp` rather than returning a
    result in a Q monad.
    
    More details about the feature can be read in the GHC proposal.
    
    https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0246-overloaded-bracket.rst
    9129210f