Skip to content
  • Dan Licata's avatar
    View patterns, record wildcards, and record puns · 6a05ec5e
    Dan Licata authored
    This patch implements three new features:
    * view patterns (syntax: expression -> pat in a pattern)
    * working versions of record wildcards and record puns
    See the manual for detailed descriptions.
    
    Other minor observable changes:
    * There is a check prohibiting local fixity declarations
      when the variable being fixed is not defined in the same let
    * The warn-unused-binds option now reports warnings for do and mdo stmts
    
    Implementation notes: 
    
    * The pattern renamer is now in its own module, RnPat, and the
    implementation is now in a CPS style so that the correct context is
    delivered to pattern expressions.
    
    * These features required a fairly major upheaval to the renamer.
    Whereas the old version used to collect up all the bindings from a let
    (or top-level, or recursive do statement, ...) and put them into scope
    before renaming anything, the new version does the collection as it
    renames.  This allows us to do the right thing with record wildcard
    patterns (which...
    6a05ec5e