Changeset 7035 for src/Pugs/AST/Internals.hs
- Timestamp:
- 09/17/05 22:55:58 (3 years ago)
- Files:
-
- 1 modified
-
src/Pugs/AST/Internals.hs (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Pugs/AST/Internals.hs
r6934 r7035 9 9 Val(..), -- uses V.* (which ones?) 10 10 Value(..), -- uses Val, Eval 11 InitDat(..), 11 12 12 13 EvalT(..), ContT(..), … … 79 80 80 81 import Pugs.Parser.Number 82 import Pugs.AST.Prag 81 83 import Pugs.AST.Pos 82 84 import Pugs.AST.Scope … … 862 864 | Cxt !Cxt !Exp -- ^ Context 863 865 | Pos !Pos !Exp -- ^ Position 866 | Prag !Pragmas !Exp -- ^ Lexical pragmas 864 867 | Pad !Scope !Pad !Exp -- ^ Lexical pad 865 868 | Sym !Scope !Var !Exp -- ^ Symbol declaration … … 904 907 unwrap (Cxt _ exp) = unwrap exp 905 908 unwrap (Pos _ exp) = unwrap exp 909 unwrap (Prag _ exp) = unwrap exp 906 910 unwrap (Pad _ _ exp) = unwrap exp 907 911 unwrap (Sym _ _ exp) = unwrap exp … … 954 958 | otherwise 955 959 = (Var name, vs) 960 extract (Prag prag ex) vs = ((Prag prag ex'), vs') 961 where 962 (ex', vs') = extract ex vs 956 963 extract (Pos pos ex) vs = ((Pos pos ex'), vs') 957 964 where … … 1043 1050 , envDebug :: !DebugInfo -- ^ Debug info map 1044 1051 , envPos :: !Pos -- ^ Source position range 1052 , envPragmas :: !Pragmas -- ^ List of pragmas in effect 1053 , envInitDat :: !(TVar InitDat) -- ^ BEGIN result information 1054 } deriving (Show, Eq, Ord, Typeable) 1055 1056 {-| 1057 Module initialization information. 1058 1059 When a module is loaded and initialized (i.e., its &import routine is 1060 called), it may need to communicate information back to the parser. 1061 This information is held in a TVar to which the parser has access. 1062 Currently we use this for keeping track of lexical pragma change 1063 requests, but the possiblyExit mechanism may be refactored to use 1064 this as well. 1065 -} 1066 data InitDat = MkInitDat 1067 { initPragmas :: [Pragma] -- ^ Pragma values being installed 1045 1068 } deriving (Show, Eq, Ord, Typeable) 1046 1069
