summaryrefslogtreecommitdiff
path: root/libraries/base/tests/reads001.hs
blob: 44c5a156f04cb9366b60d00cdc05aa5e92530b71 (plain)
1
2
3
4
5
6
7
8
9
10
-- Test the classic "\SOH" ambiguity

module Main(main) where

main = do { print soh ; print (length (fst (head soh))) ;
            print so  ; print (length (fst (head so))) }
     where
        so, soh :: [(String,String)]
        soh = reads "\"\\SOH\"" -- Should read \SOH
        so  = reads "\"\\SOx\"" -- Should read \SO followed by x