[GHC] #10338: GHC Forgets Constraints
GHC
ghc-devs at haskell.org
Thu Apr 23 18:21:44 UTC 2015
#10338: GHC Forgets Constraints
-------------------------------------+-------------------------------------
Reporter: crockeea | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.8.3
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: None/Unknown | Unknown/Multiple
Blocked By: | Test Case:
Related Tickets: | Blocking:
| Differential Revisions:
-------------------------------------+-------------------------------------
Comment (by rwbarton):
The fact that the binding of `fromScalar'` is a local one is not actually
important here: the program with
{{{
instance (Functor t, Num r) => T t r
fromScalar' a = fromScalar a -- or turn on NoMonomorphismRestriction
convert :: (T t (F r))
=> Foo t r -> Foo t r
convert (Scalar c) =
Foo $ fromScalar' $ toF c
}}}
also gives the error about "Could not deduce (Num (F r)) arising from a
use of ‘fromScalar'’".
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10338#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list