[project @ 1999-03-17 10:06:21 by simonpj]
authorsimonpj <unknown>
Wed, 17 Mar 1999 10:06:22 +0000 (10:06 +0000)
committersimonpj <unknown>
Wed, 17 Mar 1999 10:06:22 +0000 (10:06 +0000)
commitfc7b70afcea572bee42fefd11d7bdd3f6515796b
tree59515d8ed09c8f773e078d18441709bc9db54c63
parent32e46064b303d56296f4d5df3a20aa62e073cc57
[project @ 1999-03-17 10:06:21 by simonpj]
Make it so that Local (i.e. non-top-level) names record
whether they originally came from an interface file.  This
means that when unifying two type variables we can readily
choose one that occurred in the source, rather than one
imported from an interface file.  That in turn improves
compiler error messages.  E.g.

  rd :: (RealFloat a, RealFrac b) => b -> Transformation a
  rd degrees  = r ((degrees / 180.0) * pi)

used to say

    Could not deduce `Floating a'
(arising from use of `pi' at Foo.hs:11)
from the context: (RealFloat a1, RealFrac a)
    Probable cause: missing `Floating a' in type signature for `rd'

[here the 'a' came from the signature for 'pi' in PrelBase;
 the 'a1' is a renamed version of the 'a' in the source pgm]

but now says

    Could not deduce `Floating b'
(arising from use of `pi' at Foo.hs:11)
from the context: (RealFloat a, RealFrac b)
    Probable cause: missing `Floating b' in type signature for `rd'
ghc/compiler/basicTypes/Name.lhs
ghc/compiler/typecheck/TcUnify.lhs