diff options
author | Adam Gundry <adam@well-typed.com> | 2021-04-23 23:05:04 +0100 |
---|---|---|
committer | Adam Gundry <adam@well-typed.com> | 2021-04-23 23:05:04 +0100 |
commit | 0015f019f72ddd2ca4a46e987bf17acaf0ce59d2 (patch) | |
tree | 444e436eb750834da1fd6f8ea117a4166ef00879 | |
parent | 7bc7eea3897dcb8a87fdb0921f451b9bc77309f6 (diff) | |
download | haskell-wip/amg/rename-ttg-notes.tar.gz |
Rename references to Note [Trees That Grow] consistently [skip ci]wip/amg/rename-ttg-notes
I tend to find Notes by (case-sensitive) grep, and I spent a surprisingly
long time looking for this Note, because it was referenced inconsistently
with different cases, and without the module name.
-rw-r--r-- | compiler/Language/Haskell/Syntax.hs | 4 | ||||
-rw-r--r-- | compiler/Language/Haskell/Syntax/Expr.hs | 17 | ||||
-rw-r--r-- | compiler/Language/Haskell/Syntax/Extension.hs | 2 | ||||
-rw-r--r-- | compiler/Language/Haskell/Syntax/Lit.hs | 3 | ||||
-rw-r--r-- | compiler/Language/Haskell/Syntax/Pat.hs | 2 | ||||
-rw-r--r-- | compiler/Language/Haskell/Syntax/Type.hs | 2 |
6 files changed, 18 insertions, 12 deletions
diff --git a/compiler/Language/Haskell/Syntax.hs b/compiler/Language/Haskell/Syntax.hs index 5a7b0b0b9d..79012495ef 100644 --- a/compiler/Language/Haskell/Syntax.hs +++ b/compiler/Language/Haskell/Syntax.hs @@ -40,8 +40,8 @@ Note [Language.Haskell.Syntax.* Hierarchy] Why are these modules not 'GHC.Hs.*', or some other 'GHC.*'? The answer is that they are to be separated from GHC and put into another package, -in accordance with the final goals of Trees that Grow. (See Note [Trees -that grow] in 'Language.Haskell.Syntax.Extension'.) In short, the +in accordance with the final goals of Trees That Grow. (See Note [Trees +That Grow] in 'Language.Haskell.Syntax.Extension'.) In short, the 'Language.Haskell.Syntax.*' tree should be entirely GHC-independent. GHC-specific stuff related to source-language syntax should be in 'GHC.Hs.*'. diff --git a/compiler/Language/Haskell/Syntax/Expr.hs b/compiler/Language/Haskell/Syntax/Expr.hs index e7756cc804..f795aa702f 100644 --- a/compiler/Language/Haskell/Syntax/Expr.hs +++ b/compiler/Language/Haskell/Syntax/Expr.hs @@ -607,7 +607,7 @@ data HsExpr p | HsPragE (XPragE p) (HsPragE p) (LHsExpr p) | XExpr !(XXExpr p) - -- Note [Trees that Grow] extension constructor for the + -- Note [Trees That Grow] in Language.Haskell.Syntax.Extension for the -- general idea, and Note [Rebindable syntax and HsExpansion] in GHC.Hs.Expr -- for an example of how we use it. @@ -661,7 +661,8 @@ type LHsTupArg id = XRec id (HsTupArg id) data HsTupArg id = Present (XPresent id) (LHsExpr id) -- ^ The argument | Missing (XMissing id) -- ^ The argument is missing, but this is its type - | XTupArg !(XXTupArg id) -- ^ Note [Trees that Grow] extension point + | XTupArg !(XXTupArg id) -- ^ Extension point; see Note [Trees That Grow] + -- in Language.Haskell.Syntax.Extension {- Note [Parens in HsSyn] @@ -933,7 +934,8 @@ data HsCmd id -- For details on above see note [exact print annotations] in GHC.Parser.Annotation - | XCmd !(XXCmd id) -- Note [Trees that Grow] extension point + | XCmd !(XXCmd id) -- Extension point; see Note [Trees That Grow] + -- in Language.Haskell.Syntax.Extension -- | Haskell Array Application Type @@ -953,7 +955,8 @@ type LHsCmdTop p = XRec p (HsCmdTop p) data HsCmdTop p = HsCmdTop (XCmdTop p) (LHsCmd p) - | XCmdTop !(XXCmdTop p) -- Note [Trees that Grow] extension point + | XCmdTop !(XXCmdTop p) -- Extension point; see Note [Trees That Grow] + -- in Language.Haskell.Syntax.Extension ----------------------- @@ -1525,7 +1528,8 @@ data HsSplice id (XSpliced id) ThModFinalizers -- TH finalizers produced by the splice. (HsSplicedThing id) -- The result of splicing - | XSplice !(XXSplice id) -- Note [Trees that Grow] extension point + | XSplice !(XXSplice id) -- Extension point; see Note [Trees That Grow] + -- in Language.Haskell.Syntax.Extension -- | A splice can appear with various decorations wrapped around it. This data -- type captures explicitly how it was originally written, for use in the pretty @@ -1587,7 +1591,8 @@ data HsBracket p -- True: 'x, False: ''T -- (The Bool flag is used only in pprHsBracket) | TExpBr (XTExpBr p) (LHsExpr p) -- [|| expr ||] - | XBracket !(XXBracket p) -- Note [Trees that Grow] extension point + | XBracket !(XXBracket p) -- Extension point; see Note [Trees That Grow] + -- in Language.Haskell.Syntax.Extension isTypedBracket :: HsBracket id -> Bool isTypedBracket (TExpBr {}) = True diff --git a/compiler/Language/Haskell/Syntax/Extension.hs b/compiler/Language/Haskell/Syntax/Extension.hs index 892e93892d..7489e6fdaa 100644 --- a/compiler/Language/Haskell/Syntax/Extension.hs +++ b/compiler/Language/Haskell/Syntax/Extension.hs @@ -27,7 +27,7 @@ import Data.Kind (Type) import GHC.Utils.Outputable {- -Note [Trees that grow] +Note [Trees That Grow] ~~~~~~~~~~~~~~~~~~~~~~ See https://gitlab.haskell.org/ghc/ghc/wikis/implementing-trees-that-grow diff --git a/compiler/Language/Haskell/Syntax/Lit.hs b/compiler/Language/Haskell/Syntax/Lit.hs index c5dd7ec45b..a025edc4f6 100644 --- a/compiler/Language/Haskell/Syntax/Lit.hs +++ b/compiler/Language/Haskell/Syntax/Lit.hs @@ -44,7 +44,8 @@ import Data.Data hiding ( Fixity ) -- Note [Literal source text] in GHC.Types.Basic for SourceText fields in -- the following --- Note [Trees that grow] in Language.Haskell.Syntax.Extension for the Xxxxx fields in the following +-- Note [Trees That Grow] in Language.Haskell.Syntax.Extension for the Xxxxx +-- fields in the following -- | Haskell Literal data HsLit x = HsChar (XHsChar x) {- SourceText -} Char diff --git a/compiler/Language/Haskell/Syntax/Pat.hs b/compiler/Language/Haskell/Syntax/Pat.hs index 4417026478..df29f74271 100644 --- a/compiler/Language/Haskell/Syntax/Pat.hs +++ b/compiler/Language/Haskell/Syntax/Pat.hs @@ -210,7 +210,7 @@ data Pat p -- ^ Pattern with a type signature - -- | Trees that Grow extension point for new constructors + -- Extension point; see Note [Trees That Grow] in Language.Haskell.Syntax.Extension | XPat !(XXPat p) diff --git a/compiler/Language/Haskell/Syntax/Type.hs b/compiler/Language/Haskell/Syntax/Type.hs index f23072c04a..bbe3fe8b24 100644 --- a/compiler/Language/Haskell/Syntax/Type.hs +++ b/compiler/Language/Haskell/Syntax/Type.hs @@ -889,7 +889,7 @@ data HsType pass -- For details on above see note [exact print annotations] in GHC.Parser.Annotation - -- For adding new constructors via Trees that Grow + -- Extension point; see Note [Trees That Grow] in Language.Haskell.Syntax.Extension | XHsType !(XXType pass) |