Changeset 14414 for src/Pugs/Compile

Show
Ignore:
Timestamp:
10/18/06 19:03:14 (2 years ago)
Author:
audreyt
Message:

* Pugs.Compile.Pugs: Repair -CPugs, and by extension pugscc

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Compile/Pugs.hs

    r13863 r14414  
    5757    compile (Val val) = do 
    5858        compWith "Val" [compile val] 
     59    compile (Var var) = do 
     60        compWith "Var" [compile var] 
    5961    compile exp = ret $ "(" ++ show exp ++ ")" 
     62 
     63instance Compile Var where 
     64    compile var = ret $ "(cast " ++ show var ++ ")" 
    6065 
    6166instance Compile Pad where 
     
    7681            tvarsC <- fmap (filter (not . Str.null)) $ mapM compile tvars 
    7782            if null tvarsC then return Str.empty else do 
    78             return $ Str.concat [pl, Str.pack (cast var), Str.pack ", [", joinMany tvarsC, br, pr] 
     83            return $ Str.concat [pl, (Str.pack ("cast " ++ show (cast var :: String))), Str.pack ", [", joinMany tvarsC, br, pr] 
    7984 
    8085instance (Typeable a) => Compile (Maybe (TVar a)) where