[Haskell-beginners] I wrote a state monad example - help me make it more Haskellic
Rohit Garg
rpg.314 at gmail.com
Sat Jul 23 18:36:14 CEST 2011
On Sat, Jul 23, 2011 at 9:50 PM, David Place <d at vidplace.com> wrote:
> On Jul 23, 2011, at 11:56 AM, Rohit Garg wrote:
>
>> Also, I'd like to make the RegisterVal type Word32, but when I do that, then
>> ================
>> initial_rf = [0,0,0,0]
>> ================
>> this line fails to typecheck.
>
> I changed the RegisterVal type to Word32. It works for me using GHCi version 7.0.2. Your code looks great!
Ah!, I was changing the type of RegisterID as well and then it was
complaining. For RegisterVal only, it works fine, thanks.
--
Rohit Garg
http://rpg-314.blogspot.com/
More information about the Beginners
mailing list