Skip to content

Commit 64ee2b9

Browse files
committed
Adopt @matt.kantor/option package
1 parent ca0da58 commit 64ee2b9

File tree

19 files changed

+56
-97
lines changed

19 files changed

+56
-97
lines changed

package-lock.json

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"typescript": "^5.6.2"
2020
},
2121
"dependencies": {
22+
"@matt.kantor/option": "^1.0.0",
2223
"kleur": "^4.1.5"
2324
}
2425
}

src/adts.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
import * as eitherUtilities from './adts/either-utilities.js'
22
import * as eitherAdt from './adts/either.js'
3-
import * as optionUtilities from './adts/option-utilities.js'
4-
import * as optionAdt from './adts/option.js'
53

64
export type { Either } from './adts/either.js'
7-
export type { Option } from './adts/option.js'
85
export const either = { ...eitherAdt, ...eitherUtilities }
9-
export const option = { ...optionAdt, ...optionUtilities }

src/adts/option-utilities.ts

Lines changed: 0 additions & 29 deletions
This file was deleted.

src/adts/option.ts

Lines changed: 0 additions & 33 deletions
This file was deleted.

src/language/compiling/semantics.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
import option from '@matt.kantor/option'
12
import assert from 'node:assert'
2-
import { either, option, type Either } from '../../adts.js'
3+
import { either, type Either } from '../../adts.js'
34
import { withPhantomData } from '../../phantom-data.js'
45
import { testCases } from '../../test-utilities.test.js'
56
import type { Writable } from '../../utility-types.js'

src/language/compiling/semantics/keyword-handlers/check-handler.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { either, option, type Either } from '../../../../adts.js'
1+
import option from '@matt.kantor/option'
2+
import { either, type Either } from '../../../../adts.js'
23
import type { ElaborationError } from '../../../errors.js'
34
import {
45
asSemanticGraph,

src/language/compiling/semantics/keyword-handlers/function-handler.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { either, option, type Either } from '../../../../adts.js'
1+
import option from '@matt.kantor/option'
2+
import { either, type Either } from '../../../../adts.js'
23
import type { ElaborationError } from '../../../errors.js'
34
import {
45
asSemanticGraph,

src/language/compiling/semantics/keyword-handlers/lookup-handler.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { either, option, type Either, type Option } from '../../../../adts.js'
1+
import option, { type Option } from '@matt.kantor/option'
2+
import { either, type Either } from '../../../../adts.js'
23
import type {
34
ElaborationError,
45
InvalidExpressionError,

src/language/parsing/syntax-tree.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { option, type Option } from '../../adts.js'
1+
import option, { type Option } from '@matt.kantor/option'
22
import { parser, type Parser } from '../../parsing.js'
33
import { withPhantomData, type WithPhantomData } from '../../phantom-data.js'
44
import type {

0 commit comments

Comments
 (0)