snu-sf-class / pl201602

SNU 2016 Fall 4190.310 Programming Language
22 stars 10 forks source link

"aexp" against "Imp.aexp" Ex06 Ass 07 #46

Closed sebspas closed 7 years ago

sebspas commented 7 years ago

The term "e1" has type "aexp" while it is expected to have type "Imp.aexp".

Any way to fix this ?

sebspas commented 7 years ago

Fixpoint s_compile (e : aexp) : list sinstr match e with | ANum n => [SPush n] | AId id => [SLoad id] | APlus e1 e2 => (s_compile e1) ++ (s_compile e2) ++ [SPlus]

Error: In environment e : aexp e1 : aexp e2 : aexp The term "e1" has type "aexp" while it is expected to have type "Imp.aexp".

I dont understand this error ....

aqjune commented 7 years ago

Hello. While solving the problem I didn't see the error. Could you give me more detail? Thanks