Overloading

2000-09-25 Thread Carlos Camarao de Figueiredo
Myself and Lucilia ([EMAIL PROTECTED]) have modified Mark Jones' program, "Typing Haskell in Haskell", (http://www.cse.ogi.edu/~mpj/thih) to support system CT (paper available at http://www.dcc.ufmg.br/~camarao/ct.ps.gz). (Thanks Mark.) The implementation is a prototype of system CT, mainly an a

Re: SAX, XML, Haskell

2000-09-25 Thread Joe English
Chris Angus wrote: > > I looked at HaXml a while ago > and it seemed to offer a very Dom-like interface. You could say that it's DOM-like in that it deals with trees instead of an event stream, but it's actually somewhere in between SAX and DOM. The main difference between HaXML and DOM is tha

Re: Extensible data types?

2000-09-25 Thread Carl R. Witty
Jose Romildo Malaquias <[EMAIL PROTECTED]> writes: > Hello. > > Is there any Haskell implementation that supports > extensible data types, in which new value constructors > can be added to a previously declared data type, > like > > data Fn = Sum | Pro | Pow > ... > extend dat

Re: Extensible data types?

2000-09-25 Thread Keith Wansbrough
> In the Clean Object I/O library we encountered a similar challenge and > solved it using type constructor classes. The solution can also be used in > Haskell. The basic idea is as follows: > I didn't read your message in detail, but I wonder if this is related to the trick TclHaskell / FranT

How to force evaluation entirely?

2000-09-25 Thread Michael Marte
Hello, I am trying to process a huge bunch of large XML files in order to extract some data. For each XML file, a small summary (6 integers) is created which is kept until writing a HTML page displaying the results. The ghc-compiled program behaves as expected: It opens one XML file after the ot

Correction: Re: Extensible data types?

2000-09-25 Thread John Hörnkvist
I wrote: > You may find these handy: > class SubType a b where > inj :: a -> b > prj :: b -> Maybe a > > instance SubType a (Either a b) where > inj a = Left a > prj (Left a) = a > prj (_) = Nothing This should be: instance SubType a (Either a b) where inj a

Re: Extensible data types?

2000-09-25 Thread Jose Romildo Malaquias
On Mon, Sep 25, 2000 at 03:33:54PM -0700, Peter Achten wrote: > At 07:46 25-9-00 -0300, Prof. José Romildo Malaquias wrote: > > >Hello. > > > >Is there any Haskell implementation that supports > >extensible data types, in which new value constructors > >can be added to a previously declared data

RE: Extensible data types?

2000-09-25 Thread Chris Angus
Presumably this means differentiation/integeration would have to be typed as diff :: (FnExt a,FnExt b) => a -> b Chris > -Original Message- > From: Peter Achten [mailto:[EMAIL PROTECTED]] > Sent: 25 September 2000 23:34 > To: Jose Romildo Malaquias > Cc: [EMAIL PROTECTED] > Subject: Re

Re: Extensible data types?

2000-09-25 Thread Peter Achten
At 07:46 25-9-00 -0300, Prof. José Romildo Malaquias wrote: >Hello. > >Is there any Haskell implementation that supports >extensible data types, in which new value constructors >can be added to a previously declared data type, >like > > data Fn = Sum | Pro | Pow > ... > ex

Re: Extensible data types?

