diff options
Diffstat (limited to 'testsuite/tests/indexed-types/should_compile/InstEqContext.hs')
-rw-r--r-- | testsuite/tests/indexed-types/should_compile/InstEqContext.hs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/tests/indexed-types/should_compile/InstEqContext.hs b/testsuite/tests/indexed-types/should_compile/InstEqContext.hs new file mode 100644 index 0000000000..e178e110a5 --- /dev/null +++ b/testsuite/tests/indexed-types/should_compile/InstEqContext.hs @@ -0,0 +1,17 @@ +{-# LANGUAGE TypeFamilies #-} + +module InstEqContext where + + +{- encoding of + - class C a | -> a + -} +class a ~ Int => C a + +instance C Int + +unC :: (C a) => a -> Int +unC i = undefined + +test :: Int +test = unC undefined |