Closed michaelfliegner closed 1 year ago
I suspect, like me, you are probably trying to use a more up to date resolver in stack.yaml.
I had a similar issue, and basically rebuilt the list of extra dependencies in stack.yaml (piecemeal through the build plan suggestions) I used the latest stack lts resolver (lts-18.17) as of today. Here is my stack.yaml:
resolver: lts-18.17
packages:
- .
allow-newer: true
flags:
# hid-examples:
# with-pg: True
extra-deps:
- Chart-diagrams-1.9.3
- blaze-colonnade-1.2.2.1
- colonnade-1.2.0.2
- streaming-utils-0.2.1.0
- SVGFonts-1.7.0.1
- diagrams-core-1.5.0
- diagrams-lib-1.4.4
- diagrams-postscript-1.5
- diagrams-svg-1.4.3
- json-stream-0.4.2.4
- svg-builder-0.1.1
- active-0.2.0.15
- dual-tree-0.2.3.0
- monoid-extras-0.6.1
- statestack-0.3
It is building for me using stack 2.7.3. Hope this helps.
Note that some of the hid-examples modules will still have compilation errors, as they probably need updating to work with newer library versions and ghc 8.10.7, but at least you will get stack to build, and even be able to go into ghci.
My error message shows an error in a dependency of the stockquotes example: Diagrams/Trail.hs
I opened #12 to update to lts-18
diagrams-lib > [36 of 73] Compiling Diagrams.Trail diagrams-lib > diagrams-lib > /tmp/stack-01e77da6031f7a18/diagrams-lib-1.4.4/src/Diagrams/Trail.hs:314:32: error: diagrams-lib > • Couldn't match type ‘Option a0’ with ‘Maybe m’ diagrams-lib > Expected type: t -> Maybe m diagrams-lib > Actual type: t -> Option a0 diagrams-lib > • In the second argument of ‘(.)’, namely ‘get . FT.measure’ diagrams-lib > In the expression: maybe d f . get . FT.measure diagrams-lib > In an equation for ‘trailMeasure’: diagrams-lib > trailMeasure d f = maybe d f . get . FT.measure diagrams-lib > • Relevant bindings include diagrams-lib > f :: m -> a (bound at src/Diagrams/Trail.hs:314:16) diagrams-lib > trailMeasure :: a -> (m -> a) -> t -> a diagrams-lib > (bound at src/Diagrams/Trail.hs:314:1) diagrams-lib > | diagrams-lib > 314 | trailMeasure d f = maybe d f . get . FT.measure