[Haskell-cafe] Rigid types fun

2010-11-05 Thread Mitar
Hi! I have much fun with rigid types, type signatures and GADTs. And I would like to invite also others in and share my joy. ;-) Please see the attached file and chase a solution to how to make it compile. I would like to have a function which I would call like: createNerve (Axon undefined)

Re: [Haskell-cafe] Rigid types fun

2010-11-05 Thread Tillmann Rendel
Hi, Mitar wrote: I would like to do that to remove repeating code like: from- newChan for- newChan let nerve = Nerve (Axon from) (AxonAny for) which I have to write again and again just to make types work out. Why I cannot move that into the function? One option is to write a little library

Re: [Haskell-cafe] Rigid types fun

2010-11-05 Thread Mitar
Hi! On Fri, Nov 5, 2010 at 4:01 PM, Tillmann Rendel ren...@informatik.uni-marburg.de wrote: Note that newNerve does not take Axons, but rather monadic actions which create Axons. Now, you can use something like  nerve - newNerve newAxon newAxonAny to create a concrete nerve. Thanks! I