trez/LazyNES — pull request #5 by jsmnsr (2013-11-06 01:34:50+00:00)
Title: added Num a to type signature in order to fix ambiguity error given by compiler

When running Makefile the compiler complains about the type signature for boolBit. See below

ghc -O2 --make Main.hs -o Main
[1 of 6] Compiling CPU.Types ( CPU/Types.hs, CPU/Types.o )
[2 of 6] Compiling Helpers ( Helpers.hs, Helpers.o )

Helpers.hs:34:17:
Could not deduce (Num a) arising from the literal `1'
from the context (Bits a)
bound by the type signature for boolBit :: Bits a => Bool -> a
at Helpers.hs:33:12-30
Possible fix:
add (Num a) to the context of
the type signature for boolBit :: Bits a => Bool -> a
In the expression: 1
In an equation for `boolBit': boolBit True = 1
make: *** [all] Error 1

I took the advice of the compiler and added Num a.