import { Kind1 } from './effect' export type Let any> = ReturnType export type ApplyK = (K & { input: Val })['return'] export type Id = () => T export interface IdK extends Kind1 { return: this['input'] } export interface ConstK extends Kind1 { return: Val } type ADTDescr = { _type: string; value: any } interface ADTConstructor extends Kind1 { return: this['input'] extends infer Inp ? A & { value: Inp } : A } type Pat = Record export type ADT> = { [k in keyof D]: { _type: k; value: D[k] } } extends infer Rec extends Pat ? { t: Rec[keyof Rec] } & { [k in keyof Rec]: ADTConstructor } : never export type Equals = [Left] extends [Right] ? [Right] extends [Left] ? true : false : false export type Not = B extends true ? false : true