projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fe117c5
)
Comments and layout only
author
simonpj@microsoft.com
<unknown>
Thu, 25 Jan 2007 12:54:48 +0000
(12:54 +0000)
committer
simonpj@microsoft.com
<unknown>
Thu, 25 Jan 2007 12:54:48 +0000
(12:54 +0000)
compiler/hsSyn/HsBinds.lhs
patch
|
blob
|
history
diff --git
a/compiler/hsSyn/HsBinds.lhs
b/compiler/hsSyn/HsBinds.lhs
index
41097d8
..
0942703
100644
(file)
--- a/
compiler/hsSyn/HsBinds.lhs
+++ b/
compiler/hsSyn/HsBinds.lhs
@@
-383,21
+383,32
@@
serves for both.
\begin{code}
type LSig name = Located (Sig name)
\begin{code}
type LSig name = Located (Sig name)
-data Sig name
- = TypeSig (Located name) -- A bog-std type signature
+data Sig name -- Signatures and pragmas
+ = -- An ordinary type signature
+ -- f :: Num a => a -> a
+ TypeSig (Located name) -- A bog-std type signature
(LHsType name)
(LHsType name)
- | SpecSig (Located name) -- Specialise a function or datatype ...
- (LHsType name) -- ... to these types
- InlineSpec
+ -- An ordinary fixity declaration
+ -- infixl *** 8
+ | FixSig (FixitySig name) -- Fixity declaration
+ -- An inline pragma
+ -- {#- INLINE f #-}
| InlineSig (Located name) -- Function name
InlineSpec
| InlineSig (Located name) -- Function name
InlineSpec
+ -- A specialisation pragma
+ -- {-# SPECIALISE f :: Int -> Int #-}
+ | SpecSig (Located name) -- Specialise a function or datatype ...
+ (LHsType name) -- ... to these types
+ InlineSpec
+
+ -- A specialisation pragma for instance declarations only
+ -- {-# SPECIALISE instance Eq [Int] #-}
| SpecInstSig (LHsType name) -- (Class tys); should be a specialisation of the
-- current instance decl
| SpecInstSig (LHsType name) -- (Class tys); should be a specialisation of the
-- current instance decl
- | FixSig (FixitySig name) -- Fixity declaration
type LFixitySig name = Located (FixitySig name)
data FixitySig name = FixitySig (Located name) Fixity
type LFixitySig name = Located (FixitySig name)
data FixitySig name = FixitySig (Located name) Fixity