Copyright | Copyright 2022 Shea Levy. |
---|---|
License | Apache-2.0 |
Maintainer | shea@shealevy.com |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Syntax helpers for eventuo11y interfaces.
Synopsis
- class RecordField k v a where
- (≔) :: k -> v -> a
Documentation
class RecordField k v a where Source #
A type class for common syntax for types that are key-value-like.
For example, the appropriate RecordField
instances allow for
[ "bytes", "asked" ] ≔ ''ByteCount
and [ "bytes", "actual" ] ≔ [t|Maybe ByteCount|]
to both construct FieldConstructorSpec
s, the former creating a constructor
BytesAsked
taking a ByteCount
and the latter a constructor
BytesActual
taking a Maybe
ByteCount
.