1. 28 Jan, 2014 8 commits
  2. 27 Jan, 2014 1 commit
  3. 26 Jan, 2014 4 commits
  4. 23 Jan, 2014 9 commits
  5. 22 Jan, 2014 8 commits
  6. 21 Jan, 2014 1 commit
    • Austin Seipp's avatar
      Fix #8677 (fallout from #8180) · 0a2d323c
      Austin Seipp authored
      When using TemplateHaskell and -prof, we *do not* want -dynamic-too, because
      we're going to *expect* that you compiled the vanilla/dyn way already,
      and are compiling profiling the second time (i.e. so GHCi can just load
      the normal, non-profiled object files.)
      Signed-off-by: default avatarAustin Seipp <austin@well-typed.com>
      0a2d323c
  7. 20 Jan, 2014 6 commits
    • cactus's avatar
    • cactus's avatar
      Implement pattern synonyms · 4f8369bf
      cactus 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/ImplementationReviewed-by: Simon Peyton Jones's avatarSimon Peyton Jones <simonpj@microsoft.com>
      Signed-off-by: default avatarAustin Seipp <austin@well-typed.com>
      4f8369bf
    • Joachim Breitner's avatar
    • Joachim Breitner's avatar
      Test case for #T7619 · da66a8df
      Joachim Breitner authored
      (artificial test cases are so nice: 90.7% improvement!)
      da66a8df
    • Joachim Breitner's avatar
      Simplify doCorePass · 0c578870
      Joachim Breitner authored
      0c578870
    • Joachim Breitner's avatar
      Make worker-wrapper unbox data families · 2bb19fad
      Joachim Breitner authored
      by passing the FamInstEnvs all the way down. This closes #7619.
      2bb19fad
  8. 19 Jan, 2014 1 commit
  9. 18 Jan, 2014 1 commit
    • pali.gabor@gmail.com's avatar
      Fix #8451 · 1ad599ea
      pali.gabor@gmail.com authored
      On FreeBSD, /usr/lib has to be added to the library path on linking when
      libthr is needed but -nostdlib is used (which is the case when the -prof
      and -threaded flags are combined).
      1ad599ea
  10. 17 Jan, 2014 1 commit