diff options
author | Chaitanya Koparkar <ckoparkar@gmail.com> | 2020-07-15 10:08:57 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-07-18 07:26:46 -0400 |
commit | 49b265f08c7ac9c9dea6cfff0d67447728b7b416 (patch) | |
tree | ca1e24b255f487b04c3393228a4e15a3b97d075b | |
parent | e504c9137dff2b8f51e8ed96b5cbb5a0d19f8e3a (diff) | |
download | haskell-49b265f08c7ac9c9dea6cfff0d67447728b7b416.tar.gz |
Fix minor typos in a Core.hs note
-rw-r--r-- | compiler/GHC/Core.hs | 14 | ||||
-rw-r--r-- | compiler/GHC/Core/Lint.hs | 2 |
2 files changed, 7 insertions, 9 deletions
diff --git a/compiler/GHC/Core.hs b/compiler/GHC/Core.hs index a99a1adfd6..5e13b4e275 100644 --- a/compiler/GHC/Core.hs +++ b/compiler/GHC/Core.hs @@ -209,8 +209,8 @@ These data types are the heart of the compiler -- This is used to implement @newtype@s (a @newtype@ constructor or -- destructor just becomes a 'Cast' in Core) and GADTs. -- --- * Notes. These allow general information to be added to expressions --- in the syntax tree +-- * Ticks. These are used to represent all the source annotation we +-- support: profiling SCCs, HPC ticks, and GHCi breakpoints. -- -- * A type: this should only show up at the top level of an Arg -- @@ -574,10 +574,6 @@ Note [Core let goal] application, its arguments are trivial, so that the constructor can be inlined vigorously. -Note [Type let] -~~~~~~~~~~~~~~~ -See #type_let# - Note [Empty case alternatives] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The alternatives of a case expression should be exhaustive. But @@ -2058,12 +2054,14 @@ mkLetRec :: [(b, Expr b)] -> Expr b -> Expr b mkLetRec [] body = body mkLetRec bs body = Let (Rec bs) body --- | Create a binding group where a type variable is bound to a type. Per "GHC.Core#type_let", +-- | Create a binding group where a type variable is bound to a type. +-- Per Note [Core type and coercion invariant], -- this can only be used to bind something in a non-recursive @let@ expression mkTyBind :: TyVar -> Type -> CoreBind mkTyBind tv ty = NonRec tv (Type ty) --- | Create a binding group where a type variable is bound to a type. Per "GHC.Core#type_let", +-- | Create a binding group where a type variable is bound to a type. +-- Per Note [Core type and coercion invariant], -- this can only be used to bind something in a non-recursive @let@ expression mkCoBind :: CoVar -> Coercion -> CoreBind mkCoBind cv co = NonRec cv (Coercion co) diff --git a/compiler/GHC/Core/Lint.hs b/compiler/GHC/Core/Lint.hs index 32abec0521..04a839c6cd 100644 --- a/compiler/GHC/Core/Lint.hs +++ b/compiler/GHC/Core/Lint.hs @@ -168,7 +168,7 @@ Note [Linting type lets] In the desugarer, it's very very convenient to be able to say (in effect) let a = Type Bool in let x::a = True in <body> -That is, use a type let. See Note [Type let] in "GHC.Core". +That is, use a type let. See Note [Core type and coercion invariant] in "GHC.Core". One place it is used is in mkWwArgs; see Note [Join points and beta-redexes] in GHC.Core.Opt.WorkWrap.Utils. (Maybe there are other "clients" of this feature; I'm not sure). |