@@ -60,15 +60,15 @@ data DeclarationRef
6060 -- |
6161 -- A type constructor with data constructors
6262 --
63- = TypeRef ProperName (Maybe [ProperName ])
63+ = TypeRef ( ProperName 'TypeName) (Maybe [ProperName 'ConstructorName ])
6464 -- |
6565 -- A value
6666 --
6767 | ValueRef Ident
6868 -- |
6969 -- A type class
7070 --
71- | TypeClassRef ProperName
71+ | TypeClassRef ( ProperName 'ClassName)
7272 -- |
7373 -- A type class instance, created during typeclass desugaring (name, class name, instance types)
7474 --
@@ -80,7 +80,7 @@ data DeclarationRef
8080 -- |
8181 -- An unspecified ProperName ref. This will be replaced with a TypeClassRef
8282 -- or TypeRef during name desugaring.
83- | ProperRef ProperName
83+ | ProperRef String
8484 -- |
8585 -- A declaration reference with source position information
8686 --
@@ -108,7 +108,7 @@ isModuleRef _ = False
108108-- are the duplicate refs with data constructors elided, and then a separate
109109-- list of duplicate data constructors.
110110--
111- findDuplicateRefs :: [DeclarationRef ] -> ([DeclarationRef ], [ProperName ])
111+ findDuplicateRefs :: [DeclarationRef ] -> ([DeclarationRef ], [ProperName 'ConstructorName ])
112112findDuplicateRefs refs =
113113 let positionless = stripPosInfo `map` refs
114114 simplified = simplifyTypeRefs `map` positionless
@@ -154,15 +154,15 @@ data Declaration
154154 -- |
155155 -- A data type declaration (data or newtype, name, arguments, data constructors)
156156 --
157- = DataDeclaration DataDeclType ProperName [(String , Maybe Kind )] [(ProperName , [Type ])]
157+ = DataDeclaration DataDeclType ( ProperName 'TypeName) [(String , Maybe Kind )] [(ProperName 'ConstructorName , [Type ])]
158158 -- |
159159 -- A minimal mutually recursive set of data type declarations
160160 --
161161 | DataBindingGroupDeclaration [Declaration ]
162162 -- |
163163 -- A type synonym declaration (name, arguments, type)
164164 --
165- | TypeSynonymDeclaration ProperName [(String , Maybe Kind )] Type
165+ | TypeSynonymDeclaration ( ProperName 'TypeName) [(String , Maybe Kind )] Type
166166 -- |
167167 -- A type declaration for a value (name, ty)
168168 --
@@ -182,7 +182,7 @@ data Declaration
182182 -- |
183183 -- A data type foreign import (name, kind)
184184 --
185- | ExternDataDeclaration ProperName Kind
185+ | ExternDataDeclaration ( ProperName 'TypeName) Kind
186186 -- |
187187 -- A fixity declaration (fixity data, operator name, value the operator is an alias for)
188188 --
@@ -195,12 +195,12 @@ data Declaration
195195 -- |
196196 -- A type class declaration (name, argument, implies, member declarations)
197197 --
198- | TypeClassDeclaration ProperName [(String , Maybe Kind )] [Constraint ] [Declaration ]
198+ | TypeClassDeclaration ( ProperName 'ClassName) [(String , Maybe Kind )] [Constraint ] [Declaration ]
199199 -- |
200200 -- A type instance declaration (name, dependencies, class name, instance types, member
201201 -- declarations)
202202 --
203- | TypeInstanceDeclaration Ident [Constraint ] (Qualified ProperName ) [Type ] TypeInstanceBody
203+ | TypeInstanceDeclaration Ident [Constraint ] (Qualified ( ProperName 'ClassName) ) [Type ] TypeInstanceBody
204204 -- |
205205 -- A declaration with source position information
206206 --
@@ -390,7 +390,7 @@ data Expr
390390 -- |
391391 -- A data constructor
392392 --
393- | Constructor (Qualified ProperName )
393+ | Constructor (Qualified ( ProperName 'ConstructorName) )
394394 -- |
395395 -- A case expression. During the case expansion phase of desugaring, top-level binders will get
396396 -- desugared into case expressions, hence the need for guards and multiple binders per branch here.
@@ -412,23 +412,23 @@ data Expr
412412 -- An application of a typeclass dictionary constructor. The value should be
413413 -- an ObjectLiteral.
414414 --
415- | TypeClassDictionaryConstructorApp (Qualified ProperName ) Expr
415+ | TypeClassDictionaryConstructorApp (Qualified ( ProperName 'ClassName) ) Expr
416416 -- |
417417 -- A placeholder for a type class dictionary to be inserted later. At the end of type checking, these
418418 -- placeholders will be replaced with actual expressions representing type classes dictionaries which
419419 -- can be evaluated at runtime. The constructor arguments represent (in order): whether or not to look
420420 -- at superclass implementations when searching for a dictionary, the type class name and
421421 -- instance type, and the type class dictionaries in scope.
422422 --
423- | TypeClassDictionary Constraint (M. Map (Maybe ModuleName ) (M. Map (Qualified ProperName ) (M. Map (Qualified Ident ) TypeClassDictionaryInScope )))
423+ | TypeClassDictionary Constraint (M. Map (Maybe ModuleName ) (M. Map (Qualified ( ProperName 'ClassName) ) (M. Map (Qualified Ident ) TypeClassDictionaryInScope )))
424424 -- |
425425 -- A typeclass dictionary accessor, the implementation is left unspecified until CoreFn desugaring.
426426 --
427- | TypeClassDictionaryAccessor (Qualified ProperName ) Ident
427+ | TypeClassDictionaryAccessor (Qualified ( ProperName 'ClassName) ) Ident
428428 -- |
429429 -- A placeholder for a superclass dictionary to be turned into a TypeClassDictionary during typechecking
430430 --
431- | SuperClassDictionary (Qualified ProperName ) [Type ]
431+ | SuperClassDictionary (Qualified ( ProperName 'ClassName) ) [Type ]
432432 -- |
433433 -- A value with source position information
434434 --
0 commit comments