2000-09-25 Thread John Hörnkvist
If you use Hugs -- and possibly GHC -- you might be able to use the "Either" constructor for subtyping. I first saw this pattern in "Modular Monadic Interpreters" (or something like that) by Jones, Liang and Hudak. [Apologies if I didn't get the attribution right.] data Expr a = Int Integer

RE: Extensible data types?

2000-09-25 Thread Chris Angus
Just wondering if you'd seen the dynamic datatype which basically gives you an "Any" in ghc/hugs > -Original Message- > From: Jose Romildo Malaquias [mailto:[EMAIL PROTECTED]] > Sent: 25 September 2000 12:14 > To: Chris Angus > Cc: [EMAIL PROTECTED] > Subject: Re: Extensible data types?

Re: Extensible data types?

2000-09-25 Thread Axel Simon
> > > Is there any Haskell implementation that supports > > > extensible data types, in which new value constructors > > > can be added to a previously declared data type? > > > > I think this is what TREX (extensible records) in Hugs are about. Take > > a look at > > > > http://www.cse.ogi.edu

Re: Extensible data types?

2000-09-25 Thread Rob MacAulay
There is an interesting paper which includes a method of performing this extension in Gofer: "Monad Transformers and Monad Interpreters" by Liang, Hudak and Jones I think this should be available from Mark Jones' web site at OGI. Rob MacAulay > > > > > Is there any Haskell implementation

Re: Extensible data types?

2000-09-25 Thread Ch. A. Herrmann
Hi, Jose> I am working on an Computer Algebra system to transform Jose> mathematic expressions, possibly simplifing them. There is a Jose> data type to represent the expressions: Jose> data Expr = Int Integer | Cte String | Var String | App Fn [Expr] Jose> An expression may

Re: Extensible data types?

2000-09-25 Thread Jose Romildo Malaquias
On Mon, Sep 25, 2000 at 01:01:25PM +0200, Axel Simon wrote: > On Mon, 25 Sep 2000, Jose Romildo Malaquias wrote: > > > Is there any Haskell implementation that supports > > extensible data types, in which new value constructors > > can be added to a previously declared data type? > > I think thi

Re: SAX, XML, Haskell

2000-09-25 Thread Ketil Malde
Chris Angus <[EMAIL PROTECTED]> writes: > I was wondering if anyone had thought of making a Sax-like > interface based on lazy evaluation. where tokens are > processed and taken from a (potentially) infinite stream Sure. While barely able to follow discussions about monadic parser combinators

Re: Extensible data types?

2000-09-25 Thread Jose Romildo Malaquias
On Mon, Sep 25, 2000 at 11:37:24AM +0100, Chris Angus wrote: > I've not seen this before, > > out of interest, why would you want/need such a thing? > > > > Is there any Haskell implementation that supports > > extensible data types, in which new value constructors > > can be added to a previous

Re: Extensible data types?

2000-09-25 Thread Axel Simon
On Mon, 25 Sep 2000, Jose Romildo Malaquias wrote: > Is there any Haskell implementation that supports > extensible data types, in which new value constructors > can be added to a previously declared data type? I think this is what the TREX (extensible records) in Hugs are about. Take a look at

Re: Extensible data types?

2000-09-25 Thread Peter Ljunglof
Perhaps the subtyping of O'Haskell is interesting: http://www.cs.chalmers.se/~nordland/ohaskell/ /Peter Ljunglöf On Mon, 25 Sep 2000, Jose Romildo Malaquias wrote: > Is there any Haskell implementation that supports > extensible data types, in which new value constructors > can be added t

Re: Extensible data types?

2000-09-25 Thread S.J.Thompson
Erik Poll ([EMAIL PROTECTED]) did some nice theoretical work on this a couple of years ago. I took a quick look on his web site but couldn't see anything on it there. Maybe he can help? Simon

Extensible data types?

2000-09-25 Thread Jose Romildo Malaquias
Hello. Is there any Haskell implementation that supports extensible data types, in which new value constructors can be added to a previously declared data type, like data Fn = Sum | Pro | Pow ... extend data Fn = Sin | Cos | Tan where first the Fn datatype had only three

If you like Copper

2000-09-25 Thread simondudley2000
If you like copper, you will love DRC Resources: ***

SAX, XML, Haskell

2000-09-25 Thread Chris Angus
Hi, I looked at HaXml a while ago and it seemed to offer a very Dom-like interface. I was wondering if anyone had thought of making a Sax-like interface based on lazy evaluation. where tokens are processed and taken from a (potentially) infinite stream Chris

test

2000-09-25 Thread root
1 2 3