[update documentation, move Data.Char to base
John Meacham <john@repetae.net>**20120206112232
 Ignore-this: 8fe0b515bdb8663d5d0f4ae199007e6b
] move ./lib/jhc/Data/Char.hs ./lib/base/Data/Char.hs
hunk ./Makefile.am 323
-    lib/jhc/Data/Char.hs lib/jhc/Jhc/List.hs lib/jhc/Jhc/Type/Float.hs lib/jhc/Foreign/Marshal/Utils.hs lib/jhc/Jhc/Basics.hs \
+    lib/jhc/Jhc/List.hs lib/jhc/Jhc/Type/Float.hs lib/jhc/Foreign/Marshal/Utils.hs lib/jhc/Jhc/Basics.hs \
hunk ./docs/dependency_format.mkd 15
+An example tool to processs the deps.yaml file and spit out appropriate Makefile rules is included as 'utils/deps_to_make.prl'.
+
hunk ./docs/development.mkd 9
-
hunk ./docs/development.mkd 43
-Now you can begin to build jhc, in order to do so, switch to the jhc directory and do:
+Now you can begin to build jhc and the standard libraries, in order to do so, switch to the jhc directory and do:
hunk ./docs/development.mkd 47
-after jhc has finished building, you can create the standard libraries via
-
-    make libs
-
-jhc can now be tested via
-
-    make HelloWorld
+jhc can now be tested via the following command to build HelloWorld with the freshly built libraries in the current directory.
hunk ./docs/development.mkd 49
-however, during development, it is sometimes easier to use the raw haskell source of
-the libraries directly. in order to do that, you can run jhc with the following
-options when run in the development tree.
+    ./jhc -L- -L. examples/HelloWorld.hs -o HelloWorld
hunk ./docs/development.mkd 51
-    ./jhc --noauto -ilib/base -ilib/jhc -ilib/haskell98 examples/HelloWorld.hs -o helloworld
+External libraries described in lib/ext can be built with the following
hunk ./docs/development.mkd 53
+    make libs
hunk ./docs/make.mkd 14
-module Data.Foo will be searched for in 'Data/Foo.hs'. As an extension, jhc will
-also search for 'Data.Foo.hs'. The search path may be modifed with the '-i'
-command line option, or by setting the 'JHC_PATH' environment variable.
+module Data.Foo will be searched for in 'Data/Foo.hs' and 'Data.Foo.hs'.
+The search path may be modifed with the '-i' command line option, or by
+setting the 'JHC_PATH' environment variable.
hunk ./docs/make.mkd 33
+You can list all available libraries by passing the --list-libraries option to jhc. If
+you include '-v' for verbose output, you will get detailed information about the
+libraries in a YAML format suitable for processing by external tools.
hunk ./docs/make.mkd 51
-: This specified the directory jhc will use to cache values. having a valid cache is essential for jhc performance. It defaults to ~/.jhc/cache.
+: This specified the directory jhc will use to cache values. having a valid
+cache is essential for jhc performance. It defaults to ~/.jhc/cache.
hunk ./docs/make.mkd 57
---build-hl option. The file format is a simplified version of the cabal format.
-The name of the generated file will be basename-version.hl.
+--build-hl option. The library file format is a stadard YAML file.
hunk ./docs/make.mkd 59
-    ; jhc --build-hl mylibrary.cabal
+    ; jhc --build-hl mylibrary.yaml
hunk ./docs/make.mkd 63
-The library file is a simple list of key value pairs seperated by colon. The fields that jhc cares about are
+The library file is a YAML document, jhc will recognize several fields and
+ignore unknown ones.
hunk ./docs/make.mkd 66
-    Name: The Name of your library
-    Version: The Version of your library
-    Exposed-Modules: Comma Seperated list of modules to be included in the library and made availabe to users of the library
-    Hidden-Modules: Comma Seperated list of modules that will be used by the library internally, but not be made available outside it.
+Name
+: The name of your library
hunk ./docs/make.mkd 69
-Other fields are stored as-is inside of the generated hl file and can be seen with jhc --show-ho file.hl.
+Version
+: The version of your library, The version number is used to differentiate
+different versions of the library passed to the '-p' command line option but is
+not otherwise special to jhc.
hunk ./docs/make.mkd 74
+Exposed-Modules
+: A list of modules to be included in the library and exposed to users of the
+library as its public interface. This may include modules that are part of
+another library, they will be re-exported by the current library.
+
+Hidden-Modules
+: A list of modules that the library may use internally but that should not be
+exposed to the user. Jhc may optimize based on this information. If this list
+is not exhaustive jhc will still build your library, but it will print out a
+warning.
+
+Extensions
+: A list of extensions which should be enabled during compilation of this
+module. When possible, jhc will match ghc extensions to their closest jhc
+counterparts.
+
+Options
+: Extra command line options to jhc for this library build.
+
+Build-Depends
+: libraries to include, in the same format as passed to the '-p' command line
+option
+
+Hs-Source-Dirs
+: Directory to search for Haskell source files in, this differs from the '-i'
+command line option in that the directory in this field is relative to the
+directory the library description .yaml file is located while the '-i' option
+is always relative to the current working directory.
+
+Include-Dirs
+: directories to be included in the preprocessor search path as if via '-I'.
+The directories are interpreted relative to the directory that contains the
+yaml file.
+
+example library files can be seen in lib/jhc/jhc.yaml and lib/base/base.yaml
hunk ./lib/base/Data/Char.hs 8
-    module Prelude.CType,
hunk ./lib/base/Data/Char.hs 20
+import Prelude.Text
hunk ./lib/base/Data/Char.hs 22
-
--- Text functions
-readLitChar          :: ReadS Char
-readLitChar ('\\':s) =  readEsc s
-readLitChar (c:s)    =  [(c,s)]
-
-readEsc          :: ReadS Char
-readEsc ('a':s)  = [('\a',s)]
-readEsc ('b':s)  = [('\b',s)]
-readEsc ('f':s)  = [('\f',s)]
-readEsc ('n':s)  = [('\n',s)]
-readEsc ('r':s)  = [('\r',s)]
-readEsc ('t':s)  = [('\t',s)]
-readEsc ('v':s)  = [('\v',s)]
-readEsc ('\\':s) = [('\\',s)]
-readEsc ('"':s)  = [('"',s)]
-readEsc ('\'':s) = [('\'',s)]
-readEsc ('^':(c:s)) | c >= '@' && c <= '_'
-                 = [(chr (ord c - ord '@'), s)]
-readEsc s@(d:_) | isDigit d
-                 = [(chr n, t) | (n,t) <- readDec s]
-readEsc ('o':s)  = [(chr n, t) | (n,t) <- readOct s]
-readEsc ('x':s)  = [(chr n, t) | (n,t) <- readHex s]
-readEsc s@(c:_) | isUpper c
-                 = let table = ('\DEL', "DEL") : zip ['\NUL' .. ] asciiTab
-                   in case [(c,s') | (c, mne) <- table,
-                                     ([],s') <- [match mne s]]
-                      of (pr:_) -> [pr]
-                         []     -> []
-readEsc _        = []
-
-match                         :: (Eq a) => [a] -> [a] -> ([a],[a])
-match (x:xs) (y:ys) | x == y  =  match xs ys
-match xs     ys               =  (xs,ys)
-
-showLitChar               :: Char -> ShowS
-showLitChar c | c > '\DEL' =  showChar '\\' .
-                              protectEsc isDigit (shows (ord c))
-showLitChar '\DEL'         =  showString "\\DEL"
-showLitChar '\\'           =  showString "\\\\"
-showLitChar c | c >= ' '   =  showChar c
-showLitChar '\a'           =  showString "\\a"
-showLitChar '\b'           =  showString "\\b"
-showLitChar '\f'           =  showString "\\f"
-showLitChar '\n'           =  showString "\\n"
-showLitChar '\r'           =  showString "\\r"
-showLitChar '\t'           =  showString "\\t"
-showLitChar '\v'           =  showString "\\v"
-showLitChar '\SO'          =  protectEsc (== 'H') (showString "\\SO")
-showLitChar c              =  showString ('\\' : (asciiTab!!ord c))
-
-protectEsc p f             = f . cont
-                             where cont s@(c:_) | p c = "\\&" ++ s
-                                   cont s             = s
hunk ./lib/base/Prelude.hs 87
-import qualified Data.Char as Char(isSpace,ord,chr)
+import qualified Prelude.CType as Char
+--import qualified Data.Char as Char(isSpace,ord,chr)
hunk ./lib/jhc/Jhc/Text/Read.hs 166
+-- Text functions
+readLitChar          :: ReadS Char
+readLitChar ('\\':s) =  readEsc s
+readLitChar (c:s)    =  [(c,s)]
+
+readEsc          :: ReadS Char
+readEsc ('a':s)  = [('\a',s)]
+readEsc ('b':s)  = [('\b',s)]
+readEsc ('f':s)  = [('\f',s)]
+readEsc ('n':s)  = [('\n',s)]
+readEsc ('r':s)  = [('\r',s)]
+readEsc ('t':s)  = [('\t',s)]
+readEsc ('v':s)  = [('\v',s)]
+readEsc ('\\':s) = [('\\',s)]
+readEsc ('"':s)  = [('"',s)]
+readEsc ('\'':s) = [('\'',s)]
+readEsc ('^':(c:s)) | c >= '@' && c <= '_'
+                 = [(chr (ord c - ord '@'), s)]
+readEsc s@(d:_) | isDigit d
+                 = [(chr n, t) | (n,t) <- readDec s]
+readEsc ('o':s)  = [(chr n, t) | (n,t) <- readOct s]
+readEsc ('x':s)  = [(chr n, t) | (n,t) <- readHex s]
+readEsc s@(c:_) | isUpper c
+                 = let table = ('\DEL', "DEL") : zip chars asciiTab
+                   in case [(c,s') | (c, mne) <- table,
+                                     ([],s') <- [match mne s]]
+                      of (pr:_) -> [pr]
+                         []     -> []
+readEsc _        = []
+
+chars = f '\NUL' where
+    f x = x:f (chr $ ord x + 1)
+
+match                         :: (Eq a) => [a] -> [a] -> ([a],[a])
+match (x:xs) (y:ys) | x == y  =  match xs ys
+match xs     ys               =  (xs,ys)
+
+
hunk ./lib/jhc/Prelude/Text.hs 7
-    showChar, showString, readParen, showParen,readIO,readLn ) where
+    showChar, showString, readParen, showParen,readIO,readLn,showLitChar ) where
hunk ./lib/jhc/Prelude/Text.hs 17
-
-import Data.Char(isSpace, isAlpha, isDigit, isAlphaNum,
-                 showLitChar, readLitChar, lexLitChar)
+import Prelude.CType
+import Jhc.Order
+import Jhc.List
hunk ./lib/jhc/Prelude/Text.hs 104
+
+showLitChar               :: Char -> ShowS
+showLitChar c | c > '\DEL' =  showChar '\\' .
+                              protectEsc isDigit (shows (ord c))
+showLitChar '\DEL'         =  showString "\\DEL"
+showLitChar '\\'           =  showString "\\\\"
+showLitChar c | c >= ' '   =  showChar c
+showLitChar '\a'           =  showString "\\a"
+showLitChar '\b'           =  showString "\\b"
+showLitChar '\f'           =  showString "\\f"
+showLitChar '\n'           =  showString "\\n"
+showLitChar '\r'           =  showString "\\r"
+showLitChar '\t'           =  showString "\\t"
+showLitChar '\v'           =  showString "\\v"
+showLitChar '\SO'          =  protectEsc (== 'H') (showString "\\SO")
+showLitChar c              =  showString ('\\' : (asciiTab!!ord c))
+
+protectEsc p f             = f . cont
+                             where cont s@(c:_) | p c = "\\&" ++ s
+                                   cont s             = s
hunk ./lib/jhc/jhc.yaml 14
-        - Data.Char
hunk ./src/Ho/Library.hs 227
+   ("exported-modules","exposed-modules"),