Re: False duplicate or overlapping instances message

2000-10-27 Thread Jeffrey R. Lewis
Simon Peyton-Jones wrote: | I think I've worked out what's going on now. But I don't like it. | When I use -fallow-undecidable-instances and -fallow-overlapping-instances | (as I did) I was assuming (like Keith Wansbrough did) that | GHC would do a Prolog-style backtracking search when it

Re: class instance with nested types

2000-10-27 Thread Lars Lundgren
On Fri, 27 Oct 2000, Matthias Höchsmann wrote: Hello, I have the following problem: basic datatypes type Sequence a = [a] data Tree a = N a (Forest a) deriving (Ord,Eq,Show) type Forest a = Sequence (Tree a) i want to construct a class Xy class Xy s a where test :: s

RE: .net and haskell

2000-10-27 Thread Nigel Perry
At 10:27 am -0700 26/10/00, Simon Peyton-Jones wrote: | I was reading some .net stuff (ducks) on microsoft, and they | mentioned haskell as one of the languages someone was | targetting for it. | Anyone know anything about this project? I know of several stabs in this direction, none completed.

Re: class instance with nested types

2000-10-27 Thread Andreas Rossberg
Matthias Höchsmann wrote: type Sequence a = [a] data Tree a = N a (Forest a) deriving (Ord,Eq,Show) type Forest a = Sequence (Tree a) i want to construct a class Xy class Xy s a where test :: s a - a [...] instance ([] Tree) Char where test x@(N a xs):txs = a To

Re: class instance with nested types

2000-10-27 Thread Andreas Rossberg
I mumbled: This is not a legal type expression, since Tree is a type constructor, not a ground type, so you cannot apply it to the list constructor. The other way round, of course: you cannot apply the list constructor to it. - Andreas -- Andreas Rossberg, [EMAIL PROTECTED] ::

Re: class instance with nested types

2000-10-27 Thread Matthias Höchsmann
Yes, I wanted to type it like you do. But anyway, i fixed the problem following Andreas Rossbergs suggestion. Matthias Don't you mean test (N a xs:txs) = a ? /Lars L ___ Haskell mailing list [EMAIL PROTECTED]

Re: Overloaded function and implicit parameter passing

2000-10-27 Thread Jeffrey R. Lewis
José Romildo Malaquias wrote: Hi. While experimenting with the implicit parameter extension to Haskell 98, implemented in GHC 4.08.1 and latest Hugs, I came accross a difference among those implementations regarding overloading functions with implicit parameters. As a test consider the

Re: Passing an environment around

2000-10-27 Thread José Romildo Malaquias
On Fri, Oct 27, 2000 at 09:07:24AM -0700, Jeffrey R. Lewis wrote: José Romildo Malaquias wrote: On Thu, Oct 19, 2000 at 09:08:16AM -0700, Conal Elliott wrote: Indeed Fran behaviors are like your alternative #1 (function passing), and hence sharing loss is a concern. Simon PJ is right