diff options
Diffstat (limited to 'ghc/misc/examples/cats/hcat6.hs')
-rw-r--r-- | ghc/misc/examples/cats/hcat6.hs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/ghc/misc/examples/cats/hcat6.hs b/ghc/misc/examples/cats/hcat6.hs new file mode 100644 index 0000000000..ce9b4e68d8 --- /dev/null +++ b/ghc/misc/examples/cats/hcat6.hs @@ -0,0 +1,18 @@ +module Main (mainPrimIO) where + +import PreludePrimIO + +mainPrimIO :: PrimIO () +mainPrimIO + = _casm_ + ``do { int c; + while ((c = getchar()) != EOF) { + putchar(c); + }} while (0); + %r = 1;'' -- pretend we have a "result" + `thenPrimIO` \ (I# _) -> + returnPrimIO () + +-- 1,955,134 bytes/sec ( 600KB input) +-- 1,989,892 bytes/sec ( 9.3MB input) +-- 1,871,706 bytes/sec (25.5MB input) |