@@ -0,0 +1,29 @@
3+PureScript has basic support for type classes via the `class` and `instance` keywords.
5+Type class instances must be of the form `String`, `Number`, `Boolean`, `[t]` or `C t1 ... tn`, and only a single type class parameter is supported.
7+Type class instances are resolved based on the order in which they appeared in the source files. In particular, overlapping instances are permitted.
13+instance Show String where
16+instance Show Boolean where
20+instance (Show a) => Show [a] where
21+ show arr = "[" ++ showArray arr ++ "]"
23+showArray :: forall a. (Show a) => [a] -> String
25+showArray [x] = show x
26+showArray (x:xs) = show x ++ ", " ++ showArray xs
28+example = show [true, false]