Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
Cabal
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Haskell
Cabal
Commits
981b32c2
Commit
981b32c2
authored
17 years ago
by
Ian Lynagh
Browse files
Options
Downloads
Patches
Plain Diff
Define bracketOnError in compat; fixes the build for GHC 6.4
parent
d09a44d4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Distribution/Compat/Exception.hs
+0
-23
0 additions, 23 deletions
Distribution/Compat/Exception.hs
Distribution/Simple/Utils.hs
+1
-2
1 addition, 2 deletions
Distribution/Simple/Utils.hs
with
1 addition
and
25 deletions
Distribution/Compat/Exception.hs
deleted
100644 → 0
+
0
−
23
View file @
d09a44d4
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -cpp #-}
{-# OPTIONS_NHC98 -cpp #-}
{-# OPTIONS_JHC -fcpp #-}
-- #hide
module
Distribution.Compat.Exception
(
bracketOnError
)
where
import
Control.Exception
as
Exception
#
if
defined
(
__GLASGOW_HASKELL__
)
&&
(
__GLASGOW_HASKELL__
<
606
)
bracketOnError
::
IO
a
-- ^ computation to run first (\"acquire resource\")
->
(
a
->
IO
b
)
-- ^ computation to run last (\"release resource\")
->
(
a
->
IO
c
)
-- ^ computation to run in-between
->
IO
c
-- returns the value from the in-between computation
bracketOnError
before
after
thing
=
Exception
.
block
(
do
a
<-
before
Exception
.
catch
(
Exception
.
unblock
(
thing
a
))
(
\
e
->
do
{
after
a
;
Exception
.
throw
e
}))
#
endif
This diff is collapsed.
Click to expand it.
Distribution/Simple/Utils.hs
+
1
−
2
View file @
981b32c2
...
...
@@ -137,7 +137,7 @@ import System.IO
import
System.IO.Error
as
IO.Error
(
try
)
import
qualified
Control.Exception
as
Exception
(
bracket
,
bracket_
,
catch
,
finally
)
(
bracket
,
bracket_
,
bracketOnError
,
catch
,
finally
)
import
Distribution.Text
(
display
)
...
...
@@ -159,7 +159,6 @@ import qualified Control.Exception as Exception
(
throwIO
)
#
endif
import
Distribution.Compat.Exception
as
Exception
(
bracketOnError
)
import
Distribution.Compat.TempFile
(
openTempFile
,
openBinaryTempFile
)
import
Distribution.Verbosity
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment