An elegant blog post demonstrating conversion to A-Normal Form (important in SSA in compilers) using Liquid Haskell: https://goto.ucsd.edu/~rjhala/liquid/haskell/blog/blog/2016/09/05/normal-forms.lhs/