You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue looks really similar to #3158, but this issue, I think, is different. The #3158 is about particular backend, but this feature is about C FFI, available to (and acually used by) many backends.
Steps to Reproduce
Have a program
main:IO()
main =putStr"abc\00d"
Run it with several standard backends:
$ IDRIS2_CG=chez idris2 --exec main X.idr
$ IDRIS2_CG=racket idris2 --exec main X.idr
$ IDRIS2_CG=node idris2 --exec main X.idr
$ IDRIS2_CG=refc idris2 --exec main X.idr
For the clear repoducibility and independence on the particular terminal, you can pipe those commands with ... | wc -c to count number of printed bytes.
Expected Behavior
All runs print the same thing, namely abcd, or 5 if you run using wc
Observed Behavior
All backends that use C FFI for implementation of putStrLn (and similar functions like fPutStr) print only abc, or 3 if you use wc. The node backend prints abcd (or 5), as expected.
The text was updated successfully, but these errors were encountered:
This issue looks really similar to #3158, but this issue, I think, is different. The #3158 is about particular backend, but this feature is about C FFI, available to (and acually used by) many backends.
Steps to Reproduce
Have a program
Run it with several standard backends:
For the clear repoducibility and independence on the particular terminal, you can pipe those commands with
... | wc -c
to count number of printed bytes.Expected Behavior
All runs print the same thing, namely
abcd
, or5
if you run usingwc
Observed Behavior
All backends that use C FFI for implementation of
putStrLn
(and similar functions likefPutStr
) print onlyabc
, or3
if you usewc
. Thenode
backend printsabcd
(or5
), as expected.The text was updated successfully, but these errors were encountered: