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

Problems with Flite examples. #33

Open
VitorCBSB opened this issue May 2, 2016 · 1 comment
Open

Problems with Flite examples. #33

VitorCBSB opened this issue May 2, 2016 · 1 comment

Comments

@VitorCBSB
Copy link

Hello, I've been trying to run the examples in Flite, but some of them are giving unexpected results. For instance, the Fibonacci one gives the following output:

C:\Users\VitorCBSB\Reduceron\flite>stack exec -- flite examples/Fib.hs
fib(10) =

If I compile it to C and run it, these are the results:

C:\Users\VitorCBSB\Reduceron\flite>stack exec -- flite -c examples/Fib.hs > Fib.c

C:\Users\VitorCBSB\Reduceron\flite>gcc Fib.c -o Fib

C:\Users\VitorCBSB\Reduceron\flite>Fib
fib(10) = ERROR: bottom!

I have also found problems with Taut.hs (empty output) and Countdown.hs (either doesn't stop running or takes a long time). Sudoku.hs, however, apparently works correctly. Have not attempted to run the others yet.

Thanks.

@tommythorn
Copy link
Owner

tommythorn commented May 25, 2017

First, thanks for the report and I'm so very very sorry for not noticing this report until now (I have no idea how that happened).

Indeed, the examples aren't run as part of the regression suite and are in fact broken (the examples in programs all pass). It would seem that I broke it. If you replace

emitStr [] k = k;

with

emitStr Nil k = k;

it works.

I'll look into this.

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