Re[2]: Rigid types fun

2010-11-05 Thread Bulat Ziganshin
Hello Mitar,

Friday, November 5, 2010, 2:08:52 PM, you wrote:

 I would like to call it like create (Axon undefined) (AxonAny
 undefined) and get in that case Nerve (Axon a) (AxonAny b) as a
 result. If I would call it like create (AxonAny undefined) (AxonAny
 undefined) I would get Nerve (AxonAny a) (AxonAny b) as a result.
 And so on.

look into HsLua sources. it does something like you asking (converting
return type into sequence of commands) so it mau be what you are
looking for. it uses typeclasses for this effect. the same technique
used in haskell printf implementation afaik

-- 
Best regards,
 Bulatmailto:bulat.zigans...@gmail.com

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Re[2]: Rigid types fun

2010-11-05 Thread Mitar
Hi!

On Fri, Nov 5, 2010 at 12:12 PM, Bulat Ziganshin
bulat.zigans...@gmail.com wrote:
 look into HsLua sources. it does something like you asking (converting
 return type into sequence of commands) so it mau be what you are
 looking for. it uses typeclasses for this effect. the same technique
 used in haskell printf implementation afaik

While reading the source code I found that in loadstring you do not
make sure that free is called even in a case of an exception. Is this
not necessary?


Mitar
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users