Hie.Cabal.Parser

implicit-hie-0.1.4.0: Auto generate hie-bios cradles & hie.yaml

Safe Haskell | Safe-Inferred
Language | Haskell2010

Hie.Cabal.Parser

Synopsis

- type Name = Text
- type Path = Text
- type Indent = Int
- data Package = Package Name [Component]
- data CompType
  - = Lib
  - | Exe
  - | Test
  - | Bench
- data Component = Comp CompType Name Path
- parsePackage' :: Text -> Either String Package
- skipFreeformField :: Parser ()
- parsePackage :: Parser Package
- componentHeader :: Indent -> Text -> Parser Name
- parseComponent :: Indent -> Parser [Component]
- parseLib :: Indent -> Parser [Component]
- parseTestSuite :: Indent -> Parser [Component]
- parseExe :: Indent -> Parser [Component]
- parseBench :: Indent -> Parser [Component]
- parseSecMain :: (Name -> Path -> Component) -> Text -> Indent -> Parser [Component]
- parseQuoted :: Parser Text
- parseString :: Parser Name
- unqualName :: Parser Text
- parseList :: Indent -> Parser [Text]
- pathMain :: Indent -> [Text] -> Text -> [Text] -> [Text] -> Parser [Text]
- (<//>) :: Text -> Text -> Text
- parseSec :: Indent -> Text -> (Name -> Path -> Component) -> Parser [Component]
- skipToNextLine :: Parser ()
- skipBlock :: Indent -> Parser ()
- comment :: Parser ()
- skipBlockLine :: Indent -> Parser ()
- emptyOrComLine :: Parser ()
- tabOrSpace :: Parser Char
- hsSourceDir :: Indent -> Parser [Text]
- field :: Indent -> Text -> (Indent -> Parser a) -> Parser a
- extractPath :: Indent -> [Path] -> Parser [Path]
- indent :: Indent -> Parser Int
- extractPkgs :: Parser [Text]

# Documentation

type Name = Text #

type Path = Text #

type Indent = Int #

data Package #

Constructors

Package Name [Component] |

#### Instances

Instances details

Show Package # |
Instance details Defined in Hie.Cabal.Parser Methods showsPrec :: Int -> Package -> ShowS # show :: Package -> String # showList :: [Package] -> ShowS #
Eq Package # |
Instance details Defined in Hie.Cabal.Parser Methods (==) :: Package -> Package -> Bool # (/=) :: Package -> Package -> Bool #
Ord Package # |
Instance details Defined in Hie.Cabal.Parser Methods compare :: Package -> Package -> Ordering # (<) :: Package -> Package -> Bool # (<=) :: Package -> Package -> Bool # (>) :: Package -> Package -> Bool # (>=) :: Package -> Package -> Bool # max :: Package -> Package -> Package # min :: Package -> Package -> Package #

data CompType #

Constructors

Lib |
Exe |
Test |
Bench |

#### Instances

Instances details

Show CompType # |
Instance details Defined in Hie.Cabal.Parser Methods showsPrec :: Int -> CompType -> ShowS # show :: CompType -> String # showList :: [CompType] -> ShowS #
Eq CompType # |
Instance details Defined in Hie.Cabal.Parser Methods (==) :: CompType -> CompType -> Bool # (/=) :: CompType -> CompType -> Bool #
Ord CompType # |
Instance details Defined in Hie.Cabal.Parser Methods compare :: CompType -> CompType -> Ordering # (<) :: CompType -> CompType -> Bool # (<=) :: CompType -> CompType -> Bool # (>) :: CompType -> CompType -> Bool # (>=) :: CompType -> CompType -> Bool # max :: CompType -> CompType -> CompType # min :: CompType -> CompType -> CompType #

data Component #

Constructors

Comp CompType Name Path |

#### Instances

Instances details

Show Component # |
Instance details Defined in Hie.Cabal.Parser Methods showsPrec :: Int -> Component -> ShowS # show :: Component -> String # showList :: [Component] -> ShowS #
Eq Component # |
Instance details Defined in Hie.Cabal.Parser Methods (==) :: Component -> Component -> Bool # (/=) :: Component -> Component -> Bool #
Ord Component # |
Instance details Defined in Hie.Cabal.Parser Methods compare :: Component -> Component -> Ordering # (<) :: Component -> Component -> Bool # (<=) :: Component -> Component -> Bool # (>) :: Component -> Component -> Bool # (>=) :: Component -> Component -> Bool # max :: Component -> Component -> Component # min :: Component -> Component -> Component #

parsePackage' :: Text -> Either String Package #

skipFreeformField :: Parser () #

parsePackage :: Parser Package #

componentHeader :: Indent -> Text -> Parser Name #

parseComponent :: Indent -> Parser [Component] #

parseLib :: Indent -> Parser [Component] #

parseTestSuite :: Indent -> Parser [Component] #

parseExe :: Indent -> Parser [Component] #

parseBench :: Indent -> Parser [Component] #

parseSecMain :: (Name -> Path -> Component) -> Text -> Indent -> Parser [Component] #

parseQuoted :: Parser Text #

parseString :: Parser Name #

unqualName :: Parser Text #

parseList :: Indent -> Parser [Text] #

Comma or space separated list, with optional new lines.

pathMain :: Indent -> [Text] -> Text -> [Text] -> [Text] -> Parser [Text] #

(<//>) :: Text -> Text -> Text infixr 5 #

parseSec :: Indent -> Text -> (Name -> Path -> Component) -> Parser [Component] #

skipToNextLine :: Parser () #

skipBlock :: Indent -> Parser () #

comment :: Parser () #

skipBlockLine :: Indent -> Parser () #

emptyOrComLine :: Parser () #

tabOrSpace :: Parser Char #

hsSourceDir :: Indent -> Parser [Text] #

field :: Indent -> Text -> (Indent -> Parser a) -> Parser a #

extractPath :: Indent -> [Path] -> Parser [Path] #

indent :: Indent -> Parser Int #

Skip at least n spaces

extractPkgs :: Parser [Text] #