Changeset 12462 for src/Pugs/Val
- Timestamp:
- 08/19/06 15:48:11 (2 years ago)
- Files:
-
- 1 modified
-
src/Pugs/Val/Code.hs (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Pugs/Val/Code.hs
r12461 r12462 18 18 , c_isSafe :: Bool 19 19 , c_isCached :: Bool 20 , c_body :: [Stmt]-- ^ AST of "do" block20 , c_body :: CodeBody -- ^ AST of "do" block 21 21 , c_pad :: Pad -- ^ Storage for lexical vars 22 22 , c_traits :: Table -- ^ Any additional trait not … … 104 104 -- E.g. where {...} above 105 105 , p_unpacking :: Maybe PureSig -- ^ E.g. BinTree $t (Left $l, Right $r) 106 , p_default :: Maybe Exp-- ^ E.g. $answer? = 42106 , p_default :: ParamDefault -- ^ E.g. $answer? = 42 107 107 , p_label :: ID -- ^ E.g. :mode 108 108 , p_slots :: Table -- ^ Any additional attrib not … … 111 111 , p_isRef :: Bool 112 112 , p_isLazy :: Bool 113 } deriving (Show, Eq, Ord, Typeable) {-!derive: YAML_Pos, Perl6Class, MooseClass!-} 113 } 114 deriving (Show, Eq, Ord, Typeable) {-!derive: YAML_Pos, Perl6Class, MooseClass!-} 115 116 newtype CodeBody = MkCodeBody [Stmt] 117 deriving (Typeable) 118 119 newtype ParamDefault = MkParamDefault Exp 120 deriving (Typeable) 121 122 instance Eq ParamDefault where _ == _ = True 123 instance Ord ParamDefault where compare _ _ = EQ 124 instance Show ParamDefault where show _ = "<Param.Default>" 125 126 instance Eq CodeBody where _ == _ = True 127 instance Ord CodeBody where compare _ _ = EQ 128 instance Show CodeBody where show _ = "<Code.Body>" 114 129 115 130 data ParamAccess
