ddc-core-simpl-0.4.3.1: Disciplined Disciple Compiler code transformations.

Safe HaskellSafe
LanguageHaskell98

DDC.Core.Transform.Boxing

Description

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.

Synopsis

Documentation

data Rep Source #

Representation of the values of some type.

Constructors

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.

Instances

Eq Rep Source # 

Methods

(==) :: Rep -> Rep -> Bool #

(/=) :: Rep -> Rep -> Bool #

Ord Rep Source # 

Methods

compare :: Rep -> Rep -> Ordering #

(<) :: Rep -> Rep -> Bool #

(<=) :: Rep -> Rep -> Bool #

(>) :: Rep -> Rep -> Bool #

(>=) :: Rep -> Rep -> Bool #

max :: Rep -> Rep -> Rep #

min :: Rep -> Rep -> Rep #

Show Rep Source # 

Methods

showsPrec :: Int -> Rep -> ShowS #

show :: Rep -> String #

showList :: [Rep] -> ShowS #

data Config a n Source #

Constructors

Config 

Fields

boxingModule :: Ord n => Config a n -> Module a n -> Module a n Source #

Manage boxing in a module.