Changeset 14414 for src/Pugs/Compile
- Timestamp:
- 10/18/06 19:03:14 (2 years ago)
- Files:
-
- 1 modified
-
src/Pugs/Compile/Pugs.hs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Pugs/Compile/Pugs.hs
r13863 r14414 57 57 compile (Val val) = do 58 58 compWith "Val" [compile val] 59 compile (Var var) = do 60 compWith "Var" [compile var] 59 61 compile exp = ret $ "(" ++ show exp ++ ")" 62 63 instance Compile Var where 64 compile var = ret $ "(cast " ++ show var ++ ")" 60 65 61 66 instance Compile Pad where … … 76 81 tvarsC <- fmap (filter (not . Str.null)) $ mapM compile tvars 77 82 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] 79 84 80 85 instance (Typeable a) => Compile (Maybe (TVar a)) where
