aboutsummaryrefslogtreecommitdiff
path: root/stdlib/util.ts
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/util.ts')
-rw-r--r--stdlib/util.ts9
1 files changed, 7 insertions, 2 deletions
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<f extends (...args: any) => any> = ReturnType<f>
-export type Apply<K extends Kind1, Val> = (K & { input: Val })['return']
+export type ApplyK<K extends Kind1, Val> = (K & { input: Val })['return']
-export interface Id extends Kind1 {
+export type Id = <T>() => T
+export interface IdK extends Kind1 {
return: this['input']
}
+export interface ConstK<Val> extends Kind1<unknown, Val> {
+ return: Val
+}
+
type ADTDescr = { _type: string; value: any }
interface ADTConstructor<A extends ADTDescr> extends Kind1<A['value']> {