Skip to content
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

Added make rule for omitting code generation #496

Merged
merged 1 commit into from
Jun 16, 2016
Merged

Added make rule for omitting code generation #496

merged 1 commit into from
Jun 16, 2016

Commits on Jun 16, 2016

  1. Added make rule for omitting code generation

    It turns out that the most expensive part of building encorec is the
    code generation phases. The GHC option `-fno-code` stops after
    typechecking, and on my machine the difference in runtime is 5 seconds
    vs. ~1.45 minutes. This commit adds the rule `typecheck` to the root
    makefile, which meant to be used when no executable needs to be
    generated (i.e. for only checking code that you wrote).
    
    Emacs users using haskell-mode might be interested in the following hack
    to make the compilation command default to only typechecking, and also
    try to start a new haskell session if no one is present:
    
    ```
    (defun ec/haskell-typecheck ()
      (interactive)
      (progn
        (cond ((null haskell-session) (haskell-session-change)))
        (haskell-process-do-cabal "build --ghc-options=-fno-code")))
    
    (add-hook 'haskell-mode-hook
       (function
        (lambda ()
          (local-set-key (kbd "C-c C-c") 'ec/haskell-typecheck))))
    ```
    EliasC committed Jun 16, 2016
    Configuration menu
    Copy the full SHA
    fa8c9cf View commit details
    Browse the repository at this point in the history