1. 19 Dec, 2000 3 commits
  2. 07 Dec, 2000 1 commit
  3. 30 Nov, 2000 1 commit
    • simonpj's avatar
      [project @ 2000-11-30 15:46:01 by simonpj] · 28561da9
      simonpj authored
      Make the tests for -fglasgow-exts apply only to source code.
        If you merely import a module that uses (say) multi-parameter
        type classes internally, you shouldn't need -fglasgow-exts.
      
        There were surprisingly few places to change.
      28561da9
  4. 27 Nov, 2000 1 commit
  5. 24 Nov, 2000 1 commit
    • simonpj's avatar
      [project @ 2000-11-24 17:02:01 by simonpj] · 83eef621
      simonpj authored
      1. Make the new version machinery work.
         I think it does now!
      
      2. Consequence of (1): Move the generation of
         default method names to one place (namely
         in RdrHsSyn.mkClassOpSigDM
      
      3. Major clean up on HsDecls.TyClDecl
         These big constructors should have been records
         ages ago, and they are now.  At last.
      83eef621
  6. 10 Nov, 2000 1 commit
    • simonpj's avatar
      [project @ 2000-11-10 15:12:50 by simonpj] · f23ba2b2
      simonpj authored
      1.	Outputable.PprStyle now carries a bit more information
      	In particular, the printing style tells whether to print
      	a name in unqualified form.  This used to be embedded in
      	a Name, but since Names now outlive a single compilation unit,
      	that's no longer appropriate.
      
      	So now the print-unqualified predicate is passed in the printing
      	style, not embedded in the Name.
      
         2.	I tidied up HscMain a little.  Many of the showPass messages
      	have migraged into the repective pass drivers
      f23ba2b2
  7. 07 Nov, 2000 1 commit
  8. 01 Nov, 2000 1 commit
    • simonpj's avatar
      [project @ 2000-11-01 17:15:28 by simonpj] · 2ffefc1b
      simonpj authored
      More renamer commits
      
      Versioning now works properly I think.
      
      The main irritation is that interface files now have fuly-qualified names for
      *everything*, even things defined in that module.  This is a deficiency in
      the pretty printing for interface files.  Probable solution: add something
      to the SDoc styles.  But not today.
      2ffefc1b
  9. 31 Oct, 2000 2 commits
  10. 30 Oct, 2000 1 commit
  11. 25 Oct, 2000 2 commits
  12. 24 Oct, 2000 3 commits
  13. 19 Oct, 2000 1 commit
  14. 11 Oct, 2000 1 commit
  15. 03 Oct, 2000 1 commit
    • simonpj's avatar
      [project @ 2000-10-03 08:43:00 by simonpj] · 710e2074
      simonpj authored
      --------------------------------------
      	Adding generics		SLPJ Oct 2000
      	--------------------------------------
      
      This big commit adds Hinze/PJ-style generic class definitions, based
      on work by Andrei Serjantov.  For example:
      
        class Bin a where
          toBin   :: a -> [Int]
          fromBin :: [Int] -> (a, [Int])
      
          toBin {| Unit |}    Unit	  = []
          toBin {| a :+: b |} (Inl x)   = 0 : toBin x
          toBin {| a :+: b |} (Inr y)   = 1 : toBin y
          toBin {| a :*: b |} (x :*: y) = toBin x ++ toBin y
      
      
          fromBin {| Unit |}    bs      = (Unit, bs)
          fromBin {| a :+: b |} (0:bs)  = (Inl x, bs')    where (x,bs') = fromBin bs
          fromBin {| a :+: b |} (1:bs)  = (Inr y, bs')    where (y,bs') = fromBin bs
          fromBin {| a :*: b |} bs  	  = (x :*: y, bs'') where (x,bs' ) = fromBin bs
      							  (y,bs'') = fromBin bs'
      
      Now we can say simply
      
        instance Bin a => Bin [a]
      
      and the compiler will derive the appropriate code automatically.
      
      		(About 9k lines of diffs.  Ha!)
      
      
      Generic related things
      ~~~~~~~~~~~~~~~~~~~~~~
      
      * basicTypes/BasicTypes: The EP type (embedding-projection pairs)
      
      * types/TyCon:
      	An extra field in an algebraic tycon (genInfo)
      
      * types/Class, and hsSyn/HsBinds:
      	Each class op (or ClassOpSig) carries information about whether
      	it  	a) has no default method
      		b) has a polymorphic default method
      		c) has a generic default method
      	There's a new data type for this: Class.DefMeth
      
      * types/Generics:
      	A new module containing good chunk of the generic-related code
      	It has a .hi-boot file (alas).
      
      * typecheck/TcInstDcls, typecheck/TcClassDcl:
      	Most of the rest of the generics-related code
      
      * hsSyn/HsTypes:
      	New infix type form to allow types of the form
      		data a :+: b = Inl a | Inr b
      
      * parser/Parser.y, Lex.lhs, rename/ParseIface.y:
      	Deal with the new syntax
      
      * prelude/TysPrim, TysWiredIn:
      	Need to generate generic stuff for the wired-in TyCons
      
      * rename/RnSource RnBinds:
      	A rather gruesome hack to deal with scoping of type variables
      	from a generic patterns.  Details commented in the ClassDecl
      	case of RnSource.rnDecl.
      
      	Of course, there are many minor renamer consequences of the
      	other changes above.
      
      * lib/std/PrelBase.lhs
      	Data type declarations for Unit, :+:, :*:
      
      
      Slightly unrelated housekeeping
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      * hsSyn/HsDecls:
      	ClassDecls now carry the Names for their implied declarations
      	(superclass selectors, tycon, etc) in a list, rather than
      	laid out one by one.  This simplifies code between the parser
      	and the type checker.
      
      * prelude/PrelNames, TysWiredIn:
      	All the RdrNames are now together in PrelNames.
      
      * utils/ListSetOps:
      	Add finite mappings based on equality and association lists (Assoc a b)
      	Move stuff from List.lhs that is related
      710e2074
  16. 28 Sep, 2000 1 commit
    • simonpj's avatar
      [project @ 2000-09-28 13:04:14 by simonpj] · 861e836e
      simonpj authored
      ------------------------------------
      	   Mainly PredTypes (28 Sept 00)
      	------------------------------------
      
      Three things in this commit:
      
      	1.  Main thing: tidy up PredTypes
      	2.  Move all Keys into PrelNames
      	3.  Check for unboxed tuples in function args
      
      1. Tidy up PredTypes
      ~~~~~~~~~~~~~~~~~~~~
      The main thing in this commit is to modify the representation of Types
      so that they are a (much) better for the qualified-type world.  This
      should simplify Jeff's life as he proceeds with implicit parameters
      and functional dependencies.  In particular, PredType, introduced by
      Jeff, is now blessed and dignified with a place in TypeRep.lhs:
      
      	data PredType  = Class  Class [Type]
      		       | IParam Name  Type
      
      Consider these examples:
      	f :: (Eq a) => a -> Int
      	g :: (?x :: Int -> Int) => a -> Int
      	h :: (r\l) => {r} => {l::Int | r}
      
      Here the "Eq a" and "?x :: Int -> Int" and "r\l" are all called
      *predicates*, and are represented by a PredType.  (We don't support
      TREX records yet, but the setup is designed to expand to allow them.)
      
      In addition, Type gains an extra constructor:
      
      	data Type = .... | PredTy PredType
      
      so that PredType is injected directly into Type.  So the type
      	p => t
      is represented by
      	PredType p `FunTy` t
      
      I have deleted the hackish IPNote stuff; predicates are dealt with entirely
      through PredTys, not through NoteTy at all.
      
      
      2.  Move Keys into PrelNames
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      This is just a housekeeping operation. I've moved all the pre-assigned Uniques
      (aka Keys) from Unique.lhs into PrelNames.lhs.  I've also moved knowKeyRdrNames
      from PrelInfo down into PrelNames.  This localises in PrelNames lots of stuff
      about predefined names.  Previously one had to alter three files to add one,
      now only one.
      
      3.  Unboxed tuples
      ~~~~~~~~~~~~~~~~~~
      Add a static check for unboxed tuple arguments.  E.g.
      	data T = T (# Int, Int #)
      is illegal
      861e836e
  17. 22 Sep, 2000 1 commit
    • simonpj's avatar
      [project @ 2000-09-22 15:56:12 by simonpj] · 1bba522f
      simonpj authored
      --------------------------------------------------
      	Tidying up HsLit, and making it possible to define
      		your own numeric library
      
      		Simon PJ 22 Sept 00
      	--------------------------------------------------
      
      ** NOTE: I did these changes on the aeroplane.  They should compile,
      	 and the Prelude still compiles OK, but it's entirely 
      	 possible that I've broken something
      
      The original reason for this many-file but rather shallow
      commit is that it's impossible in Haskell to write your own
      numeric library.  Why?  Because when you say '1' you get 
      (Prelude.fromInteger 1), regardless of what you hide from the
      Prelude, or import from other libraries you have written.  So the
      idea is to extend the -fno-implicit-prelude flag so that 
      in addition to no importing the Prelude, you can rebind 
      	fromInteger	-- Applied to literal constants
      	fromRational	-- Ditto
      	negate		-- Invoked by the syntax (-x)
      	the (-) used when desugaring n+k patterns
      
      After toying with other designs, I eventually settled on a simple,
      crude one: rather than adding a new flag, I just extended the
      semantics of -fno-implicit-prelude so that uses of fromInteger,
      fromRational and negate are all bound to "whatever is in scope" 
      rather than "the fixed Prelude functions".  So if you say
      
      	{-# OPTIONS -fno-implicit-prelude #-}
      	module M where
       	import MyPrelude( fromInteger )
      
      	x = 3
      
      the literal 3 will use whatever (unqualified) "fromInteger" is in scope,
      in this case the one gotten from MyPrelude.
      
      
      On the way, though, I studied how HsLit worked, and did a substantial tidy
      up, deleting quite a lot of code along the way.  In particular.
      
      * HsBasic.lhs is renamed HsLit.lhs.  It defines the HsLit type.
      
      * There are now two HsLit types, both defined in HsLit.
      	HsLit for non-overloaded literals (like 'x')
      	HsOverLit for overloaded literals (like 1 and 2.3)
      
      * HsOverLit completely replaces Inst.OverloadedLit, which disappears.
        An HsExpr can now be an HsOverLit as well as an HsLit.
      
      * HsOverLit carries the Name of the fromInteger/fromRational operation,
        so that the renamer can help with looking up the unqualified name 
        when -fno-implicit-prelude is on.  Ditto the HsExpr for negation.
        It's all very tidy now.
      
      * RdrHsSyn contains the stuff that handles -fno-implicit-prelude
        (see esp RdrHsSyn.prelQual).  RdrHsSyn also contains all the "smart constructors"
        used by the parser when building HsSyn.  See for example RdrHsSyn.mkNegApp
        (previously the renamer (!) did the business of turning (- 3#) into -3#).
      
      * I tidied up the handling of "special ids" in the parser.  There's much
        less duplication now.
      
      * Move Sven's Horner stuff to the desugarer, where it belongs.  
        There's now a nice function DsUtils.mkIntegerLit which brings together
        related code from no fewer than three separate places into one single
        place.  Nice!
      
      * A nice tidy-up in MatchLit.partitionEqnsByLit became possible.
      
      * Desugaring of HsLits is now much tidier (DsExpr.dsLit)
      
      * Some stuff to do with RdrNames is moved from ParseUtil.lhs to RdrHsSyn.lhs,
        which is where it really belongs.
      
      * I also removed 
      	many unnecessary imports from modules 
      	quite a bit of dead code
        in divers places
      1bba522f
  18. 14 Sep, 2000 1 commit
    • simonpj's avatar
      [project @ 2000-09-14 13:46:39 by simonpj] · cae34044
      simonpj authored
      ---------------------------------------
      	Simon's tuning changes: early Sept 2000
      	---------------------------------------
      
      Library changes
      ~~~~~~~~~~~~~~~
      * Eta expand PrelShow.showLitChar.  It's impossible to compile this well,
        and it makes a big difference to some programs (e.g. gen_regexps)
      
      * Make PrelList.concat into a good producer (in the foldr/build sense)
      
      
      Flag changes
      ~~~~~~~~~~~~
      * Add -ddump-hi-diffs to print out changes in interface files.  Useful
        when watching what the compiler is doing
      
      * Add -funfolding-update-in-place to enable the experimental optimisation
        that makes the inliner a bit keener to inline if it's in the RHS of
        a thunk that might be updated in place.  Sometimes this is a bad idea
        (one example is in spectral/sphere; see notes in nofib/Simon-nofib-notes)
      
      
      Tuning things
      ~~~~~~~~~~~~~
      * Fix a bug in SetLevels.lvlMFE.  (change ctxt_lvl to dest_level)
        I don't think this has any performance effect, but it saves making
        a redundant let-binding that is later eliminated.
      
      * Desugar.dsProgram and DsForeign
        Glom together all the bindings into a single Rec.  Previously the
        bindings generated by 'foreign' declarations were not glommed together, but
        this led to an infelicity (i.e. poorer code than necessary) in the modules
        that actually declare Float and Double (explained a bit more in Desugar.dsProgram)
      
      * OccurAnal.shortMeOut and IdInfo.shortableIdInfo
        Don't do the occurrence analyser's shorting out stuff for things which
        have rules.  Comments near IdInfo.shortableIdInfo.
        This is deeply boring, and mainly to do with making rules work well.
        Maybe rules should have phases attached too....
      
      * CprAnalyse.addIdCprInfo
        Be a bit more willing to add CPR information to thunks;
        in particular, if the strictness analyser has just discovered that this
        is a strict let, then the let-to-case transform will happen, and CPR is fine.
        This made a big difference to PrelBase.modInt, which had something like
      	modInt = \ x -> let r = ... -> I# v in
      			...body strict in r...
        r's RHS isn't a value yet; but modInt returns r in various branches, so
        if r doesn't have the CPR property then neither does modInt
      
      * MkId.mkDataConWrapId
        Arrange that vanilla constructors, like (:) and I#, get unfoldings that are
        just a simple variable $w:, $wI#.  This ensures they'll be inlined even into
        rules etc, which makes matching a bit more reliable.  The downside is that in
        situations like (map (:) xs), we'll end up with (map (\y ys. $w: y ys) xs.
        Which is tiresome but it doesn't happen much.
      
      * SaAbsInt.findStrictness
        Deal with the case where a thing with no arguments is bottom.  This is Good.
        E.g.   module M where { foo = error "help" }
        Suppose we have in another module
      	case M.foo of ...
        Then we'd like to do the case-of-error transform, without inlining foo.
      
      
      Tidying up things
      ~~~~~~~~~~~~~~~~~
      * Reorganised Simplify.completeBinding (again).
      
      * Removed the is_bot field in CoreUnfolding (is_cheap is true if is_bot is!)
        This is just a tidy up
      
      * HsDecls and others
        Remove the NewCon constructor from ConDecl.  It just added code, and nothing else.
        And it led to a bug in MkIface, which though that a newtype decl was always changing!
      
      * IdInfo and many others
        Remove all vestiges of UpdateInfo (hasn't been used for years)
      cae34044
  19. 09 Aug, 2000 1 commit
  20. 01 Aug, 2000 1 commit
    • simonpj's avatar
      [project @ 2000-08-01 09:08:25 by simonpj] · fe69f3c1
      simonpj authored
      Simon's Marktoberdorf Commits
      
      1.  Tidy up the renaming story for "system binders", such as
      dictionary functions, default methods, constructor workers etc.  These
      are now documented in HsDecls.  The main effect of the change, apart
      from tidying up, is to make the *type-checker* (instead of the
      renamer) generate names for dict-funs and default-methods.  This is
      good because Sergei's generic-class stuff generates new classes at
      typecheck time.
      
      
      2.  Fix the CSE pass so it does not require the no-shadowing invariant.
      Keith discovered that the simplifier occasionally returns a result
      with shadowing.  After much fiddling around (which has improved the
      code in the simplifier a bit) I found that it is nearly impossible to
      arrange that it really does do no-shadowing.  So I gave up and fixed
      the CSE pass (which is the only one to rely on it) instead.
      
      
      3. Fix a performance bug in the simplifier.  The change is in
      SimplUtils.interestingArg.  It computes whether an argment should 
      be considered "interesting"; if a function is applied to an interesting
      argument, we are more likely to inline that function.
      Consider this case
      	let x = 3 in f x
      The 'x' argument was considered "uninteresting" for a silly reason.
      Since x only occurs once, it was unconditionally substituted, but
      interestingArg didn't take account of that case.  Now it does.
      
      I also made interestingArg a bit more liberal.  Let's see if we
      get too much inlining now.
      
      
      4.  In the occurrence analyser, we were choosing a bad loop breaker.
      Here's the comment that's now in OccurAnal.reOrderRec
      
          score ((bndr, rhs), _, _)
      	| exprIsTrivial rhs 	   = 3	-- Practically certain to be inlined
      		-- Used to have also: && not (isExportedId bndr)
      		-- But I found this sometimes cost an extra iteration when we have
      		--	rec { d = (a,b); a = ...df...; b = ...df...; df = d }
      		-- where df is the exported dictionary. Then df makes a really
      		-- bad choice for loop breaker
      
      I also increased the score for bindings with a non-functional type, so that
      dictionaries have a better chance of getting inlined early
      
      
      5. Add a hash code to the InScopeSet (and make it properly abstract)
      This should make uniqAway a lot more robust.  Simple experiments suggest
      that uniqAway no longer gets into the long iteration chains that it used
      to.
      
      
      6.  Fix a bug in the inliner that made the simplifier tend to get into
      a loop where it would keep iterating ("4 iterations, bailing out" message).
      In SimplUtils.mkRhsTyLam we float bindings out past a big lambda, thus:
      	x = /\ b -> let g = \x -> f x x
      		    in E
      becomes
      	g* = /\a -> \x -> f x x
      	x = /\ b -> let g = g* b in E
      	
      It's essential that we don't simply inling g* back into the RHS of g,
      else we will be back to square 1.  The inliner is meant not to do this
      because there's no benefit to the inlining, but the size calculation
      was a little off in CoreUnfold.
      
      
      7.  In SetLevels we were bogus-ly building a Subst with an empty in-scope
      set, so a WARNING popped up when compiling some modules.  (knights/ChessSetList
      was the example that tickled it.)  Now in fact the warning wasn't an error,
      but the Right Thing to do is to carry down a proper Subst in SetLevels, so
      that is what I have now done.  It is very little more expensive.
      fe69f3c1
  21. 18 Jul, 2000 1 commit
  22. 14 Jul, 2000 2 commits
    • simonpj's avatar
      [project @ 2000-07-14 13:38:39 by simonpj] · 6a562dd5
      simonpj authored
      Arrange that type signatures work right.  Consider:
      
      	   module A
      		import M( f )
      		f :: Int -> Int
      		f x = x
      
      Here, the 'f' in the signature isn't ambiguous; it
      refers to the locally defined f.  (This isn't clear in
      the Haskell 98 report, but it will be.)
      6a562dd5
    • simonpj's avatar
      [project @ 2000-07-14 08:17:36 by simonpj] · 77a8c0db
      simonpj authored
      This commit completely re-does the kind-inference mechanism.
      Previously it was inter-wound with type inference, but that was
      always hard to understand, and it finally broke when we started
      checking for ambiguity when type-checking a type signature (details
      irrelevant).
      
      So now kind inference is more clearly separated, so that it never
      takes place at the same time as type inference.  The biggest change
      is in TcTyClsDecls, which does the kind inference for a group of
      type and class declarations.  It now contains comments to explain
      how it all works.
      
      There are also comments in TypeRep which describes the slightly
      tricky way in which we deal with the fact that kind 'type' (written
      '*') actually has 'boxed type' and 'unboxed type' as sub-kinds.
      The whole thing is a bit of a hack, because we don't really have 
      sub-kinding, but it's less of a hack than before.
      
      A lot of general tidying up happened at the same time.
      In particular, I removed some dead code here and there
      77a8c0db
  23. 11 Jul, 2000 1 commit
  24. 07 Jul, 2000 1 commit
  25. 09 Jun, 2000 1 commit
    • simonpj's avatar
      [project @ 2000-06-09 15:53:12 by simonpj] · b610eca3
      simonpj authored
      GHC gets upset if you have types like
      
      	Eq a => a->a
      
      where 'a' is *not* universally quantified.
      By "upset" I mean that the typechecker generates
      rather bogus code, that subsequently kills Lint.
      
      Such types used to be rejected in the renamer,
      but Jeff removed that in favour of an ambiguity
      check in TcMonoType.  I remember agreeing to move
      the renamer check to the type checker, and Jeff did this,
      but the check in TcMonoType was only checking for
      *ambiguity*, which isn't quite the same.
      
      I've restored the missing check and commented it
      better in TcMonoType.
      
      Jeff: if this isn't right for you, let's dicuss.
      
      Incidentally, I also generalise the ambiguity check
      to detect
      	forall a. ?x::a => Int
      which is ambiguous.
      
      I did a few formatting changes too.
      b610eca3
  26. 31 May, 2000 1 commit
    • lewie's avatar
      [project @ 2000-05-31 10:13:57 by lewie] · e7f04a0d
      lewie authored
      Cleanup pass on functional dependencies.  Most noticeably, make it so that
      signatures involving classes with functional dependencies work.  Also,
      Fundeps are now properly handled by the simplifier, resolving problems
      where the fundeps were sometimes being discarded too early, and sometimes
      hanging around too long.  Took out the early ambiguity testing in the
      renamer, because that's too early (you don't know the fundeps yet).  Now,
      the ambiguity test happens in the typechecker.
      Functional Dependencies should now be up to snuff with Mark's paper,
      however, the derived instances and superclass extensions found in hugs
      are still not in there.
      It would be nice if this were merged into 4.07.  I have diffs against
      the 4.07 tree in case it's too thorny working around Simon's big commit.
      e7f04a0d
  27. 30 May, 2000 1 commit
  28. 29 May, 2000 1 commit
  29. 25 May, 2000 1 commit
    • simonpj's avatar
      [project @ 2000-05-25 12:41:14 by simonpj] · 495ef8bd
      simonpj authored
      ~~~~~~~~~~~~
      		Apr/May 2000
      		~~~~~~~~~~~~
      
      This is a pretty big commit!  It adds stuff I've been working on
      over the last month or so.  DO NOT MERGE IT WITH 4.07!
      
      Interface file formats have changed a little; you'll need
      to make clean before remaking.
      
      						Simon PJ
      
      Recompilation checking
      ~~~~~~~~~~~~~~~~~~~~~~
      Substantial improvement in recompilation checking.  The version management
      is now entirely internal to GHC.  ghc-iface.lprl is dead!
      
      The trick is to generate the new interface file in two steps:
        - first convert Types etc to HsTypes etc, and thereby
      	build a new ParsedIface
        - then compare against the parsed (but not renamed) version of the old
      	interface file
      Doing this meant adding code to convert *to* HsSyn things, and to
      compare HsSyn things for equality.  That is the main tedious bit.
      
      Another improvement is that we now track version info for
      fixities and rules, which was missing before.
      
      
      Interface file reading
      ~~~~~~~~~~~~~~~~~~~~~~
      Make interface files reading more robust.
        * If the old interface file is unreadable, don't fail. [bug fix]
      
        * If the old interface file mentions interfaces
          that are unreadable, don't fail. [bug fix]
      
        * When we can't find the interface file,
          print the directories we are looking in.  [feature]
      
      
      Type signatures
      ~~~~~~~~~~~~~~~
        * New flag -ddump-types to print type signatures
      
      
      Type pruning
      ~~~~~~~~~~~~
      When importing
      	data T = T1 A | T2 B | T3 C
      it seems excessive to import the types A, B, C as well, unless
      the constructors T1, T2 etc are used.  A,B,C might be more types,
      and importing them may mean reading more interfaces, and so on.
       So the idea is that the renamer will just import the decl
      	data T
      unless one of the constructors is used.  This turns out to be quite
      easy to implement.  The downside is that we must make sure the
      constructors are always available if they are really needed, so
      I regard this as an experimental feature.
      
      
      Elimininate ThinAir names
      ~~~~~~~~~~~~~~~~~~~~~~~~~
      Eliminate ThinAir.lhs and all its works.  It was always a hack, and now
      the desugarer carries around an environment I think we can nuke ThinAir
      altogether.
      
      As part of this, I had to move all the Prelude RdrName defns from PrelInfo
      to PrelMods --- so I renamed PrelMods as PrelNames.
      
      I also had to move the builtinRules so that they are injected by the renamer
      (rather than appearing out of the blue in SimplCore).  This is if anything simpler.
      
      Miscellaneous
      ~~~~~~~~~~~~~
      * Tidy up the data types involved in Rules
      
      * Eliminate RnEnv.better_provenance; use Name.hasBetterProv instead
      
      * Add Unique.hasKey :: Uniquable a => a -> Unique -> Bool
        It's useful in a lot of places
      
      * Fix a bug in interface file parsing for __U[!]
      495ef8bd
  30. 07 Apr, 2000 1 commit
    • simonpj's avatar
      [project @ 2000-04-07 13:45:46 by simonpj] · cfbedcec
      simonpj authored
      * Fix 'foreign export' and 'foreign export dynamic' so
        that we can export pure (non-IO) functions as well as IO-ish ones
      
        NB: There's a change to PrelIOBase, so you'll
            need to recompile the Prelude
      
      * Add Type.mkDictTys and call it in various places.
      cfbedcec
  31. 03 Apr, 2000 1 commit
    • simonpj's avatar
      [project @ 2000-04-03 09:52:28 by simonpj] · e4b0fab5
      simonpj authored
      * Make it so that recursive newtype declarations don't send
        GHC into an infinite loop.
      
      	newtype T = MkT T
      
        This happened because Type.repType looked throught newtypes,
        and that never stopped!  Now TcTyDecls.mkNewTyConRep does the job
        more carefully, and the result is cached in the TyCon itself.
      
      
      * Improve the handling of type signatures & pragmas.  Previously a
        mis-placed (say) SPECIALISE instance pragmas could be silently
        ignored.
      
      
      Both these changes involved moving quite a lot of stuff between modules.
      e4b0fab5
  32. 30 Mar, 2000 1 commit
    • simonpj's avatar
      [project @ 2000-03-30 16:23:56 by simonpj] · b822aa0e
      simonpj authored
      * Remove the unnecessary CPR parameter to mkUnfolding and friends
      
      * Make sure that even trivial wrappers have a __inline__
        (this was causing lots of 'substWorker' DEBUG messages)
      
      * Nuke demand info when the unfolding is a value
        (see notes with IdInfo.setUnfoldingInfo)
      
      * Add an update-in-place test to the 'interesting context'
        predicate in SimplUtils.
      b822aa0e
  33. 24 Mar, 2000 1 commit
    • simonpj's avatar
      [project @ 2000-03-24 17:49:29 by simonpj] · 6c872fff
      simonpj authored
      a) Small wibbles to do with inlining and floating
      
      b) Implement Ralf's request, so that one can write
      
      	type F = forall a. a -> a
      
      	f :: Int -> F
      	f = ...
      
         The for-alls inside F are hoisted out to the top of
         the type signature for f.  This applies uniformly to
         all user-written types
      6c872fff