looksee-0.6.0: A simple text parser with decent errors
Safe HaskellSafe-Inferred
LanguageGHC2021

Looksee.Examples

Description

Example parsers

Synopsis

Documentation

data Json Source #

A JSON value

Instances

Instances details
Show Json Source # 
Instance details

Defined in Looksee.Examples

Methods

showsPrec :: Int -> Json -> ShowS #

show :: Json -> String #

showList :: [Json] -> ShowS #

Eq Json Source # 
Instance details

Defined in Looksee.Examples

Methods

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

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

Ord Json Source # 
Instance details

Defined in Looksee.Examples

Methods

compare :: Json -> Json -> Ordering #

(<) :: Json -> Json -> Bool #

(<=) :: Json -> Json -> Bool #

(>) :: Json -> Json -> Bool #

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

max :: Json -> Json -> Json #

min :: Json -> Json -> Json #

jsonParser :: Parser Void Json Source #

A JSON parser (modulo some differences in numeric parsing)

data Arith Source #

An arithmetic expression

Instances

Instances details
Show Arith Source # 
Instance details

Defined in Looksee.Examples

Methods

showsPrec :: Int -> Arith -> ShowS #

show :: Arith -> String #

showList :: [Arith] -> ShowS #

Eq Arith Source # 
Instance details

Defined in Looksee.Examples

Methods

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

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

Ord Arith Source # 
Instance details

Defined in Looksee.Examples

Methods

compare :: Arith -> Arith -> Ordering #

(<) :: Arith -> Arith -> Bool #

(<=) :: Arith -> Arith -> Bool #

(>) :: Arith -> Arith -> Bool #

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

max :: Arith -> Arith -> Arith #

min :: Arith -> Arith -> Arith #

arithParser :: Parser Void Arith Source #

A parser for arithmetic expressions

data Atom Source #

Leaves of S-expression trees

Instances

Instances details
Show Atom Source # 
Instance details

Defined in Looksee.Examples

Methods

showsPrec :: Int -> Atom -> ShowS #

show :: Atom -> String #

showList :: [Atom] -> ShowS #

Eq Atom Source # 
Instance details

Defined in Looksee.Examples

Methods

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

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

Ord Atom Source # 
Instance details

Defined in Looksee.Examples

Methods

compare :: Atom -> Atom -> Ordering #

(<) :: Atom -> Atom -> Bool #

(<=) :: Atom -> Atom -> Bool #

(>) :: Atom -> Atom -> Bool #

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

max :: Atom -> Atom -> Atom #

min :: Atom -> Atom -> Atom #

data Sexp Source #

An S-expression

Constructors

SexpAtom !Atom 
SexpList !(Seq Sexp) 

Instances

Instances details
Show Sexp Source # 
Instance details

Defined in Looksee.Examples

Methods

showsPrec :: Int -> Sexp -> ShowS #

show :: Sexp -> String #

showList :: [Sexp] -> ShowS #

Eq Sexp Source # 
Instance details

Defined in Looksee.Examples

Methods

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

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

Ord Sexp Source # 
Instance details

Defined in Looksee.Examples

Methods

compare :: Sexp -> Sexp -> Ordering #

(<) :: Sexp -> Sexp -> Bool #

(<=) :: Sexp -> Sexp -> Bool #

(>) :: Sexp -> Sexp -> Bool #

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

max :: Sexp -> Sexp -> Sexp #

min :: Sexp -> Sexp -> Sexp #

sexpParser :: Parser Void Sexp Source #

A parser for S-expressions