mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-24 12:14:26 +03:00
a972778eab
They don't all pass yet, for minor reasons. Coming shortly... Unfortunately the startup overhead for chez is really noticeable here!
10 lines
202 B
Idris
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
|