Comprehensive support for standard Haskell classes and numeric conversions #10

Closed
mchakravarty opened this Issue Apr 17, 2011 · 1 comment

Projects

None yet

2 participants

@mchakravarty
Member

No description provided.

@mchakravarty mchakravarty was assigned Apr 17, 2011
@andygill
andygill commented Dec 5, 2013

You should look at the new Data.Boolean. Conal, Jan and I improved it for Sunroof support, and it now has some numeric overloadings as well as for booleans.

@tmcdonell tmcdonell added a commit that closed this issue Apr 24, 2016
@tmcdonell tmcdonell Comprehensive support for standard Haskell classes
This adds support for the standard Haskell'98 type class hierarchy for scalar Accelerate types. Where possible we overload the standard classes (Num, Integral,...) to support 'Exp' types, but otherwise (Ord, Eq,...) create a new but equivalent class lifted to Accelerate types.

Note that this approach requires us to have vacuous instances for some standard classes (Real, Enum) which currently make no sense for Accelerate in order to fulfil superclass constraints. The intention is to minimise qualified applications for common operations such as (+).

Fixes: AccelerateHS/accelerate#10 AccelerateHS/accelerate#130 AccelerateHS/accelerate#202
aa2efd5
@tmcdonell tmcdonell closed this in aa2efd5 Apr 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment