The interact function should be very helpful in solving your problem. Since the UNIX convention is that processes should interact using text (rather than numbers, such as temperature), this means that the interact function wraps functions that take String and return String s. This means that you have to wrap your fahrenheit / celsius functions in new functions that take and return strings instead of numbers.
As an example, to get you started, this program is at the top of all the lines that are assigned to it:
module Main (main) where import Data.Char (toUpper) main :: IO () main = interact upperCase upperCase :: String -> String upperCase = map toUpper
You can compile it with:
ghc uppercase.hs
... and then you can use it (on Linux) by doing the following:
echo "bla" | ./uppercase # Result: "BLA"
source share