aeson-extra-0.4.1.3: Extra goodies for aeson

Copyright(C) 2015-2018 Oleg Grenrus
LicenseBSD3
MaintainerOleg Grenrus <oleg.grenrus@iki.fi>
Safe HaskellNone
LanguageHaskell2010

Data.Aeson.Extra.SymTag

Description

 
Synopsis

Documentation

data SymTag (s :: Symbol) Source #

Singleton string encoded and decoded as ifself.

λ> encode (SymTag :: SymTag "foobar")
"\"foobar\""
decode "\"foobar\"" :: Maybe (SymTag "foobar")
Just SymTag
decode "\"foobar\"" :: Maybe (SymTag "barfoo")
Nothing

Available with: base >=4.7

Constructors

SymTag 
Instances
Bounded (SymTag s) Source # 
Instance details

Defined in Data.Aeson.Extra.SymTag

Methods

minBound :: SymTag s #

maxBound :: SymTag s #

Enum (SymTag s) Source # 
Instance details

Defined in Data.Aeson.Extra.SymTag

Methods

succ :: SymTag s -> SymTag s #

pred :: SymTag s -> SymTag s #

toEnum :: Int -> SymTag s #

fromEnum :: SymTag s -> Int #

enumFrom :: SymTag s -> [SymTag s] #

enumFromThen :: SymTag s -> SymTag s -> [SymTag s] #

enumFromTo :: SymTag s -> SymTag s -> [SymTag s] #

enumFromThenTo :: SymTag s -> SymTag s -> SymTag s -> [SymTag s] #

Eq (SymTag s) Source # 
Instance details

Defined in Data.Aeson.Extra.SymTag

Methods

(==) :: SymTag s -> SymTag s -> Bool #

(/=) :: SymTag s -> SymTag s -> Bool #

Ord (SymTag s) Source # 
Instance details

Defined in Data.Aeson.Extra.SymTag

Methods

compare :: SymTag s -> SymTag s -> Ordering #

(<) :: SymTag s -> SymTag s -> Bool #

(<=) :: SymTag s -> SymTag s -> Bool #

(>) :: SymTag s -> SymTag s -> Bool #

(>=) :: SymTag s -> SymTag s -> Bool #

max :: SymTag s -> SymTag s -> SymTag s #

min :: SymTag s -> SymTag s -> SymTag s #

Read (SymTag s) Source # 
Instance details

Defined in Data.Aeson.Extra.SymTag

Show (SymTag s) Source # 
Instance details

Defined in Data.Aeson.Extra.SymTag

Methods

showsPrec :: Int -> SymTag s -> ShowS #

show :: SymTag s -> String #

showList :: [SymTag s] -> ShowS #

KnownSymbol s => ToJSON (SymTag s) Source # 
Instance details

Defined in Data.Aeson.Extra.SymTag

KnownSymbol s => FromJSON (SymTag s) Source # 
Instance details

Defined in Data.Aeson.Extra.SymTag

NFData (SymTag s) Source #

Since: 0.4.1.0

Instance details

Defined in Data.Aeson.Extra.SymTag

Methods

rnf :: SymTag s -> () #