The final view to the typed sprintf and sscanf
This code defines a simple domain-specific language of string patterns and demonstrates two interpreters of the language: for building strings (sprintf) and parsing strings (sscanf). This code thus solves the problem of typed printf/scanf sharing the same format string posed by Chung-chieh Shan. This code presents scanf/printf interpreters in the final style; it is thus the dual of the code in PrintScan.hs
Version: The current version is 1.1, Sep 2, 2008.
- The complete Haskell98 code with many examples. http://okmij.org/ftp/typed-formatting/PrintScanF.hs
- The final view on typed sprintf and sscanf http://okmij.org/ftp/typed-formatting/PrintScanF.txt
- The message posted on the Haskell mailing list on Tue, 2 Sep 2008 00:57:18 -0700 (PDT)