Idris-dev/test/reg018/reg018b.idr
2013-11-01 14:33:45 +01:00

15 lines
180 B
Idris

module A
%default total
codata B = Z B | I B
showB : B -> String
showB (I x) = "I" ++ showB x
showB (Z x) = "Z" ++ showB x
instance Show B where show = showB
os : B
os = Z os