@@ -4,8 +4,6 @@ module Data.Generic.Rep.Show
4
4
, genericShow
5
5
, class GenericShowArgs
6
6
, genericShowArgs
7
- , class GenericShowFields
8
- , genericShowFields
9
7
) where
10
8
11
9
import Prelude (class Show , show , (<>))
@@ -19,9 +17,6 @@ class GenericShow a where
19
17
class GenericShowArgs a where
20
18
genericShowArgs :: a -> Array String
21
19
22
- class GenericShowFields a where
23
- genericShowFields :: a -> Array String
24
-
25
20
instance genericShowNoConstructors :: GenericShow NoConstructors where
26
21
genericShow' a = genericShow' a
27
22
@@ -37,11 +32,6 @@ instance genericShowArgsProduct
37
32
=> GenericShowArgs (Product a b ) where
38
33
genericShowArgs (Product a b) = genericShowArgs a <> genericShowArgs b
39
34
40
- instance genericShowFieldsProduct
41
- :: (GenericShowFields a , GenericShowFields b )
42
- => GenericShowFields (Product a b ) where
43
- genericShowFields (Product a b) = genericShowFields a <> genericShowFields b
44
-
45
35
instance genericShowConstructor
46
36
:: (GenericShowArgs a , IsSymbol name )
47
37
=> GenericShow (Constructor name a ) where
@@ -56,18 +46,6 @@ instance genericShowConstructor
56
46
instance genericShowArgsArgument :: Show a => GenericShowArgs (Argument a ) where
57
47
genericShowArgs (Argument a) = [show a]
58
48
59
- instance genericShowArgsRec :: GenericShowFields a => GenericShowArgs (Rec a ) where
60
- genericShowArgs (Rec a) = [" { " <> intercalate " , " (genericShowFields a) <> " }" ]
61
-
62
- instance genericShowFieldsField
63
- :: (Show a , IsSymbol name )
64
- => GenericShowFields (Field name a ) where
65
- genericShowFields (Field a) =
66
- [reflectSymbol (SProxy :: SProxy name ) <> " : " <> show a]
67
-
68
- instance genericShowFieldsNoArguments :: GenericShowFields NoArguments where
69
- genericShowFields _ = []
70
-
71
49
-- | A `Generic` implementation of the `show` member from the `Show` type class.
72
50
genericShow :: forall a rep . Generic a rep => GenericShow rep => a -> String
73
51
genericShow x = genericShow' (from x)
0 commit comments