mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-24 20:23:11 +03:00
e58bcfc7ef
Co-authored-by: Guillaume ALLAIS <guillaume.allais@ens-lyon.org>
15 lines
271 B
Idris
15 lines
271 B
Idris
module Interface
|
|
|
|
interface Show a => Pretty (0 a : Type) where
|
|
constructor MkPretty
|
|
|
|
0 Doc : Type
|
|
toDoc : String -> Doc
|
|
|
|
pretty : a -> Doc
|
|
pretty n = toDoc (show n)
|
|
|
|
prettys : List a -> List Doc
|
|
prettys [] = []
|
|
prettys (a :: as) = pretty a :: prettys as
|