Commit 048b42f6 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[GraphContexts] mv to test, needs Class fix

parent c3f26139
...@@ -117,11 +117,9 @@ instance IsHyperGraph (GraphContexts a a) where ...@@ -117,11 +117,9 @@ instance IsHyperGraph (GraphContexts a a) where
mv_ g [a,b] [ ] = case match a g of mv_ g [a,b] [ ] = case match a g of
(Nothing, _) -> panic $ "mv: fst path does not exist: " <> show a (Nothing, _) -> panic $ "mv: fst path does not exist: " <> show a
(Just (p,n,cs,s), g1) -> case match b (foldr (&) empty cs) of (Just (p,n,cs,s), g1) -> case match b (foldr (&) empty cs) of
(Just (p',n',cs',s'), g2) -> undefined (Just c, g2) -> c & ( (p, n, gsel (const True) g2, s) & g1)
(Nothing, _) -> panic "mv: snd path does not exist" (Nothing, _) -> panic "mv: snd path does not exist"
mv_ g [a,b] [c] = mv (mv g [a,b] []) [b] [c]
mv_ g [a,b] [c] = undefined
mv_ _ [_] [_] = panic "path too long"j mv_ _ [_] [_] = panic "path too long"j
...@@ -532,16 +530,16 @@ merge = ufold (&) ...@@ -532,16 +530,16 @@ merge = ufold (&)
-- Tuple 4 functions -- Tuple 4 functions
-- since Data.Tuple.Extra has Tuple3 sugar only -- since Data.Tuple.Extra has Tuple3 sugar only
fst4 :: (a,b,c,d) -> a fst4 :: (a,b,c,d) -> a
fst4 (a,_,_,_) = a fst4 (a,_,_,_) = a
snd4 :: (a,b,c,d) -> b snd4 :: (a,b,c,d) -> b
snd4 (_,b,_,_) = b snd4 (_,b,_,_) = b
thd4 :: (a,b,c,d) -> c thd4 :: (a,b,c,d) -> c
thd4 (_,_,c,_) = c thd4 (_,_,c,_) = c
fth4 :: (a,b,c,d) -> d fth4 :: (a,b,c,d) -> d
fth4 (_,_,_,d) = d fth4 (_,_,_,d) = d
------------------------------------------------------------------------ ------------------------------------------------------------------------
------------------------------------------------------------------------ ------------------------------------------------------------------------
-- TO DELETE -- TO DELETE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment