1. 22 Mar, 2013 2 commits
  2. 18 Mar, 2013 2 commits
  3. 17 Mar, 2013 2 commits
    • PHO's avatar
      Enable Opt_PIC for the dyn way regardless of OSes. · 84df08de
      PHO authored
      We were previously enabling Opt_PIC on certain OSes namely Windows,
      Darwin and Linux, but it should always be enabled for the dyn way
      because it makes no sense to try to generate non-PIC dynamic
      libraries, which is usually impossible.
    • PHO's avatar
      Remove a bitrotted hack for OpenBSD and NetBSD regarding the dyn way. · ae3dcaf5
      PHO authored
      On OpenBSD and NetBSD, we were accidentally passing "-optl-pthread" to
      the gcc to build dynamic libraries because of a bitrotted hack for
      those OSes, which resulted in a weird situation where every dynamic
      library is named "ptl-pthread" and placed at "$(TOP)".
      The hack in question were to work around a linkage problem with
      libHSffi, but we no longer build it and just use libffi these days so
      the hack can safely be removed.
  4. 16 Mar, 2013 2 commits
  5. 15 Mar, 2013 2 commits
  6. 13 Mar, 2013 1 commit
  7. 09 Mar, 2013 2 commits
  8. 08 Mar, 2013 1 commit
  9. 03 Mar, 2013 1 commit
  10. 24 Feb, 2013 1 commit
  11. 14 Feb, 2013 1 commit
    • Simon Peyton Jones's avatar
      Add OverloadedLists, allowing list syntax to be overloaded · 3234a4ad
      Simon Peyton Jones authored
      This work was all done by
         Achim Krause <achim.t.krause@gmail.com>
         George Giorgidze <giorgidze@gmail.com>
         Weijers Jeroen <jeroen.weijers@uni-tuebingen.de>
      It allows list syntax, such as [a,b], [a..b] and so on, to be
      overloaded so that it works for a variety of types.
      The design is described here:
      Eg. you can use it for maps, so that
              [(1,"foo"), (4,"bar")] :: Map Int String
      The main changes
       * The ExplicitList constructor of HsExpr gets witness field
       * Ditto ArithSeq constructor
       * Ditto the ListPat constructor of HsPat
      Everything else flows from this.
  12. 12 Feb, 2013 1 commit
    • jpm@cs.ox.ac.uk's avatar
      Implement poly-kinded Typeable · 72b0ba09
      jpm@cs.ox.ac.uk authored
      This patch makes the Data.Typeable.Typeable class work with arguments of any
      kind. In particular, this removes the Typeable1..7 class hierarchy, greatly
      simplyfing the whole Typeable story. Also added is the AutoDeriveTypeable
      language extension, which will automatically derive Typeable for all types and
      classes declared in that module. Since there is now no good reason to give
      handwritten instances of the Typeable class, those are ignored (for backwards
      compatibility), and a warning is emitted.
      The old, kind-* Typeable class is now called OldTypeable, and lives in the
      Data.OldTypeable module. It is deprecated, and should be removed in some future
      version of GHC.
  13. 08 Feb, 2013 2 commits
  14. 05 Feb, 2013 1 commit
    • chak@cse.unsw.edu.au.'s avatar
      Remove '-favoid-vect' and add '-fvectorisation-avoidance' · 874bb7e3
      chak@cse.unsw.edu.au. authored
      * By default '-fvectorisation-avoidance' is enabled at all optimisation levels (but it only matters in combination with '-fvectorise').
      * The new vectoriser always uses vectorisation avoidance, but with '-fno-vectorisation-avoidance' it restricts it to simple scalar applications (and dictionary computations)
  15. 30 Jan, 2013 1 commit
  16. 29 Jan, 2013 1 commit
  17. 25 Jan, 2013 1 commit
  18. 17 Jan, 2013 3 commits
  19. 11 Jan, 2013 1 commit
  20. 10 Jan, 2013 1 commit
    • tibbe's avatar
      Add preprocessor defines when SSE is enabled · bab8dc79
      tibbe authored
      This will add the following preprocessor defines when Haskell source
      files are compiled:
       * __SSE__ - If any version of SSE is enabled
       * __SSE2__ - If SSE2 or greater is enabled
       * __SSE4_2_ - If SSE4.2 is enabled
      Note that SSE2 is enabled by default on x86-64.
  21. 08 Jan, 2013 1 commit
    • Simon Peyton Jones's avatar
      Re-engineer the ambiguity test for user type signatures · 97db0edc
      Simon Peyton Jones authored
      Two main changes. First, re-engineer the ambiguity test.  Previously
      TcMType.checkAmbiguity used a rather syntactic test to detect some
      types that are certainly ambiguous.  But a much easier test is available,
      and it is used for inferred types in TcBinds. Namely
          <type> is ambiguous
         <type> `TcUnify.isSubType` <type>
      fails to hold, where "isSubType" means "is provably more polymorphic than".
            C a => Int
      is ambiguous, because isSubType instantiates the (C a => Int)
      to (C alpha => Int) and then tries to deduce (C alpha) from (C a). This is
      Martin Sulzmann's definition of ambiguity.  (Defn 10 of "Understanding
      functional dependencies via constraint handling rules", JFP.)
      This change is neat, reduces code, and correctly rejects more programs.
      However is *is* just possible to have a useful program that would be
      rejected. For example
                class C a b
                f :: C Int b => Int -> Int
      Here 'f' would be rejected as having an ambiguous type. But it is
      just possible that, at a *call* site there might be an instance
      declaration  instance C Int b, which does not constrain 'b' at all.
      This is pretty strange -- why is 'b' overloaded at all? -- but it's
      possible, so I also added a flag -XAllowAmbiguousTypes that simply
      removes the ambiguity check.  Let's see if anyone cares.  Meanwhile
      the earlier error report will be useful for everyone else.
      A handful of regression tests had to be adjusted as a result, because
      they used ambiguous types, somewhat accidentally.
      Second, split TcMType (already too large) into two
        * TcMType: a low-level module dealing with monadic operations like
          zonking, creating new evidence variables, etc
        * TcValidity: a brand-new higher-level module dealing with
          validity checking for types: checkValidType, checkValidInstance,
          checkFamInstPats etc
      Apart from the fact that TcMType was too big, this allows TcValidity
      to import TcUnify(tcSubType) without causing a loop.
  22. 04 Jan, 2013 1 commit
    • Simon Peyton Jones's avatar
      Allow empty case expressions (and lambda-case) with -XEmptyCase · 3671e674
      Simon Peyton Jones authored
      The main changes are:
        * Parser accepts empty case alternatives
        * Renamer checks that -XEmptyCase is on in that case
        * (Typechecker is pretty much unchanged.)
        * Desugarer desugars empty case alternatives, esp:
            - Match.matchWrapper and Match.match now accept empty eqns
            - New function matchEmpty deals with the empty case
            - See Note [Empty case alternatives] in Match
      This patch contains most of the work, but it's a bit mixed up
      with a refactoring of MatchGroup that I did at the same time
      (next commit).
  23. 02 Jan, 2013 1 commit
  24. 24 Dec, 2012 1 commit
  25. 19 Dec, 2012 2 commits
    • mad.one@gmail.com's avatar
      Rename all of the 'cmmz' flags and make them more consistent. · f6f881f0
      mad.one@gmail.com authored
      There's only a single compiler backend now, so the 'z' suffix means
      nothing. Also, the flags were confusingly named ('cmm-foo' vs
      'foo-cmm',) and counter-intuitively, '-ddump-cmm' did not do at all what
      you expected since the new backend went live.
      Basically, all of the -ddump-cmmz-* flags are now -ddump-cmm-*. Some were
      renamed to be more consistent.
      This doesn't update the manual; it already mentions '-ddump-cmm' and
      that flag implies all the others anyway, which is probably what you
      Signed-off-by: mad.one@gmail.com's avatarAustin Seipp <mad.one@gmail.com>
    • Simon Peyton Jones's avatar
      Wibbles to faa8ff40 (UNPACK pragmas) · b5853125
      Simon Peyton Jones authored
      Nothing big here, just tidying up deetails
  26. 16 Dec, 2012 1 commit
  27. 14 Dec, 2012 2 commits
    • ian@well-typed.com's avatar
      Implement the slow mode of -dynamic-too · bcf7123a
      ian@well-typed.com authored
      I'm not sure if making an entirely new HscEnv is too large a hammer,
      but it works for now.
    • Simon Peyton Jones's avatar
      Major refactoring of the way that UNPACK pragmas are handled · faa8ff40
      Simon Peyton Jones authored
      The situation was pretty dire.  The way in which data constructors
      were handled, notably the mapping between their *source* argument types
      and their *representation* argument types (after seq'ing and unpacking)
      was scattered in three different places, and hard to keep in sync.
      Now it is all in one place:
       * The dcRep field of a DataCon gives its representation,
         specified by a DataConRep
       * As well as having the wrapper, the DataConRep has a "boxer"
         of type DataConBoxer (defined in MkId for loopy reasons).
         The boxer used at a pattern match to reconstruct the source-level
         arguments from the rep-level bindings in the pattern match.
       * The unboxing in the wrapper and the boxing in the boxer are dual,
         and are now constructed together, by MkId.mkDataConRep. This is
         the key function of this change.
       * All the computeBoxingStrategy code in TcTyClsDcls disappears.
      Much nicer.
      There is a little bit of refactoring left to do; the strange
      deepSplitProductType functions are now called only in WwLib, so
      I moved them there, and I think they could be tidied up further.
  28. 11 Dec, 2012 1 commit
  29. 08 Dec, 2012 1 commit