ApplicativeDo, 104 bytes
import Control.Applicative
z=ZipList
instance Monad ZipList where _>>=_=z[]
main=print$do a<-z[1];pure a
With ApplicativeDo
, this prints
ZipList {getZipList = [1]}
Without it, it prints
ZipList {getZipList = []}
ZipList
is one of the few types in the base libraries with an instance for Applicative
but not for Monad
.
There may be shorter alternatives lurking somewhere.