[Haskell-cafe] NewLines in string

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Sat Oct 4 12:15:47 EDT 2008


On 2008 Oct 4, at 10:57, Serge D. Mechveliani wrote:
> Here is a certain naive question about string setting in a Haskell
> program.
> I have the functions
>       parseProgram :: String -> Program
>       apply        :: Program -> Term -> Term    -- interpreter,
>
> and try to build the example modules for them as in the following
> example:


There are no simple or especially pretty ways to do it, but here's  
something using Template Haskell to implement something akin to Unix  
"here documents":

http://www.haskell.org/pipermail/haskell-cafe/2007-June/027395.html

-- 
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH




More information about the Haskell-Cafe mailing list