hpack-0.18.1: An alternative format for Haskell packages

Safe Haskell | None
Language | Haskell2010

Hpack.Run

# Documentation

run :: Maybe FilePath -> FilePath -> IO ([String], FilePath, String) Source #

renderPackage :: RenderSettings -> Alignment -> [String] -> [(String, [String])] -> Package -> String Source #

data RenderSettings Source #

Constructors

RenderSettings |

Fields

- renderSettingsIndentation :: Int
- renderSettingsFieldAlignment :: Alignment
- renderSettingsCommaStyle :: CommaStyle

Instances

Eq RenderSettings Source # |
Methods (==) :: RenderSettings -> RenderSettings -> Bool # (/=) :: RenderSettings -> RenderSettings -> Bool #
Show RenderSettings Source # |
Methods showsPrec :: Int -> RenderSettings -> ShowS # show :: RenderSettings -> String # showList :: [RenderSettings] -> ShowS #

newtype Alignment Source #

Constructors

Alignment Int |

Instances

Eq Alignment Source # |
Methods (==) :: Alignment -> Alignment -> Bool # (/=) :: Alignment -> Alignment -> Bool #
Num Alignment Source # |
Methods (+) :: Alignment -> Alignment -> Alignment # (-) :: Alignment -> Alignment -> Alignment # (*) :: Alignment -> Alignment -> Alignment # negate :: Alignment -> Alignment # abs :: Alignment -> Alignment # signum :: Alignment -> Alignment # fromInteger :: Integer -> Alignment #
Show Alignment Source # |
Methods showsPrec :: Int -> Alignment -> ShowS # show :: Alignment -> String # showList :: [Alignment] -> ShowS #

data CommaStyle Source #

Constructors

LeadingCommas |
TrailingCommas |

Instances

Eq CommaStyle Source # |
Methods (==) :: CommaStyle -> CommaStyle -> Bool # (/=) :: CommaStyle -> CommaStyle -> Bool #
Show CommaStyle Source # |
Methods showsPrec :: Int -> CommaStyle -> ShowS # show :: CommaStyle -> String # showList :: [CommaStyle] -> ShowS #

defaultRenderSettings :: RenderSettings Source #