Opened 5 years ago

Closed 23 months ago

#4196 closed task (fixed)

add more stolen syntax to the user guide

Reported by: maeder Owned by:
Priority: low Milestone: 7.6.2
Component: Documentation Version: 6.12.3
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

language extensions:

  • Bang Patterns disallow an infix funlhs for "!"
  • Magic Hash disallows sections like "(3#)" and infix terms like "3# 1" without a space before # (for a user-defined operator "#" or "##")

Change History (9)

comment:2 Changed 5 years ago by igloo

  • Milestone set to 6.14.1

comment:3 Changed 5 years ago by igloo

  • Milestone changed from 7.0.1 to 7.0.2

comment:4 Changed 4 years ago by igloo

  • Milestone changed from 7.0.2 to 7.2.1

comment:5 Changed 4 years ago by igloo

  • Milestone changed from 7.2.1 to 7.4.1

comment:6 Changed 3 years ago by igloo

  • Milestone changed from 7.4.1 to 7.6.1
  • Priority changed from normal to low

comment:6 Changed 3 years ago by maeder

I think, -XBangPatterns should be mentioned under http://www.haskell.org/ghc/docs/7.4.1/html/users_guide/syntax-extns.html#syntax-stolen

The problems for user-defined infix-operators starting with "#" (namely requiring a white space on the left) should be described under http://www.haskell.org/ghc/docs/7.4.1/html/users_guide/syntax-extns.html#magic-hash

(http://www.haskell.org/ghc/docs/7.4.1/html/users_guide/bang-patterns.html mentions later:

Is this a definition of the infix function "(!)", or of the "f" with a bang pattern? GHC resolves this ambiguity in favour of the latter. If you want to define (!) with bang-patterns enabled, you have to do so using prefix notation: 

)

comment:7 Changed 3 years ago by igloo

  • Milestone changed from 7.6.1 to 7.6.2

comment:8 Changed 23 months ago by Krzysztof Gogolewski <krz.gogolewski@…>

In da11bb138c7a1b4f056fb90ce026f11b18b5ca2c/ghc:

Document more stolen syntax (#4196)

comment:9 Changed 23 months ago by monoidal

  • difficulty set to Unknown
  • Resolution set to fixed
  • Status changed from new to closed

Done.

Note: See TracTickets for help on using tickets.