Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Glasgow Haskell Compiler
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shayne Fletcher
Glasgow Haskell Compiler
Commits
51192964
Commit
51192964
authored
Sep 11, 2019
by
Sylvain Henry
Committed by
Marge Bot
Sep 20, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Module hierarchy: Hs (
#13009
)
Add GHC.Hs module hierarchy replacing hsSyn. Metric Increase: haddock.compiler
parent
4853d962
Changes
136
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
136 changed files
with
383 additions
and
379 deletions
+383
-379
compiler/GHC/Hs.hs
compiler/GHC/Hs.hs
+25
-25
compiler/GHC/Hs/Binds.hs
compiler/GHC/Hs/Binds.hs
+9
-9
compiler/GHC/Hs/Decls.hs
compiler/GHC/Hs/Decls.hs
+10
-10
compiler/GHC/Hs/Doc.hs
compiler/GHC/Hs/Doc.hs
+1
-1
compiler/GHC/Hs/Dump.hs
compiler/GHC/Hs/Dump.hs
+3
-3
compiler/GHC/Hs/Expr.hs
compiler/GHC/Hs/Expr.hs
+12
-12
compiler/GHC/Hs/Expr.hs-boot
compiler/GHC/Hs/Expr.hs-boot
+4
-4
compiler/GHC/Hs/Extension.hs
compiler/GHC/Hs/Extension.hs
+5
-5
compiler/GHC/Hs/ImpExp.hs
compiler/GHC/Hs/ImpExp.hs
+7
-7
compiler/GHC/Hs/Instances.hs
compiler/GHC/Hs/Instances.hs
+16
-16
compiler/GHC/Hs/Lit.hs
compiler/GHC/Hs/Lit.hs
+5
-5
compiler/GHC/Hs/Pat.hs
compiler/GHC/Hs/Pat.hs
+10
-10
compiler/GHC/Hs/Pat.hs-boot
compiler/GHC/Hs/Pat.hs-boot
+3
-3
compiler/GHC/Hs/PlaceHolder.hs
compiler/GHC/Hs/PlaceHolder.hs
+1
-1
compiler/GHC/Hs/Types.hs
compiler/GHC/Hs/Types.hs
+12
-12
compiler/GHC/Hs/Utils.hs
compiler/GHC/Hs/Utils.hs
+10
-10
compiler/GHC/ThToHs.hs
compiler/GHC/ThToHs.hs
+12
-7
compiler/backpack/BkpSyn.hs
compiler/backpack/BkpSyn.hs
+1
-1
compiler/basicTypes/BasicTypes.hs
compiler/basicTypes/BasicTypes.hs
+1
-1
compiler/coreSyn/CoreSyn.hs
compiler/coreSyn/CoreSyn.hs
+3
-3
compiler/coreSyn/MkCore.hs
compiler/coreSyn/MkCore.hs
+1
-1
compiler/deSugar/Check.hs
compiler/deSugar/Check.hs
+2
-2
compiler/deSugar/Coverage.hs
compiler/deSugar/Coverage.hs
+1
-1
compiler/deSugar/Desugar.hs
compiler/deSugar/Desugar.hs
+1
-1
compiler/deSugar/DsArrows.hs
compiler/deSugar/DsArrows.hs
+6
-6
compiler/deSugar/DsBinds.hs
compiler/deSugar/DsBinds.hs
+3
-3
compiler/deSugar/DsExpr.hs
compiler/deSugar/DsExpr.hs
+1
-1
compiler/deSugar/DsExpr.hs-boot
compiler/deSugar/DsExpr.hs-boot
+2
-2
compiler/deSugar/DsForeign.hs
compiler/deSugar/DsForeign.hs
+1
-1
compiler/deSugar/DsGRHSs.hs
compiler/deSugar/DsGRHSs.hs
+1
-1
compiler/deSugar/DsListComp.hs
compiler/deSugar/DsListComp.hs
+1
-1
compiler/deSugar/DsMeta.hs
compiler/deSugar/DsMeta.hs
+1
-1
compiler/deSugar/DsMonad.hs
compiler/deSugar/DsMonad.hs
+1
-1
compiler/deSugar/DsUtils.hs
compiler/deSugar/DsUtils.hs
+2
-2
compiler/deSugar/ExtractDocs.hs
compiler/deSugar/ExtractDocs.hs
+6
-6
compiler/deSugar/Match.hs
compiler/deSugar/Match.hs
+1
-1
compiler/deSugar/Match.hs-boot
compiler/deSugar/Match.hs-boot
+2
-2
compiler/deSugar/MatchCon.hs
compiler/deSugar/MatchCon.hs
+1
-1
compiler/deSugar/MatchLit.hs
compiler/deSugar/MatchLit.hs
+1
-1
compiler/ghc.cabal.in
compiler/ghc.cabal.in
+15
-16
compiler/hieFile/HieAst.hs
compiler/hieFile/HieAst.hs
+1
-1
compiler/iface/MkIface.hs
compiler/iface/MkIface.hs
+1
-1
compiler/main/GHC.hs
compiler/main/GHC.hs
+2
-2
compiler/main/GhcPlugins.hs
compiler/main/GhcPlugins.hs
+1
-1
compiler/main/HeaderInfo.hs
compiler/main/HeaderInfo.hs
+1
-1
compiler/main/Hooks.hs
compiler/main/Hooks.hs
+4
-4
compiler/main/HscMain.hs
compiler/main/HscMain.hs
+2
-2
compiler/main/HscStats.hs
compiler/main/HscStats.hs
+1
-1
compiler/main/HscTypes.hs
compiler/main/HscTypes.hs
+1
-1
compiler/main/InteractiveEval.hs
compiler/main/InteractiveEval.hs
+1
-1
compiler/main/Plugins.hs
compiler/main/Plugins.hs
+1
-1
compiler/parser/HaddockUtils.hs
compiler/parser/HaddockUtils.hs
+1
-1
compiler/parser/Parser.y
compiler/parser/Parser.y
+2
-2
compiler/parser/RdrHsSyn.hs
compiler/parser/RdrHsSyn.hs
+11
-11
compiler/rename/RnBinds.hs
compiler/rename/RnBinds.hs
+2
-2
compiler/rename/RnEnv.hs
compiler/rename/RnEnv.hs
+1
-1
compiler/rename/RnExpr.hs
compiler/rename/RnExpr.hs
+2
-2
compiler/rename/RnExpr.hs-boot
compiler/rename/RnExpr.hs-boot
+1
-1
compiler/rename/RnFixity.hs
compiler/rename/RnFixity.hs
+1
-1
compiler/rename/RnHsDoc.hs
compiler/rename/RnHsDoc.hs
+1
-1
compiler/rename/RnNames.hs
compiler/rename/RnNames.hs
+2
-2
compiler/rename/RnPat.hs
compiler/rename/RnPat.hs
+3
-3
compiler/rename/RnSource.hs
compiler/rename/RnSource.hs
+3
-3
compiler/rename/RnSplice.hs
compiler/rename/RnSplice.hs
+1
-1
compiler/rename/RnSplice.hs-boot
compiler/rename/RnSplice.hs-boot
+1
-1
compiler/rename/RnTypes.hs
compiler/rename/RnTypes.hs
+3
-3
compiler/rename/RnUtils.hs
compiler/rename/RnUtils.hs
+1
-1
compiler/stgSyn/StgSyn.hs
compiler/stgSyn/StgSyn.hs
+3
-3
compiler/typecheck/Inst.hs
compiler/typecheck/Inst.hs
+2
-2
compiler/typecheck/TcAnnotations.hs
compiler/typecheck/TcAnnotations.hs
+1
-1
compiler/typecheck/TcArrows.hs
compiler/typecheck/TcArrows.hs
+2
-2
compiler/typecheck/TcBackpack.hs
compiler/typecheck/TcBackpack.hs
+1
-1
compiler/typecheck/TcBinds.hs
compiler/typecheck/TcBinds.hs
+1
-1
compiler/typecheck/TcCanonical.hs
compiler/typecheck/TcCanonical.hs
+1
-1
compiler/typecheck/TcClassDcl.hs
compiler/typecheck/TcClassDcl.hs
+1
-1
compiler/typecheck/TcDefaults.hs
compiler/typecheck/TcDefaults.hs
+1
-1
compiler/typecheck/TcDeriv.hs
compiler/typecheck/TcDeriv.hs
+1
-1
compiler/typecheck/TcDerivUtils.hs
compiler/typecheck/TcDerivUtils.hs
+1
-1
compiler/typecheck/TcEnv.hs
compiler/typecheck/TcEnv.hs
+2
-2
compiler/typecheck/TcErrors.hs
compiler/typecheck/TcErrors.hs
+2
-2
compiler/typecheck/TcExpr.hs
compiler/typecheck/TcExpr.hs
+3
-3
compiler/typecheck/TcExpr.hs-boot
compiler/typecheck/TcExpr.hs-boot
+2
-2
compiler/typecheck/TcForeign.hs
compiler/typecheck/TcForeign.hs
+1
-1
compiler/typecheck/TcGenDeriv.hs
compiler/typecheck/TcGenDeriv.hs
+1
-1
compiler/typecheck/TcGenFunctor.hs
compiler/typecheck/TcGenFunctor.hs
+1
-1
compiler/typecheck/TcGenGenerics.hs
compiler/typecheck/TcGenGenerics.hs
+1
-1
compiler/typecheck/TcHoleErrors.hs
compiler/typecheck/TcHoleErrors.hs
+1
-1
compiler/typecheck/TcHoleFitTypes.hs
compiler/typecheck/TcHoleFitTypes.hs
+1
-1
compiler/typecheck/TcHsSyn.hs
compiler/typecheck/TcHsSyn.hs
+1
-1
compiler/typecheck/TcHsType.hs
compiler/typecheck/TcHsType.hs
+7
-7
compiler/typecheck/TcInstDcls.hs
compiler/typecheck/TcInstDcls.hs
+1
-1
compiler/typecheck/TcInstDcls.hs-boot
compiler/typecheck/TcInstDcls.hs-boot
+1
-1
compiler/typecheck/TcMatches.hs
compiler/typecheck/TcMatches.hs
+3
-3
compiler/typecheck/TcMatches.hs-boot
compiler/typecheck/TcMatches.hs-boot
+2
-2
compiler/typecheck/TcPat.hs
compiler/typecheck/TcPat.hs
+1
-1
compiler/typecheck/TcPatSyn.hs
compiler/typecheck/TcPatSyn.hs
+1
-1
compiler/typecheck/TcPatSyn.hs-boot
compiler/typecheck/TcPatSyn.hs-boot
+2
-2
compiler/typecheck/TcRnDriver.hs
compiler/typecheck/TcRnDriver.hs
+2
-2
compiler/typecheck/TcRnExports.hs
compiler/typecheck/TcRnExports.hs
+1
-1
compiler/typecheck/TcRnMonad.hs
compiler/typecheck/TcRnMonad.hs
+1
-1
compiler/typecheck/TcRnTypes.hs
compiler/typecheck/TcRnTypes.hs
+1
-1
compiler/typecheck/TcRules.hs
compiler/typecheck/TcRules.hs
+1
-1
compiler/typecheck/TcSigs.hs
compiler/typecheck/TcSigs.hs
+1
-1
compiler/typecheck/TcSimplify.hs
compiler/typecheck/TcSimplify.hs
+1
-1
compiler/typecheck/TcSplice.hs
compiler/typecheck/TcSplice.hs
+3
-3
compiler/typecheck/TcSplice.hs-boot
compiler/typecheck/TcSplice.hs-boot
+3
-3
compiler/typecheck/TcTyClsDecls.hs
compiler/typecheck/TcTyClsDecls.hs
+2
-2
compiler/typecheck/TcTyDecls.hs
compiler/typecheck/TcTyDecls.hs
+1
-1
compiler/typecheck/TcTypeable.hs
compiler/typecheck/TcTypeable.hs
+1
-1
compiler/typecheck/TcUnify.hs
compiler/typecheck/TcUnify.hs
+1
-1
compiler/typecheck/TcUnify.hs-boot
compiler/typecheck/TcUnify.hs-boot
+6
-6
compiler/typecheck/TcValidity.hs
compiler/typecheck/TcValidity.hs
+1
-1
compiler/types/TyCon.hs
compiler/types/TyCon.hs
+1
-1
compiler/types/Type.hs
compiler/types/Type.hs
+3
-3
docs/users_guide/extending_ghc.rst
docs/users_guide/extending_ghc.rst
+5
-5
ghc/GHCi/UI.hs
ghc/GHCi/UI.hs
+2
-2
ghc/GHCi/UI/Monad.hs
ghc/GHCi/UI/Monad.hs
+2
-2
nofib
nofib
+1
-1
testsuite/tests/ghc-api/annotations/stringSource.hs
testsuite/tests/ghc-api/annotations/stringSource.hs
+1
-1
testsuite/tests/ghc-api/annotations/t11430.hs
testsuite/tests/ghc-api/annotations/t11430.hs
+1
-1
testsuite/tests/package/all.T
testsuite/tests/package/all.T
+1
-1
testsuite/tests/package/package05.hs
testsuite/tests/package/package05.hs
+3
-3
testsuite/tests/package/package06.hs
testsuite/tests/package/package06.hs
+2
-2
testsuite/tests/package/package06e.hs
testsuite/tests/package/package06e.hs
+1
-1
testsuite/tests/package/package06e.stderr
testsuite/tests/package/package06e.stderr
+1
-1
testsuite/tests/package/package07e.hs
testsuite/tests/package/package07e.hs
+3
-3
testsuite/tests/package/package07e.stderr
testsuite/tests/package/package07e.stderr
+4
-4
testsuite/tests/package/package08e.hs
testsuite/tests/package/package08e.hs
+3
-3
testsuite/tests/package/package08e.stderr
testsuite/tests/package/package08e.stderr
+4
-4
testsuite/tests/parser/should_fail/readFail001.hs
testsuite/tests/parser/should_fail/readFail001.hs
+1
-1
testsuite/tests/plugins/simple-plugin/Simple/RemovePlugin.hs
testsuite/tests/plugins/simple-plugin/Simple/RemovePlugin.hs
+4
-4
testsuite/tests/plugins/simple-plugin/Simple/SourcePlugin.hs
testsuite/tests/plugins/simple-plugin/Simple/SourcePlugin.hs
+5
-5
testsuite/tests/plugins/static-plugins.hs
testsuite/tests/plugins/static-plugins.hs
+5
-5
testsuite/tests/pmcheck/should_compile/pmc009.hs
testsuite/tests/pmcheck/should_compile/pmc009.hs
+1
-1
utils/check-ppr/Main.hs
utils/check-ppr/Main.hs
+1
-1
utils/haddock
utils/haddock
+1
-1
No files found.
compiler/
hsSyn/HsSyn
.hs
→
compiler/
GHC/Hs
.hs
View file @
51192964
...
...
@@ -13,23 +13,23 @@ therefore, is almost nothing but re-exporting.
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE UndecidableInstances #-}
-- Note [Pass sensitive types]
-- in module PlaceHolder
-- in module
GHC.Hs.
PlaceHolder
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleInstances #-}
-- For deriving instance Data
module
HsSyn
(
module
Hs
Binds
,
module
Hs
Decls
,
module
Hs
Expr
,
module
Hs
ImpExp
,
module
Hs
Lit
,
module
Hs
Pat
,
module
Hs
Types
,
module
Hs
Utils
,
module
Hs
Doc
,
module
PlaceHolder
,
module
Hs
Extension
,
module
GHC.Hs
(
module
GHC
.
Hs
.
Binds
,
module
GHC
.
Hs
.
Decls
,
module
GHC
.
Hs
.
Expr
,
module
GHC
.
Hs
.
ImpExp
,
module
GHC
.
Hs
.
Lit
,
module
GHC
.
Hs
.
Pat
,
module
GHC
.
Hs
.
Types
,
module
GHC
.
Hs
.
Utils
,
module
GHC
.
Hs
.
Doc
,
module
GHC
.
Hs
.
PlaceHolder
,
module
GHC
.
Hs
.
Extension
,
Fixity
,
HsModule
(
..
),
...
...
@@ -38,19 +38,19 @@ module HsSyn (
-- friends:
import
GhcPrelude
import
Hs
Decls
import
Hs
Binds
import
Hs
Expr
import
Hs
ImpExp
import
Hs
Lit
import
PlaceHolder
import
Hs
Extension
import
Hs
Pat
import
Hs
Types
import
GHC.Hs.
Decls
import
GHC.Hs.
Binds
import
GHC.Hs.
Expr
import
GHC.Hs.
ImpExp
import
GHC.Hs.
Lit
import
GHC.Hs.
PlaceHolder
import
GHC.Hs.
Extension
import
GHC.Hs.
Pat
import
GHC.Hs.
Types
import
BasicTypes
(
Fixity
,
WarningTxt
)
import
Hs
Utils
import
Hs
Doc
import
Hs
Instances
()
-- For Data instances
import
GHC.Hs.
Utils
import
GHC.Hs.
Doc
import
GHC.Hs.
Instances
()
-- For Data instances
-- others:
import
Outputable
...
...
compiler/
hsSyn/Hs
Binds.hs
→
compiler/
GHC/Hs/
Binds.hs
View file @
51192964
...
...
@@ -12,22 +12,22 @@ Datatype for: @BindGroup@, @Bind@, @Sig@, @Bind@.
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE UndecidableInstances #-}
-- Note [Pass sensitive types]
-- in module PlaceHolder
-- in module
GHC.Hs.
PlaceHolder
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE TypeFamilies #-}
module
Hs
Binds
where
module
GHC.Hs.
Binds
where
import
GhcPrelude
import
{-#
SOURCE
#-
}
Hs
Expr
(
pprExpr
,
LHsExpr
,
MatchGroup
,
pprFunBind
,
GRHSs
,
pprPatBind
)
import
{-#
SOURCE
#-
}
Hs
Pat
(
LPat
)
import
{-#
SOURCE
#-
}
GHC
.
Hs
.
Expr
(
pprExpr
,
LHsExpr
,
MatchGroup
,
pprFunBind
,
GRHSs
,
pprPatBind
)
import
{-#
SOURCE
#-
}
GHC
.
Hs
.
Pat
(
LPat
)
import
Hs
Extension
import
Hs
Types
import
GHC.Hs.
Extension
import
GHC.Hs.
Types
import
CoreSyn
import
TcEvidence
import
Type
...
...
@@ -223,7 +223,7 @@ data HsBindLR idL idR
-- free variables of this defn.
-- See Note [Bind free vars]
fun_id
::
Located
(
IdP
idL
),
-- Note [fun_id in Match] in
Hs
Expr
fun_id
::
Located
(
IdP
idL
),
-- Note [fun_id in Match] in
GHC.Hs.
Expr
fun_matches
::
MatchGroup
idR
(
LHsExpr
idR
),
-- ^ The payload
...
...
compiler/
hsSyn/Hs
Decls.hs
→
compiler/
GHC/Hs/
Decls.hs
View file @
51192964
...
...
@@ -8,7 +8,7 @@
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE UndecidableInstances #-}
-- Note [Pass sensitive types]
-- in module PlaceHolder
-- in module
GHC.Hs.
PlaceHolder
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE TypeFamilies #-}
...
...
@@ -16,7 +16,7 @@
--
-- Definitions for: @SynDecl@ and @ConDecl@, @ClassDecl@,
-- @InstDecl@, @DefaultDecl@ and @ForeignDecl@.
module
Hs
Decls
(
module
GHC.Hs.
Decls
(
-- * Toplevel declarations
HsDecl
(
..
),
LHsDecl
,
HsDataDefn
(
..
),
HsDeriving
,
LHsFunDep
,
HsDerivingClause
(
..
),
LHsDerivingClause
,
NewOrData
(
..
),
newOrDataToFlavour
,
...
...
@@ -88,18 +88,18 @@ module HsDecls (
-- friends:
import
GhcPrelude
import
{-#
SOURCE
#-
}
Hs
Expr
(
HsExpr
,
HsSplice
,
pprExpr
,
pprSpliceDecl
)
import
{-#
SOURCE
#-
}
GHC
.
Hs
.
Expr
(
HsExpr
,
HsSplice
,
pprExpr
,
pprSpliceDecl
)
-- Because Expr imports Decls via HsBracket
import
Hs
Binds
import
Hs
Types
import
Hs
Doc
import
GHC.Hs.
Binds
import
GHC.Hs.
Types
import
GHC.Hs.
Doc
import
TyCon
import
BasicTypes
import
Coercion
import
ForeignCall
import
Hs
Extension
import
GHC.Hs.
Extension
import
NameSet
-- others:
...
...
@@ -388,7 +388,7 @@ Default methods
E.g. $dmmax
- If there is a default method name at all, it's recorded in
the ClassOpSig (in
Hs
Binds), in the DefMethInfo field.
the ClassOpSig (in
GHC.Hs.
Binds), in the DefMethInfo field.
(DefMethInfo is defined in Class.hs)
Source-code class decls and interface-code class decls are treated subtly
...
...
@@ -1370,7 +1370,7 @@ There's a wrinkle in ConDeclGADT
con_res_ty = T a
We need the RecCon before the reanmer, so we can find the record field
binders in
Hs
Utils.hsConDeclsBinders.
binders in
GHC.Hs.
Utils.hsConDeclsBinders.
* However for a GADT constr declaration which is not a record, it can
be hard parse until we know operator fixities. Consider for example
...
...
compiler/
hsSyn/Hs
Doc.hs
→
compiler/
GHC/Hs/
Doc.hs
View file @
51192964
...
...
@@ -2,7 +2,7 @@
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module
Hs
Doc
module
GHC.Hs.
Doc
(
HsDocString
,
LHsDocString
,
mkHsDocString
...
...
compiler/
hsSyn/HsDumpAst
.hs
→
compiler/
GHC/Hs/Dump
.hs
View file @
51192964
...
...
@@ -5,11 +5,11 @@
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
-- | Contains a debug function to dump parts of the
hsSyn
AST. It uses a syb
-- | Contains a debug function to dump parts of the
GHC.Hs
AST. It uses a syb
-- traversal which falls back to displaying based on the constructor name, so
-- can be used to dump anything having a @Data.Data@ instance.
module
HsDumpAst
(
module
GHC.Hs.Dump
(
-- * Dumping ASTs
showAstData
,
BlankSrcSpan
(
..
),
...
...
@@ -25,7 +25,7 @@ import NameSet
import
Name
import
DataCon
import
SrcLoc
import
HsSyn
import
GHC.Hs
import
OccName
hiding
(
occName
)
import
Var
import
Module
...
...
compiler/
hsSyn/Hs
Expr.hs
→
compiler/
GHC/Hs/
Expr.hs
View file @
51192964
...
...
@@ -7,27 +7,27 @@
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE UndecidableInstances #-}
-- Note [Pass sensitive types]
-- in module PlaceHolder
-- in module
GHC.Hs.
PlaceHolder
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE TypeFamilies #-}
-- | Abstract Haskell syntax for expressions.
module
Hs
Expr
where
module
GHC.Hs.
Expr
where
#
include
"HsVersions.h"
-- friends:
import
GhcPrelude
import
Hs
Decls
import
Hs
Pat
import
Hs
Lit
import
PlaceHolder
(
NameOrRdrName
)
import
Hs
Extension
import
Hs
Types
import
Hs
Binds
import
GHC.Hs.
Decls
import
GHC.Hs.
Pat
import
GHC.Hs.
Lit
import
GHC.Hs.
PlaceHolder
(
NameOrRdrName
)
import
GHC.Hs.
Extension
import
GHC.Hs.
Types
import
GHC.Hs.
Binds
-- others:
import
TcEvidence
...
...
@@ -629,7 +629,7 @@ data HsExpr p
-- Finally, HsWrap appears only in typechecker output
-- The contained Expr is *NOT* itself an HsWrap.
-- See Note [Detecting forced eta expansion] in DsExpr. This invariant
-- is maintained by
Hs
Utils.mkHsWrap.
-- is maintained by
GHC.Hs.
Utils.mkHsWrap.
|
HsWrap
(
XWrap
p
)
HsWrapper
-- TRANSLATION
...
...
@@ -1630,12 +1630,12 @@ pprMatches MG { mg_alts = matches }
-- Don't print the type; it's only a place-holder before typechecking
pprMatches
(
XMatchGroup
x
)
=
ppr
x
-- Exported to
Hs
Binds, which can't see the defn of HsMatchContext
-- Exported to
GHC.Hs.
Binds, which can't see the defn of HsMatchContext
pprFunBind
::
(
OutputableBndrId
(
GhcPass
idR
),
Outputable
body
)
=>
MatchGroup
(
GhcPass
idR
)
body
->
SDoc
pprFunBind
matches
=
pprMatches
matches
-- Exported to
Hs
Binds, which can't see the defn of HsMatchContext
-- Exported to
GHC.Hs.
Binds, which can't see the defn of HsMatchContext
pprPatBind
::
forall
bndr
p
body
.
(
OutputableBndrId
(
GhcPass
bndr
),
OutputableBndrId
(
GhcPass
p
),
Outputable
body
)
...
...
compiler/
hsSyn/Hs
Expr.hs-boot
→
compiler/
GHC/Hs/
Expr.hs-boot
View file @
51192964
{-# LANGUAGE CPP, KindSignatures #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE UndecidableInstances #-}
-- Note [Pass sensitive types]
-- in module PlaceHolder
-- in module
GHC.Hs.
PlaceHolder
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE RoleAnnotations #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE TypeFamilies #-}
module
Hs
Expr
where
module
GHC.Hs.
Expr
where
import
SrcLoc
(
Located
)
import
Outputable
(
SDoc
,
Outputable
)
import
{-#
SOURCE
#-
}
Hs
Pat
(
LPat
)
import
{-#
SOURCE
#-
}
GHC
.
Hs
.
Pat
(
LPat
)
import
BasicTypes
(
SpliceExplicitFlag
(
..
))
import
Hs
Extension
(
OutputableBndrId
,
GhcPass
)
import
GHC.Hs.
Extension
(
OutputableBndrId
,
GhcPass
)
type
role
HsExpr
nominal
type
role
HsCmd
nominal
...
...
compiler/
hsSyn/Hs
Extension.hs
→
compiler/
GHC/Hs/
Extension.hs
View file @
51192964
...
...
@@ -11,17 +11,17 @@
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE UndecidableInstances #-}
-- Note [Pass sensitive types]
-- in module PlaceHolder
-- in module
GHC.Hs.
PlaceHolder
module
Hs
Extension
where
module
GHC.Hs.
Extension
where
-- This module captures the type families to precisely identify the extension
-- points for
HsSyn
-- points for
GHC.Hs syntax
import
GhcPrelude
import
Data.Data
hiding
(
Fixity
)
import
PlaceHolder
import
GHC.Hs.
PlaceHolder
import
Name
import
RdrName
import
Var
...
...
@@ -152,7 +152,7 @@ type instance IdP GhcTc = Id
type
LIdP
p
=
Located
(
IdP
p
)
-- | Marks that a field uses the GhcRn variant even when the pass
-- parameter is GhcTc. Useful for storing HsTypes in
Hs
Exprs, say, because
-- parameter is GhcTc. Useful for storing HsTypes in
GHC.Hs.
Exprs, say, because
-- HsType GhcTc should never occur.
type
family
NoGhcTc
(
p
::
Type
)
where
-- this way, GHC can figure out that the result is a GhcPass
...
...
compiler/
hsSyn/Hs
ImpExp.hs
→
compiler/
GHC/Hs/
ImpExp.hs
View file @
51192964
...
...
@@ -3,7 +3,7 @@
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
Hs
ImpExp: Abstract syntax: imports, exports, interfaces
GHC.Hs.
ImpExp: Abstract syntax: imports, exports, interfaces
-}
{-# LANGUAGE DeriveDataTypeable #-}
...
...
@@ -11,14 +11,14 @@ HsImpExp: Abstract syntax: imports, exports, interfaces
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
-- Note [Pass sensitive types]
-- in module PlaceHolder
-- in module
GHC.Hs.
PlaceHolder
module
Hs
ImpExp
where
module
GHC.Hs.
ImpExp
where
import
GhcPrelude
import
Module
(
ModuleName
)
import
HsDoc
(
HsDocString
)
import
GHC.Hs.Doc
(
HsDocString
)
import
OccName
(
HasOccName
(
..
),
isTcOcc
,
isSymOcc
)
import
BasicTypes
(
SourceText
(
..
),
StringLiteral
(
..
),
pprWithSourceText
)
import
FieldLabel
(
FieldLbl
(
..
)
)
...
...
@@ -26,7 +26,7 @@ import FieldLabel ( FieldLbl(..) )
import
Outputable
import
FastString
import
SrcLoc
import
Hs
Extension
import
GHC.Hs.
Extension
import
Data.Data
import
Data.Maybe
...
...
@@ -213,7 +213,7 @@ data IE pass
-- 'ApiAnnotation.AnnType','ApiAnnotation.AnnVal'
-- For details on above see note [Api annotations] in ApiAnnotation
-- See Note [Located RdrNames] in
Hs
Expr
-- See Note [Located RdrNames] in
GHC.Hs.
Expr
|
IEThingAll
(
XIEThingAll
pass
)
(
LIEWrappedName
(
IdP
pass
))
-- ^ Imported or exported Thing with All imported or exported
--
...
...
@@ -224,7 +224,7 @@ data IE pass
-- 'ApiAnnotation.AnnType'
-- For details on above see note [Api annotations] in ApiAnnotation
-- See Note [Located RdrNames] in
Hs
Expr
-- See Note [Located RdrNames] in
GHC.Hs.
Expr
|
IEThingWith
(
XIEThingWith
pass
)
(
LIEWrappedName
(
IdP
pass
))
...
...
compiler/
hsSyn/Hs
Instances.hs
→
compiler/
GHC/Hs/
Instances.hs
View file @
51192964
...
...
@@ -5,7 +5,7 @@
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE UndecidableInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module
Hs
Instances
where
module
GHC.Hs.
Instances
where
-- This module defines the Data instances for the hsSyn AST.
...
...
@@ -17,20 +17,20 @@ module HsInstances where
import
Data.Data
hiding
(
Fixity
)
import
GhcPrelude
import
Hs
Extension
import
Hs
Binds
import
Hs
Decls
import
Hs
Expr
import
Hs
Lit
import
Hs
Types
import
Hs
Pat
import
Hs
ImpExp
import
GHC.Hs.
Extension
import
GHC.Hs.
Binds
import
GHC.Hs.
Decls
import
GHC.Hs.
Expr
import
GHC.Hs.
Lit
import
GHC.Hs.
Types
import
GHC.Hs.
Pat
import
GHC.Hs.
ImpExp
-- ---------------------------------------------------------------------
-- Data derivations from
HsSyn
-----------------------------------------
-- Data derivations from
GHC.Hs
-----------------------------------------
-- ---------------------------------------------------------------------
-- Data derivations from
HsBinds -----
----------------------------------
-- Data derivations from
GHC.Hs.Binds
----------------------------------
-- deriving instance (DataIdLR pL pR) => Data (HsLocalBindsLR pL pR)
deriving
instance
Data
(
HsLocalBindsLR
GhcPs
GhcPs
)
...
...
@@ -92,7 +92,7 @@ deriving instance Data (HsPatSynDir GhcRn)
deriving
instance
Data
(
HsPatSynDir
GhcTc
)
-- ---------------------------------------------------------------------
-- Data derivations from
HsDecls -----
----------------------------------
-- Data derivations from
GHC.Hs.Decls
----------------------------------
-- deriving instance (DataIdLR p p) => Data (HsDecl p)
deriving
instance
Data
(
HsDecl
GhcPs
)
...
...
@@ -235,7 +235,7 @@ deriving instance Data (RoleAnnotDecl GhcRn)
deriving
instance
Data
(
RoleAnnotDecl
GhcTc
)
-- ---------------------------------------------------------------------
-- Data derivations from
HsExpr -----
-----------------------------------
-- Data derivations from
GHC.Hs.Expr
-----------------------------------
-- deriving instance (DataIdLR p p) => Data (SyntaxExpr p)
deriving
instance
Data
(
SyntaxExpr
GhcPs
)
...
...
@@ -327,7 +327,7 @@ deriving instance Data PendingRnSplice
deriving
instance
Data
PendingTcSplice
-- ---------------------------------------------------------------------
-- Data derivations from
HsLit ----
------------------------------------
-- Data derivations from
GHC.Hs.Lit
------------------------------------
-- deriving instance (DataId p) => Data (HsLit p)
deriving
instance
Data
(
HsLit
GhcPs
)
...
...
@@ -340,7 +340,7 @@ deriving instance Data (HsOverLit GhcRn)
deriving
instance
Data
(
HsOverLit
GhcTc
)
-- ---------------------------------------------------------------------
-- Data derivations from
HsPat -----
------------------------------------
-- Data derivations from
GHC.Hs.Pat
------------------------------------
-- deriving instance (DataIdLR p p) => Data (Pat p)
deriving
instance
Data
(
Pat
GhcPs
)
...
...
@@ -355,7 +355,7 @@ deriving instance (Data body) => Data (HsRecFields GhcRn body)
deriving
instance
(
Data
body
)
=>
Data
(
HsRecFields
GhcTc
body
)
-- ---------------------------------------------------------------------
-- Data derivations from
HsTypes -----
----------------------------------
-- Data derivations from
GHC.Hs.Types
----------------------------------
-- deriving instance (DataIdLR p p) => Data (LHsQTyVars p)
deriving
instance
Data
(
LHsQTyVars
GhcPs
)
...
...
compiler/
hsSyn/Hs
Lit.hs
→
compiler/
GHC/Hs/
Lit.hs
View file @
51192964
...
...
@@ -10,23 +10,23 @@
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE UndecidableInstances #-}
-- Note [Pass sensitive types]
-- in module PlaceHolder
-- in module
GHC.Hs.
PlaceHolder
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE TypeFamilies #-}
module
Hs
Lit
where
module
GHC.Hs.
Lit
where
#
include
"HsVersions.h"
import
GhcPrelude
import
{-#
SOURCE
#-
}
Hs
Expr
(
HsExpr
,
pprExpr
)
import
{-#
SOURCE
#-
}
GHC
.
Hs
.
Expr
(
HsExpr
,
pprExpr
)
import
BasicTypes
(
IntegralLit
(
..
),
FractionalLit
(
..
),
negateIntegralLit
,
negateFractionalLit
,
SourceText
(
..
),
pprWithSourceText
)
import
Type
import
Outputable
import
FastString
import
Hs
Extension
import
GHC.Hs.
Extension
import
Data.ByteString
(
ByteString
)
import
Data.Data
hiding
(
Fixity
)
...
...
@@ -41,7 +41,7 @@ import Data.Data hiding ( Fixity )
-- Note [Literal source text] in BasicTypes for SourceText fields in
-- the following
-- Note [Trees that grow] in
Hs
Extension for the Xxxxx fields in the following
-- Note [Trees that grow] in
GHC.Hs.
Extension for the Xxxxx fields in the following
-- | Haskell Literal
data
HsLit
x
=
HsChar
(
XHsChar
x
)
{- SourceText -}
Char
...
...
compiler/
hsSyn/Hs
Pat.hs
→
compiler/
GHC/Hs/
Pat.hs
View file @
51192964
...
...
@@ -12,13 +12,13 @@
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE UndecidableInstances #-}
-- Note [Pass sensitive types]
-- in module PlaceHolder
-- in module
GHC.Hs.
PlaceHolder
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE FlexibleInstances #-}
module
Hs
Pat
(
module
GHC.Hs.
Pat
(
Pat
(
..
),
InPat
,
OutPat
,
LPat
,
ListPatTc
(
..
),
...
...
@@ -43,13 +43,13 @@ module HsPat (
import
GhcPrelude
import
{-#
SOURCE
#-
}
HsExpr
(
SyntaxExpr
,
LHsExpr
,
HsSplice
,
pprLExpr
,
pprSplice
)
import
{-#
SOURCE
#-
}
GHC
.
Hs
.
Expr
(
SyntaxExpr
,
LHsExpr
,
HsSplice
,
pprLExpr
,
pprSplice
)
-- friends:
import
Hs
Binds
import
Hs
Lit
import
Hs
Extension
import
Hs
Types
import
GHC.Hs.
Binds
import
GHC.Hs.
Lit
import
GHC.Hs.
Extension
import
GHC.Hs.
Types
import
TcEvidence
import
BasicTypes
-- others:
...
...
@@ -89,7 +89,7 @@ data Pat p
|
VarPat
(
XVarPat
p
)
(
Located
(
IdP
p
))
-- ^ Variable Pattern
-- See Note [Located RdrNames] in
Hs
Expr
-- See Note [Located RdrNames] in
GHC.Hs.
Expr
|
LazyPat
(
XLazyPat
p
)
(
LPat
p
)
-- ^ Lazy Pattern
-- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnTilde'
...
...
@@ -104,7 +104,7 @@ data Pat p
|
ParPat
(
XParPat
p
)
(
LPat
p
)
-- ^ Parenthesised pattern
-- See Note [Parens in HsSyn] in
Hs
Expr
-- See Note [Parens in HsSyn] in
GHC.Hs.
Expr
-- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'('@,
-- 'ApiAnnotation.AnnClose' @')'@
...
...
@@ -155,7 +155,7 @@ data Pat p
-- 'ApiAnnotation.AnnOpen' @'('@ or @'(#'@,
-- 'ApiAnnotation.AnnClose' @')'@ or @'#)'@
|
SumPat
(
XSumPat
p
)
-- PlaceHolder before typechecker, filled in
|
SumPat
(
XSumPat
p
)
--
GHC.Hs.
PlaceHolder before typechecker, filled in
-- afterwards with the types of the
-- alternative
(
LPat
p
)
-- Sum sub-pattern
...
...
compiler/
hsSyn/Hs
Pat.hs-boot
→
compiler/
GHC/Hs/
Pat.hs-boot
View file @
51192964
{-# LANGUAGE CPP, KindSignatures #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE UndecidableInstances #-}
-- Note [Pass sensitive types]
-- in module PlaceHolder
-- in module
GHC.Hs.
PlaceHolder
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE RoleAnnotations #-}
{-# LANGUAGE TypeFamilies #-}
module
Hs
Pat
where
module
GHC.Hs.
Pat
where
import
Outputable
import
HsExtension
(
OutputableBndrId
,
GhcPass
)
import
GHC.Hs.Extension
(
OutputableBndrId
,
GhcPass
)
type
role
Pat
nominal
data
Pat
(
i
::
*
)
...
...
compiler/
hsSyn
/PlaceHolder.hs
→
compiler/
GHC/Hs
/PlaceHolder.hs
View file @
51192964
...
...
@@ -4,7 +4,7 @@
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE StandaloneDeriving #-}
module
PlaceHolder
where
module
GHC.Hs.
PlaceHolder
where
import
Name
import
NameSet
...
...
compiler/
hsSyn/Hs
Types.hs
→
compiler/
GHC/Hs/
Types.hs
View file @
51192964
...
...
@@ -3,7 +3,7 @@
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
Hs
Types: Abstract syntax: user-defined types
GHC.Hs.
Types: Abstract syntax: user-defined types
-}
{-# LANGUAGE DeriveDataTypeable #-}
...
...
@@ -12,12 +12,12 @@ HsTypes: Abstract syntax: user-defined types
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE UndecidableInstances #-}
-- Note [Pass sensitive types]
-- in module PlaceHolder
-- in module
GHC.Hs.
PlaceHolder
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE TypeFamilies #-}
module
Hs
Types
(
module
GHC.Hs.
Types
(
HsType
(
..
),
NewHsTypeX
(
..
),
LHsType
,
HsKind
,
LHsKind
,
HsTyVarBndr
(
..
),
LHsTyVarBndr
,
ForallVisFlag
(
..
),
LHsQTyVars
(
..
),
...
...
@@ -74,9 +74,9 @@ module HsTypes (