Theoremspec_exposing
Copies across modules (sec:dynamic-modules-reduced): A makes f$Int because Main requests it (modules are specialised last to first); A's header item f and Main's import item f each stand for f, f$Int.
Statement
theorem spec_exposing :
onOk exposingView (endToEnd Btest s_spec_exposing) =
some (some (.items [.var "f", .var "f$Int"]), some ["f", "f$Int"], some [.int 1],
some (some (.items [.var "f", .var "f$Int"])),
some [lid "text", qlid "Debug" "toString", lid "f$Int"])Proof
by
decide +kernelProved by decide +kernel: Lean's kernel itself runs the decision procedure, here the evaluator, and checks that the answer is true, so nothing outside the kernel is trusted.
In StandardElmMech/Stat/SpecExamples.lean: The rulings on small programs: A27 (a free number is Float, annotations bind), A87 (the default copy is made), A93 (vacuous variables), polymorphic recursion, copy names, abs$Int, exposing items, payload types, kinds of main, eight copies, renaming invariance, record-pattern copies.
A Standard Definition of Elm? (Draft version 0.4) © Rupert Smith. The text is licensed under CC BY 4.0: share and adapt it freely, with credit and a link to the licence.