This is a follow up question to this. I'm using a graphic library in Haskell called Threepenny-GUI. In this library the main function returns a UI
monad object. I'm trying to execute a simple print command with no success. What is a right work around to enable printing for debugging purposes.
Code:
main :: IO ()
main = startGUI defaultConfig setup
setup :: Window -> UI ()
setup w = do
print "debug message 1 "
Error:
Couldn't match type ‘IO’ with ‘UI’
Expected type: UI ()
Actual type: IO ()
In a stmt of a 'do' block: print "labels and values "