Re: Is it time to start deprecating FunDeps?

2013-05-01 Thread Martin Sulzmann
(1) There's a mechanical way to translate FD programs with non-overlapping instances to TF (and of course vice versa). For example, let's reconsider Oleg's example. {-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts #-}

Re: Is it time to start deprecating FunDeps?

2013-05-01 Thread Martin Sulzmann
Comments see below. On Wed, May 1, 2013 at 11:13 AM, AntC anthony_clay...@clear.net.nz wrote: Martin Sulzmann martin.sulzmann@... writes: (1) There's a mechanical way to translate FD programs with non-overlapping instances to TF (and of course vice versa). Martin, no! no! no! You have

Re: Haskell' - class aliases

2008-05-02 Thread Martin Sulzmann
Any chance to express this in terms of a formal (constraint rewrite framework). For example, the Haskell rule, do *not* display implied superclasses, can be specified as follows. Consider the special case of class Eq a class Eq a = Ord a Eq a, Ord a = Ord a The above rule only applies

Re: termination for FDs and ATs

2006-05-05 Thread Martin Sulzmann
Ross Paterson writes: On Fri, May 05, 2006 at 08:42:12AM +0100, Simon Peyton-Jones wrote: Alas, g simply discards its argument, so there are no further constraints on 'a'. I think Martin would argue that type inference should succeed with a=Bool, since there is exactly one solution.

Re: termination for FDs and ATs

2006-05-01 Thread Martin Sulzmann
Ross Paterson writes: Thanks for clarifying this. On Sat, Apr 29, 2006 at 05:49:16PM -0400, Manuel M T Chakravarty wrote: So, we get the following type for f f :: (Mul a b, [Result a b] = b) = Bool - a - b - [Result a b] Given the instance definitions of that example, you

Re: termination for FDs and ATs

2006-05-01 Thread Martin Sulzmann
Manuel M T Chakravarty writes: Martin Sulzmann: A problem with ATs at the moment is that some terminating FD programs result into non-terminating AT programs. Somebody asked how to write the MonadReader class with ATs: http://www.haskell.org//pipermail/haskell-cafe/2006-February

Re: termination for FDs and ATs

2006-04-27 Thread Martin Sulzmann
Ross Paterson writes: On Thu, Apr 27, 2006 at 12:40:47PM +0800, Martin Sulzmann wrote: Yes, FDs and ATs have the exact same problems when it comes to termination. The difference is that ATs impose a dynamic check (the occurs check) when performing type inference (fyi, such a dynamic

termination for FDs and ATs

2006-04-26 Thread Martin Sulzmann
Yes, FDs and ATs have the exact same problems when it comes to termination. The difference is that ATs impose a dynamic check (the occurs check) when performing type inference (fyi, such a dynamic check is sketched in a TR version of the FD-CHR paper). A problem with ATs at the moment is that

FDs and confluence

2006-04-10 Thread Martin Sulzmann
Ross Paterson writes: (see the FunctionalDependencies page for background omitted here) One of the problems with the relaxed coverage condition implemented by GHC and Hugs is a loss of confluence. Here is a slightly cut-down version of Ex. 18 from the FD-CHR paper: class B a

RE: MPTCs and functional dependencies

2006-04-09 Thread Martin Sulzmann
Manuel M T Chakravarty writes: Simon Peyton-Jones: My current take, FWIW. [...] Tentative conclusion: H' should have MPTC + FDs, but not ATs. My conclusion is that we should not include FDs or ATs into the standard at the moment. Standardising FDs as a stopgap measure may

Re: Re[2]: the MPTC Dilemma (please solve)

2006-03-19 Thread Martin Sulzmann
out before any AT program can be encoded with FDs but the other direction does not hold necessarily. See the above paper for details. Manuel M T Chakravarty writes: From: Martin Sulzmann [EMAIL PROTECTED] Subject: MPTC/FD dilemma

Re: partial type signatures/annotations/declarations..

2006-03-07 Thread Martin Sulzmann
FYI, Chameleon supports a combination of lexically scoped and partial type annotation. The latest Chameleon version is a broken (fix on its way). Though, besides the implementation there's also a concise formal description. See [July 2005] Lexically Scoped Type Annotations

Re: the MPTC Dilemma (please solve)

2006-02-21 Thread Martin Sulzmann
to unrestricted type class programming CHRs are the way to go. CHRs have a clean semantic meaning and precisely explain the meaning of type class programs. Martin Claus Reinke writes: I'm forwarding an email that Martin Sulzmann asked me to post on his behalf. thanks. well, that is one view