import Data.Graph.Inductive.Graph
import Data.Array.IArray
import Data.List
+
+#if __GLASGOW_HASKELL__ <= 606
+(*) `on` f = \x y -> f x * f y
+#else
import Data.Function
+#endif
-- Configure the path to cs2.exe relative to the program/ directory here.
cs2cmd = "./cs2.exe"
module Formatter where
import Data.List
+#if __GLASGOW_HASKELL__ <= 606
+intercalate xs xss = concat (intersperse xs xss)
+#endif
+
padWith :: a -> Int -> [a] -> [a]
padWith _ 0 l = l
padWith e n [] = replicate n e
# Let's keep it simple for now.
+# -cpp: Handle GHC 6.6.1 compatibility checks.
+# -fglasgow-exts: Handle rank-2 type of RandomizedMonad, among other things.
all:
- ghc -fglasgow-exts --make -c *.hs
+ ghc -cpp -fglasgow-exts --make -c *.hs
all-optimized:
- ghc -fglasgow-exts --make -O -hisuf O.hi -osuf O.o -c *.hs
+ ghc -cpp -fglasgow-exts --make -O -hisuf O.hi -osuf O.o -c *.hs
clean:
rm -f *.hi *.o
#!/bin/bash
# Let ghci see only the source so it loads the modules debuggably.
-exec ghci -fglasgow-exts -hisuf D.hi -osuf D.o Test "$@"
+exec ghci -cpp -fglasgow-exts -hisuf D.hi -osuf D.o Test "$@"