Opened 11 years ago

Closed 8 years ago

Last modified 8 years ago

#3356 closed feature request (fixed)

{-# LANGUAGE NoTraditionalRecordSyntax #-} to disable the current record syntax

Reported by: SamB Owned by:
Priority: normal Milestone: 7.4.1
Component: Compiler Version: 6.10.2
Keywords: Cc: merehap@…
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


I want to get the current record syntax demoted to an extension in Haskell'. This would be more likely to happen if disallowing it was supported by GHC, so I want to see GHC support this with:

{-# LANGUAGE NoTraditionalRecordSyntax #-}

Change History (9)

comment:1 Changed 11 years ago by igloo

difficulty: Unknown
Milestone: 6.14.1

comment:2 Changed 10 years ago by merehap

Cc: merehap@… added
Type of failure: None/Unknown

comment:3 Changed 9 years ago by igloo


comment:4 Changed 9 years ago by igloo


comment:5 Changed 8 years ago by igloo

Hmm, what would this do exactly?

Would it only forbid declaring records in the current module?

Or would it also make it illegal to use record syntax to manipulate records for types defined in other modules?

comment:6 Changed 8 years ago by simonmar

I suppose it should do as the name suggests: disallow the syntactic forms associated with named fields. That is, construction (C{..} in expressions), pattern matching, definition, and update.

The point is to give us back the syntax, so we can use it for something else.

comment:7 Changed 8 years ago by igloo@…

commit 742067003bfe91dbde91d1ff2e57c3182dabaa67

Author: Ian Lynagh <>
Date:   Mon Sep 26 23:32:04 2011 +0100

    Define a TraditionalRecordSyntax extension; fixes #3356
    This allows the extension (which is on by default) to be turned off,
    which gets us a small step closer to replacing Haskell98 records with
    something better.

 compiler/main/DynFlags.hs    |    4 ++++
 compiler/parser/Lexer.x      |    6 ++++++
 compiler/parser/Parser.y.pp  |    7 ++++---
 compiler/parser/RdrHsSyn.lhs |   10 ++++++++++
 4 files changed, 24 insertions(+), 3 deletions(-)

comment:8 Changed 8 years ago by igloo

Resolution: fixed
Status: newclosed


comment:9 Changed 8 years ago by igloo

Note: See TracTickets for help on using tickets.