Skip to content

Commit 4cc52fc

Browse files
committed
Add deprecation pragma
1 parent 831d2cb commit 4cc52fc

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

clash-prelude/src/Clash/Sized/Vector.hs

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,7 @@ pattern Cons x xs = (:>) x xs
286286

287287
infixr CONS_PREC `Cons`
288288
{-# COMPLETE Nil, Cons #-}
289+
{-# DEPRECATED Cons "Use '(:>)' instead. 'Cons' will be removed in Clash 1.12" #-}
289290

290291
instance Show a => Show (Vec n a) where
291292
showsPrec n = \case
@@ -1620,7 +1621,7 @@ Nil
16201621
In the expression: take d4 (1 :> 2 :> Nil)
16211622
In an equation for ‘it’: it = take d4 (1 :> 2 :> Nil)
16221623
1623-
#elif __GLASGOW_HASKELL__ >= 902
1624+
#elif __GLASGOW_HASKELL__ >= 900
16241625
>>> take d4 (1:>2:>Nil)
16251626
<BLANKLINE>
16261627
<interactive>:...
@@ -1632,19 +1633,6 @@ Nil
16321633
In the expression: take d4 (1 :> 2 :> Nil)
16331634
In an equation for ‘it’: it = take d4 (1 :> 2 :> Nil)
16341635
1635-
#elif __GLASGOW_HASKELL__ == 900
1636-
>>> take d4 (1:>2:>Nil)
1637-
<BLANKLINE>
1638-
<interactive>:...
1639-
• Couldn't match type ‘4 + n0’ with ‘2’
1640-
Expected: Vec (4 + n0) a
1641-
Actual: Vec 2 a
1642-
^
1643-
The type variable ‘n0’ is ambiguous
1644-
• In the second argument of ‘take’, namely ‘(1 :> 2 :> Nil)’
1645-
In the expression: take d4 (1 :> 2 :> Nil)
1646-
In an equation for ‘it’: it = take d4 (1 :> 2 :> Nil)
1647-
16481636
#else
16491637
>>> take d4 (1:>2:>Nil)
16501638
<BLANKLINE>

0 commit comments

Comments
 (0)