Gaurav
Gaurav

Reputation: 397

Substring.full not working in SML

I am trying to implement the full function of the Substring signature in the following way :

val x = Substring.full "straight"

The output returned is :

val x = - : substring

As I see, the function is not returning any value to the variable x.

What must be going wrong? ( I am using V110.77 of SML/NJ on Windows 8.1.)

Upvotes: 0

Views: 111

Answers (1)

Andreas Rossberg
Andreas Rossberg

Reputation: 36078

The function is fine. But substring is an abstract type, and values of abstract type cannot be printed by the SML/NJ prompt. So they are just indicated by "-".

Upvotes: 3

Related Questions