summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorVladislav Zavialov <vlad.z.4096@gmail.com>2021-03-31 07:17:00 +0300
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-04-01 08:22:06 -0400
commitd44e42a26e54857cc6174f2bb7dc86cc41fcd249 (patch)
treeedd79c2c65d1533614c3e002bb1a58cfeb192cac /testsuite
parent65c50d8d289f7d3bb6601b238f094c0da92a1d22 (diff)
downloadhaskell-d44e42a26e54857cc6174f2bb7dc86cc41fcd249.tar.gz
Add missing axiom exports for CharToNat/NatToChar
When the CharToNat and NatToChar type families were added, the corresponding axioms were not exported. This led to a failure much like #14934
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/typecheck/should_compile/T14934.hs7
-rw-r--r--testsuite/tests/typecheck/should_compile/T14934a.hs3
2 files changed, 8 insertions, 2 deletions
diff --git a/testsuite/tests/typecheck/should_compile/T14934.hs b/testsuite/tests/typecheck/should_compile/T14934.hs
index 581e93186e..c4ad6df457 100644
--- a/testsuite/tests/typecheck/should_compile/T14934.hs
+++ b/testsuite/tests/typecheck/should_compile/T14934.hs
@@ -5,5 +5,8 @@ module T14934 where
import T14934a
import GHC.TypeLits
-g :: Foo (1 - 0)
-g = f MkFoo1
+a :: Foo (1 - 0)
+a = f MkFoo1
+
+b :: Foo (CharToNat '\1')
+b = g MkFoo1
diff --git a/testsuite/tests/typecheck/should_compile/T14934a.hs b/testsuite/tests/typecheck/should_compile/T14934a.hs
index 3a4865fffc..c192f6a6a5 100644
--- a/testsuite/tests/typecheck/should_compile/T14934a.hs
+++ b/testsuite/tests/typecheck/should_compile/T14934a.hs
@@ -13,3 +13,6 @@ data Foo :: Nat -> Type where
f :: Foo (1 - 0) -> Foo 1
f x = x
+
+g :: Foo (CharToNat '\1') -> Foo 1
+g x = x