[commit: testsuite] master: Add some tests for type-level subtraction. (3023f20)

git at git.haskell.org git at git.haskell.org
Tue Sep 24 15:24:41 CEST 2013


Repository : ssh://git@git.haskell.org/testsuite

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/3023f20cb44d932591741188004287ca54bb84a8/testsuite

>---------------------------------------------------------------

commit 3023f20cb44d932591741188004287ca54bb84a8
Author: Iavor S. Diatchki <iavor.diatchki at gmail.com>
Date:   Tue Sep 24 06:14:53 2013 -0700

    Add some tests for type-level subtraction.


>---------------------------------------------------------------

3023f20cb44d932591741188004287ca54bb84a8
 tests/typecheck/should_compile/TcTypeNatSimple.hs |   12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/tests/typecheck/should_compile/TcTypeNatSimple.hs b/tests/typecheck/should_compile/TcTypeNatSimple.hs
index e30656a..07f2957 100644
--- a/tests/typecheck/should_compile/TcTypeNatSimple.hs
+++ b/tests/typecheck/should_compile/TcTypeNatSimple.hs
@@ -52,6 +52,12 @@ e15 = id
 e16 :: Sing (0 <=? x) -> Sing True
 e16 = id
 
+e17 :: Sing (3 - 2) -> Sing 1
+e17 = id
+
+e18 :: Sing (a - 0) -> Sing a
+e18 = id
+
 --------------------------------------------------------------------------------
 -- Test interactions with inerts
 
@@ -78,4 +84,10 @@ type family SomeFun (n :: Nat)
 ti7 :: (x <= y, y <= x) => Sing (SomeFun x) -> Sing y -> ()
 ti7 _ _ = ()
 
+ti8 :: Sing (x - y) -> Sing x -> ()
+ti8 _ _ = ()
+
+ti9 :: Sing (y - x) -> Sing x -> ()
+ti9 _ _ = ()
+
 




More information about the ghc-commits mailing list