Teo Camarasu pushed to branch wip/abstract-q at Glasgow Haskell Compiler / GHC

Commits:

1 changed file:

Changes:

  • libraries/template-haskell/Language/Haskell/TH/Syntax.hs
    ... ... @@ -11,7 +11,9 @@ module Language.Haskell.TH.Syntax (
    11 11
         Exp (..),
    
    12 12
         Match (..),
    
    13 13
         Clause (..),
    
    14
    -    Q (..),
    
    14
    +    Q,
    
    15
    +    -- backwards compatibility
    
    16
    +    Language.Haskell.TH.Syntax.unQ,
    
    15 17
         Pat (..),
    
    16 18
         Stmt (..),
    
    17 19
         Con (..),
    
    ... ... @@ -499,3 +501,6 @@ reassociate the tree as necessary.
    499 501
     -- Subsumed by the more general 'SpecialiseEP' constructor.
    
    500 502
     pattern SpecialiseP :: Name -> Type -> (Maybe Inline) -> Phases -> Pragma
    
    501 503
     pattern SpecialiseP nm ty inl phases = SpecialiseEP Nothing [] (SigE (VarE nm) ty) inl phases
    
    504
    +
    
    505
    +unQ :: Q a -> (forall m. Quasi m => m a)
    
    506
    +unQ m =  runQ m