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

type error in test - Array.foldli #45

Open
jeremydaw opened this issue Oct 10, 2016 · 1 comment
Open

type error in test - Array.foldli #45

jeremydaw opened this issue Oct 10, 2016 · 1 comment

Comments

@jeremydaw
Copy link

jeremy@jasco:/mnt/local/mosml/src/test$ make
rm -f result
mosml -P full test.sml > result 2>&1
hangs, due to
jeremy@jasco:/mnt/local/mosml/src/test$ vi result
File "ovlsucc.sml", line 98, characters 52-54:
! fun maxi ar = Array.foldli f (0,Array.sub(ar,0)) ar
! ^^
! Type clash: expression of type
! 'a array
! cannot have type
! 'a array * int * int option
[closing file "ovlsucc.sml"]
[closing file "test.sml"]

I note that
Moscow ML version 2.10
Enter `quit();' to quit.

  • Array.foldli ;

    val ('a, 'b) it = fn : (int * 'a * 'b -> 'b) -> 'b -> 'a array -> 'b
    but
    Moscow ML version 2.01 (January 2004)
    Enter `quit();' to quit.

  • Array.foldli ;

    val ('a, 'b) it = fn :
    (int * 'a * 'b -> 'b) -> 'b -> 'a array * int * int option -> 'b

@jeremydaw
Copy link
Author

I think this error occurred because the test used Moscow 2.01 which I had previously installed. So the above report can be ignored, the problem is that the test routine picks up whatever version of Moscow ML is first seen in $PATH

The correct test seems to be
make current
rather than just
make

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

1 participant