I've long heralded "data-default" as my favorite ten-line package... before it was released, I found my self writing those a few lines in each project to do just what's done there. Inspired by this, and the fact that there's a separate ten lines that I find myself writing in nearly every project, I'm pleased to announce the initial release of "universe". The package sports just two load-bearing lines:

class Universe a where universe :: [a]
class Universe a => Finite a where universeF :: [a]

...along with a dozen or so instances of each. The instance do nothing more than enumerating all the values of the given type.

Hope you enjoy it, and let me know if you think there are some important missing instances!

http://hackage.haskell.org/package/universe
https://github.com/dmwit/universe

~d

_______________________________________________
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to