checkForQualifiers r inscps
  = ck1 r inscps
 where
      ck1 r i
       | isInScopeAndUnqualified r i = r
       | length res == 0 = r
       | length res > 1 = error (r ++ " is qualified more than once. " ++ r ++ " must only be qualified once or not at all to proceed.")
       | otherwise      = if res /= [] then (modNameToStr (head res)) ++"."++ r else r
          where res = hsQualifier2 (nameToPNT r) i
checkForQualifiers r inscps
  = ck1 r inscps
 where
      ck1 r i
       | isInScopeAndUnqualified r i = r
       | length res == 0 = r
       | length res > 1 = error (r ++ " is qualified more than once. " ++ r ++ " must only be qualified once or not at all to proceed.")
       | otherwise      = if res /= [] then (modNameToStr (head res)) ++"."++ r else r
          where res = hsQualifier2 (nameToPNT r) i
checkForQualifiers r inscps
  = ck1 r inscps
 where
      ck1 r i
       | isInScopeAndUnqualified r i = r
       | length res == 0 = r
       | length res > 1 = error (r ++ " is qualified more than once. " ++ r ++ " must only be qualified once or not at all to proceed.")
       | otherwise      = if res /= [] then (modNameToStr (head res)) ++"."++ r else r
          where res = hsQualifier2 (nameToPNT r) i