, (ordClassKey, [intTyCon_RDR, compose_RDR, eqTag_RDR])
-- EQ (from Ordering) is needed to force in the constructors
-- as well as the type constructor.
- , (enumClassKey, [intTyCon_RDR, map_RDR, plus_RDR, showsPrec_RDR, append_RDR])
+ , (enumClassKey, [intTyCon_RDR, and_RDR, map_RDR, plus_RDR, showsPrec_RDR, append_RDR])
-- The last two Enum deps are only used to produce better
-- error msgs for derived toEnum methods.
, (boundedClassKey, [intTyCon_RDR])
to_enum
= mk_easy_FunMonoBind tycon_loc toEnum_RDR [a_Pat] [] $
- HsIf (HsApp (HsApp (HsVar gt_RDR)
- (HsVar a_RDR))
- (HsVar (maxtag_RDR tycon)))
- (illegal_toEnum_tag occ_nm (maxtag_RDR tycon))
+ HsIf (HsApp (HsApp
+ (HsVar and_RDR)
+ (HsApp (HsApp (HsVar ge_RDR)
+ (HsVar a_RDR))
+ (HsLit (HsInt 0))))
+ (HsApp (HsApp (HsVar le_RDR)
+ (HsVar a_RDR))
+ (HsVar (maxtag_RDR tycon))))
(mk_easy_App (tag2con_RDR tycon) [a_RDR])
+ (illegal_toEnum_tag occ_nm (maxtag_RDR tycon))
tycon_loc
enum_from