hpack-0.37.0: A modern format for Haskell packages
Safe HaskellNone
LanguageHaskell2010

Hpack.Render

Synopsis

Documentation

NOTE: This module is exposed to allow integration of Hpack into other tools. It is not meant for general use by end users. The following caveats apply:

  • The API is undocumented, consult the source instead.
  • The exposed types and functions primarily serve Hpack's own needs, not that of a public API. Breaking changes can happen as Hpack evolves.

As an Hpack user you either want to use the hpack executable or a build tool that supports Hpack (e.g. stack or cabal2nix).

renderPackage :: [String] -> Package -> String Source #

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

data RenderSettings Source #

Instances

Instances details
Show RenderSettings Source # 
Instance details

Defined in Hpack.Render.Dsl

Methods

showsPrec :: Int -> RenderSettings -> ShowS

show :: RenderSettings -> String

showList :: [RenderSettings] -> ShowS

Eq RenderSettings Source # 
Instance details

Defined in Hpack.Render.Dsl

newtype Alignment Source #

Constructors

Alignment Int 

Instances

Instances details
Num Alignment Source # 
Instance details

Defined in Hpack.Render.Dsl

Show Alignment Source # 
Instance details

Defined in Hpack.Render.Dsl

Methods

showsPrec :: Int -> Alignment -> ShowS

show :: Alignment -> String

showList :: [Alignment] -> ShowS

Eq Alignment Source # 
Instance details

Defined in Hpack.Render.Dsl

Methods

(==) :: Alignment -> Alignment -> Bool

(/=) :: Alignment -> Alignment -> Bool

data CommaStyle Source #

Instances

Instances details
Show CommaStyle Source # 
Instance details

Defined in Hpack.Render.Dsl

Methods

showsPrec :: Int -> CommaStyle -> ShowS

show :: CommaStyle -> String

showList :: [CommaStyle] -> ShowS

Eq CommaStyle Source # 
Instance details

Defined in Hpack.Render.Dsl

Methods

(==) :: CommaStyle -> CommaStyle -> Bool

(/=) :: CommaStyle -> CommaStyle -> Bool