Ocaml: Ошибка - это выражение имеет тип x, но используется с типом x

Немного вне темы, но можно поднять трубку VisualVM и JConsole к запущенным приложениям и видеть полезную статистику.

6
задан Ashutosh Mehra 1 October 2009 в 05:21
поделиться

1 ответ

There's a good description of this in the ocaml tutorial. What's happened is you have shadowed a type definition with a new definition:

type nfa = int
let f (x: nfa) = x

type nfa = int
let g (x: nfa) = x

Restarting the top-level will clear out the old definitions.

10
ответ дан 10 December 2019 в 00:41
поделиться
Другие вопросы по тегам:

Похожие вопросы: