phantom-types

    0

    1답변

    기본 키에 코드 우선으로 팬텀 유형을 사용할 수 있습니까? class Id<TEntity, TKey> where TEntity : Entity { // implementation } class Entity<TEntity, TKey> { [Key] public Id<MyEntity, Guid> Id { get; se

    5

    2답변

    가변 길이 튜플 유형을 기본적으로 Either a (Either (a,b) (Either (a,b,c) ...)) 및 Either (Either (Either ... (x,y,z)) (y,z)) z의 더 예쁜 버전으로 만들려고합니다. 내가 컴파일러를 돕기 위해 할 수있는 일이 추론을 Temp.hs:32:40: Could not deduce (Pre

    1

    1답변

    나는 몇 가지 간단한 액세스 제어를 적용 할 팬텀 유형을 사용하여 모듈 소켓이 있습니다 module Socket : sig type 'a t val ro : string -> [ `Read ] t val rw : string -> [ `Read | `Write ] t end 나는 Container.t 기록에 Socket.t