doctest: Interpreter exited with an error: ExitFailure 127

Hi, i have upgraded to doctest version 0.4.1. Now when i try to run the example from the webpage, i get: doctest: Interpreter exited with an error: ExitFailure 127 What's wrong here and how can i fix it? Kind regards Chris This is the content of Fib.hs: module Fib where -- | Compute Fibonacci numbers -- -- Examples: -- -- >>> fib 10 -- 55 -- -- >>> fib 5 -- 5 fib 0 = 0 fib 1 = 1 fib n = fib (n - 1) + fib (n - 2) main = do print $ fib 4

On Tue, Sep 20, 2011 at 7:50 PM, informationen
doctest: Interpreter exited with an error: ExitFailure 127
You are trying the doctest binary from the command line and not the library interface? I tried this with ghc 7.0.3 and doctest 0.4.1 but could not reproduce it with "$ doctest Fib.hs". On the other hand you have in the example a space before "-- | Compute.." and that produces a parse error for me.
This is the content of Fib.hs:
module Fib where -- | Compute Fibonacci numbers --
Sakari

On Wed, Sep 21, 2011 at 07:30:16PM +0300, Sakari Jokinen wrote:
On Tue, Sep 20, 2011 at 7:50 PM, informationen
wrote: doctest: Interpreter exited with an error: ExitFailure 127
You are trying the doctest binary from the command line and not the library interface?
I tried this with ghc 7.0.3 and doctest 0.4.1 but could not reproduce it with "$ doctest Fib.hs". On the other hand you have in the example a space before "-- | Compute.." and that produces a parse error for me.
This is the content of Fib.hs:
module Fib where -- | Compute Fibonacci numbers --
Sakari
Hi Sakari, yes, i am using the binary version of doctest. I don't know where the extra space comes from, but that is not the problem. Do you have any idea, what the error message wants to tell me. What does "interpreter exited with .." mean. If i add a main-method i can run the program flawlessly with runghc, but doctest still refuses to work. Kind regards Chris

On Wed, Sep 21, 2011 at 7:52 PM, informationen
Do you have any idea, what the error message wants to tell me. What does "interpreter exited with .." mean. If i add a
Doctests starts ghc in interactive mode for evaluating the examples. "interpreter exited with.." means that the spawned ghc process exited with an error code. See src/Interpreter.hs : closeInterpreter for details. One guess based on the 127 exit code would be that runnable ghc is not found in the place defined by GHC.Paths.ghc. By the way it seems that doctest (or haddoc) needs you to specify the type signature for functions for which you write examples. So no examples are run for 'fib' Sakari

Hi Chris,
i have upgraded to doctest version 0.4.1. Now when i try to run the example from the webpage, i get:
doctest: Interpreter exited with an error: ExitFailure 127
What's wrong here and how can i fix it?
Can you still reproduce this on your system? If yes, I'd like to see if we can do something about it (if only improving the error message). Cheers, Simon
participants (3)
-
informationen
-
Sakari Jokinen
-
Simon Hengel