
\begin{slide}{Dekodierung mit Typklassen}

\begin{itemize}
\item Typklasse Decode
\item feste Instanz (Satchmo.Boolean $\to$ Prelude.Bool)
\item generische Instanzen (Paare, Listen, Arrays, Maps)
\end{itemize}

(vereinfachte Darstellung)
% \begin{small}
\begin{verbatim}
type Decoder a = Reader (Map Literal Bool) a
class Decode c a where 
    decode :: c -> Decoder a
instance Decode Boolean Bool where 
    decode x = ... -- benutzt Minisat-API
instance (Decode c a) => Decode [c] [a] where
    decode xs = forM xs decode
\end{verbatim}
% \end{small}

\end{slide}
