packages feed

transf-0.8: transf.cabal

name:               transf
version:            0.8
cabal-version:      >= 1.6
author:             Hans Hoglund
maintainer:         Hans Hoglund <hans@hanshoglund.se>
license:            BSD3
license-file:       COPYING
synopsis:           Text transformer and interpreter.
category:           Text, Compilers/Interpreters
tested-with:        GHC
build-type:         Simple

description: 
    Transf is functional text transformer and interpreter. 
    .
    It scans its input for guard tokens and passes everything between to transformation functions. Transformation functions are composed from a small set of combinators and may perform arbirary Haskell computation. Transf contains a full Haskell interpeter and can even interpret its input as Haskell. 
    .
    The main purpose of Transf is to allow the embedding of Domain-Specific Languages in plain text or Markdown files. For example one could use it with Diagrams as follows:
    .
    > This is my file. Here is an image:
    > 
    > ~~~diagram "A circle!"
    > circle <> stretchX 2 square
    > ~~~
    .
    Transf can then generate the image, and replace the source in the text file with the name of the actual image. It can also include the source.
    .
    > This is my file. Here is an image:
    > 
    > ![A circle](a22b15efb10b.png)
    >
    .
    You can supply your own file names. In the above example, the file name is a hash of the source code.
    

source-repository head
  type:             git
  location:         git://github.com/hanshoglund/transf.git
  
library                    
    build-depends: 
        base >= 4 && < 5,
        semigroups,
        containers,
        mtl,
        monadplus,
        filepath,
        process,      
        hashable,
        hint,
        music-preludes
    hs-source-dirs: src
    exposed-modules:
        Text.Transf

executable "transf"
    ghc-options: -O3 -threaded
    hs-source-dirs: src
    main-is: Main.hs