小编Tri*_*eno的帖子

榆树中的依赖类型

我想知道是否可以在Elm中进行某种依赖类型,如下所示,就像你在伊德里斯一样:

isQuestion : String -> Type
isQuestion (sentence) with (endsWith "?" sentence)
    | True = Question
    | False = Statement
Run Code Online (Sandbox Code Playgroud)

有没有一个库可以通过打字让我达到类似的效果?

types dependent-type elm idris

4
推荐指数
1
解决办法
555
查看次数

标签 统计

dependent-type ×1

elm ×1

idris ×1

types ×1