1. 15 Mar, 2019 1 commit
  2. 12 Jul, 2018 1 commit
  3. 19 Sep, 2017 1 commit
    • Herbert Valerio Riedel's avatar
      compiler: introduce custom "GhcPrelude" Prelude · f63bc730
      Herbert Valerio Riedel authored
      This switches the compiler/ component to get compiled with
      -XNoImplicitPrelude and a `import GhcPrelude` is inserted in all
      modules.
      
      This is motivated by the upcoming "Prelude" re-export of
      `Semigroup((<>))` which would cause lots of name clashes in every
      modulewhich imports also `Outputable`
      
      Reviewers: austin, goldfire, bgamari, alanz, simonmar
      
      Reviewed By: bgamari
      
      Subscribers: goldfire, rwbarton, thomie, mpickering, bgamari
      
      Differential Revision: https://phabricator.haskell.org/D3989
      f63bc730
  4. 18 Dec, 2016 1 commit
    • Ryan Scott's avatar
      Introduce unboxedSum{Data,Type}Name to template-haskell · b5d788aa
      Ryan Scott authored
      Summary:
      In D2448 (which introduced Template Haskell support for unboxed
      sums), I neglected to add `unboxedSumDataName` and `unboxedSumTypeName`
      functions, since there wasn't any way you could write unboxed sum data or type
      constructors in prefix form to begin with (see #12514). But even if you can't
      write these `Name`s directly in source code, it would still be nice to be able
      to use these `Name`s in Template Haskell (for instance, to be able to treat
      unboxed sum type constructors like any other type constructors).
      
      Along the way, this uncovered a minor bug in `isBuiltInOcc_maybe` in
      `TysWiredIn`, which was calculating the arity of unboxed sum data constructors
      incorrectly.
      
      Test Plan: make test TEST=T12478_5
      
      Reviewers: osa1, goldfire, austin, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2854
      
      GHC Trac Issues: #12478, #12514
      b5d788aa
  5. 01 Sep, 2016 3 commits
  6. 18 Jul, 2016 1 commit
    • Ryan Scott's avatar
      Make okConIdOcc recognize unboxed tuples · 1fc41d32
      Ryan Scott authored
      Summary:
      `okConIdOcc`, which validates that a type or constructor name is valid
      for splicing using Template Haskell, has a special case for tuples, but
      neglects to look for unboxed tuples, causing some sensible Template Haskell
      code involving unboxed tuples to be rejected.
      
      Fixes #12407.
      
      Test Plan: make test TEST=T12407
      
      Reviewers: austin, bgamari, hvr, goldfire
      
      Reviewed By: goldfire
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2410
      
      GHC Trac Issues: #12407
      1fc41d32
  7. 23 Feb, 2016 1 commit
  8. 19 Feb, 2016 1 commit
    • thomie's avatar
      Modifier letter in middle of identifier is ok · d738e664
      thomie authored
      Refactoring only. Cleanup some loose ends from #10196.
      
      Initially the idea was to only allow modifier letters at the end of
      identifiers. Since we later decided to allow modifier letters also in
      the middle of identifiers (because not doing so would not fix the
      regression completely), the names `suffix` and `okIdSuffixChar` don't
      seem appropriate anymore.
      
      Remove TODO. Move test from should_fail to should_compile.
      d738e664
  9. 11 Dec, 2015 1 commit
    • eir@cis.upenn.edu's avatar
      Add kind equalities to GHC. · 67465497
      eir@cis.upenn.edu authored
      This implements the ideas originally put forward in
      "System FC with Explicit Kind Equality" (ICFP'13).
      
      There are several noteworthy changes with this patch:
       * We now have casts in types. These change the kind
         of a type. See new constructor `CastTy`.
      
       * All types and all constructors can be promoted.
         This includes GADT constructors. GADT pattern matches
         take place in type family equations. In Core,
         types can now be applied to coercions via the
         `CoercionTy` constructor.
      
       * Coercions can now be heterogeneous, relating types
         of different kinds. A coercion proving `t1 :: k1 ~ t2 :: k2`
         proves both that `t1` and `t2` are the same and also that
         `k1` and `k2` are the same.
      
       * The `Coercion` type has been significantly enhanced.
         The documentation in `docs/core-spec/core-spec.pdf` reflects
         the new reality.
      
       * The type of `*` is now `*`. No more `BOX`.
      
       * Users can write explicit kind variables in their code,
         anywhere they can write type variables. For backward compatibility,
         automatic inference of kind-variable binding is still permitted.
      
       * The new extension `TypeInType` turns on the new user-facing
         features.
      
       * Type families and synonyms are now promoted to kinds. This causes
         trouble with parsing `*`, leading to the somewhat awkward new
         `HsAppsTy` constructor for `HsType`. This is dispatched with in
         the renamer, where the kind `*` can be told apart from a
         type-level multiplication operator. Without `-XTypeInType` the
         old behavior persists. With `-XTypeInType`, you need to import
         `Data.Kind` to get `*`, also known as `Type`.
      
       * The kind-checking algorithms in TcHsType have been significantly
         rewritten to allow for enhanced kinds.
      
       * The new features are still quite experimental and may be in flux.
      
       * TODO: Several open tickets: #11195, #11196, #11197, #11198, #11203.
      
       * TODO: Update user manual.
      
      Tickets addressed: #9017, #9173, #7961, #10524, #8566, #11142.
      Updates Haddock submodule.
      67465497
  10. 16 Oct, 2015 1 commit
  11. 13 Oct, 2015 1 commit
    • Ryan Scott's avatar
      Make dataToQa aware of Data instances which use functions to implement toConstr · d2f9972a
      Ryan Scott authored
      Trac #10796 exposes a way to make `template-haskell`'s `dataToQa` function
      freak out if using a `Data` instance that produces a `Constr` (by means of
      `toConstr`) using a function name instead of a data constructor name. While
      such `Data` instances are somewhat questionable, they are nevertheless present
      in popular libraries (e.g., `containers`), so we can at least make `dataToQa`
      aware of their existence.
      
      In order to properly distinguish strings which represent variables (as opposed
      to data constructors), it was necessary to move functionality from `Lexeme` (in
      `ghc`) to `GHC.Lexeme` in a new `ghc-boot` library (which was previously named
      `bin-package-db`).
      
      Reviewed By: goldfire, thomie
      
      Differential Revision: https://phabricator.haskell.org/D1313
      
      GHC Trac Issues: #10796
      d2f9972a
  12. 03 Jul, 2015 1 commit
  13. 21 Nov, 2014 1 commit