We now support Annotations to indicate top-level entity and initial state
[matthijs/master-project/cλash.git] / cλash / CLasH / Translator / Annotations.hs
diff --git a/cλash/CLasH/Translator/Annotations.hs b/cλash/CLasH/Translator/Annotations.hs
new file mode 100644 (file)
index 0000000..08e7845
--- /dev/null
@@ -0,0 +1,16 @@
+{-# LANGUAGE DeriveDataTypeable #-}
+module CLasH.Translator.Annotations where
+  
+import Language.Haskell.TH
+import Data.Data
+
+data CLasHAnn = TopEntity | InitState
+  deriving (Show, Data, Typeable)
+  
+isTopEntity :: CLasHAnn -> Bool
+isTopEntity TopEntity = True
+isTopEntity _         = False
+
+isInitState :: CLasHAnn -> Bool
+isInitState InitState = True
+isInitState _         = False
\ No newline at end of file