Skip to content

Fix issues caused by <|> being made infixr #91

Closed
@JordanMartinez

Description

@JordanMartinez

Fix issues caused by switching <|> to be right associative.

[6/8 MixedAssociativityError] .spago/string-parsers/main/src/StringParser/CodeUnits.purs:116:45

  116  anyLetter = lowerCaseChar <|> upperCaseChar <?> "Expected a letter"
                                                   ^^^
  
  Cannot parse an expression that uses operators of the same precedence but mixed associativity:
  
    StringParser.Combinators.(<?>) is infixl
    Control.Alt.(<|>) is infixr
  
  Use parentheses to resolve this ambiguity.

[7/8 MixedAssociativityError] .spago/string-parsers/main/src/StringParser/CodeUnits.purs:120:35

  120  alphaNum = anyLetter <|> anyDigit <?> "Expected a letter or a number"
                                         ^^^
  
  Cannot parse an expression that uses operators of the same precedence but mixed associativity:
  
    StringParser.Combinators.(<?>) is infixl
    Control.Alt.(<|>) is infixr
  
  Use parentheses to resolve this ambiguity.

[8/8 MixedAssociativityError] .spago/string-parsers/main/src/StringParser/Expr.purs:60:15

  60                <?> "operator"
                    ^^^
  
  Cannot parse an expression that uses operators of the same precedence but mixed associativity:
  
    StringParser.Combinators.(<?>) is infixl
    Control.Alt.(<|>) is infixr
  
  Use parentheses to resolve this ambiguity.

Metadata

Metadata

Assignees

No one assigned

    Labels

    purs-0.15A reminder to address this issue or merge this PR before we release PureScript v0.15.0type: breaking changeA change that requires a major version bump.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions