File tree Expand file tree Collapse file tree 1 file changed +4
-12
lines changed
Expand file tree Collapse file tree 1 file changed +4
-12
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
8686
8787-- TODO(tom): better type errors using `n`. Also type errors for other
8888-- 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 )
9191 , KnownSymbol conName
92- ) => GenericEnumValues (C1 ('MetaCons conName p b ) (S1 sa sb )) where
93- genericEnumValues = nonUnaryConstructorError
94- genericEnumFromValue = nonUnaryConstructorError
95- genericEnumToValue = nonUnaryConstructorError
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
92+ ) => GenericEnumValues (C1 ('MetaCons conName f s ) (S1 sa sb )) where
10193 genericEnumValues = nonUnaryConstructorError
10294 genericEnumFromValue = nonUnaryConstructorError
10395 genericEnumToValue = nonUnaryConstructorError
10496
10597nonUnaryConstructorError :: 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."
10799
108100-- | For each enum type we need 1) a list of all possible values 2) a
109101-- way to serialise and 3) deserialise.
You can’t perform that action at this time.
0 commit comments