I have to create a binary search tree, a data type named Person, and basically insert each person in the tree. The thing is that the insertion method has a priority type, which is defined in the following peace of code:

```
class Priorities a where  

     priority :: a -> Int  

instance Priorities a where  

     priority :: a -> Int  

```

Each node of the tree is a list, and the insertion is done regarding the priority number from the Priorities class, that each person was given (In my code this function is called insertTree). 

Here's what I've managed to do so far:

```
data Tree => Tree a = EmptyTree  
            | Node a (Tree [a]) (Tree [a]) deriving (Show, Read, Eq)  

data Person = Person { name :: a
                 , age :: a
                 , handicapped :: a
                 } deriving (Eq)  

```

Here's where I need help, because I don't know how I can do this insert. I mean, I start OK, but then I get confused when I reach the part where I need to use the priority value in to order to know in which node (which is a list), I'm going to insert the data.

```
insertTree :: (Ord a) => Priorities priority -> Tree a -> a -> Tree a  
insertTree x EmptyTree x = Node x EmptyTree EmptyTree  
insertTree x (Node a left right) y  
            |x ==  = Node y left right  
            |x    

```

The other thing I'd like to ask you, is how can I make the data type People an instance of the Priorities class.