module Web.Last where -- and lo do we have the obligatory 'export everything useful' module import Control.Monad.Error import Control.Monad.State import Web.Last.Types runLast :: Last a -> LastState -> IO (Either String a) runLast (Last l) lastState = fst `fmap` runStateT (runErrorT l) lastState