Changeset 13488 for src/Pugs/Val
- Timestamp:
- 09/20/06 11:54:32 (2 years ago)
- Location:
- src/Pugs/Val
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
src/Pugs/Val/Base.hs
r13280 r13488 75 75 instance ICoercible P PureInt where 76 76 asInt = return . cast 77 asStr INotANumber = cast "NaN" 78 asStr (IInfinite SPositive) = cast "Inf" 79 asStr (IInfinite SNegative) = cast "-Inf" 80 asStr (IFinite n) = cast (show n) 77 81 asNum INotANumber = return $ cast ( (0/0) :: Double) 78 82 asNum (IInfinite SPositive) = return $ cast ( (1/0) :: Double) -
src/Pugs/Val/Code.hs
r13464 r13488 207 207 deriving (Show, Eq, Ord, Typeable) {-!derive: YAML_Pos, Perl6Class, MooseClass!-} 208 208 209 instance Monoid (Feed a) where 210 mempty = MkFeed mempty mempty 211 mappend (MkFeed x1 x2) (MkFeed y1 y2) = MkFeed (mappend x1 y1) (mappend x2 y2) 212 mconcat xs = MkFeed (mconcat (map f_positionals xs)) (mconcat (map f_nameds xs)) 213 209 214 emptyFeed :: Feed a 210 215 emptyFeed = MkFeed [] Map.empty
