diff options
Diffstat (limited to 'testsuite/tests/deSugar/should_compile/T14547.hs')
-rw-r--r-- | testsuite/tests/deSugar/should_compile/T14547.hs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/deSugar/should_compile/T14547.hs b/testsuite/tests/deSugar/should_compile/T14547.hs new file mode 100644 index 0000000000..02ff2e618c --- /dev/null +++ b/testsuite/tests/deSugar/should_compile/T14547.hs @@ -0,0 +1,15 @@ +{-# LANGUAGE OverloadedLists #-} +{-# LANGUAGE TypeFamilies #-} + +module T14547 where + +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 |