stylish-haskell
stylish-haskell copied to clipboard
DataTypes style
Hello! It would be great to add option to style DataTypes and other structures, for example:
data Point = Point
{ pointX :: Double, pointY :: Double
, pointName :: String
}
deriving (Show)
should be changed to the following (or simmilar):
data Point = Point { pointX :: Double
, pointY :: Double
, pointName :: String
} deriving (Show)
Additional the ability to enable or disable some pretification parts would be very usefull - for example, some users would not like to put types in the same column (like in my example)
...or even having the trailing } deriving (Show)
on the same line as pointName?
Hi, we've recently added a feature to format record syntax (https://github.com/jaspervdj/stylish-haskell/pull/256). It works a bit different than what you've proposed, but an option can be added to adhere to your proposal.