Module Language.Go.ShowS

This library contains a simple pretty printer for showing Go programs in ShowS format instead of strings.

Author: Jonas Boehm, Michael Hanus

Version: July 2021

Summary of exported operations:

showGoProg :: GoProg -> String -> String  Deterministic 
Shows a Go program as a string in Go syntax.
showGoStat :: Int -> GoStat -> String -> String  Deterministic 
Shows a Go statement as a string in Go syntax with indenting.
showGoExpr :: GoExpr -> String -> String  Deterministic 
Shows a Go expression as a string in Go syntax.

Exported operations:

showGoProg :: GoProg -> String -> String  Deterministic 

Shows a Go program as a string in Go syntax.

showGoStat :: Int -> GoStat -> String -> String  Deterministic 

Shows a Go statement as a string in Go syntax with indenting.

Example call:
(showGoStat n gostat)
Parameters:
  • n : number of spaces to indent
  • gostat : the Go statement to show

showGoExpr :: GoExpr -> String -> String  Deterministic 

Shows a Go expression as a string in Go syntax.