luqui / data-memocombinators

Pure memoization combinators for Haskell
37 stars 7 forks source link

Add Memoizable type class #2

Open sebfisch opened 13 years ago

sebfisch commented 13 years ago

Although, for many types, there is more than one possible way to implement a Memo function, users may know a preferred way to memoize their own types. For them, it would be convenient to pick the Memo function using overloading rather than passing it around explicitly. (I am such a user.)

Would you accept a patch that adds:

class Memoizable a where
  memo :: Memo a

?