Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Send over root directory of project to Emacs.

  • Loading branch information...
commit 8ed1418ca226312791ef05c4d25eaf40f4c70ed8 1 parent a809916
@nominolo authored
Showing with 10 additions and 7 deletions.
  1. +5 −3 emacs/scion.el
  2. +5 −4 src-execs/Server.hs
View
8 emacs/scion.el
@@ -2336,10 +2336,12 @@ loaded."
)))
(defun scion-complete-load-component (result)
- (destructuring-bind (session-id success notes graph) result
- (setq scion-current-thread session-id)
+ (destructuring-bind (session-id home-dir notes graph) result
+ (push (list session-id home-dir graph (scion-make-notes notes))
+ scion-sessions)
+ (setq scion-current-session session-id)
(scion-report-compilation-result
- (list :succeeded success :notes notes :duration 0.42))))
+ (list :succeeded t :notes notes :duration 0.42))))
(defun scion-cabal-component-p (comp)
(cond
View
9 src-execs/Server.hs
@@ -177,7 +177,7 @@ data ServerResponse
| RSupportedLanguages [Extension]
| RQuitting
| RFileConfigs [SessionConfig]
- | RSessionCreated SessionId Bool Notes [ModuleSummary]
+ | RSessionCreated SessionId FilePath Notes [ModuleSummary]
| RFileModifiedResult Bool Notes
data Response
@@ -221,8 +221,8 @@ instance ToLisp ServerResponse where
toLisp RQuitting = L.nil
toLisp (RFileConfigs confs) =
toLisp confs
- toLisp (RSessionCreated sid success notes graph) =
- L.List [toLisp sid, toLisp success, toLisp notes, toLisp graph]
+ toLisp (RSessionCreated sid root_path notes graph) =
+ L.List [toLisp sid, toLisp (T.pack root_path), toLisp notes, toLisp graph]
toLisp (RFileModifiedResult inGraph notes) =
L.List [toLisp inGraph, toLisp notes]
@@ -336,7 +336,8 @@ handleRequest (CreateSession conf) _ = do
sid <- createSession conf
notes <- sessionNotes sid
mods <- sessionModules sid
- return (RSessionCreated sid (not (hasErrors notes)) notes mods)
+ home <- sessionHomeDir <$> getSessionState sid
+ return (RSessionCreated sid home notes mods)
handleRequest (FileModified file) (Just sid) = do
fileModified sid (T.unpack file)
let fileInModuleGraph = True -- FIXME: find out
Please sign in to comment.
Something went wrong with that request. Please try again.