---------------------------------------------------------------------------------------------------------

argsMatching :: [Type] -> [Type] -> Bool
argsMatching x y
    | length x /= length y = False
    | (null x) && (null y) = True
    | casting == False = False
    | otherwise = argsMatching (tail x) (tail y)
    where
        xHead = head x
        yHead = head y
        casting = case (isPrimitive xHead, isPrimitive yHead) of
                    (True, False) -> (boxingType xHead) == yHead
                    (False, True) -> (boxingType yHead) == xHead
                    _ -> xHead == yHead

---------------------------------------------------------------------------------------------------------
argsMatching :: [Type] -> [Type] -> Bool
argsMatching x y
    | length x /= length y = False
    | (null x) && (null y) = True
    | casting == False = False
    | otherwise = argsMatching (tail x) (tail y)
    where
        xHead = head x
        yHead = head y
        casting = case (isPrimitive xHead, isPrimitive yHead) of
                    (True, False) -> (boxingType xHead) == yHead
                    (False, True) -> (boxingType yHead) == xHead
                    _ -> xHead == yHead

---------------------------------------------------------------------------------------------------------
argsMatching x y
    | length x /= length y = False
    | (null x) && (null y) = True
    | casting == False = False
    | otherwise = argsMatching (tail x) (tail y)
    where
        xHead = head x
        yHead = head y
        casting = case (isPrimitive xHead, isPrimitive yHead) of
                    (True, False) -> (boxingType xHead) == yHead
                    (False, True) -> (boxingType yHead) == xHead
                    _ -> xHead == yHead

---------------------------------------------------------------------------------------------------------