Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue 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
Gesh
GHC
Commits
54c13d5c
Commit
54c13d5c
authored
26 years ago
by
Simon Marlow
Browse files
Options
Downloads
Patches
Plain Diff
[project @ 1999-02-19 10:48:27 by simonm]
Hack around a couple of explicit uses of the Integer rep.
parent
d3a443b3
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ghc/lib/std/PrelHandle.lhs
+6
-5
6 additions, 5 deletions
ghc/lib/std/PrelHandle.lhs
with
6 additions
and
5 deletions
ghc/lib/std/PrelHandle.lhs
+
6
−
5
View file @
54c13d5c
...
...
@@ -23,7 +23,7 @@ import PrelException ( throw, ioError, catchException )
import PrelMaybe ( Maybe(..) )
import PrelAddr ( Addr, nullAddr )
import PrelBounded () -- get at Bounded Int instance.
import PrelNum ( toInteger )
import PrelNum ( toInteger
, toBig
)
import PrelWeak ( addForeignFinalizer )
#if __CONCURRENT_HASKELL__
import PrelConc
...
...
@@ -434,12 +434,12 @@ hFileSize handle =
-- For some reason, this fails to typecheck if converted to a do
-- expression --SDM
_casm_ ``%r = 1;'' >>= \(I# hack#) ->
case int2Integer hack# of
result@(J# _
d#) -> do
rc <- CCALL(fileSize) (haFO__ handle_) d
#
-- ConcHask: SAFE, won't block
case int2Integer
#
hack# of
(# s,
d
#) -> do
rc <- CCALL(fileSize) (haFO__ handle_) d -- ConcHask: SAFE, won't block
writeHandle handle handle_
if rc == (0::Int) then
return
result
return
(J# s d)
else
constructErrorAndFail "hFileSize"
#endif
...
...
@@ -641,6 +641,7 @@ hSeek handle mode offset =
let fo = haFO__ handle_
rc <- mayBlock fo (CCALL(seekFile_int64) fo whence (primIntegerToInt64 offset)) -- ConcHask: UNSAFE, may block
#else
hSeek handle mode i@(S# _) = hSeek handle mode (toBig i)
hSeek handle mode (J# s# d#) =
wantSeekableHandle "hSeek" handle $ \ handle_ -> do
let fo = haFO__ handle_
...
...
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