Grind together coconut, green chilli, garlic, turmeric powder, pepper corns and cumin with 1/4 cup water to a smooth paste.
Dry roast moong dal in pressure cooker for 4-5 mins on low flame or till the roasted smell comes (refer notes). Rinse the roasted moong dal under runing water a couple of times. Add it back to the pressure cooker. Add 1/2 - 3/4 cup water to it and bring it to boil. Reduce flame to lowest and cook for 3-4 mins.
Add diced ash gourd, ground coconut, salt and 1/2 cup water to the moong dal. Close the cooker and cook for 4-5 whistles on full flame. Switch off the gas and let the pressure drop naturally. Open the cooker and mix everything well. Do a taste test and add more salt if required.
Heat coconut oil in a small deep pan. Crackle the mustard seeds and add sliced pearl onions and curry leaves. Once the onions begins to brown, add dry red chilli. Fry for a min and add to the curry.
Notes
This curry has a semi gravy consistency. The curry tends to thicken a bit as it rests, so adjust the qty of water accordingly.Make sure you keep a close watch during this step, otherwise it may burn.