[project @ 1999-07-15 14:08:03 by keithw]
authorkeithw <unknown>
Thu, 15 Jul 1999 14:08:50 +0000 (14:08 +0000)
committerkeithw <unknown>
Thu, 15 Jul 1999 14:08:50 +0000 (14:08 +0000)
commit9d787ef5a8072b6c1f576f2de1b66edfa59813ed
tree21041d32d5a973988ed1c8f34d89c0afc5e0ad2b
parent5c60f4ca21334fa8b6324423b70ae044e5ad5bf9
[project @ 1999-07-15 14:08:03 by keithw]
This commit makes a start at implementing polymorphic usage
annotations.

* The module Type has now been split into TypeRep, containing the
  representation Type(..) and other information for `friends' only,
  and Type, providing the public interface to Type.  Due to a bug in
  the interface-file slurping prior to ghc-4.04, {-# SOURCE #-}
  dependencies must unfortunately still refer to TypeRep even though
  they are not friends.

* Unfoldings in interface files now print as __U instead of __u.
  UpdateInfo now prints as __UA instead of __U.

* A new sort of variables, UVar, in their own namespace, uvName, has
  been introduced for usage variables.

* Usage binders __fuall uv have been introduced.  Usage annotations
  are now __u - ty (used once), __u ! ty (used possibly many times),
  __u uv ty (used uv times), where uv is a UVar.  __o and __m have
  gone.  All this still lives only in a TyNote, *for now* (but not for
  much longer).

* Variance calculation for TyCons has moved from
  typecheck/TcTyClsDecls to types/Variance.

* Usage annotation and inference are now done together in a single
  pass.  Provision has been made for inferring polymorphic usage
  annotations (with __fuall) but this has not yet been implemented.
  Watch this space!
50 files changed:
ghc/compiler/basicTypes/DataCon.hi-boot
ghc/compiler/basicTypes/DataCon.hi-boot-5
ghc/compiler/basicTypes/FieldLabel.lhs
ghc/compiler/basicTypes/IdInfo.lhs
ghc/compiler/basicTypes/MkId.lhs
ghc/compiler/basicTypes/OccName.lhs
ghc/compiler/basicTypes/Var.lhs
ghc/compiler/basicTypes/VarEnv.lhs
ghc/compiler/basicTypes/VarSet.lhs
ghc/compiler/coreSyn/CoreLint.lhs
ghc/compiler/coreSyn/CoreUtils.lhs
ghc/compiler/coreSyn/Subst.hi-boot
ghc/compiler/coreSyn/Subst.hi-boot-5
ghc/compiler/coreSyn/Subst.lhs
ghc/compiler/cprAnalysis/CprAnalyse.lhs
ghc/compiler/deSugar/DsForeign.lhs
ghc/compiler/deSugar/DsUtils.lhs
ghc/compiler/hsSyn/HsTypes.lhs
ghc/compiler/main/CmdLineOpts.lhs
ghc/compiler/main/MkIface.lhs
ghc/compiler/parser/Lex.lhs
ghc/compiler/parser/RdrHsSyn.lhs
ghc/compiler/rename/ParseIface.y
ghc/compiler/rename/RnEnv.lhs
ghc/compiler/rename/RnHsSyn.lhs
ghc/compiler/rename/RnSource.lhs
ghc/compiler/stgSyn/CoreToStg.lhs
ghc/compiler/stranal/WwLib.lhs
ghc/compiler/typecheck/TcEnv.lhs
ghc/compiler/typecheck/TcIfaceSig.lhs
ghc/compiler/typecheck/TcMonoType.lhs
ghc/compiler/typecheck/TcTyClsDecls.lhs
ghc/compiler/typecheck/TcType.lhs
ghc/compiler/typecheck/TcUnify.lhs
ghc/compiler/types/Class.lhs
ghc/compiler/types/PprType.hi-boot
ghc/compiler/types/PprType.hi-boot-5
ghc/compiler/types/PprType.lhs
ghc/compiler/types/TyCon.lhs
ghc/compiler/types/Type.hi-boot [deleted file]
ghc/compiler/types/Type.hi-boot-5 [deleted file]
ghc/compiler/types/Type.lhs
ghc/compiler/types/TypeRep.hi-boot [new file with mode: 0644]
ghc/compiler/types/TypeRep.hi-boot-5 [new file with mode: 0644]
ghc/compiler/types/TypeRep.lhs [new file with mode: 0644]
ghc/compiler/types/Unify.lhs
ghc/compiler/types/Variance.lhs [new file with mode: 0644]
ghc/compiler/usageSP/UsageSPInf.lhs
ghc/compiler/usageSP/UsageSPLint.lhs
ghc/compiler/usageSP/UsageSPUtils.lhs