-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
4 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ADDED: The Vec type now has a [COMPLETE pragma](https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/pragmas.html#complete-pragma) to avoid incomplete pattern matches when using the `(:>)` pattern. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
Copyright : (C) 2013-2016, University of Twente, | ||
2017 , Myrtle Software Ltd | ||
2022-2023, QBayLogic B.V. | ||
2024, Alex Mason | ||
License : BSD2 (see the file LICENSE) | ||
Maintainer : QBayLogic B.V. <[email protected]> | ||
-} | ||
|
@@ -180,6 +181,8 @@ data Vec :: Nat -> Type -> Type where | |
Nil :: Vec 0 a | ||
Cons :: a -> Vec n a -> Vec (n + 1) a | ||
|
||
{-# COMPLETE Nil, (:>) #-} | ||
|
||
-- | In many cases, this Generic instance only allows generic | ||
-- functions/instances over vectors of at least size 1, due to the | ||
-- /n-1/ in the /Rep (Vec n a)/ definition. | ||
|