Changeset 12198 for src/Pugs/Val

Show
Ignore:
Timestamp:
08/14/06 06:31:33 (2 years ago)
Author:
audreyt
Message:

* Rename the "Ident" type to "ID"; it will be come a "newtype Int"

so we can intern all our buffers once Judy lands to the trunk,
which should also result in massive speed-ups in e.g. Type
comparisons.

Location:
src/Pugs/Val
Files:
2 modified

Legend:

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

    r12110 r12198  
    77import Pugs.Internals 
    88import {-# SOURCE #-} Pugs.Val 
     9 
     10 
     11-- Goal: associate each builtin type with prim methods (that handles native monotypes) 
     12--       its metaclass then get those as the initial method slots 
     13--       still have to maintain a list of builtin bootstrap classes somewhere 
     14--       but everything else can be reflected via Coercible 
     15-- 
     16-- Plan: Each prim type has a static fixed META class 
    917 
    1018class (Monad m, Functor m, Eq a, Data a, Typeable a) => ICoercible m a | a -> m where 
  • src/Pugs/Val/Code.hs

    r12179 r12198  
    6666        { s_invocant                  :: Param 
    6767        , s_requiredPositionalCount   :: Int 
    68         , s_requiredNames             :: Set Ident 
     68        , s_requiredNames             :: Set ID 
    6969        , s_positionalList            :: [Param] 
    70         , s_namedSet                  :: Map Ident Param 
     70        , s_namedSet                  :: Map ID Param 
    7171        , s_slurpyScalarList          :: [Param] 
    7272        , s_slurpyArray               :: Maybe Param 
     
    7777    | SigSubSingle 
    7878        { s_requiredPositionalCount   :: Int 
    79         , s_requiredNames             :: Set Ident 
     79        , s_requiredNames             :: Set ID 
    8080        , s_positionalList            :: [Param] 
    81         , s_namedSet                  :: Map Ident Param 
     81        , s_namedSet                  :: Map ID Param 
    8282        , s_slurpyScalarList          :: [Param] 
    8383        , s_slurpyArray               :: Maybe Param 
     
    9999-} 
    100100data Param = MkParam 
    101     { p_variable    :: Ident         -- ^ E.g. $m above 
     101    { p_variable    :: ID            -- ^ E.g. $m above 
    102102    , p_types       :: [Types.Type]  -- ^ Static pieces of inferencer-food 
    103103                                     --   E.g. Elk above 
     
    106106    , p_unpacking   :: Maybe PureSig -- ^ E.g. BinTree $t (Left $l, Right $r) 
    107107    , p_default     :: Maybe Exp     -- ^ E.g. $answer? = 42 
    108     , p_label       :: Ident         -- ^ E.g. :mode 
     108    , p_label       :: ID            -- ^ E.g. :mode 
    109109    , p_slots       :: Table         -- ^ Any additional attrib not 
    110110                                     --   explicitly mentioned below 
     
    136136data Arglist a = MkArglist 
    137137    { a_positional :: [a] 
    138     , a_named      :: Map Ident [a]   -- ^ maps to [a] and not a since if the Sig stipulates 
    139                                       --   @x, "x => 1, x => 2" constructs @x = (1, 2). 
     138    , a_named      :: Map ID [a]    -- ^ maps to [a] and not a since if the Sig stipulates 
     139                                    --   @x, "x => 1, x => 2" constructs @x = (1, 2). 
    140140    } 
    141141    deriving (Show, Eq, Ord, Data, Typeable) {-!derive: YAML_Pos, Perl6Class, MooseClass!-}