Skip to content

Commit

Permalink
Add instance ann ~ Void => Pretty (Doc ann) (#234)
Browse files Browse the repository at this point in the history
When there are no annotations, Doc is Pretty.
  • Loading branch information
phadej authored Apr 26, 2024
1 parent 7e32c01 commit eccc839
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions prettyprinter/src/Prettyprinter/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}

Expand Down Expand Up @@ -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

Expand Down

0 comments on commit eccc839

Please sign in to comment.