[Haskell-cafe] Force evaluation

Michael Walter cm at leetspeak.org
Mon Dec 6 10:25:05 EST 2004


is there a way to force the "full" evaluation of a value (unless seq,
which only brings the term to WHNF)?

In my case, I have an algebraic data type Foo,
and I would like to catch the exceptions that will occur during the
evaluation of a value of Foo, for something like:

  foo <- force makeFoo `catch` \e -> defaultFoo


PS: Ooops, posted this to haskell-ml first.

More information about the Haskell-Cafe mailing list