1
1
mirror of https://github.com/github/semantic.git synced 2025-01-08 08:30:27 +03:00

Custom Show for Module so that I don't have to keep parsing through all those terms

This commit is contained in:
Timothy Clem 2018-03-30 10:55:16 -07:00
parent 4341363944
commit 2ee234c627

View File

@ -14,8 +14,10 @@ data Module term = Module
{ modulePath :: FilePath -- ^ Path to this module
, moduleRoot :: FilePath -- ^ Root path for module resolution
, moduleBody :: term -- ^ @term@ body of the module
} deriving (Eq, Foldable, Functor, Ord, Show, Traversable)
} deriving (Eq, Foldable, Functor, Ord, Traversable)
instance Show (Module term) where
showsPrec _ Module{..} = showString modulePath
-- | Construct a 'Module' for a 'Blob' and @term@, relative to some root 'FilePath'.
moduleForBlob :: Maybe FilePath -- ^ The root directory relative to which the module will be resolved, if any.