From: Matthijs Kooijman Date: Tue, 27 Jan 2009 13:36:17 +0000 (+0100) Subject: Derive Show for the data types we define. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;ds=sidebyside;h=f206e7a5a377695bb40198784dacd47b6efcd561;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git Derive Show for the data types we define. --- diff --git a/Translator.hs b/Translator.hs index dea1fd7..50d87fa 100644 --- a/Translator.hs +++ b/Translator.hs @@ -215,6 +215,7 @@ getArchitecture sess (NonRec var expr) = data PortNameMap = Tuple [PortNameMap] | Port String + deriving (Show) -- Generate a port name map (or multiple for tuple types) in the given direction for -- each type given. @@ -238,7 +239,7 @@ data HWFunction = HWFunction { -- A function that is available in hardware inPorts :: [PortNameMap], outPort :: PortNameMap --entity :: AST.EntityDec -} +} deriving (Show) -- Turns a CoreExpr describing a function into a description of its input and -- output ports. @@ -267,7 +268,7 @@ mkHWFunction sess (Rec _) = data VHDLSession = VHDLSession { nameCount :: Int, -- A counter that can be used to generate unique names funcs :: [(String, HWFunction)] -- All functions available, indexed by name -} +} deriving (Show) -- Add the function to the session addFunc :: VHDLSession -> String -> HWFunction -> VHDLSession