Loperamide is an opioid derivative that is used to treat diarrhea.