diff --git a/src/Algebra/Graph/Labelled.hs b/src/Algebra/Graph/Labelled.hs index 01b7c0b74..dd6a54d41 100644 --- a/src/Algebra/Graph/Labelled.hs +++ b/src/Algebra/Graph/Labelled.hs @@ -87,7 +87,7 @@ instance (Ord a, Num a, Dioid e) => Num (Graph e a) where #if MIN_VERSION_base(4,8,0) instance Bifunctor Graph where - bimap f g = emap f . fmap g + bimap f g = foldg Empty (Vertex . g) (Connect . f) #endif -- TODO: This is a very inefficient implementation. Find a way to construct an