Re: [Haskell-cafe] Cloud Haskell

2011-07-23 Thread Tim Cowlishaw
On Fri, Jul 22, 2011 at 4:11 PM, Tom Murphy amin...@gmail.com wrote: Is anyone using Cloud Haskell yet? I'm really excited by the possibilities. Hello there! I'm currently looking at the possibility of incorporating it into my masters thesis project (A Haskell EDSL for agent-based simulation),

[Haskell-cafe] Idiomatic ways to make all instances of a certain class also instances of another?

2011-07-26 Thread Tim Cowlishaw
Hi all, I'm currently embarking on my first major project in Haskell, after dabbling with it for several years, and seem to keep finding myself in situations where I create a typeclass that seems to be some sort of specialisation of another, more general typeclass. Given that this is the case,

Re: [Haskell-cafe] Idiomatic ways to make all instances of a certain class also instances of another?

2011-07-26 Thread Tim Cowlishaw
On Tue, Jul 26, 2011 at 7:46 PM, Evan Laforge qdun...@gmail.com wrote: Could you give a specific example of the problem you're trying to solve? Sorry, yes, that'd be useful :-) So, the project I'm working on involves developing a simulation of a securities market. I have a type which models an

Re: [Haskell-cafe] Idiomatic ways to make all instances of a certain class also instances of another?

2011-07-27 Thread Tim Cowlishaw
On Tue, Jul 26, 2011 at 11:14 PM, Alexander Solla alex.so...@gmail.com wrote: data OrderType = Market Size | Limit LimitPrice Expiration Size | Stop (Either Percent Price) newtype Sell = Sell OrderType newtype Buy = Buy OrderType newtype Order = Order (Either Buy Sell) size :: Order - Int

Re: [Haskell-cafe] XCode Dependency for HP on Mac

2011-07-27 Thread Tim Cowlishaw
On Wed, Jul 27, 2011 at 8:09 AM, Chris Smith cdsm...@gmail.com wrote: Alternatively, maybe it would it be easier to have the Mac users install VMWare's free version and I can just have them install Windows or Linux in that?  Or does it also have weird dependency issues like this, too?

[Haskell-cafe] Deriving instances with GADTs

2011-08-04 Thread Tim Cowlishaw
Hi all, I've been writing a DSL to describe securities orders, and after a lot of help from the kind folk of this list and #haskell have come up with the following implementation, using generalised algebraic data types: https://gist.github.com/1124621 Elsewhere in my application, I make use of

Re: [Haskell-cafe] Deriving instances with GADTs

2011-08-04 Thread Tim Cowlishaw
2011/8/4 José Pedro Magalhães j...@cs.uu.nl: Here you seem to be using newtype deriving in particular, which behaves differently from standard deriving. Compiling with -ddump-deriv will show you the instances GHC is generating, which can help in debugging. Aah - this is very useful, thanks!