1. 10 Feb, 2015 1 commit
    • Simon Peyton Jones's avatar
      Refactor the handling of quasi-quotes · f46360ed
      Simon Peyton Jones authored
      As Trac #10047 points out, a quasi-quotation [n|...blah...|] is supposed
      to behave exactly like $(n "...blah...").  But it doesn't!  This was outright
      wrong: quasiquotes were being run even inside brackets.
      
      Now that TH supports both typed and untyped splices, a quasi-quote is properly
      regarded as a particular syntax for an untyped splice. But apart from that
      they should be treated the same.  So this patch refactors the handling of
      quasiquotes to do just that.
      
      The changes touch quite a lot of files, but mostly in a routine way.
      The biggest changes by far are in RnSplice, and more minor changes in
      TcSplice.  These are the places where there was real work to be done.
      Everything else is routine knock-on changes.
      
      * No more QuasiQuote forms in declarations, expressions, types, etc.
        So we get rid of these data constructors
          * HsBinds.QuasiQuoteD
          * HsExpr.HsSpliceE
          * HsPat.QuasiQuotePat
          * HsType.HsQuasiQuoteTy
      
      * We get rid of the HsQuasiQuote type altogether
      
      * Instead, we augment the HsExpr.HsSplice type to have three
        consructors, for the three types of splice:
          * HsTypedSplice
          * HsUntypedSplice
          * HsQuasiQuote
        There are some related changes in the data types in HsExpr near HsSplice.
        Specifically: PendingRnSplice, PendingTcSplice, UntypedSpliceFlavour.
      
      * In Hooks, we combine rnQuasiQuoteHook and rnRnSpliceHook into one.
        A smaller, clearer interface.
      
      * We have to update the Haddock submodule, to accommodate the hsSyn changes
      f46360ed
  2. 13 Jan, 2015 1 commit
    • GregWeber's avatar
      add -th-file which generates a th.hs file · 07ace5c2
      GregWeber authored
      Summary:
      see Trac #8624
      
      similar functionality is now available
      with -ddump-to-file -ddump-splices
      
      However, users are already accustomed to -ddump-splices
      having a particular format, and this format is not completely valid code
      The goal of -th-file is to dump valid Haskell code
      
      Additionally, the convention of -ddump-to-file is to name the file after
      the flag, so the file is .dump-splices
      Given that the goal of the new flag is to generate valid Haskell,
      The extension should be .hs
      
      Additionally, -ddump-to-file effects all other dump flags
      
      Test Plan:
      look at the output of using the -th-file flag
      and compare it to the output of using -ddump-to-file and -ddump-splices
      I want to add test cases, but just need some pointers on getting started there
      
      Reviewers: thomie, goldfire, simonpj, austin
      
      Reviewed By: simonpj, austin
      
      Subscribers: thomie, carter
      
      Differential Revision: https://phabricator.haskell.org/D518
      
      GHC Trac Issues: #8624
      07ace5c2
  3. 19 Dec, 2014 1 commit
  4. 10 Dec, 2014 1 commit
  5. 24 Nov, 2014 1 commit
  6. 21 Nov, 2014 7 commits
  7. 20 Nov, 2014 3 commits
  8. 12 Nov, 2014 6 commits
  9. 04 Nov, 2014 2 commits
  10. 02 Nov, 2014 5 commits
  11. 21 Oct, 2014 1 commit
  12. 19 Oct, 2014 1 commit
    • Krzysztof Gogolewski's avatar
      Python 3 support, second attempt (Trac #9184) · d576fc38
      Krzysztof Gogolewski authored
      Summary:
      This is a fixup of https://phabricator.haskell.org/D233
      
      The only difference is in findTFiles (first commit), which
      previously broke Windows runner; now I translated literally
      instead attempting to improve it, and checked it works.
      
      Test Plan:
      I used validate under 2,3 on Linux and under 2 on msys2.
      On Windows I've seen a large number of failures, but they don't
      seem to be connected with the patch.
      
      Reviewers: hvr, simonmar, thomie, austin
      
      Reviewed By: austin
      
      Subscribers: thomie, carter, ezyang, simonmar
      
      Differential Revision: https://phabricator.haskell.org/D310
      
      GHC Trac Issues: #9184
      d576fc38
  13. 07 Oct, 2014 1 commit
    • glguy's avatar
      Add support for LINE pragma in template-haskell · adcb9dbc
      glguy authored
      Summary:
      Provide a way to generate {-# LINE #-} pragmas when generating
      Decs in Template Haskell. This allows more meaningful line
      numbers to be reported in compile-time errors for dynamically
      generated code.
      
      Test Plan: Run test suite
      
      Reviewers: austin, hvr
      
      Reviewed By: austin
      
      Subscribers: hvr, simonmar, ezyang, carter, thomie
      
      Differential Revision: https://phabricator.haskell.org/D299
      adcb9dbc
  14. 03 Oct, 2014 1 commit
  15. 01 Oct, 2014 1 commit
    • Krzysztof Gogolewski's avatar
      Basic Python 3 support for testsuite driver (Trac #9184) · 084d241b
      Krzysztof Gogolewski authored
      Summary:
      Most of the changes is adaptation of old Python 2 only code.
      My priority was not breaking Python 2, and so I avoided bigger
      changes to the driver. In particular, under Python 3 the output
      is a str and buffering cannot be disabled.
      
      To test, define PYTHON=python3 in testsuite/mk/boilerplate.mk.
      
      Thanks to aspidites <emarshall85@gmail.com> who provided the initial patch.
      
      Test Plan: validate under 2 and 3
      
      Reviewers: hvr, simonmar, thomie, austin
      
      Reviewed By: thomie, austin
      
      Subscribers: aspidites, thomie, simonmar, ezyang, carter
      
      Differential Revision: https://phabricator.haskell.org/D233
      
      GHC Trac Issues: #9184
      084d241b
  16. 12 Jun, 2014 1 commit
  17. 05 Jun, 2014 1 commit
  18. 17 Apr, 2014 1 commit
  19. 07 Apr, 2014 1 commit
  20. 04 Apr, 2014 1 commit
  21. 14 Mar, 2014 1 commit
    • eir@cis.upenn.edu's avatar
      Fix #8884. · 8c5ea91d
      eir@cis.upenn.edu authored
      There were two unrelated errors fixed here:
       1) Make sure that only the *result kind* is reified when reifying
          a type family. Previously, the whole kind was reified, which
          defies the TH spec.
      
       2) Omit kind patterns in equations.
      8c5ea91d
  22. 26 Feb, 2014 1 commit
    • eir@cis.upenn.edu's avatar
      Fix #8807. · 98b6756b
      eir@cis.upenn.edu authored
      It turns out that the enhanced repPred function in DsMeta assumed
      that the head of any constraint would be a tycon. This assumption
      is false. Happily, the solution involved *deleting* code. I
      just removed repPred in favor of repTy, and added the HsEqTy case
      to repTy, where it should be anyway.
      98b6756b