exercism / sml

Exercism exercises in Standard ML.
https://exercism.org/tracks/sml
MIT License
27 stars 35 forks source link

Update exercises: test.sml #80

Closed snahor closed 6 years ago

snahor commented 6 years ago

The following exercises need to be updated:

Instructions:

To generate test.sml

$ bin/generate {exercise}

Notes:

joshmhanson commented 6 years ago

I attempted to run:

bin/generate flatten-array

But this produced:

`[flatten-array]: ('Failed to infer a proper type, got multiple types', [1, [2, 3, 4, 5, 6, 7], 8], {'int', 'int list'})

My sml and problem-specifications repos are both fully up to date, so I'm not sure what's going on. I see that this error message came from line 61 of bin/generate, inside the sml_type function.

mcmillhj commented 6 years ago

The generator likely won't work 100% of the time due to type mismatches or the canonical-data.json file not existing. In these cases the files will have to be created manually.

mcmillhj commented 6 years ago

You could leave that one to us if you are unsure how to proceed, or you can push a PR for it and we can give feedback. Feel free to let me know if you have specific questions.

joshmhanson commented 6 years ago

Thanks for the clarification, for now I'll leave that one to you. But if I change my mind I'll post here again to let people know that it's being worked on.

snahor commented 6 years ago

@hanjiexi I've updated the generator https://github.com/exercism/sml#generator, it could help you the next time.