Skip to content

unexpected "not a macro monad value" error #278

Description

@gelisam
#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".

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions