
7 Jan
2015
7 Jan
'15
4:36 a.m.
The evaluate function is defined in GHC.IO, and exported publicly by Control.Exception. This strikes me as an extremely strange place for it. Can we find another place to put it that would seem more sensible? I don't think it should be removed from Control.Exception, but rather that maybe it should be added somewhere else as well. Digging all around, I've come up with one idea that might work, if we give evaluate a more general type: evaluate :: PrimMonad m => a -> m a evaluate a = primitive (\s -> seq# a s) With this type, we could easily put it in Control.Monad.Primitive. There may be some challenges wiggling module dependencies around, but hopefully not huge ones. David