File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,9 @@ module Cardano.Api
4848 , module Cardano.Api.Key
4949 , module Cardano.Api.Hash
5050
51+ -- * HasTypeProxy
52+ , module Cardano.Api.HasTypeProxy
53+
5154 -- * Transaction building
5255 , module Cardano.Api.Tx
5356
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ module Cardano.Api.HasTypeProxy
99 , AsType (.. )
1010 , Proxy (.. )
1111 , FromSomeType (.. )
12+ , asTypeFromValue
1213 )
1314where
1415
@@ -39,6 +40,9 @@ instance HasTypeProxy BS.ByteString where
3940 data AsType BS. ByteString = AsByteString
4041 proxyToAsType _ = AsByteString
4142
43+ asTypeFromValue :: HasTypeProxy t => t -> AsType t
44+ asTypeFromValue _ = proxyToAsType Proxy
45+
4246data FromSomeType (c :: Type -> Constraint ) b where
4347 FromSomeType :: c a => AsType a -> (a -> b ) -> FromSomeType c b
4448
You can’t perform that action at this time.
0 commit comments