<span style="font-family:courier new,monospace"><font face="arial,helvetica,sans-serif">1. I wrote this:<br>-----8&lt;----- test.hs ---<br></font>  module Main where</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">  import qualified Graphics.UI.GLFW as GLFW</span><br style="font-family:courier new,monospace">

<span style="font-family:courier new,monospace">  main = do</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">    True &lt;- GLFW.initialize</span><br style="font-family:courier new,monospace">

<span style="font-family:courier new,monospace">    print =&lt;&lt; GLFW.openGLProfile</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">    print =&lt;&lt; GLFW.getGlfwVersion</span><br style="font-family:courier new,monospace">

<span style="font-family:courier new,monospace">    print =&lt;&lt; GLFW.getGlVersion</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">    print &quot;Trying to open the window&quot;</span><br style="font-family:courier new,monospace">

<span style="font-family:courier new,monospace">    result &lt;- GLFW.openWindow GLFW.defaultDisplayOptions</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">    print result</span><br>

<span style="font-family:courier new,monospace"><font face="arial,helvetica,sans-serif">-----8&lt;-----</font></span><br><br>2. Compiled like this: ghc --make -o test test.hs<br>3. Executed: ./test<br><span style="font-family:courier new,monospace">  DefaultProfile</span><br style="font-family:courier new,monospace">

<span style="font-family:courier new,monospace">  Version {versionBranch = [2,7,2], versionTags = []}</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">  Version {versionBranch = [0,0,0], versionTags = []}</span><br style="font-family:courier new,monospace">

<span style="font-family:courier new,monospace">  &quot;Trying to open the window&quot;</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">  True</span><br>4. Window appeared.<br>

<br>2&#39;. Executed in GHCI like this:<br><span style="font-family:courier new,monospace"><span style="font-family:arial,helvetica,sans-serif">  ghci -fno-ghci-sandbox</span></span><br style="font-family:arial,helvetica,sans-serif">

<span style="font-family:arial,helvetica,sans-serif">  Prelude&gt; :l test.hs</span><br style="font-family:arial,helvetica,sans-serif"><span style="font-family:arial,helvetica,sans-serif">  Prelude&gt; main</span><br>3&#39;. Get (random numbers as GLVersion):<br>

<span style="font-family:courier new,monospace">  Loading package GLFW-b-0.1.0.2 ... linking ... done.</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">  DefaultProfile</span><br style="font-family:courier new,monospace">

<span style="font-family:courier new,monospace">  Version {versionBranch = [2,7,2], versionTags = []}</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">  Version {versionBranch = <b>[34972080,-1323041296,-1334802519]</b>, versionTags = []}</span><br style="font-family:courier new,monospace">

<span style="font-family:courier new,monospace">  &quot;Trying to open the window&quot;</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">  False</span><br>4&#39;. Window didn&#39;t appear.<br>


<br>What should I do to get GLFW window in ghci too?<br>What do I do wrong?<br>