aboutsummaryrefslogtreecommitdiff
path: root/src/Nats.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Nats.hs')
-rw-r--r--src/Nats.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Nats.hs b/src/Nats.hs
index a9ad47c..fdc090e 100644
--- a/src/Nats.hs
+++ b/src/Nats.hs
@@ -42,6 +42,10 @@ snatKnown :: SNat n -> Dict KnownNat n
snatKnown SZ = Dict
snatKnown (SS n) | Dict <- snatKnown n = Dict
+type family n + m where
+ Z + m = m
+ S n + m = S (n + m)
+
type family GNat n where
GNat Z = 0
GNat (S n) = 1 G.+ GNat n