Opened 6 years ago

Closed 6 years ago

#2876 closed bug (worksforme)

Inconsistent error message

Reported by: guest Owned by:
Priority: normal Milestone:
Component: Compiler Version: 6.10.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

Most error messages mention language extensions needed, this one mentions a deprectaed flag:

    Illegal instance declaration for `...'
        (the Coverage Condition fails for one of the functional dependencies;
         Use -fallow-undecidable-instances to permit this)

It should instead mention -XUndecidableInstances.

Change History (1)

comment:1 Changed 6 years ago by simonpj

  • Difficulty set to Unknown
  • Resolution set to worksforme
  • Status changed from new to closed

This looks ok to me in the 6.10 branch sources, and when running GHC 6.10.1 on this program

{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances #-}
module Foo where

class C a b | a->b

instance C [a] d

I get

bash-3.2$ ghc -c Foo.hs

Foo.hs:6:0:
    Illegal instance declaration for `C [a] d'
        (the Coverage Condition fails for one of the functional dependencies;
         Use -XUndecidableInstances to permit this)
    In the instance declaration for `C [a] d'

Are you sure you are using 6.10? If so, re-open this bug with more info. Thanks.

Simon

Note: See TracTickets for help on using tickets.