1. 17 Mar, 2015 1 commit
    • thomie's avatar
      hpc: use System.FilePath.(</>) instead of (++) · 801f4b98
      thomie authored
      Summary:
      BAD: "." ++ "/" ++ "/absolute/path" == ".//absolute/path"
      GOOD: "." </> "/absolute/path" == "/absolute path"
      
      Also replace `++ ".ext"` with `<.> "ext"`. Although it doesn't fix any
      bugs in this instance, it might in some other. As a general rule it's
      better not to use (++) on FilePaths.
      
      Reviewed By: austin, hvr
      
      Differential Revision: https://phabricator.haskell.org/D703
      
      GHC Trac Issues: #10138
      801f4b98
  2. 15 Mar, 2015 1 commit
  3. 11 Mar, 2015 2 commits
  4. 09 Mar, 2015 1 commit
  5. 18 Feb, 2015 2 commits
    • thomie's avatar
      Cleanup ghc-pkg · 32d1a8a5
      thomie authored
      Summary:
      * Delete dead code in ghc-pkg (not_yet ready since 2004)
      * remove --auto-ghc-libs
      Commit 78185538 (2011) mentions:
      "Deprecate the ghc-pkg --auto-ghci-libs flag
      It was never a universal solution. It only worked with the GNU linker.
      It has not been used by Cabal for ages. GHCi can now load .a files so it will
      not be needed in future."
      "Warning: --auto-ghci-libs is deprecated and will be removed in GHC 7.4"
      
      Reviewers: austin
      
      Reviewed By: austin
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D666
      32d1a8a5
    • thomie's avatar
      runghc: be explicit about ghc version (#9054) · 6d17125d
      thomie authored
      Summary: runghc-7.x should always call ghc-7.x
      
      Reviewers: austin
      
      Reviewed By: austin
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D664
      
      GHC Trac Issues: #9054
      6d17125d
  6. 17 Feb, 2015 3 commits
  7. 10 Feb, 2015 2 commits
    • 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
    • Duncan Coutts's avatar
      Add a workaround to allow older cabal-install to use ghc-7.10 · a1db53cc
      Duncan Coutts authored
      Summary:
      This should smooth the upgrade process for people and help with testing
      the 7.10 RCs. Otherwise people need to first install cabal-install-1.22
      before they can use 7.10.
      
      The problem is that older cabal still used file-style package dbs for
      the inplace package db when building packages. The workaround is that
      both ghc and ghc-pkg will notice when cabal tells them to use a file
      style db e.g. "dist/package.conf.inplace" and, so long as that db is
      empty (ie content is []) then they'll instead us a dir style db with
      the same name but ".d" appended, so in this example that would be
      "dist/package.conf.inplace.d". We have to use a separate dir rather
      than transparently upgrading because old Cabal really assumes the path
      is a file, and if it encounters a dir it will fail.
      
      This seems to be enough for older Cabal to work, and may well be enough
      for other scripts that create dbs using "echo [] > package.conf".
      
      Test Plan:
      validate and check new and old cabal can sucessfully install things,
      including packages that have internal deps (ie using the inplace db)
      
      Reviewers: hvr, tibbe, austin
      
      Reviewed By: tibbe, austin
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D628
      a1db53cc
  8. 23 Jan, 2015 2 commits
    • Herbert Valerio Riedel's avatar
      Revert "Update Haddock submodule" · febee92c
      Herbert Valerio Riedel authored
      This reverts commit 34d68d8e
      as it breaks the build:
      
        Configuring hsc2hs-0.67...
        Configuring ghc-cabal-0.1...
        Configuring parallel-3.2.0.6...
        Configuring hpc-bin-0.67...
        Configuring haddock-2.16.0...
        ghc-cabal: At least the following dependencies are missing:
        ghc >=7.9 && <7.11
        make[1]: *** [utils/haddock/dist/package-data.mk] Error 1
        make[1]: *** Waiting for unfinished jobs....
          GHC PKG libraries/parallel/dist-install/package-data.mk
        Reading package info from "libraries/parallel/dist-install/inplace-pkg-config" ... done.
        parallel-3.2.0.6: Warning: haddock-interfaces: /srv/builds/commits/rGHC/B3035-34d68d8e/libraries/parallel/dist-install/doc/html/parallel/parallel.haddock doesn't exist or isn't a file
        parallel-3.2.0.6: cannot find any of ["Control/Seq.hi","Control/Seq.p_hi","Control/Seq.dyn_hi"] (ignoring)
        parallel-3.2.0.6: cannot find any of ["Control/Parallel.hi","Control/Parallel.p_hi","Control/Parallel.dyn_hi"] (ignoring)
        parallel-3.2.0.6: cannot find any of ["Control/Parallel/Strategies.hi","Control/Parallel/Strategies.p_hi","Control/Parallel/Strategies.dyn_hi"] (ignoring)
        parallel-3.2.0.6: cannot find any of ["libHSparal_791B1zx5CJ25cUOFECtmw0.a","libHSparal_791B1zx5CJ25cUOFECtmw0.p_a","libHSparal_791B1zx5CJ25cUOFECtmw0-ghc7.11.20150123.so","libHSparal_791B1zx5CJ25cUOFECtmw0-ghc7.11.20150123.dylib","HSparal_791B1zx5CJ25cUOFECtmw0-ghc7.11.20150123.dll"] on library path (ignoring)
        make: *** [all] Error 2
      
      Moreover, utils/haddock is supposed to track the `ghc-head` branch
      (which is what `git submodule update --remote utils/haddock` helps with)
      febee92c
    • Mateusz Kowalczyk's avatar
      Update Haddock submodule · 34d68d8e
      Mateusz Kowalczyk authored
      34d68d8e
  9. 16 Jan, 2015 1 commit
    • Alan Zimmerman's avatar
      API Annotations tweaks. · 11881ec6
      Alan Zimmerman authored
      Summary:
      HsTyLit now has SourceText
      
      Update documentation of HsSyn to reflect which annotations are attached to which element.
      
      Ensure that the parser always keeps HsSCC and HsTickPragma values, to
      be ignored in the desugar phase if not needed
      
      Bringing in SourceText for pragmas
      
      Add Location in NPlusKPat
      
      Add Location in FunDep
      
      Make RecCon payload Located
      
      Explicitly add AnnVal to RdrName where it is compound
      
      Add Location in IPBind
      
      Add Location to name in IEThingAbs
      
      Add Maybe (Located id,Bool) to Match to track fun_id,infix
        This includes converting Match into a record and adding a note about why
        the fun_id needs to be replicated in the Match.
      
      Add Location in KindedTyVar
      
      Sort out semi-colons for parsing
      
        - import statements
        - stmts
        - decls
        - decls_cls
        - decls_inst
      
      This updates the haddock submodule.
      
      Test Plan: ./validate
      
      Reviewers: hvr, austin, goldfire, simonpj
      
      Reviewed By: simonpj
      
      Subscribers: thomie, carter
      
      Differential Revision: https://phabricator.haskell.org/D538
      11881ec6
  10. 08 Jan, 2015 1 commit
    • Simon Peyton Jones's avatar
      Improve HsBang · 9564bb8c
      Simon Peyton Jones authored
      Provoked by questions from Johan
      
       - Improve comments, fix misleading stuff
       - Add commented synonyms for HsSrcBang, HsImplBang, and use them throughout
       - Rename HsUserBang to HsSrcBang
       - Rename dataConStrictMarks to dataConSrcBangs
                dataConRepBangs    to dataConImplBangs
      
      This renaming affects Haddock in a trivial way, hence submodule update
      9564bb8c
  11. 06 Jan, 2015 2 commits
    • Simon Peyton Jones's avatar
      Another fix to genprimopcode, when generating Prim.hs · b0f8cb8a
      Simon Peyton Jones authored
      When haddock processes Prim.hs, it was calling TcEnv.tcGetDefaultTys,
      and that made it look for Integer and String, which are not in
      ghc-prim.  Result was a crash.
      
      But we don't need defaulting in Prim.hs, so add
         default ()
      b0f8cb8a
    • Simon Peyton Jones's avatar
      Update haddock submodule, and fix haddock input file from genprimopcode · d57f507f
      Simon Peyton Jones authored
      * A module in haddock an unused constraint, now fixed and pushed to ghc-head
        This patch records the new commit in GHC repo
      
      * genprimopcode generates a dummy Prim.hs for haddock.  But then Haddock was
        complaining about redundant constraints.  So this patch makes genprimopcode
        generate a warning-suppression OPTIONS_GHC pragma in Prim.hs
      d57f507f
  12. 27 Dec, 2014 2 commits
  13. 23 Dec, 2014 1 commit
    • Simon Peyton Jones's avatar
      Eliminate so-called "silent superclass parameters" · a6f0f5ab
      Simon Peyton Jones authored
      The purpose of silent superclass parameters was to solve the
      awkward problem of superclass dictinaries being bound to bottom.
      See THE PROBLEM in Note [Recursive superclasses] in TcInstDcls
      
      Although the silent-superclass idea worked,
      
        * It had non-local consequences, and had effects even in Haddock,
          where we had to discard silent parameters before displaying
          instance declarations
      
        * It had unexpected peformance costs, shown up by Trac #3064 and its
          test case.  In monad-transformer code, when constructing a Monad
          dictionary you had to pass an Applicative dictionary; and to
          construct that you neede a Functor dictionary. Yet these extra
          dictionaries were often never used.  (All this got much worse when
          we added Applicative as a superclass of Monad.) Test T3064
          compiled *far* faster after silent superclasses were eliminated.
      
        * It introduced new bugs.  For example SilentParametersOverlapping,
          T5051, and T7862, all failed to compile because of instance overlap
          directly because of the silent-superclass trick.
      
      So this patch takes a new approach, which I worked out with Dimitrios
      in the closing hours before Christmas.  It is described in detail
      in THE PROBLEM in Note [Recursive superclasses] in TcInstDcls.
      
      Seems to work great!
      
      Quite a bit of knock-on effect
      
       * The main implementation work is in tcSuperClasses in TcInstDcls
         Everything else is fall-out
      
       * IdInfo.DFunId no longer needs its n-silent argument
         * Ditto IDFunId in IfaceSyn
         * Hence interface file format changes
      
       * Now that DFunIds do not have silent superclass parameters, printing
         out instance declarations is simpler. There is tiny knock-on effect
         in Haddock, so that submodule is updated
      
       * I realised that when computing the "size of a dictionary type"
         in TcValidity.sizePred, we should be rather conservative about
         type functions, which can arbitrarily increase the size of a type.
         Hence the new datatype TypeSize, which has a TSBig constructor for
         "arbitrarily big".
      
       * instDFunType moves from TcSMonad to Inst
      
       * Interestingly, CmmNode and CmmExpr both now need a non-silent
         (Ord r) in a couple of instance declarations. These were previously
         silent but must now be explicit.
      
       * Quite a bit of wibbling in error messages
      a6f0f5ab
  14. 22 Dec, 2014 1 commit
  15. 20 Dec, 2014 1 commit
  16. 19 Dec, 2014 1 commit
  17. 18 Dec, 2014 2 commits
  18. 17 Dec, 2014 1 commit
  19. 16 Dec, 2014 2 commits
    • Peter Wortmann's avatar
      Add unwind information to Cmm · 711a51ad
      Peter Wortmann authored
      Unwind information allows the debugger to discover more information
      about a program state, by allowing it to "reconstruct" other states of
      the program. In practice, this means that we explain to the debugger
      how to unravel stack frames, which comes down mostly to explaining how
      to find their Sp and Ip register values.
      
      * We declare yet another new constructor for CmmNode - and this time
        there's actually little choice, as unwind information can and will
        change mid-block. We don't actually make use of these capabilities,
        and back-end support would be tricky (generate new labels?), but it
        feels like the right way to do it.
      
      * Even though we only use it for Sp so far, we allow CmmUnwind to specify
        unwind information for any register. This is pretty cheap and could
        come in useful in future.
      
      * We allow full CmmExpr expressions for specifying unwind values. The
        advantage here is that we don't have to make up new syntax, and can e.g.
        use the WDS macro directly. On the other hand, the back-end will now
        have to simplify the expression until it can sensibly be converted
        into DWARF byte code - a process which might fail, yielding NCG panics.
        On the other hand, when you're writing Cmm by hand you really ought to
        know what you're doing.
      
      (From Phabricator D169)
      711a51ad
    • Herbert Valerio Riedel's avatar
      *Really* Re-Update Haddock submodule · 06ba9818
      Herbert Valerio Riedel authored
      The actual gitlink update got lost in 0c9c2d89
      06ba9818
  20. 15 Dec, 2014 1 commit
  21. 14 Dec, 2014 3 commits
  22. 29 Nov, 2014 1 commit
  23. 28 Nov, 2014 1 commit
  24. 27 Nov, 2014 1 commit
  25. 25 Nov, 2014 1 commit
    • Simon Marlow's avatar
      Make clearNursery free · e22bc0de
      Simon Marlow authored
      Summary:
      clearNursery resets all the bd->free pointers of nursery blocks to
      make the blocks empty.  In profiles we've seen clearNursery taking
      significant amounts of time particularly with large -N and -A values.
      
      This patch moves the work of clearNursery to the point at which we
      actually need the new block, thereby introducing an invariant that
      blocks to the right of the CurrentNursery pointer still need their
      bd->free pointer reset.  This should make things faster overall,
      because we don't need to clear blocks that we don't use.
      
      Test Plan: validate
      
      Reviewers: AndreasVoellmy, ezyang, austin
      
      Subscribers: thomie, carter, ezyang, simonmar
      
      Differential Revision: https://phabricator.haskell.org/D318
      e22bc0de
  26. 21 Nov, 2014 3 commits