#2296: Functional dependencies error message has no position information
-----------------------------+----------------------------------------------
    Reporter:  NeilMitchell  |        Owner:         
        Type:  bug           |       Status:  new    
    Priority:  normal        |    Milestone:         
   Component:  Compiler      |      Version:  6.8.2  
    Severity:  minor         |   Resolution:         
    Keywords:                |     Testcase:         
Architecture:  Unknown       |           Os:  Unknown
-----------------------------+----------------------------------------------
Comment (by NeilMitchell):

 I just got a very similar error message off slightly different code, which
 gives slightly different information:

 {{{
 E:\Neil\thesis\obj\haskell2/Proof_default.hs:1:0:
     Couldn't match expected type `VarName' against inferred type `Expr'
       Expected type: ([VarName], [Expr])
       Inferred type: ([Expr], [b])
     When using functional dependencies to combine
       Subst (Sat a) ([a], [b]) (Sat b),
         arising from the instance declaration at
 E:\Neil\thesis\obj\haskell2/Pr
 of_default.hs:140:0
       Subst (Sat Expr) ([VarName], [Expr]) (Sat Expr),
         arising from a use of `/'
                      at
 E:\Neil\thesis\obj\haskell2/Proof_default.hs:402:17-43
 }}}

 Here the relevant position is the second one (the use, not the
 definition), so this bug can't just be fixed by grabbing the first
 position out of the list. I've again attached a sample piece of code.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2296#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to