Benjamin L. Russell | 16 Nov 06:02
Picon
Favicon
Gravatar

(no subject)

http://www.andrejschwarcz.com/wp-content/themes/andrej6/images/names.php
Szymon Jachim | 3 Apr 22:07
Picon
Gravatar

[ann] hugs on JVM

Just a small announcement about a nice toy that I've put online.

Hugs 98 compiled to a Java class: http://code.google.com/p/jhugs/

Next step will be to run it on a Android based phone.

Another nice thing thing would be to create a JSR 223 ScriptEngine.
This would allow to script Java existing business classes with Haskell.

Szymon
_______________________________________________
Hugs-Users mailing list
Hugs-Users <at> haskell.org
http://www.haskell.org/mailman/listinfo/hugs-users
Paqui Lucio | 25 Oct 17:12
Picon
Picon
Favicon

the standard function enumFrom

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 <at> ehu.es
Tfn: (+34) (9)43 015049 
Fax: (+34) (9)43 015590
Web: http://www.sc.ehu.es/paqui
---------------------------------

_______________________________________________
Hugs-Users mailing list
Hugs-Users <at> haskell.org
http://www.haskell.org/mailman/listinfo/hugs-users
Paqui Lucio | 6 Oct 17:27
Picon
Picon
Favicon

RV: Hugs in Windows Seven

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 <at> ehu.es
Tfn: (+34) (9)43 015049 
Fax: (+34) (9)43 015590
Web: http://www.sc.ehu.es/paqui
---------------------------------



_______________________________________________
Hugs-Users mailing list
Hugs-Users <at> haskell.org
http://www.haskell.org/mailman/listinfo/hugs-users
Neil Mitchell | 4 Oct 16:48
Picon
Gravatar

Re: WinHugs

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 <at> 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
> *******************************************************************
>
Rustom Mody | 27 Jul 21:48
Picon

unicode support

Hello.

