kicad-data-0.4.0: Parser and writer for KiCad files.

Safe HaskellSafe-Inferred

Data.Kicad.SExpr

Contents

Synopsis

Types

Writing

pretty :: SExpr -> DocSource

Pretty-print a SExpr as a readable Doc.

write :: SExpr -> StringSource

Serialize an SExpr as a compact s-expression String.

writeKeyword :: Keyword -> StringSource

Write a Keyword as a String. Removes "Key" from the Show instance and converts the rest to underscore (e.g KeyFpTextType becomes fp_text_type).

Parsing

parse :: String -> Either String SExprSource

Parse a String as a SExpr or return an error.