git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Update typeclasses.rst
2668838Phil Freeman
docs/source/typeclasses.rst+3−3
@@ -12,14 +12,14 @@ Here is an example of the `Show` typeclass, with instances for Strings, Booleans
12 class Show a where
12 class Show a where
13 show :: a -> String
13 show :: a -> String
14
14
15− instance Show String where
15+ instance showString :: Show String where
16 show s = s
16 show s = s
17
17
18− instance Show Boolean where
18+ instance showBoolean :: Show Boolean where
19 show true = "true"
19 show true = "true"
20 show false = "false"
20 show false = "false"
21
21
22− instance (Show a) => Show [a] where
22+ instance showArray :: (Show a) => Show [a] where
23 show [] = "[]"
23 show [] = "[]"
24 show (x:xs) = show x ++ " : " ++ showArray xs
24 show (x:xs) = show x ++ " : " ++ showArray xs
25
25