
4 Jan
2008
4 Jan
'08
3:13 p.m.
On Jan 4, 2008 5:52 PM, Peter Verswyvelen
It's already possible to write asTypeOf :: a {- ^ the input value to be passed through -} -> a {- ^ the value is ignored, but the type is unified with the first parameter -} -> a {- ^ the value of the first parameter -}
Nice. Still using "first parameter" though ;-)
-- | Pass through the input value but forces unification -- of its type with the type of the other argument. asTypeOf :: a -- ^ The input value to be passed through. -> a -- ^ The other value whose type will be unified. -> a -- ^ The input value. asTypeOf = const -- Felipe.