-
Notifications
You must be signed in to change notification settings - Fork 14
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
Update to more recent GHC #130
Comments
The currently-published version of lvish is lvish-1.1.4, which currently requires The github version of lvish, however, is much higher, lvish-2.0.2.1 requiring The next step would be to double-check that the code indeed builds on recent versions of ghc (as of this writing, the most recent version is ghc-9.4). |
The project has multiple packages which depend on each other, and there is a
As explained at that URL, the problem is that lvish is currently using stack's legacy syntax for specifying git dependencies. It should be straightforward to update |
Having now fixed the legacy syntax in #131, the next step is to bump the lts from lts-6.13 (ghc-7.10.3) to something more recent. The most recent at the time of writing is lts-19.29 (ghc-9.0.2). Switching to that resolver and attempting to run
|
|
lts-6.13 pins lts-6.13 did not include |
While we're at it, let's also remove |
Having done all that,
|
edit: my mistake, the git dependency was |
edit: because I bumped |
Strange, the resolver I am using pins ghc-prim-0.7.0, and ghc-prim-0.7.0 does export |
I think {-# LANGUAGE MagicHash #-}
module Main where
import GHC.Prim (reallyUnsafePtrEquality#, unsafeCoerce#)
main
:: IO ()
main = putStrLn "typechecks." Since |
The source for |
haskell/primitive#258 explains that |
I made a mistake a few comments above (which I have now |
The required code change has already been merged in 2020. The changelog implies that this fix will be released in the version which follows chaselev-deq-0.5.0.4... but we're using chaselev-deq-0.5.0.5! What's going on? |
I filed an issue requesting a new hackage release for a chaselev-deq-0.5.0.6 which does include the 2020 changes. Until then, we can pin a git commit instead of a hackage version. |
Having done all this, I can finally build all the dependencies with lts-19.29 (ghc-9.0.2)... but lvish itself fails to build.
Luckily, we are now well-acquainted with this error and its fix! |
Alas, it is not the only build error:
|
Luckily, the comment above the problematic line explains the intent well: lvars/src/lvish/Control/LVish/DeepFrz/Internal.hs Lines 35 to 39 in 78e73c9
Apparently in ghc-7.10, defining an instance class DeepFrz MyType1 where
type FrzType a = MyType1 Would succeed because class DeepFrz MyType2 where
type FrzType a = String Would fail because One simple fix is to use this default type signature instead: default frz :: DeepFrz a ~ a => a -> DeepFrz a This time, the default type signature matches the method type, so this is accepted. Furthermore, at every instance where the default implementation is used, ghc checks that the extra constraints are satisfied, so default instances are only allowed if |
After fixing a lot more
I am guessing that this comes from a library, whose version changed when I bumped the lts, and this new version has renamed I have already spent quite some time on this, so I now plan to take a break for at least a few days. If somebody wants to take over, I have pushed my changes so far to https://github.com/gelisam/lvars/tree/bump-lts. Note that this branch does not include the changes to the git submodules, so after fetching the git submodules using diff --git a/concurrent-skiplist.cabal b/concurrent-skiplist.cabal
index 57df5b0..9cefd2f 100644
--- a/deps/concurrent-skiplist/concurrent-skiplist.cabal
+++ b/deps/concurrent-skiplist/concurrent-skiplist.cabal
@@ -32,7 +32,7 @@ library
other-extensions: NamedFieldPuns, BangPatterns, RankNTypes, ExistentialQuantification, GADTs,
ScopedTypeVariables, ParallelListComp, TypeSynonymInstances, FlexibleInstances
build-depends: base >=4.6,
- random >=1.0 && <1.2,
+ random >=1.0 && <1.3,
ghc-prim >= 0.3,
transformers >=0.3,
atomic-primops >=0.7 && < 0.9, |
Hello there, thanks for taking the lead on all this. I aim to catch up and cut a release next weekend (10/28-10/29). |
Heh. Some may be performance hacks. But some of it is intrinsic to the idea that you define a high-level / monotonic deterministic programming model, but it's implemented with imperative state changes, and we need to tell GHC to trust us that it's actually pure. |
Is it possible to have an update of the version bounds to allow this to build on GHC 8.8?
The text was updated successfully, but these errors were encountered: