diff --git a/src/Serializing/Format.hs b/src/Serializing/Format.hs index 28987a7bd..b025dd1d9 100644 --- a/src/Serializing/Format.hs +++ b/src/Serializing/Format.hs @@ -10,7 +10,9 @@ import Data.ByteString.Builder import Serializing.DOT data Format input where - DOT :: (Ord vertex, ToGraph graph, ToVertex graph ~ vertex) => Style vertex Builder -> Format graph + DOT :: (Ord vertex, ToGraph graph, ToVertex graph ~ vertex) => Style vertex Builder -> Format graph + Show :: Show input => Format input runSerialize :: Format input -> input -> Builder runSerialize (DOT style) graph = serializeDOT style graph +runSerialize Show input = stringUtf8 (show input)