-
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.
Don't prefix package name in
_types
package in VHDL
Similar to ece7f26 for SystemVerilog, types should not appear qualified in the package body for the types package in VHDL. Fixes #1996.
- Loading branch information
Alex McKenna
committed
Nov 11, 2021
1 parent
c1264fd
commit 3056cbb
Showing
4 changed files
with
47 additions
and
8 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
changelog/2021-11-11T11_29_26+01_00_unqualify_package_body_vhdl.md
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 @@ | ||
CHANGED: Types defined in the package head are no longer qualified in the package body when rendering VHDL [#1996](https://github.com/clash-lang/clash-compiler/issues/1996). |
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
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
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,25 @@ | ||
module T1996 where | ||
|
||
import qualified Prelude as P | ||
import Data.List (isInfixOf) | ||
import System.Environment (getArgs) | ||
import System.FilePath ((</>), takeDirectory) | ||
|
||
import Clash.Prelude | ||
|
||
topEntity :: (Int, Int) -> (Int, Int) | ||
topEntity = id | ||
|
||
assertNotIn :: String -> String -> IO () | ||
assertNotIn needle haystack | ||
| needle `isInfixOf` haystack = | ||
P.error $ P.concat [ "Did not expect:\n\n ", needle | ||
, "\n\nIn:\n\n", haystack ] | ||
| otherwise = return () | ||
|
||
mainVHDL :: IO () | ||
mainVHDL = do | ||
[topDir] <- getArgs | ||
content <- readFile (topDir </> show 'topEntity </> "T1996_topEntity_types.vhdl") | ||
|
||
assertNotIn "T1996_topEntity_types." content |