Sockeye: Implement reference check in input port declarations
authorDaniel Schwyn <schwyda@student.ethz.ch>
Wed, 2 Aug 2017 14:42:13 +0000 (16:42 +0200)
committerDaniel Schwyn <schwyda@student.ethz.ch>
Wed, 2 Aug 2017 14:42:13 +0000 (16:42 +0200)
Signed-off-by: Daniel Schwyn <schwyda@student.ethz.ch>

tools/sockeye/SockeyeNetBuilder.hs

index 7c46572..fb8c082 100644 (file)
@@ -115,6 +115,8 @@ instance NetTransformable InstAST.Port NetAST.NetSpec where
             portWidth = InstAST.portWidth ast
             portMap = inPortMap context
             mappedId = Map.lookup portId portMap
+            errorContext = "input port declaration"
+        checkReference context (UndefinedReference errorContext) portId
         netPortId <- transform context portId
         case mappedId of
             Nothing    -> return Map.empty