Commit 453c2aa8 authored by Michael Hanus 's avatar Michael Hanus

Imports updated

parent 9579abe5
......@@ -9,6 +9,7 @@
"abstract-curry": ">= 2.0.0",
"base" : ">= 1.0.0, < 2.0.0",
"currypath" : ">= 0.0.1",
"searchtree" : ">= 0.0.1",
"wl-pprint" : ">= 0.0.1"
},
"compilerCompatibility": {
......
......@@ -13,8 +13,6 @@
module AddTypes ( main, addTypeSignatures )
where
import AllSolutions
import CurryStringClassifier
import FileGoodies
import List
import System ( exitWith, system, getArgs )
......@@ -22,9 +20,12 @@ import System ( exitWith, system, getArgs )
import AbstractCurry.Types
import AbstractCurry.Files
import AbstractCurry.Pretty
import Control.AllSolutions ( getOneValue )
import System.CurryPath ( stripCurrySuffix )
import Text.Pretty
import CurryStringClassifier
-- The tool is rather simple, it uses Curry's facilities for
-- meta-programming to read the program in the form defined
-- in the AbstractCurry module.
......@@ -78,9 +79,9 @@ addTypeSignatures progname = do
typedProg <- readCurry progname
untypedProg <- readUntypedCurry progname
progLines <- readFile (progname++".curry")
mbprog <- getOneSolution -- enforce reading of all files before returning
(\p -> p =:= unscan (addTypes (scan progLines)
(getTypes typedProg untypedProg)))
mbprog <- getOneValue -- enforce reading of all files before returning
(unscan (addTypes (scan progLines)
(getTypes typedProg untypedProg)))
system $ "rm -f "++progname++".acy "++progname++".uacy"
maybe (error "AddTypes: can't add type signatures") return mbprog
......
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