primitive pattern matching

This commit is contained in:
aarne
2007-03-27 20:54:49 +00:00
parent 7c30d211c3
commit fd518ed2a3
9 changed files with 61 additions and 29 deletions

View File

@@ -12,9 +12,6 @@ import qualified Data.Map as M
prEnv :: Env -> IO ()
prEnv env = do
putStrLn "--# values"
mapM_ putStrLn
[prs c ++ " = " ++ prt val | (c,val) <- M.toList $ values env]
putStrLn "--# types"
mapM_ putStrLn
[prs c ++ " : " ++ prs val | (c,val) <- M.toList $ types env]
@@ -27,6 +24,10 @@ prEnv env = do
putStrLn "--# parvals"
mapM_ putStrLn
[prs c ++ " = " ++ prt val | (c,val) <- M.toList $ parvals env]
putStrLn "--# values"
mapM_ putStrLn
[prs c ++ " = " ++ prt val | (c,val) <- M.toList $ values env]
prs :: (S.Print a) => a -> String
prs = S.printTree