Commit f6c58bb3 authored by Fredrik Wieczerkowski's avatar Fredrik Wieczerkowski

Update remaining modules for version 3

parent de7f1664
......@@ -15,6 +15,7 @@
module SQLConverter(parseSQL, readParserInfo, ParserInfo) where
import Control.Monad (when)
import System.IO (openFile, IOMode(..), hGetContents)
import ReadShowTerm (readsQTerm)
......
......@@ -7,6 +7,7 @@ module SQLScanner(scan) where
import Data.Char (isDigit, isAlpha, isAlphaNum, toLower)
import Data.List (splitOn)
import Data.Time (CalendarTime (..))
import ReadShowTerm (readsQTerm)
import qualified Data.Map as Map
......
......@@ -70,9 +70,9 @@ parsers = maybe iden pars
"format" -> FormatParser.parse "" p
"printf" -> FormatParser.parse "putStr" p
"regex" -> RegexParser.parse p
"html" -> liftIO (mapWarnsPM (addRealFname (getFilename p))) .
"html" -> fmap (mapWarnsPM (addRealFname (getFilename p))) .
MLTranslate.translate l p
"xml" -> liftIO (mapWarnsPM (addRealFname (getFilename p))) .
"xml" -> fmap (mapWarnsPM (addRealFname (getFilename p))) .
MLTranslate.translate l p
_ -> (\_ -> return $ throwPM p ("Bad langtag: " ++ l))
......@@ -242,7 +242,7 @@ applyLangParsers :: Either String ParserInfo
-> IO (PM [StandardToken])
applyLangParsers model iotks = do
prtks <- iotks
prpr <- swapIOPM (liftPM (mapIO (applyLangParser model)) prtks)
prpr <- swapIOPM (liftPM (mapM (applyLangParser model)) prtks)
return (crumplePM (liftPM (\prpt -> sequencePM prpt) prpr))
--- Select the right translator and apply it to a single StandardToken
......
......@@ -10,17 +10,20 @@
--- @version October 2019
------------------------------------------------------------------------------
import Control.Monad ( when )
import Data.Char ( isDigit, digitToInt, isSpace )
import Data.List
import System.Directory ( copyFile, renameFile )
import System.FilePath
import System
import AbstractCurry.Types
import AbstractCurry.Files
import AbstractCurry.Pretty ( showCProg )
import AbstractCurry.Select ( progName )
import System.CurryPath ( stripCurrySuffix )
import System.CPUTime ( getCPUTime )
import System.Environment ( getEnv, getArgs )
import System.Process ( exitWith )
import CPP.DefaultRules ( translateDefaultRulesAndDetOps )
import CPP.Contracts ( translateContracts )
......
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