Add instance Storable Ordering

David Feuer david.feuer at gmail.com
Tue Oct 8 16:12:17 UTC 2019


Yes, yours is better, but I'd go with Enum on both ends rather than relying
on rewrite rules to make sure fromIntegral isn't slow.

On Tue, Oct 8, 2019, 11:49 AM Henning Thielemann <
lemming at henning-thielemann.de> wrote:

>
> On Tue, 8 Oct 2019, David Feuer wrote:
>
> > newtype WrappedEnum a = WrappedEnum a
> > instance Enum a => Storable (WrappedEnum a) where
> >   ...
>
> That's almost what I recently defined in a custom package:
>
> https://hub.darcs.net/thielema/storable-enum/browse/src/Data/Enum/Storable.hs
>
> But I also let the user choose the underlying machine type.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20191008/437f1a8d/attachment.html>


More information about the Libraries mailing list