Hi,
Given the following enumerated type (as an example)
data P = A | B | C | D | E
deriving (Show,Enum)
and the Prelude definition:
enumFrom x = map toEnum [ fromEnum x ..]
I guess that the two expressions
1) (map toEnum [ fromEnum A ..]) :: [P]
2) enumFrom A
should produces the same result, say
[A,B,C,D,E] :: [P]
However, the expression 1) produces an error as a consequence of trying to
apply toEnum to the number 5.
¿Why the expression 2) doesn't not produce the same error?
¿Does Hugs not apply the definition in the Prelude for evaluating the
expression 2)?
There should be something that I'm missing in this computation.
Some hints?
Thanks in advance,
Paqui
---------------------------------
Paqui Lucio
Dpto de LSI
Facultad de Informática
Paseo Manuel de Lardizabal, 1
20080-San Sebastián
SPAIN
---------------------------------
e-mail: paqui.lucio(a)ehu.es
Tfn: (+34) (9)43 015049
Fax: (+34) (9)43 015590
Web: http://www.sc.ehu.es/paqui
---------------------------------
Hi,
> Can be installed Hugs on Windows Seven?
> Which versions?
> Thanks,
> Paqui
>
---------------------------------
Paqui Lucio
Dpto de LSI
Facultad de Informática
Paseo Manuel de Lardizabal, 1
20080-San Sebastián
SPAIN
---------------------------------
e-mail: paqui.lucio(a)ehu.es
Tfn: (+34) (9)43 015049
Fax: (+34) (9)43 015590
Web: http://www.sc.ehu.es/paqui
---------------------------------
Hi Han-Hing,
I'm afraid I don't run WinHugs anymore, and have never run the OpenGL
portions. Perhaps someone on the Hugs user list can help?
Thanks, Neil
On Mon, Oct 4, 2010 at 12:39 PM, Han-Hing Dang
<h.dang(a)informatik.uni-augsburg.de> wrote:
> Dear Neil Mitchell,
>
> i found your email address on the internet while trying to find someone who
> can help me with getting WinHugs to run. I'm trying to get WinHugs to work
> with the Graphics.HGL library included in the release of Sep 2006. I hope
> you
> might help me with the following problem:
>
> My problem is that WinHugs always crashes when I'm running the GTest.hs file
> with the command "rg w3" or "rg w8". WinHugs crashes when the pop-up window
> closes after finishing. Do you have any idea what can be done about that ?
>
> I think that problem should not depend on my machine since i am running a
> Windows 7 OS, but the same occurs on other Windows XP systems. I hope that
> problem has already occured to other users but if you have any further
> question about my setting or the like please feel free to ask me.
>
> Thank you very much for any helpful comment in advance!
> Best regards,
>
> Han-Hing
>
> --
> *******************************************************************
> Han-Hing Dang
> Universität Augsburg
> Fakultät für Angewandte Informatik
> Universitätsstraße 14
> 86135 Augsburg, Germany
> http://www.informatik.uni-augsburg.de/lehrstuehle/dbis/pmi/staff/dang/
>
> Tel. +49 (0)821/598 3109
> Fax +49 (0)821/598 2274
> *******************************************************************
>