Change Logger datatype into a newtype.
This changes Control.Monad.Logger.Logger from a datatype to a newtype.
Since newtypes disappear at runtime, this should produce an (extremely)
minor speedup.
commit8c7cc69754249fd1d53204fb126fb3744a4d1975
author(cdep)illabout <cdep.illabout@gmail.com>
dateSat 26 Dec 2015, 00:56 (11 years ago)
parent6587019
src/Control/Monad/Logger.hs+1−1
@@ -30,7 +30,7 @@ import Control.Monad.Base (MonadBase(..))
3030import Control.Monad.Trans.Control (MonadBaseControl(..))
3131
3232-- | A replacement for WriterT IO which uses mutable references.
33−data Logger w a = Logger { runLogger :: IORef w -> IO a }
33+newtype Logger w a = Logger { runLogger :: IORef w -> IO a }
3434
3535-- | Run a Logger computation, starting with an empty log.
3636runLogger' :: (Monoid w) => Logger w a -> IO (a, w)