Search code examples
haskellhaskell-stackservant

Is there a way to point on servant-server 0.15 that is not yet on the last haskell LTS?


I would like to use the version 0.15 instead of the the one available on the last LTS (12.22), usually I'm adding this in stack.yaml :

extra-deps :
  - git: [email protected]:haskell-servant/servant.git
    commit: e3e5d2b23057c2c3409e5e210b613527baf3b77d 

But they use multiple projects in the same repo so it does not work :-( :

The current entry points to

/Users/nhenin/dev/gsdFlow/.stack-work/downloaded/6krbU6UwORFF/ but no .cabal or package.yaml file could be found there.

Do you know how I could use it ?


Solution

  • All you need to do is specify sub directories in the repository containing the project:

    extra-deps:
      - git: [email protected]:haskell-servant/servant.git
        commit: e3e5d2b23057c2c3409e5e210b613527baf3 
        subdirs:
        - servant
    

    if you needed servant-pipes from the repository as well, for instance, you'd also include it in the list:

    ...
        subdirs:
        - servant
        - servant-pipes