hindley-milner-type-check-0.1.0.0: Type inference for Hindley-Milner based languages
Safe HaskellNone
LanguageHaskell2010

Type.Check.HM.Pretty

Description

Pretty printer for types and terms.

Synopsis

Documentation

class IsVar v => HasPrefix v where Source #

Class to querry fixity of infix operations.

Methods

getFixity :: v -> Maybe OpFix Source #

Instances

Instances details
HasPrefix Int Source # 
Instance details

Defined in Type.Check.HM.Pretty

HasPrefix String Source # 
Instance details

Defined in Type.Check.HM.Pretty

HasPrefix Text Source # 
Instance details

Defined in Type.Check.HM.Pretty

class PrintCons v where Source #

This class is useful to define the way to print special cases like constructors for tuples or lists.

Methods

printCons :: v -> [Doc ann] -> Doc ann Source #

Instances

Instances details
PrintCons Text Source # 
Instance details

Defined in Type.Check.HM.Pretty

Methods

printCons :: Text -> [Doc ann] -> Doc ann Source #

data OpFix Source #

Defines fixity type and order of infix operation

Constructors

OpFix 

Fields

data Fixity Source #

Infix operation can be left or right associative or associativity is not known.

Constructors

FixLeft 
FixRight 
FixNone 

Instances

Instances details
Eq Fixity Source # 
Instance details

Defined in Type.Check.HM.Pretty

Methods

(==) :: Fixity -> Fixity -> Bool #

(/=) :: Fixity -> Fixity -> Bool #

Orphan instances

(HasPrefix v, PrintCons v, Pretty v) => Pretty (Type loc v) Source # 
Instance details

Methods

pretty :: Type loc v -> Doc ann #

prettyList :: [Type loc v] -> Doc ann #

(Pretty v, PrintCons v, HasPrefix v) => Pretty (Signature loc v) Source # 
Instance details

Methods

pretty :: Signature loc v -> Doc ann #

prettyList :: [Signature loc v] -> Doc ann #

(HasPrefix v, PrintCons v, Pretty v, Pretty prim) => Pretty (Term prim loc v) Source # 
Instance details

Methods

pretty :: Term prim loc v -> Doc ann #

prettyList :: [Term prim loc v] -> Doc ann #