Skip to content

Fix issues caused by making <|> infixr #161

Closed
@JordanMartinez

Description

@JordanMartinez

Fix issues caused by making <|> right associative

[1/8 MixedAssociativityError] .spago/parsing/main/src/Text/Parsing/Parser/Expr.purs:58:5

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

[2/8 MixedAssociativityError] .spago/parsing/main/src/Text/Parsing/Parser/Token.purs:442:45

  442    characterChar = charLetter <|> charEscape <?> "literal character"
                                                   ^^^
  
  Cannot parse an expression that uses operators of the same precedence but mixed associativity:
  
    Text.Parsing.Parser.Combinators.(<?>) is infixl
    Control.Alt.(<|>) is infixr
  
  Use parentheses to resolve this ambiguity.

[3/8 MixedAssociativityError] .spago/parsing/main/src/Text/Parsing/Parser/Token.purs:840:58

  840        skipMany (simpleSpace <|> multiLineComment langDef <?> "")
                                                                ^^^
  
  Cannot parse an expression that uses operators of the same precedence but mixed associativity:
  
    Text.Parsing.Parser.Combinators.(<?>) is infixl
    Control.Alt.(<|>) is infixr
  
  Use parentheses to resolve this ambiguity.

[4/8 MixedAssociativityError] .spago/parsing/main/src/Text/Parsing/Parser/Token.purs:867:5

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

[5/8 MixedAssociativityError] .spago/parsing/main/src/Text/Parsing/Parser/Token.purs:877:5

  877      <?> "end of comment"
           ^^^
  
  Cannot parse an expression that uses operators of the same precedence but mixed associativity:
  
    Text.Parsing.Parser.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