They might taste rather bitter but they won't do you any any harm.
The green colour in some potatoes is due to the presence of glycoalkaloids, which are mildly toxic. (If you eat a lot of them you might get a bit of indigestion or possibly feel a little drowsy but they won't kill you). Glycoalkaloids aren't present in green carrots.