Advertisement
Guest User

Untitled

a guest
Dec 7th, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. main :: IO()
  2. main = runInputT defaultSettings loop
  3. where
  4. --loop :: InputT IO ()
  5. loop = do
  6. minput <- getInputLine "$ "
  7. case minput of
  8. Nothing -> return ()
  9. Just input -> process $ words input
  10. loop
  11.  
  12. process :: [String] -> IO ()
  13.  
  14. • Couldn't match type ‘IO’ with ‘InputT m’
  15. Expected type: InputT m ()
  16. Actual type: IO ()
  17. • In the expression: process $ words input
  18. In a case alternative: Just input -> process $ words input
  19. In a stmt of a 'do' block:
  20. case minput of {
  21. Nothing -> return ()
  22. Just input -> process $ words input }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement