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
jberryman
GHC
Commits
374b9f5b
Commit
374b9f5b
authored
Oct 26, 2000
by
sewardj
Browse files
[project @ 2000-10-26 16:51:44 by sewardj]
Final changes to get it to compile.
parent
266d3892
Changes
5
Hide whitespace changes
Inline
Side-by-side
ghc/compiler/ghci/CompManager.lhs
View file @
374b9f5b
...
...
@@ -4,6 +4,13 @@
\section[CompManager]{The Compilation Manager}
\begin{code}
#if 1
module CompManager ( )
where
the_answer = "42"
#else
module CompManager ( cmInit, cmLoadModule,
cmGetExpr, cmRunExpr,
CmState, emptyCmState -- abstract
...
...
@@ -526,5 +533,5 @@ downsweep rootNm finder
if null newHomeSummaries
then return homeSummaries
else loop (newHomeSummaries ++ homeSummaries)
#endif
\end{code}
ghc/compiler/main/CmdLineOpts.lhs
View file @
374b9f5b
...
...
@@ -14,6 +14,8 @@ module CmdLineOpts (
DynFlag(..), -- needed non-abstractly by DriverFlags
DynFlags(..),
v_Static_hsc_opts,
intSwitchSet,
switchIsOn,
isStaticHscFlag,
...
...
@@ -97,6 +99,7 @@ module CmdLineOpts (
import Array ( array, (//) )
import GlaExts
import IOExts ( IORef, readIORef )
import Argv
import Constants -- Default values for some flags
import Util
...
...
@@ -314,15 +317,22 @@ dopt_HscLang = hscLang
%************************************************************************
\begin{code}
-- v_Statis_hsc_opts is here to avoid a circular dependency with
-- main/DriverState.
GLOBAL_VAR(v_Static_hsc_opts, [], [String])
lookUp :: FAST_STRING -> Bool
lookup_int :: String -> Maybe Int
lookup_def_int :: String -> Int -> Int
lookup_def_float :: String -> Float -> Float
lookup_str :: String -> Maybe String
lookUp sw = sw `elem` argv
unpacked_static_opts = unsafePerformIO (readIORef v_Static_hsc_opts)
packed_static_opts = map _PK_ unpacked_static_opts
lookUp sw = sw `elem` packed_static_opts
lookup_str sw = firstJust (map (startsWith sw) unpacked_opts)
lookup_str sw = firstJust (map (startsWith sw) unpacked_
static_
opts)
lookup_int sw = case (lookup_str sw) of
Nothing -> Nothing
...
...
@@ -340,7 +350,6 @@ lookup_def_float sw def = case (lookup_str sw) of
Nothing -> def -- Use default
Just xx -> read xx
unpacked_opts = map _UNPK_ argv
{-
Putting the compiler options into temporary at-files
...
...
@@ -352,7 +361,7 @@ unpacked_opts :: [String]
unpacked_opts =
concat $
map (expandAts) $
map _UNPK_ argv
map _UNPK_ argv
-- NOT ARGV any more: v_Static_hsc_opts
where
expandAts ('@':fname) = words (unsafePerformIO (readFile fname))
expandAts l = [l]
...
...
ghc/compiler/main/DriverState.hs
View file @
374b9f5b
-----------------------------------------------------------------------------
-- $Id: DriverState.hs,v 1.
7
2000/10/26 16:
2
1:
02
sewardj Exp $
-- $Id: DriverState.hs,v 1.
8
2000/10/26 16:
5
1:
44
sewardj Exp $
--
-- Settings for the driver
--
...
...
@@ -93,8 +93,6 @@ cHaskell1Version = "5" -- i.e., Haskell 98
-----------------------------------------------------------------------------
-- Global compilation flags
GLOBAL_VAR
(
v_Static_hsc_opts
,
[]
,
[
String
])
-- location of compiler-related files
GLOBAL_VAR
(
v_TopDir
,
clibdir
,
String
)
GLOBAL_VAR
(
v_Inplace
,
False
,
Bool
)
...
...
ghc/compiler/main/Main.hs
View file @
374b9f5b
{-# OPTIONS -W -fno-warn-incomplete-patterns #-}
-----------------------------------------------------------------------------
-- $Id: Main.hs,v 1.1
0
2000/10/26 16:
2
1:
02
sewardj Exp $
-- $Id: Main.hs,v 1.1
1
2000/10/26 16:
5
1:
44
sewardj Exp $
--
-- GHC Driver program
--
...
...
@@ -21,7 +21,7 @@ import DriverFlags
import
DriverMkDepend
import
DriverUtil
import
DriverPhases
(
Phase
(
..
)
)
import
CmdLineOpts
(
HscLang
(
..
),
DynFlags
(
..
)
)
import
CmdLineOpts
(
HscLang
(
..
),
DynFlags
(
..
)
,
v_Static_hsc_opts
)
import
TmpFiles
import
Config
import
Util
...
...
@@ -42,6 +42,8 @@ import List
import
System
import
Maybe
import
CompManager
-----------------------------------------------------------------------------
-- Changes:
...
...
ghc/compiler/parser/Parser.y
View file @
374b9f5b
{-
-----------------------------------------------------------------------------
$Id: Parser.y,v 1.4
4
2000/10/2
4
1
3:23:33
sewardj Exp $
$Id: Parser.y,v 1.4
5
2000/10/2
6
1
6:51:44
sewardj Exp $
Haskell grammar.
...
...
@@ -12,7 +12,6 @@ Author(s): Simon Marlow, Sven Panne 1997, 1998, 1999
module Parser ( parse ) where
import HsSyn
import HsPragmas
import HsTypes ( mkHsTupCon )
import HsPat ( InPat(..) )
...
...
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