lesserRawKind :: RawKind -> RawKind -> Bool
lesserRawKind k1 k2 = case k1 of
    ClassKind _ -> case k2 of
        ClassKind _ -> True
        _ -> False
    FunKind v1 a1 r1 _ -> case k2 of
        FunKind v2 a2 r2 _ -> lesserVariance v1 v2
            && lesserRawKind r1 r2 && lesserRawKind a2 a1
        _ -> False
lesserRawKind :: RawKind -> RawKind -> Bool
lesserRawKind k1 k2 = case k1 of
    ClassKind _ -> case k2 of
        ClassKind _ -> True
        _ -> False
    FunKind v1 a1 r1 _ -> case k2 of
        FunKind v2 a2 r2 _ -> lesserVariance v1 v2
            && lesserRawKind r1 r2 && lesserRawKind a2 a1
        _ -> False
lesserRawKind k1 k2 = case k1 of
    ClassKind _ -> case k2 of
        ClassKind _ -> True
        _ -> False
    FunKind v1 a1 r1 _ -> case k2 of
        FunKind v2 a2 r2 _ -> lesserVariance v1 v2
            && lesserRawKind r1 r2 && lesserRawKind a2 a1
        _ -> False