...  ...  @@ 10,12 +10,19 @@ This guide summarises the changes you may need to make to your code to migrate f 


### `StarIsType`












As part of [ this GHC proposal](https://github.com/ghcproposals/ghcproposals/blob/05721788de9ab6538def68c3c2c9dec50c9f24a8/proposals/0020notypeintype.rst) (as amended by [ this GHC proposal](https://github.com/ghcproposals/ghcproposals/pull/146)), a new `StarIsType` extension was introduced, which instructs GHC to treat `*` as a synonym for `Type` (from `Data.Kind`) instead of a binary type operator.












`StarIsType` is enabled by default, and one consequence of this is that GHC will interpret any use of `*` as `Type`, even if it would have been previously interpreted as a binary type operator. A notable example of such a binary type operator is `GHC.TypeLits.*`, so code like:









```



importGHC.TypeLitsf::Proxy m >Proxy n >Proxy(m * n)f__=Proxy



import GHC.TypeLits






f :: Proxy m > Proxy n > Proxy (m * n)



f _ _ = Proxy



```







...  ...  @@ 33,21 +40,28 @@ Will not typecheck if `StarIsType` is enabled, since `m * n` is treated as if on 


### `MonadFailDesugaring` by default












GHC now enables the `MonadFailDesugaring` extension by default, as discussed in [ https://prime.haskell.org/wiki/Libraries/Proposals/MonadFail\#Transitionalstrategy](https://prime.haskell.org/wiki/Libraries/Proposals/MonadFail#Transitionalstrategy). This means that code that uses partial pattern matches in `do`notation, such as this:









```



f::[[a]]>[a]f l =do(_:xs)< l



f :: [[a]] > [a]



f l = do



(_:xs) < l



xs



```









Will now desugar to use the `fail` method from the `MonadFail` class instead of from `Monad`. That is, this code will now desugar to something resembling:









```



importControl.Monad.Failas Fail



import Control.Monad.Fail as Fail






f::[[a]]>[a]f l =case l of(_:xs)> xs



_>Fail.fail "Patternmatch failure"



f :: [[a]] > [a]



f l = case l of



(_:xs) > xs



_ > Fail.fail "Patternmatch failure"



```







...  ...  @@ 61,10 +75,13 @@ Data types with empty `where` clauses (such as `data T where`) are no longer val 


### `Wincompletepatterns` now applies to patterns in guards and `MultiWayIf`












Due to a bug, previous versions of GHC would not emit any `Wincompletepatterns` warnings at all for incomplete patterns inside of guards or `MultiWayIf` expressions. This bug has been fixed, which means that code like:









```



foo::Bool>Intfoo b =if b >1



foo :: Bool > Int



foo b = if  b > 1



```







...  ...  @@ 80,22 +97,26 @@ warning: [Wincompletepatterns] 


### `PolyKinds` is pickier












GHC is now more diligent about catching illegal uses of kind polymorphism that snuck into recent GHC releases. For instance, this used to be accepted without `PolyKinds`:









```



classC a where



c ::Proxy(x :: a)



class C a where



c :: Proxy (x :: a)



```









Despite the fact that `a` is used as a kind variable in the type signature for `c`. This is now an error unless `PolyKinds` is explicitly enabled.












Moreover, GHC 8.4 would accept the following without the use of `PolyKinds`:









```



f:: forall k (a :: k).Proxy a



f=Proxy



f :: forall k (a :: k). Proxy a



f = Proxy



```







...  ...  @@ 104,25 +125,45 @@ Despite the fact that `k` is used as both a type and kind variable. This is now 


### `UndecidableInstances` is pickier












GHC now requires the `UndecidableInstances` extension in order to allow type family applications in instance contexts, as in the following code:









```



{# LANGUAGE ConstraintKinds #}{# LANGUAGE FlexibleContexts #}{# LANGUAGE FlexibleInstances #}{# LANGUAGE TypeFamilies #}importData.KindtypefamilyF a ::ConstraintclassC a where{



{# LANGUAGE ConstraintKinds #}



{# LANGUAGE FlexibleContexts #}



{# LANGUAGE FlexibleInstances #}



{# LANGUAGE TypeFamilies #}






import Data.Kind






type family F a :: Constraint



class C a where






{



Will error without UndecidableInstances:






• Illegal nested constraint ‘F a’



(Use UndecidableInstances to permit this)



• In the instance declaration for ‘C [[a]]’



}instanceF a =>C[[a]]



}



instance F a => C [[a]]



```






### DPH is gone












Data Parallel Haskell and GHC's automatic vectorization support, which have been bitrotting for many years, have finally been removed. One particularly userfacing change related to this is that the `Odph` flag is now gone, so GHC will simply error if it is passed `Odph` as a flag. (Note that `Odph` was simply a synonym for `O2 fmaxsimplifieriterations=20 fsimplifierphases=3`.)



















## Library changes






TODO 


\ No newline at end of file 








TODO






