On Saturday 18 September 2010 8:27:45 am Gábor Lehel wrote:
> Hmm. I had a similar thought, but dismissed it because I was under the
> impression that you needed to use all the parameters of the class as
> parameters of its associated types. But apparently that was mistaken
> -- or, at least, your
On Fri, Sep 17, 2010 at 10:19 PM, Dan Doel wrote:
> On Friday 17 September 2010 4:04:26 pm Gábor Lehel wrote:
>> What I would *want* to write is this:
>>
>> class (Mutable (Thawed a), Frozen (Thawed a) ~ a) => Immutable a where
>> type Thawed a :: *
>> thaw :: a -> Thawed a
>>
>> class (Im
On Friday 17 September 2010 4:04:26 pm Gábor Lehel wrote:
> What I would *want* to write is this:
>
> class (Mutable (Thawed a), Frozen (Thawed a) ~ a) => Immutable a where
> type Thawed a :: *
> thaw :: a -> Thawed a
>
> class (Immutable (Frozen a), Thawed (Frozen a) ~ a) => Mutable a wh
Now that the new typechecking awesomeness has been committed to GHC
HEAD, theoretically all of the things one can express with
FunctionalDependencies (bar overlap) should now be expressible with
TypeFamilies as well. This got me to thinking how this might actually
be done.
Here's an example of a