@@ -268,7 +268,7 @@ partial def encodeCBOR (value : CBORValue) : ByteArray :=
268268 else
269269 ByteArray.mk #[0xF8 , n.toUInt8]
270270
271- | .float f =>
271+ | .float _f =>
272272 -- IEEE 754 single-precision float (major type 7, additional info 26)
273273 -- TODO: Implement Float.toBits.toLittleEndian for Lean 4.15.0
274274 ByteArray.mk #[0xFB , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ]
@@ -327,7 +327,7 @@ def decodeUnsignedCBOR (d : CBORDecoder) (addInfo : UInt8) : Except String (Nat
327327 else if addInfo == 27 then
328328 -- 8-byte follows (big-endian)
329329 do
330- let (bytes , d') ← d.readBytes 8
330+ let (_bytes , d') ← d.readBytes 8
331331 -- TODO: Implement UInt64.fromBigEndian for Lean 4.15.0
332332 let val := 0 -- Stub
333333 .ok (val, d')
@@ -356,7 +356,7 @@ partial def decodeCBORValue (d : CBORDecoder) : Except String (CBORValue × CBOR
356356
357357 | 3 => -- Text string
358358 let (len, d2) ← decodeUnsignedCBOR d1 addInfo
359- let (bytes , d3) ← d2.readBytes len
359+ let (_bytes , d3) ← d2.readBytes len
360360 let str := "" -- TODO: Implement String.fromUTF8 for Lean 4.15.0
361361 .ok (.textString str, d3)
362362
@@ -398,14 +398,14 @@ partial def decodeCBORValue (d : CBORDecoder) : Except String (CBORValue × CBOR
398398 else if addInfo == 26 then
399399 -- Single-precision float (32-bit)
400400 do
401- let (bytes , d2) ← d1.readBytes 4
401+ let (_bytes , d2) ← d1.readBytes 4
402402 -- TODO: Implement UInt32.fromLittleEndian for Lean 4.15.0
403403 let f := 0 .0
404404 .ok (.float f, d2)
405405 else if addInfo == 27 then
406406 -- Double-precision float (64-bit)
407407 do
408- let (bytes , d2) ← d1.readBytes 8
408+ let (_bytes , d2) ← d1.readBytes 8
409409 -- TODO: Implement UInt64.fromLittleEndian for Lean 4.15.0
410410 let f := 0 .0
411411 .ok (.float f, d2)
@@ -434,14 +434,14 @@ def decodeCBOR (bytes : ByteArray) : Except String CBORValue := do
434434-/
435435def serializeTypedValueBinary (tv : Σ t : TypeExpr, TypedValue t) : ByteArray :=
436436 match tv with
437- | ⟨.nat, .nat n ⟩ =>
437+ | ⟨.nat, .nat _n ⟩ =>
438438 -- Tag (0x01) + 8 bytes little-endian
439439 let tag : UInt8 := 0x01
440440 -- TODO: Implement toLittleEndian for Lean 4.15.0
441441 let valueBytes := ByteArray.mk #[0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ]
442442 ByteArray.mk #[tag] ++ valueBytes
443443
444- | ⟨.boundedNat min max , .boundedNat _ _ bn ⟩ =>
444+ | ⟨.boundedNat _min _max , .boundedNat _ _ _bn ⟩ =>
445445 -- Tag (0x02) + min (8 bytes) + max (8 bytes) + value (8 bytes)
446446 let tag : UInt8 := 0x02
447447 -- TODO: Implement toLittleEndian for Lean 4.15.0
@@ -553,14 +553,14 @@ def fromSQLValue (sqlValue : String) (expectedType : TypeExpr) : Except String (
553553def testJSONRoundTrip (tv : Σ t : TypeExpr, TypedValue t) : Bool :=
554554 let json := serializeTypedValueJSON tv
555555 match deserializeTypedValueJSON json with
556- | .ok tv ' => true -- TODO: Check equality
556+ | .ok _tv ' => true -- TODO: Check equality
557557 | .error _ => false
558558
559559/-- Test: Binary round-trip -/
560560def testBinaryRoundTrip (tv : Σ t : TypeExpr, TypedValue t) : Bool :=
561561 let bytes := serializeTypedValueBinary tv
562562 match deserializeTypedValueBinary bytes with
563- | .ok tv ' => true -- TODO: Check equality
563+ | .ok _tv ' => true -- TODO: Check equality
564564 | .error _ => false
565565
566566-- ============================================================================
@@ -587,7 +587,7 @@ partial def jsonToBytes (json : JsonValue) : ByteArray :=
587587 (stringify json).toUTF8
588588
589589/-- Parse JSON from UTF-8 bytes -/
590- def bytesToJson (bytes : ByteArray) : Except String JsonValue :=
590+ def bytesToJson (_bytes : ByteArray) : Except String JsonValue :=
591591 -- TODO: Full JSON parser (for now, stub)
592592 .error "JSON parsing not yet implemented"
593593
0 commit comments