Skip to content

Commit acf7f2b

Browse files
author
Alex McKenna
committed
Fully normalize type families in normalizeType.
Normalize type did not recurse on the result of reducing a type family, meaning if a type family reduced to another type family it would not be normalized.
1 parent 16b8be1 commit acf7f2b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Fixed: #1469
2+
The normalizeType function now fully normalizes types which require calls to
3+
reduceTypeFamily.
4+

clash-lib/src/Clash/Core/Type.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ normalizeType tcMap = go
646646
let args' = map go args
647647
ty' = mkTyConApp tcNm args'
648648
in case reduceTypeFamily tcMap ty' of
649-
Just ty'' -> ty''
649+
Just ty'' -> go ty''
650650
Nothing -> ty'
651651
FunTy ty1 ty2 -> mkFunTy (go ty1) (go ty2)
652652
OtherType (ForAllTy tyvar ty')

0 commit comments

Comments
 (0)