Closed asr closed 8 years ago
Seems that not much can be done about this until fclabels has been fixed? Apart from that, what change would you suggest (In the cabal file) to fix this?
I didn't see any necessary change.
In an unrelated comment, in Agda.cabal we use hashable >= 1.2.1.0 && < 1.3
because
-- hashable 1.2.0.10 makes library-test 10x slower. The issue was
-- fixed in hashable 1.2.1.0.
-- https://github.com/tibbe/hashable/issues/57.
The issue in fclabels was fixed.
The current problem is:
$ cabal install
...
rejecting: hashable-1.2.4.0 (conflict: uhc-util => hashable>=1.1 && <1.2.4)
...
Dependency tree exhaustively searched.
hashable 1.2.4 is required with GHC 8.
I couldn't install uhc-util 0.1.6.5 with GHC 8.0.1 RC 2 because logict-state doesn't support this version of GHC. I created the PR atzedijkstra/logict-state#1.
Thx for the pull request, I applied it to logict-state. Is an update (cabal file, version nr only?) required?
Thx for the pull request, I applied it to logict-state.
Thanks for merging the PR.
Is an update (cabal file, version nr only?) required?
No.
Using GHC 8.0.1-rc3 I installed pqueue
using the --allow-newer
option:
$ cabal install pqueue --allow-newer=base
Then using master I got the following error:
$ cabal install
Preprocessing library uhc-util-0.1.6.6...
[10 of 48] Compiling UHC.Util.Binary ( src/UHC/Util/Binary.hs, dist/build/UHC/Util/Binary.o )
src/UHC/Util/Binary.hs:23:5: error:
Ambiguous occurrence ‘putList’
It could refer to either ‘Data.Binary.putList’,
imported from ‘Data.Binary’ at src/UHC/Util/Binary.hs:30:1-18
(and originally defined in ‘binary-0.8.2.1:Data.Binary.Class’)
or ‘UHC.Util.Binary.putList’,
defined at src/UHC/Util/Binary.hs:118:1
putList is not available in binary-0.8.2.1 (current version on hackage); what is the CPP flag which can be used to conditionally not define putList in UHC.Util.Binary?
Atze
On 22 Apr, 2016, at 04:42 , Andrés Sicard-Ramírez notifications@github.com wrote:
Using GHC 8.0.1-rc3 I installed pqueue using the --allow-newer option:
$ cabal install pqueue --allow-newer=base Then using master I got the following error:
$ cabal install Preprocessing library uhc-util-0.1.6.6... [10 of 48] Compiling UHC.Util.Binary ( src/UHC/Util/Binary.hs, dist/build/UHC/Util/Binary.o )
src/UHC/Util/Binary.hs:23:5: error: Ambiguous occurrence ‘putList’ It could refer to either ‘Data.Binary.putList’, imported from ‘Data.Binary’ at src/UHC/Util/Binary.hs:30:1-18 (and originally defined in ‘binary-0.8.2.1:Data.Binary.Class’) or ‘UHC.Util.Binary.putList’, defined at src/UHC/Util/Binary.hs:118:1 — You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/UU-ComputerScience/uhc-util/issues/8#issuecomment-213215920
putList is not available in binary-0.8.2.1 (current version on hackage);
It seems 8.0.1-rc3 messed up the version number of the binary package. I filed this GHC issue.
what is the CPP flag which can be used to conditionally not define putList in UHC.Util.Binary?
From the above issue, it seems we need to wait for GHC 8.0.1-rc4 before adding the CPP flag.
The GHC issue was fixed in 8.0.1-rc4. Using this version of GHC the error is:
$ cabal install
[10 of 48] Compiling UHC.Util.Binary ( src/UHC/Util/Binary.hs, dist/dist-sandbox-213a48d4/build/UHC/Util/Binary.o )
src/UHC/Util/Binary.hs:23:5: error:
Ambiguous occurrence ‘putList’
It could refer to either ‘Data.Binary.putList’,
imported from ‘Data.Binary’ at src/UHC/Util/Binary.hs:30:1-18
(and originally defined in ‘binary-0.8.3.0:Data.Binary.Class’)
or ‘UHC.Util.Binary.putList’,
defined at src/UHC/Util/Binary.hs:118:1
Hi Andrés,
perhaps you can provide a patch required to make this work under 8.0.1-rc4 whilst not breaking under 7.10.3?
thanks, Atze
On 23 Apr 2016, at 03:48, Andrés Sicard-Ramírez notifications@github.com wrote:
The GHC issue was fixed in 8.0.1-rc4. Using this version of GHC the error is:
$ cabal install [10 of 48] Compiling UHC.Util.Binary ( src/UHC/Util/Binary.hs, dist/dist-sandbox-213a48d4/build/UHC/Util/Binary.o )
src/UHC/Util/Binary.hs:23:5: error: Ambiguous occurrence ‘putList’ It could refer to either ‘Data.Binary.putList’, imported from ‘Data.Binary’ at src/UHC/Util/Binary.hs:30:1-18 (and originally defined in ‘binary-0.8.3.0:Data.Binary.Class’) or ‘UHC.Util.Binary.putList’, defined at src/UHC/Util/Binary.hs:118:1 — You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/UU-ComputerScience/uhc-util/issues/8#issuecomment-213647051
The two versions of putList
have different types:
UHC
putList :: (Binary a, Binary b) => (x -> Bool) -> (x -> (a,b)) -> x -> Put
binary 0.8.3.0
putList :: [a] -> Put
By greping the uhc-utils and uhc repositories, I found that the functions putList
and getList
are not used. I suggest just rename/remove them.
Ah yes, its only use (in uhc) has been commented out. I have removed them.
Atze
On 25 Apr 2016, at 19:11, Andrés Sicard-Ramírez notifications@github.com wrote:
Both putList have different types:
UHC
putList :: (Binary a, Binary b) => (x -> Bool) -> (x -> (a,b)) -> x -> Put
binary 0.8.3.0
putList :: [a] -> Put
By greping the uhc-utils and uhc repositories, I found that the functions putList and getList are not used. I suggest just rename/remove them.
— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/UU-ComputerScience/uhc-util/issues/8#issuecomment-214445845
Thanks!
The new error is:
$ cabal install
[46 of 48] Compiling UHC.Util.CHR.Solve.TreeTrie.MonoBacktrackPrio ( src/UHC/Util/CHR/Solve/TreeTrie/MonoBacktrackPrio.hs, dist/dist-sandbox-f49aa070/build/UHC/Util/CHR/Solve/TreeTrie/MonoBacktrackPrio.o )
src/UHC/Util/CHR/Solve/TreeTrie/MonoBacktrackPrio.hs:1104:14: error:
• Overlapping instances for MonadState
(CHRGlobState c g bp p s env m, CHRBackState c bp s env)
(LogicStateT
(CHRGlobState c g bp p s e m) (CHRBackState c bp s e) m)
arising from a use of ‘getl’
Matching instances:
instance [overlappable] [safe] MonadState s m =>
MonadState s (LogicStateT gs bs m)
-- Defined in ‘Control.Monad.LogicState’
instance [safe] Monad m =>
MonadState (gs, bs) (LogicStateT gs bs m)
-- Defined in ‘Control.Monad.LogicState’
(The choice depends on the instantiation of ‘env, g, p, c, bp, s,
e, m’
To pick the first instance above, use IncoherentInstances
when compiling the other instance declarations)
• In a stmt of a 'do' block:
subst <- getl $ sndl ^* chrbstSolveSubst
In the expression:
do { subst <- getl $ sndl ^* chrbstSolveSubst;
curbprio <- fmap chrPrioLift $ getl $ sndl ^* chrbstBacktrackPrio;
return
$ fmap
(\ (s, ws)
-> FoundSlvMatch
s
freevars
ws
(FoundMatchSortKey
(fmap ((,) s) mbpr) (Set.size ws) (_storedChrInx chr))
[FoundBodyAlt i bp a | (i, a) <- zip [0 .. ] alts, let ...])
$ (\ m
-> chrmatcherRun
m
(emptyCHRMatchEnv
{chrmatchenvMetaMayBind = (`Set.member` freevars)})
subst)
$ sequence_ $ prio curbprio ++ matches ++ checks }
In an equation for ‘slvMatch’:
slvMatch
env
chr@(StoredCHR {_storedChrRule = Rule {rulePrio = mbpr,
ruleHead = hc, ruleGuard = gd,
ruleBacktrackPrio = mbbpr, ruleBodyAlts = alts}})
cnstrs
headInx
= do { subst <- getl $ sndl ^* chrbstSolveSubst;
curbprio <- fmap chrPrioLift $ getl $ sndl ^* chrbstBacktrackPrio;
return
$ fmap
(\ (s, ws)
-> FoundSlvMatch
s
freevars
ws
(FoundMatchSortKey
(fmap ((,) s) mbpr) (Set.size ws) (_storedChrInx chr))
[FoundBodyAlt i bp a | (i, a) <- zip ... alts, let ...])
$ (\ m
-> chrmatcherRun
m
(emptyCHRMatchEnv
{chrmatchenvMetaMayBind = (`Set.member` freevars)})
subst)
$ sequence_ $ prio curbprio ++ matches ++ checks }
where
prio curbprio = maybe [] (\ bpr -> [...]) mbbpr
matches
= zipWith3
(\ i h c -> chrMatchAndWaitToM (i == headInx) env h c)
[0 :: Int .. ]
hc
cnstrs
checks = map (chrCheckM env) gd
freevars = Set.unions [varFreeSet hc, ....]
I could not reproduce the error using ghc 7.x, but the problem seems to lie in an overlapping instance in logict-state, which I removed there (seemed unnecessary anyway). Not sure whether this fixes it.
A
On 26 Apr 2016, at 14:26, Andrés Sicard-Ramírez notifications@github.com wrote:
Thanks!
The new error is:
$ cabal install [46 of 48] Compiling UHC.Util.CHR.Solve.TreeTrie.MonoBacktrackPrio ( src/UHC/Util/CHR/Solve/TreeTrie/MonoBacktrackPrio.hs, dist/dist-sandbox-f49aa070/build/UHC/Util/CHR/Solve/TreeTrie/MonoBacktrackPrio.o )
src/UHC/Util/CHR/Solve/TreeTrie/MonoBacktrackPrio.hs:1104:14: error: • Overlapping instances for MonadState (CHRGlobState c g bp p s env m, CHRBackState c bp s env) (LogicStateT (CHRGlobState c g bp p s e m) (CHRBackState c bp s e) m) arising from a use of ‘getl’ Matching instances: instance [overlappable] [safe] MonadState s m => MonadState s (LogicStateT gs bs m) -- Defined in ‘Control.Monad.LogicState’ instance [safe] Monad m => MonadState (gs, bs) (LogicStateT gs bs m) -- Defined in ‘Control.Monad.LogicState’ (The choice depends on the instantiation of ‘env, g, p, c, bp, s, e, m’ To pick the first instance above, use IncoherentInstances when compiling the other instance declarations) • In a stmt of a 'do' block: subst <- getl $ sndl ^* chrbstSolveSubst In the expression: do { subst <- getl $ sndl ^* chrbstSolveSubst; curbprio <- fmap chrPrioLift $ getl $ sndl ^* chrbstBacktrackPrio; return $ fmap (\ (s, ws) -> FoundSlvMatch s freevars ws (FoundMatchSortKey (fmap ((,) s) mbpr) (Set.size ws) (storedChrInx chr)) [FoundBodyAlt i bp a | (i, a) <- zip [0 .. ] alts, let ...]) $ (\ m -> chrmatcherRun m (emptyCHRMatchEnv {chrmatchenvMetaMayBind = (
Set.member
freevars)}) subst) $ sequence $ prio curbprio ++ matches ++ checks } In an equation for ‘slvMatch’: slvMatch env chr@(StoredCHR {_storedChrRule = Rule {rulePrio = mbpr, ruleHead = hc, ruleGuard = gd, ruleBacktrackPrio = mbbpr, ruleBodyAlts = alts}}) cnstrs headInx = do { subst <- getl $ sndl ^* chrbstSolveSubst; curbprio <- fmap chrPrioLift $ getl $ sndl ^* chrbstBacktrackPrio; return $ fmap (\ (s, ws) -> FoundSlvMatch s freevars ws (FoundMatchSortKey (fmap ((,) s) mbpr) (Set.size ws) (storedChrInx chr)) [FoundBodyAlt i bp a | (i, a) <- zip ... alts, let ...]) $ (\ m -> chrmatcherRun m (emptyCHRMatchEnv {chrmatchenvMetaMayBind = (Set.member
freevars)}) subst) $ sequence $ prio curbprio ++ matches ++ checks } where prio curbprio = maybe []( bpr -> [...]) mbbpr matches = zipWith3 (\ i h c -> chrMatchAndWaitToM (i == headInx) env h c) [0 :: Int .. ] hc cnstrs checks = map (chrCheckM env) gd freevars = Set.unions [varFreeSet hc, ....]— You are receiving this because you commented. Reply to this email directly or view it on GitHub
Using the new version of logic-state (0.1.0.2), the new error is:
$ cabal install
...
[42 of 48] Compiling UHC.Util.CHR.Solve.TreeTrie.MonoBacktrackPrio ( src/UHC/Util/CHR/Solve/TreeTrie/MonoBacktrackPrio.hs, dist/dist-sandbox-dbfd663/build/UHC/Util/CHR/Solve/TreeTrie/MonoBacktrackPrio.o )
src/UHC/Util/CHR/Solve/TreeTrie/MonoBacktrackPrio.hs:1104:14: error:
• Could not deduce (MonadState
(CHRGlobState c g bp p s env m, CHRBackState c bp s env)
(LogicStateT
(CHRGlobState c g bp p s e m) (CHRBackState c bp s e) m))
arising from a use of ‘getl’
from the context: (MonoBacktrackPrio c g bp p s e m,
CHRMatchable env c s,
CHRCheckable env g s,
CHRMatchable env bp s,
CHRPrioEvaluatable env bp s)
bound by the type signature for:
slvMatch :: (MonoBacktrackPrio c g bp p s e m,
CHRMatchable env c s, CHRCheckable env g s, CHRMatchable env bp s,
CHRPrioEvaluatable env bp s) =>
env
-> StoredCHR c g bp p
-> [c]
-> Int
-> CHRMonoBacktrackPrioT
c g bp p s e m (Maybe (FoundSlvMatch c g bp p s))
at src/UHC/Util/CHR/Solve/TreeTrie/MonoBacktrackPrio.hs:(1083,1)-(1102,81)
• In a stmt of a 'do' block:
subst <- getl $ sndl ^* chrbstSolveSubst
In the expression:
do { subst <- getl $ sndl ^* chrbstSolveSubst;
curbprio <- fmap chrPrioLift $ getl $ sndl ^* chrbstBacktrackPrio;
return
$ fmap
(\ (s, ws)
-> FoundSlvMatch
s
freevars
ws
(FoundMatchSortKey
(fmap ((,) s) mbpr) (Set.size ws) (_storedChrInx chr))
[FoundBodyAlt i bp a | (i, a) <- zip [0 .. ] alts, let ...])
$ (\ m
-> chrmatcherRun
m
(emptyCHRMatchEnv
{chrmatchenvMetaMayBind = (`Set.member` freevars)})
subst)
$ sequence_ $ prio curbprio ++ matches ++ checks }
In an equation for ‘slvMatch’:
slvMatch
env
chr@(StoredCHR {_storedChrRule = Rule {rulePrio = mbpr,
ruleHead = hc, ruleGuard = gd,
ruleBacktrackPrio = mbbpr, ruleBodyAlts = alts}})
cnstrs
headInx
= do { subst <- getl $ sndl ^* chrbstSolveSubst;
curbprio <- fmap chrPrioLift $ getl $ sndl ^* chrbstBacktrackPrio;
return
$ fmap
(\ (s, ws)
-> FoundSlvMatch
s
freevars
ws
(FoundMatchSortKey
(fmap ((,) s) mbpr) (Set.size ws) (_storedChrInx chr))
[FoundBodyAlt i bp a | (i, a) <- zip ... alts, let ...])
$ (\ m
-> chrmatcherRun
m
(emptyCHRMatchEnv
{chrmatchenvMetaMayBind = (`Set.member` freevars)})
subst)
$ sequence_ $ prio curbprio ++ matches ++ checks }
where
prio curbprio = maybe [] (\ bpr -> [...]) mbbpr
matches
= zipWith3
(\ i h c -> chrMatchAndWaitToM (i == headInx) env h c)
[0 :: Int .. ]
hc
cnstrs
checks = map (chrCheckM env) gd
freevars = Set.unions [varFreeSet hc, ....]
The above error was generated using GHC 8.0.1.
Ok, I think the problem lies in 'env' and 'e' which are not equal. They should be (I made an error in the signature), but this is not detected by ghc7 so it seems... I have fixed this in the repo.
A
On 20 May 2016, at 13:53, Andrés Sicard-Ramírez notifications@github.com wrote:
Using the new version of logic-state (0.1.0.2), the new error is:
$ cabal install ... [42 of 48] Compiling UHC.Util.CHR.Solve.TreeTrie.MonoBacktrackPrio ( src/UHC/Util/CHR/Solve/TreeTrie/MonoBacktrackPrio.hs, dist/dist-sandbox-dbfd663/build/UHC/Util/CHR/Solve/TreeTrie/MonoBacktrackPrio.o )
src/UHC/Util/CHR/Solve/TreeTrie/MonoBacktrackPrio.hs:1104:14: error: • Could not deduce (MonadState (CHRGlobState c g bp p s env m, CHRBackState c bp s env) (LogicStateT (CHRGlobState c g bp p s e m) (CHRBackState c bp s e) m)) arising from a use of ‘getl’ from the context: (MonoBacktrackPrio c g bp p s e m, CHRMatchable env c s, CHRCheckable env g s, CHRMatchable env bp s, CHRPrioEvaluatable env bp s) bound by the type signature for: slvMatch :: (MonoBacktrackPrio c g bp p s e m, CHRMatchable env c s, CHRCheckable env g s, CHRMatchable env bp s, CHRPrioEvaluatable env bp s) => env -> StoredCHR c g bp p -> [c] -> Int -> CHRMonoBacktrackPrioT c g bp p s e m (Maybe (FoundSlvMatch c g bp p s)) at src/UHC/Util/CHR/Solve/TreeTrie/MonoBacktrackPrio.hs:(1083,1)-(1102,81) • In a stmt of a 'do' block: subst <- getl $ sndl ^* chrbstSolveSubst In the expression: do { subst <- getl $ sndl ^* chrbstSolveSubst; curbprio <- fmap chrPrioLift $ getl $ sndl ^* chrbstBacktrackPrio; return $ fmap (\ (s, ws) -> FoundSlvMatch s freevars ws (FoundMatchSortKey (fmap ((,) s) mbpr) (Set.size ws) (storedChrInx chr)) [FoundBodyAlt i bp a | (i, a) <- zip [0 .. ] alts, let ...]) $ (\ m -> chrmatcherRun m (emptyCHRMatchEnv {chrmatchenvMetaMayBind = (
Set.member
freevars)}) subst) $ sequence $ prio curbprio ++ matches ++ checks } In an equation for ‘slvMatch’: slvMatch env chr@(StoredCHR {_storedChrRule = Rule {rulePrio = mbpr, ruleHead = hc, ruleGuard = gd, ruleBacktrackPrio = mbbpr, ruleBodyAlts = alts}}) cnstrs headInx = do { subst <- getl $ sndl ^* chrbstSolveSubst; curbprio <- fmap chrPrioLift $ getl $ sndl ^* chrbstBacktrackPrio; return $ fmap (\ (s, ws) -> FoundSlvMatch s freevars ws (FoundMatchSortKey (fmap ((,) s) mbpr) (Set.size ws) (storedChrInx chr)) [FoundBodyAlt i bp a | (i, a) <- zip ... alts, let ...]) $ (\ m -> chrmatcherRun m (emptyCHRMatchEnv {chrmatchenvMetaMayBind = (Set.member
freevars)}) subst) $ sequence $ prio curbprio ++ matches ++ checks } where prio curbprio = maybe []( bpr -> [...]) mbbpr matches = zipWith3 (\ i h c -> chrMatchAndWaitToM (i == headInx) env h c) [0 :: Int .. ] hc cnstrs checks = map (chrCheckM env) gd freevars = Set.unions [varFreeSet hc, ....]— You are receiving this because you commented. Reply to this email directly or view it on GitHub
I could install the version in the repo using GHC 8.0.1. Thanks!
Edit (2016-02-13): I couldn't install using GHC 8.0.1
RC 1RC 2:The first blocking issue is https://github.com/sebastiaanvisser/fclabels/issues/27.