
5 Nov
2010
5 Nov
'10
5:45 a.m.
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) (AxonAny undefined) and it would return proper Nerve. Similar to how asTypeOf works. 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? I am using GHC 6.12.3. Is this something which will work in 7.0? Mitar