The implementation of deconstructProduct:
|
deconstructProduct (TExpr ty@(Product _ _ tys) (Identifier resName _)) vals = do |
|
newNames <- zipWithM declare vals tys |
|
addDeclaration $ Assignment resName Cont $ DataCon ty (DC (ty, 0)) (fmap eex newNames) |
|
pure newNames |
..does not do what it promises to at all. It should return a list of expressions representing all the fields of the given product type. It should probably also handle cases where the given expression is not a plain Identifier.
The implementation of
deconstructProduct:clash-compiler/clash-lib/src/Clash/Primitives/DSL.hs
Lines 364 to 367 in 3e2f3dd
..does not do what it promises to at all. It should return a list of expressions representing all the fields of the given product type. It should probably also handle cases where the given expression is not a plain
Identifier.