Advertisement
tinyevil

Untitled

Mar 17th, 2018
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. data Openable A =
  2. OpenableInstance { -- some interface
  3. open :: A -> (bool,A),
  4. close :: A -> A,
  5. peek :: A -> string
  6. }
  7.  
  8. data IOpenable =
  9. hide : forall A:Type, Openable A -> IOpenable
  10. ^
  11. existential type (hidden from the type of the IOpenable object itself)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement