packages feed

Pugs 6.2.13.20111008 → 6.2.13.20120203

raw patch · 15 files changed

+25/−25 lines, 15 files

Files

Pugs.cabal view
@@ -1,9 +1,9 @@ Name            : Pugs-Version         : 6.2.13.20111008+Version         : 6.2.13.20120203 license         : BSD3 license-file    : LICENSE cabal-version   : >= 1.2.3-copyright       : 2005-2008, The Pugs Contributors+copyright       : 2005-2012, The Pugs Contributors maintainer      : Audrey Tang <audreyt@audreyt.org> category        : Language, Pugs stability       : experimental@@ -12,7 +12,7 @@ synopsis        : A Perl 6 Implementation description     : A Perl 6 Implementation author          : Audrey Tang <audreyt@audreyt.org>-Tested-With:    GHC==6.8.2, GHC==6.8.3, GHC==6.10.1, GHC==6.12.1, GHC==7.0.1, GHC==7.2.1+Tested-With:    GHC==6.8.2, GHC==6.8.3, GHC==6.10.1, GHC==6.12.1, GHC==7.0.1, GHC==7.2.1, GHC==7.4.1 data-files      :     blib6/pugs/perl5/lib/Parse/Yapp/Driver.pm     blib6/pugs/perl5/lib/Parse/Yapp/Grammar.pm
src/Pugs/AST.hs view
@@ -1,4 +1,4 @@-{-# OPTIONS_GHC -cpp -fglasgow-exts -fno-warn-orphans -funbox-strict-fields -fallow-overlapping-instances -fparr #-}+{-# OPTIONS_GHC -cpp -fglasgow-exts -fno-warn-orphans -funbox-strict-fields -fallow-overlapping-instances #-} {-# LANGUAGE GADTs #-}  {-|
src/Pugs/AST/Functions.hs view
@@ -1,4 +1,4 @@-{-# OPTIONS_GHC -fglasgow-exts -fno-warn-orphans -fallow-overlapping-instances -fallow-undecidable-instances -fparr #-}+{-# OPTIONS_GHC -fglasgow-exts -fno-warn-orphans -fallow-overlapping-instances -fallow-undecidable-instances #-} module Pugs.AST.Functions where import Pugs.Internals import Pugs.Types
src/Pugs/AST/Internals.hs view
@@ -1,4 +1,4 @@-{-# OPTIONS_GHC -cpp -fglasgow-exts -fno-warn-orphans -fallow-overlapping-instances -fallow-undecidable-instances -fparr #-}+{-# OPTIONS_GHC -cpp -fglasgow-exts -fno-warn-orphans -fallow-overlapping-instances -fallow-undecidable-instances #-} {-# LANGUAGE GADTs #-}  module Pugs.AST.Internals (
src/Pugs/AST/Internals/Instances.hs view
@@ -1,4 +1,4 @@-{-# OPTIONS_GHC -cpp -fglasgow-exts -fno-warn-orphans -fallow-overlapping-instances -fallow-undecidable-instances -fparr #-}+{-# OPTIONS_GHC -cpp -fglasgow-exts -fno-warn-orphans -fallow-overlapping-instances -fallow-undecidable-instances #-} {-# LANGUAGE GADTs #-}  
src/Pugs/AST/Pad.hs view
@@ -1,4 +1,4 @@-{-# OPTIONS_GHC -fglasgow-exts -fparr #-}+{-# OPTIONS_GHC -fglasgow-exts #-} {-# LANGUAGE GADTs #-} module Pugs.AST.Pad (   mkPad, unionPads, padKeys, filterPad, adjustPad, mergePadEntry,
src/Pugs/AST/Types.hs view
@@ -1,4 +1,4 @@-{-# OPTIONS_GHC -fglasgow-exts -fno-warn-orphans -fallow-overlapping-instances -fallow-undecidable-instances -fparr #-}+{-# OPTIONS_GHC -fglasgow-exts -fno-warn-orphans -fallow-overlapping-instances -fallow-undecidable-instances #-} module Pugs.AST.Types where import Pugs.Internals import Pugs.Types
src/Pugs/Class.hs view
@@ -1,4 +1,4 @@-{-# OPTIONS_GHC -fglasgow-exts -fparr -fallow-undecidable-instances -fallow-incoherent-instances #-}+{-# OPTIONS_GHC -fglasgow-exts -fallow-undecidable-instances -fallow-incoherent-instances #-}  {-|     Class meta-model.  (object meta-meta-model)
src/Pugs/Compile/Pugs.hs view
@@ -1,4 +1,4 @@-{-# OPTIONS_GHC -fglasgow-exts -fallow-overlapping-instances -fparr #-}+{-# OPTIONS_GHC -fglasgow-exts -fallow-overlapping-instances #-} {-# LANGUAGE GADTs #-}  module Pugs.Compile.Pugs (genPugs) where
src/Pugs/Eval.hs view
@@ -1,4 +1,4 @@-{-# OPTIONS_GHC -fglasgow-exts -cpp -fno-warn-deprecations -fallow-overlapping-instances -fparr #-}+{-# OPTIONS_GHC -fglasgow-exts -cpp -fno-warn-deprecations -fallow-overlapping-instances #-} {-# LANGUAGE GADTs #-}  {-|
src/Pugs/Eval/Var.hs view
@@ -1,4 +1,4 @@-{-# OPTIONS_GHC -fglasgow-exts -fallow-overlapping-instances -funbox-strict-fields -fparr #-}+{-# OPTIONS_GHC -fglasgow-exts -fallow-overlapping-instances -funbox-strict-fields #-} {-# LANGUAGE GADTs #-}  module Pugs.Eval.Var (
src/Pugs/Internals.hs view
@@ -1,4 +1,4 @@-{-# OPTIONS_GHC -fglasgow-exts -fno-warn-orphans -fallow-undecidable-instances -fallow-overlapping-instances -fparr #-}+{-# OPTIONS_GHC -fglasgow-exts -fno-warn-orphans -fallow-undecidable-instances -fallow-overlapping-instances #-}  {-|     Internal utilities and library imports.
src/Pugs/Prim/Numeric.hs view
@@ -7,8 +7,8 @@ import Pugs.Internals import Pugs.AST import Pugs.Types- import Pugs.Prim.Lifts+import GHC.Real (denominator)  op2OrdNumeric :: Value b => (forall a. (Ord a) => a -> a -> b) -> Val -> Val -> Eval Val op2OrdNumeric f x y@@ -119,13 +119,13 @@     if num1 == (1 :: VNum) then return (VInt 1) else do     num2 <- fromVal =<< fromVal' y     if isNaN num2 then return (VNum (0/0)) else do-    if num2 == (0 :: VNum) then return (VInt 1) else do-    case reverse $ show (num2 :: VNum) of-        ('0':'.':_) -> do-            num1 <- fromVal =<< fromVal' x-            if isDigit . head $ show (num1 :: VNum)-                then op2Rat ((^^) :: VRat -> VInt -> VRat) x y-                else op2Floating (**) x y+    rat2 <- fromVal =<< fromVal' y+    if rat2 == (0 :: VRat) then return (VInt 1) else do+    case denominator (rat2 :: VRat) of+        1 | rat2 > 0 -> do+            if (num2 :: VNum) >= 0+                then op2Rat ((^) :: VRat -> VInt -> VRat) x y+                else op2Rat ((^^) :: VRat -> VInt -> VRat) x y         _ -> op2Floating (**) x y  op2Divide :: Val -> Val -> Eval Val
src/Pugs/Types.hs view
@@ -1,4 +1,4 @@-{-# OPTIONS_GHC -fglasgow-exts -fno-warn-deprecations -fno-warn-orphans -funbox-strict-fields -fallow-overlapping-instances -fparr #-}+{-# OPTIONS_GHC -fglasgow-exts -fno-warn-deprecations -fno-warn-orphans -funbox-strict-fields -fallow-overlapping-instances #-} {-|     Implementation Types. @@ -130,7 +130,7 @@ enumCxt (CxtSlurpy _) = 1  -- | Return the 'Cxt' corresponding to the given P5 calling convention bits.-cxtEnum :: (Show a, Num a) => a -> Cxt+cxtEnum :: (Show a, Num a, Eq a) => a -> Cxt cxtEnum 128 = CxtVoid cxtEnum 0   = cxtItemAny cxtEnum 1   = cxtSlurpyAny
src/Pugs/Val/Code.hs view
@@ -6,7 +6,7 @@ -- import Pugs.Val.Capture import Pugs.Class import Text.PrettyPrint-import Data.Monoid+import Data.Monoid (Monoid(..)) import qualified Data.Map as Map import qualified Data.Set as Set import qualified Pugs.Types as Types