yesod - types mismatch on runSqlite and newTVar -


at fpcomplete.com, I was reading a tutorial to use yesod forms. Based on the tutorial, my main task is

  main = do titems & lt; - Atomically $ newTVar [] liftIO $ warpEnv (link title)   

What I want to do is start an SQL database in memory, and then put all the data into forms in memory . But even a very simple example does not work:

  main = runSqlite ": Memory:" $ do - runMigration migrateAll - MichaelId " - $ person insert "Michael" $ 26 - - Michael & Lieutenant; - Michelle Edie - LeftIo $ print Michael Times & lt; - Atomic $ Nutv [] Upper $$ warpEnv (Link Title)   

I get the error src / Main.hs@39: 13-39: 36 Expected type 'especlarist t (control.monad.loger.logging t (control.monad trance.resources.microsoft.com) is not in real' io (TOE [a0]) 'in a' do 'block In an STMT: tithem & lt; - atomically $ newTVar [] in the second argument of `($) ', that is,` `{titems & lt; - atomically $ newt [[]; liftIO $ warpEnv (link title)} 'In Expression: Ranslquite': Memory: "$ tax {titems & quot; - atomically $ newTVar []; liftIO $ warpEnv (links title)}

I understand that there are some types of mismatch, but to ensure that I have to use which function to solve it. I would greatly appreciate if someone can explain to me what is happening.

You must add IO to continuously take action To carry Ond liftIO before the nuclear form of

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -