Skip to content
This repository has been archived by the owner on Oct 14, 2023. It is now read-only.

Segfault with monad inference #1958

Open
1 task done
digama0 opened this issue Apr 17, 2018 · 0 comments
Open
1 task done

Segfault with monad inference #1958

digama0 opened this issue Apr 17, 2018 · 0 comments

Comments

@digama0
Copy link
Contributor

digama0 commented Apr 17, 2018

Prerequisites

  • Put an X between the brackets on this line if you have done all of the following:
    • Checked that your issue isn't already filed.
    • Reduced the issue to a self-contained, reproducible test case.

Description

The following code produces a segfault:

meta def M1 := state_t unit tactic
meta def F (n : name) : M1 unit := sorry
meta def M2 := state_t unit tactic

meta instance : monad M2 := state_t.monad
meta instance : has_monad_lift M1 M2 :=
⟨λ α ⟨c⟩, ⟨λ tr, do a ← c (), return a⟩⟩

meta def T : M2 unit := monad_lift (F n) >>= _

[PS: Not sure if this qualifies as a bug worth fixing since 3.4 is frozen. Feel free to ignore or fix only in lean 4.]

Versions

Lean v3.4.0 (dd6e91f)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant