[Haskell-cafe] Is there a way to find out the type inferred for a local function inside another function? :)
wren ng thornton
wren at freegeek.org
Sat Apr 9 01:57:14 CEST 2011
On 4/8/11 8:24 AM, Henning Thielemann wrote:
> Magnus Therning schrieb:
>> AFAIK there is no way to do that, thouhg scion[1] may offer it.
>>
>> Personally I develop more complex local functions at the top-level,
>> and once I'm happy with it I perform some re-factoring and move it in.
>
> I would not write large local functions at all. I would leave them
> top-level but do not export them. This also allows to test them from GHCi.
The downside to this is when you want to use the worker/wrapper
transform in order to capture some local variables for a recursive
function, instead of passing them through the recursion.
--
Live well,
~wren
More information about the Haskell-Cafe
mailing list