1. 09 Oct, 2003 2 commits
    • simonpj's avatar
      [project @ 2003-10-09 15:38:22 by simonpj] · 0dfa678a
      simonpj authored
      Wibles
      0dfa678a
    • simonpj's avatar
      [project @ 2003-10-09 11:58:39 by simonpj] · 98688c6e
      simonpj authored
      -------------------------
      		GHC heart/lung transplant
      		-------------------------
      
      This major commit changes the way that GHC deals with importing
      types and functions defined in other modules, during renaming and
      typechecking.  On the way I've changed or cleaned up numerous other
      things, including many that I probably fail to mention here.
      
      Major benefit: GHC should suck in many fewer interface files when
      compiling (esp with -O).  (You can see this with -ddump-rn-stats.)
      
      It's also some 1500 lines of code shorter than before.
      
      **	So expect bugs!  I can do a 3-stage bootstrap, and run
      **	the test suite, but you may be doing stuff I havn't tested.
      ** 	Don't update if you are relying on a working HEAD.
      
      
      In particular, (a) External Core and (b) GHCi are very little tested.
      
      	But please, please DO test this version!
      
      
      	------------------------
      		Big things
      	------------------------
      
      Interface files, version control, and importing declarations
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      * There is a totally new data type for stuff that lives in interface files:
      	Original names			IfaceType.IfaceExtName
      	Types				IfaceType.IfaceType
      	Declarations (type,class,id)	IfaceSyn.IfaceDecl
      	Unfoldings			IfaceSyn.IfaceExpr
        (Previously we used HsSyn for type/class decls, and UfExpr for unfoldings.)
        The new data types are in iface/IfaceType and iface/IfaceSyn.  They are
        all instances of Binary, so they can be written into interface files.
        Previous engronkulation concering the binary instance of RdrName has
        gone away -- RdrName is not an instance of Binary any more.  Nor does
        Binary.lhs need to know about the ``current module'' which it used to,
        which made it specialised to GHC.
      
        A good feature of this is that the type checker for source code doesn't
        need to worry about the possibility that we might be typechecking interface
        file stuff.  Nor does it need to do renaming; we can typecheck direct from
        IfaceSyn, saving a whole pass (module TcIface)
      
      * Stuff from interface files is sucked in *lazily*, rather than being eagerly
        sucked in by the renamer. Instead, we use unsafeInterleaveIO to capture
        a thunk for the unfolding of an imported function (say).  If that unfolding
        is every pulled on, TcIface will scramble over the unfolding, which may
        in turn pull in the interface files of things mentioned in the unfolding.
      
        The External Package State is held in a mutable variable so that it
        can be side-effected by this lazy-sucking-in process (which may happen
        way later, e.g. when the simplifier runs).   In effect, the EPS is a kind
        of lazy memo table, filled in as we suck things in.  Or you could think
        of it as a global symbol table, populated on demand.
      
      * This lazy sucking is very cool, but it can lead to truly awful bugs. The
        intent is that updates to the symbol table happen atomically, but very bad
        things happen if you read the variable for the table, and then force a
        thunk which updates the table.  Updates can get lost that way. I regret
        this subtlety.
      
        One example of the way it showed up is that the top level of TidyPgm
        (which updates the global name cache) to be much more disciplined about
        those updates, since TidyPgm may itself force thunks which allocate new
        names.
      
      * Version numbering in interface files has changed completely, fixing
        one major bug with ghc --make.  Previously, the version of A.f changed
        only if A.f's type and unfolding was textually different.  That missed
        changes to things that A.f's unfolding mentions; which was fixed by
        eagerly sucking in all of those things, and listing them in the module's
        usage list.  But that didn't work with --make, because they might have
        been already sucked in.
      
        Now, A.f's version changes if anything reachable from A.f (via interface
        files) changes.  A module with unchanged source code needs recompiling
        only if the versions of any of its free variables changes. [This isn't
        quite right for dictionary functions and rules, which aren't mentioned
        explicitly in the source.  There are extensive comments in module MkIface,
        where all version-handling stuff is done.]
      
      * We don't need equality on HsDecls any more (because they aren't used in
        interface files).  Instead we have a specialised equality for IfaceSyn
        (eqIfDecl etc), which uses IfaceEq instead of Bool as its result type.
        See notes in IfaceSyn.
      
      * The horrid bit of the renamer that tried to predict what instance decls
        would be needed has gone entirely.  Instead, the type checker simply
        sucks in whatever instance decls it needs, when it needs them.  Easy!
      
        Similarly, no need for 'implicitModuleFVs' and 'implicitTemplateHaskellFVs'
        etc.  Hooray!
      
      
      Types and type checking
      ~~~~~~~~~~~~~~~~~~~~~~~
      * Kind-checking of types is far far tidier (new module TcHsTypes replaces
        the badly-named TcMonoType).  Strangely, this was one of my
        original goals, because the kind check for types is the Right Place to
        do type splicing, but it just didn't fit there before.
      
      * There's a new representation for newtypes in TypeRep.lhs.  Previously
        they were represented using "SourceTypes" which was a funny compromise.
        Now they have their own constructor in the Type datatype.  SourceType
        has turned back into PredType, which is what it used to be.
      
      * Instance decl overlap checking done lazily.  Consider
      	instance C Int b
      	instance C a Int
        These were rejected before as overlapping, because when seeking
        (C Int Int) one couldn't tell which to use.  But there's no problem when
        seeking (C Bool Int); it can only be the second.
      
        So instead of checking for overlap when adding a new instance declaration,
        we check for overlap when looking up an Inst.  If we find more than one
        matching instance, we see if any of the candidates dominates the others
        (in the sense of being a substitution instance of all the others);
        and only if not do we report an error.
      
      
      
      	------------------------
      	     Medium things
      	------------------------
      
      * The TcRn monad is generalised a bit further.  It's now based on utils/IOEnv.lhs,
        the IO monad with an environment.  The desugarer uses the monad too,
        so that anything it needs can get faulted in nicely.
      
      * Reduce the number of wired-in things; in particular Word and Integer
        are no longer wired in.  The latter required HsLit.HsInteger to get a
        Type argument.  The 'derivable type classes' data types (:+:, :*: etc)
        are not wired in any more either (see stuff about derivable type classes
        below).
      
      * The PersistentComilerState is now held in a mutable variable
        in the HscEnv.  Previously (a) it was passed to and then returned by
        many top-level functions, which was painful; (b) it was invariably
        accompanied by the HscEnv.  This change tidies up top-level plumbing
        without changing anything important.
      
      * Derivable type classes are treated much more like 'deriving' clauses.
        Previously, the Ids for the to/from functions lived inside the TyCon,
        but now the TyCon simply records their existence (with a simple boolean).
        Anyone who wants to use them must look them up in the environment.
      
        This in turn makes it easy to generate the to/from functions (done
        in types/Generics) using HsSyn (like TcGenDeriv for ordinary derivings)
        instead of CoreSyn, which in turn means that (a) we don't have to figure
        out all the type arguments etc; and (b) it'll be type-checked for us.
        Generally, the task of generating the code has become easier, which is
        good for Manuel, who wants to make it more sophisticated.
      
      * A Name now says what its "parent" is. For example, the parent of a data
        constructor is its type constructor; the parent of a class op is its
        class.  This relationship corresponds exactly to the Avail data type;
        there may be other places we can exploit it.  (I made the change so that
        version comparison in interface files would be a bit easier; but in
        fact it tided up other things here and there (see calls to
        Name.nameParent).  For example, the declaration pool, of declararations
        read from interface files, but not yet used, is now keyed only by the 'main'
        name of the declaration, not the subordinate names.
      
      * New types OccEnv and OccSet, with the usual operations.
        OccNames can be efficiently compared, because they have uniques, thanks
        to the hashing implementation of FastStrings.
      
      * The GlobalRdrEnv is now keyed by OccName rather than RdrName.  Not only
        does this halve the size of the env (because we don't need both qualified
        and unqualified versions in the env), but it's also more efficient because
        we can use a UniqFM instead of a FiniteMap.
      
        Consequential changes to Provenance, which has moved to RdrName.
      
      * External Core remains a bit of a hack, as it was before, done with a mixture
        of HsDecls (so that recursiveness and argument variance is still inferred),
        and IfaceExprs (for value declarations).  It's not thoroughly tested.
      
      
      	------------------------
      	     Minor things
      	------------------------
      
      * DataCon fields dcWorkId, dcWrapId combined into a single field
        dcIds, that is explicit about whether the data con is a newtype or not.
        MkId.mkDataConWorkId and mkDataConWrapId are similarly combined into
        MkId.mkDataConIds
      
      * Choosing the boxing strategy is done for *source* type decls only, and
        hence is now in TcTyDecls, not DataCon.
      
      * WiredIn names are distinguished by their n_sort field, not by their location,
        which was rather strange
      
      * Define Maybes.mapCatMaybes :: (a -> Maybe b) -> [a] -> [b]
        and use it here and there
      
      * Much better pretty-printing of interface files (--show-iface)
      
      Many, many other small things.
      
      
      	------------------------
      	     File changes
      	------------------------
      * New iface/ subdirectory
      * Much of RnEnv has moved to iface/IfaceEnv
      * MkIface and BinIface have moved from main/ to iface/
      * types/Variance has been absorbed into typecheck/TcTyDecls
      * RnHiFiles and RnIfaces have vanished entirely.  Their
        work is done by iface/LoadIface
      * hsSyn/HsCore has gone, replaced by iface/IfaceSyn
      * typecheck/TcIfaceSig has gone, replaced by iface/TcIface
      * typecheck/TcMonoType has been renamed to typecheck/TcHsType
      * basicTypes/Var.hi-boot and basicTypes/Generics.hi-boot have gone altogether
      98688c6e
  2. 24 Jul, 2003 1 commit
    • simonpj's avatar
      [project @ 2003-07-24 07:38:54 by simonpj] · f6c31c0f
      simonpj authored
      For GHCi, a recent simplification in TcRnDrive.tc_stmts turned out to
      be bogus. Briefly, we were returning *monomorphic* values from a user
      stmt (e.g. "let f x y = x>y") when we should wrap the *polymorphic* values.
      
      See the comment with mk_return in tc_stmts.
      f6c31c0f
  3. 09 Jul, 2003 1 commit
    • simonpj's avatar
      [project @ 2003-07-09 11:06:31 by simonpj] · f8031f57
      simonpj authored
      --------------------------
      	Fix two External-Core bugs
      	--------------------------
      
      1.  An inadvertent "let x = ...x..." bug in TcRnDriver
      
      2.  Adjust the new -main-is story, so that the root module is called
      	":Main" instead of "$Main".
          This means that the z-encoded module name is "ZCMain" rather than "zdMain",
          which in keeps the External-Core lexer happy.  And is more consistent generally.
      
      3.  Make the renamer happy to see definitions from modules other than the "home" one,
          when doing External Core.  In the main module, there'll be a definition for
          ZCMain.main.
      f8031f57
  4. 03 Jul, 2003 1 commit
  5. 02 Jul, 2003 1 commit
  6. 30 Jun, 2003 1 commit
  7. 27 Jun, 2003 1 commit
  8. 25 Jun, 2003 1 commit
  9. 24 Jun, 2003 1 commit
    • simonpj's avatar
      [project @ 2003-06-24 07:58:18 by simonpj] · 16e4ce4c
      simonpj authored
      ----------------------------------------------
      	Add support for Ross Paterson's arrow notation
      	----------------------------------------------
      
      Ross Paterson's ICFP'01 paper described syntax to support John Hughes's
      "arrows", rather as do-notation supports monads.  Except that do-notation is
      relatively modest -- you can write monads by hand without much trouble --
      whereas arrow-notation is more-or-less essential for writing arrow programs.
      It desugars to a massive pile of tuple construction and selection!
      
      For some time, Ross has had a pre-processor for arrow notation, but the
      resulting type error messages (reported in terms of the desugared code)
      are impenetrable.  This commit integrates the syntax into GHC.  The
      type error messages almost certainly still require tuning, but they should
      be better than with the pre-processor.
      
      Main syntactic changes (enabled with -farrows)
      
         exp ::= ... | proc pat -> cmd
      
         cmd ::= exp1 -<  exp2   |  exp1 >-  exp2
      	|  exp1 -<< exp2   |  exp1 >>- exp2
      	| \ pat1 .. patn -> cmd
      	| let decls in cmd
      	| if exp then cmd1 else cmd2
      	| do { cstmt1 .. cstmtn ; cmd }
      	| (| exp |) cmd1 .. cmdn
      	| cmd1 qop cmd2
      	| case exp of { calts }
      
         cstmt :: = let decls
      	 |   pat <- cmd
      	 |   rec { cstmt1 .. cstmtn }
      	 |   cmd
      
      New keywords and symbols:
      	proc rec
      	-<   >-   -<<   >>-
      	(|  |)
      
      The do-notation in cmds was not described in Ross's ICFP'01 paper; instead
      it's in his chapter in The Fun of Programming (Plagrave 2003).
      
      The four arrow-tail forms (-<) etc cover
        (a) which order the pices come in (-<  vs  >-), and
        (b) whether the locally bound variables can be used in the
      		arrow part (-<  vs  -<<) .
      In previous presentations, the higher-order-ness (b) was inferred,
      but it makes a big difference to the typing required so it seems more
      consistent to be explicit.
      
      The 'rec' form is also available in do-notation:
        * you can use 'rec' in an ordinary do, with the obvious meaning
        * using 'mdo' just says "infer the minimal recs"
      
      
      Still to do
      ~~~~~~~~~~~
      Top priority is the user manual.
      
      The implementation still lacks an implementation of
      the case form of cmd.
      
      
      Implementation notes
      ~~~~~~~~~~~~~~~~~~~~
      Cmds are parsed, and indeed renamed, as expressions.  The type checker
      distinguishes the two.
      16e4ce4c
  10. 23 Jun, 2003 1 commit
    • simonpj's avatar
      [project @ 2003-06-23 10:35:15 by simonpj] · d28ba8c8
      simonpj authored
      -------------------
      	Dealing with 'main'
      	-------------------
      
      1.  In GHC 6.0, a module with no "module Main ... where" header
          elicited an error "main is not in scope" if 'main' is not defined.  We
          don't want this behaviour in GHCi.  This happened because the parser
          expanded the (absent) header to "module Main( main ) where", and the
          'main' in the export list isn't.
      
      Solution: elaborate HsModule to record whether the 'module ..." header was
      given explicitly by the user or not.
      
      
      2.  Add a -main-is flag, and document it, so that you can have a 'main' function
      that is not Main.main.  Summary of changes
      
      * The -main-is flag nominates what the main function is to be (see the documentation).
      	No -main-is flag 	says that the main function is Main.main
      	-main-is Foo.baz	says that the main function is Foo.baz
      	-main-is Foo		says that the main function is Foo.main
      	-main-is baz		says that the main function is Main.baz
      
        Let's say  you say -main-is Foo.baz
      
      * TcRnDriver injects the extra definition
      	$Mian.main :: IO t
      	$Main.main = baz
        in the module Foo.   Note the naming, which is a bit different than before;
        previously the extra defn was for Main.$main.  The RTS invokes zdMain_main_closure.
      
      * CodeGen injects an extra initialisation block into module Foo, thus
      	stginit_zdMain {
      		stginit_Foo
      	}
        That ensures that the RTS can initialise stginit_zdMain.
      d28ba8c8
  11. 20 Jun, 2003 1 commit
    • simonpj's avatar
      [project @ 2003-06-20 11:14:18 by simonpj] · 1f861358
      simonpj authored
      ------------------------------
      	Fix a small quantification bug
      	------------------------------
      
      We were quantifying over too few type variables, because fdPredsOfInsts was
      being too eager to discard predicates. This only affects rather obscure
      programs.  Here's the one Iavor found:
      
      	class C a b where f :: a -> b
      	g x = fst (f x)
      
      We want to get the type
         	g :: forall a b c.  C a (b,c) => a -> b
      but GHC 6.0 bogusly gets
         	g :: forall a b.  C a (b,()) => a -> b
      
      A test is in should_compile/tc168
      1f861358
  12. 16 Jun, 2003 1 commit
    • simonpj's avatar
      [project @ 2003-06-16 15:31:13 by simonpj] · 76c6edcb
      simonpj authored
      ----------------------------------
      	Fix the "no interface file" bug
      	----------------------------------
      
      The problem was this.
      
      * Module A imports module B
      
      * ghc --make A
      
      * Remove B.hs, B.hi, and edit A so that it doesn't import B
      
      * ghc --make A
      
      Then GHC would fail, saying it can't find an interface file for B.
      Reason: when loading A.hi (loadOldIface) it makes a Name for the
      usages it finds.  To make a Name for B things, it needs B's package;
      but it can't find B.hi, so it bombs instead.
      
      Solution: don't complain if loadOldIface fails; instead behave just like
      if you can't find A.hi.
      
      Fixes a long-standing infelicity.
      76c6edcb
  13. 06 May, 2003 1 commit
    • simonpj's avatar
      [project @ 2003-05-06 10:25:32 by simonpj] · e4abae1d
      simonpj authored
      -------------------------------------
      		Main module exports
      	-------------------------------------
      
      Make it so that
      
         	    module Main where ....
      
      exports everything defined in Main, as the report says it should.
      e4abae1d
  14. 16 Apr, 2003 1 commit
    • simonpj's avatar
      [project @ 2003-04-16 13:34:13 by simonpj] · 221b6b69
      simonpj authored
      ----------------------------------
       Use the Infer/Check idea for typechecking higher-rank types
      	----------------------------------
      
      The main idea is that
      
      	data Expected ty = Infer (TcRef ty) | Check ty
      
      	tcMonoExpr :: Expr -> Expected TcRhoType -> TcM Expra
      
      
      This "Expected" type tells tcMonoExpr whether it's doing inference or
      checking.  It replaces the "HoleTv" flavour of type variable.
      
      This actually leads to slightly more lines of code, but it's much
      clearer, and the new type distinctions showed up several subtle bugs
      in the previous implementation.  It all arose out of writing the
      prototype implementation for the paper.
      
      Error messages wibble around a little bit.  I'm not quite certain why!  But the
      changes look like improvements to me.
      221b6b69
  15. 27 Mar, 2003 1 commit
  16. 21 Feb, 2003 4 commits
    • simonpj's avatar
      [project @ 2003-02-21 14:52:54 by simonpj] · d6b7d200
      simonpj authored
      Typos
      d6b7d200
    • simonpj's avatar
      [project @ 2003-02-21 13:27:53 by simonpj] · 84ed91ab
      simonpj authored
      -------------------------------------
      	Improve the "unused binding" warnings
      	-------------------------------------
      
      We've had a succession of hacks for reporting warnings for
      unused bindings.  Consider
      
      	module M( f ) where
      
       	f x = x
      
      	g x = g x + h x
      	h x = x
      
      Here, g mentions itself and h, but is not itself mentioned. So
      really both g and h are dead code.  We've been getting this wrong
      for ages, and every hack so far has failed on some simple programs.
      
      This commit does a much better job.  The renamer applied to a bunch
      of bindings returns a NameSet.DefUses, which is a dependency-ordered
      lists of def/use pairs.  It's documented in NameSet.
      Given this, we can work out precisely what is not used, in a nice
      tidy way.
      
      It's less convenient in the case of type and class declarations, because
      the strongly-connected-component analysis can span module boundaries.
      So things are pretty much as they were for these.
      
      
      As usual, there was a lot of chuffing around tidying things up.
      I havn't tested it at all thoroughly yet.
      
      Various unrelated import-decl-pruning has been done too.
      84ed91ab
    • simonpj's avatar
      [project @ 2003-02-21 12:28:35 by simonpj] · 136d6345
      simonpj authored
      Another typo; sigh
      136d6345
    • simonpj's avatar
      [project @ 2003-02-21 12:16:44 by simonpj] · 802b299f
      simonpj authored
      Debugging hook jiggling
      802b299f
  17. 20 Feb, 2003 1 commit
  18. 14 Feb, 2003 2 commits
    • panne's avatar
      [project @ 2003-02-14 19:21:57 by panne] · 5ee05a2b
      panne authored
      Not sure if this fix is correct, but at least this module compiles
      again...
      5ee05a2b
    • simonpj's avatar
      [project @ 2003-02-14 14:22:24 by simonpj] · 5538aeeb
      simonpj authored
      -------------------------------------
         Do the top-level tcSimpifyTop (to resolve monomorphic constraints)
         once for the whole program, rather than once per splice group
      	-------------------------------------
      
      This change makes the trivial program
      
      	main = return ()
      
      work again.  It had stopped working (emitting an error about Monad m
      being unconstrained) because the 'checkMain' stuff (which knows special
      things about 'main' was happening only *after* all the groups of
      decls in the module had been dealt with and zonked (incl tcSimplifyTop).
      
      Better to postpone.  A little more plumbing, but one fewer unexpected
      happenings.
      5538aeeb
  19. 12 Feb, 2003 1 commit
    • simonpj's avatar
      [project @ 2003-02-12 15:01:31 by simonpj] · 42b63073
      simonpj authored
      -------------------------------------
        Big upheaval to the way that constructors are named
      	-------------------------------------
      
      This commit enshrines the new story for constructor names.  We could never
      really get External Core to work nicely before, but now it does.
      
      The story is laid out in detail in the Commentary
      	ghc/docs/comm/the-beast/data-types.html
      so I will not repeat it here.
      
      	[Manuel: the commentary isn't being updated, apparently.]
      
      However, the net effect is that in Core and in External Core, contructors look
      like constructors, and the way things are printed is all consistent.
      
      It is a fairly pervasive change (which is why it has been so long postponed),
      but I hope the question is now finally closed.
      
      All the libraries compile etc, and I've run many tests, but doubtless there will
      be some dark corners.
      42b63073
  20. 04 Feb, 2003 1 commit
    • simonpj's avatar
      [project @ 2003-02-04 12:33:05 by simonpj] · e6d00492
      simonpj authored
      ---------------------------------------------------
      	Template-Haskell fix to make the global environment
      		      more side-effect-ful
      	---------------------------------------------------
      
      Consider
      
      	f = $(...foldl...) $(...foldl...)
      
      The first splice sucks in the type sig for foldl, which the second
      splice needs.  That means that the second splice is going to have to
      consult the persistent compiler state to see the effect of imports
      by the first one.
      
      We used to cache the global type environment in the TcGblEnv, but
      this commit switches to the obvious thing: consult the persistent
      state on every global lookup.  After all, reading a MutVar is no
      big deal; and it's a benign, ever-growing cache of type signatures,
      so the side effect is fine.
      
      On the way I tidied up the knot-tying in TcIfaceSig a bit more.
      Previously, I think the setUnfoldingInfo was being strict in the
      unfolding, which forced it to be type-checked.  Now it's lazy.
      That could mean a lot less typechecking overall, for things whose
      unfolding isn't looked at.  I hope I havn't broken it, though.
      e6d00492
  21. 13 Jan, 2003 2 commits
  22. 10 Jan, 2003 1 commit
  23. 06 Jan, 2003 1 commit
    • simonpj's avatar
      [project @ 2003-01-06 15:30:14 by simonpj] · fcf37c94
      simonpj authored
      --------------------------------------------------------------
      	Several small but tiresome things shown up by Template Haskell
      	--------------------------------------------------------------
      
      1. Make the 'knot' in TcRnDriver much smaller; in fact move it to
         TcIfaceSig.tcInterfaceSigs.  Reasons
      	a) much tidier
      	b) avoids a loop in Template Haskell, when we try to run
      	   an expression during type checking (when the knot is
      	   not fully tied)
      
         See comments in TcIfaceSig
      
      2. Stop typechecking if tcGroup fails.  Reason: otherwise tcLookup can
         fail in the next group.
      
      3. Catch linking errors more gracefully when running a splice (in TcSplice)
      fcf37c94
  24. 28 Nov, 2002 1 commit
    • simonpj's avatar
      [project @ 2002-11-28 17:17:41 by simonpj] · 3c58c25b
      simonpj authored
      -------------------------------
            A day's work to improve error messages
      	-------------------------------
      
      1.  Indicate when the cause of the error is likely to be the monomorpism
          restriction, and identify the offending variables.  This involves
          mainly tcSimplifyTop and its error generation.
      
      2.  Produce much better kind error messages.  No more
            ../alonzo/DiGraph.hs:40:
      	  Couldn't match `* -> *' against `Type bx'
      	      Expected kind: * -> *
      	      Inferred kind: Type bx
      	  When checking that `DiGraph n' is a type
      
      It took a surprisingly long time to get the details right.
      3c58c25b
  25. 21 Nov, 2002 1 commit
  26. 20 Nov, 2002 2 commits
    • simonpj's avatar
      [project @ 2002-11-20 15:40:32 by simonpj] · c0624c76
      simonpj authored
      Wibble to fix :info
      c0624c76
    • chak's avatar
      [project @ 2002-11-20 12:34:42 by chak] · cda70f58
      chak authored
      TH:
      - We are forcing importing THSyntax.Q at every top splice now; this suffices
        to get simple splices that do not involve reifyDecl or declaration
        quasi-quotes to work.  NB: This worked already when the construction of the
        Dec term and the splice were in separated modules, but not when they are in
        the same (see the regression test "TH_spliceDecl1.hs").
      - The tests "TH_spliceDecl2.hs" and "TH_spliceDecl3.hs" use toplevel splices
        together with quasi-quoted and reifyDecl.  These currently still fail, as
        importing of some of the required type constructors from THSyntax isn't
        forced.
      cda70f58
  27. 25 Oct, 2002 2 commits
    • simonpj's avatar
      [project @ 2002-10-25 21:58:24 by simonpj] · 264cc860
      simonpj authored
      Import wibbles
      264cc860
    • simonpj's avatar
      [project @ 2002-10-25 15:23:03 by simonpj] · 4ef18ea2
      simonpj authored
      ------------------------
      	More dependency fiddling
      	------------------------
      
      	WARNING: Interface file format has changed (again)
      		 You need to 'make clean' in all library code
      
      * Orphan modules are now kept separately
        Home-package dependencies now contain only home-package dependencies!
        See HscTypes.Dependencies
      
      * Linker now uses the dependencies to do dynamic linking
      
      Result: Template Haskell should work even without --make (not yet tested)
      4ef18ea2
  28. 24 Oct, 2002 1 commit
    • simonpj's avatar
      [project @ 2002-10-24 14:17:46 by simonpj] · e0445ffa
      simonpj authored
      ------------------------------------------
      	1. New try and module and package dependencies
      	2. OrigNameCache always contains final info
      	------------------------------------------
      
      These things nearly complete sorting out the incremental
      linking problem that started us off!
      
      1. This commit separates two kinds of information:
      
        (a) HscTypes.Dependencies:
      	What (i)  home-package modules, and
      	     (ii) other packages
            this module depends on, transitively.
      
            That is, to link the module, it should be enough
            to link the dependent modules and packages (plus
            any C stubs etc).
      
            Along with this info we record whether the dependent module
            is (a) a boot interface or (b) an orphan module.  So in
            fact (i) can contain non-home-package modules, namely the
            orphan ones in other packages (sigh).
      
        (b) HscTypes.Usage:
            What version of imported things were used to
            actually compile the module.  This info is used for
            recompilation control only.
      
      
      
      2. The Finder now returns a correct Module (incl package indicator)
      first time, so we can install the absolutely final Name in the
      OrigNameCache when we first come across an occurrence of that name,
      even if it's only an occurrence in an unfolding in some other interface
      file.  This is much tidier.
      
      As a result Module.lhs is much cleaner
      	No DunnoYet
      	No mkVanillaModule
      ALl very joyful stuff.
      e0445ffa
  29. 18 Oct, 2002 1 commit
  30. 15 Oct, 2002 1 commit
    • simonpj's avatar
      [project @ 2002-10-15 11:52:31 by simonpj] · 5c614bc5
      simonpj authored
      ------------------------------------------------
      	Fix exports for a module with  no local bindings
      	------------------------------------------------
      
      Fix the export-list generation for a module with no local bindings.
      This one bug was breaking a bunch of modxxx tests, plus some renamer
      test, plus a desugarer test.
      5c614bc5
  31. 09 Oct, 2002 2 commits