@@ -29,79 +29,47 @@ newtype SkolemScope = SkolemScope { runSkolemScope :: Int }
29-- The type of types
29-- The type of types
33− -- A unification variable of type Type
32+ -- | A unification variable of type Type
35 = TUnknown Int
33 = TUnknown Int
37− -- A named type variable
34+ -- | A named type variable
39 | TypeVar String
35 | TypeVar String
40− -- |
36+ -- | A type-level string
37+ | TypeLevelString String
41− -- A type wildcard, as would appear in a partial type synonym
38+ -- | A type wildcard, as would appear in a partial type synonym
43 | TypeWildcard SourceSpan
39 | TypeWildcard SourceSpan
45− -- A type constructor
40+ -- | A type constructor
47 | TypeConstructor (Qualified (ProperName 'TypeName))
41 | TypeConstructor (Qualified (ProperName 'TypeName))
49− -- A type operator. This will be desugared into a type constructor during the
42+ -- | A type operator. This will be desugared into a type constructor during the
50 -- "operators" phase of desugaring.
43 -- "operators" phase of desugaring.
52 | TypeOp (Qualified (OpName 'TypeOpName))
44 | TypeOp (Qualified (OpName 'TypeOpName))
54− -- A type application
45+ -- | A type application
56 | TypeApp Type Type
46 | TypeApp Type Type
58− -- Forall quantifier
47+ -- | Forall quantifier
60 | ForAll String Type (Maybe SkolemScope)
48 | ForAll String Type (Maybe SkolemScope)
62− -- A type with a set of type class constraints
49+ -- | A type with a set of type class constraints
64 | ConstrainedType [Constraint] Type
50 | ConstrainedType [Constraint] Type
66− -- A skolem constant
51+ -- | A skolem constant
68 | Skolem String Int SkolemScope (Maybe SourceSpan)
52 | Skolem String Int SkolemScope (Maybe SourceSpan)
70− -- An empty row
53+ -- | An empty row
74− -- A non-empty row
55+ -- | A non-empty row
76 | RCons String Type Type
56 | RCons String Type Type
78− -- A type with a kind annotation
57+ -- | A type with a kind annotation
80 | KindedType Type Kind
58 | KindedType Type Kind
82− -- A placeholder used in pretty printing
59+ -- | A placeholder used in pretty printing
84 | PrettyPrintFunction Type Type
60 | PrettyPrintFunction Type Type
86− -- A placeholder used in pretty printing
61+ -- | A placeholder used in pretty printing
88 | PrettyPrintObject Type
62 | PrettyPrintObject Type
90− -- A placeholder used in pretty printing
63+ -- | A placeholder used in pretty printing
92 | PrettyPrintForAll [String] Type
64 | PrettyPrintForAll [String] Type
94− -- Binary operator application. During the rebracketing phase of desugaring,
65+ -- | Binary operator application. During the rebracketing phase of desugaring,
95 -- this data constructor will be removed.
66 -- this data constructor will be removed.
97 | BinaryNoParensType Type Type Type
67 | BinaryNoParensType Type Type Type
99− -- Explicit parentheses. During the rebracketing phase of desugaring, this
68+ -- | Explicit parentheses. During the rebracketing phase of desugaring, this
100 -- data constructor will be removed.
69 -- data constructor will be removed.
102 -- Note: although it seems this constructor is not used, it _is_ useful,
71 -- Note: although it seems this constructor is not used, it _is_ useful,
103 -- since it prevents certain traversals from matching.
72 -- since it prevents certain traversals from matching.
105 | ParensInType Type
73 | ParensInType Type
106 deriving (Show, Read, Eq, Ord)
74 deriving (Show, Read, Eq, Ord)