diff options
author | romes <rodrigo.m.mesquita@gmail.com> | 2022-05-17 16:06:52 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-07-03 14:11:31 -0400 |
commit | f9f8099598fd169fa2f17305fc660e5c473f8836 (patch) | |
tree | 5acdb9a38b78dc17ffa0abb63d87555e214d98af /ghc | |
parent | 3a8970ac0c69335a1d229f9c9a71e6e333e99bfb (diff) | |
download | haskell-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 'ghc')
-rw-r--r-- | ghc/GHCi/UI.hs | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/ghc/GHCi/UI.hs b/ghc/GHCi/UI.hs index ff607d645c..8fac7da93a 100644 --- a/ghc/GHCi/UI.hs +++ b/ghc/GHCi/UI.hs @@ -1270,10 +1270,13 @@ runStmt input step = do setDumpFilePrefix ic -- `-ddump-to-file` must work for normal GHCi compilations / -- evaluations. (#17500) - HsModule { hsmodDecls = decls, hsmodImports = imports } <- - liftIO (hscParseModuleWithLocation hsc_env source line input) - run_imports imports - run_decls decls + -- Use >>= \case instead of MonadFail desugaring to take into + -- consideration `instance XXModule p = DataConCantHappen`. + -- Tracked in #15681 + liftIO (hscParseModuleWithLocation hsc_env source line input) >>= \case + HsModule { hsmodDecls = decls, hsmodImports = imports } -> do + run_imports imports + run_decls decls where exec_complete = GHC.ExecComplete (Right []) 0 @@ -2908,10 +2911,10 @@ iiSubsumes (IIDecl d1) (IIDecl d2) -- A bit crude = unLoc (ideclName d1) == unLoc (ideclName d2) && ideclAs d1 == ideclAs d2 && (not (isImportDeclQualified (ideclQualified d1)) || isImportDeclQualified (ideclQualified d2)) - && (ideclHiding d1 `hidingSubsumes` ideclHiding d2) + && (ideclImportList d1 `hidingSubsumes` ideclImportList d2) where - _ `hidingSubsumes` Just (False,L _ []) = True - Just (False, L _ xs) `hidingSubsumes` Just (False,L _ ys) + _ `hidingSubsumes` Just (Exactly,L _ []) = True + Just (Exactly, L _ xs) `hidingSubsumes` Just (Exactly,L _ ys) = all (`elem` xs) ys h1 `hidingSubsumes` h2 = h1 == h2 iiSubsumes _ _ = False |