I think you might have a bug --
return :: a -> State a
get :: State Int
set :: Int -> State Int -- should be Int -> State () surely?