 Subjects participating in this protocol will participate in three phases: 1 pre-admission, 2 inpatient admission, and 3 follow-up. Pre-admission involves screening detailed in inclusionexclusion criteria section and one week of outpatient sleep and activity monitoring. Inpatient admission is 16 consecutive nights on the Clinical Neuroscience Research Unit and involves subjective and objective tests of sleep, sleepiness, attention, and learning. During inpatient admission subjects will take modafinil or placebo. For follow-up, subjects will return to the CNRU for one night and again participate in objective tests of sleep, sleepiness, attention, and learning. We hypothesize that modafinil will decrease subject and objective measures of sleepiness and will promote attention and learning in cocaine dependent persons. 