reifying typeclasses (resend)

2013-09-15 Thread Evan Laforge
[ This is the second time I sent this, the first time it said it was awaiting moderation because I'm not subscribed to haskell-cafe, which is weird because I thought I was. Did a bunch of people get unsubscribed? ] I'm sure this is old-hat to typeclass wizards, but I've managed to get pretty far

[Haskell-cafe] Recent problems with -cafe -- Fixed (I hope)

2013-09-15 Thread Gershom Bazerman
There were problems with the -cafe mailinglist today. Best I can tell, we had an unplanned system reboot last night. In the course of it going down and back up, the configuration for -cafe got corrupted and the auto-fixed configuration had roughly 3/4 of the membership deleted. I've gone in

Re: [Haskell-cafe] reifying typeclasses (resend)

2013-09-15 Thread Timon Gehr
On 09/15/2013 09:38 AM, Evan Laforge wrote: ... It seems to me like I should be able to replace a typeclass with arbitrary methods with just two, to reify the type and back. This seems to work when the typeclass dispatches on an argument, but not on a return value. E.g.: ... Say m_argument

[Haskell-cafe] LATA 2014: 3rd call for papers

2013-09-15 Thread GRLMC
*To be removed from our mailing list, please respond to this message with UNSUBSCRIBE in the subject line* * 8th INTERNATIONAL CONFERENCE ON LANGUAGE AND AUTOMATA THEORY AND APPLICATIONS LATA 2014 Madrid, Spain March

Re: [Haskell-cafe] reifying typeclasses

2013-09-15 Thread oleg
Evan Laforge wrote: I have a typeclass which is instantiated across a closed set of 3 types. It has an ad-hoc set of methods, and I'm not too happy with them because being a typeclass forces them to all be defined in one place, breaking modularity. A sum type, of course, wouldn't have that

Re: [Haskell-cafe] reifying typeclasses (resend)

2013-09-15 Thread Bas van Dijk
You can indeed use GADTs to solve this: {-# LANGUAGE GADTs #-} data Universe a where UInt :: Int - Universe Int UChar :: Char - Universe Char class Universal a where universe :: a - Universe a instance Universal Int where universe = UInt instance Universal Char where

Re: [Haskell-cafe] reifying typeclasses

2013-09-15 Thread oleg
[I too had the problem sending this e-mail to Haskell list. I got a reply saying the message awaits moderator approval] Evan Laforge wrote: I have a typeclass which is instantiated across a closed set of 3 types. It has an ad-hoc set of methods, and I'm not too happy with them because being

[Haskell-cafe] An APL library for Haskell

2013-09-15 Thread Simon Peyton-Jones
Friends Many of you will know the array language APLhttp://en.wikipedia.org/wiki/APL_%28programming_language%29. It focuses on arrays and in particular has a rich, carefully-thought-out array algebra. An obvious idea is: what would a Haskell library that embodies APL's array algebra look

[Haskell-cafe] ANNOUNCE: New OpenGL packages

2013-09-15 Thread Sven Panne
New versions of the OpenGL packages are available on Hackage: * OpenGLRaw 1.4.0.0 * GLURaw 1.4.0.0 * OpenGL 2.9.0.0 * GLUT 2.5.0.0 The mid-term goal is to make all these packages conform to the latest OpenGL 4.4 specification, and while we're not yet there, this release is

Re: [Haskell-cafe] An APL library for Haskell

2013-09-15 Thread Daniel Peebles
Interesting idea. It seems like building this on top of REPA would save a lot of work, since it has a native notion of rank encoded in the type system. I'd then see the APL-like combinators as a niche API for REPA, rather than as a library of their own. And of course, you'd get parallelization for