How significant would the changes to hugs be if I want to incorporate unrestricted unicode in hugs source as in jhc and ghc -fglasgow-exts support? [See http://hackage.haskell.org/trac/haskell-prime/wiki/UnicodeInHaskellSource ]

Thanks

Rustom

_______________________________________________
Hugs-Users mailing list
Hugs-Users <at> haskell.org
http://www.haskell.org/mailman/listinfo/hugs-users
Larry Evans | 30 Jun 16:46

Anyone have hugs version of gofer modular-interpreter code?

Page 2 of:

http://www.cs.yale.edu/~liang-sheng/popl95.ps.gz

says the source code is at:

   nebula.cs.yale.edu/pub/yale-fp/modular-interpreter

However, that's no longer present.

Since Hugs is the successor to gofer, I was wondering
if anyone could tell me how to get a copy of the
corresponding hugs code.

TIA.

-Larry
Bruno Schneider | 23 Mar 13:01
Picon

stack overflow in tail recursive function

Hi all,

I have this tail recursive factorial function:

factorial :: Integer -> Integer
factorial 0 = 1
factorial n = fat' n 1 where
    fat' 1 fat = fat
    fat' n fat = fat' (n-1) (n*fat)

Whenever I run it with a number of 20000 or more I get a stack
overflow error. It doesn't seem a problem with the large resulting
number because, if so, the message should be something like "Garbage
collection fails to reclaim sufficient space". Other functions seem to
able to handle a larger number of recursive calls.

So, what is the problem with this particular function?

--

-- 
Bruno Schneider
http://www.dcc.ufla.br/~bruno/
Ahn, Ki Yung | 24 Nov 04:37
Picon

Scoping inconsistency in ghci

Running ghci without any option or scripts to load, I've experienced
some inconsistencies prelude List.\\ and List.(\\) .  The former is in
scope, but the latter is not.  This seem strange.  My expectation is
that neither of them should be in scope unless we load the List module
with with the :m command.

I'm using Debian distribution of GHC 6.10.4, and here is an example run
of ghci to show this issue.

kyagrd <at> kyagrd:~/tmp$ ghci
GHCi, version 6.10.4: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer ... linking ... done.
Loading package base ... linking ... done.
Prelude> [1,2,3,4] List.\\ [1,3]
[2,4]
Prelude> List.(\\) [1,2,3,4] [1,3]

<interactive>:1:0: Not in scope: data constructor `List'

<interactive>:1:5: Not in scope: `\\'
Prelude> :q
Leaving GHCi.
kyagrd <at> kyagrd:~/tmp$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.10.4
kyagrd <at> kyagrd:~/tmp$ uname -a
Linux kyagrd 2.6.30-2-686 #1 SMP Sat Sep 26 01:16:22 UTC 2009 i686 GNU/Linux
Paqui Lucio | 29 Oct 11:06
Picon
Picon
Favicon

the built-in function enumFrom

Hi,
In Prelude.hs you can find the definition
enumFrom x = map toEnum [ fromEnum x ..]
Load a file.hs of just one line:
data TBool = Falsity | Undefined |Truth deriving (Enum, Show)
Then, I evaluate
enumFrom Falsity
and, as expected, it gives
[Falsity,Undefined,Truth]
However, the expression
map toEnum [ fromEnum Falsity ..]
gives first an ambiguity problem and then the problem I expected

Main> map toEnum [ fromEnum Falsity ..]
ERROR - Unresolved overloading
*** Type : Enum a => [a]
*** Expression : map toEnum (enumFrom (fromEnum Falsity))

Main> map toEnum [ fromEnum Falsity ..]::[TBool]
[Falsity,Undefined,Truth,
Program error: {_toEnum TBool_Falsity 3}
(98 reductions, 301 cells)

Why the function enumFrom works perfectly in spite of its erroneous definition?
Thanks in advance,
Paqui

P.D.
I am using the
|| || || || || || ||__ Hugs 98: Based on the Haskell 98 standard
||___|| ||__|| ||__|| __|| Copyright (c) 1994-2002
||---|| ___|| World Wide Web:
http://haskell.org/hugs
|| || Report bugs to: hugs-bugs <at> haskell.org
|| || Version: Nov 2002


---------------------------------
Paqui Lucio                               
Dpto de LSI                   
Facultad de Informática
Paseo Manuel de Lardizabal, 1
20080-San Sebastián
SPAIN
---------------------------------
e-mail: paqui.lucio <at> ehu.es
Tfn: (+34) (9)43 015049 
Fax: (+34) (9)43 015590
Web: http://www.sc.ehu.es/paqui
---------------------------------

_______________________________________________
Hugs-Users mailing list
Hugs-Users <at> haskell.org
http://www.haskell.org/mailman/listinfo/hugs-users
Irfon-Kim Ahmad | 13 Oct 21:18

Re: Opening text editor

Daniel Fischer wrote:
> Am Sonntag 27 September 2009 01:16:12 schrieb John Vitale:
>   
>> I have downloaded and installed... and reinstalled winhugs to my computer..
>> it works fine but the text editor that opens up by default is notepad...
>> does winhugs come with a text editor of it's own?  If so what is it?  if
>> not what would you suggest?  My university has a completely different text
>> editor when i use it there and i would love to have that same thing for
>> here.
>>     
>
> There must be a way to set the default editor. I don't know how WinHugs behaves, though 
> it's probably the same as Hugs. 
> The default default-editor there is what your EDITOR environment variable says (may be 
> called slightly differently on Windows).
> You can change that by
>
> :set -E/usr/bin/myeditor
>
> (on Windows, more likely
> :set -E"C:\Programs and Applications\ed")
>
> in (win)hugs.
> That isn't permanent, however, so you'd want to put that line into your ~/.hugs 
> (~/.winhugs) file so that the editor is set on every startup.
> Or change the environment variable to your preferred editor (a reasonable thing to do 
> anyway).
>
>   

In WinHugs, you set the editor by going to File | Options and on the 
"WinHugs" tab, there's a section called "Editor".  It's actually really 
hard to miss.

Given that the only built-in options it offers are "Notepad" and 
"Custom", it's safe to conclude that it doesn't ship with any other 
editor.  I use Programmer's Notepad 2, which is available as freeware.

Someone has posted a syntax highlighting definition set for PN2 here:

http://compsci.ca/v3/viewtopic.php?t=14630

I have not tried it myself.

Gmane