Copyright | (C) 2023 David M. Johnson |
---|---|
License | BSD3-style (see the file LICENSE) |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
DAP.Utils
Description
Synopsis
- encodeBaseProtocolMessage :: ToJSON a => a -> ByteString
- capitalize :: String -> String
- toLowerCase :: String -> String
- modifier :: Typeable a => proxy a -> String -> String
- getName :: Typeable a => proxy a -> String
- genericToJSONWithModifier :: (Generic a, GToJSON Zero (Rep a), Typeable a) => a -> Value
- genericParseJSONWithModifier :: (Generic a, GFromJSON Zero (Rep a), Typeable a) => Value -> Parser a
- withBraces :: Text -> Text
Documentation
encodeBaseProtocolMessage :: ToJSON a => a -> ByteString Source #
Encodes DAP protocol message appropriately >
capitalize :: String -> String Source #
Capitalization helper function >>> capitalize "fooBar" >>> FooBar
modifier :: Typeable a => proxy a -> String -> String Source #
Used as a fieldLabelModifier when generating aeson parsers >>> modifier (Proxy @Int) "intThing" >>> String "thing"
getName :: Typeable a => proxy a -> String Source #
Used as a fieldLabelModifier when generating aeson parsers >>> getName (Proxy @Int) >>> Int
genericToJSONWithModifier :: (Generic a, GToJSON Zero (Rep a), Typeable a) => a -> Value Source #
Used as a fieldLabelModifier when generating aeson parsers >>> getName (Proxy @Int) >>> Int
genericParseJSONWithModifier :: (Generic a, GFromJSON Zero (Rep a), Typeable a) => Value -> Parser a Source #
Used as a fieldLabelModifier when generating aeson parsers >>> getName (Proxy @Int) >>> Int
withBraces :: Text -> Text Source #
Log formatting util