Idris-dev icon indicating copy to clipboard operation
Idris-dev copied to clipboard

Show function composition infix using pretty printer

Open david-christiansen opened this issue 12 years ago • 3 comments

This is wrong:

> :t snd . snd $ ("a", ("b", "c"))
. (snd) (snd) ("a", ("b", "c")) : String

david-christiansen avatar Feb 12 '14 21:02 david-christiansen

A similar things happen with the implicit arguments to (=).

> :t (=) Nat Int
= Nat Int : Nat -> Int -> Type

trillioneyes avatar Feb 12 '14 21:02 trillioneyes

Thanks! These things need special handling and it's tough to find them on my own.

david-christiansen avatar Feb 12 '14 21:02 david-christiansen

The problem with . is that the pprinter is looking for applications of non-alphanumeric names to two explicit arguments. In this case, it is applied to three when in normal form.

david-christiansen avatar Feb 14 '14 17:02 david-christiansen