///|
/// Semantics walkthrough: type kind / labeled `~` params / pub(open).
/// Run with: `moon run examples/semantics`
fn main {
  let old_mbti =
    #|pub type BigRational
    #|pub type Hash = Bytes
    #|pub(open) trait Num {
    #|  abs(Self) -> Self
    #|}
    #|pub fn encode(Bytes, encoding~ : String) -> Bytes
    #|impl Show for Point with to_string(Self) -> String
  let new_mbti =
    #|pub type BigRational = Rational[BigInt]
    #|pub type Hash = String
    #|pub trait Num {
    #|  abs(Self) -> Self
    #|}
    #|pub fn encode(Bytes, encoding~ : String, pad~ : Bool) -> Bytes
    #|impl Show for Point with to_string(Self) -> StringView
  let report = @lib.compare_mbti_content(old_mbti, new_mbti)
  println("example: moon_api_guard semantics walkthrough")
  println("breaking: \{report.breaking_count()}")
  println("compatible: \{report.compatible_count()}")
  println("semver: \{report.semver_suggestion()}")
  for change in report.changes {
    println("- \{change.detail}: \{change.kind} \{change.name}")
  }
  println(report.semver_advice())
}