[Haskell-cafe] Code from Haskell School of Expression hanging.

michael rice nowgate at yahoo.com
Sun Jan 30 21:59:05 CET 2011


Yeah, I got a parse error when it was on two lines and I must have backed over the comma when I put it all on one line. Sorry.

Yes, it compiles and runs, just like it did before.

Michael

--- On Sun, 1/30/11, Paul L <ninegua at gmail.com> wrote:

From: Paul L <ninegua at gmail.com>
Subject: Re: [Haskell-cafe] Code from Haskell School of Expression hanging.
To: "michael rice" <nowgate at yahoo.com>
Cc: haskell-cafe at haskell.org
Date: Sunday, January 30, 2011, 3:53 PM

You missed the comma after the first 8.

On Sun, Jan 30, 2011 at 12:15 PM, michael rice <nowgate at yahoo.com> wrote:

The expression (the swapped line) on line 12 is all on one line in my code.



Michael


======================

[michael at localhost ~]$ ghc --make rat2.hs
[1 of 1] Compiling Main             ( rat2.hs, rat2.o )

rat2.hs:12:37:
    Couldn't match expected type `(Int -> DisplayBits)

                                  -> t
                                  -> DisplayBits'
           against inferred type `DisplayBits'
    In the expression: DisplayStencilBits 8 DisplayAlphaBits 8

    In the second argument of `openWindow',
 namely
        `[DisplayStencilBits 8 DisplayAlphaBits 8]'
    In a stmt of a 'do' expression:
        openWindow
          (Size 400 400) [DisplayStencilBits 8 DisplayAlphaBits 8] Window
[michael at localhost ~]$



--- On Sun, 1/30/11, Paul L <ninegua at gmail.com> wrote:


From: Paul L <ninegua at gmail.com>
Subject: Re: [Haskell-cafe] Code from Haskell School of Expression hanging.
To: "michael rice" <nowgate at yahoo.com>

Cc: haskell-cafe at haskell.org
Date: Sunday, January 30, 2011, 1:57 PM

Ok, in the GLFW sample program from Haskell Wiki, can you change the

GLFW.openWindow line to the following, and try again?

GLFW.openWindow
 (GL.Size 400 400) [GLFW.DisplayStencilBits 8,
GLFW.DisplayAlphaBits 8] GLFW.Window

Does it still run?

Regards,
Paul Liu

On Sun, Jan 30, 2011 at 10:50 AM, michael rice <nowgate at yahoo.com> wrote:

>
> What you see below is what I get. No window opens. System Monitor shows CPU usage negligible.
>
> Michael
>
> [michael at localhost ~]$ cd ./SOE/SOE/src
> [michael at localhost src]$ ghci

> GHCi, version 6.12.3: http://www.haskell.org/ghc/  :? for help
> Loading package ghc-prim ... linking ... done.
> Loading package integer-gmp ... linking ... done.

> Loading package base ... linking ... done.
> Loading package ffi-1.0 ... linking ... done.
> Prelude> :l Snowflake.lhs
> Ok, modules loaded:
 Snowflake, SOE.
> Prelude Snowflake> main
> Loading package old-locale-1.0.0.2 ... linking ... done.
> Loading package old-time-1.0.0.5 ... linking ... done.
> Loading package OpenGLRaw-1.1.0.1 ... linking ... done.

> Loading package GLURaw-1.1.0.0 ... linking ... done.
> Loading package ObjectName-1.0.0.0 ... linking ... done.
> Loading package StateVar-1.0.0.0 ... linking ... done.
> Loading package Tensor-1.0.0.1 ... linking ... done.

> Loading package OpenGL-2.4.0.1 ... linking ... done.
> Loading package GLFW-0.4.2 ... linking ... done.
>
>
>
>
> Michael
>
> --- On Sun, 1/30/11, Paul L <ninegua at gmail.com> wrote:

>
> From: Paul L <ninegua at gmail.com>
>
 Subject: Re: [Haskell-cafe] Code from Haskell School of Expression hanging.
> To: "michael rice" <nowgate at yahoo.com>
> Cc: "Daniel Fischer" <daniel.is.fischer at googlemail.com>, haskell-cafe at haskell.org

> Date: Sunday, January 30, 2011, 1:03 PM
>
> I'm the maintainer of the SOE code. This is rather puzzling, since apparently GLFW works on your setup. I don't think there is much big difference in SOE than the sample GLFW program from the Haskell Wiki.

> So when you run the SOE program, did you see the window but just all blank? Or you never see the window popping up?
> Regards,
> Paul Liu
>
> On Sat,
 Jan 29, 2011 at 7:34 PM, michael rice <nowgate at yahoo.com> wrote:
>
> The sample program (the "active" version) here runs fine, so  the OpenGL GLFW must have been installed properly. Must be the SOE stuff causing the problem.

>
> http://www.haskell.org/haskellwiki/GLFW
>
> Michael
>
>
> --- On Sat, 1/29/11, Daniel Fischer <daniel.is.fischer at googlemail.com> wrote:

>
> From: Daniel Fischer <daniel.is.fischer at googlemail.com>
> Subject: Re: [Haskell-cafe] Code from Haskell School of Expression
 hanging.
> To: "michael rice" <nowgate at yahoo.com>
> Date: Saturday, January 29, 2011, 9:37 PM
>
> On Sunday 30 January 2011 03:27:55, michael rice wrote:

> > I'm using the OpenGL stuff (GLFW). Same set of problems?
>
> No idea, I haven't used a graphics library for a long time.
>
>
>
> _______________________________________________

> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

>
>
>
>
>



--
Regards,
Paul Liu









      


-- 
Regards,
Paul Liu





      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20110130/517ca435/attachment.htm>


More information about the Haskell-Cafe mailing list