File tree 1 file changed +3
-11
lines changed
1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -86,24 +86,16 @@ instance forall conName p b. (KnownSymbol conName) => GenericEnumValues (C1 ('Me
86
86
87
87
-- TODO(tom): better type errors using `n`. Also type errors for other
88
88
-- invalid constructors.
89
- instance forall conName p b sa sb .
90
- ( TypeError ('Text " Constructor not unary : " ':<>: 'Text conName )
89
+ instance forall conName f s sa sb .
90
+ ( TypeError ('Text " Constructor not nullary : " ':<>: 'Text conName )
91
91
, KnownSymbol conName
92
92
) => GenericEnumValues (C1 ('MetaCons conName p b ) (S1 sa sb )) where
93
93
genericEnumValues = nonUnaryConstructorError
94
94
genericEnumFromValue = nonUnaryConstructorError
95
95
genericEnumToValue = nonUnaryConstructorError
96
96
97
- instance forall conName p b sa sb f .
98
- ( TypeError ('Text " Constructor not unary: " ':<>: 'Text conName )
99
- , KnownSymbol conName
100
- ) => GenericEnumValues (C1 ('MetaCons conName p b ) (S1 sa sb ) :+: f ) where
101
- genericEnumValues = nonUnaryConstructorError
102
- genericEnumFromValue = nonUnaryConstructorError
103
- genericEnumToValue = nonUnaryConstructorError
104
-
105
97
nonUnaryConstructorError :: a
106
- nonUnaryConstructorError = panic " Tried to construct enum with non-unary constructor. Should get a compile-time error instead of this."
98
+ nonUnaryConstructorError = panic " Tried to construct enum with non-nullary constructor. Should get a compile-time error instead of this."
107
99
108
100
-- | For each enum type we need 1) a list of all possible values 2) a
109
101
-- way to serialise and 3) deserialise.
You can’t perform that action at this time.
0 commit comments