Skip to content
Snippets Groups Projects
  1. Jul 05, 2023
    • Vladislav Zavialov's avatar
      testsuite: Do not require CUSKs · 679bbc97
      Vladislav Zavialov authored and Marge Bot's avatar Marge Bot committed
      Numerous tests make use of CUSKs (complete user-supplied kinds),
      a legacy feature scheduled for deprecation. In order to proceed
      with the said deprecation, the tests have been updated to use SAKS
      instead (standalone kind signatures).
      
      This also allows us to remove the Haskell2010 language pragmas that
      were added in 115cd3c8 to work around the lack of CUSKs in GHC2021.
      679bbc97
  2. Jun 07, 2023
    • Vladislav Zavialov's avatar
      Invisible binders in type declarations (#22560) · 4aea0a72
      Vladislav Zavialov authored
      
      This patch implements @k-binders introduced in GHC Proposal #425
      and guarded behind the TypeAbstractions extension:
      
      	type D :: forall k j. k -> j -> Type
      	data D @k @j a b = ...
      	       ^^ ^^
      
      To represent the new syntax, we modify LHsQTyVars as follows:
      
      	-  hsq_explicit :: [LHsTyVarBndr () pass]
      	+  hsq_explicit :: [LHsTyVarBndr (HsBndrVis pass) pass]
      
      HsBndrVis is a new data type that records the distinction between
      type variable binders written with and without the @ sign:
      
      	data HsBndrVis pass
      	  = HsBndrRequired
      	  | HsBndrInvisible (LHsToken "@" pass)
      
      The rest of the patch updates GHC, template-haskell, and haddock
      to handle the new syntax.
      
      Parser:
        The PsErrUnexpectedTypeAppInDecl error message is removed.
        The syntax it used to reject is now permitted.
      
      Renamer:
        The @ sign does not affect the scope of a binder, so the changes to
        the renamer are minimal.  See rnLHsTyVarBndrVisFlag.
      
      Type checker:
        There are three code paths that were updated to deal with the newly
        introduced invisible type variable binders:
      
          1. checking SAKS: see kcCheckDeclHeader_sig, matchUpSigWithDecl
          2. checking CUSK: see kcCheckDeclHeader_cusk
          3. inference: see kcInferDeclHeader, rejectInvisibleBinders
      
        Helper functions bindExplicitTKBndrs_Q_Skol and bindExplicitTKBndrs_Q_Tv
        are generalized to work with HsBndrVis.
      
      Updates the haddock submodule.
      
      Metric Increase:
          MultiLayerModulesTH_OneShot
      
      Co-authored-by: default avatarSimon Peyton Jones <simon.peytonjones@gmail.com>
      4aea0a72
  3. Mar 10, 2021
  4. May 21, 2020
    • Gert-Jan Bottu's avatar
      Explicit Specificity · a9311cd5
      Gert-Jan Bottu authored and Marge Bot's avatar Marge Bot committed
      Implementation for Ticket #16393.
      Explicit specificity allows users to manually create inferred type variables,
      by marking them with braces.
      This way, the user determines which variables can be instantiated through
      visible type application.
      
      The additional syntax is included in the parser, allowing users to write
      braces in type variable binders (type signatures, data constructors etc).
      This information is passed along through the renamer and verified in the
      type checker.
      The AST for type variable binders, data constructors, pattern synonyms,
      partial signatures and Template Haskell has been updated to include the
      specificity of type variables.
      
      Minor notes:
      - Bumps haddock submodule
      - Disables pattern match checking in GHC.Iface.Type with GHC 8.8
      a9311cd5
  5. Sep 17, 2019
  6. Jan 03, 2019
    • My Nguyen's avatar
      Visible kind application · 17bd1635
      My Nguyen authored
      Summary:
      This patch implements visible kind application (GHC Proposal 15/#12045), as well as #15360 and #15362.
      It also refactors unnamed wildcard handling, and requires that type equations in type families in Template Haskell be
      written with full type on lhs. PartialTypeSignatures are on and warnings are off automatically with visible kind
      application, just like in term-level.
      
      There are a few remaining issues with this patch, as documented in
      ticket #16082.
      
      Includes a submodule update for Haddock.
      
      Test Plan: Tests T12045a/b/c/TH1/TH2, T15362, T15592a
      
      Reviewers: simonpj, goldfire, bgamari, alanz, RyanGlScott, Iceland_jack
      
      Subscribers: ningning, Iceland_jack, RyanGlScott, int-index, rwbarton, mpickering, carter
      
      GHC Trac Issues: `#12045`, `#15362`, `#15592`, `#15788`, `#15793`, `#15795`, `#15797`, `#15799`, `#15801`, `#15807`, `#15816`
      
      Differential Revision: https://phabricator.haskell.org/D5229
      17bd1635
  7. Oct 27, 2018
    • mayac's avatar
      More explicit foralls (GHC Proposal 0007) · 512eeb9b
      mayac authored
      Allow the user to explicitly bind type/kind variables in type and data
      family instances (including associated instances), closed type family
      equations, and RULES pragmas. Follows the specification of GHC
      Proposal 0007, also fixes #2600. Advised by Richard Eisenberg.
      
      This modifies the Template Haskell AST -- old code may break!
      
      Other Changes:
      - convert HsRule to a record
      - make rnHsSigWcType more general
      - add repMaybe to DsMeta
      
      Includes submodule update for Haddock.
      
      Test Plan: validate
      
      Reviewers: goldfire, bgamari, alanz
      
      Subscribers: simonpj, RyanGlScott, goldfire, rwbarton,
                   thomie, mpickering, carter
      
      GHC Trac Issues: #2600, #14268
      
      Differential Revision: https://phabricator.haskell.org/D4894
      512eeb9b
  8. Dec 12, 2015
  9. Sep 03, 2015
  10. Aug 11, 2013
  11. Jun 21, 2013
Loading