mezzo icon indicating copy to clipboard operation
mezzo copied to clipboard

Not compatible with GHC 8.4.3

Open lucaciciriello opened this issue 7 years ago • 2 comments

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

lucaciciriello avatar Jun 13 '18 08:06 lucaciciriello

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

rdtor avatar May 31 '19 14:05 rdtor

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!

DimaSamoz avatar May 31 '19 15:05 DimaSamoz