fix continuation application, move some types to types.hs