Changeset 12460 for src/Pugs/Exp.hs
- Timestamp:
- 08/19/06 15:27:26 (2 years ago)
- Files:
-
- 1 modified
-
src/Pugs/Exp.hs (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Pugs/Exp.hs
r12458 r12460 7 7 module Pugs.Exp where 8 8 9 import Data.Generics.Basics hiding (cast)10 import qualified Data.Typeable as Typeable11 9 import Pugs.Internals 12 import qualified Pugs.ASTas OldAST10 import {-# SOURCE #-} qualified Pugs.AST.Internals as OldAST 13 11 import Pugs.Val 12 import Pugs.Types (Var) 14 13 15 14 … … 17 16 type ExpVal = Val 18 17 type ExpCapt = Capt Exp 18 19 newtype ExpEmeritus = MkExpEmeritus { ee :: OldAST.Exp } 20 21 instance Eq ExpEmeritus where _ == _ = True 22 instance Ord ExpEmeritus where compare _ _ = EQ 23 instance Show ExpEmeritus where show _ = "<Exp.Emeritus>" 19 24 20 25 -- | AST for an expression. … … 29 34 | EFlatten [Exp] -- ^ Wrapper for expressions forced into 30 35 -- slurpy context 31 | EE OldAST.Exp32 deriving (Show, Eq, Ord, Data,Typeable) {-!derive: YAML_Pos, Perl6Class, MooseClass!-}36 | EE ExpEmeritus 37 deriving (Show, Eq, Ord, Typeable) {-!derive: YAML_Pos, Perl6Class, MooseClass!-} 33 38 34 39 … … 48 53 | CWhen Exp Code -- ^ when 49 54 | CForeign -- ^ &statement_control:<mycontrol> 50 deriving (Show, Eq, Ord, Data, Typeable) {-!derive: YAML_Pos, Perl6Class, MooseClass!-} 55 deriving (Show, Eq, Ord, Typeable) {-!derive: YAML_Pos, Perl6Class, MooseClass!-} 56 57 -- | General purpose mapping from identifiers to values. 58 type Table = Map ID Val 51 59 52 60 -- | AST for a statement. The top level of an AST is a list of Stmt. … … 55 63 , pragmas :: Table 56 64 , expression :: Exp 57 } deriving (Show, Eq, Ord, Data,Typeable) {-!derive: YAML_Pos, Perl6Class, MooseClass!-}65 } deriving (Show, Eq, Ord, Typeable) {-!derive: YAML_Pos, Perl6Class, MooseClass!-} 58 66 59 67 -- | Carry over last pragmas and create a new statement out of an expression
