Reading and writing 'Defs' from/to a binary file. In order to be saved, a name must have been flagged using 'toSave'. (Otherwise we'd save out everything, not just the things in the current file).
import public Core.Binary.Prims
import public Libraries.Utils.BinaryttcVersion : IntTTC files can only be compatible if the version number is the same
Update with the current date in YYYY_MM_DD_00 format, or bump the auxiliary
version number if you're changing the version more than once in the same day.
checkTTCVersion : String -> Int -> Int -> Core ()writeToTTC : (HasNames extra, TTC extra) => Ref Ctxt Defs => Ref UST UState => extra -> String -> String -> Core ()updatePair : Ref Ctxt Defs => Maybe PairNames -> Core ()updateRewrite : Ref Ctxt Defs => Maybe RewriteNames -> Core ()updatePrimNames : PrimNames -> PrimNames -> PrimNamesupdatePrims : Ref Ctxt Defs => PrimNames -> Core ()updateForeignImpl : Ref Ctxt Defs => List (Name, String) -> Core ()updateNameDirectives : Ref Ctxt Defs => List (Name, List String) -> Core ()updateCGDirectives : Ref Ctxt Defs => List (CG, String) -> Core ()updateTransforms : Ref Ctxt Defs => List (Name, Transform) -> Core ()updateFExports : Ref Ctxt Defs => List (Name, List (String, String)) -> Core ()readFromTTC : TTC extra => Ref Ctxt Defs => Ref UST UState => Bool -> FC -> Bool -> String -> ModuleIdent -> Namespace -> Core (Maybe (extra, (Int, List (ModuleIdent, (Bool, Namespace)))))getTotalReq : String -> Ref Bin Binary -> Core TotalReqgetHashes : String -> Ref Bin Binary -> Core (Maybe String, Int)readTotalReq : String -> Core (Maybe TotalReq)readHashes : String -> Core (Maybe String, Int)readImportHashes : String -> Core (List (Namespace, Int))readIncData : String -> Core (List (CG, (String, List String)))