AST.hs 513 B

12345678910111213141516171819202122232425262728293031
  1. module Gidl.Interface.AST where
  2. import Gidl.Types.AST
  3. data InterfaceEnv
  4. = InterfaceEnv [(InterfaceName, Interface)]
  5. deriving (Eq, Show)
  6. emptyInterfaceEnv :: InterfaceEnv
  7. emptyInterfaceEnv = InterfaceEnv []
  8. type InterfaceName = String
  9. type MethodName = String
  10. data Interface
  11. = Interface [Interface] [(MethodName, Method)]
  12. deriving (Eq, Show)
  13. data Method
  14. = AttrMethod Perm Type
  15. | StreamMethod Integer Type
  16. deriving (Eq, Show)
  17. data Perm
  18. = Read
  19. | Write
  20. | ReadWrite
  21. deriving (Eq, Show)