Functor Functors or Higher Kinded Data for PureScript

Did anyone already create a library for the Functor Functors[1] or Higher Kinded Data[2] pattern?

The HKD pattern that Sandy Maguire uses in his post[2] with a type family wouldn’t work in PureScript. But I think the classes from the Functor Functors[1] post can be easily translated into PureScript.

I came across this document [3] by Jordan Martinez, but it’s not adapted for records I think. I ran into some problems trying to adapt it.


1 Like

We use the pattern quite a lot. It’s not without its flaws in the absence of type families, it can get a bit out of control, but yeah it’s great for the most part.


There’s also Eq1 and Ord1 in the Prelude, and deriving is supported for them and/or deriving with Eq1 constraints on an Eq type, etc.

1 Like

Thanks a lot @garyb! I’m going to try purescript-functor1.

If you find it’s missing any stuff you need, please do send PRs! It’s pretty minimal right now.