2012/1/16 Yin Wang yinwa...@gmail.com:
The typical example would be
instance Eq a = Eq [a] where
[] == [] = True
(a : as) == (b : bs) = a == b as == bs
_ == _ = False
It can handle this case, although it doesn't handle it as a parametric
instance. I suspect that we don't need the
Yin,
2012/1/14 Yin Wang yinwa...@gmail.com:
On Sat, Jan 14, 2012 at 2:38 PM, Dominique Devriese
dominique.devri...@cs.kuleuven.be wrote:
I may or may not have thought about it. Maybe you can give an example
of parametric instances where there could be problems, so that I can
figure out
The typical example would be
instance Eq a = Eq [a] where
[] == [] = True
(a : as) == (b : bs) = a == b as == bs
_ == _ = False
It can handle this case, although it doesn't handle it as a parametric
instance. I suspect that we don't need the concept of parameter
instances at all. We
Also, you don't seem to have thought about the question of parametric
instances: do you allow them or not, if you do, what computational
power do they get etc.?
I may or may not have thought about it. Maybe you can give an example
of parametric instances where there could be problems, so that
On Sat, Jan 14, 2012 at 2:38 PM, Dominique Devriese
dominique.devri...@cs.kuleuven.be wrote:
I may or may not have thought about it. Maybe you can give an example
of parametric instances where there could be problems, so that I can
figure out whether my system works on the example or not.
The
Yin,
2012/1/12 Yin Wang yinwa...@gmail.com:
I have an idea about type classes that I have been experimenting. It
appears to be a generalization to Haskell’s type classes and seems to
be doable. It seems to related the three ideas: type classes, implicit
parameters, and (typed) dynamic
Hi all,
I have an idea about type classes that I have been experimenting. It
appears to be a generalization to Haskell’s type classes and seems to
be doable. It seems to related the three ideas: type classes, implicit
parameters, and (typed) dynamic scoping. But I don't know whether it
is good or
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 10/29/10 09:35 , Dominique Devriese wrote:
* Only introduce a dependency from type class A to type class B if all
functions in type class B can be implemented in terms of the
functions in type class A or if type class A is empty.
Er? Eq a
Hi all,
I have a problem with the design of the Applicative type class, and
I'm interested to know people's opinion about this.
Currently, the Functor and Applicative type class are defined like this:
class Functor f where
fmap:: (a - b) - f a - f b
class Functor f =
On 29 October 2010 14:35, Dominique Devriese
dominique.devri...@cs.kuleuven.be wrote:
I have a problem with the design of the Applicative type class
Sorry for going a bit off-topic, but every-time I see someone complaining
about such things, I remember this proposal:
10 matches
Mail list logo