Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Shayne Fletcher
Glasgow Haskell Compiler
Commits
c0909f1e
Commit
c0909f1e
authored
Jul 23, 2008
by
Ian Lynagh
Browse files
If the extension is not .lhs, runghc now treats it as .hs; fixes trac
#1232
parent
f373efd4
Changes
1
Hide whitespace changes
Inline
Side-by-side
utils/runghc/runghc.hs
View file @
c0909f1e
...
...
@@ -76,9 +76,14 @@ doIt ghc args = do
hClose
h
doIt
ghc
(
ghc_args
++
[
filename
])
filename
:
prog_args
->
do
let
c1
=
":set prog "
++
show
filename
let
xflag
=
if
takeExtension
filename
==
".lhs"
then
[]
else
[
"-x"
,
"hs"
]
c1
=
":set prog "
++
show
filename
c2
=
":main "
++
show
prog_args
res
<-
rawSystem
ghc
([
"-ignore-dot-ghci"
]
++
ghc_args
++
res
<-
rawSystem
ghc
([
"-ignore-dot-ghci"
]
++
xflag
++
ghc_args
++
[
"-e"
,
c1
,
"-e"
,
c2
,
filename
])
exitWith
res
...
...
Write
Preview
Supports
Markdown
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