1. 06 Jan, 2005 11 commits
  2. 05 Jan, 2005 7 commits
  3. 04 Jan, 2005 4 commits
    • simonpj's avatar
      [project @ 2005-01-04 16:26:55 by simonpj] · a27f7c87
      simonpj authored
      ------------------
                Fix an mdo bug
        	------------------
      
      Embarassingly, this bug makes GHC either panic (for some programs) or
      go into a loop (on others) in a recursive mdo that involves a
      polymorphic function.  Urk!
      
      The fix is twofold:
        a) add a missing bindInstsOfLocalFuns to tcStmtAndThen (RecStmt case)
        b) bind the correct set of variables in dsRecStmt
      
      I added some explanatory comments about RecStmt in HsExpr too.
      
      The tests is mdo/should_compile/mdo006
      a27f7c87
    • simonmar's avatar
      [project @ 2005-01-04 13:41:53 by simonmar] · f3cdd93b
      simonmar authored
      ghc/mk/config.mk was never being included in ordinary Makefiles.  It
      was only included in the top-level fptools/Makefile for the purposes
      of obtaining binary distribution settings.
      
      This fixes that problem, and now as a side-effect $(GhcHasReadline)
      will start working again.
      f3cdd93b
    • simonpj's avatar
      [project @ 2005-01-04 10:26:34 by simonpj] · 700819de
      simonpj authored
      Import trimming
      700819de
    • simonpj's avatar
      [project @ 2005-01-04 09:19:50 by simonpj] · ce82d32e
      simonpj authored
      Remove redundant Subst hi-boot files
      ce82d32e
  4. 30 Dec, 2004 1 commit
    • simonpj's avatar
      [project @ 2004-12-30 22:14:59 by simonpj] · 7f05f109
      simonpj authored
      Fix to the pre-Xmas simplifier changes, which should make 
      everything work again.  I'd forgotten to attend to this
      corner.  Still not properly tested I fear.
      
      Also remove dead code from SimplEnv, and simplify the remainder (hooray).
      7f05f109
  5. 27 Dec, 2004 2 commits
  6. 24 Dec, 2004 3 commits
    • simonpj's avatar
      [project @ 2004-12-24 16:14:36 by simonpj] · 339d5220
      simonpj authored
      ---------------------------
                Refactor the simplifier
        	---------------------------
      
      Driven by a GADT bug, I have refactored the simpifier, and the way GHC
      treats substitutions.  I hope I have gotten it right.  Be cautious about updating.
      
      * coreSyn/Subst.lhs has gone
      
      * coreSyn/CoreSubst replaces it, except that it's quite a bit simpler
      
      * simplCore/SimplEnv is added, and contains the simplifier-specific substitution
        stuff
      
      Previously Subst was trying to be all things to all men, and that was making
      it Too Complicated.
      
      There may be a little more code now, but it's much easier to understand.
      339d5220
    • simonpj's avatar
      [project @ 2004-12-24 11:38:09 by simonpj] · 0498d355
      simonpj authored
      Reset the export flag for the new bindings in LiberateCase
      0498d355
    • simonpj's avatar
      [project @ 2004-12-24 11:02:39 by simonpj] · 0ee11df0
      simonpj authored
      Further wibbles to the scoped-tyvar story.
      
      This commit tidies up the ATyVar in TcTyThing, making it
      	ATyVar Name Type
      instead of the previous misleading
      	ATyVar TyVar Type
      
      But the main thing is that we must take care with definitions
      like this:
      
      	type T a = forall b. b -> (a,b)
      
      	f :: forall c. T c
      	f = ...
      
      Here, we want only 'c' to scope over the RHS of f.  The renamer ensures
      that... but we must also take care that we freshly instantiate the 
      expanded type signature (forall c b. b -> (c,b)) before checking f's RHS,
      so that we don't get false sharing between uses of T.
      0ee11df0
  7. 23 Dec, 2004 4 commits
    • simonpj's avatar
      [project @ 2004-12-23 14:59:46 by simonpj] · fdba7999
      simonpj authored
      Simplifications, dead code elimination
      fdba7999
    • simonpj's avatar
      [project @ 2004-12-23 13:44:06 by simonpj] · af3dc1ff
      simonpj authored
      minor nomenclature wibble
      af3dc1ff
    • simonpj's avatar
      [project @ 2004-12-23 11:50:55 by simonpj] · c97ea0ce
      simonpj authored
      Enable scoped type variables only where there is an explicit forall
      c97ea0ce
    • simonpj's avatar
      [project @ 2004-12-23 09:07:30 by simonpj] · e12e0bb7
      simonpj authored
      ---------------------------------
                Template Haskell: names again
        	---------------------------------
      
      On 2 Dec 04 I made this commit (1.58 in Convert.lhs)
      
          Fix a Template Haskell bug that meant that top-level names created
          with newName were not made properly unique.
      
      But that just introduced a new bug!  THe trouble is that names created by
      newName are NameUs; but I was *also* using NameU for names of free varaibles,
      such as the 'x' in the quoted code here
      	f x = $( g [| \y -> (x,y) |])
      
      But when converting to HsSyn, the x and y must be treated diffferently.
      The 'x' must convert to an Exact RdrName, so that it binds to the 'x' that's
      in the type environment; but the 'y' must generate a nice unique RdrName.
      
      So this commit adds NameL for the lexically-scoped bindings like 'x'.
      e12e0bb7
  8. 22 Dec, 2004 3 commits
    • simonpj's avatar
      [project @ 2004-12-22 16:58:34 by simonpj] · 20e39e0e
      simonpj authored
      ----------------------------------------
      	     Add more scoped type variables
      	----------------------------------------
      
      Now the top-level forall'd variables of a type signature scope
      over the right hand side of that function.
      
      	f :: a -> a
      	f x = ....
      
      The type variable 'a' is in scope in the RHS, and in f's patterns.
      
      It's implied by -fglasgow-exts, but can also be switched off independently
      using -fscoped-type-variables (and the -fno variant)
      20e39e0e
    • simonpj's avatar
      [project @ 2004-12-22 12:06:13 by simonpj] · d7c402a3
      simonpj authored
      ----------------------------------------
           New Core invariant: keep case alternatives in sorted order
      	----------------------------------------
      
      We now keep the alternatives of a Case in the Core language in sorted
      order.  Sorted, that is,
      	by constructor tag	for DataAlt
      	by literal		for LitAlt
      
      The main reason is that it makes matching and equality testing more robust.
      But in fact some lines of code vanished from SimplUtils.mkAlts.
      
      
      WARNING: no change to interface file formats, but you'll need to recompile
      your libraries so that they generate interface files that respect the
      invariant.
      d7c402a3
    • simonpj's avatar
      [project @ 2004-12-22 12:04:14 by simonpj] · 1f3a9ff8
      simonpj authored
      --------------------------
      	Add -fwarn-orphans flag
      	--------------------------
      
      This gives a decent report for modules that contain 'orphan' instance and
      rule declarations.  These are to be avoided, because GHC has to proactively
      read the interface file every single time, just in case the instance/rule is
      needed.
      
      The flag just gives a convenient way of identifying the culprits.
      1f3a9ff8
  9. 21 Dec, 2004 5 commits
    • simonpj's avatar
      [project @ 2004-12-21 17:08:59 by simonpj] · 893d7df5
      simonpj authored
      ---------------------------------
           Template Haskell: dynamically scoped qualified names
      	---------------------------------
      
      This commit adds a constructor to TH.Name, so that
      
      	nameBase (mkName "Foo.baz")    == "baz"
      	nameModule (MkName "Foo.baz") == "Foo"
      
      We always did parse the module name off the front, but it used to
      be done in hsSyn/Convert, but now it's done in TH.Syntax, which is
      a better place.
      893d7df5
    • simonpj's avatar
      [project @ 2004-12-21 16:23:23 by simonpj] · 180484cb
      simonpj authored
      Fix buglet in CSE
      180484cb
    • simonpj's avatar
      [project @ 2004-12-21 12:35:10 by simonpj] · 970fca0f
      simonpj authored
      An old commit about paths on windows
      970fca0f
    • simonpj's avatar
      [project @ 2004-12-21 12:22:22 by simonpj] · 79a8b87c
      simonpj authored
      ---------------------------------
           Improve handling of lexically scoped type variables
      	---------------------------------
      
      If we have
      
      	f :: T a -> a
      	f (x :: T b) = ...
      
      then the lexically scoped variable 'b' should refer to the rigid
      type variable 'a', without any intervening wobbliness.  Previously
      the in-scope type variables were always mutable TyVars, which were
      instantatiated to point to the type they were bound to; but since
      the advent of GADTs the intervening mutable type variable is a bad
      thing.
      
      Hence
        * In the type environment, ATyVar now carries a type
        * The call to refineTyVars in tc_pat on SigPatIn
          finds the types by matching
        * Then tcExtendTyVarEnv3 extends the type envt appropriately
      
      Rater a lot of huff and puff, but it's quite natural for ATyVar
      to contain a type.
      
      Various other small nomenclature changes along the way.
      79a8b87c
    • simonpj's avatar
      [project @ 2004-12-21 12:21:16 by simonpj] · d673a348
      simonpj authored
      Comments
      d673a348