Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
haskell hardware interaction pseudocode
main = do dataFromHW <- readSerialPort
dataFromUser <- readUIInput
(answerForDevice, answerForUser) <- goodProcessingFunction dataFromHW dataFromUser
writeSerialPort deviceAnswer
writeUIOutput answerForUser
case processResult answerForUser of
EOF -> return 0
Error i -> return i
Continue -> main
@automatron9000

This comment has been minimized.

Copy link

commented Dec 16, 2012

writeSerialPort deviceAnswer -> writeSerialPort answerForDevice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.