File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -469,7 +469,8 @@ class (SingI (Interp a), IsReferenceType (Interp a)) => Interpretation (a :: k)
469
469
-- say, unmarshall a Java object to a Haskell value. Unlike coercing, in general
470
470
-- reifying induces allocations and copies.
471
471
class Interpretation a => Reify a where
472
- -- | Precondition: The input reference is valid only until reify returns.
472
+ -- | Invariant: the argument and the result are distinct. That is, the result
473
+ -- and the argument share no direct JVM object references.
473
474
reify :: J (Interp a ) -> IO a
474
475
475
476
default reify :: (Coercible a , Interp a ~ Ty a ) => J (Interp a ) -> IO a
@@ -479,8 +480,8 @@ class Interpretation a => Reify a where
479
480
-- say, marshall a Haskell value to a Java object. Unlike coercing, in general
480
481
-- reflection induces allocations and copies.
481
482
class Interpretation a => Reflect a where
482
- -- | Postcondition: The input value remains valid if the output reference is
483
- -- deleted .
483
+ -- | Invariant: the argument and the result are distinct. That is, the result
484
+ -- and the argument share no direct JVM object references .
484
485
reflect :: a -> IO (J (Interp a ))
485
486
486
487
default reflect :: (Coercible a , Interp a ~ Ty a ) => a -> IO (J (Interp a ))
You can’t perform that action at this time.
0 commit comments