Hets - the Heterogeneous Tool Set

Copyright(c) Christian Maeder DFKI GmbH 2014
LicenseGPLv2 or higher, see LICENSE.txt
MaintainerChristian.Maeder@dfki.de
Stabilityprovisional
Portabilitynon-portable
Safe HaskellNone

Common.Json

Description

inspired by Yuriy Iskra's json2-types hackage package

Documentation

data Json Source #

Constructors

JString String 
JNumber Rational 
JBool Bool 
JNull 
JArray [Json] 
JObject [JPair] 

Instances

Eq Json Source # 

Methods

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

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

Ord Json Source # 

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

Show Json Source # 

Methods

showsPrec :: Int -> Json -> ShowS

show :: Json -> String

showList :: [Json] -> ShowS

ppJson :: Json -> String Source #

mkJStr :: String -> Json Source #

mkJBool :: Bool -> Json Source #

mkJNum :: Real b => b -> Json Source #

type JPair = (String, Json) Source #

mkJPair :: String -> String -> JPair Source #

mkNameJPair :: String -> JPair Source #

rangedToJson :: (GetRange a, Pretty a) => String -> GlobalAnnos -> a -> [JPair] Source #

tagJson :: String -> Json -> Json Source #

pJson :: CharParser st Json Source #

class ToJson a where Source #

Minimal complete definition

asJson

Methods

asJson :: a -> Json Source #

Instances

Data a => ToJson a Source # 

Methods

asJson :: a -> Json Source #

ToJson Frm_Wrap Source # 

Methods

asJson :: Frm_Wrap -> Json Source #

ToJson f => ToJson (TH_FORMULA f) Source # 

Methods

asJson :: TH_FORMULA f -> Json Source #

ToJson s => ToJson (S2 s) Source # 

Methods

asJson :: S2 s -> Json Source #