Changeset 12041 for src/Pugs/Val

Show
Ignore:
Timestamp:
08/09/06 18:34:03 (2 years ago)
Author:
gaal
Message:

* Pugs.Val.Num and simple coersion triggered from oldspace.

1 + 41 constructs two newval PureStrs?, and the fromVV /
ICoercible classes figure out how to get numbers of them.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Val/Str.hs

    r12008 r12041  
    1414    asStr  = cast 
    1515-} 
     16 
     17parseNum :: PureStr -> Double 
     18parseNum (MkStr s) = fromIntegral i 
     19    where (i, _) = maybe (0, undefined) id $ Char8.readInt s