title: Typeclass instances for another typeclass in haskell
body: <p>Is there a more concise way to write the following haskell code:</p>
  
  <pre><code>{-# LANGUAGE FlexibleInstances #-}
  
  class Greetable g where
    hi :: g -&gt; String
  
  -- Here i should list all instances of Num
  instance Greetable Float where
    hi s = "Hi number! " ++ show s
  instance Greetable Int where
    hi s = "Hi number! " ++ show s
  instance Greetable Double where
    hi s = "Hi number! " ++ show s
  -- Etc.
  
  
  -- Here is other stuff
  instance Greetable String where
    hi s = "Hi string! " ++ s
  </code></pre>
  
  <p>EDIT: I would like the <code>hi</code> function to be able to account for any future instances of the class <code>Num</code>.</p>