haskell - cabal -threaded options not working -


i trying out haskell , cabal. created project config file.

executable dictionary   main-is:             main.hs   -- other-modules:          -- other-extensions:       ghc-options: -threaded -rtsopts    build-depends:       base >=4.9 && <4.10, http-streams, io-streams, bytestring, hsopenssl   -- hs-source-dirs:         default-language:    haskell2010 

i trying send request.

main :: io () main = withopenssl $     putstrln "type in word"     word <- getline     let word1 = filter isalphanum $ (words word) !! 0     putstrln word1     ctx <- baselinecontextssl     c <- openconnectionssl ctx url 443      let q = buildrequest1 $                 http $ (c.pack $ "/api/v1/entries/en/" ++ word1)                 setaccept (c.pack "text/html")                 setheader (c.pack "app_id") app_id                 setheader (c.pack "app_key") apli_id      sendrequest c q emptybody      receiveresponse c (\p ->         s.putstrln $ getstatusmessage p         xm <- streams.read         case xm of             x    -> s.putstr x             nothing   -> putstrln "")     closeconnection c 

i try run cabal run results still:

type in word go go dictionary: user error (rts doesn't support multiple os threads (use ghc -threaded when linking)) 

i'm using macos x siera

oh, have run:

cabal clean 

and

cabal run 

again compile new flag.


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -