Changeset 12462 for src/Pugs/Val

Show
Ignore:
Timestamp:
08/19/06 15:48:11 (2 years ago)
Author:
audreyt
Message:

* Unbreak the build via newtype transformation.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Val/Code.hs

    r12461 r12462  
    1818        , c_isSafe            :: Bool 
    1919        , c_isCached          :: Bool 
    20         , c_body              :: [Stmt]    -- ^ AST of "do" block 
     20        , c_body              :: CodeBody  -- ^ AST of "do" block 
    2121        , c_pad               :: Pad       -- ^ Storage for lexical vars 
    2222        , c_traits            :: Table     -- ^ Any additional trait not 
     
    104104                                     --   E.g. where {...} above 
    105105    , p_unpacking   :: Maybe PureSig -- ^ E.g. BinTree $t (Left $l, Right $r) 
    106     , p_default     :: Maybe Exp     -- ^ E.g. $answer? = 42 
     106    , p_default     :: ParamDefault  -- ^ E.g. $answer? = 42 
    107107    , p_label       :: ID            -- ^ E.g. :mode 
    108108    , p_slots       :: Table         -- ^ Any additional attrib not 
     
    111111    , p_isRef       :: Bool 
    112112    , 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 
     116newtype CodeBody = MkCodeBody [Stmt] 
     117    deriving (Typeable) 
     118 
     119newtype ParamDefault = MkParamDefault Exp 
     120    deriving (Typeable) 
     121 
     122instance Eq ParamDefault where _ == _ = True 
     123instance Ord ParamDefault where compare _ _ = EQ 
     124instance Show ParamDefault where show _ = "<Param.Default>" 
     125 
     126instance Eq CodeBody where _ == _ = True 
     127instance Ord CodeBody where compare _ _ = EQ 
     128instance Show CodeBody where show _ = "<Code.Body>" 
    114129 
    115130data ParamAccess