Andrew Pimlott wrote:
liftR :: (InRegion mark marks) => (h -> m a) -> Private mark h -> Region marks
m a
liftR f (Private h) = Region $ f h
This is not as safe. Try modifying your test2.
Okay, I missed this... Have renamed the function "unsafeLiftR"... As you
say still useful for building
libraries provided you do not export the region code from the library
that uses it.
Of course an alternative is just to have an opaque/abstract handle, and
not export the data-constructor.
Keean.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe