Safe Haskell | Safe |
---|---|
Language | Haskell98 |
Manage representation of numeric values in a module.
- Note: Boxing and Partial Application
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Unlike in Haskell, we do not allow explictly unboxed types in the source program because we don't want to deal with partial applications of functions to unboxed values. With our current setup we always have a version of each function that accepts boxed values, so we never need to do generic application involving unboxed values. Fast-path function specialisations that take unboxed parameters should be created separately, and not replace the existing slow-path, fully boxed version. Taking this approach is possible in a strict language because the boxed and unboxed values have the same semantic meaning. Boxing of values does not imply "lifting" of the associated semantic domain.
- data Rep
- data Config a n = Config {
- configRepOfType :: Type n -> Maybe Rep
- configConvertRepType :: Rep -> Type n -> Maybe (Type n)
- configConvertRepExp :: Rep -> a -> Type n -> Exp a n -> Maybe (Exp a n)
- configValueTypeOfLitName :: n -> Maybe (Type n)
- configValueTypeOfPrimOpName :: n -> Maybe (Type n)
- configValueTypeOfForeignName :: n -> Maybe (Type n)
- configUnboxLitName :: n -> Maybe n
- configUnboxPrimOpName :: n -> Maybe n
- boxingModule :: Ord n => Config a n -> Module a n -> Module a n
Documentation
Representation of the values of some type.
RepNone | These types don't contain any values. |
RepBoxed | Values of this type are uncomitted to a particular representation, they just describe a set of logical values. |
RepUnboxed | Values of this type are represented in unboxed form. |
Config | |
|