{-# OPTIONS --safe #-}

open import Algebra
open import Level

module Data.Weighted.Syntax {} {𝑆 : Type } (sgp : Semigroup 𝑆) where

open Semigroup sgp renaming (_∙_ to _⊕_)

open import Path
open import HLevels
open import Data.Weighted.Definition sgp

open import Prelude hiding ([_]; _∷_)

infixr 5 _▹_
record WithWeight (A : Type a) : Type ( ℓ⊔ a) where
  constructor _▹_
  field
    weight-of : 𝑆
    value  : A
open WithWeight public

VecT :   Type a  Type (a ℓ⊔ )

VecT zero    A = WithWeight A
VecT (suc n) A = WithWeight A × VecT n A

⟅_⟆ :  {n}  VecT n A  Weighted A
⟅_⟆ {n = zero}  (w  x) = w  x  ⟅⟆
⟅_⟆ {n = suc n} (w  x , xs) = w  x   xs