[Haskell-cafe] Fundeps and overlapping instances

AntC anthony_clayden at clear.net.nz
Tue Jun 5 03:06:23 CEST 2012

Simon Peyton-Jones <simonpj <at> microsoft.com> writes:

> | > My take is that we should abandon Fundeps, and concentrate on
> | > introducing overlaps into type functions in a controlled way (what
> | > I've called 'dis- overlapped overlaps'.)
> | 
> | Abandoning fundeps would be a sad day for type-level programming.
> | There are many things other than overlaps that you can do with fundeps
> | and constraint kinds that you cannot currently do with type families,
> | such as:
> | 
> | - Partial application or higher-order programming.
> | - Short-circuit evaluation, lazy evaluation or type-level case.
> Etienne, I think it would be a good service to make Haskell wiki page 
describing the difference between
> fundeps and type families, and in particular describing things that can be 
done with the former but not the latter.
> Simon
+1 That would be great. I'll link to Etienne's wiki from the Discussion page 
I've started for NewAxioms http://hackage.haskell.org/trac/ghc/wiki/NewAxioms

In particular, it would be good to tease out where we're getting interference 
or inter-dependence between different type-level extensions:
    UndecidableInstances (that is, breaking the coverage conditions)

Given that that the Fundeps idea is taken from relational theory, and 
relations is just another way of representing functions, there ought to be 
close correspondence to type-level functions.

To me, NewAxioms is aiming at type-level case, to provide a different style of 
defining type functions, as well as dis-overlapping overlaps.


More information about the Haskell-Cafe mailing list