1
1
mirror of https://github.com/github/semantic.git synced 2025-01-02 12:23:08 +03:00

Rename tableSingleton to singleton.

This commit is contained in:
Rob Rix 2017-08-31 22:43:11 -04:00
parent 90b0475b1a
commit f1b406fc16

View File

@ -1,6 +1,6 @@
module Data.Syntax.Assignment.Table.Array module Data.Syntax.Assignment.Table.Array
( Table(tableAddresses) ( Table(tableAddresses)
, tableSingleton , singleton
) where ) where
import Data.Array import Data.Array
@ -10,8 +10,8 @@ import Data.Functor.Classes
data Table i a = Table { tableAddresses :: [i], tableBranches :: Array i (Maybe a) } data Table i a = Table { tableAddresses :: [i], tableBranches :: Array i (Maybe a) }
deriving (Foldable, Functor, Traversable) deriving (Foldable, Functor, Traversable)
tableSingleton :: Ix i => i -> a -> Table i a singleton :: Ix i => i -> a -> Table i a
tableSingleton i a = Table [i] (listArray (i, i) [Just a]) singleton i a = Table [i] (listArray (i, i) [Just a])
instance (Ix i, Show i) => Show1 (Table i) where instance (Ix i, Show i) => Show1 (Table i) where