Idris2/tests/ideMode/ideMode005/Interface.idr
Ohad Kammar e58bcfc7ef
Semantic highlighting (#1335)
Co-authored-by: Guillaume ALLAIS <guillaume.allais@ens-lyon.org>
2021-05-10 09:05:43 +01:00

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