GHC issueshttps://gitlab.haskell.org/ghc/ghc/-/issues2020-02-25T01:05:27Zhttps://gitlab.haskell.org/ghc/ghc/-/issues/17384:info incorrectly parenthesizes GADT return types in 8.8.12020-02-25T01:05:27ZRyan Scott:info incorrectly parenthesizes GADT return types in 8.8.1Load this code into GHCi 8.8.1:
```hs
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
module Bug where
import Data.Kind
data T :: Type -> Type where
MkT :: T (Maybe Bool)
```
And then run `:info T`. You'll get some unusual r...Load this code into GHCi 8.8.1:
```hs
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
module Bug where
import Data.Kind
data T :: Type -> Type where
MkT :: T (Maybe Bool)
```
And then run `:info T`. You'll get some unusual results:
```
$ /opt/ghc/8.8.1/bin/ghci Bug.hs
GHCi, version 8.8.1: https://www.haskell.org/ghc/ :? for help
Loaded GHCi configuration from /home/rgscott/.ghci
[1 of 1] Compiling Bug ( Bug.hs, interpreted )
Ok, one module loaded.
λ> :info T
type role T nominal
data T a where
MkT :: T Maybe Bool
-- Defined at Bug.hs:7:1
```
Notice how the return type is `T Maybe Bool`, which is wrong. Compare this to GHCi 8.6.5:
```
$ /opt/ghc/8.6.5/bin/ghci Bug.hs
GHCi, version 8.6.5: http://www.haskell.org/ghc/ :? for help
Loaded GHCi configuration from /home/rgscott/.ghci
[1 of 1] Compiling Bug ( Bug.hs, interpreted )
Ok, one module loaded.
λ> :info T
type role T nominal
data T a where
MkT :: T (Maybe Bool)
-- Defined at Bug.hs:7:1
```
This was a regression introduced by someone who shall remain unnamed in 9d9e35574a92773d872efd58a67339a9e054a9f1. Coincidentally, someone who shall remain unnamed will be preparing a fix shortly.8.8.2