~ubuntu-branches/ubuntu/raring/agda/raring-proposed

« back to all changes in this revision

Viewing changes to src/full/Agda/Compiler/MAlonzo/Pretty.hs

  • Committer: Bazaar Package Importer
  • Author(s): Iain Lane
  • Date: 2009-07-20 19:49:41 UTC
  • Revision ID: james.westby@ubuntu.com-20090720194941-hcjy91vrn16csh7d
Tags: upstream-2.2.4+dfsg
ImportĀ upstreamĀ versionĀ 2.2.4+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
------------------------------------------------------------------------
 
2
-- Pretty-printing of Haskell modules
 
3
------------------------------------------------------------------------
 
4
 
 
5
module Agda.Compiler.MAlonzo.Pretty where
 
6
 
 
7
import Data.Generics
 
8
import qualified Language.Haskell.Pretty as Pretty
 
9
import Language.Haskell.Syntax
 
10
 
 
11
import Agda.Compiler.MAlonzo.Encode
 
12
 
 
13
-- | Inserts disambiguating parentheses and encodes module names just
 
14
-- before pretty-printing.
 
15
 
 
16
prettyPrint :: (Pretty.Pretty a, Data a) => a -> String
 
17
prettyPrint = Pretty.prettyPrint .
 
18
              everywhere (mkT HsParen) .
 
19
              everywhere (mkT encodeModuleName)