Lambda for type expressions in Haskell?

后端 未结 7 607
被撕碎了的回忆
被撕碎了的回忆 2020-12-01 10:34

Does Haskell, or a specific compiler, have anything like type-level lambdas (if that\'s even a term)?

To elaborate, say I have a parametrized type Foo a b

7条回答
  •  日久生厌
    2020-12-01 11:23

    EHC (and perhaps also its successor, UHC) has type-level lambdas, but they are undocumented and not as powerful as in a dependently-typed language. I recommend you use a dependently-typed language such as Agda (similar to Haskell) or Coq (different, but still pure functional at its core, and can be interpreted and compiled either lazily or strictly!) But I'm biased towards such languages, and this is probably 100x overkill for what you are asking for here!

提交回复
热议问题