| Copyright | (c) Galois Inc. 2020 |
|---|---|
| License | BSD3 |
| Maintainer | Joe Hendrix <jhendrix@galois.com> |
| Safe Haskell | None |
| Language | Haskell2010 |
What4.Utils.OnlyNatRepr
Description
Defines a GADT for indicating a base type must be a natural number. Used for restricting index types in MATLAB arrays.
Synopsis
- data OnlyNatRepr tp = tp ~ BaseNatType => OnlyNatRepr
- toBaseTypeRepr :: OnlyNatRepr tp -> BaseTypeRepr tp
Documentation
data OnlyNatRepr tp Source #
This provides a GADT instance used to indicate a BaseType must have
value BaseNatType.
Constructors
| tp ~ BaseNatType => OnlyNatRepr |
Instances
| TestEquality OnlyNatRepr Source # | |
Defined in What4.Utils.OnlyNatRepr Methods testEquality :: OnlyNatRepr a -> OnlyNatRepr b -> Maybe (a :~: b) # | |
| HashableF OnlyNatRepr Source # | |
Defined in What4.Utils.OnlyNatRepr | |
| Hashable (OnlyNatRepr tp) Source # | |
Defined in What4.Utils.OnlyNatRepr | |
toBaseTypeRepr :: OnlyNatRepr tp -> BaseTypeRepr tp Source #