summaryrefslogtreecommitdiff
path: root/compiler/GHC/Unit/Module/ModGuts.hs
diff options
context:
space:
mode:
authorromes <rodrigo.m.mesquita@gmail.com>2022-03-12 01:08:00 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-03-18 05:10:58 -0400
commitb056adc8062b4fe015450a21eb70e32dcf7023f5 (patch)
treea29805d0c2ea73000497eeea311e77ce961d0a3c /compiler/GHC/Unit/Module/ModGuts.hs
parent4a2567f5641a4807584c90015dfc40a791f241b4 (diff)
downloadhaskell-b056adc8062b4fe015450a21eb70e32dcf7023f5.tar.gz
TTG: Make HsQuote GhcTc isomorphic to NoExtField
An untyped bracket `HsQuote p` can never be constructed with `p ~ GhcTc`. This is because we don't typecheck `HsQuote` at all. That's OK, because we also never use `HsQuote GhcTc`. To enforce this at the type level we make `HsQuote GhcTc` isomorphic to `NoExtField` and impossible to construct otherwise, by using TTG field extensions to make all constructors, except for `XQuote` (which takes `NoExtField`), unconstructable, with `DataConCantHappen` This is explained more in detail in Note [The life cycle of a TH quotation] Related discussion: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/4782
Diffstat (limited to 'compiler/GHC/Unit/Module/ModGuts.hs')
0 files changed, 0 insertions, 0 deletions