Changes between Version 4 and Version 5 of TypeNats/ImplicitExplicit


Ignore:
Timestamp:
Jan 16, 2011 4:46:43 PM (4 years ago)
Author:
diatchki
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TypeNats/ImplicitExplicit

    v4 v5  
    1111When defining `memset` we can just use `natToInteger` on the `Nat n` parameter to get the actual value of the array size. 
    1212 
    13 Another approach is to use an implicit parameter by using the class `TypeNat`.  For example: 
     13Another approach is to let the system infer the parameter by using the class `TypeNat`.  For example: 
    1414{{{ 
    1515memsetAuto :: (Storable a, TypeNat n) => ArrPtr n a -> a -> IO ()