GHC issueshttps://gitlab.haskell.org/ghc/ghc/-/issues2019-07-07T18:39:22Zhttps://gitlab.haskell.org/ghc/ghc/-/issues/9705Panic on a pattern synonym in a class2019-07-07T18:39:22ZKrzysztof GogolewskiPanic on a pattern synonym in a classThis silly code causes a panic in rnMethodBind:
```hs
{-# LANGUAGE PatternSynonyms #-}
class C a where
pattern P = ()
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- |...This silly code causes a panic in rnMethodBind:
```hs
{-# LANGUAGE PatternSynonyms #-}
class C a where
pattern P = ()
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 7.8.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":"Panic on a pattern synonym in a class","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"7.8.3","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"This silly code causes a panic in rnMethodBind:\r\n\r\n{{{#!hs\r\n{-# LANGUAGE PatternSynonyms #-}\r\nclass C a where\r\n pattern P = ()\r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->7.8.4Gergő ÉrdiGergő Érdihttps://gitlab.haskell.org/ghc/ghc/-/issues/9433Partially applied type family allowed but unusable2019-07-07T18:40:25ZhesselinkPartially applied type family allowed but unusableI was playing around with the following code, which tries to map a type family over a type (something I thought would not be allowed):
```hs
{-# LANGUAGE
TypeFamilies
, KindSignatures
#-}
type family Id x :: *
type instance Id ...I was playing around with the following code, which tries to map a type family over a type (something I thought would not be allowed):
```hs
{-# LANGUAGE
TypeFamilies
, KindSignatures
#-}
type family Id x :: *
type instance Id a = a
type family Map (f :: * -> *) x :: *
type instance Map f [a] = [f a]
x :: Map Id [Bool]
x = []
```
Both GHC 7.8.3 and the current HEAD (7.9.20140811) accept this program! However, changing the definition of `x` to `[True]` gives an error:
```
Couldn't match type ‘Id Bool’ with ‘Bool’
Expected type: Map Id [Bool]
Actual type: [Bool]
In the expression: [True]
In an equation for ‘x’: x = [True]
```
If I define `y :: Id Bool` with value `True` (which works fine) and define `x = [y]`, I even get this error:
```
Couldn't match type ‘Bool’ with ‘Id Bool’
Expected type: Id Bool
Actual type: Id Bool
In the expression: y
In the expression: [y]
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ----------------------- |
| Version | 7.9 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler (Type checker) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Partially applied type family allowed but unusable","status":"New","operating_system":"","component":"Compiler (Type checker)","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"7.9","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"I was playing around with the following code, which tries to map a type family over a type (something I thought would not be allowed):\r\n\r\n{{{#!hs\r\n{-# LANGUAGE\r\n TypeFamilies\r\n , KindSignatures\r\n #-}\r\n\r\ntype family Id x :: *\r\ntype instance Id a = a\r\n\r\ntype family Map (f :: * -> *) x :: *\r\ntype instance Map f [a] = [f a]\r\n\r\nx :: Map Id [Bool]\r\nx = []\r\n}}}\r\n\r\nBoth GHC 7.8.3 and the current HEAD (7.9.20140811) accept this program! However, changing the definition of `x` to `[True]` gives an error:\r\n\r\n{{{\r\n Couldn't match type ‘Id Bool’ with ‘Bool’\r\n Expected type: Map Id [Bool]\r\n Actual type: [Bool]\r\n In the expression: [True]\r\n In an equation for ‘x’: x = [True]\r\n}}}\r\n\r\nIf I define `y :: Id Bool` with value `True` (which works fine) and define `x = [y]`, I even get this error:\r\n\r\n{{{\r\n Couldn't match type ‘Bool’ with ‘Id Bool’\r\n Expected type: Id Bool\r\n Actual type: Id Bool\r\n In the expression: y\r\n In the expression: [y]\r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->7.8.4https://gitlab.haskell.org/ghc/ghc/-/issues/8988Documentation build fails if GHCi is unavailable2019-07-07T18:42:25ZcjwatsonDocumentation build fails if GHCi is unavailableJoachim Breitner [reported](http://www.haskell.org/pipermail/glasgow-haskell-users/2014-March/024730.html) that the documentation fails to build on Debian armhf:
```
0% ( 0 / 5) in 'WwLib'
0% ( 0 / 2) in 'DmdAnal'
0% ( 0 /...Joachim Breitner [reported](http://www.haskell.org/pipermail/glasgow-haskell-users/2014-March/024730.html) that the documentation fails to build on Debian armhf:
```
0% ( 0 / 5) in 'WwLib'
0% ( 0 / 2) in 'DmdAnal'
0% ( 0 / 2) in 'WorkWrap'
compiler/typecheck/TcSplice.lhs-boot:29:1:
TcSplice.tcTopSpliceExpr is exported by the hs-boot file, but not exported by the module
compiler/typecheck/TcSplice.lhs-boot:37:1:
TcSplice.runMetaE is exported by the hs-boot file, but not exported by the module
compiler/typecheck/TcSplice.lhs-boot:38:1:
TcSplice.runMetaP is exported by the hs-boot file, but not exported by the module
compiler/typecheck/TcSplice.lhs-boot:39:1:
TcSplice.runMetaT is exported by the hs-boot file, but not exported by the module
compiler/typecheck/TcSplice.lhs-boot:40:1:
TcSplice.runMetaD is exported by the hs-boot file, but not exported by the module
67% ( 2 / 3) in 'CmmPipeline'
0% ( 0 / 3) in 'StgCmmHpc'
0% ( 0 / 13) in 'PrelInfo'
0% ( 0 / 4) in 'StgCmmCon'
0% ( 0 / 2) in 'StgCmmExpr'
0% ( 0 / 6) in 'StgCmmBind'
0% ( 0 / 2) in 'CmmParse'
0% ( 0 / 2) in 'StgCmm'
5% ( 9 /175) in 'TcRnMonad'
make[2]: *** [compiler/stage2/doc/html/ghc/ghc.haddock] Error 1
```
The attached patch fixes this.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ----------------------- |
| Version | 7.8.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler (Type checker) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Documentation build fails if GHCi is unavailable","status":"New","operating_system":"","component":"Compiler (Type checker)","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"7.8.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"Joachim Breitner [http://www.haskell.org/pipermail/glasgow-haskell-users/2014-March/024730.html reported] that the documentation fails to build on Debian armhf:\r\n\r\n{{{\r\n 0% ( 0 / 5) in 'WwLib'\r\n 0% ( 0 / 2) in 'DmdAnal'\r\n 0% ( 0 / 2) in 'WorkWrap'\r\n\r\ncompiler/typecheck/TcSplice.lhs-boot:29:1:\r\n TcSplice.tcTopSpliceExpr is exported by the hs-boot file, but not exported by the module\r\n\r\ncompiler/typecheck/TcSplice.lhs-boot:37:1:\r\n TcSplice.runMetaE is exported by the hs-boot file, but not exported by the module\r\n\r\ncompiler/typecheck/TcSplice.lhs-boot:38:1:\r\n TcSplice.runMetaP is exported by the hs-boot file, but not exported by the module\r\n\r\ncompiler/typecheck/TcSplice.lhs-boot:39:1:\r\n TcSplice.runMetaT is exported by the hs-boot file, but not exported by the module\r\n\r\ncompiler/typecheck/TcSplice.lhs-boot:40:1:\r\n TcSplice.runMetaD is exported by the hs-boot file, but not exported by the module\r\n 67% ( 2 / 3) in 'CmmPipeline'\r\n 0% ( 0 / 3) in 'StgCmmHpc'\r\n 0% ( 0 / 13) in 'PrelInfo'\r\n 0% ( 0 / 4) in 'StgCmmCon'\r\n 0% ( 0 / 2) in 'StgCmmExpr'\r\n 0% ( 0 / 6) in 'StgCmmBind'\r\n 0% ( 0 / 2) in 'CmmParse'\r\n 0% ( 0 / 2) in 'StgCmm'\r\n 5% ( 9 /175) in 'TcRnMonad'\r\nmake[2]: *** [compiler/stage2/doc/html/ghc/ghc.haddock] Error 1\r\n}}}\r\n\r\nThe attached patch fixes this.","type_of_failure":"OtherFailure","blocking":[]} -->7.8.4