Implementation of the Pretty library using linear-time, bounded implementation by Olaf Chitil.
Author: Sebastian Fischer, Bjoern Peemoeller, Jan Tikovsky
Version: December 2018
                deDoc
                  ::  Doc -> Tokens -> Tokens   
                 | 
              
            
                resetFormat
                  ::  [FormatStm] -> (FormatStm,[FormatStm])   
                 | 
              
            
                prevFGColor
                  ::  [FormatStm] -> Color   
                 | 
              
            
                prevBGColor
                  ::  [FormatStm] -> Color   
                 | 
              
            
                prevIntensity
                  ::  [FormatStm] -> Intensity   
                 | 
              
            
                prevBlinkMode
                  ::  [FormatStm] -> BlinkMode   
                 | 
              
            
                applyFormat
                  ::  FormatStm -> String   
                 | 
              
            
                txtMode
                  ::  Int -> String   
                 | 
              
            
                colorMode
                  ::  Color -> Int   
                 | 
              
            
                intensityMode
                  ::  Intensity -> Int   
                 | 
              
            
                blinkMode
                  ::  BlinkMode -> Int   
                 | 
              
            
                applyNesting
                  ::  Nesting -> Int -> Int -> [Int] -> [Int]   
                 | 
              
            
                unApplyNesting
                  ::  [Int] -> [Int]   
                 | 
              
            
                addSpaces
                  ::  Int -> Tokens -> String   
                 | 
              
            
                normalise
                  ::  Tokens -> Tokens   
                 | 
              
            
                doc2Tokens
                  ::  Doc -> Tokens   
                 | 
              
            
                showWidth
                  ::  Int -> Doc -> String   
                (showWidth w d)
                pretty prints document d
                with a page width of w
                characters
               | 
              
            
                lengthVis
                  ::  String -> Int   
                 | 
              
            
                noGroup
                  ::  Tokens -> Int -> Int -> Int -> [Int] -> [FormatStm] -> String   
                 | 
              
            
                oneGroup
                  ::  Tokens -> Int -> Int -> Int -> (Bool -> (Int -> [Int] -> [FormatStm] -> String) -> Int -> [Int] -> [FormatStm] -> String) -> Int -> [Int] -> [FormatStm] -> String   
                 | 
              
            
                multiGroup
                  ::  Tokens -> Int -> Int -> Int -> (Bool -> (Int -> [Int] -> [FormatStm] -> String) -> Int -> [Int] -> [FormatStm] -> String) -> Queue (Int,Bool -> (Int -> [Int] -> [FormatStm] -> String) -> Int -> [Int] -> [FormatStm] -> String) -> Int -> (Bool -> (Int -> [Int] -> [FormatStm] -> String) -> Int -> [Int] -> [FormatStm] -> String) -> Int -> [Int] -> [FormatStm] -> String   
                 | 
              
            
                pruneOne
                  ::  Tokens -> Int -> Int -> Int -> (Bool -> (Int -> [Int] -> [FormatStm] -> String) -> Int -> [Int] -> [FormatStm] -> String) -> Int -> [Int] -> [FormatStm] -> String   
                 | 
              
            
                pruneMulti
                  ::  Tokens -> Int -> Int -> Int -> (Bool -> (Int -> [Int] -> [FormatStm] -> String) -> Int -> [Int] -> [FormatStm] -> String) -> Queue (Int,Bool -> (Int -> [Int] -> [FormatStm] -> String) -> Int -> [Int] -> [FormatStm] -> String) -> Int -> (Bool -> (Int -> [Int] -> [FormatStm] -> String) -> Int -> [Int] -> [FormatStm] -> String) -> Int -> [Int] -> [FormatStm] -> String   
                 | 
              
            
                inspect
                  ::  Doc -> Tokens   
                 | 
              
            
Constructors:
              Type synonym: Horizontal = Bool
            
              Type synonym: Remaining = Int
            
              Type synonym: Width = Int
            
              Type synonym: Position = Int
            
              Type synonym: StartPosition = Position
            
              Type synonym: EndPosition = Position
            
              Type synonym: Out = Remaining -> Margins -> FormatHistory -> String
            
              Type synonym: OutGroupPrefix = Horizontal -> Out -> Out
            
              Type synonym: Margins = [Int]
            
Constructors:
Align
                    :: Nesting
              Inc
                    ::  Int -> Nesting
              Constructors:
Black
                    :: Color
              Red
                    :: Color
              Green
                    :: Color
              Yellow
                    :: Color
              Blue
                    :: Color
              Magenta
                    :: Color
              Cyan
                    :: Color
              White
                    :: Color
              Default
                    :: Color
              Constructors:
Faint
                    :: Intensity
              Normal
                    :: Intensity
              Bold
                    :: Intensity
              Constructors:
Off
                    :: BlinkMode
              Slow
                    :: BlinkMode
              Rapid
                    :: BlinkMode
              Constructors:
SetForeground
                    ::  Color -> FormatStm
              SetBackground
                    ::  Color -> FormatStm
              SetIntensity
                    ::  Intensity -> FormatStm
              SetBlinkMode
                    ::  BlinkMode -> FormatStm
              SetItalicized
                    ::  Bool -> FormatStm
              SetUnderlined
                    ::  Bool -> FormatStm
              SetCrossedout
                    ::  Bool -> FormatStm
              InverseColoring
                    ::  Bool -> FormatStm
              
              Type synonym: FormatHistory = [FormatStm]
            
Constructors:
EOD
                    :: Tokens
              Empty
                    ::  Tokens -> Tokens
              Text
                    ::  String ->  Tokens -> Tokens
              LineBreak
                    ::  (Maybe String) ->  Tokens -> Tokens
              OpenGroup
                    ::  Tokens -> Tokens
              CloseGroup
                    ::  Tokens -> Tokens
              OpenNest
                    ::  Nesting ->  Tokens -> Tokens
              CloseNest
                    ::  Tokens -> Tokens
              OpenFormat
                    ::  FormatStm ->  Tokens -> Tokens
              CloseFormat
                    ::  Tokens -> Tokens
              | 
                    
                     
                       
  | 
                  
                
| 
                    
                     
                        | 
                  
                
| 
                    
                     
                        | 
                  
                
| 
                    
                     
                        | 
                  
                
| 
                    
                     
                        | 
                  
                
| 
                    
                     
                        | 
                  
                
| 
                    
                     
                        | 
                  
                
| 
                    
                     
                        | 
                  
                
| 
                    
                     
                        | 
                  
                
| 
                    
                     
                        | 
                  
                
| 
                    
                     
                        | 
                  
                
| 
                    
                     
                        | 
                  
                
| 
                    
                     
                       
                       
 
 
  | 
                  
                
| 
                    
                     
                        | 
                  
                
| 
                    
                     
                        | 
                  
                
| 
                    
                     
                        | 
                  
                
| 
                    
                     
                        | 
                  
                
| 
                    
                     
                        |