You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As an alternative to #35 that is a bit easier to deal with but slightly less safe (though unless you are doing some crazy stuff, should be fine most of the time), I would like to ask if we could do the following, and thus resurrect e.g. boundedEnumMaybe:
--| A lawful class to denote Cardinality a << Cardinality IntclassBoundeda<=SmallBoundedainstanceboundedEnumMaybe :: (SmallBoundeda, BoundedEnuma)
=> BoundedEnum (MaybeWrapped a) where
cardinality = Cardinality $ unwrap (cardinality ::Cardinalitya) + 1
toEnum 0 = wrap Nothing
toEnum n = wrap $ Just <$> toEnum (n - 1)
fromEnum Nothing = 0
fromEnum (Just e) = fromEnum e + 1
The text was updated successfully, but these errors were encountered:
As an alternative to #35 that is a bit easier to deal with but slightly less safe (though unless you are doing some crazy stuff, should be fine most of the time), I would like to ask if we could do the following, and thus resurrect e.g.
boundedEnumMaybe
:The text was updated successfully, but these errors were encountered: