import { L, _ } from './core'; import { toNumber as $n, Byte, fromNumber as _n, x00 } from './byte'; import { Empty, String, cons, fromString as _s, wrap } from './string'; export type Char = Byte; export const Null: Char = x00; export { inc, dec, ifz as ifn, cmp, lt, le, eq, ge, gt } from './byte'; export const show: L<(c: Char) => String> = _(c => wrap(_s('\''))(cons(c)(Empty))); export const fromChar: (c: string) => Char = c => _n(c.charCodeAt(0)); export const toChar: (c: Char) => string = c => String.fromCharCode($n(c));