git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Merge pull request #1574 from tfausak/patch-1
f640f0ePhil Freeman
CONTRIBUTORS.md+1
@@ -57,6 +57,7 @@ This file lists the contributors to the PureScript compiler project, and the ter
57- [@senju](https://github.com/senju) - My existing contributions and all future contributions until further notice are Copyright senju, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
57- [@senju](https://github.com/senju) - My existing contributions and all future contributions until further notice are Copyright senju, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
58<http://opensource.org/licenses/MIT>.
58<http://opensource.org/licenses/MIT>.
59- [@soupi](https://github.com/soupi) (Gil Mizrahi) My existing contributions and all future contributions until further notice are Copyright Gil Mizrahi, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
59- [@soupi](https://github.com/soupi) (Gil Mizrahi) My existing contributions and all future contributions until further notice are Copyright Gil Mizrahi, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
60+- [@tfausak](https://github.com/tfausak) (Taylor Fausak) My existing contributions and all future contributions until further notice are Copyright Taylor Fausak, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
60
61
61### Companies
62### Companies
62
63
src/Language/PureScript/Sugar/TypeClasses/Deriving.hs+4−1
@@ -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" ]
75
75
76+typesProxy :: ModuleName
77+typesProxy = ModuleName [ ProperName "Types", ProperName "Proxy" ]
78+
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
133
136
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")))
136
139
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)))