
Hello nhc-team, The following doesn't work under nhc98 1.14 (made with hmake 3.05) [afc@pcburum mipsmanual]$ nhc98 --version /usr/local/funcprog/bin/nhc98: v1.14 (2002-06-13) [ config: ix86-Linux/ghc by malcolm@pc173 on 13 Jun 2002 ] The program does nothing, and returns immediately without waiting for input. Just using getContents does the same. -------------------------- module Main where import IO parse accum [] = [accum] parse accum ('*':cs) = accum:parse [] cs -- finished this expression parse accum ('%':cs) = [accum] -- end input here parse accum (c:cs) = parse (c:accum) cs main = do text <- hGetContents stdin putStr (unlines (parse [] text)) -------------------------- Amanda

The following doesn't work under nhc98 1.14
I just tried it with nhc98-1.14, and I couldn't reproduce the problem. Same on a freshly built 1.16. I see your version of nhc98 was from a binary distribution, so maybe it is some kind of Linux-related C-library incompatibility? My best suggestion is to build nhc98 from source on the machine in question.
main = do text <- hGetContents stdin putStr (unlines (parse [] text))
Assuming that the extra space before putStr is a typo... Regards, Malcolm
participants (2)
-
Amanda Clare
-
malcolm@cs.york.ac.uk