Commit 9a41db92 authored by Michael Hanus 's avatar Michael Hanus

Some code refactoring

parent 75cd93cf
......@@ -32,7 +32,7 @@ module Distribution (
import List (nub, split)
import Char (toLower)
import Directory (doesFileExist)
import Directory (doesFileExist, getHomeDirectory)
import FileGoodies (lookupFileInPath, getFileInPath, fileSuffix, stripSuffix)
import FilePath ( FilePath, (</>), (<.>), addTrailingPathSeparator
, dropFileName, joinPath, normalise, splitDirectories
......@@ -90,7 +90,7 @@ installDir external
--- current distribution. This file must have the usual format of
--- property files (see description in module PropertyFile).
rcFileName :: IO String
rcFileName = getEnviron "HOME" >>= return . (</> rcFile)
rcFileName = getHomeDirectory >>= return . (</> rcFile)
where rcFile = '.' : curryCompiler ++ "rc"
--- Returns the current configuration parameters of the distribution.
......
......@@ -16,7 +16,7 @@
--- is a shell script stored in *pakcshome*/bin).
---
--- @author Michael Hanus (with extensions by Bernd Brassel and Marco Comini)
--- @version November 2014
--- @version October 2016
--- @category web
------------------------------------------------------------------------------
......@@ -52,19 +52,20 @@ module HTML(HtmlExp(..),HtmlPage(..),PageParam(..),
germanLatexDoc,htmlSpecialChars2tex,
addSound,addCookies) where
import System
import Char
import List
import Time
import Directory (getHomeDirectory)
import Distribution (installDir)
import HtmlCgi
import NamedSocket
import ReadNumeric(readNat,readHex)
import ReadShowTerm(showQTerm,readsQTerm)
--import Unsafe(showAnyQExpression) -- to show status of cgi server
import Distribution(installDir)
import IO
import NamedSocket
import List
import Profile
import Random(getRandomSeed,nextInt)
import Random (getRandomSeed, nextInt)
import ReadNumeric (readNat, readHex)
import ReadShowTerm (showQTerm, readsQTerm)
import System
import Time
--import Unsafe(showAnyQExpression) -- to show status of cgi server
infixl 0 `addAttr`
infixl 0 `addAttrs`
......@@ -1830,7 +1831,7 @@ intFormMain :: String -> String -> String -> String ->
intFormMain baseurl basecgi reldir cginame forever urlparam hformact = do
pid <- getPID
user <- getEnviron "USER"
home <- getEnviron "HOME"
home <- getHomeDirectory
let portname = "intcgi_" ++ show pid
socket <- listenOn portname
let cgiprogname = if null cginame then "cgitest_"++show pid++".cgi"
......
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