[Haskell-cafe] mixing map and mapM ?

Ben Millwood haskell at benmachine.co.uk
Thu May 6 07:55:01 EDT 2010


On Thu, May 6, 2010 at 12:37 PM, Bill Atkins <watkins at alum.rpi.edu> wrote:
> Just curious: why does getModificationTime take an IO FileStatus rather than
> a FileStatus?
>

It doesn't. getModificationTime is a pure function (think of it like a
record accessor).

liftM makes it take IO FileStatus because that is what liftM is for :)


More information about the Haskell-Cafe mailing list