@@ -72,6 +72,10 @@ formatOpt = "format"
7272
7373formatKey = formatOpt
7474
75+ ffiOpt = " ffi"
76+
77+ ffiKey = ffiOpt
78+
7579newtype Psc
7680 = Psc { noPrelude :: NullOrUndefined Boolean
7781 , noTco :: NullOrUndefined Boolean
@@ -86,6 +90,7 @@ newtype Psc
8690 , output :: NullOrUndefined String
8791 , externs :: NullOrUndefined String
8892 , noPrefix :: NullOrUndefined Boolean
93+ , ffi :: NullOrUndefined [String ]
8994 }
9095
9196newtype PscMake
@@ -97,6 +102,7 @@ newtype PscMake
97102 , comments :: NullOrUndefined Boolean
98103 , noPrefix :: NullOrUndefined Boolean
99104 , output :: NullOrUndefined String
105+ , ffi :: NullOrUndefined [String ]
100106 }
101107
102108newtype PscDocs
@@ -110,7 +116,7 @@ instance isForeignEither :: (IsForeign a, IsForeign b) => IsForeign (Either a b)
110116
111117instance isForeignPsc :: IsForeign Psc where
112118 read obj =
113- (\a b c d e f g h i j k l m ->
119+ (\a b c d e f g h i j k l m o ->
114120 Psc { noPrelude: a
115121 , noTco: b
116122 , noMagicDo: c
@@ -124,6 +130,7 @@ instance isForeignPsc :: IsForeign Psc where
124130 , output: k
125131 , externs: l
126132 , noPrefix: m
133+ , ffi: o
127134 }) <$> readProp noPreludeKey obj
128135 <*> readProp noTcoKey obj
129136 <*> readProp noMagicDoKey obj
@@ -137,10 +144,11 @@ instance isForeignPsc :: IsForeign Psc where
137144 <*> readProp outputKey obj
138145 <*> readProp externsKey obj
139146 <*> readProp noPrefixKey obj
147+ <*> readProp ffiKey obj
140148
141149instance isForeignPscMake :: IsForeign PscMake where
142150 read obj =
143- (\a b c d e f g h ->
151+ (\a b c d e f g h i ->
144152 PscMake { output: a
145153 , noPrelude: b
146154 , noTco: c
@@ -149,6 +157,7 @@ instance isForeignPscMake :: IsForeign PscMake where
149157 , verboseErrors: f
150158 , comments: g
151159 , noPrefix: h
160+ , ffi: i
152161 }) <$> readProp outputKey obj
153162 <*> readProp noPreludeKey obj
154163 <*> readProp noTcoKey obj
@@ -157,6 +166,7 @@ instance isForeignPscMake :: IsForeign PscMake where
157166 <*> readProp verboseErrorsKey obj
158167 <*> readProp commentsKey obj
159168 <*> readProp noPrefixKey obj
169+ <*> readProp ffiKey obj
160170
161171instance isForeignPscDocs :: IsForeign PscDocs where
162172 read obj = (\a -> PscDocs { format: a }) <$> readProp formatKey obj
@@ -204,7 +214,8 @@ foldPscOptions (Psc a) = mkBoolean noPreludeOpt a.noPrelude <>
204214 mkStringArray codegenOpt a.codegen <>
205215 mkString outputOpt a.output <>
206216 mkString externsOpt a.externs <>
207- mkBoolean noPrefixOpt a.noPrefix
217+ mkBoolean noPrefixOpt a.noPrefix <>
218+ mkStringArray ffiOpt a.ffi
208219
209220pscOptions :: Foreign -> [String ]
210221pscOptions opts = either (const [] ) foldPscOptions parsed
@@ -226,7 +237,8 @@ pscMakeOptions opts = either (const []) fold parsed
226237 mkBoolean noOptsOpt a.noOpts <>
227238 mkBoolean verboseErrorsOpt a.verboseErrors <>
228239 mkBoolean commentsOpt a.comments <>
229- mkBoolean noPrefixOpt a.noPrefix
240+ mkBoolean noPrefixOpt a.noPrefix <>
241+ mkStringArray ffiOpt a.ffi
230242
231243pscDocsOptions :: Foreign -> [String ]
232244pscDocsOptions opts = either (const [] ) fold parsed
0 commit comments