Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module Ersatz.Types
- type Symbol = {
- Module : Module
- Identifier : string
- }
- and Module = {
- Name : string list
- Definitions : (Symbol * Type * Expression) list
- Imports : Module list
- }
- and Kind =
- | Star
- | Kinds of Kind list
- and PrimitiveType =
- | Integer
- | Float
- | Tuple of Types
- | Array of int * Type
- | List of Type
- | Function of Types
- and Qualifier =
- | Mutable
- | Private
- | Internal
- and Qualifiers = Qualifier list
- and Type' =
- | TypeVariable of Symbol
- | SumType of Types
- | RecordType of (string, Type) Map
- | Primitive of PrimitiveType
- | TypeClass of (Symbol * Types) list
- and TypeConstraint = (Symbol * Type) list
- and Type = Type' * Kind * TypeConstraint
- and Types = Type list
- and Binding = {
- Variable : Symbol
- Counter : uint64
- Qualifiers : Qualifiers
- }
- and Expression =
- | Progn of Expression list
- | Apply of Expression * Expression
- | Lambda of Binding * Expression
- | If of Expression * Expression * Expression
- | Datum of PrimitiveType
Add Comment
Please, Sign In to add comment