1. 10 May, 2007 1 commit
  2. 02 Jul, 2007 3 commits
  3. 30 Jun, 2007 1 commit
  4. 29 Jun, 2007 1 commit
  5. 28 Jun, 2007 1 commit
  6. 29 Jun, 2007 1 commit
    • chevalier@alum.wellesley.edu's avatar
      Further compileToCore improvements · 78f4da28
      chevalier@alum.wellesley.edu authored
      Per suggestions from Simon M:
      * Changed GHC.checkModule so that it doesn't call depanal.
      * Changed GHC.checkModule to optionally return Core bindings
      as a component of the CheckedModule that it returns (and 
      resulting changes to HscMain.hscFileCheck).
      * As a result, simplified GHC.compileToCore and changed it
      to load the given file so that the caller doesn't have to.
  7. 27 Jun, 2007 4 commits
  8. 26 Jun, 2007 1 commit
  9. 25 Jun, 2007 3 commits
    • chevalier@alum.wellesley.edu's avatar
      Add a compileToCore function to the GHC API · d7230e53
      chevalier@alum.wellesley.edu authored
      Added a compileToCore function to the GHC API that takes a
        session, module, and filename, and returns a list of Core
        bindings if successful. This is just a first try and could
        probably be improved (for example, there's probably a way to
        get the filename from the module so that it doesn't have to 
        be passed in, I just don't see it offhand.)
    • simonpj@microsoft.com's avatar
      Print infix type constructors in an infix way · b15724ad
      simonpj@microsoft.com authored
      Fixes Trac #1425.  The printer for types doesn't know about fixities.
      (It could be educated to know, but it doesn't at the moment.)  So it
      treats all infix tycons as of precedence less than application and function
      I took a slight shortcut and reused function-arrow prededence, so I think
      you may get
      	T -> T :% T
      	T -> (T :% T)
      If that becomes a problem we can fix it.
    • simonpj@microsoft.com's avatar
      Clamp -O flag to beween 0 and 2 · 75ebc06a
      simonpj@microsoft.com authored
      Fixes Trac #1272
  10. 22 Jun, 2007 2 commits
  11. 21 Jun, 2007 3 commits
    • simonpj@microsoft.com's avatar
      -fglasgow-exts implies -X=GADTs · 5e8d76a6
      simonpj@microsoft.com authored
    • David Himmelstrup's avatar
      Add several new record features · 2eb04ca0
      David Himmelstrup authored
      1. Record disambiguation (-fdisambiguate-record-fields)
      In record construction and pattern matching (although not
      in record updates) it is clear which field name is intended
      even if there are several in scope.  This extension uses
      the constructor to disambiguate.  Thus
      	C { x=3 }
      uses the 'x' field from constructor C (assuming there is one)
      even if there are many x's in scope.
      2. Record punning (-frecord-puns)
      In a record construction or pattern match or update you can 
      omit the "=" part, thus
      	C { x, y }
      This is just syntactic sugar for
      	C { x=x, y=y }
      3.  Dot-dot notation for records (-frecord-dot-dot)
      In record construction or pattern match (but not update) 
      you can use ".." to mean "all the remaining fields".  So
      	C { x=v, .. }
      means to fill in the remaining fields to give
      	C { x=v, y=y }
      (assuming C has fields x and y).  This might reasonably
      considered very dodgy stuff.  For pattern-matching it brings
      into scope a bunch of things that are not explictly mentioned;
      and in record construction it just picks whatver 'y' is in
      scope for the 'y' field.   Still, Lennart Augustsson really
      wants it, and it's a feature that is extremely easy to explain.
      I thought of using the "parent" field in the GlobalRdrEnv, but
      that's really used for import/export and just isn't right for this.
      For example, for import/export a field is a subordinate of the *type
      constructor* whereas here we need to know what fields belong to a
      particular *data* constructor.
      The main thing is that we need to map a data constructor to its
      fields, and we need to do so in the renamer.   For imported modules
      it's easy: just look in the imported TypeEnv.  For the module being
      compiled, we make a new field tcg_field_env in the TcGblEnv.
      The important functions are
      There is still a significant infelicity in the way the renamer
      works on patterns, which I'll tackle next.
      I also did quite a bit of refactoring in the representation of
      record fields (mainly in HsPat).***END OF DESCRIPTION***
      Place the long patch description above the ***END OF DESCRIPTION*** marker.
      The first line of this file will be the patch name.
      This patch contains the following changes:
      M ./compiler/deSugar/Check.lhs -3 +5
      M ./compiler/deSugar/Coverage.lhs -6 +7
      M ./compiler/deSugar/DsExpr.lhs -6 +13
      M ./compiler/deSugar/DsMeta.hs -8 +8
      M ./compiler/deSugar/DsUtils.lhs -1 +1
      M ./compiler/deSugar/MatchCon.lhs -2 +2
      M ./compiler/hsSyn/Convert.lhs -3 +3
      M ./compiler/hsSyn/HsDecls.lhs -9 +25
      M ./compiler/hsSyn/HsExpr.lhs -13 +3
      M ./compiler/hsSyn/HsPat.lhs -25 +63
      M ./compiler/hsSyn/HsUtils.lhs -3 +3
      M ./compiler/main/DynFlags.hs +6
      M ./compiler/parser/Parser.y.pp -13 +17
      M ./compiler/parser/RdrHsSyn.lhs -16 +18
      M ./compiler/rename/RnBinds.lhs -2 +2
      M ./compiler/rename/RnEnv.lhs -22 +82
      M ./compiler/rename/RnExpr.lhs -34 +12
      M ./compiler/rename/RnHsSyn.lhs -3 +2
      M ./compiler/rename/RnSource.lhs -50 +78
      M ./compiler/rename/RnTypes.lhs -50 +84
      M ./compiler/typecheck/TcExpr.lhs -18 +18
      M ./compiler/typecheck/TcHsSyn.lhs -20 +21
      M ./compiler/typecheck/TcPat.lhs -8 +6
      M ./compiler/typecheck/TcRnMonad.lhs -6 +15
      M ./compiler/typecheck/TcRnTypes.lhs -2 +11
      M ./compiler/typecheck/TcTyClsDecls.lhs -3 +4
      M ./docs/users_guide/flags.xml +7
      M ./docs/users_guide/glasgow_exts.xml +42
    • simonpj@microsoft.com's avatar
  12. 20 Jun, 2007 4 commits
    • simonpj@microsoft.com's avatar
    • simonpj@microsoft.com's avatar
      Use -X for language extensions · 5e05865d
      simonpj@microsoft.com authored
      We've often talked about having a separate flag for language extensions,
      and now we have one. You can say
      as you like.  These replace the "-f" flags with similar names (though
      the -f prefix will serve as a synonym for -X for a while).  
      There's an optional "=", and the flag is normalised by removing hyphens
      and lower-casing, so all the above variants mean the same thing.
      The nomenclature is intended to match the LANGUAGE pramgas, which are
      defined by Cabal.  So you can also say
      	{-# LANGUAGE ImplicitParams #-}
      But Cabal doesn't have as many language options as GHC does, so the -X
      things are a superset of the LANGUAGE things.
      The optional "=" applies to all flags that take an argument, so you can,
      for example, say
      I hope that's ok.  (It's an unforced change; just fitted in.)
      I hope we'll add more -X flags, to replace the portmanteau -fglasgow-exts 
      which does everything!  
      I have updated the manual, but doubtless missed something.
    • andy@galois.com's avatar
    • andy@galois.com's avatar
      Turning off case liberation when using the hpc option, for now · d363c1fc
      andy@galois.com authored
      Consider the following code
           f = g (case v of
                    V a b -> a : t f)
      where g is expensive. Liberate case will turn this into
           f = g (case v of
                   V a b -> a : t (letrec f = g (case v of
                                                 V a b -> a : f t)
                                    in f)
      Yikes! We evaluate g twice. This leads to a O(2^n) explosion
      if g calls back to the same code recursively.
      This happen sometimes in HPC, because every tick is a liberate-able case,
      but is a general problem to case liberation (I think). 
  13. 12 Jun, 2007 1 commit
    • Ian Lynagh's avatar
      Tweak banner printing · cedd4187
      Ian Lynagh authored
      * -{short,long}-ghci-banner are now dynamic options, so you can put
        ":set -short-ghci-banner" in .ghci
      * The -v2 banner information now always tells you what compiler booted GHC,
        and what stage the compiler is. Thus we no longer assume that stage > 1
        iff GHCI is defined.
  14. 01 Jun, 2007 1 commit
  15. 05 Jun, 2007 2 commits
  16. 01 Jun, 2007 1 commit
  17. 30 May, 2007 1 commit
  18. 22 May, 2007 1 commit
  19. 18 May, 2007 1 commit
    • Simon Marlow's avatar
      FIX: break011. · 27ebe4c5
      Simon Marlow authored
      Reset the exception flag before re-throwing the exception unless it
      was "Interrupted".  This avoids needing the double :continue for
      ordinary exceptions, but still lets us break on ^C.
  20. 17 May, 2007 2 commits
  21. 15 May, 2007 1 commit
    • Simon Marlow's avatar
      GHCi debugger: new flag -fbreak-on-exception · 17f848e1
      Simon Marlow authored
      When -fbreak-on-exception is set, an exception will cause GHCi to
      suspend the current computation and return to the prompt, where the
      history of the current evaluation can be inspected (if we are in
      :trace).  This isn't on by default, because the behaviour could be
      confusing: for example, ^C will cause a breakpoint.  It can be very
      useful for finding the cause of a "head []" or a "fromJust Nothing",
  22. 14 May, 2007 3 commits
  23. 11 May, 2007 1 commit