-> TCEnv r
--------------------------------------------------------------------------------
tcEnvAddBounds = flip $ foldr go
  where
    go (BTV α _ (Just t)) γ = γ { tce_bounds = envAdd α t $ tce_bounds γ }
    go (BTV _ _ _       ) γ = γ


tcEnvAddBounds :: [BTVar r] -> TCEnv r -> TCEnv r
tcEnvAddBounds = flip $ foldr go
  where
    go (BTV α _ (Just t)) γ = γ { tce_bounds = envAdd α t $ tce_bounds γ }
    go (BTV _ _ _       ) γ = γ
tcEnvAddBounds = flip $ foldr go
  where
    go (BTV α _ (Just t)) γ = γ { tce_bounds = envAdd α t $ tce_bounds γ }
    go (BTV _ _ _       ) γ = γ