ãããªãã§ããããã£ã±ãHaskellã§ããããã°ããªã³ããããã§ãããã調ã¹ãçµæãDebug.Traceã«ããé¢æ°traceã使ãã°ã§ãããã¨ããããã¾ããããããå¯ä½ç¨ã⦠å®è£ ã¯ãã£ã¨æé»é¢ãªãã ãããª(ãã¬ã¤ãªèº«ä½ããçããããªããã¿ãããª)ã ãã®ã¾ã¾ä½¿ã£ã¦ããããã§ããããã£ãããªãã§Rubyã£ã½ãé¢æ°pãå®ç¾©ãã¦ã¿ã¾ããã ãã¡ã¤ã«: a.hs module Main (main) where import Debug.Trace (trace) p :: (Show a) => a -> a p = p' "" p' :: (Show a) => String -> a -> a p' s a = trace (s ++ show a) a inc :: Int -> Int inc i = i + 1 main :: IO () main = print $ p $ i
{{#tags}}- {{label}}
{{/tags}}