Commit e3dff2a7 authored by Oleg Grenrus's avatar Oleg Grenrus
Browse files

Refactor ModuleName

parent 494bdf55
......@@ -117,7 +117,7 @@ instance Pretty OpenUnitId where
--Right (DefiniteUnitId (DefUnitId {unDefUnitId = UnitId "foobar"}))
--
-- >>> eitherParsec "foo[Str=text-1.2.3:Data.Text.Text]" :: Either String OpenUnitId
-- Right (IndefFullUnitId (ComponentId "foo") (fromList [(ModuleName ["Str"],OpenModule (DefiniteUnitId (DefUnitId {unDefUnitId = UnitId "text-1.2.3"})) (ModuleName ["Data","Text","Text"]))]))
-- Right (IndefFullUnitId (ComponentId "foo") (fromList [(ModuleName "Str",OpenModule (DefiniteUnitId (DefUnitId {unDefUnitId = UnitId "text-1.2.3"})) (ModuleName "Data.Text.Text"))]))
--
instance Parsec OpenUnitId where
parsec = P.try parseOpenUnitId <|> fmap DefiniteUnitId parsec
......@@ -180,7 +180,7 @@ instance Pretty OpenModule where
-- |
--
-- >>> eitherParsec "Includes2-0.1.0.0-inplace-mysql:Database.MySQL" :: Either String OpenModule
-- Right (OpenModule (DefiniteUnitId (DefUnitId {unDefUnitId = UnitId "Includes2-0.1.0.0-inplace-mysql"})) (ModuleName ["Database","MySQL"]))
-- Right (OpenModule (DefiniteUnitId (DefUnitId {unDefUnitId = UnitId "Includes2-0.1.0.0-inplace-mysql"})) (ModuleName "Database.MySQL"))
--
instance Parsec OpenModule where
parsec = parsecModuleVar <|> parsecOpenModule
......
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE ScopedTypeVariables #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.ModuleName
......@@ -13,7 +14,7 @@
-- Data type for Haskell module names.
module Distribution.ModuleName (
ModuleName (..), -- TODO: move Parsec instance here, don't export constructor
ModuleName,
fromString,
fromComponents,
components,
......@@ -33,13 +34,17 @@ import Distribution.Utils.ShortText (ShortText, fromShortText, toShortTex
import System.FilePath (pathSeparator)
import qualified Distribution.Compat.CharParsing as P
import qualified Distribution.Compat.DList as DList
import qualified Text.PrettyPrint as Disp
-- | A valid Haskell module name.
--
newtype ModuleName = ModuleName ShortTextLst
newtype ModuleName = ModuleName ShortText
deriving (Eq, Generic, Ord, Read, Show, Typeable, Data)
unModuleName :: ModuleName -> String
unModuleName (ModuleName s) = fromShortText s
instance Binary ModuleName
instance Structured ModuleName
......@@ -47,16 +52,36 @@ instance NFData ModuleName where
rnf (ModuleName ms) = rnf ms
instance Pretty ModuleName where
pretty (ModuleName ms) =
Disp.hcat (intersperse (Disp.char '.') (map Disp.text $ stlToStrings ms))
pretty = Disp.text . unModuleName
instance Parsec ModuleName where
parsec = fromComponents <$> toList <$> P.sepByNonEmpty component (P.char '.')
where
component = do
c <- P.satisfy isUpper
cs <- P.munch validModuleChar
return (c:cs)
parsec = parsecModuleName
parsecModuleName :: forall m. CabalParsing m => m ModuleName
parsecModuleName = state0 DList.empty where
upper :: m Char
!upper = P.satisfy isUpper
ch :: m Char
!ch = P.satisfy (\c -> validModuleChar c || c == '.')
alt :: m ModuleName -> m ModuleName -> m ModuleName
!alt = (<|>)
state0 :: DList.DList Char -> m ModuleName
state0 acc = do
c <- upper
state1 (DList.snoc acc c)
state1 :: DList.DList Char -> m ModuleName
state1 acc = state1' acc `alt` return (fromString (DList.toList acc))
state1' :: DList.DList Char -> m ModuleName
state1' acc = do
c <- ch
case c of
'.' -> state0 (DList.snoc acc c)
_ -> state1 (DList.snoc acc c)
instance Described ModuleName where
describe _ = REMunch1 (reChar '.') component where
......@@ -67,8 +92,7 @@ validModuleChar c = isAlphaNum c || c == '_' || c == '\''
validModuleComponent :: String -> Bool
validModuleComponent [] = False
validModuleComponent (c:cs) = isUpper c
&& all validModuleChar cs
validModuleComponent (c:cs) = isUpper c && all validModuleChar cs
-- | Construct a 'ModuleName' from a valid module name 'String'.
--
......@@ -77,34 +101,29 @@ validModuleComponent (c:cs) = isUpper c
-- are parsing user input then use 'Distribution.Text.simpleParse' instead.
--
instance IsString ModuleName where
fromString string = fromComponents (split string)
where
split cs = case break (=='.') cs of
(chunk,[]) -> chunk : []
(chunk,_:rest) -> chunk : split rest
fromString = ModuleName . toShortText
-- | Construct a 'ModuleName' from valid module components, i.e. parts
-- separated by dots.
fromComponents :: [String] -> ModuleName
fromComponents components'
| null components' = error zeroComponents
| all validModuleComponent components' = ModuleName (stlFromStrings components')
| otherwise = error badName
where
zeroComponents = "ModuleName.fromComponents: zero components"
badName = "ModuleName.fromComponents: invalid components " ++ show components'
fromComponents comps = fromString (intercalate "." comps)
{-# DEPRECATED fromComponents "Exists for cabal-install only" #-}
-- | The module name @Main@.
--
main :: ModuleName
main = ModuleName (stlFromStrings ["Main"])
main = ModuleName (fromString "Main")
-- | The individual components of a hierarchical module name. For example
--
-- > components (fromString "A.B.C") = ["A", "B", "C"]
--
components :: ModuleName -> [String]
components (ModuleName ms) = stlToStrings ms
components mn = split (unModuleName mn)
where
split cs = case break (=='.') cs of
(chunk,[]) -> chunk : []
(chunk,_:rest) -> chunk : split rest
-- | Convert a module name to a file path, but without any file extension.
-- For example:
......@@ -112,42 +131,6 @@ components (ModuleName ms) = stlToStrings ms
-- > toFilePath (fromString "A.B.C") = "A/B/C"
--
toFilePath :: ModuleName -> FilePath
toFilePath = intercalate [pathSeparator] . components
----------------------------------------------------------------------------
-- internal helper
-- | Strict/unpacked representation of @[ShortText]@
data ShortTextLst = STLNil
| STLCons !ShortText !ShortTextLst
deriving (Eq, Generic, Ord, Typeable, Data)
instance NFData ShortTextLst where
rnf = flip seq ()
instance Show ShortTextLst where
showsPrec p = showsPrec p . stlToList
instance Read ShortTextLst where
readsPrec p = map (first stlFromList) . readsPrec p
instance Binary ShortTextLst where
put = put . stlToList
get = stlFromList <$> get
instance Structured ShortTextLst
stlToList :: ShortTextLst -> [ShortText]
stlToList STLNil = []
stlToList (STLCons st next) = st : stlToList next
stlToStrings :: ShortTextLst -> [String]
stlToStrings = map fromShortText . stlToList
stlFromList :: [ShortText] -> ShortTextLst
stlFromList [] = STLNil
stlFromList (x:xs) = STLCons x (stlFromList xs)
stlFromStrings :: [String] -> ShortTextLst
stlFromStrings = stlFromList . map toShortText
toFilePath = map f . unModuleName where
f '.' = pathSeparator
f c = c
......@@ -46,13 +46,13 @@ module Distribution.Parsec (
parsecUnqualComponentName,
) where
import Data.ByteString (ByteString)
import Data.Char (digitToInt, intToDigit)
import Data.List (transpose)
import Distribution.CabalSpecVersion
import Distribution.Compat.Prelude
import Distribution.Parsec.Error (PError (..), showPError)
import Data.ByteString (ByteString)
import Distribution.Parsec.FieldLineStream (FieldLineStream, fieldLineStreamFromString, fieldLineStreamFromBS)
import Distribution.Parsec.FieldLineStream (FieldLineStream, fieldLineStreamFromBS, fieldLineStreamFromString)
import Distribution.Parsec.Position (Position (..), incPos, retPos, showPos, zeroPos)
import Distribution.Parsec.Warning (PWarnType (..), PWarning (..), showPWarning)
import Numeric (showIntAtBase)
......
......@@ -13,7 +13,7 @@ InstalledPackageInfo
`UnitId "Includes2-0.1.0.0-inplace-mysql"`],
description = "",
exposed = False,
exposedModules = [`ExposedModule {exposedName = ModuleName ["Mine"], exposedReexport = Nothing}`],
exposedModules = [`ExposedModule {exposedName = ModuleName "Mine", exposedReexport = Nothing}`],
extraGHCiLibraries = [],
extraLibraries = [],
frameworkDirs = [],
......@@ -30,11 +30,11 @@ InstalledPackageInfo
installedComponentId_ = `ComponentId ""`,
installedUnitId = `UnitId "Includes2-0.1.0.0-inplace-mylib+3gY9SyjX86dBypHcOaev1n"`,
instantiatedWith = [_×_
`ModuleName ["Database"]`
`ModuleName "Database"`
(OpenModule
(DefiniteUnitId
(DefUnitId `UnitId "Includes2-0.1.0.0-inplace-mysql"`))
`ModuleName ["Database","MySQL"]`)],
`ModuleName "Database.MySQL"`)],
ldOptions = [],
libVisibility = LibraryVisibilityPrivate,
libraryDirs = ["/home/travis/build/haskell/cabal/cabal-testsuite/PackageTests/Backpack/Includes2/cabal-internal.dist/work/./dist/build/x86_64-linux/ghc-8.2.2/Includes2-0.1.0.0/l/mylib/Includes2-0.1.0.0-inplace-mylib+3gY9SyjX86dBypHcOaev1n/build/Includes2-0.1.0.0-inplace-mylib+3gY9SyjX86dBypHcOaev1n"],
......
......@@ -11,7 +11,7 @@ InstalledPackageInfo
depends = [`UnitId "base-4.8.2.0-0d6d1084fbc041e1cded9228e80e264d"`],
description = "See https://github.com/haskell/cabal/issues/1541#issuecomment-30155513",
exposed = True,
exposedModules = [`ExposedModule {exposedName = ModuleName ["A"], exposedReexport = Nothing}`],
exposedModules = [`ExposedModule {exposedName = ModuleName "A", exposedReexport = Nothing}`],
extraGHCiLibraries = [],
extraLibraries = [],
frameworkDirs = [],
......
......@@ -32,28 +32,28 @@ InstalledPackageInfo
"the @mtl@ or @monads-tf@ packages, which automatically lift operations\n",
"introduced by monad transformers through other transformers."],
exposed = True,
exposedModules = [`ExposedModule {exposedName = ModuleName ["Control","Applicative","Backwards"], exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName ["Control","Applicative","Lift"], exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName ["Control","Monad","Signatures"], exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName ["Control","Monad","Trans","Class"], exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName ["Control","Monad","Trans","Cont"], exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName ["Control","Monad","Trans","Error"], exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName ["Control","Monad","Trans","Except"], exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName ["Control","Monad","Trans","Identity"], exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName ["Control","Monad","Trans","List"], exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName ["Control","Monad","Trans","Maybe"], exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName ["Control","Monad","Trans","RWS"], exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName ["Control","Monad","Trans","RWS","Lazy"], exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName ["Control","Monad","Trans","RWS","Strict"], exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName ["Control","Monad","Trans","Reader"], exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName ["Control","Monad","Trans","State"], exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName ["Control","Monad","Trans","State","Lazy"], exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName ["Control","Monad","Trans","State","Strict"], exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName ["Control","Monad","Trans","Writer"], exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName ["Control","Monad","Trans","Writer","Lazy"], exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName ["Control","Monad","Trans","Writer","Strict"], exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName ["Data","Functor","Constant"], exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName ["Data","Functor","Reverse"], exposedReexport = Nothing}`],
exposedModules = [`ExposedModule {exposedName = ModuleName "Control.Applicative.Backwards", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Applicative.Lift", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Signatures", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.Class", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.Cont", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.Error", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.Except", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.Identity", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.List", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.Maybe", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.RWS", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.RWS.Lazy", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.RWS.Strict", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.Reader", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.State", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.State.Lazy", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.State.Strict", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.Writer", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.Writer.Lazy", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.Writer.Strict", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Data.Functor.Constant", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Data.Functor.Reverse", exposedReexport = Nothing}`],
extraGHCiLibraries = [],
extraLibraries = [],
frameworkDirs = [],
......
......@@ -32,28 +32,28 @@ InstalledPackageInfo
"the @mtl@ or @monads-tf@ packages, which automatically lift operations\n",
"introduced by monad transformers through other transformers."],
exposed = True,
exposedModules = [`ExposedModule {exposedName = ModuleName ["Control","Applicative","Backwards"], exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName ["Control","Applicative","Lift"], exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName ["Control","Monad","Signatures"], exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName ["Control","Monad","Trans","Class"], exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName ["Control","Monad","Trans","Cont"], exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName ["Control","Monad","Trans","Error"], exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName ["Control","Monad","Trans","Except"], exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName ["Control","Monad","Trans","Identity"], exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName ["Control","Monad","Trans","List"], exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName ["Control","Monad","Trans","Maybe"], exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName ["Control","Monad","Trans","RWS"], exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName ["Control","Monad","Trans","RWS","Lazy"], exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName ["Control","Monad","Trans","RWS","Strict"], exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName ["Control","Monad","Trans","Reader"], exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName ["Control","Monad","Trans","State"], exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName ["Control","Monad","Trans","State","Lazy"], exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName ["Control","Monad","Trans","State","Strict"], exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName ["Control","Monad","Trans","Writer"], exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName ["Control","Monad","Trans","Writer","Lazy"], exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName ["Control","Monad","Trans","Writer","Strict"], exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName ["Data","Functor","Constant"], exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName ["Data","Functor","Reverse"], exposedReexport = Nothing}`],
exposedModules = [`ExposedModule {exposedName = ModuleName "Control.Applicative.Backwards", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Applicative.Lift", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Signatures", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.Class", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.Cont", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.Error", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.Except", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.Identity", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.List", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.Maybe", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.RWS", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.RWS.Lazy", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.RWS.Strict", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.Reader", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.State", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.State.Lazy", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.State.Strict", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.Writer", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.Writer.Lazy", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Control.Monad.Trans.Writer.Strict", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Data.Functor.Constant", exposedReexport = Nothing}`,
`ExposedModule {exposedName = ModuleName "Data.Functor.Reverse", exposedReexport = Nothing}`],
extraGHCiLibraries = [],
extraLibraries = [],
frameworkDirs = [],
......
......@@ -20,7 +20,7 @@ GenericPackageDescription
(OrLaterVersion `mkVersion [2,4,0]`)
(Set.fromList [LMainLibName])],
condTreeData = Library
{exposedModules = [`ModuleName ["Data","Octree"]`],
{exposedModules = [`ModuleName "Data.Octree"`],
libBuildInfo = BuildInfo
{asmOptions = [],
asmSources = [],
......@@ -59,7 +59,7 @@ GenericPackageDescription
options = PerCompilerFlavor [] [],
otherExtensions = [],
otherLanguages = [],
otherModules = [`ModuleName ["Data","Octree","Internal"]`],
otherModules = [`ModuleName "Data.Octree.Internal"`],
pkgconfigDepends = [],
profOptions = PerCompilerFlavor [] [],
sharedOptions = PerCompilerFlavor [] [],
......
......@@ -172,7 +172,7 @@ GenericPackageDescription
AnyVersion
(Set.fromList [LMainLibName])],
condTreeData = Library
{exposedModules = [`ModuleName ["ElseIf"]`],
{exposedModules = [`ModuleName "ElseIf"`],
libBuildInfo = BuildInfo
{asmOptions = [],
asmSources = [],
......
......@@ -10,7 +10,7 @@ GenericPackageDescription
AnyVersion
(Set.fromList [LMainLibName])],
condTreeData = Library
{exposedModules = [`ModuleName ["ElseIf"]`],
{exposedModules = [`ModuleName "ElseIf"`],
libBuildInfo = BuildInfo
{asmOptions = [],
asmSources = [],
......
......@@ -92,7 +92,7 @@ GenericPackageDescription
AnyVersion
(Set.fromList [LMainLibName])],
condTreeData = Library
{exposedModules = [`ModuleName ["ElseIf"]`],
{exposedModules = [`ModuleName "ElseIf"`],
libBuildInfo = BuildInfo
{asmOptions = [],
asmSources = [],
......@@ -252,7 +252,7 @@ GenericPackageDescription
AnyVersion
(Set.fromList [LMainLibName])],
condTreeData = Library
{exposedModules = [`ModuleName ["ElseIf2"]`],
{exposedModules = [`ModuleName "ElseIf2"`],
libBuildInfo = BuildInfo
{asmOptions = [],
asmSources = [],
......
......@@ -10,7 +10,7 @@ GenericPackageDescription
AnyVersion
(Set.fromList [LMainLibName])],
condTreeData = Library
{exposedModules = [`ModuleName ["ElseIf"]`],
{exposedModules = [`ModuleName "ElseIf"`],
libBuildInfo = BuildInfo
{asmOptions = [],
asmSources = [],
......
......@@ -79,7 +79,7 @@ GenericPackageDescription
signatures = []}}}],
condTreeConstraints = [],
condTreeData = Library
{exposedModules = [`ModuleName ["ElseIf"]`],
{exposedModules = [`ModuleName "ElseIf"`],
libBuildInfo = BuildInfo
{asmOptions = [],
asmSources = [],
......
......@@ -275,7 +275,7 @@ GenericPackageDescription
signatures = []}}}],
condTreeConstraints = [],
condTreeData = Library
{exposedModules = [`ModuleName ["ElseIf"]`],
{exposedModules = [`ModuleName "ElseIf"`],
libBuildInfo = BuildInfo
{asmOptions = [],
asmSources = [],
......
......@@ -12,7 +12,7 @@ GenericPackageDescription
(ThisVersion `mkVersion [4,4]`))
(Set.fromList [LMainLibName])],
condTreeData = Library
{exposedModules = [`ModuleName ["Data","Encoding"]`],
{exposedModules = [`ModuleName "Data.Encoding"`],
libBuildInfo = BuildInfo
{asmOptions = [],
asmSources = [],
......
......@@ -341,20 +341,20 @@ GenericPackageDescription
(EarlierVersion `mkVersion [1,5]`))
(Set.fromList [LMainLibName])],
condTreeData = Library
{exposedModules = [`ModuleName ["Generics","SOP"]`,
`ModuleName ["Generics","SOP","GGP"]`,
`ModuleName ["Generics","SOP","TH"]`,
`ModuleName ["Generics","SOP","Dict"]`,
`ModuleName ["Generics","SOP","Type","Metadata"]`,
`ModuleName ["Generics","SOP","BasicFunctors"]`,
`ModuleName ["Generics","SOP","Classes"]`,
`ModuleName ["Generics","SOP","Constraint"]`,
`ModuleName ["Generics","SOP","Instances"]`,
`ModuleName ["Generics","SOP","Metadata"]`,
`ModuleName ["Generics","SOP","NP"]`,
`ModuleName ["Generics","SOP","NS"]`,
`ModuleName ["Generics","SOP","Universe"]`,
`ModuleName ["Generics","SOP","Sing"]`],
{exposedModules = [`ModuleName "Generics.SOP"`,
`ModuleName "Generics.SOP.GGP"`,
`ModuleName "Generics.SOP.TH"`,
`ModuleName "Generics.SOP.Dict"`,
`ModuleName "Generics.SOP.Type.Metadata"`,
`ModuleName "Generics.SOP.BasicFunctors"`,
`ModuleName "Generics.SOP.Classes"`,
`ModuleName "Generics.SOP.Constraint"`,
`ModuleName "Generics.SOP.Instances"`,
`ModuleName "Generics.SOP.Metadata"`,
`ModuleName "Generics.SOP.NP"`,
`ModuleName "Generics.SOP.NS"`,
`ModuleName "Generics.SOP.Universe"`,
`ModuleName "Generics.SOP.Sing"`],
libBuildInfo = BuildInfo
{asmOptions = [],
asmSources = [],
......@@ -620,7 +620,7 @@ GenericPackageDescription
["-Wall"] [],
otherExtensions = [],
otherLanguages = [],
otherModules = [`ModuleName ["HTransExample"]`],
otherModules = [`ModuleName "HTransExample"`],
pkgconfigDepends = [],
profOptions = PerCompilerFlavor
[] [],
......
......@@ -10,7 +10,7 @@ GenericPackageDescription
AnyVersion
(Set.fromList [LMainLibName])],
condTreeData = Library
{exposedModules = [`ModuleName ["ElseIf"]`],
{exposedModules = [`ModuleName "ElseIf"`],
libBuildInfo = BuildInfo
{asmOptions = [],
asmSources = [],
......
......@@ -7,7 +7,7 @@ GenericPackageDescription
{condTreeComponents = [],
condTreeConstraints = [],
condTreeData = Library
{exposedModules = [`ModuleName ["Issue"]`],
{exposedModules = [`ModuleName "Issue"`],
libBuildInfo = BuildInfo
{asmOptions = [],
asmSources = [],
......
......@@ -154,7 +154,7 @@ GenericPackageDescription
(MajorBoundVersion `mkVersion [2,12,6,1]`)
(Set.fromList [LMainLibName])],
condTreeData = Library
{exposedModules = [`ModuleName ["Interval"]`],
{exposedModules = [`ModuleName "Interval"`],
libBuildInfo = BuildInfo
{asmOptions = [],
asmSources = [],
......@@ -290,7 +290,7 @@ GenericPackageDescription
[],
otherExtensions = [],
otherLanguages = [],
otherModules = [`ModuleName ["IntervalTest"]`],
otherModules = [`ModuleName "IntervalTest"`],
pkgconfigDepends = [],
profOptions = PerCompilerFlavor
[] [],
......
......@@ -30,14 +30,14 @@ GenericPackageDescription
AnyVersion
(Set.fromList [LMainLibName])],
condTreeData = Library
{exposedModules = [`ModuleName ["LeadingComma"]`,
`ModuleName ["LeadingComma2"]`,
`ModuleName ["TrailingComma"]`,
`ModuleName ["TrailingComma"]`,
`ModuleName ["Comma"]`,
`ModuleName ["InBetween"]`,
`ModuleName ["NoCommas"]`,
`ModuleName ["NoCommas"]`],
{exposedModules = [`ModuleName "LeadingComma"`,
`ModuleName "LeadingComma2"`,
`ModuleName "TrailingComma"`,
`ModuleName "TrailingComma"`,
`ModuleName "Comma"`,
`ModuleName "InBetween"`,
`ModuleName "NoCommas"`,
`ModuleName "NoCommas"`],
libBuildInfo = BuildInfo
{asmOptions = [],
asmSources = [],
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment