Ticket #44 (closed defect: fixed)

Opened 6 years ago

Last modified 2 years ago

Type signatures lose parentheses

Reported by: anonymous Owned by:
Priority: major Milestone:
Version: 2.0.0.0 Keywords:
Cc:

Description

Under certain circumstances syntactically necessary parentheses are dropped from type signatures. Both of these examples are real code, though simpler examples could be found.

* Case 1: Strict multi-token fields

data (f :+: g) e = Inl !(f e) | Inr !(g e)

* Case 2: Per-argument comments on function arguments.

pairWithBy :: (a -> b -> c) -- ^ @(,)@ tuple homomorphism -> (c -> d -> d) -- ^ @(:)@ list homomorphism, pt. 1 -> d -- ^ @[]@ list homomorphism, pt. 2 -> [a] -> [b] -> Maybe d -- a safer @zip@ function

Change History

Changed 6 years ago by cgibbard@…

This bug is still present in 2.1.0. You can see another example of it here.

Changed 6 years ago by anonymous

  • milestone set to 2.2.0

Changed 6 years ago by anonymous

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

Changed 2 years ago by anonymous

  • milestone 2.2.0 deleted

Milestone 2.2.0 deleted

Note: See TracTickets for help on using tickets.