File: Example.hs

package info (click to toggle)
haskell-pretty-simple 4.1.2.0-3
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 216 kB
  • sloc: haskell: 1,103; makefile: 8
file content (23 lines) | stat: -rw-r--r-- 543 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

{- |
Copyright   :  Dennis Gosnell 2017
License     :  BSD3
Maintainer  :  Dennis Gosnell (cdep.illabout@gmail.com)
Stability   :  experimental
Portability :  unknown

This is an short example of using 'pPrint' from "Text.Pretty.Simple" to
pretty-print a Haskell data type.
-}
module Main where

import Text.Pretty.Simple (pPrint)

import Example.Data (bar)

main :: IO ()
main = do
  putStrLn "\nThe following normal \"print\" output:\n"
  print bar
  putStrLn "\ngets turned into this (using \"Text.Pretty.Simple.pPrint\"):\n"
  pPrint bar