From: Matthijs Kooijman Date: Wed, 11 Feb 2009 16:24:18 +0000 (+0100) Subject: Give stateless a type signature. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=994e86628e807bd8f9f07482ec46b44446d17aa9;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git Give stateless a type signature. This ensures that any function that stateless is inlined into doesn't become polymorph. --- diff --git a/Adders.hs b/Adders.hs index 10590fa..ce26166 100644 --- a/Adders.hs +++ b/Adders.hs @@ -7,6 +7,7 @@ mainIO f = Sim.simulateIO (Sim.stateless f) () -- This function is from Sim.hs, but we redefine it here so it can get inlined -- by default. +stateless :: (i -> o) -> (i -> () -> ((), o)) stateless f = \i s -> (s, f i) show_add f = do print ("Sum: " ++ (displaysigs s)); print ("Carry: " ++ (displaysig c))