1. 03 Mar, 2015 1 commit
  2. 10 Feb, 2015 1 commit
  3. 03 Dec, 2014 1 commit
  4. 19 Nov, 2014 1 commit
    • Luite Stegeman's avatar
      use correct word size for shiftRightLogical and removeOp32 · 4dd87c5e
      Luite Stegeman authored
      Summary:
      shiftRightLogical used a host sized Word for the intermediate value,
      which would produce the wrong result when cross compiling to a target
      with a different word size than the host.
      
      removeOp32 used the preprocessor to bake in word size assumptions,
      rather than getting the target word size from DynFlags
      
      Test Plan: validate
      
      Reviewers: hvr, rwbarton, carter, austin
      
      Reviewed By: austin
      
      Subscribers: thomie, carter
      
      Differential Revision: https://phabricator.haskell.org/D502
      
      GHC Trac Issues: #9736
      4dd87c5e
  5. 26 Sep, 2014 1 commit
  6. 09 Sep, 2014 1 commit
    • Austin Seipp's avatar
      Make Applicative a superclass of Monad · d94de872
      Austin Seipp authored
      Summary:
      This includes pretty much all the changes needed to make `Applicative`
      a superclass of `Monad` finally. There's mostly reshuffling in the
      interests of avoid orphans and boot files, but luckily we can resolve
      all of them, pretty much. The only catch was that
      Alternative/MonadPlus also had to go into Prelude to avoid this.
      
      As a result, we must update the hsc2hs and haddock submodules.
      Signed-off-by: default avatarAustin Seipp <austin@well-typed.com>
      
      Test Plan: Build things, they might not explode horribly.
      
      Reviewers: hvr, simonmar
      
      Subscribers: simonmar
      
      Differential Revision: https://phabricator.haskell.org/D13
      d94de872
  7. 15 May, 2014 1 commit
    • Herbert Valerio Riedel's avatar
      Add LANGUAGE pragmas to compiler/ source files · 23892440
      Herbert Valerio Riedel authored
      In some cases, the layout of the LANGUAGE/OPTIONS_GHC lines has been
      reorganized, while following the convention, to
      
      - place `{-# LANGUAGE #-}` pragmas at the top of the source file, before
        any `{-# OPTIONS_GHC #-}`-lines.
      
      - Moreover, if the list of language extensions fit into a single
        `{-# LANGUAGE ... -#}`-line (shorter than 80 characters), keep it on one
        line. Otherwise split into `{-# LANGUAGE ... -#}`-lines for each
        individual language extension. In both cases, try to keep the
        enumeration alphabetically ordered.
        (The latter layout is preferable as it's more diff-friendly)
      
      While at it, this also replaces obsolete `{-# OPTIONS ... #-}` pragma
      occurences by `{-# OPTIONS_GHC ... #-}` pragmas.
      23892440
  8. 13 Mar, 2014 1 commit
  9. 12 Dec, 2013 1 commit
  10. 10 Oct, 2013 1 commit
    • Iavor S. Diatchki's avatar
      Update and clean-up the implmenation of GHC.TypeLits · c3762fa4
      Iavor S. Diatchki authored
      * Replace class `SingI` with two separate classes: `KnownNat` and `KnownSymbol`
      
      * Rename `magicSingId` to `magicDictId`.
      
      * Simplify and clean-up the "magic" implementation.  This version makes
        a lot more sense, at least to me :-)
      
      * Update notes about how it all works:
      
        Note [KnownNat & KnownSymbol and EvLit] explains the evidence for the
        built-in classes
      
        Note [magicDictId magic] explains how we coerce singleton values into
        dictionaries.  This is used to turn run-time integers and strings into
        Proxy singletons of unknwon type (using an existential).
      c3762fa4
  11. 11 Sep, 2013 1 commit
  12. 19 Aug, 2013 1 commit
  13. 14 Aug, 2013 1 commit
    • Jan Stolarek's avatar
      Comparison primops return Int# (Fixes #6135) · 6579a6c7
      Jan Stolarek authored
      This patch modifies all comparison primops for Char#, Int#, Word#, Double#,
      Float# and Addr# to return Int# instead of Bool. A value of 1# represents True
      and 0# represents False. For a more detailed description of motivation for this
      change, discussion of implementation details and benchmarking results please
      visit the wiki page: http://hackage.haskell.org/trac/ghc/wiki/PrimBool
      
      There's also some cleanup: whitespace fixes in files that were extensively edited
      in this patch and constant folding rules for Integer div and mod operators (which
      for some reason have been left out up till now).
      6579a6c7
  14. 12 Aug, 2013 1 commit
  15. 02 Aug, 2013 1 commit
  16. 31 Jul, 2013 1 commit
  17. 19 Jun, 2013 1 commit
  18. 31 May, 2013 1 commit
  19. 30 May, 2013 2 commits
    • Iavor S. Diatchki's avatar
      Add a primitive for coercing values into dictionaries in a special case. · ac330cb6
      Iavor S. Diatchki authored
      The details of this are described in Note [magicSingIId magic] in basicTypes/MkId.lhs
      ac330cb6
    • Simon Peyton Jones's avatar
      Make 'SPECIALISE instance' work again · 1ed04090
      Simon Peyton Jones authored
      This is a long-standing regression (Trac #7797), which meant that in
      particular the Eq [Char] instance does not get specialised.
      (The *methods* do, but the dictionary itself doesn't.)  So when you
      call a function
           f :: Eq a => blah
      on a string type (ie a=[Char]), 7.6 passes a dictionary of un-specialised
      methods.
      
      This only matters when calling an overloaded function from a
      specialised context, but that does matter in some programs.  I
      remember (though I cannot find the details) that Nick Frisby discovered
      this to be the source of some pretty solid performanc regresisons.
      
      Anyway it works now. The key change is that a DFunUnfolding now takes
      a form that is both simpler than before (the DFunArg type is eliminated)
      and more general:
      
      data Unfolding
        = ...
        | DFunUnfolding {     -- The Unfolding of a DFunId
          			-- See Note [DFun unfoldings]
            		  	--     df = /\a1..am. \d1..dn. MkD t1 .. tk
                              --                                 (op1 a1..am d1..dn)
           		      	--     	    	      	       	   (op2 a1..am d1..dn)
              df_bndrs :: [Var],      -- The bound variables [a1..m],[d1..dn]
              df_con   :: DataCon,    -- The dictionary data constructor (never a newtype datacon)
              df_args  :: [CoreExpr]  -- Args of the data con: types, superclasses and methods,
          }                           -- in positional order
      
      That in turn allowed me to re-enable the DFunUnfolding specialisation in
      DsBinds.  Lots of details here in TcInstDcls:
      	  Note [SPECIALISE instance pragmas]
      
      I also did some refactoring, in particular to pass the InScopeSet to
      exprIsConApp_maybe (which in turn means it has to go to a RuleFun).
      
      NB: Interface file format has changed!
      1ed04090
  20. 18 Feb, 2013 1 commit
  21. 24 Jan, 2013 1 commit
    • Simon Peyton Jones's avatar
      Introduce CPR for sum types (Trac #5075) · d3b8991b
      Simon Peyton Jones authored
      The main payload of this patch is to extend CPR so that it
      detects when a function always returns a result constructed
      with the *same* constructor, even if the constructor comes from
      a sum type.  This doesn't matter very often, but it does improve
      some things (results below).
      
      Binary sizes increase a little bit, I think because there are more
      wrappers.  This with -split-objs.  Without split-ojbs binary sizes
      increased by 6% even for HelloWorld.hs.  It's hard to see exactly why,
      but I think it was because System.Posix.Types.o got included in the
      linked binary, whereas it didn't before.
      
              Program           Size    Allocs   Runtime   Elapsed  TotalMem
                fluid          +1.8%     -0.3%      0.01      0.01     +0.0%
                  tak          +2.2%     -0.2%      0.02      0.02     +0.0%
                 ansi          +1.7%     -0.3%      0.00      0.00     +0.0%
            cacheprof          +1.6%     -0.3%     +0.6%     +0.5%     +1.4%
              parstof          +1.4%     -4.4%      0.00      0.00     +0.0%
              reptile          +2.0%     +0.3%      0.02      0.02     +0.0%
      ----------------------------------------------------------------------
                  Min          +1.1%     -4.4%     -4.7%     -4.7%    -15.0%
                  Max          +2.3%     +0.3%     +8.3%     +9.4%    +50.0%
       Geometric Mean          +1.9%     -0.1%     +0.6%     +0.7%     +0.3%
      
      Other things in this commit
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~
      * Got rid of the Lattice class in Demand
      
      * Refactored the way that products and newtypes are
        decomposed (no change in functionality)
      d3b8991b
  22. 09 Jan, 2013 1 commit
  23. 14 Dec, 2012 1 commit
  24. 21 Oct, 2012 5 commits
  25. 19 Oct, 2012 1 commit
  26. 16 Oct, 2012 1 commit
    • ian@well-typed.com's avatar
      Some alpha renaming · cd33eefd
      ian@well-typed.com authored
      Mostly d -> g (matching DynFlag -> GeneralFlag).
      Also renamed if* to when*, matching the Haskell if/when names
      cd33eefd
  27. 09 Oct, 2012 1 commit
  28. 19 Sep, 2012 1 commit
  29. 17 Sep, 2012 3 commits
  30. 27 Jul, 2012 1 commit
  31. 26 Jul, 2012 1 commit
    • pcapriotti's avatar
      Migrate more rules to PrelRules. · 4f811e1a
      pcapriotti authored
      Move the following primop rules from GHC.Base to PrelRules:
      
      "narrow32Int#"  forall x#. narrow32Int#   x# = x#
      "narrow32Word#" forall x#. narrow32Word#   x# = x#
      
      "int2Word2Int"  forall x#. int2Word# (word2Int# x#) = x#
      "word2Int2Word" forall x#. word2Int# (int2Word# x#) = x#
      4f811e1a
  32. 24 Jul, 2012 2 commits