From: Matthijs Kooijman Date: Fri, 30 Jan 2009 09:29:45 +0000 (+0100) Subject: Give Adders a mainIO to to interactive simulation. X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fmaster-project%2Fc%CE%BBash.git;a=commitdiff_plain;h=c13ec403850827c4679eb6979476a3876f96a397 Give Adders a mainIO to to interactive simulation. --- diff --git a/Adders.hs b/Adders.hs index f35021c..f32f5d4 100644 --- a/Adders.hs +++ b/Adders.hs @@ -1,8 +1,9 @@ module Adders where import Bits +import qualified Sim import Language.Haskell.Syntax -main = do show_add exp_adder; show_add rec_adder; +mainIO f = Sim.simulateIO (Sim.stateless f) () show_add f = do print ("Sum: " ++ (displaysigs s)); print ("Carry: " ++ (displaysig c)) where