mirror of
https://github.com/github/semantic.git
synced 2024-12-20 13:21:59 +03:00
Remove the obsolete type tag stuff.
This commit is contained in:
parent
138f66ae0d
commit
263c96468c
@ -17,18 +17,6 @@ infixr 0 .:
|
||||
(.:) = RCons
|
||||
|
||||
|
||||
infix 9 :=>
|
||||
|
||||
-- | A phantom type tag constructor.
|
||||
newtype a :=> b = Field { unField :: 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 = Field
|
||||
|
||||
|
||||
-- Families
|
||||
|
||||
type family ValueOf field
|
||||
@ -70,10 +58,3 @@ instance (Show h, Show (Record t)) => Show (Record (h ': t)) where
|
||||
|
||||
instance Show (Record '[]) where
|
||||
showsPrec _ RNil = ("'[]" <>)
|
||||
|
||||
|
||||
type instance ValueOf ((:=>) tag value) = value
|
||||
|
||||
instance IsField (tag :=> value) where
|
||||
getValue = unField
|
||||
setValue = field
|
||||
|
Loading…
Reference in New Issue
Block a user