Does the current SYB permit extension of generic functions with new types?
问题 The first two Scrap Your Boilerplate papers describe a way of writing generic functions that work for general types, but have special cases for specific types. For instance, fromJSON from the aeson package, defines a generic function for converting from JSON, but provides special cases for types like list or Int : parseJSON :: (Data a) => Value -> Parser a parseJSON j = parseJSON_generic j `ext1R` list `ext1R` vector `ext2R'` mapAny `ext2R'` hashMapAny -- Use the standard encoding for all