Why is this a partial function instead of a normal function?  Based on the way you are lifting and getting below you are going to get an exception if there is ever a case that isn't handled.

It is also not very clear what is being compared to what or what the arguments are.