Changeset 12721 for src/Pugs/Val

Show
Ignore:
Timestamp:
08/26/06 16:16:55 (2 years ago)
Author:
audreyt
Message:

Gaal's \(...) Capture-literal patch, hacked slightly so it compiles.

Files:
1 modified

Legend:

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

    r12484 r12721  
    6767        , s_requiredNames             :: Set ID 
    6868        , s_positionalList            :: [Param] 
    69         , s_namedSet                  :: Map ID Param 
     69        , s_namedSet                  :: Map.Map ID Param 
    7070        , s_slurpyScalarList          :: [Param] 
    7171        , s_slurpyArray               :: Maybe Param 
     
    7878        , s_requiredNames             :: Set ID 
    7979        , s_positionalList            :: [Param] 
    80         , s_namedSet                  :: Map ID Param 
     80        , s_namedSet                  :: Map.Map ID Param 
    8181        , s_slurpyScalarList          :: [Param] 
    8282        , s_slurpyArray               :: Maybe Param 
     
    157157data Feed a = MkFeed 
    158158    { f_positionals :: [a] 
    159     , f_nameds      :: Map ID [a]   -- ^ maps to [a] and not a since if the Sig stipulates 
     159    , f_nameds      :: Map.Map ID [a]   -- ^ maps to [a] and not a since if the Sig stipulates 
    160160                                    --   @x, "x => 1, x => 2" constructs @x = (1, 2). 
    161161    } 
    162162    deriving (Show, Eq, Ord, Typeable) {-!derive: YAML_Pos, Perl6Class, MooseClass!-} 
    163163 
     164emptyFeed :: Feed a 
     165emptyFeed = MkFeed [] Map.empty 
    164166 
    165167-- | Runtime Capture with dynamic Exp for leaves 
     
    167169-- | Static Capture with Val for leaves 
    168170type ValCapt = Capt Val 
     171type ValFeed = Feed Val 
    169172 
     173instance ICoercible P ValCapt where 
     174        asStr _ = return (cast "<capt>") -- XXX 
     175