blob: 2cc2b7a46dc34be62e1c3aafceeddbcfd462113a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
import { Bind, Kind1 } from '../stdlib/effect'
import { PutStringLn } from '../stdlib/stdio'
import { ReadFile } from '../stdlib/fs'
import { Try } from '../stdlib/exception'
interface PrintK extends Kind1<string> {
return: PutStringLn<this['input']>
}
interface ConstK<Val> extends Kind1<unknown, Val> {
return: Val
}
export type main = [
Bind<ReadFile<'./default.nix'>, PrintK>,
Bind<Try<ReadFile<'./unicorn'>, ConstK<'hello world'>>, PrintK>
]
|