title: Scala enumeration to int
body: <p>Is there a way to identify that a given object is an Enumeration value?</p>
  
  <p><code>x.isInstanceOf[Enumeration.$Value]</code> doesn't seem to work, and from what I understand of path-dependent types, shouldn't.</p>
  
  <p>I'd like to write a function that given any Enumeration value, returns its id. Alternatively, an implicit that converts the Enumeration to Int would also be great.</p>