Re: Data types basics

2003-11-04 Thread Patty Fong
Another prompt reply! thanks Hal :) I think I understand this correctly now For my previous problem which was: ::= ( ".")* :: = | ::= ":-" ("," )* ::= [“(“ (“,” )* “)”] ::= | | ::= Does this appear to be correct: type Prolog = [Assertion] data Assertion = StrucAssert Structure | Rul

Re: Data types basics

2003-11-04 Thread Hal Daume III
Hi again, On Wed, 5 Nov 2003, Patty Fong wrote: > Hi to anyone reading this. i'm still strugling a bit with data type > declarations. > > The was i understand it is that if i delcare a new data type: > > data myType = myType a | b | c This isn't entirely correct. The names of types have to be

Data types basics

2003-11-04 Thread Patty Fong
Hi to anyone reading this. i'm still strugling a bit with data type declarations. The was i understand it is that if i delcare a new data type: data myType = myType a | b | c The constructor is of type a -> myType. can it also be of type b -> myType, or c -> myType ? What I am reall strugling to u

Re: Type tree traversals [Re: Modeling multiple inheritance]

2003-11-04 Thread oleg
Hello! Let me describe (my understanding of) the problem first. Let us assume a Java-like OO language, but with multiple inheritance. Let us consider the following hierarchy: Object -- the root of the hierarchy ClassA: inherits from Object defines method Foo::Int -> B

RE: Type tree traversals [Re: Modeling multiple inheritance]

2003-11-04 Thread Brandon Michael Moore
On Tue, 4 Nov 2003, Simon Peyton-Jones wrote: > > | We really should change GHC rather than keep trying to work around > stuff > | like this. GHC will be my light reading for winter break. > > Maybe so. For the benefit of those of us who have not followed the > details of your work, could you sum

AW: AW: Heap profiling in GHC broken?

2003-11-04 Thread Markus . Schnell
> The canonical tutorial paper is in the Advanced Functional Programming > Summer Schools series: > > C. Runciman and N. Ro"jemo. Heap profiling for space efficiency. > In J. Launchbury, E. Meijer, and T. Sheard, editors, 2nd > Intl. School > on Advanced Functional Programming, pages

Re: AW: Heap profiling in GHC broken?

2003-11-04 Thread Malcolm Wallace
> > A tutorial on this by one of the experts would be very welcome. > > The people at York University have written some great papers on this topic. The canonical tutorial paper is in the Advanced Functional Programming Summer Schools series: C. Runciman and N. Ro"jemo. Heap profiling for sp

Re: AW: Heap profiling in GHC broken?

2003-11-04 Thread Alastair Reid
> A tutorial on this by one of the experts would be very welcome. The people at York University have written some great papers on this topic. I especially remember one presented at the Glasgow Functional Programming workshop by Colin Runciman about 8-10 years ago. In the draft proceedings or

AW: Heap profiling in GHC broken?

2003-11-04 Thread Markus . Schnell
I have no idea how to set up cvs under windows to get things from a non-local repository, but anyway, profiling worked on the macintosh. I spent the whole weekend plus monday to find the space leak, but eventually I did. Heap Profiling was very helpful there. Unfortunately, space leaks are bar

Re: Data representation, maybe reflection, laziness

2003-11-04 Thread Frank Atanassow
On dinsdag, nov 4, 2003, at 00:39 Europe/Amsterdam, Frank Atanassow wrote: For example, our translator takes the Schema type doc (representing a bibliographic entry) ... to a certain ugly datatype X. Oops. For "X" I should have written E_doc, that is, the translation of Schema type "doc" is na

Re: Data representation, maybe reflection, laziness

2003-11-04 Thread Frank Atanassow
On vrijdag, okt 31, 2003, at 21:06 Europe/Amsterdam, Mark Carroll wrote: Ralf Hinze and Simon Peyton-Jones wrote an interesting paper on generic programming and derivable type classes. It looked like maybe programmers would be able to write their own "deriving xml" stuff and whatever, which looke

RE: Type tree traversals [Re: Modeling multiple inheritance]

2003-11-04 Thread Simon Peyton-Jones
| We really should change GHC rather than keep trying to work around stuff | like this. GHC will be my light reading for winter break. Maybe so. For the benefit of those of us who have not followed the details of your work, could you summarise, as precisely as possible, just what language extens