[project @ 2005-02-25 13:06:31 by simonpj]
authorsimonpj <unknown>
Fri, 25 Feb 2005 13:07:54 +0000 (13:07 +0000)
committersimonpj <unknown>
Fri, 25 Feb 2005 13:07:54 +0000 (13:07 +0000)
commit8e67f5502e2e316245806ee3735a2f41a844b611
tree40de212503410eb38017386da374b89d1d008db4
parentd9fd6a665237f0e2ab769915db873b9d72bd1c0a
[project @ 2005-02-25 13:06:31 by simonpj]
---------------------------------------------
Type signatures are no longer instantiated with skolem constants
---------------------------------------------

Merge to STABLE

Consider

  p :: a
  q :: b
  (p,q,r) = (r,r,p)

Here, 'a' and 'b' end up being the same, because they are both bound
to the type for 'r', which is just a meta type variable.  So 'a' and 'b'
can't be skolems.

Sigh.  This commit goes back to an earlier way of doing things, by
arranging that type signatures get instantiated with *meta* type
variables; then at the end we must check that they have not been
unified with types, nor with each other.

This is a real bore.  I had to do quite a bit of related fiddling around
to make error messages come out right.  Improved one or two.

Also a small unrelated fix to make
:i (:+)
print with parens in ghci.  Sorry this got mixed up in the same commit.
19 files changed:
ghc/compiler/Makefile
ghc/compiler/basicTypes/Id.lhs
ghc/compiler/basicTypes/MkId.lhs
ghc/compiler/basicTypes/Name.lhs
ghc/compiler/basicTypes/OccName.lhs
ghc/compiler/compMan/CompManager.lhs
ghc/compiler/ghci/ByteCodeGen.lhs
ghc/compiler/ghci/InteractiveUI.hs
ghc/compiler/iface/IfaceSyn.lhs
ghc/compiler/iface/IfaceType.lhs
ghc/compiler/typecheck/Inst.lhs
ghc/compiler/typecheck/TcBinds.lhs
ghc/compiler/typecheck/TcEnv.lhs
ghc/compiler/typecheck/TcHsSyn.lhs
ghc/compiler/typecheck/TcMType.lhs
ghc/compiler/typecheck/TcSimplify.lhs
ghc/compiler/typecheck/TcType.lhs
ghc/compiler/typecheck/TcUnify.lhs
ghc/compiler/types/TypeRep.lhs