Popularity
1.9
Declining
Activity
0.0
Stable
1
3
0

Monthly Downloads: 14
Programming language: Haskell
License: BSD 3-clause "New" or "Revised" License
Tags: Web    

wryte alternatives and similar packages

Based on the "Web" category.
Alternatively, view wryte alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of wryte or a related project?

Add another 'Web' Package

README

wryte

Pretty-printed source code with semi-automatic indentation

Introduction

Wryte provides an API for generating textual source code with pretty indentation and alignment. To achieve this, it tracks source column position, newlines, and current indentation / alignment internally, and provides a monadic API to conveniently manage these.

Installation

The usual; cabal install wryte, or add wryte to your stack extra-dependencies.

Basic Usage

putStrLn . runWryte_ defWryteOptions $ do
  wryteLn "module Main where"
  wryteLn ""
  wryteLn "main = do"
  indented $ do
    wryteLn "putStrLn \"Hello, world!\"

Indentation is tracked monadically, such that indented acts as a wrapper that automatically prepends indentation to each new line. Indentations stack up, so you can safely nest them, and they will do the right thing.