... | ... | @@ -147,6 +147,58 @@ fromLabel::Proxy# x -> a -- old type signaturefromLabel:: a -- new t |
|
|
fromLabel(proxy#::Proxy#"foo"):: alpha -- old stylefromLabel@"foo":: alpha -- new style
|
|
|
```
|
|
|
|
|
|
- The `Generic1` class, as well related classes and data types from `GHC.Generics`, are now poly-kinded. Here are the kind signatures of these types before `base-4.10.0.0`:
|
|
|
|
|
|
```
|
|
|
classGeneric1(f ::*->*)wheretypeRep1 f ::*->*
|
|
|
from1 :: f a ->Rep1 f a
|
|
|
to1 ::Rep1 f a -> f a
|
|
|
|
|
|
classDatatype(d :: k)where
|
|
|
datatypeName :: t d (f ::*->*)(a :: k1)->[Char]
|
|
|
moduleName :: t d (f ::*->*)(a :: k1)->[Char]
|
|
|
packageName :: t d (f ::*->*)(a :: k1)->[Char]
|
|
|
isNewtype :: t d (f ::*->*)(a :: k1)->BoolclassConstructor(c :: k)where
|
|
|
conName :: t c (f ::*->*)(a :: k1)->[Char]
|
|
|
conFixity :: t c (f ::*->*)(a :: k1)->Fixity
|
|
|
conIsRecord :: t c (f ::*->*)(a :: k1)->BoolclassSelector(s :: k)where
|
|
|
selName :: t s (f ::*->*)(a :: k1)->[Char]
|
|
|
selSourceUnpackedness :: t s (f ::*->*)(a :: k1)->SourceUnpackedness
|
|
|
selSourceStrictness :: t s (f ::*->*)(a :: k1)->SourceStrictness
|
|
|
selDecidedStrictness :: t s (f ::*->*)(a :: k1)->DecidedStrictnessdataV1(p ::*)dataU1(p ::*)=U1newtypePar1 p =Par1 p
|
|
|
newtypeRec1(f ::*->*)(p ::*)=Rec1(f p)newtypeK1 i c (p ::*)=K1 c
|
|
|
newtypeM1 i c (f ::*->*)(p ::*)=M1(f p)data(:+:)(f ::*->*)(g ::*->*)(p ::*)=L1(f p)|R1(g p)data(:*:)(f ::*->*)(g ::*->*)(p ::*)= f p :*: g p
|
|
|
newtype(:.:)(f ::*->*)(g ::*->*)(p ::*)=Comp1(f (g p))datafamilyURec a (p ::*)
|
|
|
```
|
|
|
|
|
|
|
|
|
And here are their kind signatures now:
|
|
|
|
|
|
```
|
|
|
classGeneric1(f :: k ->*)wheretypeRep1 f :: k ->*
|
|
|
from1 :: f a ->Rep1 f a
|
|
|
to1 ::Rep1 f a -> f a
|
|
|
|
|
|
classDatatype(d :: k)where
|
|
|
datatypeName :: t d (f :: k1 ->*)(a :: k1)->[Char]
|
|
|
moduleName :: t d (f :: k1 ->*)(a :: k1)->[Char]
|
|
|
packageName :: t d (f :: k1 ->*)(a :: k1)->[Char]
|
|
|
isNewtype :: t d (f :: k1 ->*)(a :: k1)->BoolclassConstructor(c :: k)where
|
|
|
conName :: t c (f :: k1 ->*)(a :: k1)->[Char]
|
|
|
conFixity :: t c (f :: k1 ->*)(a :: k1)->Fixity
|
|
|
conIsRecord :: t c (f :: k1 ->*)(a :: k1)->BoolclassSelector(s :: k)where
|
|
|
selName :: t s (f :: k1 ->*)(a :: k1)->[Char]
|
|
|
selSourceUnpackedness :: t s (f :: k1 ->*)(a :: k1)->SourceUnpackedness
|
|
|
selSourceStrictness :: t s (f :: k1 ->*)(a :: k1)->SourceStrictness
|
|
|
selDecidedStrictness :: t s (f :: k1 ->*)(a :: k1)->DecidedStrictnessdataV1(p :: k)dataU1(p :: k)=U1newtypePar1 p =Par1 p
|
|
|
newtypeRec1(f :: k ->*)(p :: k)=Rec1(f p)newtypeK1 i c (p :: k)=K1 c
|
|
|
newtypeM1 i c (f :: k ->*)(p :: k)=M1(f p)data(:+:)(f :: k ->*)(g :: k ->*)(p :: k)=L1(f p)|R1(g p)data(:*:)(f :: k ->*)(g :: k ->*)(p :: k)= f p :*: g p
|
|
|
newtype(:.:)(f :: k2 ->*)(g :: k1 -> k2)(p :: k1)=Comp1(f (g p))datafamilyURec a (p :: k)
|
|
|
```
|
|
|
|
|
|
|
|
|
It's possible that you might experience some typechecker errors due to this change. If so, a probable fix is to add explicit kind signatures in the right places.
|
|
|
|
|
|
### `template-haskell-2.12.0.0`
|
|
|
|
|
|
- The `DataD`, `NewtypeD`, `DataInstD`, and `NewtypeInstD` constructors now take a `[DerivCxtQ]` instead of a `CxtQ` to represent `deriving` clauses ([\#10598](https://gitlab.haskell.org//ghc/ghc/issues/10598)). This change was necessary because:
|
... | ... | |