- 
                Notifications
    You must be signed in to change notification settings 
- Fork 25
          New asTypeFromValue function
          #813
        
          New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
| @@ -22,5 +23,8 @@ class Typeable t => HasTypeProxy t where | |||
|  | |||
| proxyToAsType :: Proxy t -> AsType t | |||
|  | |||
| asTypeFromValue :: HasTypeProxy t => t -> AsType t | |||
| asTypeFromValue _ = proxyToAsType Proxy | |||
|  | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be useful too:
| asType :: HasTypeProxy t => AsType t | |
| asType = proxyToAsType Proxy | 
| @@ -6,6 +6,7 @@ module Cardano.Api.Internal.HasTypeProxy | |||
| ( HasTypeProxy (AsType, proxyToAsType) | |||
| , Proxy (..) | |||
| , FromSomeType (..) | |||
| , asTypeFromValue | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't you have to export it from Cardano.Api as well?
| This PR is stale because it has been open 45 days with no activity. | 
| This PR is stale because it has been open 45 days with no activity. | 
e8bcfe9    to
    1db629a      
    Compare
  
    1db629a    to
    7abe88f      
    Compare
  
    
Changelog
Context
How to trust this PR
Highlight important bits of the PR that will make the review faster. If there are commands the reviewer can run to observe the new behavior, describe them.
Checklist