haskellhaskell-stackreflex

How do I build stack configuration that allows me to build project with reflex-frp as dependency?


As in question. I can't get working stack configuration. I want to build project that uses reflex with ghc, preferably 8.0.2 or higher. How do I do it, cause specifying it as an extra deps doesn't seem to work either..


Solution

  • Looks like no published version of reflex supports ghc 8.0.2. There are a lot of changes on the develop branch since the 0.4 release: https://github.com/reflex-frp/reflex/compare/cc62c11a6cde31412582758c236919d4bb766ada...develop

    So first I tried this:

    resolver: lts-9.5
    
    packages:
    - .
    - location:
        git: https://github.com/reflex-frp/reflex
        commit: 916c876
      extra-dep: true
    

    But that led to:

    Error: While constructing the build plan, the following exceptions were encountered:
    
       In the dependencies for reflex-0.5.0:
           prim-uniq must match >=0.1.0.1 && <0.2, but the stack configuration has no specified version
                     (latest applicable is 0.1.0.1)
           ref-tf must match ==0.4.*, but the stack configuration has no specified version (latest applicable is 0.4.0.1)
       needed due to hmm-0.1.0.0 -> reflex-0.5.0
    
       Recommended action: try adding the following to your extra-deps in /home/mgsloan/fpco/test-stack/stackoverflow46391975/hmm/stack.yaml:
       - prim-uniq-0.1.0.1
       - ref-tf-0.4.0.1
    

    Following the recommended action yields a configuration that works:

    resolver: lts-9.5
    
    packages:
    - .
    - location:
        git: https://github.com/reflex-frp/reflex
        commit: 916c876
      extra-dep: true
    
    extra-deps:
    - prim-uniq-0.1.0.1
    - ref-tf-0.4.0.1