desugarTmpName :: State DesugarTmp BS.ByteString
desugarTmpName = do
  DesugarTmp sugId <- get
  put (DesugarTmp (sugId + 1))
  return $ BSC.pack ("_desugar_" ++ show sugId)

-- | Some L1 constructs can be translated to an equivalent canonical L1 that
--   doesn't use certain features. This function is run to simplify the L1
--   input slightly to make the L1 -> L2 translation slightly easier to write.
--   It makes the following transformations:
--     => import x as y => namespace y where import x
--     => import from x ... | x == own URI => import ...
--     => ensemble {...} as x => namespace x where ensemble {...}
desugarTmpName :: State DesugarTmp BS.ByteString
desugarTmpName = do
  DesugarTmp sugId <- get
  put (DesugarTmp (sugId + 1))
  return $ BSC.pack ("_desugar_" ++ show sugId)

-- | Some L1 constructs can be translated to an equivalent canonical L1 that
--   doesn't use certain features. This function is run to simplify the L1
--   input slightly to make the L1 -> L2 translation slightly easier to write.
--   It makes the following transformations:
--     => import x as y => namespace y where import x
--     => import from x ... | x == own URI => import ...
--     => ensemble {...} as x => namespace x where ensemble {...}
desugarTmpName = do
  DesugarTmp sugId <- get
  put (DesugarTmp (sugId + 1))
  return $ BSC.pack ("_desugar_" ++ show sugId)

-- | Some L1 constructs can be translated to an equivalent canonical L1 that
--   doesn't use certain features. This function is run to simplify the L1
--   input slightly to make the L1 -> L2 translation slightly easier to write.
--   It makes the following transformations:
--     => import x as y => namespace y where import x
--     => import from x ... | x == own URI => import ...
--     => ensemble {...} as x => namespace x where ensemble {...}