c-expr-runtime: Haskell DSL for simple C arithmetic expressions

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

This library provides a Haskell DSL for simple C arithmetic expressions, implementing the arithmetic conversion and integral promotion rules of the C standard.

For example, addition is defined with the following type class:

infixl 2 +
type Add :: Type -> Type -> Constraint
class Add a b where
  type family AddRes a b :: Type
  (+) :: a -> b -> AddRes a b

That is, we can add arguments of different types, e.g. an integer and a floating-point number, in which case the integer will first get converted to the floating-point format before performing the addition.

Properties

Versions 0.1.0.0
Change log CHANGELOG.md
Dependencies base (>=4.16 && <4.23), c-expr-runtime, containers (>=0.5 && <0.9), data-array-byte (>=0.1.0.1 && <0.2), fin (>=0.3.2 && <0.4), some (>=1.0.6 && <1.1), template-haskell (>=2.18 && <2.25), vec (>=0.5 && <0.6) [details]
License BSD-3-Clause
Author Well-Typed LLP
Maintainer info@well-typed.com
Category System
Uploaded by EdskoDeVries at 2026-02-06T13:12:22Z

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees