From 518a6a9ee31f0b03f08cb77bc613b4d708bb640b Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Fri, 13 Jan 2023 20:32:20 +0530 Subject: chore: prettier --- examples/file.ts | 8 +------- examples/guess-number.ts | 3 ++- examples/hello-world.ts | 17 +++++------------ examples/test-runner.ts | 42 +++++++++++++++++++++--------------------- 4 files changed, 29 insertions(+), 41 deletions(-) (limited to 'examples') diff --git a/examples/file.ts b/examples/file.ts index fd5728b..2cc2b7a 100644 --- a/examples/file.ts +++ b/examples/file.ts @@ -13,11 +13,5 @@ interface ConstK extends Kind1 { export type main = [ Bind, PrintK>, - Bind< - Try< - ReadFile<'./unicorn'>, - ConstK<"hello world"> - >, - PrintK - >, + Bind, ConstK<'hello world'>>, PrintK> ] diff --git a/examples/guess-number.ts b/examples/guess-number.ts index 45d60e6..6f5a31b 100644 --- a/examples/guess-number.ts +++ b/examples/guess-number.ts @@ -9,7 +9,8 @@ export type main = [ type Len = Ls['length'] extends number ? Ls['length'] : 0 -interface AskForGuess extends Kind1 { +interface AskForGuess + extends Kind1 { return: `${this['input']}` extends `${N}` ? PutStringLn<'Yay! You got it right!'> : Do< diff --git a/examples/hello-world.ts b/examples/hello-world.ts index fcdb8e9..9d2bc18 100644 --- a/examples/hello-world.ts +++ b/examples/hello-world.ts @@ -1,20 +1,13 @@ -import { Bind, Do, Kind1 } from "../stdlib/effect"; -import { CreateRef, GetRef, Ref, SetRef } from "../stdlib/ref"; -import { Print } from "../stdlib/stdio"; +import { Bind, Do, Kind1 } from '../stdlib/effect' +import { CreateRef, GetRef, Ref, SetRef } from '../stdlib/ref' +import { Print } from '../stdlib/stdio' interface PrintK extends Kind1 { return: Print } interface Func extends Kind1 { - return: Do<[ - SetRef, - Bind, PrintK>, - ]> + return: Do<[SetRef, Bind, PrintK>]> } -export type main = [ - Bind, Func>, - Print<1>, -] - +export type main = [Bind, Func>, Print<1>] diff --git a/examples/test-runner.ts b/examples/test-runner.ts index 081dede..7dc1966 100644 --- a/examples/test-runner.ts +++ b/examples/test-runner.ts @@ -4,37 +4,37 @@ import { SetEvalEnvironment } from '../stdlib/sys' import { Test, Assert } from '../stdlib/test' import { Equals, Not } from '../stdlib/util' -type testSomeStuff = Do<[ - PutStringLn<"Some Stuff">, +type testSomeStuff = Do< + [ + PutStringLn<'Some Stuff'>, - Test<"should do some stuff", [ - Assert>, - Assert>>, - ]>, + Test< + 'should do some stuff', + [Assert>, Assert>>] + >, - Test<"bing bong, bing bing bong", [ - Assert>, - ]>, -]> + Test<'bing bong, bing bing bong', [Assert>]> + ] +> -type testSomeMoreStuff = Do<[ - PutStringLn<"Other stuff?">, +type testSomeMoreStuff = Do< + [ + PutStringLn<'Other stuff?'>, - Test<"should do some other stuff", [ - Assert>, - ]>, + Test<'should do some other stuff', [Assert>]> - // Test<"this'll fail fo sho", [ - // Assert>, - // ]>, -]> + // Test<"this'll fail fo sho", [ + // Assert>, + // ]>, + ] +> export type main = [ // Update env to node with test helpers SetEvalEnvironment<'test.node'>, - PutStringLn<"=== Running tests... ===\n">, + PutStringLn<'=== Running tests... ===\n'>, testSomeStuff, - testSomeMoreStuff, + testSomeMoreStuff ] -- cgit v1.3.1