Aggregate types containing only stateelements is itself state. Not too sure though...
authorchristiaanb <christiaan.baaij@gmail.com>
Wed, 23 Jun 2010 10:08:33 +0000 (12:08 +0200)
committerchristiaanb <christiaan.baaij@gmail.com>
Wed, 23 Jun 2010 10:08:33 +0000 (12:08 +0200)
clash/CLasH/VHDL/VHDLTools.hs

index 723f08acb718d968de22940ee1b836c30e1b8183..4e396cae620695772c586c82350490e7d4e84338 100644 (file)
@@ -389,7 +389,7 @@ mkTyConHType tycon args =
                 -- If we get here, then all of the argument types were state
                 -- types (we check for enumeration types at the top). Not
                 -- sure how to handle this, so error out for now.
-                (_, []) -> error $ "ADT with only State elements (or something like that?) Dunno how to handle this yet. Tycon: " ++ pprString tycon ++ " Arguments: " ++ pprString args
+                (_, []) -> return $ Right StateType --error $ "VHDLTools.mkTyConHType: ADT with only State elements (or something like that?) Dunno how to handle this yet. Tycon: " ++ pprString tycon ++ " Arguments: " ++ pprString args
                 -- A full ADT (with multiple fields and one or multiple
                 -- constructors).
                 (_, elem_htys) -> do