Hello Pugs developers! I tried to compile Pugs 6.0.10 with ghc 6.4 and got some error messages. Fortunately they were not hard to resolve. I had to do the following:
- remove getEnvironment from src/Posix.hs (it collided with System.Environment.getEnvironment). - not import the full Data.Set in src/Prim.hs (there were collisions with GHC.*) - import Data.Set.cardinality in src/Internals.hs. (In the patch cardinality is replaced with size, since cardinality is marked as deprecated). This is my first encounter with Haskell, so I might not have found the optimal solution. The tests run know, though. I attach a patch with my changes against Pugs 6.0.10. Please keep up your amazing work! regards, -Edwin
diff -r -u Perl6-Pugs-6.0.10/src/Internals.hs Perl6-Pugs-6.0.10-mod/src/Internals.hs --- Perl6-Pugs-6.0.10/src/Internals.hs 2005-03-03 17:45:54.000000000 +0100 +++ Perl6-Pugs-6.0.10-mod/src/Internals.hs 2005-03-12 20:59:30.000000000 +0100 @@ -77,7 +77,7 @@ import Data.Word import Data.Char import Data.Set ( - Set, elementOf, setToList, mapSet, mkSet, emptySet, unionManySets, union + Set, elementOf, setToList, mapSet, mkSet, emptySet, unionManySets, union, size ) import Data.Ratio import Data.Complex diff -r -u Perl6-Pugs-6.0.10/src/Posix.hs Perl6-Pugs-6.0.10-mod/src/Posix.hs --- Perl6-Pugs-6.0.10/src/Posix.hs 2005-03-03 17:45:54.000000000 +0100 +++ Perl6-Pugs-6.0.10-mod/src/Posix.hs 2005-03-12 13:27:38.000000000 +0100 @@ -22,7 +22,7 @@ removeLink, setFileMode, sleep, - getEnvironment, +-- getEnvironment, ) where #ifdef PUGS_HAVE_POSIX diff -r -u Perl6-Pugs-6.0.10/src/Prim.hs Perl6-Pugs-6.0.10-mod/src/Prim.hs --- Perl6-Pugs-6.0.10/src/Prim.hs 2005-03-04 18:43:06.000000000 +0100 +++ Perl6-Pugs-6.0.10-mod/src/Prim.hs 2005-03-12 20:56:50.000000000 +0100 @@ -18,7 +18,7 @@ import Pretty import Parser import Monads -import Data.Set +--import Data.Set op0 :: Ident -> [Val] -> Eval Val op0 "," = return . VList . concatMap vCast @@ -225,10 +225,10 @@ op1Pick :: Val -> Eval Val op1Pick (VJunc (Junc JAny _ set)) = do -- pick mainly works on 'any' - rand <- liftIO $ randomRIO (0 :: Int, (cardinality set) - 1) + rand <- liftIO $ randomRIO (0 :: Int, (size set) - 1) return $ (setToList set) !! rand op1Pick (VJunc (Junc _ _ set)) = - if (cardinality $ set) > 1 then return VUndef + if (size $ set) > 1 then return VUndef else return $ head $ setToList set op1Pick (VRef v) = op1Pick v op1Pick v = return $ VError "pick not defined" (Val v)