浏览代码

Add the show method to Nat

DricomDragon 5 年之前
父节点
当前提交
e0265c011e
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      peano.hs

+ 1 - 1
peano.hs

@@ -1,4 +1,4 @@
-data Nat = Zero | Succ Nat
+data Nat = Zero | Succ Nat deriving Show
 
 intValOf thisNat = case thisNat of
 	Zero -> 0