diff options
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/file.ts | 25 | ||||
| -rw-r--r-- | examples/greeting.ts | 5 |
2 files changed, 16 insertions, 14 deletions
diff --git a/examples/file.ts b/examples/file.ts index fb38613..ccb8a66 100644 --- a/examples/file.ts +++ b/examples/file.ts @@ -8,21 +8,24 @@ interface PrintK extends Kind1<string> { } export type main = [ - Do<[ - BindTo<"contents", ReadFile<'./bin.js'>>, - PutStringLn<"------">, - Bind<Label<"contents">, <c extends string>() => PutStringLn<c>>, - ]>, + Do< + [ + BindTo<'contents', ReadFile<'./bin.js'>>, + PutStringLn<'------'>, + Bind<Label<'contents'>, <c extends string>() => PutStringLn<c>> + ] + >, - Try<Bind<Label<"contents">, PrintK>, <e extends string>() => - PutStringLn<`ERROR: ${e}`>>, + Try< + Bind<Label<'contents'>, PrintK>, + <e extends string>() => PutStringLn<`ERROR: ${e}`> + >, - PutStringLn<"-------------">, + PutStringLn<'-------------'>, - Bind<ReadFile<'./default.nix'>, <c extends string>() => - PutStringLn<c>>, + Bind<ReadFile<'./default.nix'>, <c extends string>() => PutStringLn<c>>, - PutStringLn<"-------------">, + PutStringLn<'-------------'>, Try< Bind<ReadFile<'./unicorn'>, PrintK>, diff --git a/examples/greeting.ts b/examples/greeting.ts index 8ed2181..72edde2 100644 --- a/examples/greeting.ts +++ b/examples/greeting.ts @@ -10,12 +10,11 @@ export type main = [ PutStringLn<'----------------'>, PutString<'Your name? '>, - Bind<ReadLine, <name extends string>() => - PutStringLn<`Hello, ${name}`>>, + Bind<ReadLine, <name extends string>() => PutStringLn<`Hello, ${name}`>>, PutStringLn<'----------------'>, PutString<'Your purpose in life? '>, Bind<ReadLine, ResponseK>, - PutStringLn<'----------------'>, + PutStringLn<'----------------'> ] |
