Haskell Report 2010: pattern bindings

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Haskell Report 2010: pattern bindings

GHC - devs mailing list

Thanks Jose.

 

The other issue I have in mind is that of pattern bindings.  Currently in the 2010 Haskell Report

  • The text on the monomorphism restriction (4.5.5) refers to “simple pattern bindings”.
  • It claims that a simple pattern binding “is a pattern binding in which the pattern consists of a single variable”
  • You’d expect “simple pattern binding” to be defined in 3.17.1 Patterns.  But it isn’t.
  • Instead, 4.4.3.2 Pattern bindings explicitly contradicts 4.5.5 by saying “a simple pattern binding has form p=e”.

What a mess!

The simplest way out is probably:

  • Define “simple pattern binding” to be of form x=e, in 3.17.1.
  • Fix the first para of 4.4.3.2.
  • Fix the cross-ref in 4.5.5 to refer to the definition of simple pattern.

Sadly, 4.4.3.2 still is not very well defined.  It’s supposed to say what pattern bindings mean, including top-level ones; but it does so by referring to 3.12 which does not handle top-level bindings.  I’m not sure if this is worth fixing.

 

Simon

 

From: José Manuel Calderón Trilla <[hidden email]>
Sent: 15 March 2018 23:17
To: Simon Peyton Jones <[hidden email]>; [hidden email]; [hidden email]
Subject: Re: [Haskell] The Haskell Report: who maintains it?

 

All of us on the Haskell Language Committee have the ability to commit on that repo.

I think typos are uncontroversial and I'll happily merge pull requests like that.

I think the pull-request you point out suffered from the bystander effect, unfortunately. I'll review and merge it now.


If you let me know the typo you'd like fixed I'll make sure that gets done as well.

Cheers,

José Manuel

 

 

 

On Thu, Mar 15, 2018, at 6:52 PM, Simon Peyton Jones via Haskell wrote:

Friends

 

Does anyone know who, if anyone, feels responsible for committing updates to the Haskell 2010 Report?

 

Who even has commit rights?

 

There’s Frank’s pull request below, and I have another important typo to fix.

 

Thanks

 

Simon

 

 

From: Frank Steffahn [mailto:[hidden email]]
Sent: 11 March 2018 17:03
To: haskell/haskell-report <[hidden email]>
Cc: Subscribed <[hidden email]>
Subject: [haskell/haskell-report] Fix a typo in: Semantics of Case Expressions, Part 3 (s) (#4)

 

Hi. I noticed this in the Haskell 2010 report, which is an obvious typo / mistake. I’m not 100% sure if this is the right branch (or even in general the right place) to note this, but I hope it will get fixed ;-)

This seems like it is an artifact of copy-and-pasting from “Semantics of Case Expressions, Part 1 (c)” without properly adapting the thing, especially in commit bc94554.


 

You can view, comment on, or merge this pull request online at:

  https://github.com/haskell/haskell-report/pull/4

Commit Summary

  • Fix a typo in: Semantics of Case Expressions, Part 3 (s)

File Changes

Patch Links:


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.Image removed by sender.

_______________________________________________

Haskell mailing list

 


_______________________________________________
ghc-devs mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs