Skip to content

Commit bffc32d

Browse files
committed
Improve unparsing barreling
1 parent 763cd3a commit bffc32d

File tree

5 files changed

+8
-9
lines changed

5 files changed

+8
-9
lines changed

src/language/cli/output.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import either, { type Either } from '@matt.kantor/either'
22
import { parseArgs } from 'util'
33
import { type SyntaxTree } from '../parsing/syntax-tree.js'
4-
import { unparse, type Notation } from '../unparsing.js'
5-
import { prettyJson } from '../unparsing/pretty-json.js'
6-
import { prettyPlz } from '../unparsing/pretty-plz.js'
4+
import { prettyJson, prettyPlz, unparse, type Notation } from '../unparsing.js'
75

86
export const handleOutput = async (
97
process: NodeJS.Process,

src/language/runtime/keywords.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import {
1818
lookupPropertyOfObjectNode,
1919
makeUnelaboratedObjectNode,
2020
} from '../semantics/object-node.js'
21-
import { prettyJson } from '../unparsing/pretty-json.js'
21+
import { prettyJson } from '../unparsing.js'
2222

2323
const unserializableFunction = () =>
2424
either.makeLeft({

src/language/semantics/key-path.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import either from '@matt.kantor/either'
22
import type { Atom, Molecule } from '../parsing.js'
3-
import { unparse } from '../unparsing.js'
4-
import { inlinePlz } from '../unparsing/inline-plz.js'
3+
import { inlinePlz, unparse } from '../unparsing.js'
54

65
export type KeyPath = readonly Atom[]
76

src/language/semantics/semantic-graph.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ import type {
77
} from '../errors.js'
88
import type { Atom, Molecule } from '../parsing.js'
99
import type { Canonicalized } from '../parsing/syntax-tree.js'
10-
import { unparse } from '../unparsing.js'
11-
import { inlinePlz } from '../unparsing/inline-plz.js'
10+
import { inlinePlz, unparse } from '../unparsing.js'
1211
import { serializeFunctionNode, type FunctionNode } from './function-node.js'
1312
import { stringifyKeyPathForEndUser, type KeyPath } from './key-path.js'
1413
import {

src/language/unparsing.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ import type { UnserializableValueError } from './errors.js'
33
import type { Atom, Molecule } from './parsing.js'
44
import type { Notation } from './unparsing/unparsing-utilities.js'
55

6-
export { type Notation } from './unparsing/unparsing-utilities.js'
6+
export { inlinePlz } from './unparsing/inline-plz.js'
7+
export { prettyJson } from './unparsing/pretty-json.js'
8+
export { prettyPlz } from './unparsing/pretty-plz.js'
9+
export type { Notation } from './unparsing/unparsing-utilities.js'
710

811
export const unparse = (
912
value: Atom | Molecule,

0 commit comments

Comments
 (0)