Safe Haskell | None |
---|---|
Language | Haskell2010 |
Formatting type declarations and class instances for inferred types.
- displaySplitTypes :: Map Text Type -> Text
- splitTypeByLabel :: Text -> Type -> Map Text Type
- unificationCandidates :: HashMap t Type -> [[t]]
- unifyCandidates :: [[Text]] -> Map Text Type -> Map Text Type
- normalizeTypeName :: Text -> Text
Documentation
displaySplitTypes :: Map Text Type -> Text Source
Display an environment of types split by name.
splitTypeByLabel :: Text -> Type -> Map Text Type Source
Splits initial type with a given label, into a mapping of object type names and object type structures.
unificationCandidates :: HashMap t Type -> [[t]] Source
For a given splitted types, it returns candidates for extra unifications.
unifyCandidates :: [[Text]] -> Map Text Type -> Map Text Type Source
Unifies candidates on a give input list.
normalizeTypeName :: Text -> Text Source
Normalize type name by: 1. Treating all characters that are not acceptable in Haskell variable name as end of word. 2. Capitalizing each word, but a first (camelCase). 3. Adding underscore if first character is non-alphabetic. 4. Escaping Haskell keywords if the whole identifier is such keyword. 5. If identifier is empty, then substituting JsonEmptyKey for its name.