Chris,
In the inferred type, there should be IxMap l instead of IxMap i,
does anybody know what I'm doing wrong?
Your calls to empty are just ambiguous.
Let's say I want to get a hold of an empty map for A :|: B for some
types A and B. And let's say that you've instance for A hanging
On Sun, Aug 24, 2008 at 1:44 AM, Stefan Holdermans [EMAIL PROTECTED] wrote:
] Your calls to empty are just ambiguous.
Now, you are probably wondering how to fix it. Here's two different solutions:
{-# LANGUAGE TypeFamilies, TypeOperators, ScopedTypeVariables #-}
module Ix where
The first
Hey all,
I was playing around with type families, and I have a strange problem.
Suppose we have an alternative to an Either datatype:
data (:|:) a b = Inl a | Inr b
and a class Ix:
class Ix i where
type IxMap i :: * - *
empty :: IxMap i [Int]
Now I want to give an instance for (a
On Sat, Aug 23, 2008 at 7:55 AM, Chris Eidhof [EMAIL PROTECTED] wrote:
Hey all,
I was playing around with type families, and I have a strange problem.
Suppose we have an alternative to an Either datatype:
data (:|:) a b = Inl a | Inr b
and a class Ix:
class Ix i where
type IxMap i ::