@@ -73,6 +73,9 @@ dataGeneric = ModuleName [ ProperName "Data", ProperName "Generic" ]
73dataMaybe :: ModuleName
73dataMaybe :: ModuleName
74dataMaybe = ModuleName [ ProperName "Data", ProperName "Maybe" ]
74dataMaybe = ModuleName [ ProperName "Data", ProperName "Maybe" ]
76+typesProxy :: ModuleName
77+typesProxy = ModuleName [ ProperName "Types", ProperName "Proxy" ]
76deriveGeneric :: (Functor m, MonadError MultipleErrors m, MonadSupply m) => ModuleName -> [Declaration] -> ProperName -> [Type] -> m [Declaration]
79deriveGeneric :: (Functor m, MonadError MultipleErrors m, MonadSupply m) => ModuleName -> [Declaration] -> ProperName -> [Type] -> m [Declaration]
77deriveGeneric mn ds tyConNm args = do
80deriveGeneric mn ds tyConNm args = do
78 tyCon <- findTypeDecl tyConNm ds
81 tyCon <- findTypeDecl tyConNm ds
@@ -132,7 +135,7 @@ mkSignatureFunction mn (DataDeclaration _ name tyArgs args) classArgs = lamNull
132 mkSigRec = App (Constructor (Qualified (Just dataGeneric) (ProperName "SigRecord"))) . ArrayLiteral
135 mkSigRec = App (Constructor (Qualified (Just dataGeneric) (ProperName "SigRecord"))) . ArrayLiteral
134 proxy :: Type -> Type
137 proxy :: Type -> Type
135− proxy = TypeApp (TypeConstructor (Qualified (Just dataGeneric) (ProperName "Proxy")))
138+ proxy = TypeApp (TypeConstructor (Qualified (Just typesProxy) (ProperName "Proxy")))
137 mkProdClause :: (ProperName, [Type]) -> Expr
140 mkProdClause :: (ProperName, [Type]) -> Expr
138 mkProdClause (ctorName, tys) = ObjectLiteral [ ("sigConstructor", StringLiteral (showQualified runProperName (Qualified (Just mn) ctorName)))
141 mkProdClause (ctorName, tys) = ObjectLiteral [ ("sigConstructor", StringLiteral (showQualified runProperName (Qualified (Just mn) ctorName)))