rav = do
  char '('
  scan 1 (\s a -> let news = if a == '('
                             then s+1
                             else (if a == ')'
                                   then s-1
                                   else s) in
                  if news == 0 then Nothing else Just news)
  char ')'
rav = do
  char '('
  scan 1 (\s a -> let news = if a == '('
                             then s+1
                             else (if a == ')'
                                   then s-1
                                   else s) in
                  if news == 0 then Nothing else Just news)
  char ')'
rav = do
  char '('
  scan 1 (\s a -> let news = if a == '('
                             then s+1
                             else (if a == ')'
                                   then s-1
                                   else s) in
                  if news == 0 then Nothing else Just news)
  char ')'