Skip to content

Commit

Permalink
chore(type): Add docstrings to the type description
Browse files Browse the repository at this point in the history
  • Loading branch information
jubnzv committed Jan 23, 2023
1 parent 8c430c6 commit 7fe3623
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/base/Type.ml
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,18 @@ module type ScillaType = sig
[@@deriving sexp]

type t =
| PrimType of PrimType.t
| MapType of t * t
| PrimType of PrimType.t (** [PrimType(T)] represents a primary type *)
| MapType of t * t (** [MapType(K, V)] is a mapping type: [K |-> V] *)
| FunType of t * t
(** [FunType(Ty1, Ty2)] is a function type: [Ty1 => Ty2] *)
| ADT of loc TIdentifier.t * t list
| TypeVar of string
(** [ADT(N, Args)] represents ADT type [N] with type parameters [Args] *)
| TypeVar of string (** [TypeVar(T)] is a type variable *)
| PolyFun of string * t
| Unit
| Address of t addr_kind
(** [PolyFun('A, T)] represents a polymorphic function type where
['A] is a type parameter. For example: [forall 'A. List 'a -> List 'A] *)
| Unit (** [Unit] is a unit type *)
| Address of t addr_kind (** [Address(A)] represents address *)
[@@deriving sexp, to_yojson]

val pp_typ : t -> string
Expand Down

0 comments on commit 7fe3623

Please sign in to comment.