Skip to content

Commit 427a976

Browse files
committed
upgrade to latest fp-ts
1 parent 8e01ab7 commit 427a976

File tree

12 files changed

+1473
-57
lines changed

12 files changed

+1473
-57
lines changed

docs/_config.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
remote_theme: pmarsceill/just-the-docs
2+
3+
# Enable or disable the site search
4+
search_enabled: true
5+
6+
# Aux links for the upper right navigation
7+
aux_links:
8+
'fp-ts-codegen on GitHub':
9+
- 'https://github.com/gcanti/fp-ts-codegen'

docs/modules/ast.ts.md

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
---
2+
title: ast.ts
3+
nav_order: 1
4+
parent: Modules
5+
---
6+
7+
---
8+
9+
<h2 class="text-delta">Table of contents</h2>
10+
11+
- [AST (interface)](#ast-interface)
12+
- [Options (interface)](#options-interface)
13+
- [defaultOptions (constant)](#defaultoptions-constant)
14+
- [lenses (constant)](#lenses-constant)
15+
- [constructors (function)](#constructors-function)
16+
- [data (function)](#data-function)
17+
- [folds (function)](#folds-function)
18+
- [prisms (function)](#prisms-function)
19+
- [setoid (function)](#setoid-function)
20+
21+
---
22+
23+
# AST (interface)
24+
25+
**Signature**
26+
27+
```ts
28+
export interface AST<A> extends Reader<Options, A> {}
29+
```
30+
31+
# Options (interface)
32+
33+
**Signature**
34+
35+
```ts
36+
export interface Options {
37+
/** the name of the field used as tag */
38+
tagName: string
39+
/** the name prefix used for pattern matching functions */
40+
foldName: string
41+
/** the name used for the input of pattern matching functions */
42+
matcheeName: string
43+
/**
44+
* the pattern matching handlers can be expressed as positional arguments
45+
* or a single object literal `tag -> handler`
46+
*/
47+
handlersStyle: { type: 'positional' } | { type: 'record'; handlersName: string }
48+
encoding: 'literal' | 'fp-ts'
49+
}
50+
```
51+
52+
# defaultOptions (constant)
53+
54+
**Signature**
55+
56+
```ts
57+
export const defaultOptions: Options = ...
58+
```
59+
60+
# lenses (constant)
61+
62+
**Signature**
63+
64+
```ts
65+
export const lenses: { [K in keyof Options]: Lens<Options, Options[K]> } = ...
66+
```
67+
68+
# constructors (function)
69+
70+
**Signature**
71+
72+
```ts
73+
export const constructors = (d: M.Data): AST<Array<ts.Node>> => ...
74+
```
75+
76+
# data (function)
77+
78+
**Signature**
79+
80+
```ts
81+
export const data = (d: M.Data): AST<Array<ts.Node>> => ...
82+
```
83+
84+
# folds (function)
85+
86+
**Signature**
87+
88+
```ts
89+
export const folds = (d: M.Data): AST<Array<ts.FunctionDeclaration>> => ...
90+
```
91+
92+
# prisms (function)
93+
94+
**Signature**
95+
96+
```ts
97+
export const prisms = (d: M.Data): AST<Array<ts.Node>> => ...
98+
```
99+
100+
# setoid (function)
101+
102+
**Signature**
103+
104+
```ts
105+
export const setoid = (d: M.Data): AST<Array<ts.Node>> => ...
106+
```

docs/modules/haskell.ts.md

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
---
2+
title: haskell.ts
3+
nav_order: 2
4+
parent: Modules
5+
---
6+
7+
---
8+
9+
<h2 class="text-delta">Table of contents</h2>
10+
11+
- [constructor (constant)](#constructor-constant)
12+
- [data (constant)](#data-constant)
13+
- [fun (constant)](#fun-constant)
14+
- [identifier (constant)](#identifier-constant)
15+
- [parameterDeclaration (constant)](#parameterdeclaration-constant)
16+
- [ref (constant)](#ref-constant)
17+
- [tuple (constant)](#tuple-constant)
18+
- [type (constant)](#type-constant)
19+
- [types (constant)](#types-constant)
20+
- [parse (function)](#parse-function)
21+
22+
---
23+
24+
# constructor (constant)
25+
26+
**Signature**
27+
28+
```ts
29+
export const constructor: P.Parser<M.Constructor> = ...
30+
```
31+
32+
# data (constant)
33+
34+
**Signature**
35+
36+
```ts
37+
export const data: P.Parser<M.Data> = ...
38+
```
39+
40+
# fun (constant)
41+
42+
**Signature**
43+
44+
```ts
45+
export const fun: P.Parser<M.Type> = ...
46+
```
47+
48+
# identifier (constant)
49+
50+
**Signature**
51+
52+
```ts
53+
export const identifier: P.Parser<string> = ...
54+
```
55+
56+
# parameterDeclaration (constant)
57+
58+
**Signature**
59+
60+
```ts
61+
export const parameterDeclaration = ...
62+
```
63+
64+
# ref (constant)
65+
66+
**Signature**
67+
68+
```ts
69+
export const ref: P.Parser<M.Type> = ...
70+
```
71+
72+
# tuple (constant)
73+
74+
**Signature**
75+
76+
```ts
77+
export const tuple: P.Parser<M.Type> = ...
78+
```
79+
80+
# type (constant)
81+
82+
**Signature**
83+
84+
```ts
85+
export const type: P.Parser<M.Type> = ...
86+
```
87+
88+
# types (constant)
89+
90+
**Signature**
91+
92+
```ts
93+
export const types: P.Parser<Array<M.Type>> = ...
94+
```
95+
96+
# parse (function)
97+
98+
**Signature**
99+
100+
```ts
101+
export const parse = (s: string): Either<string, M.Data> => ...
102+
```

docs/modules/index.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
title: Modules
3+
has_children: true
4+
permalink: /docs/modules
5+
nav_order: 2
6+
---

docs/modules/index.ts.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
title: index.ts
3+
nav_order: 3
4+
parent: Modules
5+
---
6+
7+
---
8+
9+
<h2 class="text-delta">Table of contents</h2>
10+
11+
- [run (function)](#run-function)
12+
13+
---
14+
15+
# run (function)
16+
17+
**Signature**
18+
19+
```ts
20+
export function run(input: string, options: Options = defaultOptions): Either<string, string> { ... }
21+
```

0 commit comments

Comments
 (0)