Skip to content

Commit 8c7cc69

Browse files
committed
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.
1 parent 6587019 commit 8c7cc69

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Control/Monad/Logger.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import Control.Monad.Base (MonadBase(..))
3030
import 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.
3636
runLogger' :: (Monoid w) => Logger w a -> IO (a, w)

0 commit comments

Comments
 (0)