Fixing a type variable inside a function
Andre Pang
ozone@algorithm.com.au
Sat, 17 May 2003 02:28:15 +1000
On Saturday, May 17, 2003, at 01:08 AM, Wolfgang Jeltsch wrote:
> Hello,
>
> the following works as expected:
> foo :: MyTypeClass resultType => resultType
> foo = let x = fromString (toString x) in x
>
> Ciao, Wolfgang
Thanks Wolfgang! This fixed the problem perfectly. I find it
interesting there are so many techniques (especially recursive ones
which take advantage of laziness) which can be used to give extra
information to the type system. Thanks also to Karl-Filip and Hal for
their insightful suggestions.
--
% Andre Pang : just.your.average.bounty.hunter