summaryrefslogtreecommitdiff
path: root/compiler/Language
diff options
context:
space:
mode:
authorromes <rodrigo.m.mesquita@gmail.com>2022-02-15 09:34:23 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-03-18 05:10:58 -0400
commit8561c1afdbbda73a31cb8f8f1e80d1f403673e9b (patch)
treeb659ad4c4dd83551c2a096c0e48ea91346352317 /compiler/Language
parent1a0dd0088247f9d4e403a460f0f6120184af3e15 (diff)
downloadhaskell-8561c1afdbbda73a31cb8f8f1e80d1f403673e9b.tar.gz
TTG: Refactor HsBracket
Diffstat (limited to 'compiler/Language')
-rw-r--r--compiler/Language/Haskell/Syntax/Expr.hs26
-rw-r--r--compiler/Language/Haskell/Syntax/Extension.hs2
2 files changed, 5 insertions, 23 deletions
diff --git a/compiler/Language/Haskell/Syntax/Expr.hs b/compiler/Language/Haskell/Syntax/Expr.hs
index 92cf9d5f20..12fdfffe48 100644
--- a/compiler/Language/Haskell/Syntax/Expr.hs
+++ b/compiler/Language/Haskell/Syntax/Expr.hs
@@ -33,7 +33,6 @@ import Language.Haskell.Syntax.Type
import Language.Haskell.Syntax.Binds
-- others:
-import GHC.Tc.Types.Evidence
import GHC.Core.DataCon (FieldLabelString)
import GHC.Types.Name
import GHC.Types.Basic
@@ -594,23 +593,7 @@ data HsExpr p
-- 'GHC.Parser.Annotation.AnnClose','GHC.Parser.Annotation.AnnCloseQ'
-- For details on above see Note [exact print annotations] in GHC.Parser.Annotation
- | HsBracket (XBracket p) (HsBracket p)
-
- -- See Note [Pending Splices]
- | HsRnBracketOut
- (XRnBracketOut p)
- (HsBracket (HsBracketRn p)) -- Output of the renamer is the *original* renamed
- -- expression, plus
- [PendingRnSplice' p] -- _renamed_ splices to be type checked
-
- | HsTcBracketOut
- (XTcBracketOut p)
- (Maybe QuoteWrapper) -- The wrapper to apply type and dictionary argument
- -- to the quote.
- (HsBracket (HsBracketRn p)) -- Output of the type checker is the *original*
- -- renamed expression, plus
- [PendingTcSplice' p] -- _typechecked_ splices to be
- -- pasted back in by the desugarer
+ | HsBracket (XBracket p) (HsBracketBody p)
-- | - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnOpen',
-- 'GHC.Parser.Annotation.AnnClose'
@@ -651,9 +634,10 @@ data HsExpr p
-- | The AST used to hard-refer to GhcPass, which was a layer violation. For now,
-- we paper it over with this new extension point.
-type family HsBracketRn p
-type family PendingRnSplice' p
-type family PendingTcSplice' p
+type family HsDoRn p
+
+-- TODO: Temporary fix for HsBracket GhcTc body should be HsBracket GhcRn
+type family HsBracketBody p
-- ---------------------------------------------------------------------
diff --git a/compiler/Language/Haskell/Syntax/Extension.hs b/compiler/Language/Haskell/Syntax/Extension.hs
index 862c212c90..93c66fce35 100644
--- a/compiler/Language/Haskell/Syntax/Extension.hs
+++ b/compiler/Language/Haskell/Syntax/Extension.hs
@@ -430,8 +430,6 @@ type family XProjection x
type family XExprWithTySig x
type family XArithSeq x
type family XBracket x
-type family XRnBracketOut x
-type family XTcBracketOut x
type family XSpliceE x
type family XProc x
type family XStatic x