RE: Why isn't this Overlapping?

2017-04-18 Thread Anthony Clayden
> On Tue Apr 18 10:31:30 UTC 2017, Simon Peyton Jones wrote: > > Moreover, as discussed in the user manual section, > GHC doesn’t complain about overlapping instances at the instance decl, > but rather where the instances are used. Thank you Simon, yes I knew that, so I'd written a usage (just did

RE: Why isn't this Overlapping?

2017-04-18 Thread Simon Peyton Jones via Glasgow-haskell-users
verlap complaint here Simon From: Glasgow-haskell-users [mailto:glasgow-haskell-users-boun...@haskell.org] On Behalf Of Iavor Diatchki Sent: 18 April 2017 01:50 To: anthony_clay...@clear.net.nz Cc: GHC Users Mailing List Subject: Re: Why isn't this Overlapping? Hello, these two instances reall

Re: Why isn't this Overlapping?

2017-04-17 Thread Anthony Clayden
> On Tue Apr 18 00:50:20 UTC 2017, Iavor Diatchki wrote: > > these two instances really should be rejected as they > violate the FD of the class: we can derive `TypeEq a a > True` using the first instance and `TypeEq a a False` > using the second one. Unfortunately, the check that we > are using

Re: Why isn't this Overlapping?

2017-04-17 Thread Iavor Diatchki
Hello, these two instances really should be rejected as they violate the FD of the class: we can derive `TypeEq a a True` using the first instance and `TypeEq a a False` using the second one. Unfortunately, the check that we are using to validate FDs when `UndecidableInstances` is on, is not quit

Why isn't this Overlapping?

2017-04-16 Thread Anthony Clayden
--ghc 7.10 or 8.0.1 {-# LANGUAGE DataKinds, KindSignatures, GADTs, MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances, UndecidableInstances, NoOverlappingInstances #-} class TypeEq a a' (b :: Bool) | a a' -> b instance (b ~ True