X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Freader%2FPrefixSyn.lhs;h=9d1d8d08a66f46ffcd8bba9751473886cf02d721;hb=ae31748ee4ef1a5e094664eb107cf843b8aee319;hp=cd4d1b8b938cd9fd6f6915327ad4b8626bb10c85;hpb=26741ec416bae2c502ef00a2ba0e79050a32cb67;p=ghc-hetmet.git diff --git a/ghc/compiler/reader/PrefixSyn.lhs b/ghc/compiler/reader/PrefixSyn.lhs index cd4d1b8..9d1d8d0 100644 --- a/ghc/compiler/reader/PrefixSyn.lhs +++ b/ghc/compiler/reader/PrefixSyn.lhs @@ -8,30 +8,26 @@ string from the current Haskell parser is converted. Given in an order that follows the \tr{Prefix_Form} document. \begin{code} -#include "HsVersions.h" - module PrefixSyn ( RdrBinding(..), - SYN_IE(RdrId), + RdrId, RdrMatch(..), - SYN_IE(SigConverter), - SYN_IE(SrcFile), - SYN_IE(SrcFun), - SYN_IE(SrcLine), + SigConverter, + SrcFile, + SrcFun, + SrcLine, readInteger ) where -IMP_Ubiq() -IMPORT_1_3(Char(isDigit)) +#include "HsVersions.h" import HsSyn import RdrHsSyn +import BasicTypes ( IfaceFlavour ) import Util ( panic ) - -#ifdef REALLY_HASKELL_1_3 -ord = fromEnum :: Char -> Int -#endif +import SrcLoc ( SrcLoc ) +import Char ( isDigit, ord ) type RdrId = RdrName type SrcLine = Int @@ -54,19 +50,9 @@ data RdrBinding -- signatures are mysterious; we can't -- tell if its a Sig or a ClassOpSig, -- so we just save the pieces: - | RdrTySig [RdrName] -- vars getting sigs - RdrNamePolyType -- the type - SrcLoc - - -- user pragmas come in in a Sig-ish way/form... - | RdrSpecValSig [RdrNameSig] - | RdrInlineValSig RdrNameSig - | RdrDeforestSig RdrNameSig - | RdrMagicUnfoldingSig RdrNameSig - | RdrSpecInstSig RdrNameSpecInstSig - | RdrSpecDataSig RdrNameSpecDataSig - -type SigConverter = RdrBinding {- a Sig -} -> [RdrNameSig] + | RdrSig RdrNameSig + +type SigConverter = RdrNameSig -> RdrNameSig \end{code} \begin{code} @@ -80,7 +66,7 @@ data RdrMatch | RdrMatch_Guards SrcLine SrcFun RdrNamePat - [(RdrNameHsExpr, RdrNameHsExpr)] + [([RdrNameStmt], RdrNameHsExpr)] -- (guard, expr) RdrBinding \end{code}