1
1
mirror of https://github.com/github/semantic.git synced 2025-01-09 00:56:32 +03:00

Add support for serializing by Showing.

This commit is contained in:
Rob Rix 2018-05-11 14:38:11 -04:00
parent 8f4fb96836
commit c5dd415ac8

View File

@ -11,6 +11,8 @@ import Serializing.DOT
data Format input where
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)