Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Tree: 4520fee17a
Fetching contributors…

Cannot retrieve contributors at this time

20 lines (13 sloc) 476 Bytes
module Unparse where
type Unparser a = a -> String
class Unparse a where
unparse :: a -> String
instance (Unparse a, Unparse b) => Unparse (a, b) where
unparse (a, b) = unparse a ++ unparse b
instance (Unparse a) => Unparse [a] where
unparse = concatMap unparse
instance (Unparse a) => Unparse (Maybe a) where
unparse = maybe "" unparse
instance (Unparse a, Unparse b) => Unparse (Either a b) where
unparse (Left a) = unparse a
unparse (Right a) = unparse a
Jump to Line
Something went wrong with that request. Please try again.