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
It is common to use the DefaultSignatures extension to provide default implementations of class methods. When using a class as an abstraction layer over I/O, default implementations can be provided for MonadIO instances. This reduces boilerplate when the class has more than one instance (using MonadIO), and it allows the allows the implementation to be written alongside the method signatures, making it easier to maintain. The example in the documentation could be implemented as follows:
It is common to use the DefaultSignatures extension to provide default implementations of class methods. When using a class as an abstraction layer over I/O, default implementations can be provided for MonadIO instances. This reduces boilerplate when the class has more than one instance (using
MonadIO
), and it allows the allows the implementation to be written alongside the method signatures, making it easier to maintain. The example in the documentation could be implemented as follows:Unfortunately, makeMockable fails with an error like the following:
This error is raised when instExtraMembers is not empty. It is set in makeInstance, where
members
is processed using getMethod. Perhaps support for DefaultSignatures could be added by refactoring this code so thatdefault
members are ignored?The text was updated successfully, but these errors were encountered: