[Haskell-cafe] Synthetic values?

Cristiano Paris frodo at theshire.org
Wed Feb 9 18:56:29 CET 2011

On Wed, Feb 9, 2011 at 18:43, Steffen Schuldenzucker
<sschuldenzucker at uni-bonn.de> wrote:
> ...
>>>> let good = appendLog "Foo" "Bar" :: Sealed Admin String
>>>> unseal (undefined :: Admin) good
> "FooBar"

That's true, but putting apart the problem I posed, in my construction
I wouldn't expose unseal directly nor the Sealed constructor. This
way, you should not be able to recreate the unseal function and you'd
be given only specialized "unseal" functions for each role, like
unsealAsAdmin, unsealAsUser and so on.

Thank you for adding to the discussion.


GPG Key: 4096R/C17E53C6 2010-02-22
Fingerprint = 4575 4FB5 DC8E 7641 D3D8  8EBE DF59 B4E9 C17E 53C6

More information about the Haskell-Cafe mailing list