diff --git a/code/GADTs.hs b/code/GADTs.hs index 4ca0ace..a00c93f 100644 --- a/code/GADTs.hs +++ b/code/GADTs.hs @@ -94,7 +94,7 @@ instance Show (HList '[]) where -- # showHCons instance (Show t, Show (HList ts)) => Show (HList (t ': ts)) where - show (a :# as) = show a <> " :# " show as + show (a :# as) = show a <> " :# " <> show as -} diff --git a/gadts.tex b/gadts.tex index edbcb13..442c87f 100644 --- a/gadts.tex +++ b/gadts.tex @@ -268,6 +268,8 @@ \section{Heterogeneous Lists} \begin{exercise} Rewrite the \ty{Ord} and \ty{Show} instances in terms of \ty{All}. +Hint: your instance for \ty{Eq} needs to be implementend in terms of \ty{All} +as well. \end{exercise} \begin{solution} \unspacedSnip{GADTs}{ordHList}