From f206e7a5a377695bb40198784dacd47b6efcd561 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Tue, 27 Jan 2009 14:36:17 +0100 Subject: [PATCH] Derive Show for the data types we define. --- Translator.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 -- 2.30.2