Make tyConSingleDataCon_maybe more forgiving
authorsimonpj@microsoft.com <unknown>
Thu, 8 Oct 2009 16:23:29 +0000 (16:23 +0000)
committersimonpj@microsoft.com <unknown>
Thu, 8 Oct 2009 16:23:29 +0000 (16:23 +0000)
commit524c609b6d8d220b03640dc71a209530bf2ed280
tree4abc6845492de9622cf7e4334e57356079d28be5
parent754e039a8a15d5774fe73872ff9ac593b46370e0
Make tyConSingleDataCon_maybe more forgiving

This function was barfing on a type family tycon; which in turn
crashed the compiler (when -ticky is in use) because of the use in
CmmTicky.hs.  There's no need for it to reject such tycons, so I just
made it return Nothing rather than falling over.
compiler/types/TyCon.lhs