1. 05 Oct, 2013 1 commit
  2. 04 Oct, 2013 1 commit
  3. 01 Oct, 2013 1 commit
    • Simon Marlow's avatar
      Add layout to MultiWayIf (#7783) · aab65608
      Simon Marlow authored
      This makes it possible to write
      
      x = if | False -> if | False -> 1
                           | False -> 2
             | True -> 3
      
      Layout normally inserts semicolons between declarations at the same
      indentation level, so I added optional semicolons to the syntax for
      guards in MultiWayIf syntax.  This is a bit of a hack, but the
      alternative (a special kind of layout that doesn't insert semicolons)
      seemed worse, or at least equally bad.
      aab65608
  4. 18 Sep, 2013 2 commits
    • twanvl's avatar
      Implement checkable "minimal complete definitions" (#7633) · bd42c9df
      twanvl authored
      
      
      This commit adds a `{-# MINIMAL #-}` pragma, which defines the possible
      minimal complete definitions for a class. The body of the pragma is a
      boolean formula of names.
      
      The old warning for missing methods is replaced with this new one.
      
      Note: The interface file format is changed to store the minimal complete
      definition.
      Authored-by: twanvl's avatarTwan van Laarhoven <twanvl@gmail.com>
      Signed-off-by: Herbert Valerio Riedel's avatarHerbert Valerio Riedel <hvr@gnu.org>
      bd42c9df
    • eir@cis.upenn.edu's avatar
      Change role annotation syntax. · f4046b50
      eir@cis.upenn.edu authored
      This fixes bugs #8185, #8234, and #8246. The new syntax is explained
      in the comments to #8185, appears in the "Roles" subsection of the
      manual, and on the [wiki:Roles] wiki page.
      
      This change also removes the ability for a role annotation on type
      synonyms, as noted in #8234.
      f4046b50
  5. 06 Sep, 2013 1 commit
    • thoughtpolice's avatar
      Add basic support for GHCJS · b372e8ea
      thoughtpolice authored
      
      
      This patch encompasses most of the basic infrastructure for GHCJS. It
      includes:
      
        * A new extension, -XJavaScriptFFI
        * A new architecture, ArchJavaScript
        * Parser and lexer support for 'foreign import javascript', only
          available under -XJavaScriptFFI, using ArchJavaScript.
        * As a knock-on, there is also a new 'WayCustom' constructor in
          DynFlags, so clients of the GHC API can add custom 'tags' to their
          built files. This should be useful for other users as well.
      
      The remaining changes are really just the resulting fallout, making sure
      all the cases are handled appropriately for DynFlags and Platform.
      Authored-by: Luite Stegeman's avatarLuite Stegeman <stegeman@gmail.com>
      Signed-off-by: thoughtpolice's avatarAustin Seipp <aseipp@pobox.com>
      b372e8ea
  6. 19 Aug, 2013 2 commits
  7. 02 Aug, 2013 1 commit
  8. 31 Jul, 2013 1 commit
    • ian@well-typed.com's avatar
      Add NegativeLiterals extension · ef739635
      ian@well-typed.com authored
      I'd been meaning to do this for some time, but finally got around to it
      due to the overflowing literals warning. With that enabled, we were
      getting a warning for
          -128 :: Int8
      as that is parsed as
          negate (fromInteger 128)
      which just happens to do the right thing, as
          negate (fromInteger 128) = negate (-128) = -128
      ef739635
  9. 18 Mar, 2013 1 commit
  10. 26 Feb, 2013 1 commit
  11. 25 Feb, 2013 1 commit
  12. 14 Dec, 2012 1 commit
  13. 16 Oct, 2012 1 commit
    • ian@well-typed.com's avatar
      Some alpha renaming · cd33eefd
      ian@well-typed.com authored
      Mostly d -> g (matching DynFlag -> GeneralFlag).
      Also renamed if* to when*, matching the Haskell if/when names
      cd33eefd
  14. 26 Sep, 2012 1 commit
  15. 03 Sep, 2012 1 commit
  16. 24 Jul, 2012 1 commit
  17. 16 Jul, 2012 3 commits
  18. 15 Jul, 2012 1 commit
  19. 14 Jul, 2012 1 commit
  20. 29 Jun, 2012 1 commit
  21. 12 Jun, 2012 2 commits
    • Ian Lynagh's avatar
      Pass DynFlags down to mk_err_msg · c3a62c56
      Ian Lynagh authored
      c3a62c56
    • Simon Peyton Jones's avatar
      Revive 'mdo' expressions, per discussion in Trac #4148 · 4f8e86b4
      Simon Peyton Jones authored
      Summary:
        - mdo expressions are enabled by RecursiveDo pragma
      
        - mdo expressions perform full segmentation
      
        - 'rec' groups inside 'do' are changed so they do *not*
          perform any segmentation.
      
        - Both 'mdo' and 'rec' are enabled by 'RecursiveDo'
          'DoRec' is deprecated in favour of 'RecursiveDo'
          (The 'rec' keyword is also enabled by 'Arrows', as now.)
      
      Thanks to Levent for doing all the work
      4f8e86b4
  22. 14 May, 2012 1 commit
    • Ian Lynagh's avatar
      Tweak the lexer: In particular, improve notFollowedBy and friends · c250f93b
      Ian Lynagh authored
      We were hitting a problem when reading the LANGUAGE/OPTIONS pragmas
      from GHC.TypeLits, where the buffer ended "{-". The rules for the
      start-comment lexeme check that "{-" is not followed by "#", but the
      test returned False when there was no next character. Therefore we
      were lexing this as as an open-curly lexeme (only consuming the "{",
      and not reaching the end of the buffer),
      which meant the options parser think that it had reached the end of
      the options.
      
      Now we correctly lex as "{-".
      c250f93b
  23. 02 Apr, 2012 1 commit
  24. 24 Mar, 2012 1 commit
  25. 18 Mar, 2012 1 commit
  26. 16 Feb, 2012 1 commit
  27. 17 Jan, 2012 1 commit
  28. 12 Jan, 2012 1 commit
    • Simon Peyton Jones's avatar
      Implememt -fdefer-type-errors (Trac #5624) · 5508ada4
      Simon Peyton Jones authored
      This patch implements the idea of deferring (most) type errors to
      runtime, instead emitting only a warning at compile time.  The
      basic idea is very simple:
      
       * The on-the-fly unifier in TcUnify never fails; instead if it
         gets stuck it emits a constraint.
      
       * The constraint solver tries to solve the constraints (and is
         entirely unchanged, hooray).
      
       * The remaining, unsolved constraints (if any) are passed to
         TcErrors.reportUnsolved.  With -fdefer-type-errors, instead of
         emitting an error message, TcErrors emits a warning, AND emits
         a binding for the constraint witness, binding it
         to (error "the error message"), via the new form of evidence
         TcEvidence.EvDelayedError.  So, when the program is run,
         when (and only when) that witness is needed, the program will
         crash with the exact same error message that would have been
         given at compile time.
      
      Simple really.  But, needless to say, the exercise forced me
      into some major refactoring.
      
       * TcErrors is almost entirely rewritten
      
       * EvVarX and WantedEvVar have gone away entirely
      
       * ErrUtils is changed a bit:
           * New Severity field in ErrMsg
           * Renamed the type Message to MsgDoc (this change
             touches a lot of files trivially)
      
       * One minor change is that in the constraint solver we try
         NOT to combine insoluble constraints, like Int~Bool, else
         all such type errors get combined together and result in
         only one error message!
      
       * I moved some definitions from TcSMonad to TcRnTypes,
         where they seem to belong more
      5508ada4
  29. 19 Dec, 2011 1 commit
    • Ian Lynagh's avatar
      Add a class HasDynFlags(getDynFlags) · 06c6d970
      Ian Lynagh authored
      We no longer have many separate, clashing getDynFlags functions
      
      I've given each GhcMonad its own HasDynFlags instance, rather than
      using UndecidableInstances to make a GhcMonad m => HasDynFlags m
      instance.
      06c6d970
  30. 28 Nov, 2011 1 commit
    • Ian Lynagh's avatar
      Implement a capi calling convention; fixes #2979 · 36f8cabe
      Ian Lynagh authored
      In GHC, this provides an easy way to call a C function via a C wrapper.
      This is important when the function is really defined by CPP.
      
      Requires the new CApiFFI extension.
      
      Not documented yet, as it's still an experimental feature at this stage.
      36f8cabe
  31. 25 Nov, 2011 1 commit
  32. 23 Nov, 2011 1 commit
  33. 18 Nov, 2011 1 commit
    • Simon Marlow's avatar
      Track #included files for recompilation checking (#4900, #3589) · 3f34e091
      Simon Marlow authored
      This was pretty straightforward: collect the filenames in the lexer,
      and add them in to the tcg_dependent_files list that the typechecker
      collects.
      
      Note that we still don't get #included files in the ghc -M output.
      Since we don't normally lex the whole file in ghc -M, this same
      mechanism can't be used directly.
      3f34e091
  34. 11 Nov, 2011 1 commit
    • dreixel's avatar
      New kind-polymorphic core · 09015be8
      dreixel authored
      This big patch implements a kind-polymorphic core for GHC. The current
      implementation focuses on making sure that all kind-monomorphic programs still
      work in the new core; it is not yet guaranteed that kind-polymorphic programs
      (using the new -XPolyKinds flag) will work.
      
      For more information, see http://haskell.org/haskellwiki/GHC/Kinds
      09015be8
  35. 09 Nov, 2011 1 commit