mirror of
https://github.com/github/semantic.git
synced 2024-12-30 02:14:20 +03:00
📝
This commit is contained in:
parent
811b623652
commit
db035a8009
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user