1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 22:31:36 +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

@ -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)