enum

70 views
Skip to first unread message

Tony Morris

unread,
Feb 24, 2012, 12:28:06 AM2/24/12
to sca...@googlegroups.com

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,
I have created an Enum type-class based loosely on Haskell's Prelude.Enum
http://www.haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#t:Enum

Here is the branch on which I have done this work:
https://github.com/scalaz/scalaz/compare/scalaz-seven...enum

Would be great to get some opinions and then merge to scalaz-seven.
Cheers.


- --
Tony Morris
http://tmorris.net/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJPRx/mAAoJEPxHMY3rBz0PwRAIAM6LBdlc9SRljvLN7mW4HZPb
/2B+etIQ/KQ4q93f0ptgmL6nw6QeYLXoz13ruuMJfaTZiziPqnrniiKRkxSvn2cc
QWEkhFDAxrek6kcSmn5NdEKx0Pf44lA8YOTDkvhz9/SEDsaH46VjKcEQv3U6A5tZ
iUPAJoopcms2/qz6EHsn+Zbqn82EkVwDO7tOttpAOo9hwF5srZidM/98B9ozzBcg
jhUDzMexqdYwZHslYpB4ZAWLI8JawI/qXAvsV2LJ6lE202TBw9eJK0jDK1FrIbBu
Oo5AC0KmdSCqbhPnsABiwD8FA1mzjLhDN14CEG+alf0Y+1ks7UnVBjCB5jG8CEs=
=xrAf
-----END PGP SIGNATURE-----

Jason Zaugg

unread,
Feb 24, 2012, 1:48:03 AM2/24/12
to sca...@googlegroups.com
On Fri, Feb 24, 2012 at 6:28 AM, Tony Morris <tonym...@gmail.com> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello,
> I have created an Enum type-class based loosely on Haskell's Prelude.Enum
> http://www.haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#t:Enum
>
> Here is the branch on which I have done this work:
> https://github.com/scalaz/scalaz/compare/scalaz-seven...enum
>
> Would be great to get some opinions and then merge to scalaz-seven.

Looks useful. A few comments:

1. Use methods with parameters rather than methods that return functions.
2. Express the laws in code, rather than comments, and add Scalacheck
tests for each instance.

-jason

Lars Hupel

unread,
Feb 25, 2012, 3:16:22 PM2/25/12
to sca...@googlegroups.com
When merging the branch, I'd suggest `rebase -i`-ing first to meld some
related commits (this is good practice for feature branches anyway).

Tony Morris

unread,
Feb 27, 2012, 4:27:17 AM2/27/12
to sca...@googlegroups.com
Cheers, done and merged.
Reply all
Reply to author
Forward
0 new messages