mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-22 11:13:36 +03:00
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
|