You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the implementation of a runtime type value ('a t) is abstract to any library that uses repr. From the perspective of repr this is nice because it allows the authors to freely change the implementation with hopefully very little downstream impact and most users are probably happy with the set of features provided by repr.
However, for anybody wishing to extend repr this is not possible as they cannot look at the implementation to manipulate it. I've hit this a few times. First when prototyping an automatic diffing library (I ended up prototyping with typegist instead https://github.com/patricoferris/patch) and more recently when thinking of doing some SQL generation for types. Perhaps I'm missing something in the API that would let me extend repr in a separate library? If not, would there be interest in providing this feature? Even something like:
Currently, the implementation of a runtime type value (
'a t
) is abstract to any library that usesrepr
. From the perspective ofrepr
this is nice because it allows the authors to freely change the implementation with hopefully very little downstream impact and most users are probably happy with the set of features provided by repr.However, for anybody wishing to extend
repr
this is not possible as they cannot look at the implementation to manipulate it. I've hit this a few times. First when prototyping an automatic diffing library (I ended up prototyping withtypegist
instead https://github.com/patricoferris/patch) and more recently when thinking of doing some SQL generation for types. Perhaps I'm missing something in the API that would let me extend repr in a separate library? If not, would there be interest in providing this feature? Even something like:Thanks! :))
The text was updated successfully, but these errors were encountered: