template :: String
template = unlines
  [ "module %s (machine, registerNames, inspect, view) where"
  , "import Botworld"
  , "import Botworld.Debug"
  , ""
  , "machine :: Memory"
  , "machine = %s"
  , ""
  , "registerNames :: [String]"
  , "registerNames = %s"
  , ""
  , "inspect :: Memory -> [String]"
  , "inspect = inspectMemory registerNames"
  , ""
  , "view :: Robot -> IO ()"
  , "view = putStrLn . unlines . inspect . memory"
  ]
template :: String
template = unlines
  [ "module %s (machine, registerNames, inspect, view) where"
  , "import Botworld"
  , "import Botworld.Debug"
  , ""
  , "machine :: Memory"
  , "machine = %s"
  , ""
  , "registerNames :: [String]"
  , "registerNames = %s"
  , ""
  , "inspect :: Memory -> [String]"
  , "inspect = inspectMemory registerNames"
  , ""
  , "view :: Robot -> IO ()"
  , "view = putStrLn . unlines . inspect . memory"
  ]
template = unlines
  [ "module %s (machine, registerNames, inspect, view) where"
  , "import Botworld"
  , "import Botworld.Debug"
  , ""
  , "machine :: Memory"
  , "machine = %s"
  , ""
  , "registerNames :: [String]"
  , "registerNames = %s"
  , ""
  , "inspect :: Memory -> [String]"
  , "inspect = inspectMemory registerNames"
  , ""
  , "view :: Robot -> IO ()"
  , "view = putStrLn . unlines . inspect . memory"
  ]