了解です。ちょっと調べてみます。ありがとうございます!
(++)
と happend
の中置演算子としての左右結合性が異なることから来てるから, extensible
のほうで揃える修正もしたほうが便利な気がするけど,どう思いますか? @fumieval
unsafeCoerce `asTypeOf` proofのように定義するというテクニックもあります
(++)
は singletons
のものじゃなくて, extensible
内で独自に定義してるのか.happend
を使わずに結合する方法があるんですか?(<**>) :: (a -> b) -> [[a]] -> [[b]] (<**>) = map . map -- こんなのなかったっけ・・
(<**>) :: Applicative f => f a -> f (a -> b) -> f b
import qualified MyLib as M M.<**>
= 4.7 && < 5- split
= 4.7 && < 5- Data.List.Split
dependencies: - base >= 4.7 && < 5 - split
stack build
をして出てきた文字を全部書いてもらえたら役に立つと思います。.cabal
ファイルが何らかの理由で書き換えられたことになっている場合の警告が出ていないか(具体的なメッセージは忘れてしまいましたが)、/Users/you/Downloads/tanaoroshi
以外の場所に置いていないかAgda
とか messagepack
とかissue無い気がするけどiMac27:tanaoroshi you$ stack build tanaoroshi-0.1.0.0: unregistering (local file changes: package.yaml) tanaoroshi-0.1.0.0: configure (lib + exe) Configuring tanaoroshi-0.1.0.0... tanaoroshi-0.1.0.0: build (lib + exe) Preprocessing library for tanaoroshi-0.1.0.0.. Building library for tanaoroshi-0.1.0.0.. Preprocessing executable 'tanaoroshi' for tanaoroshi-0.1.0.0.. Building executable 'tanaoroshi' for tanaoroshi-0.1.0.0.. tanaoroshi-0.1.0.0: copy/register Installing library in /Users/you/haskell/tanaoroshi/.stack-work/install/x86_64-osx/lts-13.0/8.6.3/lib/x86_64-osx-ghc-8.6.3/tanaoroshi-0.1.0.0-5xeICrctrISDA8KRnU1BAz Installing executable tanaoroshi in /Users/you/haskell/tanaoroshi/.stack-work/install/x86_64-osx/lts-13.0/8.6.3/bin Registering library for tanaoroshi-0.1.0.0.. iMac27:tanaoroshi you$ ls -l total 64 -rwxr-xr-x@ 1 you staff 1261 12 23 07:51 20181220Stock.csv -rw-r--r-- 1 you staff 50 12 25 16:33 ChangeLog.md -rw-r--r-- 1 you staff 1523 12 25 16:33 LICENSE -rw-r--r-- 1 you staff 171 12 25 17:23 README.md -rw-r--r-- 1 you staff 46 12 25 16:33 Setup.hs drwxr-xr-x 3 you staff 96 12 25 17:50 app -rw-r--r-- 1 you staff 1190 12 26 06:57 package.yaml drwxr-xr-x 3 you staff 96 12 25 16:33 src -rw-r--r-- 1 you staff 2133 12 25 16:33 stack.yaml -rw-r--r-- 1 you staff 1546 12 26 06:56 tanaoroshi.cabal drwxr-xr-x 3 you staff 96 12 25 16:33 test
~/src/github.com/shokohara/mergecleanhs(develop*) » cat ~/.emacs.d/init.el sho@shosimac (require 'cask "~/.cask/cask.el") (cask-initialize) (require 'lsp-mode) (require 'lsp-ui) (require 'lsp-haskell) (require 'company) (global-company-mode) (autoload 'ghc-init "ghc" nil t) (autoload 'ghc-debug "ghc" nil t) (add-hook 'lsp-mode-hook 'lsp-ui-mode) (add-hook 'haskell-mode-hook #'lsp) (add-hook 'haskell-mode-hook 'flycheck-mode) ;; フックを設定 (add-hook 'haskell-mode-hook 'haskell-indentation-mode) (add-hook 'haskell-mode-hook 'interactive-haskell-mode) (add-hook 'haskell-mode-hook 'haskell-decl-scan-mode) (add-hook 'haskell-mode-hook 'haskell-doc-mode) (add-hook 'haskell-mode-hook (lambda () (ghc-init))) (eval-after-load 'haskell-mode '(progn (define-key haskell-mode-map (kbd "C-c C-n C-t") 'haskell-process-do-type) (define-key haskell-mode-map (kbd "C-c C-n C-i") 'haskell-process-do-info) (define-key interactive-haskell-mode-map (kbd "M-.") 'haskell-mode-goto-loc) (define-key interactive-haskell-mode-map (kbd "C-c C-t") 'haskell-mode-show-type-at))) (setq lsp-haskell-process-path-hie "hie-wrapper") (setq haskell-process-type 'stack-ghci) (setq haskell-process-path-ghci "stack") (setq haskell-process-args-ghci "ghci") (add-hook 'haskell-mode-hook (lambda () (set (make-local-variable 'company-backends) (append '((company-capf company-dabbrev-code)) company-backends)))) (put 'downcase-region 'disabled nil)
Modern and backwards compatibleTested on GHC 8.0.1, GHC 7.10.3, GHC 7.10.2, and GHC 7.8.4.
emacs src/Main.hs
してみたところtype signatureの挿入が完全に動いてます!!