[Haskell-cafe] Resolving overloading loops for circular constraint graph

2009-09-09 Thread Stefan Holdermans
Manuel, Simon, I've spotted a hopefully small but for us quite annoying bug in GHC's type checker: it loops when overloading resolving involves a circular constraint graph containing type-family applications. The following program (also attached) demonstrates the problem: {-# LANGUAGE

Re: [Haskell-cafe] Resolving overloading loops for circular constraint graph

2009-09-09 Thread Martin Sulzmann
Your example must loop because as you show below the instance declaration leads to a cycle. By black-holing you probably mean co-induction. That is, if the statement to proven appears again, we assume it must hold. However, type classes are by default inductive, so there's no easy fix to offer to

Re: [Haskell-cafe] Resolving overloading loops for circular constraint graph

2009-09-09 Thread Stefan Holdermans
Dear Martin, Your example must loop because as you show below the instance declaration leads to a cycle. By black-holing you probably mean co-induction. That is, if the statement to proven appears again, we assume it must hold. However, type classes are by default inductive, so there's no