1
1
mirror of https://github.com/github/semantic.git synced 2024-12-20 21:31:48 +03:00
This commit is contained in:
Rob Rix 2016-06-16 11:45:53 -04:00
parent 811b623652
commit db035a8009

View File

@ -6,8 +6,12 @@ import Prologue
infix 9 :=>
-- | A phantom type tag constructor.
type a :=> b = Tagged a b
-- | Smart constructor for type-tagged data fields.
-- |
-- | This has type a :=> b. When you require a to be some concrete type (and you usually will), it should be provided by context, whether using ascription, a type signature for the binding, `asTypeOf`, or some other way to allow the specific type to be inferred.
field :: b -> a :=> b
field = Tagged