PureScript Type Classes¶
This defines a typeclass for any
a that converts it into a string.
class Show a where show :: a -> String
In order to implement this for a type:
data MyCustomType = One | Two implement showMyCustomType :: Show MyCustomType where show One = "One" show Two = "Two"