| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 | module Main whereimport Gidl.Typesimport Gidl.Parsemain :: IO ()main = test "tests/testtypes.sexpr"test :: FilePath -> IO ()test f = do  c <- readFile f  print $ parseDecls c--- below is just a stashhb_t :: Typehb_t = StructType $ Struct          [ ("mode", "mode_t")          , ("time", "time_micros_t")          ]mode_t :: Typemode_t = StructType $ Struct          [ ("armed", "bool_t")          , ("controlsource", "controlsource_t" )          ]controlsource_t :: Typecontrolsource_t = EnumType $ EnumT Bits8  [ ("manual", 0)  , ("auto", 1)  ]time_micros_t :: Typetime_micros_t = NewtypeType $ Newtype "uint8_t"typeEnv' :: TypeEnvtypeEnv' = TypeEnv  [ ("hb_t", hb_t)  , ("mode_t", mode_t)  , ("controlsource_t", controlsource_t)  , ("time_micros_t", time_micros_t)  ]data Sys = Sys TypeEnv Streams Attrsdata Attrs = Attrs [(String, Either Type Attrs)]data Streams = Streams [(String, Type)]
 |