GHC issueshttps://gitlab.haskell.org/ghc/ghc/-/issues2019-08-02T15:33:26Zhttps://gitlab.haskell.org/ghc/ghc/-/issues/15386TTG typo: XFieldOcc should be XCFieldOcc2019-08-02T15:33:26ZAlan ZimmermanTTG typo: XFieldOcc should be XCFieldOccIn the following
```hs
data FieldOcc pass = FieldOcc { extFieldOcc :: XFieldOcc pass
, rdrNameFieldOcc :: Located RdrName
-- ^ See Note [Located RdrNames] in HsExpr
...In the following
```hs
data FieldOcc pass = FieldOcc { extFieldOcc :: XFieldOcc pass
, rdrNameFieldOcc :: Located RdrName
-- ^ See Note [Located RdrNames] in HsExpr
}
| XFieldOcc
(XXFieldOcc pass)
```
we are using `XFieldOcc` for both the `extFieldOcc` type and the extra constructor.
The first one should be `XCFieldOcc`/
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.4.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"TTG typo: XFieldOcc should be XCFieldOcc","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"8.6.1","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.4.3","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"In the following\r\n\r\n{{{#!hs\r\ndata FieldOcc pass = FieldOcc { extFieldOcc :: XFieldOcc pass\r\n , rdrNameFieldOcc :: Located RdrName\r\n -- ^ See Note [Located RdrNames] in HsExpr\r\n }\r\n\r\n | XFieldOcc\r\n (XXFieldOcc pass)\r\n}}}\r\n\r\nwe are using `XFieldOcc` for both the `extFieldOcc` type and the extra constructor.\r\n\r\nThe first one should be `XCFieldOcc`/ ","type_of_failure":"OtherFailure","blocking":[]} -->8.6.1Alan ZimmermanAlan Zimmermanhttps://gitlab.haskell.org/ghc/ghc/-/issues/15323mkGadtDecl does not set con_forall correctly2019-07-07T18:13:10ZAlan ZimmermanmkGadtDecl does not set con_forall correctlyA GADT declaration surrounded in parens does not det the `con_forall` field correctly.
e.g.
```hs
data MaybeDefault v where
TestParens :: (forall v . (Eq v) => MaybeDefault v)
```
<details><summary>Trac metadata</summary>
| Trac...A GADT declaration surrounded in parens does not det the `con_forall` field correctly.
e.g.
```hs
data MaybeDefault v where
TestParens :: (forall v . (Eq v) => MaybeDefault v)
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.4.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"mkGadtDecl does not set con_forall correctly","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"8.6.1","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.4.3","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"A GADT declaration surrounded in parens does not det the `con_forall` field correctly.\r\n\r\ne.g.\r\n\r\n{{{#!hs\r\ndata MaybeDefault v where\r\n TestParens :: (forall v . (Eq v) => MaybeDefault v)\r\n}}}\r\n","type_of_failure":"OtherFailure","blocking":[]} -->8.6.1Alan ZimmermanAlan Zimmermanhttps://gitlab.haskell.org/ghc/ghc/-/issues/15303API Annotations lost when parsing tyapp2019-07-07T18:13:21ZAlan ZimmermanAPI Annotations lost when parsing tyappIn `Parser.y`, the `typapp` production has
```hs
| SIMPLEQUOTE qconop {% ams (sLL $1 $> $ TyElOpr (unLoc $2))
[mj AnnSimpleQuote $1] }
| SIMPLEQUOTE varop ...In `Parser.y`, the `typapp` production has
```hs
| SIMPLEQUOTE qconop {% ams (sLL $1 $> $ TyElOpr (unLoc $2))
[mj AnnSimpleQuote $1] }
| SIMPLEQUOTE varop {% ams (sLL $1 $> $ TyElOpr (unLoc $2))
[mj AnnSimpleQuote $1] }
```
By using `unLoc $2` we are discarding any annotations attached to the `qconop` or `qvarop`.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.4.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"API Annotations lost when parsing tyapp","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"8.6.1","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.4.3","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"In `Parser.y`, the `typapp` production has\r\n\r\n{{{#!hs\r\n | SIMPLEQUOTE qconop {% ams (sLL $1 $> $ TyElOpr (unLoc $2))\r\n [mj AnnSimpleQuote $1] }\r\n | SIMPLEQUOTE varop {% ams (sLL $1 $> $ TyElOpr (unLoc $2))\r\n [mj AnnSimpleQuote $1] }\r\n}}}\r\n\r\nBy using `unLoc $2` we are discarding any annotations attached to the `qconop` or `qvarop`.","type_of_failure":"OtherFailure","blocking":[]} -->8.6.1Alan ZimmermanAlan Zimmermanhttps://gitlab.haskell.org/ghc/ghc/-/issues/15302TTG for IPBind wrong extension name2019-08-02T15:33:03ZAlan ZimmermanTTG for IPBind wrong extension nameThe standard\[1\] for extension naming is to use the `XC` prefix for the internal extension points, rather than for a new constructor.
This is violated for `IPBind`, having
```hs
data IPBind id
= IPBind
(XIPBind id)
(...The standard\[1\] for extension naming is to use the `XC` prefix for the internal extension points, rather than for a new constructor.
This is violated for `IPBind`, having
```hs
data IPBind id
= IPBind
(XIPBind id)
(Either (Located HsIPName) (IdP id))
(LHsExpr id)
| XCIPBind (XXIPBind id)
```
Swap the usage of `XIPBind` and `XCIPBind`
\[1\] https://ghc.haskell.org/trac/ghc/wiki/ImplementingTreesThatGrow\#Namingconventions
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.4.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"TTG for IPBind wrong extension name","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"8.6.1","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.4.3","keywords":["ttg"],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"The standard[1] for extension naming is to use the `XC` prefix for the internal extension points, rather than for a new constructor.\r\n\r\nThis is violated for `IPBind`, having\r\n\r\n{{{#!hs\r\ndata IPBind id\r\n = IPBind\r\n (XIPBind id)\r\n (Either (Located HsIPName) (IdP id))\r\n (LHsExpr id)\r\n | XCIPBind (XXIPBind id)\r\n}}}\r\n\r\nSwap the usage of `XIPBind` and `XCIPBind`\r\n\r\n[1] https://ghc.haskell.org/trac/ghc/wiki/ImplementingTreesThatGrow#Namingconventions\r\n\r\n","type_of_failure":"OtherFailure","blocking":[]} -->8.6.1Alan ZimmermanAlan Zimmermanhttps://gitlab.haskell.org/ghc/ghc/-/issues/14529Refactor ConDecl2020-05-26T14:07:26ZSimon Peyton JonesRefactor ConDeclThe `ConDeclGADT` constructor in `ConDecl` is awful; all the information is buried. Refactor it.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version ...The `ConDeclGADT` constructor in `ConDecl` is awful; all the information is buried. Refactor it.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.2.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Refactor ConDecl","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.2.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"The `ConDeclGADT` constructor in `ConDecl` is awful; all the information is buried. Refactor it.\r\n","type_of_failure":"OtherFailure","blocking":[]} -->8.6.1Alan ZimmermanAlan Zimmerman