首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏绿巨人专栏

    The OCaml Language Cheatsheets

    string (* Constructor with arg*) | Pair of string * int (* Constructor with args *) | Gadt : int -> enum (* GADT constructor *) | Inlined of { x : int } (* Inline record *) Constructed false } r.field2 <- r.field2 + 1; let c = Constant let c = Param "foo" let c = Pair ("bar",3) let c = Gadt

    68820发布于 2020-04-09
  • 来自专栏零域Blog

    「SF-LC」7 Ind Prop

    . ---- ev_0 ev 0 ---- ev_SS ev 2 ---- ev_SS ev 4 So we can literally translate them into a GADT: Inductive An “Indexed” GADT and two constructors (Technically) In an Inductive definition, an argument to the type From this perspective, there is an alternative way to write this GADT: Inductive even : nat → Prop := For GADT, i.e.

    86820编辑于 2022-03-14
  • 来自专栏零域Blog

    「SF-LC」1 Basics

    . (* GADT style, dependent type *) Syntax for arguments having the same type As a notational convenience

    55920编辑于 2022-03-14
  • 来自专栏零域Blog

    「SF-LC」10 IndPrinciples

    * in ADT syntax *) Inductive list (X:Type) : Type := | nil | cons (x : X) (l': list X) (* in GADT

    1.1K30编辑于 2022-03-14
  • 来自专栏零域Blog

    「SF-LC」6 Logic

    (Recursive Type like ADT/GADT in ML/Haskell is a limited form of recursion allowing no arbitray recursion

    75320编辑于 2022-03-14
领券