boltzmann-brain-1.4: Boltzmann sampler compiler for combinatorial systems.

Copyright(c) Maciej Bendkowski 2017-2018
LicenseBSD3
Maintainermaciej.bendkowski@tcs.uj.edu.pl
Stabilityexperimental
Safe HaskellSafe
LanguageHaskell2010

Data.Boltzmann.Internal.Utils

Description

General utilities for boltzmann-brain.

Synopsis

Documentation

quote :: String -> String Source #

Single-quotes the given string.

ensureLn :: String -> String Source #

Given a string, ensures that it ends with a newline character, appending it if needed.

closest :: [String] -> String -> String Source #

Given a non-empty list of distinct strings, finds the closest (in terms of editing distance) string to the given one.

bold :: String -> IO String Source #

Given a string, outputs its bold variant (assuming that the terminal supports it)

italic :: String -> IO String Source #

Given a string, outputs its italic variant (assuming that the terminal supports it)

underline :: String -> IO String Source #

Given a string, outputs its underlined variant (assuming that the terminal supports it)

boldColor :: Color -> String -> IO String Source #

Given a string, outputs its bold, colored variant (assuming that the terminal supports it)

csv :: [String] -> String Source #

Produces a comma separated value (csv) representation of the given list of string. Note that after each comma there's placed an additional whitespace character.