Advertisement
Guest User

Untitled

a guest
Feb 4th, 2022
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. Class Graph g where
  2. type Vertex g
  3. data Edge g
  4. src, target :: Edge g -> Vertex g
  5. ... so on
  6.  
  7. then you instance it like this
  8.  
  9. instance Graph Friends where
  10. type Vertex Friends = Friend
  11. data Edge Friends = LOL (Vertex Friends) (Vertex Friends)
  12. src = defined
  13. ....
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement