1 {-# LANGUAGE DeriveGeneric #-}
3 module Distribution
.Parsec
.Error
8 import Distribution
.Compat
.Prelude
9 import Distribution
.Parsec
.Position
10 import System
.FilePath (normalise
)
14 data PError
= PError Position
String
15 deriving (Show, Generic
)
17 instance Binary PError
18 instance NFData PError
where rnf
= genericRnf
20 showPError
:: FilePath -> PError
-> String
21 showPError fpath
(PError pos msg
) =
22 normalise fpath
++ ":" ++ showPos pos
++ ": " ++ msg