Datatype promotion for dependently challenged

后端 未结 2 486
刺人心
刺人心 2021-02-03 19:31

After reading through the ghc 7.4. pre-release notes and the Giving Haskell a Promotion paper, I\'m still confused on what you actually do with promoted types. For example, the

2条回答
  •  长情又很酷
    2021-02-03 20:31

    Nat can be e.g. used to construct numerical vectors that can be only added if they have the same length, checked at compile time.

提交回复
热议问题