finn-lang/Type.cs

15 lines
416 B
C#
Raw Permalink Normal View History

2023-07-08 03:29:17 +00:00
namespace Finn.Types;
public record Field(string Name, Type Type);
public record Row(Field[] Fields);
public abstract record Type()
{
public record Number() : Type();
public record String() : Type();
public record Param(int Name) : Type();
public record List(Type T) : Type();
public record Record(Row Row) : Type();
public record Variant(Row Row) : Type();
public record Function(Type[] Params) : Type();
}