module DDC.Source.Tetra.Convert.Error
(ErrorConvert (..))
where
import DDC.Source.Tetra.Pretty
import qualified DDC.Source.Tetra.Exp.Annot as S
data ErrorConvert a
= ErrorConvertCannotConvertSugarExp (S.Exp a)
| ErrorConvertCannotConvertSugarLets (S.Lets a)
instance Pretty a => Pretty (ErrorConvert a) where
ppr err
= case err of
ErrorConvertCannotConvertSugarExp xx
-> vcat [ text "Cannot desugar expression"
, indent 2 $ ppr xx ]
ErrorConvertCannotConvertSugarLets xx
-> vcat [ text "Cannot desugar let-bindings"
, indent 2 $ ppr xx ]