diff options
| author | Akshay Nair <phenax5@gmail.com> | 2023-01-14 17:53:00 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2023-01-14 17:53:00 +0530 |
| commit | 78e384c2f32996478edced59c837a348dec77e57 (patch) | |
| tree | dcc466dba156415249d33fbcab14c4e21392c6b0 /docs/README.md | |
| parent | 6c7b4f308a0559f78bba763f259c05fc2e52d425 (diff) | |
| download | ts-types-lang-78e384c2f32996478edced59c837a348dec77e57.tar.gz ts-types-lang-78e384c2f32996478edced59c837a348dec77e57.zip | |
feat: adds basic md docs
Diffstat (limited to 'docs/README.md')
| -rw-r--r-- | docs/README.md | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..c38000c --- /dev/null +++ b/docs/README.md @@ -0,0 +1,35 @@ +ts-types-lang / [Modules](modules.md) + +# TS Types lang [WIP] +A runtime for typescript's **type system** that turns it into a **general purpose**, **purely functional** programming language! + +Take a look at the [./examples](./examples) directory for examples on how to write a program in typescript types + +### Example + +```typescript +import { Bind, Kind1, Do } from 'ts-types-lang/stdlib/effect' +import { PutString, PutStringLn, ReadLine } from 'ts-types-lang/stdlib/stdio' + +// :: string -> Effect () +interface GreetK extends Kind1<string> { + return: PutString<`Hello, ${this['input']}`>, +} + +// main :: [Effect ()] | Effect () +export type main = [ + PutString<"Your name? ">, + Bind<ReadLine, GreetK>, +] +``` + +To run it - +```bash +npx tsr run ./examples/guess-number.ts +// OR +yarn exec tsr run ./examples/guess-number.ts +``` + +### Why? + +I dunno |
