Skip to content

Commit

Permalink
Add StrAlias typeclass
Browse files Browse the repository at this point in the history
  • Loading branch information
krame505 committed Jan 10, 2025
1 parent b61fa89 commit 0c7cab2
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Libraries/Base1/PreludeBSV.bsv
Original file line number Diff line number Diff line change
Expand Up @@ -1112,7 +1112,7 @@ endfunction: lcm

// =========================

// Alias and NumAlias
// Alias, NumAlias and StrAlias

typeclass Alias#(type a, type b)
dependencies (a determines b,
Expand All @@ -1130,6 +1130,14 @@ endtypeclass
instance NumAlias#(a,a);
endinstance

typeclass StrAlias#(string type a, string type b)
dependencies (a determines b,
b determines a);
endtypeclass

instance StrAlias#(a,a);
endinstance

// =========================

// Saturation Modes
Expand Down

0 comments on commit 0c7cab2

Please sign in to comment.