1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 10:15:55 +03:00

Revert "Define a Bifunctor instance for Value."

This reverts commit aec82b3743.
This commit is contained in:
Rob Rix 2019-10-23 12:25:07 -04:00
parent 93db4cfa45
commit 71185d0fbb
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7

View File

@ -46,26 +46,6 @@ data Value term address
| Hole
deriving (Eq, Ord, Show, Generic, NFData)
instance Bifunctor Value where
bimap term addr = go where
go = \case
Closure p m n v as b s f -> Closure p m n (fmap go v) as (fmap term b) (addr s) (addr f)
Unit -> Unit
Boolean b -> Boolean b
Integer i -> Integer i
Rational r -> Rational r
Float f -> Float f
String s -> String s
Tuple vs -> Tuple (map go vs)
Array vs -> Array (map go vs)
Class d vs a -> Class d (map go vs) (addr a)
Object a -> Object (addr a)
Namespace n a -> Namespace n (addr a)
KVPair k v -> KVPair (go k) (go v)
Hash vs -> Hash (map go vs)
Null -> Null
Hole -> Hole
instance ValueRoots address (Value term address) where
valueRoots _ = lowerBound