seq a b
returns the value of b
, but makes that value depend on the evaluation of a
. Thus, seq a a
is exactly the same thing as a
.
I think the misunderstanding here is that seq
doesn't take any action, because pure functions don't take actions, it just introduces a dependency.
There is a function evaluate :: a -> IO ()
in Control.Exception
that does what you want (note that it's in IO
). They put it in exception because it's useful to see if the evaluation of an expression would throw, and if so handle the exception.