Skip to content

Commit

Permalink
Throw error if trying to create a session that already exists
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdone committed May 12, 2014
1 parent ff2f361 commit b180578
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions haskell-session.el
Expand Up @@ -269,6 +269,8 @@ If DONTCREATE is non-nil don't create a new session."

(defun haskell-session-make (name)
"Make a Haskell session."
(when (haskell-session-lookup name)
(error "Session of name %s already exists!" name))
(let ((session (set (make-local-variable 'haskell-session)
(list (cons 'name name)))))
(add-to-list 'haskell-sessions session)
Expand Down

0 comments on commit b180578

Please sign in to comment.