ocals :: Spec -> [Loc]
locals
  Spec
    { specStreams   = streams
    , specTriggers  = triggers
    , specObservers = observers
    } = nubBy eqLoc . toList $
          concat (fmap locsStream   streams)  `append`
          concat (fmap locsTrigger  triggers) `append`
          concat (fmap locsObserver observers)

  where

  eqLoc :: Loc -> Loc -> Bool
  eqLoc Loc { localName = name1 } Loc { localName = name2 } =
    name1 == name2

--------------------------------------------------------------------------------

locals :: Spec -> [Loc]
locals
  Spec
    { specStreams   = streams
    , specTriggers  = triggers
    , specObservers = observers
    } = nubBy eqLoc . toList $
          concat (fmap locsStream   streams)  `append`
          concat (fmap locsTrigger  triggers) `append`
          concat (fmap locsObserver observers)

  where

  eqLoc :: Loc -> Loc -> Bool
  eqLoc Loc { localName = name1 } Loc { localName = name2 } =
    name1 == name2

--------------------------------------------------------------------------------
locals
  Spec
    { specStreams   = streams
    , specTriggers  = triggers
    , specObservers = observers
    } = nubBy eqLoc . toList $
          concat (fmap locsStream   streams)  `append`
          concat (fmap locsTrigger  triggers) `append`
          concat (fmap locsObserver observers)

  where

  eqLoc :: Loc -> Loc -> Bool
  eqLoc Loc { localName = name1 } Loc { localName = name2 } =
    name1 == name2

--------------------------------------------------------------------------------