-----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-----
_______________________________________________
bitc-dev mailing list
bitc-dev@coyotos.org
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to