enforceRange (_, Just u_) (a::t)
    | a !<! u = a
    | otherwise = (2*u-a-1)
    where
    u = convertExactly u_ :: t
enforceRange (_, Just u_) (a::t)
    | a !<! u = a
    | otherwise = (2*u-a-1)
    where
    u = convertExactly u_ :: t
enforceRange (_, Just u_) (a::t)
    | a !<! u = a
    | otherwise = (2*u-a-1)
    where
    u = convertExactly u_ :: t