Hi all,
This email is literate Haskell. I'm trying to use type families to
express some dependencies between type classes, and I'm running into
trouble, I think because I'm producing chains of dependencies which
the checker can't resolve... Here's a minimised version of the state
I've got
On Fri, Nov 13, 2009 at 3:26 PM, Andy Gimblett hask...@gimbo.org.uk wrote:
First a type family where the type Y is functionally dependent on
the type X, and we have a function from Y to ().
class X a where
type Y a
enact :: Y a - ()
This is ambiguous. Type families are not injective
Ack. I've just realised that P/Q is not a functional dependency. I
need to use a multi-parameter type class there. So my question is
probably completely pointless - sorry!
Thanks anyway,
-Andy
On 13 Nov 2009, at 20:26, Andy Gimblett wrote:
Hi all,
This email is literate Haskell. I'm
Am Freitag 13 November 2009 21:36:59 schrieb David Menendez:
On Fri, Nov 13, 2009 at 3:26 PM, Andy Gimblett hask...@gimbo.org.uk wrote:
First a type family where the type Y is functionally dependent on
the type X, and we have a function from Y to ().
class X a where
type Y a
enact
Hahaha, this is what I get for trying to think about Haskell on a
Friday night. Now I think it _is_ a functional dependency after all.
Who knows how long it will be before I change my mind again? :-)
I shall think about this more carefully tomorrow...
Thanks again,
-Andy
On 13 Nov 2009,
On Fri, Nov 13, 2009 at 4:00 PM, Daniel Fischer
daniel.is.fisc...@web.de wrote:
Am Freitag 13 November 2009 21:36:59 schrieb David Menendez:
I recall seeing a discussion of this in the GHC documentation, but I
can't seem to locate it.
Perhaps
On Fri, Nov 13, 2009 at 3:36 PM, David Menendez d...@zednenem.com wrote:
On Fri, Nov 13, 2009 at 3:26 PM, Andy Gimblett hask...@gimbo.org.uk
wrote:
First a type family where the type Y is functionally dependent on
the type X, and we have a function from Y to ().
class X a where
type