Commit 9c11b925 authored by Michael Hanus's avatar Michael Hanus
Browse files

Bug fix for currpp w.r.t. DET annotation translation

parent 44af7fc6
......@@ -7,7 +7,7 @@
--- is supported (option `foreigncode`, see module `Translator`).
---
--- @author Michael Hanus
--- @version June 2016
--- @version September 2016
------------------------------------------------------------------------------
import AbstractCurry.Types
......@@ -229,14 +229,15 @@ callPreprocessors opts optlines modname srcprog orgfile
-- untyped Curry but Contracts requires typed Curry:
mbdefprog <- readUntypedCurry modname >>=
transDefaultRules verb defopts srcprog
let newsrcprog = maybe srcprog showCProg mbdefprog
if Contracts `elem` pptargets
then do
maybe done
(\defprog -> writeFile orgfile (optlines ++ showCProg defprog))
mbdefprog
readCurry modname >>= transContracts verb contopts srcprog
>>= return . maybe srcprog showCProg
else return (maybe srcprog showCProg mbdefprog)
>>= return . maybe newsrcprog showCProg
else return newsrcprog
| Contracts `elem` pptargets
= readCurry modname >>= transContracts verb contopts srcprog
>>= return . maybe srcprog showCProg
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment