[bitc-dev] first try with bitc
Tom Bachmann
e_mc_h2 at web.de
Tue May 23 09:50:12 EDT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
I have found some time to look at bitc lately. I tried to write a
functional (i.e. free of "mutable" keywords) echo. I ended up with an error.
The code:
(bitc-version "0.9+")
(import stdio bitc.stdio)
(define (main argv:(vector string))
(let
((print (lambda (s)
(stdio.write-string stdio.stdout s)
(stdio.write-char stdio.stdout #\linefeed)))
(vector-for-each (lambda (f v)
(f "foo")))) ; dummy
(vector-for-each print argv))
(the int32 0))
bitcc fails with
echo2.bitc:11:5: _15vector-for-each -- Specialization of LOCAL
definition. Use = (fn ((fn (string) ()) (vector string)) ()) Def = (fn
((fn (string) ()) ()) ())
bitcc: Polyinst.cxx:733: bool polyinst(std::ostream&, UocInfo*, AST*,
AST*, sherpa::CVector<AST*>&, AST*, size_t): Assertion `false' failed.
I have to admit that I am not very familiar with any language comparable
to bitc (I only know scheme and lisp a little bit), so maybye something
obvious is wrong here, but then at least the error message could be
changed to be a bit more helpful.
- --
- -ness-
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
iD8DBQFEcxMUvD/ijq9JWhsRAijQAJ9erXF0dj1Jw6L44Y68TuHUbOgYZQCfbGYT
hZCT31hRW+soAeVHXMkvKqU=
=Zq27
-----END PGP SIGNATURE-----
More information about the bitc-dev
mailing list