%
-% (c) The GRASP/AQUA Project, Glasgow University, 1992-1996
+% (c) The GRASP/AQUA Project, Glasgow University, 1992-1998
%
\section[PrefixSyn]{``Prefix-form'' syntax}
\begin{code}
module PrefixSyn (
RdrBinding(..),
- RdrId,
RdrMatch(..),
SigConverter,
SrcFile,
import HsSyn
import RdrHsSyn
-import BasicTypes ( IfaceFlavour )
-import Util ( panic )
-import SrcLoc ( SrcLoc )
+import Panic ( panic )
import Char ( isDigit, ord )
-type RdrId = RdrName
+
+--UNUSED: type RdrId = RdrName
type SrcLine = Int
type SrcFile = FAST_STRING
type SrcFun = RdrName
data RdrBinding
= RdrNullBind
| RdrAndBindings RdrBinding RdrBinding
-
- | RdrTyDecl RdrNameTyDecl
- | RdrFunctionBinding SrcLine [RdrMatch]
- | RdrPatternBinding SrcLine [RdrMatch]
- | RdrClassDecl RdrNameClassDecl
+ | RdrTyClDecl RdrNameTyClDecl
+ | RdrValBinding RdrNameMonoBinds -- Pattern or function binding
| RdrInstDecl RdrNameInstDecl
| RdrDefaultDecl RdrNameDefaultDecl
+ | RdrForeignDecl RdrNameForeignDecl
-- signatures are mysterious; we can't
-- tell if its a Sig or a ClassOpSig,
\begin{code}
data RdrMatch
- = RdrMatch_NoGuard
- SrcLine SrcFun
- RdrNamePat
- RdrNameHsExpr
- RdrBinding
-
- | RdrMatch_Guards
- SrcLine SrcFun
- RdrNamePat
- [([RdrNameStmt], RdrNameHsExpr)]
- -- (guard, expr)
- RdrBinding
+ = RdrMatch
+ [RdrNamePat]
+ (Maybe RdrNameHsType)
+ RdrNameGRHSs
\end{code}
Unscramble strings representing oct/dec/hex integer literals: