Jim Apple wrote:
class MyMap f a b where
myMap :: (a - b) - f a - f b
instance (Functor f) = MyMap f a b where
myMap = fmap
instance (Ord a, Ord b) = MyMap Data.Set.Set a b where
myMap = Data.Set.map
OK (I guess).
But my point was that I want to use
do notation for Sets (in
Claus,
I urge you to read our paper Understanding functional dependencies via
Constraint Handling Rules, which you can find here
http://research.microsoft.com/%7Esimonpj/papers/fd%2Dchr/.
It will tell you more than you want to know about why relaxing
apparently-conservative rules is entirely
Ross Paterson [EMAIL PROTECTED] wrote:
On Wed, Mar 01, 2006 at 08:26:14AM +, Henrik Nilsson wrote:
I'm increasingly convinced that the records should be left alone for
Haskell', possibly modulo some minor tweaks to polish the system.
Yes, no alternative candidate is available
On 28 February 2006 18:42, Jacques Carette wrote:
What *problem* are you actually trying to solve here?
The problem that 'realToFrac (0/0 :: Float) :: Double' doesn't give you
NaN, and similarly for the other special float values.
If it is
conversion between floating point types, then there
On 3/1/06, Johannes Waldmann [EMAIL PROTECTED] wrote:
But my point was that I want to use
do notation for Sets (in fact, for any kind of collection)
so I'd need the original Functor and Monad.
I understand this for Monad. Why not just redefine Functor, Oleg-style?
I couldn't use ghc's
Niklas Broberg wrote:
Ben Rudiak-Gould wrote:
Are there uses of overlapping
instances for which this isn't flexible enough?
Certainly!
Hmm... well, what about at least permitting intra-module overlap in Haskell'
(and in GHC without -foverlapping-instances)? It's good enough for many
Ben Rudiak-Gould wrote:
I think all of these problems would go away if overlap was permitted
within a module but forbidden across modules. Are there uses of
overlapping instances for which this isn't flexible enough?
I dislike this on principle. I like the idea that modules can be
On Tue, Feb 28, 2006 at 07:12:28PM -, Claus Reinke wrote:
Anyway, there is already a ticket for overlapping instances, I think --
why don't you just add to that.
that might work. apart from the fact that I really, really hate the
braindead wiki markup processor, especially when editing
On Thu, Mar 02, 2006 at 03:53:45AM -, Claus Reinke wrote:
- Mul recurses down a type in its second parameter
- types in Haskell are finite
- there is a non-terminating Mul inference
the problem is that we have somehow conjured up an infinite
type for Mul to recurse on without end!