Stylistic question about Haskell optional arguments

1999-08-16 Thread Tommy Thorn
Andy Gill wrote/a ecrit/skrev: > I've got a stylistic question about Haskell. > What's the best way to add optional arguments to a > embedded DSL? > > For example, say I've got an library of HTML combinators. > To represent > > This is a Header > > you might write > > h1 (strin

Wanted: Union-Find library for Haskell

1999-08-16 Thread Keith Wansbrough
Hi all... has anyone implemented the Union-Find algorithm in Haskell? I've looked at the various libraries listed at haskell.org and found nothing, but don't want to re-invent the wheel if someone else has done it already. Thanks. --KW 8-) -- : Keith Wansbrough, MSc, BSc(Hons) (Auckland) --

Re: Stylistic question about Haskell optional arguments

1999-08-16 Thread Paul Hudak
One alternative is to use labelled fields. In your example, if Html were an algebraic datatype such as: > data Html = Type1 { align = Align, ... } > | Type2 { align = Align, ... } > | ... > data Align = Left | Right | Center then instead of: > h1 [align "right"] (stringToH

Re: Stylistic question about Haskell optional arguments

1999-08-16 Thread Andy Gill
Paul Hudak wrote: > > One alternative is to use labelled fields. In your example, if Html > were an algebraic datatype such as: > > > data Html = Type1 { align = Align, ... } > > | Type2 { align = Align, ... } > > | ... > > > data Align = Left | Right | Center > > then ins

Stylistic question about Haskell optional arguments

1999-08-16 Thread Andy Gill
I've got a stylistic question about Haskell. What's the best way to add optional arguments to a embedded DSL? For example, say I've got an library of HTML combinators. To represent This is a Header you might write h1 (stringToHtml "This is a Header") The types of the functions

RE: Wanted: Union-Find library for Haskell

1999-08-16 Thread Fermin Reig Galilea
> Hi all... has anyone implemented the Union-Find algorithm in > Haskell? Hi Keith, I can point you to one written in ML. It comes with MLRISC. ftp://ftp.research.bell-labs.com/dist/smlnj/working/110.20/110.20-MLRISC.tar .Z It's in the library subdirectory. The whole thing is ~600kb. If you

Re: TclHaskell manual woes...

1999-08-16 Thread Keith Wansbrough
I wrote: > Looking forward to a LaTeX or Linuxdoc-DTD version of the > documentation, or at least HTML that passes WebLint and the HTML > validator: I wrote that, and yet sent a message that would surely fail any RFC822-lint program. Sorry about the long lines, everyone... Thanks Matthias f

Compilers on NT

1999-08-16 Thread Ronald J. Legere
I am sorry if this is not the correct group for this, but I have been trying for some time to get a compiler working on NT 4.0 sp 4. I have ghc 4.03 and nhc98. THis is using cygwin b20 (Maybe this is the problem???). nhc98 wont compile, the make file complains about not knowing how to make some