summaryrefslogtreecommitdiff
path: root/compiler/GHC/Hs
diff options
context:
space:
mode:
authorromes <rodrigo.m.mesquita@gmail.com>2022-05-14 12:12:19 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-07-03 14:11:31 -0400
commit3a8970ac0c69335a1d229f9c9a71e6e333e99bfb (patch)
tree28a786d6e3bbc40b068cc7fe10433a9a8037b1d6 /compiler/GHC/Hs
parent9e79f6d09c9fbd81150a45d307f753141453c945 (diff)
downloadhaskell-3a8970ac0c69335a1d229f9c9a71e6e333e99bfb.tar.gz
TTG: Move HsModule to L.H.S
Move the definition of HsModule defined in GHC.Hs to Language.Haskell.Syntax with an added TTG parameter and corresponding extension fields. This is progress towards having the haskell-syntax package, as described in #21592
Diffstat (limited to 'compiler/GHC/Hs')
-rw-r--r--compiler/GHC/Hs/Dump.hs1
-rw-r--r--compiler/GHC/Hs/Stats.hs5
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler/GHC/Hs/Dump.hs b/compiler/GHC/Hs/Dump.hs
index de9848e139..77d2036425 100644
--- a/compiler/GHC/Hs/Dump.hs
+++ b/compiler/GHC/Hs/Dump.hs
@@ -30,7 +30,6 @@ import GHC.Types.Name
import GHC.Types.SrcLoc
import GHC.Types.Var
import GHC.Types.SourceText
-import GHC.Unit.Module
import GHC.Utils.Outputable
import Data.Data hiding (Fixity)
diff --git a/compiler/GHC/Hs/Stats.hs b/compiler/GHC/Hs/Stats.hs
index bd3e2e6b6d..0c348e2c97 100644
--- a/compiler/GHC/Hs/Stats.hs
+++ b/compiler/GHC/Hs/Stats.hs
@@ -22,8 +22,9 @@ import GHC.Utils.Panic
import Data.Char
-- | Source Statistics
-ppSourceStats :: Bool -> Located HsModule -> SDoc
-ppSourceStats short (L _ (HsModule{ hsmodExports = exports, hsmodImports = imports, hsmodDecls = ldecls }))
+ppSourceStats :: Bool -> Located (HsModule GhcPs) -> SDoc
+ppSourceStats _ (L _ (XModule x)) = dataConCantHappen x
+ppSourceStats short (L _ (HsModule _ _ exports imports ldecls))
= (if short then hcat else vcat)
(map pp_val
[("ExportAll ", export_all), -- 1 if no export list