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
c8386581
Commit
c8386581
authored
Jun 06, 2011
by
dterei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SafeHaskell: Fix validation errors when unsafe base used
parent
4f9675b2
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
19 additions
and
6 deletions
+19
-6
compiler/ghci/RtClosureInspect.hs
compiler/ghci/RtClosureInspect.hs
+1
-1
compiler/hsSyn/HsImpExp.lhs
compiler/hsSyn/HsImpExp.lhs
+1
-0
compiler/main/InteractiveEval.hs
compiler/main/InteractiveEval.hs
+5
-1
compiler/utils/FastMutInt.lhs
compiler/utils/FastMutInt.lhs
+3
-1
compiler/utils/StringBuffer.lhs
compiler/utils/StringBuffer.lhs
+1
-1
ghc/InteractiveUI.hs
ghc/InteractiveUI.hs
+5
-2
mk/validate-settings.mk
mk/validate-settings.mk
+3
-0
No files found.
compiler/ghci/RtClosureInspect.hs
View file @
c8386581
...
@@ -66,7 +66,7 @@ import Data.List
...
@@ -66,7 +66,7 @@ import Data.List
import
qualified
Data.Sequence
as
Seq
import
qualified
Data.Sequence
as
Seq
import
Data.Monoid
import
Data.Monoid
import
Data.Sequence
(
viewl
,
ViewL
(
..
))
import
Data.Sequence
(
viewl
,
ViewL
(
..
))
import
Foreign
import
Foreign
.Safe
import
System.IO.Unsafe
import
System.IO.Unsafe
---------------------------------------------
---------------------------------------------
...
...
compiler/hsSyn/HsImpExp.lhs
View file @
c8386581
...
@@ -47,6 +47,7 @@ simpleImportDecl mn = ImportDecl {
...
@@ -47,6 +47,7 @@ simpleImportDecl mn = ImportDecl {
ideclName = noLoc mn,
ideclName = noLoc mn,
ideclPkgQual = Nothing,
ideclPkgQual = Nothing,
ideclSource = False,
ideclSource = False,
ideclSafe = True,
ideclQualified = False,
ideclQualified = False,
ideclAs = Nothing,
ideclAs = Nothing,
ideclHiding = Nothing
ideclHiding = Nothing
...
...
compiler/main/InteractiveEval.hs
View file @
c8386581
...
@@ -75,7 +75,11 @@ import System.Directory
...
@@ -75,7 +75,11 @@ import System.Directory
import
Data.Dynamic
import
Data.Dynamic
import
Data.List
(
find
)
import
Data.List
(
find
)
import
Control.Monad
import
Control.Monad
import
Foreign
#
if
__GLASGOW_HASKELL__
>=
701
import
Foreign.Safe
#
else
import
Foreign
hiding
(
unsafePerformIO
)
#
endif
import
Foreign.C
import
Foreign.C
import
GHC.Exts
import
GHC.Exts
import
Data.Array
import
Data.Array
...
...
compiler/utils/FastMutInt.lhs
View file @
c8386581
...
@@ -26,9 +26,11 @@ module FastMutInt(
...
@@ -26,9 +26,11 @@ module FastMutInt(
#endif
#endif
import GHC.Base
import GHC.Base
import GHC.Ptr
#if __GLASGOW_HASKELL__ >= 701
#if __GLASGOW_HASKELL__ >= 701
import GHC.Ptr.Safe
import GHC.Ptr.Unsafe
import GHC.Ptr.Unsafe
#else
import GHC.Ptr
#endif
#endif
#else /* ! __GLASGOW_HASKELL__ */
#else /* ! __GLASGOW_HASKELL__ */
...
...
compiler/utils/StringBuffer.lhs
View file @
c8386581
...
@@ -55,7 +55,7 @@ import System.IO.Unsafe ( unsafePerformIO )
...
@@ -55,7 +55,7 @@ import System.IO.Unsafe ( unsafePerformIO )
import GHC.Exts
import GHC.Exts
#if __GLASGOW_HASKELL__ >= 701
#if __GLASGOW_HASKELL__ >= 701
import Foreign
import Foreign
.Safe
#else
#else
import Foreign hiding ( unsafePerformIO )
import Foreign hiding ( unsafePerformIO )
#endif
#endif
...
...
ghc/InteractiveUI.hs
View file @
c8386581
...
@@ -88,7 +88,7 @@ import Data.Char
...
@@ -88,7 +88,7 @@ import Data.Char
import
Data.Array
import
Data.Array
import
Control.Monad
as
Monad
import
Control.Monad
as
Monad
import
Text.Printf
import
Text.Printf
import
Foreign
import
Foreign
.Safe
import
GHC.Exts
(
unsafeCoerce
#
)
import
GHC.Exts
(
unsafeCoerce
#
)
import
GHC.IO.Exception
(
IOErrorType
(
InvalidArgument
)
)
import
GHC.IO.Exception
(
IOErrorType
(
InvalidArgument
)
)
...
@@ -1336,7 +1336,10 @@ isSafeCmd m =
...
@@ -1336,7 +1336,10 @@ isSafeCmd m =
-- recently-added module occurs last, it seems.
-- recently-added module occurs last, it seems.
case
(
as
,
bs
)
of
case
(
as
,
bs
)
of
(
as
@
(
_
:
_
),
_
)
->
isSafeModule
$
last
as
(
as
@
(
_
:
_
),
_
)
->
isSafeModule
$
last
as
(
[]
,
bs
@
(
_
:
_
))
->
isSafeModule
$
fst
(
last
bs
)
(
[]
,
bs
@
(
_
:
_
))
->
do
let
i
=
last
bs
m
<-
GHC
.
findModule
(
unLoc
(
ideclName
i
))
(
ideclPkgQual
i
)
isSafeModule
m
(
[]
,
[]
)
->
ghcError
(
CmdLineError
":issafe: no current module"
)
(
[]
,
[]
)
->
ghcError
(
CmdLineError
":issafe: no current module"
)
_
->
ghcError
(
CmdLineError
"syntax: :issafe <module>"
)
_
->
ghcError
(
CmdLineError
"syntax: :issafe <module>"
)
...
...
mk/validate-settings.mk
View file @
c8386581
...
@@ -7,6 +7,9 @@ HADDOCK_DOCS = YES
...
@@ -7,6 +7,9 @@ HADDOCK_DOCS = YES
SRC_CC_OPTS
+=
-Wall
$(WERROR)
SRC_CC_OPTS
+=
-Wall
$(WERROR)
SRC_HC_OPTS
+=
-Wall
$(WERROR)
-H64m
-O0
SRC_HC_OPTS
+=
-Wall
$(WERROR)
-H64m
-O0
# Safe by default
#SRC_HC_OPTS += -Dsh_SAFE_DEFAULT
GhcStage1HcOpts
+=
-O
GhcStage1HcOpts
+=
-O
GhcStage2HcOpts
+=
-O
GhcStage2HcOpts
+=
-O
...
...
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