gapt.formats.json.SequentCodec.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gapt_3 Show documentation
Show all versions of gapt_3 Show documentation
General Architecture for Proof Theory
The newest version!
package gapt.formats.json
import gapt.proofs.{Ant, HOLSequent, SequentIndex, Suc}
import io.circe._
import io.circe.generic.semiauto._
object SequentCodec {
private[json] val _holSequentEncoder: Encoder[HOLSequent] = deriveEncoder[HOLSequent]
private[json] val _holSequentDecoder: Decoder[HOLSequent] = deriveDecoder[HOLSequent]
private[json] val _sequentIndexEncoder: Encoder[SequentIndex] = Encoder.encodeInt.contramap(_.toInt)
private[json] val _sequentIndexDecoder: Decoder[SequentIndex] = Decoder.decodeInt.map(SequentIndex.fromSignedInt)
}