Commit c085f39f authored by Mart Lubbers's avatar Mart Lubbers

updates

parent 2c920646
......@@ -7,7 +7,7 @@ DETECTED_OS=POSIX
endif
test: test.icl TTY.icl TTY.dcl Clean\ System\ Files/ctty.o
clm -dynamics -I $(DETECTED_OS) -I $(CLEAN_HOME)/lib/Dynamics $(basename $<) -o $@
clm -dynamics -I $(DETECTED_OS) -I $(CLEAN_HOME)/lib/Platform -I $(CLEAN_HOME)/lib/Dynamics $(basename $<) -o $@
Clean\ System\ Files/ctty.o: $(DETECTED_OS)/tty.c
mkdir -p Clean\ System\ Files
......
definition module Platform
getDevices :: !*World -> !*([String], !*World)
getDevices :: !*World -> *([String], !*World)
......@@ -4,7 +4,7 @@ import Data.Error
import StdMisc, StdOverloaded, StdString
import System.Directory
getDevices :: !*World -> !*([String], !*World)
getDevices :: !*World -> *([String], !*World)
getDevices w = case readDirectory "/dev" w of
(Error (errcode, errmsg), w) = abort errmsg
(Ok entries, w) = (entries, w)
......@@ -5,6 +5,4 @@ import iTasks
derive class iTask TTYSettings
enterTTYSettings :: Task TTYSettings
syncSerialChannel :: TTYSettings (b -> String) (String -> (Either String [a], String)) (Shared ([a],[b],Bool)) -> Task () | iTask a & iTask b
......@@ -30,22 +30,6 @@ import iTasks.Internal.TaskEval
derive class iTask TTYSettings, Parity, BaudRate, ByteSize
enterTTYSettings :: Task TTYSettings
enterTTYSettings = accWorld getTTYDevices
>>= \ds->(
enterChoice "Device" [] ds
-&&- updateInformation "Baudrate" [] B9600
<<@ ArrangeHorizontal)
-&&- (
updateInformation "Bytesize" [] BytesizeEight
-&&- updateInformation "Parity" [] ParityNone
<<@ ArrangeHorizontal)
-&&- (
updateInformation "Stop2bits" [] False
-&&- updateInformation "Xonoff" [] False
<<@ ArrangeHorizontal)
@ \((dev, br), ((bs, pr), (st, xo)))->makeTTYSettings dev br bs pr st xo
getTTYResource :: String *IWorld -> (Maybe *(*TTY, Int), *IWorld)
getTTYResource dp iw=:{resources}
# (mt, resources) = getTTYResource` resources
......@@ -128,7 +112,9 @@ serialDeviceBackgroundTask dp enc dec accShare rw iworld
(Left err, newacc) = (Error (exception "Error while parsing"), iworld)
(Right msgs, newacc)
# (merr, iworld) = if (msgs =: [])
(Ok (), iworld)
if (s =: [])
(Ok (), iworld)
(write (r, [], False) rw iworld)
(write (r++msgs, [], False) rw iworld)
| isError merr = (liftError merr, iworld)
= write newacc accShare iworld
......
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