ssm-lang / sslang

A language built atop the Sparse Synchronous Model
BSD 3-Clause "New" or "Revised" License
18 stars 0 forks source link

Tuple func signature #136

Closed xiaoqiangheye closed 1 year ago

xiaoqiangheye commented 1 year ago

add branch for function signatures

EmilySillars commented 1 year ago

I am pretty sure this work is superseded by #129

j-hui commented 1 year ago

@xiaoqiangheye @yiming-fang can you please follow up and determine whether this PR is superseded by #129? My understanding is that it isn't: #129 deals with the expansion of nested patterns at the IR level, whereas this PR only works with the front-end.

There may also be overlap with #128 , but I'm not sure (I'll read the code for this PR more closely later)

In any case, I think we need to clarify what this PR intends to do, since the title implies it is related to function signatures rather than patterns.

xiaoqiangheye commented 1 year ago

this will expand a tuple match on function signatures to a match expression. I am not sure if #129 will does this at IR level.

For example, fun foo (x,y) = c

will be expanded to

fun foo temp_1 temp_2 = match temp_1 with x -> match temp_2 with y -> c

On Mon, Jan 30, 2023 at 4:03 PM John Hui @.***> wrote:

@xiaoqiangheye https://urldefense.com/v3/__https://github.com/xiaoqiangheye__;!!K-Hz7m0Vt54!nJ-2WcR2U3tKs54-FuhQWg0J9WosrLQiZDI_Yw95WvXKBQfrChHbMHjjMzkOZeIN_1_PnV1nv6lo01GSLvRjb0aJ$ @yiming-fang https://urldefense.com/v3/__https://github.com/yiming-fang__;!!K-Hz7m0Vt54!nJ-2WcR2U3tKs54-FuhQWg0J9WosrLQiZDI_Yw95WvXKBQfrChHbMHjjMzkOZeIN_1_PnV1nv6lo01GSLn2XrKpf$ can you please follow up and determine whether this PR is superseded by

129

https://urldefense.com/v3/__https://github.com/ssm-lang/sslang/pull/129__;!!K-Hz7m0Vt54!nJ-2WcR2U3tKs54-FuhQWg0J9WosrLQiZDI_Yw95WvXKBQfrChHbMHjjMzkOZeIN_1_PnV1nv6lo01GSLrE6IvsH$? My understanding is that it isn't: #129 https://urldefense.com/v3/__https://github.com/ssm-lang/sslang/pull/129__;!!K-Hz7m0Vt54!nJ-2WcR2U3tKs54-FuhQWg0J9WosrLQiZDI_Yw95WvXKBQfrChHbMHjjMzkOZeIN_1_PnV1nv6lo01GSLrE6IvsH$ deals with the expansion of nested patterns at the IR level, whereas this PR only works with the front-end.

In any case, I think we need to clarify what this PR intends to do, since the title implies it is related to function signatures rather than patterns.

— Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https://github.com/ssm-lang/sslang/pull/136*issuecomment-1409334298__;Iw!!K-Hz7m0Vt54!nJ-2WcR2U3tKs54-FuhQWg0J9WosrLQiZDI_Yw95WvXKBQfrChHbMHjjMzkOZeIN_1_PnV1nv6lo01GSLp8OJXOK$, or unsubscribe https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AGXGWUYFXW2VTLD3FBFOSN3WVAUD5ANCNFSM6AAAAAAS4V2JSQ__;!!K-Hz7m0Vt54!nJ-2WcR2U3tKs54-FuhQWg0J9WosrLQiZDI_Yw95WvXKBQfrChHbMHjjMzkOZeIN_1_PnV1nv6lo01GSLtytrDZh$ . You are receiving this because you were mentioned.Message ID: @.***>

yiming-fang commented 1 year ago

This PR does not really overlap with #129 which is exclusively on the IR, but might be relevant for #128. I remember when @hzhou07 and I were working on #128 last semester, we did not have PatTup support. Is this what you are adding in this current PR @xiaoqiangheye?