-- Comp1100 Introduction to Programming and Algorithms

-- Example: Supermarket Docket
-- Database module

-- Clem Baker-Finch and <YOUR NAME HERE>  March 2006
----------------------------------------------------------------------
module DB where

-- Types of the basic components of the system.

type Name    = String
type Price   = Int
type BarCode = Int 

-- The database is an association list relating barcodes to names and
-- prices of groceries

type Database = [(BarCode, Name, Price)]

-- find is a general function that searches a database for a given
-- barcode and returns the item details.  If the barcode is not found,
-- return a default item: ("Unknown Item",0).

find :: Database -> BarCode -> (Name,Price)
-- YOUR CODE HERE

----------------------------------------------------------------------
