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:
parent
8f4fb96836
commit
c5dd415ac8
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user