SrcLoc.hs

Plain Haskell source file: SrcLoc.hs

-- $Id: SrcLoc.hs,v 1.6 2001/07/30 19:02:20 moran Exp $

module SrcLoc(SrcLoc(..), -- source location data type
              loc0)       -- :: SrcLoc, initial dummy location

where

import PrettyPrint


data SrcLoc = SrcLoc FilePath Int Int -- (Source file, line, column)
  deriving Eq

loc0 = SrcLoc "__unknown__" 0 0

instance Show SrcLoc where
    showsPrec p (SrcLoc f l c) =  
        showString f .showChar ':' .
        showsPrec p l . showChar ',' . showsPrec p c 

instance Printable SrcLoc

Index