stylish-haskell icon indicating copy to clipboard operation
stylish-haskell copied to clipboard

Add new step Signature that will format function signatures

Open EncodePanda opened this issue 3 years ago • 0 comments

Adds a new step to format function signatures

Example:

    input = unlines
      [ "module Herp where"
      , ""
      , "fooBar :: a -> b -> a"
      , "fooBar v _ = v"
      ]
    expected = unlines
      [ "module Herp where"
      , ""
      , "fooBar ::"
      , "     a"
      , "  -> b"
      , "  -> a"
      , "fooBar v _ = v"
      ]

For more examples please see the test suite.

This step is heavily inspired by https://github.com/input-output-hk/ouroboros-network/blob/bf8579cc2ff2a7bc4ba23150eff659cfd1c6ccca/ouroboros-consensus/docs/StyleGuide.md

EncodePanda avatar Feb 03 '21 11:02 EncodePanda