stedolan / malfunction

Malfunctional Programming
Other
336 stars 19 forks source link

"no bindings?" #4

Closed olleharstedt closed 8 years ago

olleharstedt commented 8 years ago

Hey, sorry to bother you. Maybe you can help me out with this one?

(module
  (let ($myVar 10)  ; $myVar = 10
    (_ (apply (global $Pervasives $print_string) "Hello, world!\n")))  ; body of let
  (export))

Get error "no bindings?"

olleharstedt commented 8 years ago

Hm, maybe I can modify the error message so it spits out error location?

olleharstedt commented 8 years ago

Solved with this:

(module
  (_
    (let ($asd 10)
      (apply (global $Pervasives $print_string) "Hello, world!\n")))
  (export))