diff options
author | HE, Tao <sighingnow@gmail.com> | 2018-05-03 17:16:09 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2018-05-05 13:09:18 -0400 |
commit | 361d23a8ebb44f5df5167306d7b98d8bd1724e06 (patch) | |
tree | 7e598b327504115635739af5a30188bce41b7d04 /testsuite/tests/generics | |
parent | 426ae98852be498fa87d10e4c88ba8d726d6b320 (diff) | |
download | haskell-361d23a8ebb44f5df5167306d7b98d8bd1724e06.tar.gz |
Normalize the element type of ListPat, fix #14547
The element type of `List` maybe a type family instacen, rather than a
trivial type. For example in Trac #14547,
```
{-# LANGUAGE TypeFamilies, OverloadedLists #-}
class Foo f where
type It f
foo :: [It f] -> f
data List a = Empty | a :! List a deriving Show
instance Foo (List a) where
type It (List a) = a
foo [] = Empty
foo (x : xs) = x :! foo xs
```
Here the element type of `[]` is `It (List a)`, we should also normalize
it as `a`.
Test Plan: make test TEST="T14547"
Reviewers: bgamari
Reviewed By: bgamari
Subscribers: thomie, carter
GHC Trac Issues: #14547
Differential Revision: https://phabricator.haskell.org/D4624
Diffstat (limited to 'testsuite/tests/generics')
0 files changed, 0 insertions, 0 deletions