Changeset 12004 for src/Pugs/Val

Show
Ignore:
Timestamp:
08/08/06 18:17:32 (2 years ago)
Author:
audreyt
Message:

* Experiment with two higher-order instances of cast:

"return . cast" can be written as "cast"
"fmap cast" can be written as "cast"

also, most "liftX" can now be written as "cast" as well.

If this proves to be too confusing and/or causing too
much overlaps, then they could be retired (esp. the first
case that gives out "Just" and "singleton" for free).

Files:
1 modified

Legend:

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

    r12002 r12004  
    1212 
    1313instance ICoercible P PureStr where 
    14     asStr  = return . cast 
     14    asStr  = cast 
    1515 
    1616class (Monad m, Functor m, Eq a, Data a, Typeable a) => ICoercible m a | a -> m where