ghc-typelits-natnormalise: GHC typechecker plugin for types of kind GHC.TypeLits.Nat

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]

Warnings:

A type checker plugin for GHC that can solve equalities of types of kind Nat, where these types are either:

It solves these equalities by normalising them to sort-of SOP (Sum-of-Products) form, and then perform a simple syntactic equality.

For example, this solver can prove the equality between:

(x + 2)^(y + 2)

and

4*x*(2 + x)^y + 4*(2 + x)^y + (2 + x)^y*x^2

Because the latter is actually the SOP normal form of the former.

To use the plugin, add the

OPTIONS_GHC -fplugin GHC.TypeLits.Normalise

Pragma to the header of your file.


[Skip to ReadMe]

Properties

Versions0.1, 0.1.1, 0.1.2, 0.2, 0.2.1, 0.3, 0.3.1, 0.4, 0.4.1, 0.4.2, 0.4.3, 0.4.4, 0.4.5, 0.4.6, 0.5, 0.5.1, 0.5.2, 0.5.3, 0.5.4, 0.5.5, 0.5.6, 0.5.7, 0.5.7, 0.5.8, 0.5.9, 0.5.10, 0.6, 0.6.1, 0.6.2
Change logCHANGELOG.md
Dependenciesbase (>=4.9 && <5), ghc (>=8.0.1 && <8.4), ghc-tcplugins-extra (>=0.2), integer-gmp (==1.0.*) [details]
LicenseBSD-2-Clause
CopyrightCopyright © 2015-2016, University of Twente, 2017 , QBayLogic B.V.
AuthorChristiaan Baaij
Maintainerchristiaan.baaij@gmail.com
CategoryType System
Home pagehttp://www.clash-lang.org/
Bug trackerhttp://github.com/clash-lang/ghc-typelits-natnormalise/issues
Source repositoryhead: git clone https://github.com/clash-lang/ghc-typelits-natnormalise.git
UploadedTue Nov 7 13:00:41 UTC 2017 by ChristiaanBaaij

Modules

[Index]

Flags

NameDescriptionDefaultType
deverror

Enables -Werror for development mode and TravisCI

DisabledManual

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainers' corner

For package maintainers and hackage trustees


Readme for ghc-typelits-natnormalise-0.5.7

[back to package description]

ghc-typelits-natnormalise

Build Status Hackage Hackage Dependencies

A type checker plugin for GHC that can solve equalities of types of kind Nat, where these types are either:

It solves these equalities by normalising them to sort-of SOP (Sum-of-Products) form, and then perform a simple syntactic equality.

For example, this solver can prove the equality between:

(x + 2)^(y + 2)

and

4*x*(2 + x)^y + 4*(2 + x)^y + (2 + x)^y*x^2

Because the latter is actually the SOP normal form of the former.

To use the plugin, add

{-# OPTIONS_GHC -fplugin GHC.TypeLits.Normalise #-}

To the header of your file.