summaryrefslogtreecommitdiff
path: root/compiler/GHC/Driver/Main.hs
diff options
context:
space:
mode:
authorromes <rodrigo.m.mesquita@gmail.com>2022-05-17 16:06:52 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-07-03 14:11:31 -0400
commitf9f8099598fd169fa2f17305fc660e5c473f8836 (patch)
tree5acdb9a38b78dc17ffa0abb63d87555e214d98af /compiler/GHC/Driver/Main.hs
parent3a8970ac0c69335a1d229f9c9a71e6e333e99bfb (diff)
downloadhaskell-f9f8099598fd169fa2f17305fc660e5c473f8836.tar.gz
TTG: Move ImpExp client-independent bits to L.H.S.ImpExp
Move the GHC-independent definitions from GHC.Hs.ImpExp to Language.Haskell.Syntax.ImpExp with the required TTG extension fields such as to keep the AST independent from GHC. This is progress towards having the haskell-syntax package, as described in #21592 Bumps haddock submodule
Diffstat (limited to 'compiler/GHC/Driver/Main.hs')
-rw-r--r--compiler/GHC/Driver/Main.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/GHC/Driver/Main.hs b/compiler/GHC/Driver/Main.hs
index 29ca1e42ae..237352877a 100644
--- a/compiler/GHC/Driver/Main.hs
+++ b/compiler/GHC/Driver/Main.hs
@@ -2199,8 +2199,10 @@ hscAddSptEntries hsc_env entries = do
hscImport :: HscEnv -> String -> IO (ImportDecl GhcPs)
hscImport hsc_env str = runInteractiveHsc hsc_env $ do
+ -- Use >>= \case instead of MonadFail desugaring to take into
+ -- consideration `instance XXModule p = DataConCantHappen`.
+ -- Tracked in #15681
hscParseThing parseModule str >>= \case
- (L _ (XModule x)) -> dataConCantHappen x
(L _ (HsModule{hsmodImports=is})) ->
case is of
[L _ i] -> return i