AST.hs 530 B

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