Overloaded Quotation Brackets (#246)
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
Showing
- compiler/GHC/CoreToStg/Prep.hs 4 additions, 2 deletionscompiler/GHC/CoreToStg/Prep.hs
- compiler/GHC/Hs/Expr.hs 4 additions, 2 deletionscompiler/GHC/Hs/Expr.hs
- compiler/GHC/Iface/Ext/Ast.hs 1 addition, 1 deletioncompiler/GHC/Iface/Ext/Ast.hs
- compiler/deSugar/DsExpr.hs 1 addition, 1 deletioncompiler/deSugar/DsExpr.hs
- compiler/deSugar/DsMeta.hs 627 additions, 436 deletionscompiler/deSugar/DsMeta.hs
- compiler/main/HscTypes.hs 6 additions, 0 deletionscompiler/main/HscTypes.hs
- compiler/prelude/THNames.hs 56 additions, 56 deletionscompiler/prelude/THNames.hs
- compiler/typecheck/TcEnv.hs 1 addition, 1 deletioncompiler/typecheck/TcEnv.hs
- compiler/typecheck/TcEvidence.hs 30 additions, 5 deletionscompiler/typecheck/TcEvidence.hs
- compiler/typecheck/TcExpr.hs 3 additions, 2 deletionscompiler/typecheck/TcExpr.hs
- compiler/typecheck/TcHsSyn.hs 11 additions, 5 deletionscompiler/typecheck/TcHsSyn.hs
- compiler/typecheck/TcMType.hs 19 additions, 7 deletionscompiler/typecheck/TcMType.hs
- compiler/typecheck/TcOrigin.hs 2 additions, 0 deletionscompiler/typecheck/TcOrigin.hs
- compiler/typecheck/TcRnTypes.hs 7 additions, 0 deletionscompiler/typecheck/TcRnTypes.hs
- compiler/typecheck/TcSplice.hs 145 additions, 38 deletionscompiler/typecheck/TcSplice.hs
- docs/users_guide/8.12.1-notes.rst 4 additions, 0 deletionsdocs/users_guide/8.12.1-notes.rst
- docs/users_guide/glasgow_exts.rst 54 additions, 15 deletionsdocs/users_guide/glasgow_exts.rst
- libraries/template-haskell/Language/Haskell/TH.hs 2 additions, 2 deletionslibraries/template-haskell/Language/Haskell/TH.hs
- libraries/template-haskell/Language/Haskell/TH/Lib.hs 39 additions, 39 deletionslibraries/template-haskell/Language/Haskell/TH/Lib.hs
- libraries/template-haskell/Language/Haskell/TH/Lib/Internal.hs 371 additions, 367 deletions...ries/template-haskell/Language/Haskell/TH/Lib/Internal.hs
Loading
Please register or sign in to comment