Add stage2/ghci to ghc-api's import list.
[ghc-hetmet.git] / ghc / misc / examples / cats / hcat6.hs
1 module Main (mainPrimIO) where
2
3 import PreludePrimIO
4
5 mainPrimIO :: PrimIO ()
6 mainPrimIO
7   = _casm_
8     ``do { int c;
9     while ((c = getchar()) != EOF) {
10         putchar(c);
11     }} while (0);
12     %r = 1;'' -- pretend we have a "result"
13     `thenPrimIO` \ (I# _) ->
14     returnPrimIO ()
15
16 -- 1,955,134 bytes/sec ( 600KB input)
17 -- 1,989,892 bytes/sec ( 9.3MB input)
18 -- 1,871,706 bytes/sec (25.5MB input)