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

Not compatible with GHC 8.4.3 #6

Open
lucaciciriello opened this issue Jun 13, 2018 · 2 comments
Open

Not compatible with GHC 8.4.3 #6

lucaciciriello opened this issue Jun 13, 2018 · 2 comments

Comments

@lucaciciriello
Copy link

lucaciciriello commented Jun 13, 2018

Unable to "cabal install" with Haskell platform 8.4.3

Error:

src/Mezzo/Model/Prim.hs:140:29: error:
• Expected kind ‘OptVector t0 ((n0 + m0) - l0)’,
but ‘xs ++ ys’ has kind ‘OptVector t0 ((n0 - l0) + m0)’
• In the second argument of ‘(:-)’, namely ‘(xs ++ ys)’
In the type ‘x :- (xs ++ ys)’
In the type family declaration for ‘++’
|
140 | (x :- xs) ++ ys = x :- (xs ++ ys)
| ^^^^^^^^
cabal: Leaving directory '.'
cabal: Error: some packages failed to install:
mezzo-0.3.1.0-I25ksox6nQT6tXIyxHONIZ failed during the building phase. The
exception was:
ExitFailure 1

@rdtor
Copy link

rdtor commented May 31, 2019

same issue with ghc 8.6.5

Preprocessing library for mezzo-0.3.1.0..
Building library for mezzo-0.3.1.0..
[ 1 of 27] Compiling Mezzo.Model.Prim ( src/Mezzo/Model/Prim.hs, dist/build/Mezzo/Model/Prim.o )

src/Mezzo/Model/Prim.hs:140:29: error:
• Expected kind ‘OptVector t0 ((n0 + m0) - l0)’,
but ‘xs ++ ys’ has kind ‘OptVector t0 ((n0 - l0) + m0)’
• In the second argument of ‘(:-)’, namely ‘(xs ++ ys)’
In the type ‘x :- (xs ++ ys)’
In the type family declaration for ‘++’
|
140 | (x :- xs) ++ ys = x :- (xs ++ ys)
| ^^^^^^^^
cabal: Leaving directory '/tmp/cabal-tmp-1283/mezzo-0.3.1.0'
cabal: Error: some packages failed to install:
mezzo-0.3.1.0-GCtdNqJeN4cClv4uQMO7ak failed during the building phase. The
exception was:
ExitFailure

@DimaSamoz
Copy link
Owner

Thank you for flagging these up and sorry for the lack of replies! I am aware of the issue – unfortunately Mezzo relies on a lot of type-level hacks which which depend on the particular GHC version I used when writing it two years ago. Since type-level programming is still quite experimental, the typechecking and type inference algorithms have changed in newer GHC versions (and most likely will change in the future), which make Mezzo quite unstable.

The repo has a branch named ghc-update where I fixed all the build errors for GHC 8.6.3 – the issue now however is that the the changes required to the type class resolution to support the quantified type constraints feature of GHC 8.6 (or at least this seems to be the main "culprit") resulted in reification (turning type-level values into term-level values) in Mezzo becoming exponentially slower. This makes the library pretty much unusable for anything longer than 8-9 notes. Fixing this would probably require a full redesign of the library which I don't have time for – but GHC 8.0.1 both compiles and works fine so that should remain stable for the foreseeable future!

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

No branches or pull requests

3 participants