From b095907d9b3298e6b773162c67eae4d733d6591d Mon Sep 17 00:00:00 2001 From: Stefan Dresselhaus Date: Tue, 17 Jun 2014 16:37:49 +0200 Subject: [PATCH] tried with WriterT, undid most of it; compiles --- src/Types.hs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Types.hs b/src/Types.hs index 2b5fa20..935bf21 100644 --- a/src/Types.hs +++ b/src/Types.hs @@ -10,10 +10,12 @@ import Data.Time (UTCTime) import Linear.Matrix (M44) import Linear (V3) import Control.Monad.RWS.Strict (RWST, liftIO, get) +import Control.Monad.Writer.Strict import Control.Monad (when) import Control.Lens import Graphics.Rendering.OpenGL.GL.Texturing.Objects (TextureObject) import Render.Types +import System.IO import Importer.IQM.Types import UI.UIBase import Map.Types (PlayMap) @@ -190,6 +192,12 @@ data State = State , _ui :: !UIState } +data Entry = Log {msg::String} deriving Eq + +instance Show Entry where + show (Log s) = s + +type Logger = WriterT [Entry] IO Handle type Pioneers = RWST Env () State IO