bravit / hid-examples

Examples to accompany the book "Haskell in Depth"
BSD 3-Clause "New" or "Revised" License
257 stars 93 forks source link

Does not build #6

Closed ksvanhorn closed 1 year ago

ksvanhorn commented 4 years ago

When I do "stack build", I get the following errors:

directory must match >=1.2 && <1.4, but this GHC boot package has been pruned (issue
          #4510); you need to add the package explicitly to extra-deps  (latest
          matching version is 1.3.4.0)
process must match >=1.1.0.2 && <1.7, but this GHC boot package has been pruned
        (issue #4510); you need to add the package explicitly to extra-deps  (latest
        matching version is 1.6.7.0)
bravit commented 4 years ago

Hi Kevin, thank you for reporting this issue. Could you please try to upgrade your stack distribution via stack upgrade or in other way depending on how you've installed it? Does the problem still persist?

ksvanhorn commented 4 years ago

I did stack upgrade shortly before doing stack build.

mac> stack --version
Version 2.3.3, Git revision cb44d51bed48b723a5deb08c3348c0b3ccfc437e x86_64 hpack-0.33.0
bravit commented 4 years ago

Unfortunately, I can't reproduce this behavior. Could you please add the following lines in the end of the stack.yaml file:

  - directory-1.3.3.0
  - process-1.6.5.0

Does this change fix build for you?

alexander-myltsev commented 3 years ago

Build error at c571b90f862511a3df9ef172cbc5ce98a9188ce8:

/hid-examples/ch11/type-families/Main.hs:8:11: error:
    • Variable not in scope: neighbours :: EdgesList -> t0 -> a0
    • Perhaps you meant ‘neighbors’ (imported from Graphs)
  |
8 |   print $ neighbours g1 0
  |           ^^^^^^^^^^
$ stack --version
Version 2.5.1, Git revision d6ab861544918185236cf826cb2028abb266d6d5 x86_64 hpack-0.33.0
bravit commented 3 years ago

Thanks, @alexander-myltsev. Fixed.

michaelfliegner commented 3 years ago

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