Plan 9 from Bell Labs’s /usr/web/sources/contrib/fernan/nhc98/docs/bugs/nhc13test9.hs

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


-- FIXED

{- On parsing "'ab'", nhc13 fails as it should but with an obscure
error message:
-------------------------------------------------------------------------------
/u/gem/hscr/nhc13test$ nhc13test9 "'ab'"
Prelude: No match in function at 8:1.
-------------------------------------------------------------------------------
when it should report a "no parse" error.  Further, it even fails on "'a'":
-------------------------------------------------------------------------------
/u/gem/hscr/nhc13test$ nhc13test9 "'a'"
Prelude: No match in function at 8:1.
-------------------------------------------------------------------------------
hbc and hugs1.4 both comply. -}

import System (getArgs)

main = do argv <- getArgs
          print ((read (argv!!0))::Char)

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].