Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Language.PureScript.Pretty
Description
A collection of pretty printers for core data types:
- [
Language.PureScript.Pretty.Kinds
] Pretty printer for kinds - [
Language.PureScript.Pretty.Values
] Pretty printer for values - [
Language.PureScript.Pretty.Types
] Pretty printer for types
Synopsis
- type PrettyPrintConstraint = (Qualified (ProperName 'ClassName), [PrettyPrintType], [PrettyPrintType])
- data PrettyPrintType
- = PPTUnknown Int
- | PPTypeVar Text (Maybe Text)
- | PPTypeLevelString PSString
- | PPTypeLevelInt Integer
- | PPTypeWildcard (Maybe Text)
- | PPTypeConstructor (Qualified (ProperName 'TypeName))
- | PPTypeOp (Qualified (OpName 'TypeOpName))
- | PPSkolem Text Int
- | PPTypeApp PrettyPrintType PrettyPrintType
- | PPKindArg PrettyPrintType
- | PPConstrainedType PrettyPrintConstraint PrettyPrintType
- | PPKindedType PrettyPrintType PrettyPrintType
- | PPBinaryNoParensType PrettyPrintType PrettyPrintType PrettyPrintType
- | PPParensInType PrettyPrintType
- | PPForAll [(TypeVarVisibility, Text, Maybe PrettyPrintType)] PrettyPrintType
- | PPFunction PrettyPrintType PrettyPrintType
- | PPRecord [(Label, PrettyPrintType)] (Maybe PrettyPrintType)
- | PPRow [(Label, PrettyPrintType)] (Maybe PrettyPrintType)
- | PPTruncated
- convertPrettyPrintType :: Int -> Type a -> PrettyPrintType
- prettyPrintLabel :: Label -> Text
- prettyPrintString :: PSString -> Text
- prettyPrintBinderAtom :: Binder -> Text
- prettyPrintObjectKey :: PSString -> Text
- prettyPrintSuggestedType :: Type a -> String
- prettyPrintValue :: Int -> Expr -> Box
- typeAsBox :: Int -> Type a -> Box
- typeAtomAsBox :: Int -> Type a -> Box
- typeDiffAsBox :: Int -> Type a -> Box
- prettyPrintType :: Int -> Type a -> String
- prettyPrintTypeWithUnicode :: Int -> Type a -> String
- prettyPrintTypeAtom :: Int -> Type a -> String
- prettyPrintBinder :: Binder -> Text
Documentation
type PrettyPrintConstraint = (Qualified (ProperName 'ClassName), [PrettyPrintType], [PrettyPrintType]) #
data PrettyPrintType #
Constructors
convertPrettyPrintType :: Int -> Type a -> PrettyPrintType #
prettyPrintLabel :: Label -> Text #
prettyPrintString :: PSString -> Text #
Pretty print a PSString, using PureScript escape sequences.
prettyPrintBinderAtom :: Binder -> Text #
prettyPrintObjectKey :: PSString -> Text #
prettyPrintSuggestedType :: Type a -> String #
Generate a pretty-printed string representing a suggested Type
prettyPrintValue :: Int -> Expr -> Box #
Pretty-print an expression
typeAtomAsBox :: Int -> Type a -> Box #
typeDiffAsBox :: Int -> Type a -> Box #
prettyPrintType :: Int -> Type a -> String #
Generate a pretty-printed string representing a Type
prettyPrintTypeWithUnicode :: Int -> Type a -> String #
Generate a pretty-printed string representing a Type
using unicode
symbols where applicable
prettyPrintTypeAtom :: Int -> Type a -> String #
Generate a pretty-printed string representing a Type, as it should appear inside parentheses
prettyPrintBinder :: Binder -> Text #
Generate a pretty-printed string representing a Binder