{- (C)2002 Markus Schnell -} module Main where {- This module demonstrates the use of the FStruct module. -} import SaveFStruct main = do putStrLn "The FStruct module, Markus Schnell, 2002" putStrLn "----------------------------------------" let exf = [name =: [vorname =: "Peter", nachname =: "Post"], age =: (23::Int)] let fa = [vorname =: "Peter"] let fb = [nachname =: "Post"] af = [vorname =: "Paul"] let fc = fa ! fb fd = fa ! fa fe = fa ! af putStrLn (show exf) putStrLn (show fc) putStrLn (show fd) putStrLn (show fe) --- Es darf nicht beliebige Strukturen geben, the Structures should be given Types name = mkArg "name" vorname = mkArg "vorname" nachname = mkArg "nachname" age = mkArg "age" {- ====== List of Examples ====== -} -- Examples that should work -- -- indexing -- Examples that shouldn't work -- -- e.g. wrong types