StdInterface.hs revision 56c56b2181e76c239929ddade2925ba5c3f3fffd
ca5e921bbca4a90ad9adf7350bedcb7deb059e86Christian MaederModule : $Header$
e9458b1a7a19a63aa4c179f9ab20f4d50681c168Jens ElknerDescription : The definition of standard input\/output interface
de6a40dbdd4712e5a9398b8519a59b1eaeab2f5aChristian MaederCopyright : uni-bremen and DFKI
64f00fb69046070dc033eb034cdd9afd22809a63Christian MaederLicence : similar to LGPL, see HetCATS/LICENSE.txt or LIZENZ.txt
98890889ffb2e8f6f722b00e265a211f13b5a861Corneliu-Claudiu ProdescuMaintainer : r.pascanu@jacobs-university.de
ca5e921bbca4a90ad9adf7350bedcb7deb059e86Christian MaederStability : provisional
3f69b6948966979163bdfe8331c38833d5d90ecdChristian MaederPortability : portable
ca5e921bbca4a90ad9adf7350bedcb7deb059e86Christian MaederPGIP.StdInterface describes the interface specific function
ca5e921bbca4a90ad9adf7350bedcb7deb059e86Christian Maederfor standard input and file input
ca5e921bbca4a90ad9adf7350bedcb7deb059e86Christian Maeder ( stdShellDescription
ca5e921bbca4a90ad9adf7350bedcb7deb059e86Christian Maeder , basicOutput
ca5e921bbca4a90ad9adf7350bedcb7deb059e86Christian Maeder , recursiveApplyUse
ca5e921bbca4a90ad9adf7350bedcb7deb059e86Christian MaederstdShellDescription :: ShellDescription CMDL_State
4ef2a978e66e2246ff0b7f00c77deb7aabb28b8eChristian MaederstdShellDescription =
ca5e921bbca4a90ad9adf7350bedcb7deb059e86Christian Maeder let wbc = "\n\r\v\\" in
ca5e921bbca4a90ad9adf7350bedcb7deb059e86Christian Maeder initialShellDescription
ca5e921bbca4a90ad9adf7350bedcb7deb059e86Christian Maeder { shellCommands = shellacCommands
616b72452ce5a75ade1a11ccc2c9671b3444558eChristian Maeder , commandStyle = OnlyCommands
616b72452ce5a75ade1a11ccc2c9671b3444558eChristian Maeder , evaluateFunc = shellacEvalFunc
ca5e921bbca4a90ad9adf7350bedcb7deb059e86Christian Maeder , wordBreakChars = wbc
ca5e921bbca4a90ad9adf7350bedcb7deb059e86Christian Maeder , prompt = \x -> return (prompter x)
ca5e921bbca4a90ad9adf7350bedcb7deb059e86Christian Maeder , historyFile = Just ("consoleHistory.tmp")
ca5e921bbca4a90ad9adf7350bedcb7deb059e86Christian MaederbasicOutput :: BackendOutput -> IO ()
ca5e921bbca4a90ad9adf7350bedcb7deb059e86Christian MaederbasicOutput (RegularOutput out) = hPutStr stdout out
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von SchroederbasicOutput (InfoOutput out) = hPutStr stdout out
ca5e921bbca4a90ad9adf7350bedcb7deb059e86Christian MaederbasicOutput (ErrorOutput out) = hPutStr stderr out
bba825b39570777866d560bfde3807731131097eKlaus Luettich-- | Applies cUse to a list of input files
740670de3c457d7571ef6f3fe9b60c2e25fb9902Christian MaederrecursiveApplyUse::[String] -> CMDL_State -> IO CMDL_State
740670de3c457d7571ef6f3fe9b60c2e25fb9902Christian MaederrecursiveApplyUse ls state
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder [] -> return state
aa074a906c39b63c7177040378c0073dbac4e3baChristian Maeder nwState <- cUse l state