Closed christianpbrink closed 10 years ago
My mistake. My description above was incorrect -- I was in fact importing one thing other than Prelude, a module that simply exported an ADT. That ADT had ToJSON and FromJSON instances.
Womp. Sorry for the noise.
I'm writing a web app with a Haskell backend, and I've got a Haskell module to perform computations which I now realize should be performed on the client side. I don't relish the thought of porting its exports to JS by hand, and the idea of being able to trans-compile the module to Javascript is pretty sweet. Its only dependency is Prelude, so I figure it should be Fay-compatible.
I expected to be able to follow this example, which works fine for me. But when I run
fay MyModule.hs --strict MyModule
, I get this report:First, my code doesn't try to import
Data.Aeson
, so I don't know why it's even being mentioned. Can anyone help me understand that?Second, I have no idea how to direct fay to
Data.Aeson
. I don't really understand how fay thinks about packages in the firs place -- to what extent (if any) it can just piggyback on my cabal environment (which is global, not sandboxed), whether I should be install special fay packages or reinstalling my normal cabal packages in a special way suitable for fay's use, and whether should I be trying to build this as a fay package instead of working with a single module file.I appreciate any help. Thank you.