diff options
Diffstat (limited to 'src/lib/Codec/Pesto/Serialize.lhs')
-rw-r--r-- | src/lib/Codec/Pesto/Serialize.lhs | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/lib/Codec/Pesto/Serialize.lhs b/src/lib/Codec/Pesto/Serialize.lhs index f07e871..17a0fcc 100644 --- a/src/lib/Codec/Pesto/Serialize.lhs +++ b/src/lib/Codec/Pesto/Serialize.lhs @@ -9,16 +9,12 @@ Serializing > > import {-# SOURCE #-} Codec.Pesto.Parse +Serialization turns a linear list of instructions back into a human +representation. + > class Serializeable a where > serialize :: a -> String - -.. class:: todo - -- Add instance for graph -- use :math:`\mathcal{O}(1)` string builder - -Finally transform linear stream of instructions into a string again: - +> > instance Serializeable a => Serializeable [a] where > serialize ops = unlines $ map serialize ops |