2 % (c) The GRASP/AQUA Project, Glasgow University, 1992-1995
4 \section[TaggedCore]{``Tagged binder'' core syntax (including \tr{Simplifiable*})}
6 This module defines a particular parameterisation of the @CoreSyntax@
7 data type. For ``binders,'' we use a pair: an @Id@ (the actual
8 binder) and a ``tag''---any old thing we want to pin on.
9 Bindees are @Ids@, as usual.
11 By far the prevalent use is with a ``tag'' of a @BinderInfo@, as used
12 in the simplifier. So we have a full swatch of synonyms for
13 \tr{Simplifiable} this and that.
16 #include "HsVersions.h"
19 TaggedBinder(..), TaggedCoreBinding(..), TaggedCoreExpr(..),
20 TaggedCoreAtom(..), TaggedCoreCaseAlternatives(..),
21 TaggedCoreCaseDefault(..),
23 TaggedCoreParQuals(..),
24 TaggedCoreParCommunicate(..),
25 CoreParCommunicate(..),
28 unTagBinders, unTagBindersAlts,
30 CoreArg(..), applyToArgs, decomposeArgs, collectArgs,
32 SimplifiableBinder(..), SimplifiableCoreBinding(..),
33 SimplifiableCoreExpr(..), SimplifiableCoreAtom(..),
34 SimplifiableCoreCaseAlternatives(..),
35 SimplifiableCoreCaseDefault(..),
37 SimplifiableCoreParQuals(..),
38 SimplifiableCoreParCommunicate(..),
41 CoreBinding(..), CoreExpr(..), CoreAtom(..), -- re-exported
42 CoreCaseAlternatives(..), CoreCaseDefault(..),
44 -- and to make the interface self-sufficient ...
45 Outputable(..), NamedThing(..),
46 ExportFlag, Pretty(..), PprStyle, PrettyRep,
48 BasicLit, BinderInfo, GlobalSwitch, Id, PrimOp, CostCentre,
49 SrcLoc, TyCon, TyVar, UniType, Unique
52 import CoreFuns ( unTagBinders, unTagBindersAlts, digForLambdas )
53 import CoreSyn -- mostly re-exporting this stuff
54 import BinderInfo ( BinderInfo )
60 type TaggedBinder tag = (Id, tag)
62 type TaggedCoreProgram tag = [CoreBinding (TaggedBinder tag) Id]
63 type TaggedCoreBinding tag = CoreBinding (TaggedBinder tag) Id
64 type TaggedCoreExpr tag = CoreExpr (TaggedBinder tag) Id
65 type TaggedCoreAtom tag = CoreAtom Id
68 type TaggedCoreParQuals tag = CoreParQuals (TaggedBinder tag) Id
69 type TaggedCoreParCommunicate tag
70 = CoreParCommunicate (TaggedBinder tag) Id
71 #endif {- Data Parallel Haskell -}
73 type TaggedCoreCaseAlternatives tag = CoreCaseAlternatives (TaggedBinder tag) Id
74 type TaggedCoreCaseDefault tag = CoreCaseDefault (TaggedBinder tag) Id
78 type SimplifiableBinder = (Id, BinderInfo)
80 type SimplifiableCoreProgram = [CoreBinding SimplifiableBinder Id]
81 type SimplifiableCoreBinding = CoreBinding SimplifiableBinder Id
82 type SimplifiableCoreExpr = CoreExpr SimplifiableBinder Id
83 type SimplifiableCoreAtom = CoreAtom Id
86 type SimplifiableCoreParQuals = CoreParQuals SimplifiableBinder Id
87 type SimplifiableCoreParCommunicate
88 = CoreParCommunicate SimplifiableBinder Id
89 #endif {- Data Parallel Haskell -}
91 type SimplifiableCoreCaseAlternatives = CoreCaseAlternatives SimplifiableBinder Id
92 type SimplifiableCoreCaseDefault = CoreCaseDefault SimplifiableBinder Id