Universal type tranformer in Haskell
问题 Logically, it's possible to define universal transformation function, that can transform from any type to any type. The possible way is: {-#LANGUAGE MultiParamTypeClasses #-} {-#LANGUAGE FlexibleInstances #-} class FromTo a b where fromTo:: a->b instance FromTo a a where fromTo = id instance FromTo Int Double where fromTo = fromIntegral instance FromTo Int Float where fromTo = fromIntegral instance FromTo Integer Double where fromTo = fromIntegral instance FromTo Integer Float where fromTo =