Skip to content

Include ! from strictness annotations #107

Open
@Wilfred

Description

@Wilfred

Given the file:

data X = X
  { a :: !Int }

It's parsed as:

haskell (0, 0) - (2, 0)
  adt (0, 0) - (1, 15)
    data (0, 0) - (0, 4) "data"
    type (0, 5) - (0, 6) "X"
    = (0, 7) - (0, 8) "="
    constructors (0, 9) - (1, 15)
      data_constructor_record (0, 9) - (1, 15)
        constructor (0, 9) - (0, 10) "X"
        record_fields (1, 2) - (1, 15)
          { (1, 2) - (1, 3) "{"
          field (1, 4) - (1, 13)
            variable (1, 4) - (1, 5) "a"
            :: (1, 6) - (1, 8) "::"
            strict_type (1, 9) - (1, 13)
              type_name (1, 10) - (1, 13)
                type (1, 10) - (1, 13) "Int"
          } (1, 14) - (1, 15) "}"

Note that the position of the ! from the strict type annotation isn't included. Could it be included?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions