-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
I have been learning Purescript recently and I have a question if you have some time to entertain me 😅
I was implementing a toy project and before I discovered this package, I created a type class that served as a Codec definition, defining encode and decode functions.
class Codec a b e where
encode :: a -> b
decode :: b -> Either e a
I then create an instance of this Codec for each of the types in my domain.
Comparing my implementation to yours, I'm curious about why Codec is implemented as a type in this module rather than a type class?
PS: I know this is probably not the right place for this, let me know if there is a better place to ask such questions.
Metadata
Metadata
Assignees
Labels
No labels