branch: elpa/haskell-tng-mode commit f3e38388c7d002b4a850b22d6f6561b663140da6 Author: Tseen She <ts33n....@gmail.com> Commit: Tseen She <ts33n....@gmail.com>
starting to transcribe the expression table --- README.md | 4 +++- haskell-tng-lexer.el | 6 ++++++ haskell-tng-smie.el | 3 ++- haskell-tng-syntax.el | 3 +++ 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5e84623..f69477d 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ Some blue sky features are being considered but may be best as independent proje - `.cabal` editing / navigation - [`.hie`](https://ghc.haskell.org/trac/ghc/wiki/HIEFiles) files as a parser backend and many type based queries. -- lightweight interactive commands ([`dante`](https://github.com/jyp/dante) / [`intero`](https://github.com/commercialhaskell/intero)) (or perhaps redundant with `.hie`). +- lightweight interactive commands ([`dante`](https://github.com/jyp/dante) / [`intero`](https://github.com/commercialhaskell/intero) / [`hhp`](https://github.com/kazu-yamamoto/hhp)), will be made redundant with `.hie`: - `:type` at point - `:browse` `company-backend` - `:doc` at point @@ -86,3 +86,5 @@ Some blue sky features are being considered but may be best as independent proje - be compatible with [`apply-refact`](https://github.com/mpickering/apply-refact) / [`hlint-refactor-mode`](https://github.com/mpickering/hlint-refactor-mode) - convert wildcard import to explicit list - insert explicit list of exports +- Reviewing + - hide changes to imports when reviewing diffs diff --git a/haskell-tng-lexer.el b/haskell-tng-lexer.el index 28fd6ce..3110e4a 100644 --- a/haskell-tng-lexer.el +++ b/haskell-tng-lexer.el @@ -89,6 +89,12 @@ the lexer." (looking-at (rx (+ (| (syntax word) (syntax symbol)))))) (haskell-tng-lexer:last-match)) + ;; TODO infix operators should be converted to a virtual token + ;; (with some important ones allowed through for fixity) + + ;; TODO virtual tokens for pattern matches. Would be even better if + ;; it was in the syntax table so fontification could benefit. + ;; single char (t (forward-char) diff --git a/haskell-tng-smie.el b/haskell-tng-smie.el index cbd281f..67de3f2 100644 --- a/haskell-tng-smie.el +++ b/haskell-tng-smie.el @@ -36,7 +36,7 @@ (infixexp "::" type) (infixexp)) - ;; TODO monkey patch `smie-indent-forward' to support regexps in `assoc' + ;; TODO update the lexer to provide a virtual token for infix (infixexp (lexp "$" infixexp) ;; TODO arrange by fixity (lexp "+" infixexp) @@ -80,6 +80,7 @@ (stmt (id "<-" exp)) + ;; TODO operator precedences )))) ;; TODO indentation rules diff --git a/haskell-tng-syntax.el b/haskell-tng-syntax.el index d8c79ae..1761539 100644 --- a/haskell-tng-syntax.el +++ b/haskell-tng-syntax.el @@ -86,6 +86,9 @@ (put-text-property open (1+ open) 'syntax-table '(7 . ?\')) (put-text-property close (1+ close) 'syntax-table '(7 . ?\'))))) +;; TODO or look for non-string backslashes. While we're at it, we could mark +;; everything up to the -> with an apat property / category. Alternatively this +;; would need to be in the lexer (and fontification would miss out). (defun haskell-tng:syntax:escapes (start end) "Backslash inside String is an escape character." (goto-char start)