#lang "prelude.kl"
(import (shift "prelude.kl" 1))
(import "define-syntax-rule.kl")
(define-macro (convert)
(>>= (which-problem)
(lambda (problem)
(case problem
[(expression type)
(type-case type
[(-> Integer _)
(pure 'integer->string)]
[(-> String _)
(pure 'string->integer)])]))))
(example (convert 42))
The example is incorrect, it should be ((convert) 42). I would thus expect an error along the lines of "convert: incorrect syntax, expected 0 arguments, got 1". Instead, I get "Not a macro monad value".
The example is incorrect, it should be
((convert) 42). I would thus expect an error along the lines of "convert: incorrect syntax, expected 0 arguments, got 1". Instead, I get "Not a macro monad value".