Commit d3c7c669 authored by Michael Hanus 's avatar Michael Hanus

deriving Read added to Time datatypes, fix 'callFrontend' for calls with "complex" module paths

parent aa8db753
......@@ -38,7 +38,7 @@ import FileGoodies (lookupFileInPath, getFileInPath, fileSuffix, stripSuffix)
import FilePath ( FilePath, (</>), (<.>), addTrailingPathSeparator
, dropFileName, joinPath, normalise, splitDirectories
, splitExtension, splitFileName, splitSearchPath
, takeFileName
, takeDirectory, takeFileName
)
import IO
import PropertyFile
......@@ -458,7 +458,9 @@ callFrontendWithParams target params modpath = do
else ioError (userError "Illegal source program")
where
callParseCurry = do
path <- maybe (getLoadPathForModule modpath) return (fullPath params)
path <- maybe (getLoadPathForModule modpath)
(\p -> return (nub (takeDirectory modpath : p)))
(fullPath params)
return (quote (installDir </> "bin" </> curryCompiler ++ "-frontend")
++ concatMap ((" -i" ++) . quote) path)
......
......@@ -2,7 +2,7 @@
--- Library for handling date and time information.
---
--- @author Michael Hanus
--- @version April 2007
--- @version January 2018
--- @category general
------------------------------------------------------------------------------
......@@ -17,14 +17,14 @@ module Time(ClockTime,
--- ClockTime represents a clock time in some internal representation.
data ClockTime = CTime Int
deriving (Eq, Ord, Show)
deriving (Eq, Ord, Show, Read)
--- A calendar time is presented in the following form:
--- (CalendarTime year month day hour minute second timezone)
--- where timezone is an integer representing the timezone as a difference
--- to UTC time in seconds.
data CalendarTime = CalendarTime Int Int Int Int Int Int Int
deriving (Eq, Ord, Show)
deriving (Eq, Ord, Show, Read)
--- The year of a calendar time.
ctYear :: CalendarTime -> Int
......
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