Changeset 5843

Show
Ignore:
Timestamp:
07/27/05 16:27:42 (3 years ago)
Author:
autrijus
svk:copy_cache_prev:
7758
Message:

* Primitive listops now handles Pairs as regular arguments

instead of named bindings.

Location:
src/Pugs
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Context.hs

    r5836 r5843  
    1515    deltaType, 
    1616    isaType, 
     17    isaType', 
    1718    addNode, 
    1819    initTree 
  • src/Pugs/Eval.hs

    r5807 r5843  
    921921    -- check invs and args for Pair types; if they are, reduce them fully 
    922922    -- to stringified normal form. 
    923     let isPairs = (map isPairParam (subParams sub)) ++ repeat False 
    924         isPairParam = isaType cls "Pair" . typeOfCxt . paramContext 
     923    let isPairs = (map (isPairParam . typeOfCxt . paramContext) (subParams sub)) ++ repeat False 
     924        isPairParam typ = isaType' cls typ (MkType "Pair") 
    925925        cls = envClasses env 
    926926        argsPairs = if isJust invs then tail isPairs else isPairs 
  • src/Pugs/Prim/Param.hs

    r4544 r5843  
    1515    (buildParam "Hash" "*" "@?0" (Val VUndef)): 
    1616    (buildParam "Hash" "*" "%?0" (Val VUndef)):ps) 
    17 foldParam "List"    = doFoldParam "List" "*@?1" 
     17foldParam "List"    = doFoldParam "Any" "*@?1" 
    1818foldParam ('r':'w':'!':"List") = \ps -> ((buildParam "List" "" "@?0" (Val VUndef)) { isLValue = True }:ps) 
    1919foldParam ('r':'w':'!':str) = \ps -> ((buildParam str "" "$?1" (Val VUndef)) { isLValue = True }:ps)