mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-15 14:23:32 +03:00
274954998b
Co-authored-by: Guillaume ALLAIS <guillaume.allais@ens-lyon.org>
16 lines
278 B
Idris
16 lines
278 B
Idris
import Data.String
|
|
|
|
Interpolation Bool where
|
|
interpolate True = "TT"
|
|
interpolate False = "FF"
|
|
|
|
Interpolation Nat where
|
|
interpolate Z = "0"
|
|
interpolate (S n) = "S \{n}"
|
|
|
|
Interpolation Integer where
|
|
interpolate = show
|
|
|
|
test : String
|
|
test = "\{2}\{True}: \{True}\{True}"
|