Skip to content

Improvements to layout rule #1179

@yav

Description

@yav

The current layout algorithm rejects the following program:

module A where
private
z = 0x2

with this error:

Parse error at test.cry:3:2,
  unexpected: layout block separator
  expected: a declaration

The issue is that after private we need to do 2 things: start a new block at the next token (because of private) or insert ; because z is on the indentation block start by where. Currently we seem to be preferring the latter, but I think we should prioritize starting a new block, before inserting a ;

Metadata

Metadata

Assignees

No one assigned

    Labels

    parserIssues with lexing or parsing.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions