Closed soenkehahn closed 8 years ago
Adding the Dict
import to defElmImports
will generate warnings when people who aren't using Dict
compile their Elm projects with --warn
.
For now, the simplest way is for users to customise defElmImports
according to their needs:
myElmImports :: String
myElmImports =
unlines (defElmImports ++ ["import Dict exposing (Dict)"])
spec :: Spec
spec = Spec ["Generated", "MyApi"]
(myElmImports
: generateElmForAPI (Proxy :: Proxy BooksApi))
In the future, elm-export
could be modified to provide a list of the imports required to use the code it generates.
I see. Makes sense. Thanks for explaining.
I had to add
src
to the source directories of the test-suite to be able to importServant.Elm.Foreign
.