diff --git a/haskell-commands.el b/haskell-commands.el index c94d49a63..2b81eaa13 100644 --- a/haskell-commands.el +++ b/haskell-commands.el @@ -580,7 +580,8 @@ command from GHCi." :go (lambda (state) (haskell-process-send-string (car state) - (if (string-match "^[A-Za-z_]" (cdr state)) + (if (and (stringp (cdr state)) + (string-match "^[A-Za-z_]" (cdr state))) (format ":info %s" (cdr state)) (format ":info (%s)" (cdr state))))) :complete (lambda (state response) @@ -598,7 +599,8 @@ command from GHCi." :go (lambda (state) (haskell-process-send-string (car state) - (if (string-match "^[A-Za-z_]" (cdr state)) + (if (and (stringp (cdr state)) + (string-match "^[A-Za-z_]" (cdr state))) (format ":type %s" (cdr state)) (format ":type (%s)" (cdr state))))) :complete (lambda (state response)