However, I've some thoughts about modifying it, if you don't mind.
1. Rather than doing plain open-network-stream, I'd go for a dedicated buffer (wouldn't it be easier to snoop on what's been sent back and forth using it?).
So, with your permission, I'd like to modify it a bit, is that fine? I'm surely share it once it is workable.
PS, I didn't use EDE or any other kind of project, but below is my attempt at flymake integration, if you don't have it yet, probably one thing you'd like to change is the way *.hxml file is located
(defvar *haxe-compiler* "haxe"
"The path to HaXe compiler")
(defvar *build-hxml* "build.hxml"
"The name of the nxml file to build the project")
(defvar *project-root* "./src/"
"The name of the project source directory.
Upon load the value will be replaced with the `src'
directory found on the path to the loaded file.
This is the best I could do for now")
(defun create-haxe-tags (dir-name)
"Create HaXe tags file."
;; TODO: we can use haxe -xml here to generate the XML
;; and parse it into TAGS file instead.
(interactive "DDirectory: ")
(eshell-command
(format "find %s -type f -name \"*.hx\" | etags -L -" dir-name)))
(defun haxe-flymake-install ()
"install flymake stuff for HaXe files."
(add-to-list
'compilation-error-regexp-alist
'("^\\([^: ]+\\):\\([0-9]+\\): characters \\([0-9]+\\)-[0-9]+ : "
1 2 3))
(message "haxe flymake installed")
(let* ((key "\\.hx\\'")
(haxeentry (assoc key flymake-allowed-file-name-masks)))
(if haxeentry
(setcdr haxeentry '(haxe-flymake-init haxe-flymake-cleanup))
(add-to-list
'flymake-allowed-file-name-masks
(list key 'haxe-flymake-init 'haxe-flymake-cleanup)))))
(defun haxe-flymake-init ()
"initialize flymake for HaXe."
(let ((create-temp-f ' haxe-flymake-create-temp-intemp)
(use-relative-base-dir nil)
(use-relative-source nil)
(get-cmdline-f 'haxe-flymake-get-cmdline)
args
temp-source-file-name)
(message "flymake haxe init")
(setq temp-source-file-name
(flymake-init-create-temp-buffer-copy create-temp-f)
args (flymake-get-syntax-check-program-args
temp-source-file-name *project-root*
use-relative-base-dir use-relative-source
get-cmdline-f))
args))
(defun haxe-flymake-get-cmdline (source base-dir)
"Gets the cmd line for running a flymake session in a HaXe buffer.
This gets called by flymake itself. The output is a list of two elements:
the command to run, and a list of arguments. The resulting command is like:
$ haxe ${project-root}/build.hxml
"
(message "base-dir %s" (file-name-as-directory base-dir))
(list *haxe-compiler*
(list
(concat (file-name-as-directory base-dir)
*build-hxml*))))
(defun haxe-flymake-cleanup ()
(flymake-simple-cleanup))
(defun haxe-flymake-create-temp-intemp (file-name prefix)
"Return file name in temporary directory for checking FILE-NAME.
This is a replacement for `flymake-create-temp-inplace'. The
difference is that it gives a file name in
`temporary-file-directory' instead of the same directory as
FILE-NAME.
For the use of PREFIX see that function.
This won't always work; it will fail if the source module
refers to relative paths.
"
(message "creating temp buffer")
(unless (stringp file-name)
(error "Invalid file-name"))
(or prefix
(setq prefix "flymake"))
(let* ((name (concat
prefix "-"
(file-name-nondirectory
(file-name-sans-extension file-name))
"-"))
(ext (concat "." (file-name-extension file-name)))
(temp-name (make-temp-file name nil ext)))
(flymake-log 3 "create-temp-intemp: file=%s temp=%s" file-name temp-name)
temp-name))
(defun haxe-idenatify-project-root ()
"Lame attempt at finding the root directory of our project.
The assumtion is that most people would call it `src', so we
climb up the directory tree to see if there's a directory with this
name on the path and assume the last such instance to be our project
directory, for example /home/user/projects/foo/src/org/user/utils/Bar.hx
wil result in /home/user/projects/foo/src/ being selected as the root
directory"
(let* ((current (buffer-file-name))
(pos (string-match "/src/" current)))
(when pos
(setq *project-root* (substring current 0 pos)))))
You would also need this file called "haxe-mode" in the "dict" directory inside autocomplete directory before you compile:
This provides some more completion beyond what HaXe compiler would normally give you (after dot or parenthesis).
Sorry for the long post, it's not yet tidy enough so I could host it somewhere for better access.
Best.