diff options
author | romes <rodrigo.m.mesquita@gmail.com> | 2022-02-15 09:34:23 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-03-18 05:10:58 -0400 |
commit | 8561c1afdbbda73a31cb8f8f1e80d1f403673e9b (patch) | |
tree | b659ad4c4dd83551c2a096c0e48ea91346352317 /compiler/GHC/Iface | |
parent | 1a0dd0088247f9d4e403a460f0f6120184af3e15 (diff) | |
download | haskell-8561c1afdbbda73a31cb8f8f1e80d1f403673e9b.tar.gz |
TTG: Refactor HsBracket
Diffstat (limited to 'compiler/GHC/Iface')
-rw-r--r-- | compiler/GHC/Iface/Ext/Ast.hs | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/compiler/GHC/Iface/Ext/Ast.hs b/compiler/GHC/Iface/Ext/Ast.hs index b6be92301f..3aba40407b 100644 --- a/compiler/GHC/Iface/Ext/Ast.hs +++ b/compiler/GHC/Iface/Ext/Ast.hs @@ -1183,17 +1183,19 @@ instance HiePass p => ToHie (LocatedA (HsExpr (GhcPass p))) where HsStatic _ expr -> [ toHie expr ] - HsBracket _ b -> - [ toHie b - ] - HsRnBracketOut _ b p -> - [ toHie b - , toHie p - ] - HsTcBracketOut _ _wrap b p -> - [ toHie b - , toHie p - ] + HsBracket xbracket b -> case hiePass @p of + HieRn -> case xbracket of + HsBracketRnTyped _ -> + [ toHie b + ] + HsBracketRnUntyped _ p -> + [ toHie b + , toHie p + ] + HieTc | HsBracketTc _ _ p <- xbracket -> + [ toHie b + , toHie p + ] HsSpliceE _ x -> [ toHie $ L mspan x ] |