Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex D
GHC
Commits
a11bb49b
Commit
a11bb49b
authored
Jun 26, 2008
by
Ian Lynagh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Follow Cabal changes
parent
abd113f0
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
24 additions
and
16 deletions
+24
-16
compat/Distribution/Compat/Exception.hs
compat/Distribution/Compat/Exception.hs
+0
-3
compiler/ghci/Linker.lhs
compiler/ghci/Linker.lhs
+6
-3
compiler/main/Packages.lhs
compiler/main/Packages.lhs
+3
-3
compiler/main/ParsePkgConf.y
compiler/main/ParsePkgConf.y
+10
-3
libraries/cabal.hs
libraries/cabal.hs
+1
-1
libraries/installPackage.hs
libraries/installPackage.hs
+1
-1
utils/ghc-pkg/Main.hs
utils/ghc-pkg/Main.hs
+3
-2
No files found.
compat/Distribution/Compat/Exception.hs
deleted
100644 → 0
View file @
abd113f0
{-# OPTIONS -cpp #-}
#
include
"Cabal/Distribution/Compat/Exception.hs"
-- dummy comment
compiler/ghci/Linker.lhs
View file @
a11bb49b
...
...
@@ -72,6 +72,8 @@ import System.FilePath
import System.IO
import System.Directory
import Distribution.Package hiding (depends)
import Control.Exception
import Data.Maybe
\end{code}
...
...
@@ -944,10 +946,11 @@ data LibrarySpec
-- of DLL handles that rts/Linker.c maintains, and that in turn is
-- used by lookupSymbol. So we must call addDLL for each library
-- just to get the DLL handle into the list.
partOfGHCi :: [
String
]
partOfGHCi :: [
PackageName
]
partOfGHCi
| isWindowsTarget || isDarwinTarget = []
| otherwise = [ "base", "haskell98", "template-haskell", "editline" ]
| otherwise = map PackageName
["base", "haskell98", "template-haskell", "editline"]
showLS :: LibrarySpec -> String
showLS (Object nm) = "(static) " ++ nm
...
...
@@ -1022,7 +1025,7 @@ linkPackage dflags pkg
maybePutStr dflags ("Loading package " ++ display (package pkg) ++ " ... ")
-- See comments with partOfGHCi
when (p
kgName (package pkg)
`notElem` partOfGHCi) $ do
when (p
ackageName pkg
`notElem` partOfGHCi) $ do
loadFrameworks pkg
-- When a library A needs symbols from a library B, the order in
-- extra_libraries/extra_ld_opts is "-lA -lB", because that's the
...
...
compiler/main/Packages.lhs
View file @
a11bb49b
...
...
@@ -318,7 +318,7 @@ matchingPackages str pkgs
-- version, or just the name if it is unambiguous.
matches str p
= str == display (package p)
|| str ==
pkgName (package p
)
|| str ==
display (pkgName (package p)
)
pickPackages :: [PackageConfig] -> [String] -> [PackageConfig]
pickPackages pkgs strs =
...
...
@@ -387,7 +387,7 @@ findWiredInPackages dflags pkgs preload this_package = do
matches :: PackageConfig -> (PackageId, [String]) -> Bool
pc `matches` (pid, suffixes)
=
pkgName (package pc
) `elem`
=
display (pkgName (package pc)
) `elem`
(map (packageIdString pid ++) suffixes)
-- find which package corresponds to each wired-in package
...
...
@@ -445,7 +445,7 @@ findWiredInPackages dflags pkgs preload this_package = do
upd_pid pid = case filter ((== pid) . fst) wired_in_ids of
[] -> pid
((x, y):_) -> x{ pkgName =
packageIdString y
,
((x, y):_) -> x{ pkgName =
PackageName (packageIdString y)
,
pkgVersion = Version [] [] }
pkgs1 = deleteOtherWiredInPackages pkgs
...
...
compiler/main/ParsePkgConf.y
View file @
a11bb49b
...
...
@@ -10,6 +10,7 @@ module ParsePkgConf( loadPackageConfig ) where
#include "HsVersions.h"
import Distribution.Package hiding ( depends )
import PackageConfig
import Lexer
import Module
...
...
@@ -112,9 +113,15 @@ field :: { PackageConfig -> PackageConfig }
}
pkgid :: { PackageIdentifier }
: CONID '{' VARID '=' STRING ',' VARID '=' version '}'
{ PackageIdentifier{ pkgName = unpackFS $5,
pkgVersion = $9 } }
: CONID '{' VARID '=' CONID STRING ',' VARID '=' version '}'
{% case unpackFS $5 of
"PackageName" ->
return $ PackageIdentifier {
pkgName = PackageName (unpackFS $6),
pkgVersion = $10
}
_ -> happyError
}
version :: { Version }
: CONID '{' VARID '=' intlist ',' VARID '=' strlist '}'
...
...
libraries/cabal.hs
View file @
a11bb49b
...
...
@@ -31,7 +31,7 @@ main = do
Just
Simple
->
Simple
.
defaultMainArgs
args
Just
Make
->
Make
.
defaultMainArgs
args
Just
Configure
->
defaultMainWithHooksArgs
autoconfUserHooks
args
_
|
p
kgName
(
package
pd
)
==
"Cabal"
->
_
|
p
ackageName
pd
==
PackageName
"Cabal"
->
-- Cabal is special...*sigh*
Simple
.
defaultMainArgs
args
|
otherwise
->
die
"cabal: Don't know what to do!"
...
...
libraries/installPackage.hs
View file @
a11bb49b
...
...
@@ -60,7 +60,7 @@ doInstall verbosity ghcpkg ghcpkgconf destdir topdir
-- This is an almighty hack. We need to register
-- ghc-prim:GHC.Prim, but it doesn't exist, get built, get
-- haddocked, get copied, etc.
pd_reg
=
if
p
kgName
(
package
pd
)
==
"ghc-prim"
pd_reg
=
if
p
ackageName
pd
==
PackageName
"ghc-prim"
then
case
library
pd
of
Just
lib
->
let
ems
=
"GHC.Prim"
:
exposedModules
lib
...
...
utils/ghc-pkg/Main.hs
View file @
a11bb49b
...
...
@@ -324,7 +324,8 @@ parseGlobPackageId :: ReadP r PackageIdentifier
parseGlobPackageId
=
parse
+++
(
do
n
<-
parsePackageName
;
string
"-*"
(
do
n
<-
parse
string
"-*"
return
(
PackageIdentifier
{
pkgName
=
n
,
pkgVersion
=
globVersion
}))
-- globVersion means "all versions"
...
...
@@ -573,7 +574,7 @@ listPackages flags mPackageName mModuleName = do
where
doc
=
text
(
display
(
package
p
))
show_simple
db_stack
=
do
let
showPkg
=
if
FlagNamesOnly
`
elem
`
flags
then
pkgName
let
showPkg
=
if
FlagNamesOnly
`
elem
`
flags
then
display
.
pkgName
else
display
pkgs
=
map
showPkg
$
sortBy
compPkgIdVer
$
map
package
(
concatMap
snd
db_stack
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment