title: Subtypes for natural language types
body: <p>I'm a linguist working on the formal syntax/semantics of Natural Languages. I've started
  using Haskell quite recently and very soon I realized that I needed to add subtyping. For example given the types Human 
  and Animal,
   I would like to have Human as a subtype of Animal. I found that this is possible using a coerce function where the instances are declared by the user, but I do not know how to define coerce in the instances I'm interested in. So basically I do not know what to add after 'coerce =' to make it work'. Here is the code up to that point:</p>
  
  <pre><code>{-# OPTIONS
  
   -XMultiParamTypeClasses
   -XFlexibleInstances
  -XFunctionalDependencies
  -XRankNTypes
  -XTypeSynonymInstances 
  -XTypeOperators
  #-}
  
  module Model where 
  
  import Data.List
  
  
  
  data Animal = A|B deriving (Eq,Show,Bounded,Enum)
  
  data Man = C|D|E|K deriving (Eq,Show,Bounded,Enum)
  
  class Subtype a b where
  coerce :: a-&gt;b
  
  instance Subtype Man Animal where
  coerce=
  
  
  
  
  animal:: [Animal]
  animal = [minBound..maxBound] 
  
  man:: [Man]
  man = [minBound..maxBound]
  </code></pre>
  
  <p>Thanks in advance</p>