tuplecomp :: (Eq a, Show a) => (a, a) -> a -> a
tuplecomp t n
    | n == fst t    = snd t
    | n == snd t    = fst t
    | otherwise     = -- error "tuple does not contain thing"
        error ("<" ++ show t ++ "> does not contain <" ++ show n ++ ">")
tuplecomp :: (Eq a, Show a) => (a, a) -> a -> a
tuplecomp t n
    | n == fst t    = snd t
    | n == snd t    = fst t
    | otherwise     = -- error "tuple does not contain thing"
        error ("<" ++ show t ++ "> does not contain <" ++ show n ++ ">")
tuplecomp t n
    | n == fst t    = snd t
    | n == snd t    = fst t
    | otherwise     = -- error "tuple does not contain thing"
        error ("<" ++ show t ++ "> does not contain <" ++ show n ++ ">")