Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile error when building from Hackage #3

Open
ashyslashy opened this issue Aug 31, 2017 · 3 comments · May be fixed by #4
Open

Compile error when building from Hackage #3

ashyslashy opened this issue Aug 31, 2017 · 3 comments · May be fixed by #4

Comments

@ashyslashy
Copy link

Hi,
I'm trying to install neural 0.3.0.1 from Hackage, and I'm getting build errors.
I know that github says build is green, however Hackage says build is failing, here: https://hackage.haskell.org/package/neural-0.3.0.1/reports/

Any chance this could be fixed?

This is my build log:

[13 of 22] Compiling Data.FixedSize.Vector ( src/Data/FixedSize/Vector.hs, dist/dist-sandbox-50b32bd7/build/Data/FixedSize/Vector.o )

src/Data/FixedSize/Vector.hs:104:31: error:
    • Couldn't match type ‘1 + n’ with ‘n + 1’
      Expected type: VS.Vector (n + 1) a
        Actual type: VS.Vector (1 + n) a
      NB: ‘+’ is a type function, and may not be injective
    • In the second argument of ‘($)’, namely ‘VS.cons x xs’
      In the expression: Vector $ VS.cons x xs
      In an equation for ‘cons’:
          cons x (Vector xs) = Vector $ VS.cons x xs
    • Relevant bindings include
        xs :: VS.Vector n a (bound at src/Data/FixedSize/Vector.hs:104:16)
        cons :: a -> Vector n a -> Vector (n + 1) a
          (bound at src/Data/FixedSize/Vector.hs:104:1)

src/Data/FixedSize/Vector.hs:112:28: error:
    • Couldn't match type ‘n + 1’ with ‘1 + n0’
      Expected type: VS.Vector (1 + n0) a
        Actual type: VS.Vector (n + 1) a
      NB: ‘+’ is a type function, and may not be injective
      The type variable ‘n0’ is ambiguous
    • In the first argument of ‘VS.head’, namely ‘v’
      In the expression: VS.head v
      In an equation for ‘vhead’: vhead (Vector v) = VS.head v
    • Relevant bindings include
        v :: VS.Vector (n + 1) a
          (bound at src/Data/FixedSize/Vector.hs:112:15)
        vhead :: Vector (n + 1) a -> a
          (bound at src/Data/FixedSize/Vector.hs:112:1)

src/Data/FixedSize/Vector.hs:120:37: error:
    • Couldn't match type ‘n + 1’ with ‘1 + n’
      Expected type: VS.Vector (1 + n) a
        Actual type: VS.Vector (n + 1) a
      NB: ‘+’ is a type function, and may not be injective
    • In the first argument of ‘VS.tail’, namely ‘v’
      In the second argument of ‘($)’, namely ‘VS.tail v’
      In the expression: Vector $ VS.tail v
    • Relevant bindings include
        v :: VS.Vector (n + 1) a
          (bound at src/Data/FixedSize/Vector.hs:120:15)
        vtail :: Vector (n + 1) a -> Vector n a
          (bound at src/Data/FixedSize/Vector.hs:120:1)
cabal: Leaving directory '/tmp/cabal-tmp-5629/neural-0.3.0.1'
cabal: Error: some packages failed to install:
neural-0.3.0.1 failed during the building phase. The exception was:
ExitFailure 1
@brunjlar
Copy link
Owner

I think there is a problem with dependencies, I guess I must provide better bounds in the cabal-file. I am using stack to build, and it works fine for me.
I'll try to get a version with dependency-bounds out as soon as I can.

@ggreif
Copy link
Contributor

ggreif commented Nov 16, 2017

I also see this. You could probably add a compiler plugin to resolve the situation, e.g. with https://github.com/clash-lang/ghc-typelits-natnormalise

@andreasabel
Copy link

@brunjlar wrote:

I'll try to get a version with dependency-bounds out as soon as I can.

GitHub(TM), your platform for broken promises. 😆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants