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

Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Kicad.SExpr

Contents

Synopsis

Types

Writing

pretty :: SExpr -> Doc Source

Pretty-print a SExpr as a readable Doc.

write :: SExpr -> String Source

Serialize an SExpr as a compact s-expression String.

writeKeyword :: Keyword -> String Source

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 SExpr Source

Parse a String as a SExpr or return an error.