> From: Evgeny Grablyk <evgeny.grab...@gmail.com>

> 
> Hello!
> 
> I was wondering if it was possible to "convert" a function (which  may
> also call functions) to a plain list of operators on  parameters.
> Example:

If your "operators" are only things in Num (or maybe some other
typeclasses), the suggestions you have gotten about making a
special Num instance are excellent.

If you are curious how things are actually compiled, you can
use the -ddump-simpl option. This is way more detail that
you probably want, showing things like how + is implemented
in terms of more primitive operations, or explicit passing
around of class method dictionaries.

I hoped the ghci debugger might be useful, but it seems to
evaluate expressions like (baw 1 10 100) to a final result
in one step, and can't show you an expression corresponding
to unevaluated values.

Brandon


      

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to