Changeset 20058 for src/Pugs/Parser/Operator.hs
- Timestamp:
- 03/04/08 22:06:31 (9 months ago)
- Files:
-
- 1 modified
-
src/Pugs/Parser/Operator.hs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Pugs/Parser/Operator.hs
r19198 r20058 27 27 28 28 newtype OpName = MkOpName ID 29 deriving (Show, Eq, Typeable, (:>:) String, (:>:) ByteString, (:<:) ByteString, (:>:) ID )29 deriving (Show, Eq, Typeable, (:>:) String, (:>:) ByteString, (:<:) ByteString, (:>:) ID, (:<:) String, (:<:) ID) 30 30 31 31 instance Ord OpName where 32 32 compare (MkOpName MkID{ idKey = a, idBuf = x }) (MkOpName MkID{ idKey = b, idBuf = y }) 33 33 = compare (Buf.length y) (Buf.length x) `mappend` compare b a 34 35 instance ((:<:) OpName) ByteString where 36 castBack (MkOpName id) = castBack id 34 37 35 38 -- Not yet transcribed into a full optable parser with dynamic precedence … … 650 653 notFollowedBy (char '(' <|> (char ':' >> char ':')) 651 654 possiblyApplyMacro $ App (Var var) Nothing [] 652 parseOneTerm (name , categ) = do655 parseOneTerm (name :: OpName, categ) = do 653 656 symbol (cast name) 654 657 return MkVar
