Ticket #1 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

Haskell-indentation breaks on Unicode

Reported by: Roel van Dijk Owned by: Baughn
Priority: minor Component: component1
Version: Keywords: unicode
Cc:

Description

Consider the following program:

{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE UnicodeSyntax #-}

module Test where

foo ∷ ∀ α. Ord α ⇒ α → α → α
foo x y | x ≥ y     = x
        | otherwise = y
    where
      (≥) ∷ ∀ β. Ord β ⇒ β → β → Bool
      (≥) = (>=)

If I position the point on the first line after the function foo and press tab I get a "Parse error" message. The problem seems to be in the parsing of the (≥) operator. The following snippet does not have the parsing problem:

bar ∷ ∀ α. Ord α ⇒ α → α → α
bar x y | x $>= y    = x
        | otherwise = y
    where
      ($>=) ∷ ∀ β. Ord β ⇒ β → β → Bool
      ($>=) = (>=)

Change History

Changed 5 years ago by Baughn

  • owner changed from somebody to Baughn
  • priority changed from major to minor
  • status changed from new to assigned

Changed 5 years ago by Baughn

The latest patch appears to have fixed this problem to some degree; although the indentation is way off, at least there are no more parse errors.

Changed 5 years ago by Baughn

  • status changed from assigned to closed
  • resolution set to fixed

These indentation issues are not particular to unicode symbols, however, and have been there a while.

Note: See TracTickets for help on using tickets.