{-# LANGUAGE OverloadedStrings #-}
module Main where
import Web.Scotty
import Data.Monoid
import Data.Text.Lazy
import Control.Monad.Trans
main :: IO ()
main = scotty 3000 $ do
get "/" serve
post "/" serve
where
serve :: ActionM ()
serve = do
liftIO $ putStrLn "test"
return ()
TestScotty.hs:16:9:
No instance for (MonadIO
(Web.Scotty.Internal.Types.ActionT Text IO))
arising from a use of ‘liftIO’
In the expression: liftIO
In a stmt of a 'do' block: liftIO $ putStrLn "test"
In the expression:
do { liftIO $ putStrLn "test";
return () }