1. 09 Dec, 2015 4 commits
    • Gabor Greif's avatar
      More typos in comments/docs · 688069ca
      Gabor Greif authored
      688069ca
    • Simon Peyton Jones's avatar
      Improve documentation for DeriveAnyClass · 83178931
      Simon Peyton Jones authored
      c.f. Trac #9968
      83178931
    • Simon Peyton Jones's avatar
      Comments only · e9ea0209
      Simon Peyton Jones authored
      e9ea0209
    • Simon Peyton Jones's avatar
      Fix DeriveAnyClass (Trac #9968) · af77089b
      Simon Peyton Jones authored
      The main issue concerned things like
      
         data T a = MkT a deriving( C Int )
      
      which is supposed to generate
      
         instance C Int (T a) where {}
      
      But the 'Int' argument (called cls_tys in the code) wasn't
      even being passed to inferConstraints and mk_data_eqn, so it
      really had no chance.   DeriveAnyClass came along after this
      code was written!
      
      Anyway I did quite a bit of tidying up in inferConstraints.
      
      Also I discovered that this case was not covered at all
      
         data T a b = MkT a b deriving( Bifunctor )
      
      What constraints should we generate for the instance context?
      We can deal with classes whose last arg has kind *, like Eq, Ord;
      or (* -> *), like Functor, Traversable.  But we really don't have
      a story for classes whose last arg has kind (* -> * -> *).
      
      So I augmented checkSideConditions to check for that and give
      a sensible error message.
      
      ToDo: update the user manual.
      af77089b
  2. 08 Dec, 2015 14 commits
  3. 07 Dec, 2015 17 commits
  4. 06 Dec, 2015 3 commits
  5. 05 Dec, 2015 2 commits
    • Herbert Valerio Riedel's avatar
      Allow to compile OSMem.c when MEM_NORESERVE is not available · 5f1e42f2
      Herbert Valerio Riedel authored
      On some OSes such as AIX `MEM_NORESERVE` is not available.
      
      Since this feature is only needed when the new two-step allocator (see #9706)
      is enabled we can simply turn this into a runtime error to avoid a larger
      refactoring of this already quite platform-sensitive code.
      
      Reviewed By: bgamari, ezyang
      
      Differential Revision: https://phabricator.haskell.org/D1568
      5f1e42f2
    • Sergei Trofimovich's avatar
      ghc.mk: fix docs re-rebuilding · 13ab2c64
      Sergei Trofimovich authored
      
      
      The problem:
          $ make
          <watch sphinx rebuilds docs>
          # no changes in sources
          $ make
          <watch sphinx rebuilds docs again>
      
      The problem was due to wrong assumption about what
      files exactly are generated by mkUserGuidePart.
      
      Build system expected the following files to be created:
          docs/man/all-flags.gen.rst
          flags-recompilating-checking.gen.rst
      but mkUserGuidePart generated:
          docs/users_guide/all-flags.gen.rst
          flags-recompilation-checking.gen.rst
      Signed-off-by: default avatarSergei Trofimovich <siarheit@google.com>
      13ab2c64