Show
Ignore:
Timestamp:
08/16/06 19:28:24 (2 years ago)
Author:
audreyt
Message:

* Glorious refactoring of the Var type.

Previously, Var is type synonym to String, and all package

lookups, OUTER
handling, sigil and twigil parsing etc were done in an extremely adhoc way with String operations.

Now we split Var into several parts.
Take "&Moose::Elk::infix:<antler>" as an example:

v_sigil
VarSigil? -- SScalar
v_twigil
VarTwigil? -- TNone
v_package
Pkg -- ["Moose", "Elk"]
v_categ
VarCateg? -- C_infix
v_name
ID -- "antler"

The names are stored as interned ByteStrings? for fast comparison.

All involved types are changed from String to new types as well,

such as (envPackage
Pkg).
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Prim/List.hs

    r11585 r12317  
    316316        | VRef x' <- x 
    317317        = doHyper =<< readRef x' 
    318         | VList x' <- x 
     318        | VList{} <- x 
    319319        = op1HyperPrefix sub x 
    320320        | otherwise 
     
    353353        | VRef y' <- y 
    354354        = doHyper x =<< readRef y' 
    355         | VList x' <- x 
     355        | VList{} <- x 
    356356        = op2Hyper sub x y 
    357         | VList y' <- y 
     357        | VList{} <- y 
    358358        = op2Hyper sub x y 
    359359        | otherwise