Curse you SML! type gradient = real. Stop saying that they're not the same. #smlproblems