summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/TcTypeNatSimple.hs
diff options
context:
space:
mode:
authorIavor Diatchki <iavor.diatchki@gmail.com>2017-10-03 14:58:47 -0400
committerBen Gamari <ben@smart-cactus.org>2017-10-03 17:07:35 -0400
commitfa8035e3ee83aff5a20fc5e7e2697bac1686d6a6 (patch)
tree6c50ef28a71cd9d1d5bb42fbf6c7f4d3886c5481 /testsuite/tests/typecheck/should_compile/TcTypeNatSimple.hs
parentef26182e2014b0a2a029ae466a4b121bf235e4e4 (diff)
downloadhaskell-fa8035e3ee83aff5a20fc5e7e2697bac1686d6a6.tar.gz
Implement Div, Mod, and Log for type-level nats.
Reviewers: austin, hvr, bgamari Reviewed By: bgamari Subscribers: RyanGlScott, dfeuer, adamgundry, rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D4002
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/TcTypeNatSimple.hs')
-rw-r--r--testsuite/tests/typecheck/should_compile/TcTypeNatSimple.hs15
1 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/TcTypeNatSimple.hs b/testsuite/tests/typecheck/should_compile/TcTypeNatSimple.hs
index c692c3f725..911a43e507 100644
--- a/testsuite/tests/typecheck/should_compile/TcTypeNatSimple.hs
+++ b/testsuite/tests/typecheck/should_compile/TcTypeNatSimple.hs
@@ -59,6 +59,21 @@ e17 = id
e18 :: Proxy (a - 0) -> Proxy a
e18 = id
+e19 :: Proxy (Div 10 3) -> Proxy 3
+e19 = id
+
+e20 :: Proxy (Div x 1) -> Proxy x
+e20 = id
+
+e21 :: Proxy (Mod 10 3) -> Proxy 1
+e21 = id
+
+e22 :: Proxy (Mod x 1) -> Proxy 0
+e22 = id
+
+e23 :: Proxy (Log2 10) -> Proxy 3
+e23 = id
+
--------------------------------------------------------------------------------
-- Test interactions with inerts