faylang / fay

A proper subset of Haskell that compiles to JavaScript
https://github.com/faylang/fay/wiki
BSD 3-Clause "New" or "Revised" License
1.29k stars 86 forks source link

Installing with Stack #468

Open decapo01 opened 3 years ago

decapo01 commented 3 years ago

Is there a way I can install and use fay with stack? Having a shared library then server that serves an api and client that call the server.

swamp-agr commented 3 years ago

Hi @decapo01,

Could you please try this repo?

  1. Clone repo.
  2. Execute command:
    stack install --flag="front:examples"

I am kindly ask you to tell me about the issues if they appeared.

decapo01 commented 3 years ago

Thanks! I'll try and give it a shot this weekend.

chtenb commented 3 years ago

How would I install fay using stack when I'm only interested in client-side use?

decapo01 commented 2 years ago

Better late than never....I tried to install this with stack install --flag="font:examples" and get this error

Progress 141/152: language-ecmascript, language-javascript, servant-auth-cookie, yesod-websock                                                                                              servant-auth-cookie              > /tmp/stack-d0c1376b4458700c/servant-auth-cookie-0.6.0.3/src/Servant/Server/Experimental/Auth/Cookie.hs:139:28: error:
Progress 141/152: language-ecmascript, language-javascript, servant-auth-cookie, yesod-websock                                                                                              servant-auth-cookie              >     Module ‘Servant’ does not export ‘ServantErr(..)’
Progress 141/152: language-ecmascript, language-javascript, servant-auth-cookie, yesod-websock                                                                                              servant-auth-cookie              >     |
Progress 141/152: language-ecmascript, language-javascript, servant-auth-cookie, yesod-websock                                                                                              servant-auth-cookie              > 139 | import Servant (addHeader, ServantErr (..))
Progress 141/152: language-ecmascript, language-javascript, servant-auth-cookie, yesod-websock                                                                                              servant-auth-cookie              >     |                            ^^^^^^^^^^^^^^^

Also I've noticed in the the example you provided that the Client does not import anything from the Shared. Is that possible?