On 18-Aug-1999, Michael Hobbs <[EMAIL PROTECTED]> wrote:
> What I would like to do is have a function that takes a list of
> "objects", where the objects are all instances of a particular class,
> but not necessarily the same type. Example:
>
> class Shape a where
> extent :: a -> Point
> ...
Fri, 20 Aug 1999 02:59:09 +1000, Bob Howard <[EMAIL PROTECTED]> pisze:
> data BTree Integer = Leaf Integer | Node Integer (BTree Integer) (BTree Integer)
Write either
data BTree a = Leaf a | Node a (BTree a) (BTree a)
or
data BTree = Leaf Integer | Node Integer BTree BTree
depending on what
On 20 Aug, Bob Howard wrote:
> data BTree Integer = Leaf Integer | Node Integer (BTree Integer) (BTree Integer)
^
this ought to be a type variable name, but you've put the
name of a type.
> mkTree :: Integer -> BTree
^ arg
On Fri, 20 Aug 1999, Bob Howard wrote:
> data Tree a = Leaf a | Branch (Tree a) (Tree a)
> Branch :: Tree a -> Tree a -> Tree a
> Leaf :: a -> Tree a
>
> Im just learning haskell and I cant seem to figure out what is wrong with the above
>code.
> Im using Hugs98 as in interperator (sp) and I ke
On Thu, 19 Aug 1999, S. Alexander Jacobson wrote:
> Mark,
>
> Out of curiosity, how big is the user community? How many downloads of
> the software? How many are on this list? If you figure that 1 user in
> 1000 is actually going to contribute a useful change each month (that is
> probably
I have something similar to
> class (Eq a) => Substitutable a where
> match :: a -> a -> Maybe (Substitution a)
> applySubst :: Substitution a -> a -> a
and two Types Type1, Type2, both of which are instances of class
Substitutable. In some places there is a sigma :: Substitution Type1
(or a
,,Fast, Multi Layout Pretty
Printing Combinators
(Updated: Aug-19-1999)
I have placed a completely new version of our parser combinators on the
net at http://www.cs.uu.nl/groups/ST/Software/PP/
Why would you like to use these Combinators?
Have you always been intrigued by Prett
,,AFP3 Proceedings
You may not have noticed, but Springer has published
the proceedings of the AFP3:
,,@book{AFP3,
author= {Doaitse Swierstra and Pedro Henriques and Jos\'{e}
Oliveira},
title = {Advanced Functional Programming, Third International
School
Mark,
Out of curiosity, how big is the user community? How many downloads of
the software? How many are on this list? If you figure that 1 user in
1000 is actually going to contribute a useful change each month (that is
probably optimistic), the slow flow of changes isn't that surprising.
A
> "Marko" == Marko Schuetz <[EMAIL PROTECTED]> writes:
> "Andy" == Andy Gill <[EMAIL PROTECTED]> writes:
Andy> instance (HTML a) => HTML ([HtmlAttr] -> a) where
Andy> html f = html (f [])
Marko> Wouldn't
>> instance (HTML b, MonadPlus a) => HTML (a -> b) where
>> html f = html (f mzero
Hi Alex,
| Out of curiosity, how big is the user community? How many downloads of
| the software? How many are on this list?
I don't know the answers to any of these, but I think you're implying
"very small", and I'm sure you're right. Perhaps you're also suggesting
that our community is too
> Whatever happened to the auto-import of java classes?
That's what I am supposed to be working on while Sigbjorn is enjoying the fjords. We
have a nasty bug having to do with the (what we thought as) clever way of representing
JNI objects in Haskell. There is an elegant solution using implici
> Ok my last post was a bit of a silly question on my behalf, but this
> has be stumped.
>
> data BTree Integer
> = Leaf Integer | Node Integer (BTree Integer) (BTree Integer)
> mkTree :: Integer -> BTree
> mkTree 0 = Leaf 0
> mkTree int = Node int (mkTree (int - 1)) (mkTree (int -1))
>
>
> And, as a practical step, writing libraries seems like
> an excellent way to get involved --- especially if they're useable with
> multiple implementations.
I can reveal a little secret (Sigbjorn is far away in the Norwegian woods :-) namely
that soon H/Direct will directly support .h files, w
> Bob Howard wrote:
>
> Ok my last post was a bit of a silly question on my behalf, but this
> has be stumped.
>
> data BTree Integer = Leaf Integer | Node Integer (BTree Integer)
> (BTree Integer)
> mkTree :: Integer -> BTree
> mkTree 0 = Leaf 0
> mkTree int = Node int (mkTree (int - 1)) (mkTre
> "Andy" == Andy Gill <[EMAIL PROTECTED]> writes:
Andy> instance (HTML a) => HTML ([HtmlAttr] -> a) where
Andy> html f = html (f [])
Wouldn't
> instance (HTML b, MonadPlus a) => HTML (a -> b) where
> html f = html (f mzero)
work as well?
Marko
--
Marko Schütz[EMAIL P
Thu, 19 Aug 1999 19:08:49 +1000, Fergus Henderson <[EMAIL PROTECTED]> pisze:
> > The problem with this is that the caller of `biggest' needs to call
> > `mkShape' on each element in the list before it can construct the list.
> > Not _bad_, but rather unwieldy. The caller can't simply use `map' ei
| Actually, I have fond memories of Algol compilers that gave error
| messages pretty much as comprehensible as those above. I guess the
| problem is that Haskell compilers are prepared by people who have more
| pressing tasks than repeating old work on user friendly error messages
| :-(
Jon's c
Do the Haskell compilers contain the parts written not in Haskell?
--
Sergey Mechveliani
[EMAIL PROTECTED]
| Ok my last post was a bit of a silly question on my behalf, but this
| has be stumped.
|
| data BTree Integer = Leaf Integer | Node Integer (BTree Integer) (BTree Integer)
| ...
| can anyone tell me why I get this error when I compile this.
| ERROR "Btree.hs" (line 2): Illegal left hand side i
Hi Marko,
| I have something similar to
|
| > class (Eq a) => Substitutable a where
| > match :: a -> a -> Maybe (Substitution a)
| > applySubst :: Substitution a -> a -> a
|
| and two Types Type1, Type2, both of which are instances of class
| Substitutable. ... but defining
|
| > instance S
21 matches
Mail list logo