full scratch state.hs