Idris2-boot/tests/idris2/basic021/CaseDep.idr
2019-06-29 21:32:19 +01:00

10 lines
203 B
Idris

IntOrChar : Bool -> Type
IntOrChar True = Int
IntOrChar False = Char
foo : Nat -> (x : Bool) -> IntOrChar x -> String
foo num x i
= case x of
True => show num
False => show i