Opened 7 years ago

Closed 4 years 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 Rev(s):
Wiki Page:

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 7 years ago by igloo

Milestone: 6.14.1

comment:3 Changed 6 years ago by igloo

Milestone: 7.0.17.0.2

comment:4 Changed 6 years ago by igloo

Milestone: 7.0.27.2.1

comment:5 Changed 6 years ago by igloo

Milestone: 7.2.17.4.1

comment:6 Changed 5 years ago by igloo

Milestone: 7.4.17.6.1
Priority: normallow

comment:6 Changed 5 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 5 years ago by igloo

Milestone: 7.6.17.6.2

comment:8 Changed 4 years ago by Krzysztof Gogolewski <krz.gogolewski@…>

In da11bb138c7a1b4f056fb90ce026f11b18b5ca2c/ghc:

Document more stolen syntax (#4196)

comment:9 Changed 4 years ago by monoidal

difficulty: Unknown
Resolution: fixed
Status: newclosed

Done.

Note: See TracTickets for help on using tickets.