cooklang-hs-0.1.1: Parser for the Cook markup language
Safe HaskellSafe-Inferred
LanguageHaskell2010

Text.Cook

Synopsis

Documentation

data Result Source #

The result of parsing a .cook file

Constructors

Recipe [Metadata] [Step]

A recipe

Grouping [Category]

A shopping list

Instances

Instances details
Show Result Source # 
Instance details

Defined in Text.Cook

Eq Result Source # 
Instance details

Defined in Text.Cook

Methods

(==) :: Result -> Result -> Bool #

(/=) :: Result -> Result -> Bool #

data Content Source #

Represents the different types of content that can be appear in a recipe. The strings may be empty.

Constructors

Text String

Plain text

Ingredient String String String

An ingredient annotation with label, quantity, and unit

Timer String String String

A timer annotation with label, quantity, and unit

Cookware String String

A cookware annotation with label and quantity

Instances

Instances details
Show Content Source # 
Instance details

Defined in Text.Cook

Eq Content Source # 
Instance details

Defined in Text.Cook

Methods

(==) :: Content -> Content -> Bool #

(/=) :: Content -> Content -> Bool #

data Category Source #

A section on a shopping list

Constructors

Category String [Item] 

Instances

Instances details
Show Category Source # 
Instance details

Defined in Text.Cook

Eq Category Source # 
Instance details

Defined in Text.Cook

data Item Source #

An item on a shopping list

Constructors

Item String String 

Instances

Instances details
Show Item Source # 
Instance details

Defined in Text.Cook

Methods

showsPrec :: Int -> Item -> ShowS #

show :: Item -> String #

showList :: [Item] -> ShowS #

Eq Item Source # 
Instance details

Defined in Text.Cook

Methods

(==) :: Item -> Item -> Bool #

(/=) :: Item -> Item -> Bool #

type Step = [Content] Source #

parseCook :: String -> Either String Result Source #

Parse a .cook file