dap
Copyright(C) 2023 David M. Johnson
LicenseBSD3-style (see the file LICENSE)
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

DAP.Utils

Description

 
Synopsis

Documentation

encodeBaseProtocolMessage :: ToJSON a => a -> ByteString Source #

Encodes DAP protocol message appropriately >

capitalize :: String -> String Source #

Capitalization helper function >>> capitalize "fooBar" >>> FooBar

toLowerCase :: String -> String Source #

Lower cases a word >>> toLowerCase 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