Re:Idris 2 0.6.0 is now available for the JVM
by valenterry on Monday February 27, 2023 @10:11AM
(#34957287)
It's not quite the same. You can emulate literal string types using recursive ADTs (similar lists), storing one character at the time at the typesystem.
But the ergonomics are quite different.
For example, in Scala you can do this:
val foo: "Must be this string" = "foo" // fails to compile
In Typescript it's similar. But how would "Must be this string" look in the case of a haskell ADT?
But the ergonomics are quite different.
For example, in Scala you can do this:
In Typescript it's similar. But how would "Must be this string" look in the case of a haskell ADT?