--This is part of the setup and should not be changed -- D and T are type synonyms for Bytestring and I is a type Synonym for Word import Data.ByteString (ByteString) import Data.Word (Word) import Control.Monad.State.Strict type D = ByteString type T = ByteString type I = Word data TItem = TItem { tiI :: !I , tiD :: !D , tiT :: ![T] } deriving (Show, Eq, Ord)   class MTL m where add :: D -> [T] -> m I --   data TL = TL { list :: [TItem] } deriving (Show, Eq)   emptyTList :: TL emptyTList = TL []     -- This is part of the setup and should not be changed newtype TLM a = TLM { runTLM :: StateT TL IO a } deriving (Functor, Applicative, Monad, MonadIO) --   instance MTL TLM where --add :: D -> [T] -> StateT TL IO I --Filled in TLM to get this type but that might be the problem I'm having add desc tags = do i <- TLM $ gets nextIndex liftIO $ putStrLn (show i) return i where nextIndex (TL []) = 0 nextIndex (TL (x:_)) = (tiI x) + 1 main = return ()