Lysxia / first-class-families

First-class type families
https://hackage.haskell.org/package/first-class-families
MIT License
86 stars 12 forks source link

Example of using this library? #50

Open peterstorm opened 2 years ago

peterstorm commented 2 years ago

Hello!

It might be out of scope for an issue, but would it be possible to provide a "non trivial" example of a use of this library?

I'm currently in the process of learning and understanding typelevel programming, and it would be so cool to have a good example to go by - though there are some Youtube videos out there as well, I see.

Feel free to close, if this is not the right forum of course!

Lysxia commented 2 years ago

Sure, adding a more involved example in the documentation would be nice! I'm just not sure what a good example would be.

My use case was generic-data-surgery, which lets users perform operations on data types like adding/removing fields, so that's fairly niche. Maybe the challenge is to find a small and concrete use case that conveys a motivation for doing type-level computation to someone who's not already familiar with dependent types.

peterstorm commented 2 years ago

Yeah, I think my problem with really grasping the type level programming is finding a motivating example of when to actually use it, and then well... actually use it. Something application specific would be nice - I read the pokemon scripture from schoolofhaskell but I guess I still have a hard time translating that to actual application code.