1. 04 Mar, 2019 1 commit
  2. 01 Mar, 2019 1 commit
    • Alp Mestanogullari's avatar
      Hadrian: introduce ways to skip some documentation targets · 8442103a
      Alp Mestanogullari authored and  Marge Bot's avatar Marge Bot committed
      The initial motivation for this is to have a chance to run the binary
      distribution rules in our Windows CI without having to install
      sphinx-build and xelatex there, while retaining the ability to
      generate haddocks. I just ended up extending this idea a little bit so
      as to have control over whether we build haddocks, (sphinx) HTML manuals,
      (sphinx) PDF manuals and (sphinx) manpages.
      8442103a
  3. 24 Feb, 2019 1 commit
    • Vladislav Zavialov's avatar
      Expression/command ambiguity resolution · e61f6e35
      Vladislav Zavialov authored and  Marge Bot's avatar Marge Bot committed
      This patch removes 'HsArrApp' and 'HsArrForm' from 'HsExpr' by
      introducing a new ambiguity resolution system in the parser.
      
      Problem: there are places in the grammar where we do not know whether we
      are parsing an expression or a command:
      
      	proc x -> do { (stuff) -< x }   -- 'stuff' is an expression
      	proc x -> do { (stuff) }        -- 'stuff' is a command
      
      Until we encounter arrow syntax (-<) we don't know whether to parse
      'stuff' as an expression or a command.
      
      The old solution was to parse as HsExpr always, and rejig later:
      
      	checkCommand :: LHsExpr GhcPs -> P (LHsCmd GhcPs)
      
      This meant polluting 'HsExpr' with command-related constructors. In
      other words, limitations of the parser were affecting the AST, and
      all other code (the renamer, the typechecker) had to deal with these
      extra constructors by panicking.
      
      We fix this abstraction leak by parsing into an intermediate
      representation, 'ExpCmd':
      
      	data ExpCmdG b where
      	  ExpG :: ExpCmdG HsExpr
      	  CmdG :: ExpCmdG HsCmd
      
      	type ExpCmd = forall b. ExpCmdG b -> PV (Located (b GhcPs))
      
      	checkExp :: ExpCmd -> PV (LHsExpr GhcPs)
      	checkCmd :: ExpCmd -> PV (LHsCmd GhcPs)
      	checkExp f = f ExpG  -- interpret as an expression
      	checkCmd f = f CmdG  -- interpret as a command
      
      See Note [Ambiguous syntactic categories] for details.
      
      Now the intricacies of parsing have no effect on the hsSyn AST when it
      comes to the expression/command ambiguity.
      
      Future work: apply the same principles to the expression/pattern
      ambiguity.
      e61f6e35
  4. 23 Feb, 2019 1 commit
  5. 20 Feb, 2019 1 commit
    • Andrey Mokhov's avatar
      Hadrian: Fix untracked dependencies · 1dad4fc2
      Andrey Mokhov authored and  Marge Bot's avatar Marge Bot committed
      This is a preparation for #16295: https://ghc.haskell.org/trac/ghc/ticket/16295
      
      This commit mostly focuses on getting rid of untracked dependencies,
      which prevent Shake's new `--shared` feature from appropriately caching
      build rules.
      
      There are three different solutions to untracked dependencies:
      
      * Track them! This is the obvious and the best approach, but in some
        situations we cannot use it, for example, because a build rule creates
        files whose names are not known statically and hence cannot be
        specified as the rule's outputs.
      
      * Use Shake's `produces` to record outputs dynamically, within the rule.
      
      * Use Shake's `historyDisable` to disable caching for a particular build
        rule. We currently use this approach only for `ghc-pkg` which mutates
        the package database and the file `package.cache`.
      
      These two tickets are fixed as the result:
      
      Ticket #16271: ​https://ghc.haskell.org/trac/ghc/ticket/16271
      
      Ticket #16272: ​https://ghc.haskell.org/trac/ghc/ticket/16272 (this one
      is fixed only partially: we correctly record the dependency, but we
      still copy files into the RTS build tree).
      1dad4fc2
  6. 16 Feb, 2019 1 commit
    • Alec Theriault's avatar
      Remove `parallel` as a submodule · 3cb063c8
      Alec Theriault authored and  Marge Bot's avatar Marge Bot committed
      `parallel` is used in exactly one place in the GHC tree: the T2317 test.
      It seems almost by accident that it is a submodule; libraries needed
      only for tests should net be included as submodules (see `QuickCheck`,
      `async`, `haskell98`, `regex-compat`, `utf8-string`, `vector` and more
      for examples).
      
      T2317 will now get run only when `parallel` is installed instead of
      `parallel` being required for the testsuite to run.
      3cb063c8
  7. 15 Feb, 2019 1 commit
  8. 10 Feb, 2019 2 commits
  9. 09 Feb, 2019 2 commits
  10. 08 Feb, 2019 1 commit
  11. 03 Feb, 2019 1 commit
  12. 02 Feb, 2019 1 commit
  13. 31 Jan, 2019 3 commits
  14. 30 Jan, 2019 5 commits
  15. 27 Jan, 2019 1 commit
  16. 23 Jan, 2019 4 commits
    • Gabor Greif's avatar
      A few typofixes · bb2acfe0
      Gabor Greif authored and Ben Gamari's avatar Ben Gamari committed
      bb2acfe0
    • Alec Theriault's avatar
      Hadrian: support in-tree GMP · efc95841
      Alec Theriault authored and Ben Gamari's avatar Ben Gamari committed
      Summary:
      This adds top-level configure flags '--with-intree-gmp' and
      '--with-framework-preferred', both of which are especially relevant
      on MacOS.
      
      Besides gaining two new flags, Hadrian also had to be taught what to
      do with the 'framework' in .cabal files.
      
      Test Plan:
      ./boot && ./configure --with-intree-gmp && ./hadrian/build.sh
      ./boot && ./configure --with-gmp-framework-preferred && ./hadrian/build.sh # on macos
      
      Reviewers: carter, snowleopard, alpmestan, hvr, goldfire, bgamari
      
      Subscribers: rwbarton, erikd
      
      GHC Trac Issues: #16001
      
      Differential Revision: https://phabricator.haskell.org/D5417
      efc95841
    • Alec Theriault's avatar
      Hadrian: install patches 'haddock-{html,interface}' · d26869ac
      Alec Theriault authored and Ben Gamari's avatar Ben Gamari committed
      Since the `$(docdir)` can be picked independently from the `$(libdir)`,
      we need to make sure that that the `haddock-html` and `haddock-interface`
      fields in the package DB (which is in the `$(libdir)`) get updated to
      point to the appropriate places in the `$(docdir)`.
      
      NB: in the make system, `ghc-cabal` would cover this sort of thing by
      re-running `configure` on installation, but here we get away with a
      couple lines of `sed` and a call to `ghc-pkg recache`.
      
      Fixes #16202.
      d26869ac
    • Matthew Pickering's avatar
      Fix hadrian prof flavour so that it builds a profiled version of GHC · cfe64019
      Matthew Pickering authored and Ben Gamari's avatar Ben Gamari committed
      In Alp's refactoring of `getProgramContexts` he removed a call to
      `getProgramContext` which was where the logic for this used to be
      implemented.
      
      Fixes #16214
      cfe64019
  17. 16 Jan, 2019 10 commits
  18. 14 Jan, 2019 3 commits