Add instance ann ~ Void => Pretty (Doc ann) (#234)

When there are no annotations, Doc is Pretty.
This commit is contained in:
Oleg Grenrus 2024-04-26 19:46:34 +03:00 committed by GitHub
parent 7e32c010ec
commit eccc839f28
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3,6 +3,7 @@
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
@ -292,6 +293,9 @@ class Pretty a where
-- , (1, [2, 2, 2, 2, 2, 2, 2, 2])
-- , (1, [2, 2, 2, 2, 2, 2, 2, 2]) ] ]
instance ann ~ Void => Pretty (Doc ann) where
pretty = vacuous
instance Pretty a => Pretty (Const a b) where
pretty = pretty . getConst