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

nix method init failure: Cannot auto-call a function that has an argument without a default value (‘mkDerivation’). #29

Closed
deepfire opened this issue Jul 15, 2017 · 1 comment

Comments

@deepfire
Copy link

deepfire commented Jul 15, 2017

Dante fails to start nix-shell --run "cabal repl", even though I can do it manually.

The key error message looks like it is Cannot auto-call a function that has an argument without a default value (‘mkDerivation’).

Facts

  • emacs is 25.1.1
  • dante is 20170207.234 (Melpa)
  • cabal is 1.24.0.2
  • haskell-mode-hook has both (dante-mode +1) and (flycheck-mode +1)
  • opening a source file yields this:
This where GHCi output is bufferized. This buffer is normally hidden,
but a problem occcured.

EXTRA TROUBLESHOOTING INFO

The GHCi process ended. Here is the reason that Emacs gives us: exited abnormally with code 1

Directory:/home/deepfire/holotype/
 Command line:(nix-shell --run cabal repl )
 Loaded: 
 State: dead
 Queue: nil
 Callback: #[128 \302\300\303\301�""\207 [dante-wait-for-prompt (Flatland.hs :set -Wall
:set +c
:set prompt "\4%s|" �[31;1merror:�[0m cannot auto-call a function that has an argument without a default value (‘mkDerivation’)
 #[257 \301\302!\210\303\300!\207 [ dante:holotype: /home/deepfire/holotype/ message GHCi started! dante-schedule-next] 3 

(fn START-MESSAGES)]) apply append] 6 

(fn &rest ARGS2)]


WHAT TO DO NEXT

Try to customize (probably file or directory-locally)
`dante-project-root' and/or `dante-repl-command-line'.  If you
fixed the problem, just kill this buffer, Dante will make a fresh
one and attempt to restart GHCi automatically.

If you are unable to fix the problem, just leave this buffer
around and Dante will not attempt to restart GHCi.

You can always run M-x dante-restart to make it try again.

Observations

  • Directory from above log looks right, although dante-project-root is nil in the source buffer
  • Running nix-shell --run "cabal repl" manually properly starts building the project:
deepfire@andromedae:~/holotype$ nix-shell --run "cabal repl"
Preprocessing library holotype-0.0.1...
GHCi, version 8.0.2: http://www.haskell.org/ghc/  :? for help
Loaded GHCi configuration from /home/deepfire/.ghci
[ 1 of 14] Compiling Reflex.Random    ( src/Reflex/Random.hs, interpreted )
[ 2 of 14] Compiling Reflex.GLFW      ( src/Reflex/GLFW.hs, interpreted )
[ 3 of 14] Compiling HoloSys          ( src/HoloSys.hs, interpreted )
[ 4 of 14] Compiling HoloCairo        ( src/HoloCairo.hs, interpreted )
[ 5 of 14] Compiling Elsewhere        ( src/Elsewhere.hs, interpreted )
[ 6 of 14] Compiling Data.MeasuredMonoid ( src/Data/MeasuredMonoid.hs, interpreted )
[ 7 of 14] Compiling Flatland         ( src/Flatland.hs, interpreted )

src/Flatland.hs:402:1: warning: [-Wincomplete-patterns]
    Pattern match(es) are non-exhaustive
    In an equation for ‘computeRequires’:
        Patterns not matched: (CF _ (CGrid _ _))
[ 8 of 14] Compiling FlatDraw         ( src/FlatDraw.hs, interpreted )

src/FlatDraw.hs:118:40: error:
    Not in scope: type constructor or class ‘S’

src/FlatDraw.hs:118:42: error:
    Not in scope: type constructor or class ‘Wrap’

src/FlatDraw.hs:119:28: error:
    Not in scope: data constructor ‘Pwrap’

src/FlatDraw.hs:120:11: error:
    Not in scope: data constructor ‘Parea’
Failed, modules loaded: Data.MeasuredMonoid, Elsewhere, Flatland, HoloCairo, HoloSys, Reflex.GLFW, Reflex.Random.
*Data.MeasuredMonoid Text.Printf>
Leaving GHCi.
@deepfire deepfire changed the title nix-shell --command "cabal repl" (aka nix method) initialisation failure nix-shell --run "cabal repl" (aka nix method) initialisation failure Jul 15, 2017
@deepfire deepfire changed the title nix-shell --run "cabal repl" (aka nix method) initialisation failure nix method init failure: Cannot auto-call a function that has an argument without a default value (‘mkDerivation’). Jul 15, 2017
@jyp
Copy link
Owner

jyp commented Jul 26, 2017

I believe that his error has been fixed (too). Please upgrade.

@jyp jyp closed this as completed Aug 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants