string/char vector type equivalence
Christopher Cramer <[email protected]> Sun, 3 Feb 2013 22:36:08 -0500
| Newsgroups | gmane.comp.lang.ml.mlton.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi This compiles in MLton without error: val foo: char vector = "foo" val bar: string = "bar" val baz: string = vector [#"b", #"a", #"z"] val _ = Vector.length foo val _ = size foo val _ = Vector.length bar val _ = size bar val _ = Vector.length baz val _ = size baz val _ = foo ^ bar ^ baz Not an earth-shattering discovery, but it does make MLton.CharVector redundant... The same sort of thing, with ints rather than chars, does not compile: val foo: IntVector.vector = vector [1, 2, 3] Error: intvector.sml 1.5. Pattern and expression disagree. pattern: [IntVector.vector] expression: [int vector] in: (foo): IntVector.vector = vector [1, 2, 3] compilation aborted: parseAndElaborate reported errors ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_jan