diff options
author | romes <rodrigo.m.mesquita@gmail.com> | 2022-06-29 15:36:43 +0200 |
---|---|---|
committer | romes <rodrigo.m.mesquita@gmail.com> | 2022-07-03 15:06:26 +0200 |
commit | bae4d04456dc13f42eee2feae9d541836728ebbd (patch) | |
tree | 4a158e53deab52d58334230802990b30246e12c2 /compiler/GHC/Unit/Parser.hs | |
parent | c33787c7cada83c1284f1b3a4194ab8d03479f00 (diff) | |
download | haskell-wip/romes/ttg-module.tar.gz |
Refactor ModuleName to L.H.S.Module.Namewip/romes/ttg-module
ModuleName used to live in GHC.Unit.Module.Name. In this commit, the
definition of ModuleName and its associated functions are moved to
Language.Haskell.Syntax.Module.Name according to the current plan
towards making the AST GHC-independent.
The instances for ModuleName for Outputable, Uniquable and Binary were
moved to the module in which the class is defined because these instances
depend on GHC.
The instance of Eq for ModuleName is slightly changed to no longer
depend on unique explicitly and instead uses FastString's instance of
Eq.
Diffstat (limited to 'compiler/GHC/Unit/Parser.hs')
-rw-r--r-- | compiler/GHC/Unit/Parser.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/GHC/Unit/Parser.hs b/compiler/GHC/Unit/Parser.hs index f9735306de..bac6ba4bf1 100644 --- a/compiler/GHC/Unit/Parser.hs +++ b/compiler/GHC/Unit/Parser.hs @@ -10,13 +10,14 @@ where import GHC.Prelude import GHC.Unit.Types -import GHC.Unit.Module.Name import GHC.Data.FastString import qualified Text.ParserCombinators.ReadP as Parse import Text.ParserCombinators.ReadP (ReadP, (<++)) import Data.Char (isAlphaNum) +import Language.Haskell.Syntax.Module.Name (ModuleName, parseModuleName) + parseUnit :: ReadP Unit parseUnit = parseVirtUnitId <++ parseDefUnitId where @@ -55,4 +56,3 @@ parseModSubst = Parse.between (Parse.char '[') (Parse.char ']') v <- parseHoleyModule return (k, v) - |