Grind together turmeric, green chillies and part of the onion. Mix well on the stone with finely grated coconut. Cook greengram with just enough water till done. When cooked and very little moisture is left, add coconut mixture, curry leaves and salt. Cover and cook in a slow fire for a few minutes(it should be completely dry). Stir well. Remove from fire. Heat oil. Add finely chopped onion, when they turn brown add gram. Stir well for a few minutes. Remove from fire and serve hot.