ennocramer / floskell

Floskell is a flexible Haskell source code pretty printer.
BSD 3-Clause "New" or "Revised" License
178 stars 22 forks source link

Align function definition equals sign #27

Closed Rhywun closed 5 years ago

Rhywun commented 5 years ago

Hi, is there a way to align the equals signs here, such that this:

sorted :: [Integer] -> Bool
sorted [] = True
sorted [_] = True
sorted (x:y:zs) = x < y && sorted (y : zs)

becomes this:

sorted :: [Integer] -> Bool
sorted []       = True
sorted [_]      = True
sorted (x:y:zs) = x < y && sorted (y : zs)

Thanks!

ennocramer commented 5 years ago

This is currently not possible, though it should not be hard to add. All the necessary pieces are already in place.

Rhywun commented 5 years ago

I would appreciate it, much thanks!

ennocramer commented 5 years ago

And there you go. Implemented in master/ec172d9d. Cheers!