Safe Haskell | None |
---|---|
Language | Haskell2010 |
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
- prettyPrintString :: PSString -> Text
- prettyPrintKind :: Kind a -> Text
- type PrettyPrintConstraint = (Qualified (ProperName ClassName), [PrettyPrintType])
- data PrettyPrintType
- = PPTUnknown Int
- | PPTypeVar Text
- | PPTypeLevelString PSString
- | PPTypeWildcard (Maybe Text)
- | PPTypeConstructor (Qualified (ProperName TypeName))
- | PPTypeOp (Qualified (OpName TypeOpName))
- | PPSkolem Text Int
- | PPTypeApp PrettyPrintType PrettyPrintType
- | PPConstrainedType PrettyPrintConstraint PrettyPrintType
- | PPKindedType PrettyPrintType (Kind ())
- | PPBinaryNoParensType PrettyPrintType PrettyPrintType PrettyPrintType
- | PPParensInType PrettyPrintType
- | PPForAll [(Text, Maybe (Kind ()))] PrettyPrintType
- | PPFunction PrettyPrintType PrettyPrintType
- | PPRecord [(Label, PrettyPrintType)] (Maybe PrettyPrintType)
- | PPRow [(Label, PrettyPrintType)] (Maybe PrettyPrintType)
- | PPTruncated
- convertPrettyPrintType :: Int -> Type a -> PrettyPrintType
- typeAtomAsBox :: Int -> Type a -> Box
- prettyPrintTypeAtom :: Int -> Type a -> String
- typeAsBox :: Int -> Type a -> Box
- suggestedTypeAsBox :: PrettyPrintType -> Box
- prettyPrintType :: Int -> Type a -> String
- prettyPrintTypeWithUnicode :: Int -> Type a -> String
- prettyPrintSuggestedType :: Type a -> String
- prettyPrintLabel :: Label -> Text
- prettyPrintObjectKey :: PSString -> Text
- prettyPrintValue :: Int -> Expr -> Box
- prettyPrintBinderAtom :: Binder -> Text
- prettyPrintBinder :: Binder -> Text
Documentation
prettyPrintString :: PSString -> Text Source #
Pretty print a PSString, using Haskell/PureScript escape sequences. This is identical to the Show instance except that we get a Text out instead of a String.
prettyPrintKind :: Kind a -> Text Source #
Generate a pretty-printed string representing a Kind
type PrettyPrintConstraint = (Qualified (ProperName ClassName), [PrettyPrintType]) Source #
data PrettyPrintType Source #
convertPrettyPrintType :: Int -> Type a -> PrettyPrintType Source #
prettyPrintTypeAtom :: Int -> Type a -> String Source #
Generate a pretty-printed string representing a Type, as it should appear inside parentheses
prettyPrintType :: Int -> Type a -> String Source #
Generate a pretty-printed string representing a Type
prettyPrintTypeWithUnicode :: Int -> Type a -> String Source #
Generate a pretty-printed string representing a Type
using unicode
symbols where applicable
prettyPrintSuggestedType :: Type a -> String Source #
Generate a pretty-printed string representing a suggested Type
prettyPrintLabel :: Label -> Text Source #
prettyPrintObjectKey :: PSString -> Text Source #
prettyPrintBinderAtom :: Binder -> Text Source #
prettyPrintBinder :: Binder -> Text Source #
Generate a pretty-printed string representing a Binder