From nordland@cse.ogi.edu Fri Feb 2 19:00:12 2001 Date: Fri, 02 Feb 2001 11:00:12 -0800 From: Johan Nordlander nordland@cse.ogi.edu Subject: ANNOUNCE: Hugs 98 January 2001 beta
==================================================================
  __   __ __  __  ____   ___      
  ||   || ||  || ||  || ||__      
  ||___|| ||__|| ||__||  __||     
  ||---||         ___||           
  ||   ||                         
  ||   ||                         

  Version: January 2001 beta  
==================================================================

Dear all,

I'm pleased to announce the availability of a new beta release
of Hugs98.  This is a beta release that aims at giving as many 
people as possible a chance to react to the changes and additions 
that have recently been incorporated, before the next major version
is released on February 14 2001.  A list of the most important 
new features looks as follows:

   - A Foreign Function Interface closely modelled after the one
     provided by GHC.

   - Built-in, Hood-like debugging support.
 
   - A new syntax for recursive monad bindings.

   - A new GUI under Windows that doesn't consume all CPU time.

See the release notes in the "docs" directory of the distribution
for more information on some of these features.

Send email to hugs-users-request@haskell.org to join the hugs-users
mailing list.  Bug reports should be sent to hugs-bugs@haskell.org.
Send email to hugs-bugs-request@haskell.org to subscribe to the
hugs-bugs list.

The home page and download site for Hugs is at 

   http://www.haskell.org/hugs/

Enjoy,
Johan Nordlander

PS  
Please don't confuse this release with latest (January 31) release 
of a new version of O'Hugs, the O'Haskell interpreter!


From gruenbacher-lists@geoinfo.tuwien.ac.at Tue Feb 6 17:21:22 2001 Date: Tue, 6 Feb 2001 18:21:22 +0100 (CET) From: Andreas Gruenbacher gruenbacher-lists@geoinfo.tuwien.ac.at Subject: Assertions in Hugs
Hi all,

I'm looking for a way to assert certain facts in Haskell modules. Is there
a way to do this in Hugs? This would be a very nice feature; preferably
with a command line switch to control whether assertions are actually run
or not.

------------------------------------------------------
module Test where

class Test t where
   f, g :: t -> t

instance Test Int where
   f x = x

test1, test2 :: Int
test1 = f 3  -- 3
test2 = g 3  -- Program error: Undefined member: g

-- this doesn't actually work in Hugs:
--assert (test1 == 3)
--assert (test2 == 3)

------------------------------------------------------

Thanks,
Andreas.

------------------------------------------------------------------------
 Andreas Gruenbacher                  gruenbacher@geoinfo.tuwien.ac.at
 Research Assistant                       Phone      +43(1)58801-12723
 Institute for Geoinformation             Fax        +43(1)58801-12799
 Technical University of Vienna           Cell phone   +43(664)4064789



From patrikj@cs.chalmers.se Wed Feb 7 09:34:48 2001 Date: Wed, 7 Feb 2001 10:34:48 +0100 (MET) From: Patrik Jansson patrikj@cs.chalmers.se Subject: Observe and limits
With observe in the new hugs beta we have an interesting new toy to play
with. I tried observing the state (current character, line and column) of
an (inefficient) monadic expression parser to see the amount of
backtracking, but I immediately ran into the limit on number of
observation tags (400).

I guess I used observe in a way it was not inteded for

  ... observe (show (c,line,col)) c ...

producing lots of tag, each with a few (identical) observations, but
nevertheless it would be nice to have a simpler way of changing the
maximum number of tags than to recompile hugs. (Or at least have a larger
default for big hugs.) (For the record, 4000 was not enough either for
this example.)

When debugging, or performance evaluating using HugsHood it would also be
nice to have a possibility of storing something else than just a list of
observed values. For the parser example (and in many other cases), just
incrementing a tag-specific counter at each evaluation of observe (or a
similar extended function) would be very useful.

/Patrik Jansson



From reid@cs.utah.edu Mon Feb 12 17:13:22 2001 Date: Mon, 12 Feb 2001 10:13:22 -0700 From: Alastair Reid reid@cs.utah.edu Subject: Assertions in Hugs
> I'm looking for a way to assert certain facts in Haskell modules. Is there
> a way to do this in Hugs? This would be a very nice feature; preferably
> with a command line switch to control whether assertions are actually run
> or not.

