extractUnquotes n (PUnquote tm)
  | n == 0 = do n <- getNameFrom (sMN 0 "unquotation")
                return (PRef (fileFC "(unquote)") [] n, [(n, tm)])
  | otherwise = fmap (\(tm', ex) -> (PUnquote tm', ex)) $
                extractUnquotes (n-1) tm
extractUnquotes n (PUnquote tm)
  | n == 0 = do n <- getNameFrom (sMN 0 "unquotation")
                return (PRef (fileFC "(unquote)") [] n, [(n, tm)])
  | otherwise = fmap (\(tm', ex) -> (PUnquote tm', ex)) $
                extractUnquotes (n-1) tm
extractUnquotes n (PUnquote tm)
  | n == 0 = do n <- getNameFrom (sMN 0 "unquotation")
                return (PRef (fileFC "(unquote)") [] n, [(n, tm)])
  | otherwise = fmap (\(tm', ex) -> (PUnquote tm', ex)) $
                extractUnquotes (n-1) tm