Scope: I'm not sure whether this is an issue with SOSML or SOSML-frontend. Both behave strangely, but in different ways.
Description / To Reproduce:
Given this (valid) code (SOSML editor link):
signature SIG = sig type ty end;
structure Mod :> SIG where type ty = int = struct
type ty = int
end;
val x: Mod.ty = 4;
The SOSML CLI ignores everything after the declaration of SIG:
SOSML> Welcome to SOSML. Please enter your code.
Input> signature SIG = sig type ty end;
SOSML> signature SIG: sig
> type ty;
> end;
Evaluation took 3ms.
Input> structure Mod :> SIG where type ty = int = struct
Input> type ty = int
Input> end;
Input> val x: Mod.ty = 4;
Input> ;
Input> hello?
SOSML> There was a problem with your code:
> Parsing failed: Expected a declaration, found "hello".
On the other hand, the SOSML editor accepts the module definition, but rejects the last line with the error
Elaboration failed: The annotated type "Mod.ty" does not match the expression's type "int": Cannot merge "int" and "Mod.ty".
Additionally, after making a simple change and then undoing it, it stops accepting the declaration of Mod, at which point every small edit (adding or deleting whitespace, for example) makes it reinterpret ty as ty → int, eventually resulting the error looking like this:
Elaboration failed: Signature mismatch: Wrong implementation of type "ty": Cannot merge "((((((((((((((((((int → int) → int) → int) → int) → int) → int) → int) → int) → int) → int) → int) → int) → int) → int) → int) → int) → int) → int) → int" and "int".
Scope: I'm not sure whether this is an issue with SOSML or SOSML-frontend. Both behave strangely, but in different ways.
Description / To Reproduce:
Given this (valid) code (SOSML editor link):
The SOSML CLI ignores everything after the declaration of
SIG:On the other hand, the SOSML editor accepts the module definition, but rejects the last line with the error
Additionally, after making a simple change and then undoing it, it stops accepting the declaration of
Mod, at which point every small edit (adding or deleting whitespace, for example) makes it reinterprettyasty → int, eventually resulting the error looking like this: