packages feed

tilia-0.2.0.0: corpora/vendored/cpp/macro/macro-ending-a-block-above-a-comment-out.hs

{-# LANGUAGE CPP #-}

-- A use ending a block stays in it when a comment under it comes before the
-- code after the block.
module Solver.Audit where

#define CHECKED(x) (check x)

audit :: Int -> IO ()
audit n = do
  print n
  CHECKED (n)
  -- The check has the last word.

summary :: [Int] -> IO ()
summary ns = do
  print ns
#ifdef VERBOSE
  CHECKED (sum ns)
-- The total is checked too.
#endif

total :: Int
total = 0