From 042a3077ea6360923f5231cd377dad0020b2b5f9 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Wed, 9 May 2018 15:45:15 -0400 Subject: [PATCH] Move ModulePath & ModuleInfo down. --- src/Data/Abstract/Module.hs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/Data/Abstract/Module.hs b/src/Data/Abstract/Module.hs index 7adfefd45..44d594731 100644 --- a/src/Data/Abstract/Module.hs +++ b/src/Data/Abstract/Module.hs @@ -1,19 +1,14 @@ module Data.Abstract.Module ( Module(..) -, ModuleInfo(..) -, ModulePath , moduleForBlob +, ModulePath +, ModuleInfo(..) ) where import Data.Blob import Prologue import System.FilePath.Posix -type ModulePath = FilePath - -newtype ModuleInfo = ModuleInfo { modulePath :: ModulePath } - deriving (Eq, Ord, Show) - data Module term = Module { moduleInfo :: ModuleInfo, moduleBody :: term } deriving (Eq, Foldable, Functor, Ord, Traversable) @@ -29,3 +24,9 @@ moduleForBlob :: Maybe FilePath -- ^ The root directory relative to which the mo moduleForBlob rootDir Blob{..} = Module info where root = fromMaybe (takeDirectory blobPath) rootDir info = ModuleInfo (makeRelative root blobPath) + + +type ModulePath = FilePath + +newtype ModuleInfo = ModuleInfo { modulePath :: ModulePath } + deriving (Eq, Ord, Show)