 ;;   David Christiansen <david@davidchristiansen.dk>
 ;;
 ;; Keywords: tools, languages, convenience
-;; Version: 0.1
+;; Version: 0.2
 ;; Package-Requires: ((emacs "24.1") (flycheck "0.22"))
 
 ;; This file is not part of GNU Emacs, but it is distributed under the


(require 'flycheck)

(flycheck-define-checker urweb
  "Ur/Web checker"
  :command ("urweb" "-tc"
            (eval (file-name-sans-extension
                   (car (flycheck-substitute-argument 'source-original
                                                 'urweb)))))
  ;; filename:1:0: (to 1:0) syntax error found at SYMBOL
  ;; /home/artyom/projects/urweb-test/test.ur:1:0: (to 1:38) Some constructor unification variables are undetermined in declaration
  ;; (look for them as "<UNIF:...>")
  ;; Decl:
  ;; val rec

          " (to " (1+ num) ?: (1+ num) ")"
          ;; AS: indebted to David Christiansen for this rx expression!
          (message (and (* nonl) (* "\n" (not (any "/" "~")) (* nonl))))))
  :predicate
  (lambda ()
    (buffer-file-name))
  :modes (urweb-mode))

;;;###autoload
