mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-15 22:32:19 +03:00
c725b11c89
On Unix-like operating systems stdio.h is usually line-buffered. As putStr uses fputs(3) from stdio.h internally, output will be written to standard out after a newline character is written to the buffer. Since the prompt does not contain a newline, it will only be written to standard output after the user presses return. I encountered this issue on Alpine Linux which uses musl libc (instead of glibc). However, I believe this issue is likely also reproducible with glibc. This commit fixes this issue by flushing standard output after writing the prompt to it. Surprisingly, `src/Idris/IDEMode/REPL.idr` already does this correctly, `src/Idris/REPL.idr` does not though.
63 lines
9.9 KiB
Plaintext
63 lines
9.9 KiB
Plaintext
1/1: Building BitOps (BitOps.idr)
|
|
Main> [0, 1, 2, 4, 8, 16, 32, 64, 127]
|
|
[0, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32767]
|
|
[0, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483647]
|
|
[0, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648, 4294967296, 8589934592, 17179869184, 34359738368, 68719476736, 137438953472, 274877906944, 549755813888, 1099511627776, 2199023255552, 4398046511104, 8796093022208, 17592186044416, 35184372088832, 70368744177664, 140737488355328, 281474976710656, 562949953421312, 1125899906842624, 2251799813685248, 4503599627370496, 9007199254740992, 18014398509481984, 36028797018963968, 72057594037927936, 144115188075855872, 288230376151711744, 576460752303423488, 1152921504606846976, 2305843009213693952, 4611686018427387903]
|
|
[-1, -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648, -4294967296, -8589934592, -17179869184, -34359738368, -68719476736, -137438953472, -274877906944, -549755813888, -1099511627776, -2199023255552, -4398046511104, -8796093022208, -17592186044416, -35184372088832, -70368744177664, -140737488355328, -281474976710656, -562949953421312, -1125899906842624, -2251799813685248, -4503599627370496, -9007199254740992, -18014398509481984, -36028797018963968, -72057594037927936, -144115188075855872, -288230376151711744, -576460752303423488, -1152921504606846976, -2305843009213693952, -4611686018427387904]
|
|
|
|
[0, 2, 4, 8, 16, 32, 64, 128]
|
|
[0, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768]
|
|
[0, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648]
|
|
[0, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648, 4294967296, 8589934592, 17179869184, 34359738368, 68719476736, 137438953472, 274877906944, 549755813888, 1099511627776, 2199023255552, 4398046511104, 8796093022208, 17592186044416, 35184372088832, 70368744177664, 140737488355328, 281474976710656, 562949953421312, 1125899906842624, 2251799813685248, 4503599627370496, 9007199254740992, 18014398509481984, 36028797018963968, 72057594037927936, 144115188075855872, 288230376151711744, 576460752303423488, 1152921504606846976, 2305843009213693952, 4611686018427387904]
|
|
[-2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608, -16777216, -33554432, -67108864, -134217728, -268435456, -536870912, -1073741824, -2147483648, -4294967296, -8589934592, -17179869184, -34359738368, -68719476736, -137438953472, -274877906944, -549755813888, -1099511627776, -2199023255552, -4398046511104, -8796093022208, -17592186044416, -35184372088832, -70368744177664, -140737488355328, -281474976710656, -562949953421312, -1125899906842624, -2251799813685248, -4503599627370496, -9007199254740992, -18014398509481984, -36028797018963968, -72057594037927936, -144115188075855872, -288230376151711744, -576460752303423488, -1152921504606846976, -2305843009213693952, -4611686018427387904]
|
|
|
|
[11, 0, 1, 2, 0, 11]
|
|
[11, 0, 1, 2, 0, 11]
|
|
[11, 0, 1, 2, 0, 11]
|
|
[11, 0, 1, 2, 0, 11]
|
|
[9223372036854775797, 0, 1, 0, 4, 1, -9223372036854775808, -11, -12, -12, -11]
|
|
|
|
[255, 11, 11, 11, 15, 11]
|
|
[65535, 11, 11, 11, 15, 11]
|
|
[4294967295, 11, 11, 11, 15, 11]
|
|
[9223372036854775807, 11, 11, 11, 15, 11]
|
|
[-1, -11, -11, -9, -11, -1, -11, -1, -1, -3, -11]
|
|
|
|
[244, 11, 10, 9, 15, 0]
|
|
[65524, 11, 10, 9, 15, 0]
|
|
[4294967284, 11, 10, 9, 15, 0]
|
|
[9223372036854775796, 11, 10, 9, 15, 0]
|
|
[-9223372036854775798, -11, -12, -9, -15, -2, 9223372036854775797, 10, 11, 9, 0]
|
|
|
|
[1, 2, 4, 8, 16, 32, 64, 128]
|
|
[1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768]
|
|
[1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648]
|
|
[1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648, 4294967296, 8589934592, 17179869184, 34359738368, 68719476736, 137438953472, 274877906944, 549755813888, 1099511627776, 2199023255552, 4398046511104, 8796093022208, 17592186044416, 35184372088832, 70368744177664, 140737488355328, 281474976710656, 562949953421312, 1125899906842624, 2251799813685248, 4503599627370496, 9007199254740992, 18014398509481984, 36028797018963968, 72057594037927936, 144115188075855872, 288230376151711744, 576460752303423488, 1152921504606846976, 2305843009213693952, 4611686018427387904, -9223372036854775808]
|
|
|
|
[3, 0, 6, 10, 18, 34, 66, 130]
|
|
[3, 0, 6, 10, 18, 34, 66, 130, 258, 514, 1026, 2050, 4098, 8194, 16386, 32770]
|
|
[3, 0, 6, 10, 18, 34, 66, 130, 258, 514, 1026, 2050, 4098, 8194, 16386, 32770, 65538, 131074, 262146, 524290, 1048578, 2097154, 4194306, 8388610, 16777218, 33554434, 67108866, 134217730, 268435458, 536870914, 1073741826, 2147483650]
|
|
[3, 0, 6, 10, 18, 34, 66, 130, 258, 514, 1026, 2050, 4098, 8194, 16386, 32770, 65538, 131074, 262146, 524290, 1048578, 2097154, 4194306, 8388610, 16777218, 33554434, 67108866, 134217730, 268435458, 536870914, 1073741826, 2147483650, 4294967298, 8589934594, 17179869186, 34359738370, 68719476738, 137438953474, 274877906946, 549755813890, 1099511627778, 2199023255554, 4398046511106, 8796093022210, 17592186044418, 35184372088834, 70368744177666, 140737488355330, 281474976710658, 562949953421314, 1125899906842626, 2251799813685250, 4503599627370498, 9007199254740994, 18014398509481986, 36028797018963970, 72057594037927938, 144115188075855874, 288230376151711746, 576460752303423490, 1152921504606846978, 2305843009213693954, 4611686018427387906, -9223372036854775806]
|
|
|
|
[1, 2, 4, 8, 16, 0, 64, 128]
|
|
[1, 2, 4, 8, 16, 0, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768]
|
|
[1, 2, 4, 8, 16, 0, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648]
|
|
[1, 2, 4, 8, 16, 0, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648, 4294967296, 8589934592, 17179869184, 34359738368, 68719476736, 137438953472, 274877906944, 549755813888, 1099511627776, 2199023255552, 4398046511104, 8796093022208, 17592186044416, 35184372088832, 70368744177664, 140737488355328, 281474976710656, 562949953421312, 1125899906842624, 2251799813685248, 4503599627370496, 9007199254740992, 18014398509481984, 36028797018963968, 72057594037927936, 144115188075855872, 288230376151711744, 576460752303423488, 1152921504606846976, 2305843009213693952, 4611686018427387904, -9223372036854775808]
|
|
|
|
[3, 2, 6, 10, 18, 34, 66, 130]
|
|
[3, 2, 6, 10, 18, 34, 66, 130, 258, 514, 1026, 2050, 4098, 8194, 16386, 32770]
|
|
[3, 2, 6, 10, 18, 34, 66, 130, 258, 514, 1026, 2050, 4098, 8194, 16386, 32770, 65538, 131074, 262146, 524290, 1048578, 2097154, 4194306, 8388610, 16777218, 33554434, 67108866, 134217730, 268435458, 536870914, 1073741826, 2147483650]
|
|
[3, 2, 6, 10, 18, 34, 66, 130, 258, 514, 1026, 2050, 4098, 8194, 16386, 32770, 65538, 131074, 262146, 524290, 1048578, 2097154, 4194306, 8388610, 16777218, 33554434, 67108866, 134217730, 268435458, 536870914, 1073741826, 2147483650, 4294967298, 8589934594, 17179869186, 34359738370, 68719476738, 137438953474, 274877906946, 549755813890, 1099511627778, 2199023255554, 4398046511106, 8796093022210, 17592186044418, 35184372088834, 70368744177666, 140737488355330, 281474976710658, 562949953421314, 1125899906842626, 2251799813685250, 4503599627370498, 9007199254740994, 18014398509481986, 36028797018963970, 72057594037927938, 144115188075855874, 288230376151711746, 576460752303423490, 1152921504606846978, 2305843009213693954, 4611686018427387906, -9223372036854775806]
|
|
|
|
[False, True, False, True, False, True, False, True]
|
|
[False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True]
|
|
[False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True]
|
|
[False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, False, False, False]
|
|
[False, True, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, False, True, True, True, True]
|
|
|
|
[0, 4, 8]
|
|
[0, 8, 16]
|
|
[0, 16, 32]
|
|
[0, 32, 64, 33]
|
|
Main> Bye for now!
|