mirror of
https://github.com/quchen/prettyprinter.git
synced 2024-10-05 17:38:27 +03:00
Add instance ann ~ Void => Pretty (Doc ann) (#234)
When there are no annotations, Doc is Pretty.
This commit is contained in:
parent
7e32c010ec
commit
eccc839f28
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user