Commit 02a6b29c authored by Simon Peyton Jones's avatar Simon Peyton Jones

Test Trac #10634

parent d7335f74
{-# LANGUAGE TypeFamilies #-}
module T10634 where
import Data.Int (Int8, Int16, Int32)
type family Up a
type instance Up Int8 = Int16
type instance Up Int16 = Int32
class (Up (Down a) ~ a) => Convert a where
type Down a
down :: a -> Down a
instance Convert Int16 where
type Down Int16 = Int8
down = fromIntegral
instance Convert Int32 where
type Down Int32 = Int16
down = fromIntegral
x :: Int8
x = down 8
......@@ -260,4 +260,4 @@ test('T10139', normal, compile, [''])
test('T10340', normal, compile, [''])
test('T10226', normal, compile, [''])
test('T10507', normal, compile, [''])
test('T10634', normal, compile, [''])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment