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
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) --
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
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
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
> 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
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
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