Returns true if this starts with the Ion binary version marker.
Equations
- Ion.isIonFile bytes = ByteArray.startsWith✝ bytes Ion.binaryVersionMarker
Instances For
@[implicit_reducible]
Equations
- Ion.instReprPosition = { reprPrec := Ion.instReprPosition.repr }
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[implicit_reducible]
Equations
- Ion.Position.instToString = { toString := fun (p : Ion.Position) => have l := (Array.map toString p.indices).toList; ".".intercalate ("root" :: l) }
Create value
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Monad for constructing local symbol table for values.
Equations
Instances For
@[implicit_reducible]
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
@[irreducible]
Resolve string symbols to symbol ids by constructing local symbol table.
Equations
- One or more equations did not get rendered due to their size.
- Ion.Ion.mapSymbolM f { app := Ion.IonF.null tp } = pure (Ion.Ion.null tp)
- Ion.Ion.mapSymbolM f { app := Ion.IonF.bool x_1 } = pure (Ion.Ion.bool x_1)
- Ion.Ion.mapSymbolM f { app := Ion.IonF.int x_1 } = pure (Ion.Ion.int x_1)
- Ion.Ion.mapSymbolM f { app := Ion.IonF.float f_1 } = pure (Ion.Ion.float f_1)
- Ion.Ion.mapSymbolM f { app := Ion.IonF.decimal d } = pure (Ion.Ion.decimal d)
- Ion.Ion.mapSymbolM f { app := Ion.IonF.string s } = pure (Ion.Ion.string s)
- Ion.Ion.mapSymbolM f { app := Ion.IonF.symbol s } = Ion.Ion.symbol <$> f s
- Ion.Ion.mapSymbolM f { app := Ion.IonF.blob s } = pure (Ion.Ion.blob s)
- Ion.Ion.mapSymbolM f { app := Ion.IonF.annotation l v } = do let l ← Array.mapM f l let __do_lift ← Ion.Ion.mapSymbolM f v pure (Ion.Ion.annotation l __do_lift)
Instances For
Resolve string symbols to symbol ids by constructing local symbol table.
Instances For
Equations
- Ion.Ion.unintern tbl v = (Ion.Ion.mapSymbolM (fun (s : Ion.SymbolId) => pure tbl[s]!) v).run
Instances For
Equations
- Ion.intern values symbols = match Ion.runIntern (List.mapM (fun (x : Ion.Ion String) => x.intern) values) symbols with | (tbl, v) => (tbl.localSymbolTableValue :: v).toArray
Instances For
def
Ion.internAndSerialize
(values : List (Ion String))
(symbols : SymbolTable := SymbolTable.system)
:
Write values
Equations
- Ion.internAndSerialize values symbols = Ion.serialize (Ion.intern values symbols)
Instances For
def
Ion.writeBinaryFile
(path : System.FilePath)
(values : List (Ion String))
(symbols : SymbolTable := SymbolTable.system)
:
Write a list of Ion values to file.
Equations
- Ion.writeBinaryFile path values symbols = IO.FS.writeBinFile path (Ion.internAndSerialize values symbols)