update imports
This commit is contained in:
parent
d661524857
commit
18d005aa92
8 changed files with 21 additions and 15 deletions
6
package-lock.json
generated
6
package-lock.json
generated
|
@ -9,6 +9,7 @@
|
|||
"version": "1.0.0",
|
||||
"license": "GPL-3.0-or-later",
|
||||
"dependencies": {
|
||||
"izuna": "git+https://git.kitsu.cafe/rowan/izuna.git",
|
||||
"typescript": "^5.8.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@ -21,6 +22,11 @@
|
|||
"dev": true,
|
||||
"license": "GPL-3.0-or-later"
|
||||
},
|
||||
"node_modules/izuna": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "git+https://git.kitsu.cafe/rowan/izuna.git#e11a0870c27eeb5ea1a4ae3fedccca008eda15c2",
|
||||
"license": "GPL-3.0-or-later"
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "5.8.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz",
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
"folktest": "git+https://git.kitsu.cafe/rowan/folktest.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"izuna": "git+https://git.kitsu.cafe/rowan/izuna.git",
|
||||
"typescript": "^5.8.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ const Interfaces = Algebra(Monad)
|
|||
* @template T
|
||||
* @implements {Applicative<T>}
|
||||
*/
|
||||
class Pure extends Interfaces {
|
||||
export class Pure extends Interfaces {
|
||||
#value
|
||||
|
||||
/**
|
||||
|
@ -75,7 +75,7 @@ class Pure extends Interfaces {
|
|||
* @template T
|
||||
* @implements {Applicative<T>}
|
||||
*/
|
||||
class Impure extends Interfaces {
|
||||
export class Impure extends Interfaces {
|
||||
#value
|
||||
#next
|
||||
|
||||
|
@ -171,5 +171,7 @@ export const liftF = value => impure(value, pure)
|
|||
* @template T
|
||||
* @type {ApplicativeTypeRef<T, Free<T>>}
|
||||
*/
|
||||
export const Free = Pure
|
||||
export const TypeRef = Pure
|
||||
TypeRef.constructor['of'] = Pure
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
export * from './option.js'
|
||||
export * from './result.js'
|
||||
export * from './list.js'
|
||||
export * from './free.js'
|
||||
export * from './io.js'
|
||||
export * from './reader.js'
|
||||
export { TypeRef as Option, Some, None, some, none } from './option.js'
|
||||
export { TypeRef as Result, Ok, Err, ok, err } from './result.js'
|
||||
export { TypeRef as Free, liftF } from './free.js'
|
||||
export { List, list } from './list.js'
|
||||
export { IO } from './io.js'
|
||||
export { Reader } from './reader.js'
|
||||
|
||||
|
|
|
@ -168,9 +168,7 @@ export class None extends Interfaces {
|
|||
export const some = value => new Some(value)
|
||||
export const none = new None()
|
||||
|
||||
const TypeRef = some
|
||||
export const TypeRef = some
|
||||
TypeRef.constructor['of'] = some
|
||||
TypeRef.constructor['zero'] = none
|
||||
|
||||
export const Option = TypeRef
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { id } from '../../vendor/izuna/src/index.js'
|
||||
import { id } from 'izuna'
|
||||
import { Algebra, Monad } from './interfaces.js'
|
||||
|
||||
/** @import { ApplicativeTypeRef, Apply, Chain, Functor, InferredMorphism, Morphism } from './types.js' */
|
||||
|
|
|
@ -281,7 +281,7 @@ export const ok = v => new Ok(v)
|
|||
*/
|
||||
export const err = e => new Err(e)
|
||||
|
||||
const TypeRef = ok
|
||||
export const TypeRef = ok
|
||||
TypeRef.constructor['of'] = ok
|
||||
TypeRef.constructor['zero'] = err
|
||||
|
||||
|
|
1
vendor/izuna
vendored
1
vendor/izuna
vendored
|
@ -1 +0,0 @@
|
|||
Subproject commit aa70427c8c349bbfe4576cba878f5b44859007d4
|
Loading…
Add table
Reference in a new issue