Changeset 4922 for src/Pugs/Bind.hs

Show
Ignore:
Timestamp:
06/23/05 21:00:37 (4 years ago)
Author:
autrijus
svk:copy_cache_prev:
6771
Message:

* clean up theorbtwo's vCast patch. I expect most tests

to still break... :)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Bind.hs

    r4832 r4922  
    4242        = ( ((prm, exp) : bound), exps ) 
    4343        | otherwise 
    44         = ( bound, (Syn "=>" [Val (VStr name), exp]:exps) ) 
     44        = ( bound, (App (Var "&infix:=>") Nothing [Val (VStr name), exp]:exps) ) 
     45 
    4546 
    4647matchNamedAttribute :: String -> String -> Bool 
     
    156157isPair (Pos _ exp) = isPair exp 
    157158isPair (Cxt _ exp) = isPair exp 
    158 isPair (Syn "=>" [(Val _), _])   = True 
    159159isPair (App (Var "&infix:=>") Nothing [(Cxt _ (Val _)), _])   = True 
    160160isPair (App (Var "&infix:=>") Nothing [(Val _), _])   = True 
     
    168168unPair (Pos _ exp) = unPair exp 
    169169unPair (Cxt _ exp) = unPair exp 
    170 unPair (Syn "=>" [(Val k), exp]) = (vCast k, exp) 
    171 unPair (App (Var "&infix:=>") Nothing [(Cxt _ (Val k)), exp]) = (vCast k, exp) 
    172 unPair (App (Var "&infix:=>") Nothing [(Val k), exp]) = (vCast k, exp) 
    173 unPair x                                = error ("Not a pair: " ++ show x) 
     170unPair (App (Var "&infix:=>") Nothing [key, exp]) 
     171    | Val (VStr k) <- unwrap key = (k, exp) 
     172unPair x = error ("Not a pair: " ++ show x) 
    174173 
    175174{-|