GHC 8 type checker regression
GHC 8.0.1/2 needs a type annotation where GHC 7.8 can do without:
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances, MultiParamTypeClasses #-}
data T = Var | App T T
data S = S
class Tr a b where
tr :: a -> b
tr = undefined
instance Tr S T where
instance Tr a b => Tr [a] [b] where
test :: [S] -> T
test es = let
-- es' :: [T] -- This type annotation is not needed by ghc-7.8
es' = tr es
in foldl App Var es'
Trac metadata
| Trac field | Value |
|---|---|
| Version | 8.0.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler (Type checker) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |