1
1
mirror of https://github.com/github/semantic.git synced 2024-12-21 13:51:44 +03:00

Derive Eq & Show instances for Table.

This commit is contained in:
Rob Rix 2017-08-31 23:12:29 -04:00
parent 4d07a6d7f2
commit fcbefe2a11

View File

@ -15,7 +15,7 @@ import GHC.Stack
import Prelude hiding (lookup)
data Table i a = Table { tableAddresses :: [i], tableBranches :: Array i (Maybe a) }
deriving (Foldable, Functor, Traversable)
deriving (Eq, Foldable, Functor, Show, Traversable)
singleton :: Ix i => i -> a -> Table i a
singleton i a = Table [i] (listArray (i, i) [Just a])