我正在关注 this tutorial 并创建了一个demo.hs
文件,其中包含以下内容:
import Graphics.Gloss
window :: Display
window = InWindow "Nice Window" (200, 200) (10, 10)
background :: Color
background = white
drawing :: Picture
drawing = circle 80
main :: IO ()
main = display window background drawing
但是,当我在终端中执行runhaskell demo.hs
时,收到以下错误消息:
GLUT Fatal Error: internal error: NSInternalInconsistencyException, reason: nextEventMatchingMask should only be called from the Main Thread!
此错误意味着什么,我该如何解决?我使用的是macOS Sierra版本10.12.5。