Changeset 15424

Show
Ignore:
Timestamp:
03/03/07 15:17:08 (21 months ago)
Author:
gaal
Message:

* flip order in defaults and user-defined methods, to allow static

overriding of WHICH etc.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Class.hs

    r15418 r15424  
    7575    } 
    7676 
     77-- variant of @mkBoxClass@ meant to be called with the fixed-point 
     78-- combinator, that adds the standard HOW and WHICH methods. E.g.: 
     79--    _StrClass = fix $ mkBoxPureClass "Str" [Str methods] 
    7780mkBoxPureClass :: forall a1 (m :: * -> *) a (m1 :: * -> *). 
    7881    ( Boxable m a1 
     
    8487    mkBoxClass cls methods' 
    8588    where 
    86     methods' = methods ++ 
     89    methods' = flip (++) methods 
    8790        [ "HOW"         ... const self 
    8891        , "WHAT"        ... const (raiseWhatError ("Can't access attributes of prototype: " ++ cls) `asTypeOf` self)