Idris2/tests/idris2/basic021/CaseDep.idr
Edwin Brady a972778eab Add test script
They don't all pass yet, for minor reasons. Coming shortly...
Unfortunately the startup overhead for chez is really noticeable here!
2020-05-19 18:25:18 +01:00

10 lines
202 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