Derive Show for the data types we define.
authorMatthijs Kooijman <m.kooijman@student.utwente.nl>
Tue, 27 Jan 2009 13:36:17 +0000 (14:36 +0100)
committerMatthijs Kooijman <m.kooijman@student.utwente.nl>
Tue, 27 Jan 2009 13:36:17 +0000 (14:36 +0100)
Translator.hs

index dea1fd7dfdf8730698316dac554f11c38b34a437..50d87fad55ef9585be1b5430153048900a369925 100644 (file)
@@ -215,6 +215,7 @@ getArchitecture sess (NonRec var expr) =
 data PortNameMap =
        Tuple [PortNameMap]
        | Port  String
 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.
 
 -- 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
        inPorts   :: [PortNameMap],
        outPort   :: PortNameMap
        --entity    :: AST.EntityDec
-}
+} deriving (Show)
 
 -- Turns a CoreExpr describing a function into a description of its input and
 -- output ports.
 
 -- 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
 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
 
 -- Add the function to the session
 addFunc :: VHDLSession -> String -> HWFunction -> VHDLSession