From efe0ab336144d2d965bf355db02762f5cf539c7f Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sat, 14 Jan 2023 10:37:51 +0530 Subject: feat: adds func to try/catch --- stdlib/util.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'stdlib/util.ts') diff --git a/stdlib/util.ts b/stdlib/util.ts index 20a41fb..cd25d7b 100644 --- a/stdlib/util.ts +++ b/stdlib/util.ts @@ -2,12 +2,17 @@ import { Kind1 } from './effect' export type Let any> = ReturnType -export type Apply = (K & { input: Val })['return'] +export type ApplyK = (K & { input: Val })['return'] -export interface Id extends Kind1 { +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 { -- cgit v1.3.1