Aleksey Khudyakov  committed 65cf097

Revert commit and explain why such constraint is used

  • Participants
  • Parent commits f2a7deb

Comments (0)

Files changed (1)

File fixed-vector/Data/Vector/Fixed/Cont.hs

 {-# INLINE[1] vector #-}
 -- | Finalizer function for getting head of the vector.
-head :: forall n a. Arity n => ContVec (S n) a -> a
+head :: forall n a. Arity (S n) => ContVec (S n) a -> a
+-- NOTE: we need constraint `Arity (S n)' instead of `Arity n' because
+--       `Vector v' entails `Arity (Dim v)' and GHC cannot figure out
+--       that `Arity (S n)' ⇒ `Arity n'
 {-# INLINE head #-}
   = runContVec $ Fun