Skip to content

Clean up haskell-string.el utiliy module. #508

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 13, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ ELFILES = \
haskell-show.el \
haskell-simple-indent.el \
haskell-sort-imports.el \
haskell-str.el \
haskell-string.el \
haskell-unicode-input-method.el \
haskell-utils.el \
Expand Down
4 changes: 2 additions & 2 deletions haskell-indent.el
Original file line number Diff line number Diff line change
Expand Up @@ -658,8 +658,8 @@ Returns the location of the start of the comment, nil otherwise."
(string-match "where[ \t]*" haskell-indent-current-line-first-ident))
(diff-first ; not a function def with the same name
(or (null valname-string)
(not (string= (haskell-trim valname-string)
(haskell-trim haskell-indent-current-line-first-ident)))))
(not (string= (haskell-string-trim valname-string)
(haskell-string-trim haskell-indent-current-line-first-ident)))))

;; (is-type-def
;; (and rhs-sign (eq (char-after rhs-sign) ?\:)))
Expand Down
2 changes: 1 addition & 1 deletion haskell-interactive-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ SESSION, otherwise operate on the current buffer.
(message "%s"
(concat (car lines)
(if (and (cdr lines) (stringp (cadr lines)))
(format " [ %s .. ]" (haskell-string-take (haskell-trim (cadr lines)) 10))
(format " [ %s .. ]" (haskell-string-take (haskell-string-trim (cadr lines)) 10))
""))))))

(defun haskell-interactive-mode-tab ()
Expand Down
8 changes: 4 additions & 4 deletions haskell-process.el
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
(require 'haskell-compat)
(require 'haskell-session)
(require 'haskell-customize)
(require 'haskell-str)
(require 'haskell-string)

(defconst haskell-process-prompt-regex "\4"
"Used for delimiting command replies. 4 is End of Transmission.")
Expand Down Expand Up @@ -272,17 +272,17 @@ This uses `accept-process-output' internally."
(defun haskell-process-get-repl-completions (process inputstr)
"Perform `:complete repl ...' query for INPUTSTR using PROCESS."
(let* ((reqstr (concat ":complete repl "
(haskell-str-literal-encode inputstr)))
(haskell-string-literal-encode inputstr)))
(rawstr (haskell-process-queue-sync-request process reqstr)))
(if (string-prefix-p "unknown command " rawstr)
(error "GHCi lacks `:complete' support")
(let* ((s1 (split-string rawstr "\r?\n" t))
(cs (mapcar #'haskell-str-literal-decode (cdr s1)))
(cs (mapcar #'haskell-string-literal-decode (cdr s1)))
(h0 (car s1))) ;; "<cnt1> <cnt2> <quoted-str>"
(unless (string-match "\\`\\([0-9]+\\) \\([0-9]+\\) \\(\".*\"\\)\\'" h0)
(error "Invalid `:complete' response"))
(let ((cnt1 (match-string 1 h0))
(h1 (haskell-str-literal-decode (match-string 3 h0))))
(h1 (haskell-string-literal-decode (match-string 3 h0))))
(unless (= (string-to-number cnt1) (length cs))
(error "Lengths inconsistent in `:complete' reponse"))
(cons h1 cs))))))
Expand Down
2 changes: 1 addition & 1 deletion haskell-show.el
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
(defun haskell-show-parse-and-insert (given)
"Parse a `string' containing a Show instance value and insert
it pretty printed into the current buffer."
(when (not (string= "" (haskell-trim given)))
(when (not (string= "" (haskell-string-trim given)))
(let ((current-column (- (point)
(line-beginning-position)))
(result (haskell-show-parse given)))
Expand Down
167 changes: 0 additions & 167 deletions haskell-str.el

This file was deleted.

Loading