Vladislav Zavialov pushed to branch wip/int-index/reexport-ghc-hs-basic at Glasgow Haskell Compiler / GHC
Commits:
-
51223e7c
by Vladislav Zavialov at 2025-10-26T22:54:07+03:00
26 changed files:
- compiler/GHC/Hs.hs
- compiler/GHC/Hs/Decls.hs
- compiler/GHC/HsToCore/Foreign/Wasm.hs
- compiler/GHC/HsToCore/Quote.hs
- compiler/GHC/HsToCore/Utils.hs
- compiler/GHC/Parser/Errors/Types.hs
- compiler/GHC/Parser/PostProcess.hs
- compiler/GHC/Rename/Bind.hs
- compiler/GHC/Rename/Env.hs
- compiler/GHC/Rename/Expr.hs
- compiler/GHC/Rename/HsType.hs
- compiler/GHC/Rename/Pat.hs
- compiler/GHC/Rename/Utils.hs
- compiler/GHC/Tc/Deriv/Generate.hs
- compiler/GHC/Tc/Deriv/Generics.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/Gen/App.hs
- compiler/GHC/Tc/Gen/Expr.hs
- compiler/GHC/Tc/Gen/Pat.hs
- compiler/GHC/Tc/TyCl.hs
- compiler/GHC/Tc/TyCl/Instance.hs
- compiler/GHC/Tc/TyCl/Utils.hs
- compiler/GHC/Tc/Types/Origin.hs
- compiler/GHC/Tc/Validity.hs
- compiler/GHC/ThToHs.hs
- utils/check-exact/ExactPrint.hs
Changes:
| ... | ... | @@ -22,6 +22,7 @@ therefore, is almost nothing but re-exporting. |
| 22 | 22 | |
| 23 | 23 | module GHC.Hs (
|
| 24 | 24 | module Language.Haskell.Syntax,
|
| 25 | + module GHC.Hs.Basic,
|
|
| 25 | 26 | module GHC.Hs.Binds,
|
| 26 | 27 | module GHC.Hs.Decls,
|
| 27 | 28 | module GHC.Hs.Expr,
|
| ... | ... | @@ -33,7 +34,6 @@ module GHC.Hs ( |
| 33 | 34 | module GHC.Hs.Doc,
|
| 34 | 35 | module GHC.Hs.Extension,
|
| 35 | 36 | module GHC.Parser.Annotation,
|
| 36 | - Fixity,
|
|
| 37 | 37 | |
| 38 | 38 | HsModule(..), AnnsModule(..),
|
| 39 | 39 | HsParsedModule(..), XModulePs(..)
|
| ... | ... | @@ -42,6 +42,7 @@ module GHC.Hs ( |
| 42 | 42 | -- friends:
|
| 43 | 43 | import GHC.Prelude
|
| 44 | 44 | |
| 45 | +import GHC.Hs.Basic
|
|
| 45 | 46 | import GHC.Hs.Decls
|
| 46 | 47 | import GHC.Hs.Binds
|
| 47 | 48 | import GHC.Hs.Expr
|
| ... | ... | @@ -58,7 +59,6 @@ import GHC.Hs.Instances () -- For Data instances |
| 58 | 59 | |
| 59 | 60 | -- others:
|
| 60 | 61 | import GHC.Utils.Outputable
|
| 61 | -import GHC.Types.Fixity ( Fixity )
|
|
| 62 | 62 | import GHC.Types.SrcLoc
|
| 63 | 63 | import GHC.Unit.Module.Warnings
|
| 64 | 64 |
| ... | ... | @@ -121,11 +121,11 @@ import GHC.Hs.Doc |
| 121 | 121 | import GHC.Types.Basic
|
| 122 | 122 | import GHC.Core.Coercion
|
| 123 | 123 | |
| 124 | +import GHC.Hs.Basic
|
|
| 124 | 125 | import GHC.Hs.Extension
|
| 125 | 126 | import GHC.Parser.Annotation
|
| 126 | 127 | import GHC.Types.Name
|
| 127 | 128 | import GHC.Types.Name.Set
|
| 128 | -import GHC.Types.Fixity
|
|
| 129 | 129 | |
| 130 | 130 | -- others:
|
| 131 | 131 | import GHC.Utils.Misc (count)
|
| ... | ... | @@ -45,7 +45,6 @@ import GHC.Types.Var |
| 45 | 45 | import GHC.Unit
|
| 46 | 46 | import GHC.Utils.Outputable
|
| 47 | 47 | import GHC.Utils.Panic
|
| 48 | -import Language.Haskell.Syntax.Basic
|
|
| 49 | 48 | |
| 50 | 49 | data Synchronicity = Sync | Async
|
| 51 | 50 | deriving (Eq)
|
| ... | ... | @@ -79,7 +79,6 @@ import GHC.Types.ForeignCall |
| 79 | 79 | import GHC.Types.Var
|
| 80 | 80 | import GHC.Types.Id
|
| 81 | 81 | import GHC.Types.SourceText
|
| 82 | -import GHC.Types.Fixity
|
|
| 83 | 82 | import GHC.Types.TyThing
|
| 84 | 83 | import GHC.Types.Name hiding( varName, tcName )
|
| 85 | 84 | import GHC.Types.Name.Env
|
| ... | ... | @@ -89,8 +88,6 @@ import Data.Kind (Constraint) |
| 89 | 88 | |
| 90 | 89 | import qualified GHC.LanguageExtensions as LangExt
|
| 91 | 90 | |
| 92 | -import Language.Haskell.Syntax.Basic (FieldLabelString(..))
|
|
| 93 | - |
|
| 94 | 91 | import Data.ByteString ( unpack )
|
| 95 | 92 | import Control.Monad
|
| 96 | 93 | import Data.List (sort, sortBy)
|
| ... | ... | @@ -45,8 +45,6 @@ module GHC.HsToCore.Utils ( |
| 45 | 45 | |
| 46 | 46 | import GHC.Prelude
|
| 47 | 47 | |
| 48 | -import Language.Haskell.Syntax.Basic (Boxity(..))
|
|
| 49 | - |
|
| 50 | 48 | import {-# SOURCE #-} GHC.HsToCore.Match ( matchSimply )
|
| 51 | 49 | import {-# SOURCE #-} GHC.HsToCore.Expr ( dsLExpr, dsSyntaxExpr )
|
| 52 | 50 |
| ... | ... | @@ -6,7 +6,6 @@ module GHC.Parser.Errors.Types where |
| 6 | 6 | |
| 7 | 7 | import GHC.Prelude
|
| 8 | 8 | |
| 9 | -import GHC.Core.TyCon (Role)
|
|
| 10 | 9 | import GHC.Data.FastString
|
| 11 | 10 | import GHC.Hs
|
| 12 | 11 | import GHC.Parser.Types
|
| ... | ... | @@ -134,7 +134,7 @@ import GHC.Hs -- Lots of it |
| 134 | 134 | import GHC.Core.TyCon ( TyCon, isTupleTyCon, tyConSingleDataCon_maybe )
|
| 135 | 135 | import GHC.Core.DataCon ( DataCon, dataConTyCon, dataConName )
|
| 136 | 136 | import GHC.Core.ConLike ( ConLike(..) )
|
| 137 | -import GHC.Core.Coercion.Axiom ( Role, fsFromRole )
|
|
| 137 | +import GHC.Core.Coercion.Axiom ( fsFromRole )
|
|
| 138 | 138 | import GHC.Types.Name.Reader
|
| 139 | 139 | import GHC.Types.Name
|
| 140 | 140 | import GHC.Types.Basic
|
| ... | ... | @@ -170,8 +170,6 @@ import GHC.Unit.Module.Warnings |
| 170 | 170 | import GHC.Utils.Panic
|
| 171 | 171 | import qualified GHC.Data.Strict as Strict
|
| 172 | 172 | |
| 173 | -import Language.Haskell.Syntax.Basic (FieldLabelString(..))
|
|
| 174 | - |
|
| 175 | 173 | import Control.Monad
|
| 176 | 174 | import Text.ParserCombinators.ReadP as ReadP
|
| 177 | 175 | import Data.Char
|
| ... | ... | @@ -77,8 +77,6 @@ import GHC.Utils.Panic |
| 77 | 77 | |
| 78 | 78 | import qualified GHC.LanguageExtensions as LangExt
|
| 79 | 79 | |
| 80 | -import Language.Haskell.Syntax.Basic (FieldLabelString(..))
|
|
| 81 | - |
|
| 82 | 80 | import Control.Monad
|
| 83 | 81 | import Data.List ( partition )
|
| 84 | 82 | import Data.List.NonEmpty ( NonEmpty(..) )
|
| ... | ... | @@ -62,8 +62,6 @@ module GHC.Rename.Env ( |
| 62 | 62 | |
| 63 | 63 | import GHC.Prelude
|
| 64 | 64 | |
| 65 | -import Language.Haskell.Syntax.Basic (FieldLabelString(..))
|
|
| 66 | - |
|
| 67 | 65 | import GHC.Iface.Load
|
| 68 | 66 | import GHC.Iface.Env
|
| 69 | 67 | import GHC.Hs
|
| ... | ... | @@ -75,8 +75,6 @@ import GHC.Data.Maybe |
| 75 | 75 | |
| 76 | 76 | import qualified GHC.LanguageExtensions as LangExt
|
| 77 | 77 | |
| 78 | -import Language.Haskell.Syntax.Basic (FieldLabelString(..))
|
|
| 79 | - |
|
| 80 | 78 | import Control.Monad
|
| 81 | 79 | import qualified Data.Foldable as Partial (maximum)
|
| 82 | 80 | import Data.List (unzip4)
|
| ... | ... | @@ -74,16 +74,13 @@ import GHC.Types.FieldLabel |
| 74 | 74 | import GHC.Types.Error
|
| 75 | 75 | |
| 76 | 76 | import GHC.Utils.Misc
|
| 77 | -import GHC.Types.Fixity ( compareFixity, negateFixity
|
|
| 78 | - , Fixity(..), FixityDirection(..), LexicalFixity(..) )
|
|
| 77 | +import GHC.Types.Fixity ( compareFixity, negateFixity )
|
|
| 79 | 78 | import GHC.Types.Basic ( TypeOrKind(..) )
|
| 80 | 79 | import GHC.Utils.Outputable
|
| 81 | 80 | import GHC.Utils.Panic
|
| 82 | 81 | import GHC.Data.Maybe
|
| 83 | 82 | import qualified GHC.LanguageExtensions as LangExt
|
| 84 | 83 | |
| 85 | -import Language.Haskell.Syntax.Basic (FieldLabelString(..))
|
|
| 86 | - |
|
| 87 | 84 | import Data.List (nubBy, partition)
|
| 88 | 85 | import Control.Monad
|
| 89 | 86 |
| ... | ... | @@ -65,7 +65,6 @@ import GHC.Rename.HsType |
| 65 | 65 | import GHC.Builtin.Names
|
| 66 | 66 | |
| 67 | 67 | import GHC.Types.Hint
|
| 68 | -import GHC.Types.Fixity (LexicalFixity(..))
|
|
| 69 | 68 | import GHC.Types.Name
|
| 70 | 69 | import GHC.Types.Name.Set
|
| 71 | 70 | import GHC.Types.Name.Reader
|
| ... | ... | @@ -53,7 +53,6 @@ import GHC.Tc.Utils.Monad |
| 53 | 53 | import GHC.Types.Name
|
| 54 | 54 | import GHC.Types.Name.Set
|
| 55 | 55 | import GHC.Types.Name.Env
|
| 56 | -import GHC.Core.DataCon
|
|
| 57 | 56 | import GHC.Types.SrcLoc as SrcLoc
|
| 58 | 57 | import GHC.Types.SourceFile
|
| 59 | 58 | import GHC.Types.SourceText ( SourceText(..), IntegralLit )
|
| ... | ... | @@ -91,8 +91,6 @@ import GHC.Data.Bag |
| 91 | 91 | import GHC.Data.Maybe ( expectJust )
|
| 92 | 92 | import GHC.Unit.Module
|
| 93 | 93 | |
| 94 | -import Language.Haskell.Syntax.Basic (FieldLabelString(..))
|
|
| 95 | - |
|
| 96 | 94 | import Data.List ( find, partition, intersperse )
|
| 97 | 95 | |
| 98 | 96 | -- | A declarative description of an auxiliary binding that should be
|
| ... | ... | @@ -44,7 +44,6 @@ import GHC.Iface.Env ( newGlobalBinder ) |
| 44 | 44 | |
| 45 | 45 | import GHC.Types.Name hiding ( varName )
|
| 46 | 46 | import GHC.Types.Name.Reader
|
| 47 | -import GHC.Types.Fixity
|
|
| 48 | 47 | import GHC.Types.Basic
|
| 49 | 48 | import GHC.Types.SrcLoc
|
| 50 | 49 | import GHC.Types.Var.Env
|
| ... | ... | @@ -62,8 +61,6 @@ import GHC.Utils.Misc |
| 62 | 61 | import GHC.Driver.DynFlags
|
| 63 | 62 | import GHC.Data.FastString
|
| 64 | 63 | |
| 65 | -import Language.Haskell.Syntax.Basic (FieldLabelString(..))
|
|
| 66 | - |
|
| 67 | 64 | import Control.Monad (mplus)
|
| 68 | 65 | import Data.List (zip4, partition)
|
| 69 | 66 | import Data.List.NonEmpty (NonEmpty (..), last, nonEmpty)
|
| ... | ... | @@ -231,7 +231,7 @@ import GHC.Core.FamInstEnv (FamInst) |
| 231 | 231 | import GHC.Core.InstEnv (LookupInstanceErrReason, ClsInst, DFunId)
|
| 232 | 232 | import GHC.Core.PatSyn (PatSyn)
|
| 233 | 233 | import GHC.Core.Predicate (EqRel, predTypeEqRel)
|
| 234 | -import GHC.Core.TyCon (TyCon, Role, FamTyConFlav, AlgTyConRhs)
|
|
| 234 | +import GHC.Core.TyCon (TyCon, FamTyConFlav, AlgTyConRhs)
|
|
| 235 | 235 | import GHC.Core.Type (Kind, Type, ThetaType, PredType, ErrorMsgType, ForAllTyFlag, ForAllTyBinder)
|
| 236 | 236 | |
| 237 | 237 | import GHC.Driver.Backend (Backend)
|
| ... | ... | @@ -245,8 +245,6 @@ import GHC.Data.FastString (FastString) |
| 245 | 245 | import GHC.Data.Pair
|
| 246 | 246 | import GHC.Exception.Type (SomeException)
|
| 247 | 247 | |
| 248 | -import Language.Haskell.Syntax.Basic (FieldLabelString(..))
|
|
| 249 | - |
|
| 250 | 248 | import Data.List.NonEmpty (NonEmpty (..))
|
| 251 | 249 | import qualified Data.List.NonEmpty as NE
|
| 252 | 250 | import Data.Typeable (Typeable)
|
| ... | ... | @@ -65,7 +65,6 @@ import GHC.Utils.Outputable as Outputable |
| 65 | 65 | import GHC.Utils.Panic
|
| 66 | 66 | |
| 67 | 67 | import qualified GHC.LanguageExtensions as LangExt
|
| 68 | -import Language.Haskell.Syntax.Basic( isBoxed )
|
|
| 69 | 68 | |
| 70 | 69 | import Control.Monad
|
| 71 | 70 | import Data.Function
|
| ... | ... | @@ -27,8 +27,6 @@ module GHC.Tc.Gen.Expr |
| 27 | 27 | |
| 28 | 28 | import GHC.Prelude
|
| 29 | 29 | |
| 30 | -import Language.Haskell.Syntax.Basic (FieldLabelString(..))
|
|
| 31 | - |
|
| 32 | 30 | import {-# SOURCE #-} GHC.Tc.Gen.Splice
|
| 33 | 31 | ( tcTypedSplice, tcTypedBracket, tcUntypedBracket, getUntypedSpliceBody )
|
| 34 | 32 |
| ... | ... | @@ -59,7 +59,6 @@ import GHC.Core.DataCon |
| 59 | 59 | import GHC.Core.PatSyn
|
| 60 | 60 | import GHC.Core.ConLike
|
| 61 | 61 | import GHC.Builtin.Names
|
| 62 | -import GHC.Types.Basic hiding (SuccessFlag(..))
|
|
| 63 | 62 | import GHC.Driver.DynFlags
|
| 64 | 63 | import GHC.Types.SrcLoc
|
| 65 | 64 | import GHC.Types.Var.Set
|
| ... | ... | @@ -73,7 +72,6 @@ import GHC.Data.FastString |
| 73 | 72 | import qualified Data.List.NonEmpty as NE
|
| 74 | 73 | |
| 75 | 74 | import GHC.Data.List.SetOps ( getNth )
|
| 76 | -import Language.Haskell.Syntax.Basic (FieldLabelString(..), LexicalFixity(..))
|
|
| 77 | 75 | |
| 78 | 76 | import Data.List( partition )
|
| 79 | 77 | import Control.Monad.Trans.Writer.CPS
|
| ... | ... | @@ -105,8 +105,6 @@ import GHC.Utils.Panic |
| 105 | 105 | import GHC.Utils.Constants (debugIsOn)
|
| 106 | 106 | import GHC.Utils.Misc
|
| 107 | 107 | |
| 108 | -import Language.Haskell.Syntax.Basic (FieldLabelString(..))
|
|
| 109 | - |
|
| 110 | 108 | import Control.Monad
|
| 111 | 109 | import Data.Foldable ( toList, traverse_ )
|
| 112 | 110 | import Data.Functor.Identity
|
| ... | ... | @@ -72,7 +72,6 @@ import GHC.Types.Var as Var |
| 72 | 72 | import GHC.Types.Var.Env
|
| 73 | 73 | import GHC.Types.Var.Set
|
| 74 | 74 | import GHC.Types.Basic
|
| 75 | -import GHC.Types.Fixity
|
|
| 76 | 75 | import GHC.Types.Id
|
| 77 | 76 | import GHC.Types.SourceFile
|
| 78 | 77 | import GHC.Types.SourceText
|
| ... | ... | @@ -77,8 +77,6 @@ import GHC.Types.Unique.Set |
| 77 | 77 | import GHC.Types.TyThing
|
| 78 | 78 | import qualified GHC.LanguageExtensions as LangExt
|
| 79 | 79 | |
| 80 | -import Language.Haskell.Syntax.Basic (FieldLabelString(..))
|
|
| 81 | - |
|
| 82 | 80 | import Control.Monad
|
| 83 | 81 | |
| 84 | 82 | {-
|
| ... | ... | @@ -85,8 +85,6 @@ import GHC.Utils.Misc( HasDebugCallStack, nTimes ) |
| 85 | 85 | import GHC.Types.Unique
|
| 86 | 86 | import GHC.Types.Unique.Supply
|
| 87 | 87 | |
| 88 | -import Language.Haskell.Syntax.Basic (FieldLabelString(..))
|
|
| 89 | - |
|
| 90 | 88 | import qualified Data.Kind as Hs
|
| 91 | 89 | import Data.List.NonEmpty (NonEmpty (..))
|
| 92 | 90 | import Data.Maybe (isNothing)
|
| ... | ... | @@ -81,8 +81,6 @@ import GHC.Utils.Panic |
| 81 | 81 | |
| 82 | 82 | import GHC.Data.List.SetOps
|
| 83 | 83 | |
| 84 | -import Language.Haskell.Syntax.Basic (FieldLabelString(..))
|
|
| 85 | - |
|
| 86 | 84 | import Control.Monad
|
| 87 | 85 | import Data.Foldable
|
| 88 | 86 | import Data.Function
|
| ... | ... | @@ -40,7 +40,6 @@ import qualified GHC.Core.Coercion as Coercion ( Role(..) ) |
| 40 | 40 | import GHC.Builtin.Types
|
| 41 | 41 | import GHC.Builtin.Types.Prim( fUNTyCon )
|
| 42 | 42 | import GHC.Types.Basic as Hs
|
| 43 | -import GHC.Types.Fixity as Hs
|
|
| 44 | 43 | import GHC.Types.ForeignCall
|
| 45 | 44 | import GHC.Types.Unique
|
| 46 | 45 | import GHC.Types.SourceText
|
| ... | ... | @@ -53,8 +52,6 @@ import GHC.Data.EnumSet (EnumSet) |
| 53 | 52 | import qualified GHC.Data.EnumSet as EnumSet
|
| 54 | 53 | import qualified GHC.LanguageExtensions as LangExt
|
| 55 | 54 | |
| 56 | -import Language.Haskell.Syntax.Basic (FieldLabelString(..))
|
|
| 57 | - |
|
| 58 | 55 | import qualified Data.ByteString as BS
|
| 59 | 56 | import Control.Monad( unless )
|
| 60 | 57 | import Data.Bifunctor (first)
|
| ... | ... | @@ -35,13 +35,11 @@ module ExactPrint |
| 35 | 35 | |
| 36 | 36 | import GHC
|
| 37 | 37 | import GHC.Base (NonEmpty(..))
|
| 38 | -import GHC.Core.Coercion.Axiom (Role(..))
|
|
| 39 | 38 | import qualified GHC.Data.BooleanFormula as BF
|
| 40 | 39 | import GHC.Data.FastString
|
| 41 | 40 | import qualified GHC.Data.Strict as Strict
|
| 42 | 41 | import GHC.TypeLits
|
| 43 | 42 | import GHC.Types.Basic hiding (EP)
|
| 44 | -import GHC.Types.Fixity
|
|
| 45 | 43 | import GHC.Types.ForeignCall
|
| 46 | 44 | import GHC.Types.Name.Reader
|
| 47 | 45 | import GHC.Types.PkgQual
|
| ... | ... | @@ -53,8 +51,6 @@ import GHC.Utils.Misc |
| 53 | 51 | import GHC.Utils.Outputable hiding ( (<>) )
|
| 54 | 52 | import GHC.Utils.Panic
|
| 55 | 53 | |
| 56 | -import Language.Haskell.Syntax.Basic (FieldLabelString(..))
|
|
| 57 | - |
|
| 58 | 54 | import Control.Monad (forM, when, unless)
|
| 59 | 55 | import Control.Monad.Identity (Identity(..))
|
| 60 | 56 | import qualified Control.Monad.Reader as Reader
|