-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Native wcwidth.
--   
--   Bindings for your system's native wcwidth and a command line tool to
--   examine the widths assigned by it. The command line tool can compile a
--   width table to Haskell code that assigns widths to the Char type.
@package wcwidth
@version 0.0.2


-- | A binding for the native <a>wcwidth</a>. It's important that you
--   <tt>setLocale</tt> before using it, like this:
--   
--   <pre>
--   #!/usr/bin/env runhaskell
--   
--   import Text.Printf
--   
--   import System.Locale.SetLocale
--   import Data.Char.WCWidth
--   
--   main                     =  do
--     setLocale LC_ALL (Just "")
--     sequence_ [ display c | c &lt;- chars ]
--    where
--     chars                  =  [minBound..'A']
--     display c = printf "%04x  %2d  %s\n" (fromEnum c) (wcwidth c) (show c)
--   </pre>
--   
--   The program file <tt>WCWidthTableaux.hs</tt> contains a more extensive
--   example of using <a>wcwidth</a>.
--   
--   Note that this binding to the native implementation gets certain
--   characters wrong in obvious ways as well as ways that are problematic
--   for indentation based languages. The ASCII tab should be assigned a
--   width of 8, not -1; and one is likely to find -1 assigned to numerous
--   obscure characters (for example, symbols from the Book of Changes).
module Data.Char.WCWidth

-- | Binding to the native <a>wcwidth</a>.
wcwidth :: Char -> Int

-- | Widths of all characters.
widths :: [(Char, Int)]

-- | Characters broken into contiguous ranges with the same width.
ranges :: [((Char, Char), Int)]
