Working out the details of a type indexed free monad

前端 未结 6 1965
孤城傲影
孤城傲影 2021-02-05 12:51

I\'ve been using a free monad to build a DSL. As part of the language, there is an input command, the goal is to reflect what types are expected by the input primit

6条回答
  •  难免孤独
    2021-02-05 13:09

    I have a working implementation of an indexed free monad on github from a few years back:

    https://github.com/ekmett/indexed/blob/master/src/Indexed/Monad/Free.hs

    It uses the form of indexed monad proposed by Conor McBride in Kleisli Arrows of Outrageous Fortune, and that can be adapted to provide a 2-index free monad in the style of Bob Atkey in the manner described in the paper as well.

提交回复
热议问题