Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype LiteralString = LiteralString Text
- newtype StringEncodedInteger = StringEncodedInteger Integer
- checkEqualTo :: (Eq a, Show a) => a -> a -> Parser a
Documentation
newtype LiteralString Source #
Used for a more explicit style in toJSON
instances. It also means we don't have to add type
annotations after the value.
Instances
Eq LiteralString Source # | |
Defined in Gotyno.Helpers (==) :: LiteralString -> LiteralString -> Bool # (/=) :: LiteralString -> LiteralString -> Bool # | |
Show LiteralString Source # | |
Defined in Gotyno.Helpers showsPrec :: Int -> LiteralString -> ShowS # show :: LiteralString -> String # showList :: [LiteralString] -> ShowS # | |
ToJSON LiteralString Source # | |
Defined in Gotyno.Helpers toJSON :: LiteralString -> Value # toEncoding :: LiteralString -> Encoding # toJSONList :: [LiteralString] -> Value # toEncodingList :: [LiteralString] -> Encoding # |
newtype StringEncodedInteger Source #
Used to encode Integer
({I,U}{64,128}) values, because there are ecosystems where these
cannot be decoded properly without having them come in as strings in transit.
Instances
Eq StringEncodedInteger Source # | |
Defined in Gotyno.Helpers (==) :: StringEncodedInteger -> StringEncodedInteger -> Bool # (/=) :: StringEncodedInteger -> StringEncodedInteger -> Bool # | |
Show StringEncodedInteger Source # | |
Defined in Gotyno.Helpers showsPrec :: Int -> StringEncodedInteger -> ShowS # show :: StringEncodedInteger -> String # showList :: [StringEncodedInteger] -> ShowS # | |
ToJSON StringEncodedInteger Source # | |
Defined in Gotyno.Helpers toJSON :: StringEncodedInteger -> Value # toEncoding :: StringEncodedInteger -> Encoding # toJSONList :: [StringEncodedInteger] -> Value # toEncodingList :: [StringEncodedInteger] -> Encoding # | |
FromJSON StringEncodedInteger Source # | |
Defined in Gotyno.Helpers parseJSON :: Value -> Parser StringEncodedInteger # parseJSONList :: Value -> Parser [StringEncodedInteger] # |