[Haskell-beginners] Re: Forcing evalation in the IO Monad

Philip Scott pscott at foo.me.uk
Fri Apr 16 10:48:07 EDT 2010


Heinrich Apfelmus wrote:
> Philip Scott wrote:
>   
>> What I want is something like putStrLn that doesn't print anything, and
>> takes any type as its input, evaluates it to normal form and then does
>> nothing else. It might be called something like 'evaluate' have a type
>> like this
>>
>> evaluate :: a -> IO()
>>     
>
> With Hoogle, you can search for types:
>
>    http://haskell.org/hoogle/?hoogle=a+-%3E+IO+%28%29
>
> 12th result from the top.
>
>   
Genius indeed!

At least I had the right type, and even the right name.. :)

Thanks ever so much.

- Philip




More information about the Beginners mailing list