1. 03 Sep, 2015 1 commit
  2. 17 Dec, 2014 1 commit
  3. 03 Dec, 2014 1 commit
  4. 05 Nov, 2014 1 commit
  5. 07 Oct, 2014 1 commit
  6. 21 Sep, 2014 1 commit
  7. 12 Jun, 2014 1 commit
  8. 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
  9. 05 Mar, 2014 1 commit
    • Joachim Breitner's avatar
      Major Call Arity rework · cb8a63cb
      Joachim Breitner authored
      This patch improves the call arity analysis in various ways.
      
      Most importantly, it enriches the analysis result information so that
      when looking at a call, we do not have to make a random choice about
      what side we want to take the information from. Instead we can combine
      the results in a way that does not lose valuable information.
      
      To do so, besides the incoming arities, we store remember "what can be
      called with what", i.e. an undirected graph between the (interesting)
      free variables of an expression. Of course it makes combining the
      results a bit more tricky (especially mutual recursion), but still
      doable.
      
      The actually implemation of the graph structure is abstractly put away
      in a module of its own (UnVarGraph.hs)
      
      The implementation is geared towards efficiently representing the graphs
      that we need (which can contain large complete and large complete
      bipartite graphs, which would be huge in other representations). If
      someone feels like designing data structures: There is surely some
      speed-up to be obtained by improving that data structure.
      
      Additionally, the analysis now takes into account that if a RHS stays a
      thunk, then its calls happen only once, even if the variables the RHS is
      bound to is evaluated multiple times, or is part of a recursive group.
      cb8a63cb
  10. 20 Jan, 2014 1 commit
    • Gergő Érdi's avatar
      Implement pattern synonyms · 4f8369bf
      Gergő Érdi authored
      This patch implements Pattern Synonyms (enabled by -XPatternSynonyms),
      allowing y ou to assign names to a pattern and abstract over it.
      
      The rundown is this:
      
        * Named patterns are introduced by the new 'pattern' keyword, and can
          be either *unidirectional* or *bidirectional*. A unidirectional
          pattern is, in the simplest sense, simply an 'alias' for a pattern,
          where the LHS may mention variables to occur in the RHS. A
          bidirectional pattern synonym occurs when a pattern may also be used
          in expression context.
      
        * Unidirectional patterns are declared like thus:
      
              pattern P x <- x:_
      
          The synonym 'P' may only occur in a pattern context:
      
              foo :: [Int] -> Maybe Int
              foo (P x) = Just x
              foo _     = Nothing
      
        * Bidirectional patterns are declared like thus:
      
              pattern P x y = [x, y]
      
          Here, P may not only occur as a pattern, but also as an expression
          when given values for 'x' and 'y', i.e.
      
              bar :: Int -> [Int]
              bar x = P x 10
      
        * Patterns can't yet have their own type signatures; signatures are inferred.
      
        * Pattern synonyms may not be recursive, c.f. type synonyms.
      
        * Pattern synonyms are also exported/imported using the 'pattern'
          keyword in an import/export decl, i.e.
      
              module Foo (pattern Bar) where ...
      
          Note that pattern synonyms share the namespace of constructors, so
          this disambiguation is required as a there may also be a 'Bar'
          type in scope as well as the 'Bar' pattern.
      
        * The semantics of a pattern synonym differ slightly from a typical
          pattern: when using a synonym, the pattern itself is matched,
          followed by all the arguments. This means that the strictness
          differs slightly:
      
              pattern P x y <- [x, y]
      
              f (P True True) = True
              f _             = False
      
              g [True, True] = True
              g _            = False
      
          In the example, while `g (False:undefined)` evaluates to False,
          `f (False:undefined)` results in undefined as both `x` and `y`
          arguments are matched to `True`.
      
      For more information, see the wiki:
      
          https://ghc.haskell.org/trac/ghc/wiki/PatternSynonyms
          https://ghc.haskell.org/trac/ghc/wiki/PatternSynonyms/Implementation
      
      Reviewed-by: Simon Peyton Jones's avatarSimon Peyton Jones <simonpj@microsoft.com>
      Signed-off-by: default avatarAustin Seipp <austin@well-typed.com>
      4f8369bf
  11. 12 Jan, 2014 1 commit
  12. 16 Dec, 2013 1 commit
  13. 02 Aug, 2013 1 commit
  14. 01 Nov, 2012 1 commit
  15. 28 Aug, 2012 1 commit
  16. 05 Aug, 2012 1 commit
  17. 26 Feb, 2012 1 commit
  18. 28 Nov, 2011 1 commit
    • dimitris's avatar
      This patch includes: · f3183d9a
      dimitris authored
      0) Typo in panic message.
      1) prioritization of equalities over family equalities in the worklists.
      2) rewriting of inert substitutions and solveds on-the-spot instead of
         kicking them out in the inerts. This required a monadic map over
         substitutions hence the modifications in UniqFM.
      3) Just comments and removing stale commented code.
      
      4) Useful SCC for simplifyInfer.
      
      5) Making CoreStats outputable.
      f3183d9a
  19. 04 Nov, 2011 1 commit
  20. 28 Jul, 2011 1 commit
  21. 12 Jul, 2011 1 commit
  22. 29 Jun, 2011 1 commit
  23. 13 Apr, 2011 1 commit
  24. 11 Apr, 2011 1 commit
  25. 15 Dec, 2010 1 commit
  26. 04 May, 2010 1 commit
    • Ian Lynagh's avatar
      Fix build with GHC 6.10 · 63dde2e3
      Ian Lynagh authored
      In GHC 6.10, intersectionWith is (a -> b -> a) instead of (a -> b -> c),
      so we need to jump through some hoops to get the more general type.
      63dde2e3
  27. 03 May, 2010 1 commit
    • milan's avatar
      Replace FiniteMap and UniqFM with counterparts from containers. · 5ff8ce7f
      milan authored
      The original interfaces are kept. There is small performance improvement:
      - when compiling for five nofib, we get following speedups:
          Average                -----           -2.5%
          Average                -----           -0.6%
          Average                -----           -0.5%
          Average                -----           -5.5%
          Average                -----          -10.3%
      - when compiling HPC ten times, we get:
          switches                          oldmaps   newmaps
          -O -fasm                          117.402s  116.081s (98.87%)
          -O -fasm -fregs-graph             119.993s  118.735s (98.95%)
          -O -fasm -fregs-iterative         120.191s  118.607s (98.68%)
      5ff8ce7f
  28. 04 Dec, 2009 1 commit
  29. 24 Apr, 2009 1 commit
  30. 04 Sep, 2008 1 commit
    • dias@eecs.harvard.edu's avatar
      add assertion to check that UniqFM is only passed "positive" uniques · 8b7a0a10
      dias@eecs.harvard.edu authored
      The insertion code in UniqFM fails if a unique key
      produces a negative FastInt. I've added an assertion to check
      that each insertion uses a positive Unique.
      
      Where do the negative uniques come from? Both Simom M and
      I have run into this problem when computing hashes for data structures.
      In both cases, we have avoided the problem by ensuring that
      the hashes remain positive.
      8b7a0a10
  31. 31 Jul, 2008 1 commit
  32. 29 Mar, 2008 1 commit
  33. 25 Feb, 2008 1 commit
  34. 06 Feb, 2008 1 commit
  35. 03 Feb, 2008 2 commits
  36. 02 Feb, 2008 1 commit
  37. 17 Jan, 2008 1 commit
    • Isaac Dupree's avatar
      lots of portability changes (#1405) · 206b4dec
      Isaac Dupree authored
      re-recording to avoid new conflicts was too hard, so I just put it
      all in one big patch :-(  (besides, some of the changes depended on
      each other.)  Here are what the component patches were:
      
      Fri Dec 28 11:02:55 EST 2007  Isaac Dupree <id@isaac.cedarswampstudios.org>
        * document BreakArray better
      
      Fri Dec 28 11:39:22 EST 2007  Isaac Dupree <id@isaac.cedarswampstudios.org>
        * properly ifdef BreakArray for GHCI
      
      Fri Jan  4 13:50:41 EST 2008  Isaac Dupree <id@isaac.cedarswampstudios.org>
        * change ifs on __GLASGOW_HASKELL__ to account for... (#1405)
        for it not being defined. I assume it being undefined implies
        a compiler with relatively modern libraries but without most
        unportable glasgow extensions.
      
      Fri Jan  4 14:21:21 EST 2008  Isaac Dupree <id@isaac.cedarswampstudios.org>
        * MyEither-->EitherString to allow Haskell98 instance
      
      Fri Jan  4 16:13:29 EST 2008  Isaac Dupree <id@isaac.cedarswampstudios.org>
        * re-portabilize Pretty, and corresponding changes
      
      Fri Jan  4 17:19:55 EST 2008  Isaac Dupree <id@isaac.cedarswampstudios.org>
        * Augment FastTypes to be much more complete
      
      Fri Jan  4 20:14:19 EST 2008  Isaac Dupree <id@isaac.cedarswampstudios.org>
        * use FastFunctions, cleanup FastString slightly
      
      Fri Jan  4 21:00:22 EST 2008  Isaac Dupree <id@isaac.cedarswampstudios.org>
        * Massive de-"#", mostly Int# --> FastInt (#1405)
      
      Fri Jan  4 21:02:49 EST 2008  Isaac Dupree <id@isaac.cedarswampstudios.org>
        * miscellaneous unnecessary-extension-removal
      
      Sat Jan  5 19:30:13 EST 2008  Isaac Dupree <id@isaac.cedarswampstudios.org>
        * add FastFunctions
      206b4dec
  38. 15 Sep, 2007 1 commit
  39. 05 Sep, 2007 1 commit