X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=c%CE%BBash%2FCLasH%2FVHDL%2FGenerate.hs;h=07b683f61bf959e113d6a492eb8d5e342bb2420a;hb=a39c60256f0ff0fb036cbab67f629fc539206be4;hp=897c22a53623b4cd69749c87ad78574f468b12be;hpb=89f4f30dcabe32e242b24915c28cb2368feaf3c4;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git diff --git "a/c\316\273ash/CLasH/VHDL/Generate.hs" "b/c\316\273ash/CLasH/VHDL/Generate.hs" index 897c22a..07b683f 100644 --- "a/c\316\273ash/CLasH/VHDL/Generate.hs" +++ "b/c\316\273ash/CLasH/VHDL/Generate.hs" @@ -1104,7 +1104,10 @@ vectorFunId :: Type.Type -> String -> TypeSession AST.VHDLId vectorFunId el_ty fname = do let error_msg = "\nGenerate.vectorFunId: Can not construct vector function for element: " ++ pprString el_ty -- TODO: Handle the Nothing case? - Just elemTM <- vhdlTy error_msg el_ty + elemTM_maybe <- vhdlTy error_msg el_ty + let elemTM = Maybe.fromMaybe + (error $ "\nGenerate.vectorFunId: Cannot generate vector function \"" ++ fname ++ "\" for the empty type \"" ++ (pprString el_ty) ++ "\"") + elemTM_maybe -- TODO: This should not be duplicated from mk_vector_ty. Probably but it in -- the VHDLState or something. let vectorTM = mkVHDLExtId $ "vector_" ++ (AST.fromVHDLId elemTM)