Re: [Haskell] Re: ANNOUNCE: The jhc Haskell compiler.

2005-04-27 Thread Jan-Willem Maessen
On Apr 27, 2005, at 6:56 PM, John Meacham wrote: On Wed, Apr 27, 2005 at 06:14:53PM +0200, Stephane Bortzmeyer wrote: * It takes ridiculous amounts of memory and CPU. A gigabyte of RAM usage is not unheard of. Confirmed :-{ After the initial bootstrap of the libraries, future compiles will be much

[Haskell] Zipper as a delimited continuation

2005-04-27 Thread oleg
This is the first part of a reply to a query about a zipper with two foci, posted on this list by Oktaviandi Hadi Nugraha on Apr 13. In this part we introduce the framework to answer the question. Our treatment of zipper is quite different from that of Huet (JFP, 1997) and Hinze and Jeuring (JFP

Re: [Haskell] Re: ANNOUNCE: The jhc Haskell compiler.

2005-04-27 Thread John Meacham
On Wed, Apr 27, 2005 at 06:14:53PM +0200, Stephane Bortzmeyer wrote: > On Tue, Apr 19, 2005 at 04:54:42AM -0700, > John Meacham <[EMAIL PROTECTED]> wrote > a message of 375 lines which said: > > > There are still substantial issues which need to be overcome before > > jhc can be used for genera

[Haskell] Re: ANNOUNCE: The jhc Haskell compiler.

2005-04-27 Thread Stephane Bortzmeyer
On Tue, Apr 19, 2005 at 04:54:42AM -0700, John Meacham <[EMAIL PROTECTED]> wrote a message of 375 lines which said: > There are still substantial issues which need to be overcome before > jhc can be used for general Haskell programing Do you plan to support ghc command-line flags? Because I tr

[Haskell] Re: Rank-N types vs existential types

2005-04-27 Thread Andre Pang
On 27/04/2005, at 9:35 PM, Andreas Rossberg wrote: The difference really shows up when you *use* (deconstruct) them: g (RankNEq f) = (f 4 5, f True False) This allows the embedded function to be used polymorphically. But: h (ExistsEq f) = ??? Here, you cannot use f at all (well, except with und

Re: [Haskell] Rank-N types vs existential types

2005-04-27 Thread Krasimir Angelov
Yes. There is a significant difference in both the internal representation and the high level representation. ExistsEq is a structure with two internal fields the dictionary and the function, while the RankNEq has only one field. As Andreas Rossberg noted ExistsEq is useless without extra fields. H

Re: [Haskell] Rank-N types vs existential types

2005-04-27 Thread Andre Pang
On 27/04/2005, at 9:26 PM, Krasimir Angelov wrote: RankN and Exists are completelly different. The types of RankNEq and ExistsEq constructors are: RankNEq :: (forall a. Eq a => a -> a -> Bool) -> RankN ExistsEq :: forall a. Eq a => (a -> a -> Bool) -> Exists i.e. RankNEq requires one argument, whic

Re: [Haskell] Rank-N types vs existential types

2005-04-27 Thread Andreas Rossberg
Andre Pang wrote: data RankN = RankNEq (forall a. Eq a => a -> a -> Bool) | RankNOrd (forall a. Ord a => a -> a -> Bool) data Exists = forall a. Eq a => ExistsEq (a -> a -> Bool) | forall a. Ord a => ExistsOrd (a -> a -> Bool) So, the RankN type uses rank-2 polymorphism to

Re: [Haskell] Rank-N types vs existential types

2005-04-27 Thread Tomasz Zielonka
On Wed, Apr 27, 2005 at 09:16:16PM +1000, Andre Pang wrote: > >data RankN = RankNEq (forall a. Eq a => a -> a -> Bool) > >| RankNOrd (forall a. Ord a => a -> a -> Bool) > > > >data Exists = forall a. Eq a => ExistsEq (a -> a -> Bool) > >| forall a. Ord a => ExistsOrd (a ->

Re: [Haskell] Rank-N types vs existential types

2005-04-27 Thread Krasimir Angelov
RankN and Exists are completelly different. The types of RankNEq and ExistsEq constructors are: RankNEq :: (forall a. Eq a => a -> a -> Bool) -> RankN ExistsEq :: forall a. Eq a => (a -> a -> Bool) -> Exists i.e. RankNEq requires one argument, which is a polymorfic function that have to be applie

[Haskell] Rank-N types vs existential types

2005-04-27 Thread Andre Pang
Hi all, Let's say I have the following two data types: {-# OPTIONS_GHC -fglasgow-exts #-} module RankNVsExists where data RankN = RankNEq (forall a. Eq a => a -> a -> Bool) | RankNOrd (forall a. Ord a => a -> a -> Bool) data Exists = forall a. Eq a => ExistsEq (a -> a -> Bool)

[Haskell] howto implement the getDirectoryContents by hand

2005-04-27 Thread Sun Yi Ming
hi all, i even know there is a getDirectoryContents function in lib,but that's implemented by primitive function getDirContents,so i try to implement it use openDirStream,readDirStream but failed to recursive the contents, below is my try code: module Test1 where import System.Directo

Re: [Haskell] Undefined of Char.toUpper ?

2005-04-27 Thread Christian Maeder
Luo Shuli wrote: > Dear Haskellers, > I am a beginer of the haskell language and study it from < Haskell Tutarial>> of Hal Daume III. > Example from the tutarial: > Prelude> map Char.toUpper "Hello World" This works only with ghci > I try it on Hugs for windows32, compile error: > ERRO

Re: [Haskell] Undefined of Char.toUpper ?

2005-04-27 Thread Stefan Holdermans
Luo, I try it on Hugs for windows32, compile error: ERROR - Undefined qualified variable "Char.toUpper" It is possible that you forget to import the Char module first? Regards, Stefan ___ Haskell mailing list Haskell@haskell.org http://www.haskell.o

[Haskell] Undefined of Char.toUpper ?

2005-04-27 Thread Luo Shuli
Dear Haskellers, I am a beginer of the haskell language and study it from <> of Hal Daume III. Example from the tutarial: Prelude> map Char.toUpper "Hello World" I try it on Hugs for windows32, compile error: ERROR - Undefined qualified variable "Char.toUpper" Could anybody tell me w