diff options
| author | aarne <aarne@chalmers.se> | 2011-03-05 22:25:03 +0000 |
|---|---|---|
| committer | aarne <aarne@chalmers.se> | 2011-03-05 22:25:03 +0000 |
| commit | f32307b39db77a937aa87b0cd455acc639665cd6 (patch) | |
| tree | 17c89ce800d2b8db4991766aaf14457679e24178 /examples/gadt-transfer/README | |
| parent | d9b5d3ed4d44705a4ea4be6fee2805c59ff0273e (diff) | |
added composOp generation to haskell-gadt, and an example in examples/gadt-transfer
Diffstat (limited to 'examples/gadt-transfer/README')
| -rw-r--r-- | examples/gadt-transfer/README | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/examples/gadt-transfer/README b/examples/gadt-transfer/README new file mode 100644 index 000000000..10ff7543e --- /dev/null +++ b/examples/gadt-transfer/README @@ -0,0 +1,35 @@ +AR 5/3/2011 + +Example on using GADT and composOp in transfer. + +To compile: + + make + +To test: + + echo "this expensive boring wine is warm" | ./VeryFoods + this expensive very boring wine is warm + + echo "deze dure wijn is saai" | ./VeryFoods + deze dure wijn is erg saai + +Functionality: wraps every occurrence of "boring" with "very". + +This is implemented with a function that needs only two cases: one for "Boring" and another +for the rest of trees. On the method, see + + B. Bringert and A. Ranta. + A Pattern for Almost Compositional Functions. + Journal of Functional Programming, 18(5-6), pp. 567-598, 2008. + http://www.cse.chalmers.se/alumni/bringert/publ/composOp-jfp/composOp-jfp.pdf + +Source code: + + VeryFoods.hs -- main Haskell module, hand-written + Makefile + Foods.gf, FoodsEng.gf, FoodsDut.gf -- from GF/contrib/summerschool/foods/ + +Foods.hs and Foods.pgf are generated by 'make'. + + |
