lean4-htt/tests/lean/run/10078.lean
Cameron Zwarich b64111d5a8
fix: convert .proj on builtin types to use projection functions (#10355)
This PR changes `toLCNF` to convert `.proj` for builtin types to use
projection functions instead.

Fixes #10078.
2025-09-12 00:19:45 +00:00

15 lines
670 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@[macro_inline] def rhs (_ : @Eq α x y) := y
def String.data' : type_of% data := fun self => rhs (data.eq_def self)
def ByteArray.data' : type_of% data := fun self => rhs (data.eq_def self)
def FloatArray.data' : type_of% data := fun self => rhs (data.eq_def self)
def Array.toList' : type_of% @toList := fun {α} self => rhs (toList.eq_def α self)
def Thunk.fn' : type_of% @fn := fun {α} self => rhs (fn.eq_def α self)
def Task.get' : type_of% @get := fun {α} self => rhs (get.eq_def α self)
#eval " ".data'
#eval ByteArray.empty.data'
#eval FloatArray.empty.data'
#eval #["", ""].toList'
#eval (Thunk.mk fun _ => "").fn' ()
#eval (Task.spawn fun _ => "").get'