shithub: MicroHs

ref: 7d2f32a9e5e2b27faa217fd3d9d2d2092f052861
dir: /tests/Serdes.hs/

View raw version
module Serdes(main) where
import Prelude
import System.IO as IO
import System.Environment
import Debug.Trace

f :: Int -> Int
f x = x*2+1

main :: IO ()
main = do
  cprint ((+) :: Int->Int->Int)
  writeSerialized "f.tmp" f
  g <- readSerialized "f.tmp"
  putStrLn $ show $ (g (5::Int) :: Int)