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

Safe HaskellSafe
LanguageHaskell2010

Data.Kicad.SExpr

Contents

Synopsis

Types

data SExpr Source #

Instances

Eq SExpr Source # 

Methods

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

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

Show SExpr Source # 

Methods

showsPrec :: Int -> SExpr -> ShowS #

show :: SExpr -> String #

showList :: [SExpr] -> ShowS #

Writing

pretty :: SExpr -> Doc Source #

Pretty-print an s-expression as a readable "document".

write :: SExpr -> String Source #

Serialize an s-expression into a compact string.

Parsing

parse :: String -> Either String SExpr Source #

Parse a String as a SExpr or return an error.

parseWithFilename :: String -> String -> Either String SExpr Source #

Parse a String as a SExpr giving a filename to use in the source code location

getPos :: SExpr -> SourcePos Source #

Get s-expression source code position (filename, line-number and - column-number)