+genSignalUses ::
+ Type.Type
+ -> FlattenState SignalUseMap
+
+genSignalUses ty = do
+ typeMapToUseMap tymap
+ where
+ -- First generate a map with the right structure containing the types
+ tymap = mkHsValueMap ty
+
+typeMapToUseMap ::
+ HsValueMap Type.Type
+ -> FlattenState SignalUseMap
+
+typeMapToUseMap (Single ty) = do
+ id <- genSignalId
+ return $ Single (SignalUse id)
+
+typeMapToUseMap (Tuple tymaps) = do
+ usemaps <- mapM typeMapToUseMap tymaps
+ return $ Tuple usemaps
+