Closed jelmd closed 2 years ago
Strange... Could you show the source please? At https://hackage.haskell.org/package/uni-graphs-2.2.1.1/docs/src/Graphs.GraphDisp.html there is no class Typeable1
, only Typeable
.
I use the source package as is from its repo.
Ehmm, the error above is with 2.2.1.0, the one with 2.2.1.1 is:
Graphs/PureGraphPrune.hs:171:13: error:
* Data.Map.foldWithKey is gone. Use foldrWithKey.
* In the expression:
Map.foldWithKey
(\ a nodeData fm0
-> let parents1 = parentNodes nodeData
in
foldl
(\ fm0 parent
-> Map.insert parent (Map.findWithDefault 0 parent fm0 + 1) fm0)
fm0
parents1)
(Map.empty :: Map.Map nodeInfo Int)
fm
In an equation for `fm1':
fm1
= Map.foldWithKey
(\ a nodeData fm0
-> let parents1 = ...
in
foldl
(\ fm0 parent
-> Map.insert parent (Map.findWithDefault 0 parent fm0 + 1) fm0)
fm0
parents1)
(Map.empty :: Map.Map nodeInfo Int)
fm
In the expression:
let
fm1
= Map.foldWithKey
(\ a nodeData fm0 -> ...) (Map.empty :: Map.Map nodeInfo Int) fm
in Map.findWithDefault 0 nf fm1
|
171 | fm1 = Map.foldWithKey
| ^^^^^^^^^^^^^^^...
@jelmd how can one reproduce the error?
apt-get install libghc-uni-{util,events,reactor,posixutil,htk}-dev
wget https://hackage.haskell.org/package/uni-graphs-2.2.1.1/uni-graphs-2.2.1.1.tar.gz
tar xzf uni-graphs-2.2.1.1.tar.gz
cd uni-graphs-2.2.1.1
runhaskell Setup.hs configure --ghc --prefix=/XXXXXX --disable-executable-stripping --disable-benchmarks --libdir=lib/haskell-packages/ghc/lib/x86_64-linux-ghc-8.6.5 --libsubdir=uni-graphs-2.2.1.1 --datadir=share --datasubdir=uni-graphs --haddockdir=lib/ghc-doc/haddock/uni-graphs-2.2.1.1 --docdir=share/doc/uni-graphs-doc --disable-profiling --disable-shared
runhaskell Setup.hs build
Here is a patch to a (fictitious) version uni-graphs-2.2.1.2 that solves the problem. Maybe we should host the sources here at spechub?
iff -ru uni-graphs-2.2.1.1/Graphs/GraphDisp.hs uni-graphs-2.2.1.2/Graphs/GraphDisp.hs
--- uni-graphs-2.2.1.1/Graphs/GraphDisp.hs 2018-08-06 14:38:27.000000000 +0200
+++ uni-graphs-2.2.1.2/Graphs/GraphDisp.hs 2022-03-22 11:26:59.810385960 +0100
@@ -4,6 +4,7 @@
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE KindSignatures #-}
+{-# LANGUAGE MonoLocalBinds #-}
-- |
-- Description: Basic Interface for Graph Display
Nur in uni-graphs-2.2.1.2/Graphs: GraphDisp.hs~.
diff -ru uni-graphs-2.2.1.1/Graphs/PureGraphPrune.hs uni-graphs-2.2.1.2/Graphs/PureGraphPrune.hs
--- uni-graphs-2.2.1.1/Graphs/PureGraphPrune.hs 2018-08-06 14:38:27.000000000 +0200
+++ uni-graphs-2.2.1.2/Graphs/PureGraphPrune.hs 2022-03-22 11:27:49.365975509 +0100
@@ -168,7 +168,7 @@
nChildren :: Ord nodeInfo => PureGraph nodeInfo arcInfo -> nodeInfo -> Int
nChildren (PureGraph fm :: PureGraph nodeInfo arcInfo) nf =
let
- fm1 = Map.foldWithKey
+ fm1 = Map.foldrWithKey
(\ a nodeData fm0 ->
let
parents1 = parentNodes nodeData
Yepp, works. Package is published (launchpad + pkg.cs).
Wrt. the patch: it is included in the source package on launchpad and my local repo used to build it. So IMHO there is not really a need to add it to this repo as well.
BTW: When I try to build uni-udrawgraph I get the following error:
UDrawGraph/Graph.hs:1821:9: error:
Not in scope: `Data.Dynamic.cast'
Module `Data.Dynamic' does not export `cast'.
|
1821 | case Data.Dynamic.cast valueA of
| ^^^^^^^^^^^^^^^^^
Any ideas how to fix?
How do I solve this?
Configuring uni-uDrawGraph-2.2.1.4...
Setup.hs: Encountered missing dependencies:
uni-graphs -any
apt-get install libghc-uni-graphs-dev
That also was my idea. But:
till@till-ThinkPad-X1-Yoga-4th:~$ cat /etc/apt/sources.list.d/csmd.list
deb [trusted=yes] http://pkg.cs.ovgu.de/LNF/linux/ubuntu 20.04/
till@till-ThinkPad-X1-Yoga-4th:~$ cat /etc/apt/sources.list.d/hets-ubuntu-hets-focal.list
deb http://ppa.launchpad.net/hets/hets/ubuntu focal main
# deb-src http://ppa.launchpad.net/hets/hets/ubuntu focal main
till@till-ThinkPad-X1-Yoga-4th:~$ sudo apt update
[...]
till@till-ThinkPad-X1-Yoga-4th:~$ sudo apt-get install libghc-unigraphs-dev
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesen.... Fertig
E: Paket libghc-unigraphs-dev kann nicht gefunden werden.
The missing dash after libghc-uni
is probably the root cause. Anyway, to make sure I re-build it as well - looks good.
Thanks, right. Now I can compile it, and get only some warnings. Here is my ghc version:
runhaskell --version
runghc 8.6.5
Aha, it seems that my source is different (uni-uDrawGraph-2.2.1.4
):
coDyn :: (Typeable a,Typeable b) => a -> b
coDyn valueA =
case cast valueA of
Just valueB -> valueB
Yepp. The version works - - uni-* packages are published on launchpad and pkg.cs.
Now we can go back to #2047 (used the fix_tests branch).
uni-graph is required by hets but fails to build on focal:
Any hints?