This doesn't quite answer your question but...

I strongly recommend looking at quickcheck

  http://www.cs.chalmers.se/~rjmh/QuickCheck/

which provides a lot of help in building good test-suites.

If you want conditional compilation, you might also check out
 the -F <filter-program> feature in Hugs which lets you specify
 a preprocessor (such as cpp or perl) to use with your Haskell code.

--
Alastair Reid


From nordland@cse.ogi.edu Thu Feb 15 05:22:47 2001 Date: Wed, 14 Feb 2001 21:22:47 -0800 From: Johan Nordlander nordland@cse.ogi.edu Subject: ANNOUNCE: Hugs98 Feb 2001
======================================================================
  __   __ __  __  ____   ___      
  ||   || ||  || ||  || ||__      
  ||___|| ||__|| ||__||  __||     
  ||---||         ___||           
  ||   ||                         
  ||   || Version: Feb 2001

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

Dear all,

I'm pleased to announce the availability of a new release of Hugs98.

This is a major release that incorporates bug fixes as well as several
new features and enhancements that have been developed for Hugs over 
the last year. It is announced with the intentions that it will remain 
a stable and lightweight implementation of Haskell 98 + extensions 
for some considerable time.

A list of the most important new features looks as follows:

   - A Foreign Function Interface closely modelled after the one
     provided by GHC.

   - Built-in, Hood-like debugging support.
 
   - Parallel list comprehensions, a.k.a. zip-comprehensions.

   - A new syntax for recursive monad bindings.

   - A new GUI under Windows that doesn't consume all CPU time.

   - Support for the MacOS platform integrated into the main 
     distriution.

   - Corrections of all bugs reported for the January 2001 beta 
     release.

See the release notes in the "docs" directory of the distribution
for more information on the new language features.

Send email to hugs-users-request@haskell.org to join the hugs-users
mailing list.  Bug reports should be sent to hugs-bugs@haskell.org.
Send email to hugs-bugs-request@haskell.org to subscribe to the
hugs-bugs list.

The home page and download site for Hugs is at 

   http://www.haskell.org/hugs/

Enjoy,
Johan Nordlander
[Hugs maintainer]


From sigbjorn_finne@hotmail.com Thu Feb 15 10:09:43 2001 Date: Thu, 15 Feb 2001 11:09:43 +0100 From: Sigbjorn Finne sigbjorn_finne@hotmail.com Subject: Feb 2001 MSI available
Hi,

I've packaged up a Windows Installer (.msi) for people that
want to easily set up and use Hugs98 February 2001 on a
Win32 platform. The MSI can be downloaded from

  http://www.dcs.gla.ac.uk/~sof/hugs98.msi  (1.4M)

It contains executables (hugs,runhugs and winhugs), libs
(std + win32), docs (html, hlp and pdf) and the demos. The
only thing that's (intentionally) missing is the Hugs98 source
code.

In the unlikely event that your machine doesn't already have
the Windows Installer engine/runtime installed, runtime
redistributables can be downloaded from

    http://www.microsoft.com/msdownload/platformsdk/instmsi.htm

--sigbjorn




From ctsharpe@earthlink.net Mon Feb 19 18:42:39 2001 Date: Mon, 19 Feb 2001 13:42:39 -0500 From: Christopher Sharpe ctsharpe@earthlink.net Subject: Feb 2001 MSI available
Hi,

Thanks to 

	Sigbjorn Finne 

for making Hugs so easy to install on Windows.

It would be great if  O'Hugs

	http://www.cs.chalmers.se/~nordland/ohugs/win32/

were so easy. Acutally installing O'Hugs itself is straightforward, but
O'Hugs has examples using the associated Tcl extension called Tix, whose
homepage is

  http://www.tix.mne.com/ 

I don't have a compiler, so would like to find binaries for Tix which
will work with Tcl 8.3, which is what O'Hugs seems to need.

I downloaded the following from

ftp://ftp.tix.mne.com/pub/tcl/temptix/

	tix41p6.zip
	win41p6bin.zip

and the "readme" file in the latter says


"The files contained in this package:

Tix4.1.0/win/tcl7.6/
	Tix binaries compiled for Tcl 7.6 using BC++ 4.52

Tix4.1.0/win/tcl8.0/
	Tix binaries compiled for Tcl 8.0b2 using BC++ 4.52

	>> Do not mix these files with a wish.exe from Tcl8.0b1    <<
	>> wish. You must install tcl8.0b2 on your machine first   <<
	>> before using these binaries.				   <<
"


Am I out of luck unless I get a compiler?

Thanks for your help,


Christopher Sharpe


From koen@cs.chalmers.se Wed Feb 21 16:15:04 2001 Date: Wed, 21 Feb 2001 17:15:04 +0100 (MET) From: Koen Claessen koen@cs.chalmers.se Subject: Hugs' behavior
Hi,

I noticed an annoying incompatibility between Hugs (Feb
2000) and Hugs (Feb 2001), namely the fact that when
evaluating expressions of type `IO T' in Hugs (Feb 2001),
the following happens:

  1. when T = (), the IO action is just evaluated.

  2. when T /= (), the IO action is evaluated,
     *and* the result is printed, but only
     if T is an instance of Show.

  3. when T is no instance of Show, just a type error
     is generated.

Hugs (Feb 2000) has behavior 1. in all cases for T.

It is discussable which behavior is better. But I think
there should at least be a flag specifying what behavior you
want. And I also think that it should not be the default!

I don't like the new behavior because:

  * The Haskell 98 report does not say anything
    about printing the result of the main :: IO T action.

  * There is a rather arbitrary distinction between
    T = () and T /= ().

  * The error in case 3. is totally unacceptable.
    (Especially because there are interactive systems
    (such as Lava) which rely on Hugs' (Feb 2000) behavior.)

Take a look at the following examples, which illustrate some
of the issues.

  Prelude> return () :: IO ()

  Prelude> return id :: IO (Int -> Int)
  ERROR - Cannot find "show" function for IO result:
  *** Expression : return id
  *** Of type    : IO (Int -> Int)

This is really strange too:

  Prelude> return undefined :: IO ()

  Prelude> return undefined :: IO Int
  Program error: {undefined}

And here:

  Prelude> print "apa" >> return () :: IO ()
  apa

  Prelude> print "apa" >> return id :: IO (Int -> Int)
  ERROR - Cannot find "show" function for IO result:
  *** Expression : print "apa" >> return id
  *** Of type    : IO (Int -> Int)

What do you think?

/Koen.

--
Koen Claessen         http://www.cs.chalmers.se/~koen
phone:+46-31-772 5424      mailto:koen@cs.chalmers.se
-----------------------------------------------------
Chalmers University of Technology, Gothenburg, Sweden



From ger@tzi.de Wed Feb 21 18:52:40 2001 Date: Wed, 21 Feb 2001 19:52:40 +0100 From: George Russell ger@tzi.de Subject: Existential quantification
Excuse me, but is it a bug or a feature that Hugs (98-Feb2001), with 
the -98 option, rejects:

data G b = forall a . H a b =>  G a b

class H a b where

with "Variable "b" in constraint is not locally bound"?

PS - please CC me with replies as I don't normally subscribe to this list.


From Tom.Pledger@peace.com Wed Feb 21 20:01:10 2001 Date: Thu, 22 Feb 2001 09:01:10 +1300 From: Tom Pledger Tom.Pledger@peace.com Subject: Existential quantification
George Russell writes:
 | Excuse me, but is it a bug or a feature that Hugs (98-Feb2001), with 
 | the -98 option, rejects:
 | 
 | data G b = forall a . H a b =>  G a b
 | 
 | class H a b where
 | 
 | with "Variable "b" in constraint is not locally bound"?

What do you intend for the type of G?

    G :: H a b => a -> b -> G b

...but where does the "forall a" go?

Apart from the lack of a functional dependency in the H decl, this
looks like a recent thread on the main Haskell list, subject "Fundeps
and quantified constructors".

The original question:
    http://www.mail-archive.com/haskell@haskell.org/msg07982.html

The realisation that GHC permitted it:
    http://www.mail-archive.com/haskell@haskell.org/msg08036.html

Regards,
Tom


From ger@tzi.de Wed Feb 21 20:12:01 2001 Date: Wed, 21 Feb 2001 21:12:01 +0100 From: George Russell ger@tzi.de Subject: Existential quantification
Tom Pledger wrote:
> 
> George Russell writes:
>  | Excuse me, but is it a bug or a feature that Hugs (98-Feb2001), with
>  | the -98 option, rejects:
>  |
>  | data G b = forall a . H a b =>  G a b
>  |
>  | class H a b where
>  |
>  | with "Variable "b" in constraint is not locally bound"?
> 
> What do you intend for the type of G?
> 
>     G :: H a b => a -> b -> G b
> 
> ...but where does the "forall a" go?
G has existential type, something like 
   (exists b . H a b => a -> b) -> G b
Isn't this what existential type constructors are for?  Of course you can't write
"exists" in Hugs, because existential type constructors are supposed to do roughly
the same job (with better error messages). 
> Apart from the lack of a functional dependency in the H decl, this
> looks like a recent thread on the main Haskell list, subject "Fundeps
> and quantified constructors".
The thread doesn't appear to answer my question, namely is this a bug or a feature
in Hugs?
> 
> The original question:
>     http://www.mail-archive.com/haskell@haskell.org/msg07982.html
> 
> The realisation that GHC permitted it:
>     http://www.mail-archive.com/haskell@haskell.org/msg08036.html
I know GHC permits it.  The problem arose when I was trying to port
some GHC code to Hugs.


From nordland@cse.ogi.edu Thu Feb 22 22:53:14 2001 Date: Thu, 22 Feb 2001 14:53:14 -0800 From: Johan Nordlander nordland@cse.ogi.edu Subject: Existential quantification
George Russell wrote:
> 
> Excuse me, but is it a bug or a feature that Hugs (98-Feb2001), with
> the -98 option, rejects:
> 
> data G b = forall a . H a b =>  G a b
> 
> class H a b where
> 
> with "Variable "b" in constraint is not locally bound"?
>


As far as I can understand the restriction is there on purpose, although that
purpose might just be to avoid trouble with the particular implementation of
local existential quantification that comes with Hugs.  In principle there
shouldn't be any problem removing this restriction, however, I'll have to look
at the code more carefully before I can make any promise about doing so in a
future release.

-- Johan


From promocionesdosmiluno@yahoo.es Sun Feb 25 18:23:47 2001 Date: Sun, 25 Feb 2001 13:23:47 -0500 (EST) From: promocionesdosmiluno@yahoo.es promocionesdosmiluno@yahoo.es Subject: Lo mejor de Internet aquí
This is a multi-part message in MIME format.

--Z_MULTI_PART_MAIL_BOUNDAEY_S
Content-Type: text/plain
Content-Transfer-Encoding: base64

VmlzaXRhIGVzdGEgd2ViDQoNCmh0dHA6Ly9NdW5kb0VzcGFueWEucmVkaXJlY2Npb24uY29t
DQoNCiAgICA=
--Z_MULTI_PART_MAIL_BOUNDAEY_S--


From labra@lsi.uniovi.es Mon Feb 26 11:40:32 2001 Date: Mon, 26 Feb 2001 12:40:32 +0100 From: Jose Emilio Labra Gayo labra@lsi.uniovi.es Subject: FunDeps & Monad transformers
I was using monad transformers with definitions like the following:

> -- class Monad m => StateMonad s m
> --  where update :: (s -> s) -> m s

However, if I try to define

> test :: ( StateMonad s m, Num s ) => m ()
> test = do { update (+1) ; return () }

I obtain

ERROR ... - Ambiguous type signature in type declaration
*** ambiguous type : (StateMonad a b, Num a) => b ()
*** assigned to    : test

I thought that functional dependencies could be useful
to solve those typings. So I wrote:

> class Monad m => StateMonad s m | m -> s
>  where update :: (s -> s) -> m s

And now, the 'test' function loads with Hugs.

However, when I try to declare the following instances (which previously
worked ok):

> class (Monad m, Monad (t m)) => MonadT t m where
>  lift :: m a -> t m a

> newtype StateT s m v = S (s -> m (v,s))

> instance ( StateMonad s m
>          , MonadT t m) => StateMonad s (t m)
>  where update = lift . update

> instance Monad m => StateMonad s (StateT s m)
>   where update f = S (\s -> return (s, f s))

I obtain the following error

ERROR ... - Instances are not consistent with dependencies
*** This instance    : StateMonad a (StateT a b)
*** Conflicts with   : StateMonad a (b c)
*** For class        : StateMonad a b
*** Under dependency : b -> a

Is it possible to define those declarations?

Best regards, Jose Labra
http://lsi.uniovi.es/~labra