A Generic Implementation of Truncations in Haskell (submitted to FOSSACS 2015)