{-# OPTIONS -fglasgow-exts #-}
module GRead (tests) where
import Test.HUnit
import Data.Generics
str1 = "(True)"
str2 = "(Treu)"
str3 = "True"
str4 = "(1)"
str5 = "( 2 ) ..."
str6 = "([])"
str7 = "((:)" ++ " " ++ str4 ++ " " ++ str6 ++ ")"
tests = show ( ( [ gread str1,
gread str2,
gread str3
]
, [ gread str4,
gread str5
]
, [ gread str6,
gread str7
]
)
:: ( [[(Bool, String)]]
, [[(Int, String)]]
, [[([Int], String)]]
)
) ~=? output
output = show
([[(True,"")],[],[]],[[(1,"")],[(2,"...")]],[[([],"")],[([1],"")]])