From: Matthijs Kooijman Date: Wed, 9 Jun 2010 20:30:13 +0000 (+0200) Subject: Add support for multiple-constructor datatypes with fields. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=4583b2b6d86da12e795f199f2951b193efed613f;hp=4583b2b6d86da12e795f199f2951b193efed613f;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git Add support for multiple-constructor datatypes with fields. This is the naïve implementation that will not try to use the same storage space for fields from different constructors, so it might quickly become inefficient with bigger datatypes. For simple types like the Maybe type, this should be fine. The support is not quite working yet, for some reason these new types are not marked as representable. This is cause because the type substitution in mkTyConHType does not work for some reason, so the field type of the Just constructor in (for example) a Maybe Bool type stays "a" instead of "Bool". ---