Skip to content

Emulating Higher-Kinded Types in Rust via Plug/Unplug. Also, Monads.

License

Notifications You must be signed in to change notification settings

edmundsmith/type-plugs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Type Plugs - A Method for emulating Higher-Kinded Types in Rust

This is a small demonstration of a technique for emulating Higher-Kinded Types (HKTs)/Generalised Associated Types(GATs) through existing language features. Basically, you can emulate T::F<X> as being <T::F as Plug<X>>::result_t with the Plug trait, and you can destructure F<X> down to F<_>, A through the Unplug trait.

You can read more about how this works with the original post and the followup.

About

Emulating Higher-Kinded Types in Rust via Plug/Unplug. Also, Monads.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages