Copyright | (C) 2015-2018 Oleg Grenrus |
---|---|
License | BSD3 |
Maintainer | Oleg Grenrus <oleg.grenrus@iki.fi> |
Safe Haskell | None |
Language | Haskell2010 |
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
Instances
Bounded (SymTag s) Source # | |
Enum (SymTag s) Source # | |
Eq (SymTag s) Source # | |
Ord (SymTag s) Source # | |
Defined in Data.Aeson.Extra.SymTag | |
Read (SymTag s) Source # | |
Show (SymTag s) Source # | |
KnownSymbol s => ToJSON (SymTag s) Source # | |
Defined in Data.Aeson.Extra.SymTag | |
KnownSymbol s => FromJSON (SymTag s) Source # | |
NFData (SymTag s) Source # | Since: 0.4.1.0 |
Defined in Data.Aeson.Extra.SymTag |