{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE Strict #-}
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE TypeFamilies #-}
module Futhark.IR.Syntax
( module Language.Futhark.Core,
module Futhark.IR.Decorations,
module Futhark.IR.Syntax.Core,
Uniqueness (..),
NoUniqueness (..),
Rank (..),
ArrayShape (..),
Space (..),
TypeBase (..),
Diet (..),
Attr (..),
Attrs (..),
oneAttr,
inAttrs,
withoutAttrs,
Ident (..),
SubExp (..),
PatElem,
PatElemT (..),
PatternT (..),
Pattern,
StmAux (..),
Stm (..),
Stms,
Result,
BodyT (..),
Body,
BasicOp (..),
UnOp (..),
BinOp (..),
CmpOp (..),
ConvOp (..),
DimChange (..),
ShapeChange,
ExpT (..),
Exp,
LoopForm (..),
IfDec (..),
IfSort (..),
Safety (..),
LambdaT (..),
Lambda,
Param (..),
FParam,
LParam,
FunDef (..),
EntryPoint,
EntryPointType (..),
Prog (..),
oneStm,
stmsFromList,
stmsToList,
stmsHead,
)
where
import Control.Category
import Data.Foldable
import qualified Data.Sequence as Seq
import qualified Data.Set as S
import Data.String
import Data.Traversable (fmapDefault, foldMapDefault)
import Futhark.IR.Decorations
import Futhark.IR.Syntax.Core
import Language.Futhark.Core
import Prelude hiding (id, (.))
data Attr
= AttrAtom Name
| AttrComp Name [Attr]
deriving (Eq Attr
Eq Attr
-> (Attr -> Attr -> Ordering)
-> (Attr -> Attr -> Bool)
-> (Attr -> Attr -> Bool)
-> (Attr -> Attr -> Bool)
-> (Attr -> Attr -> Bool)
-> (Attr -> Attr -> Attr)
-> (Attr -> Attr -> Attr)
-> Ord Attr
Attr -> Attr -> Bool
Attr -> Attr -> Ordering
Attr -> Attr -> Attr
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Attr -> Attr -> Attr
$cmin :: Attr -> Attr -> Attr
max :: Attr -> Attr -> Attr
$cmax :: Attr -> Attr -> Attr
>= :: Attr -> Attr -> Bool
$c>= :: Attr -> Attr -> Bool
> :: Attr -> Attr -> Bool
$c> :: Attr -> Attr -> Bool
<= :: Attr -> Attr -> Bool
$c<= :: Attr -> Attr -> Bool
< :: Attr -> Attr -> Bool
$c< :: Attr -> Attr -> Bool
compare :: Attr -> Attr -> Ordering
$ccompare :: Attr -> Attr -> Ordering
Ord, Int -> Attr -> ShowS
[Attr] -> ShowS
Attr -> String
(Int -> Attr -> ShowS)
-> (Attr -> String) -> ([Attr] -> ShowS) -> Show Attr
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Attr] -> ShowS
$cshowList :: [Attr] -> ShowS
show :: Attr -> String
$cshow :: Attr -> String
showsPrec :: Int -> Attr -> ShowS
$cshowsPrec :: Int -> Attr -> ShowS
Show, Attr -> Attr -> Bool
(Attr -> Attr -> Bool) -> (Attr -> Attr -> Bool) -> Eq Attr
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Attr -> Attr -> Bool
$c/= :: Attr -> Attr -> Bool
== :: Attr -> Attr -> Bool
$c== :: Attr -> Attr -> Bool
Eq)
instance IsString Attr where
fromString :: String -> Attr
fromString = Name -> Attr
AttrAtom (Name -> Attr) -> (String -> Name) -> String -> Attr
forall {k} (cat :: k -> k -> *) (b :: k) (c :: k) (a :: k).
Category cat =>
cat b c -> cat a b -> cat a c
. String -> Name
forall a. IsString a => String -> a
fromString
newtype Attrs = Attrs {Attrs -> Set Attr
unAttrs :: S.Set Attr}
deriving (Eq Attrs
Eq Attrs
-> (Attrs -> Attrs -> Ordering)
-> (Attrs -> Attrs -> Bool)
-> (Attrs -> Attrs -> Bool)
-> (Attrs -> Attrs -> Bool)
-> (Attrs -> Attrs -> Bool)
-> (Attrs -> Attrs -> Attrs)
-> (Attrs -> Attrs -> Attrs)
-> Ord Attrs
Attrs -> Attrs -> Bool
Attrs -> Attrs -> Ordering
Attrs -> Attrs -> Attrs
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Attrs -> Attrs -> Attrs
$cmin :: Attrs -> Attrs -> Attrs
max :: Attrs -> Attrs -> Attrs
$cmax :: Attrs -> Attrs -> Attrs
>= :: Attrs -> Attrs -> Bool
$c>= :: Attrs -> Attrs -> Bool
> :: Attrs -> Attrs -> Bool
$c> :: Attrs -> Attrs -> Bool
<= :: Attrs -> Attrs -> Bool
$c<= :: Attrs -> Attrs -> Bool
< :: Attrs -> Attrs -> Bool
$c< :: Attrs -> Attrs -> Bool
compare :: Attrs -> Attrs -> Ordering
$ccompare :: Attrs -> Attrs -> Ordering
Ord, Int -> Attrs -> ShowS
[Attrs] -> ShowS
Attrs -> String
(Int -> Attrs -> ShowS)
-> (Attrs -> String) -> ([Attrs] -> ShowS) -> Show Attrs
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Attrs] -> ShowS
$cshowList :: [Attrs] -> ShowS
show :: Attrs -> String
$cshow :: Attrs -> String
showsPrec :: Int -> Attrs -> ShowS
$cshowsPrec :: Int -> Attrs -> ShowS
Show, Attrs -> Attrs -> Bool
(Attrs -> Attrs -> Bool) -> (Attrs -> Attrs -> Bool) -> Eq Attrs
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Attrs -> Attrs -> Bool
$c/= :: Attrs -> Attrs -> Bool
== :: Attrs -> Attrs -> Bool
$c== :: Attrs -> Attrs -> Bool
Eq, Semigroup Attrs
Attrs
Semigroup Attrs
-> Attrs
-> (Attrs -> Attrs -> Attrs)
-> ([Attrs] -> Attrs)
-> Monoid Attrs
[Attrs] -> Attrs
Attrs -> Attrs -> Attrs
forall a.
Semigroup a -> a -> (a -> a -> a) -> ([a] -> a) -> Monoid a
mconcat :: [Attrs] -> Attrs
$cmconcat :: [Attrs] -> Attrs
mappend :: Attrs -> Attrs -> Attrs
$cmappend :: Attrs -> Attrs -> Attrs
mempty :: Attrs
$cmempty :: Attrs
Monoid, NonEmpty Attrs -> Attrs
Attrs -> Attrs -> Attrs
(Attrs -> Attrs -> Attrs)
-> (NonEmpty Attrs -> Attrs)
-> (forall b. Integral b => b -> Attrs -> Attrs)
-> Semigroup Attrs
forall b. Integral b => b -> Attrs -> Attrs
forall a.
(a -> a -> a)
-> (NonEmpty a -> a)
-> (forall b. Integral b => b -> a -> a)
-> Semigroup a
stimes :: forall b. Integral b => b -> Attrs -> Attrs
$cstimes :: forall b. Integral b => b -> Attrs -> Attrs
sconcat :: NonEmpty Attrs -> Attrs
$csconcat :: NonEmpty Attrs -> Attrs
<> :: Attrs -> Attrs -> Attrs
$c<> :: Attrs -> Attrs -> Attrs
Semigroup)
oneAttr :: Attr -> Attrs
oneAttr :: Attr -> Attrs
oneAttr = Set Attr -> Attrs
Attrs (Set Attr -> Attrs) -> (Attr -> Set Attr) -> Attr -> Attrs
forall {k} (cat :: k -> k -> *) (b :: k) (c :: k) (a :: k).
Category cat =>
cat b c -> cat a b -> cat a c
. Attr -> Set Attr
forall a. a -> Set a
S.singleton
inAttrs :: Attr -> Attrs -> Bool
inAttrs :: Attr -> Attrs -> Bool
inAttrs Attr
attr (Attrs Set Attr
attrs) = Attr
attr Attr -> Set Attr -> Bool
forall a. Ord a => a -> Set a -> Bool
`S.member` Set Attr
attrs
withoutAttrs :: Attrs -> Attrs -> Attrs
withoutAttrs :: Attrs -> Attrs -> Attrs
withoutAttrs (Attrs Set Attr
x) (Attrs Set Attr
y) = Set Attr -> Attrs
Attrs (Set Attr -> Attrs) -> Set Attr -> Attrs
forall a b. (a -> b) -> a -> b
$ Set Attr
x Set Attr -> Set Attr -> Set Attr
forall a. Ord a => Set a -> Set a -> Set a
`S.difference` Set Attr
y
type PatElem lore = PatElemT (LetDec lore)
data PatternT dec = Pattern
{
forall dec. PatternT dec -> [PatElemT dec]
patternContextElements :: [PatElemT dec],
forall dec. PatternT dec -> [PatElemT dec]
patternValueElements :: [PatElemT dec]
}
deriving (Eq (PatternT dec)
Eq (PatternT dec)
-> (PatternT dec -> PatternT dec -> Ordering)
-> (PatternT dec -> PatternT dec -> Bool)
-> (PatternT dec -> PatternT dec -> Bool)
-> (PatternT dec -> PatternT dec -> Bool)
-> (PatternT dec -> PatternT dec -> Bool)
-> (PatternT dec -> PatternT dec -> PatternT dec)
-> (PatternT dec -> PatternT dec -> PatternT dec)
-> Ord (PatternT dec)
PatternT dec -> PatternT dec -> Bool
PatternT dec -> PatternT dec -> Ordering
PatternT dec -> PatternT dec -> PatternT dec
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
forall {dec}. Ord dec => Eq (PatternT dec)
forall dec. Ord dec => PatternT dec -> PatternT dec -> Bool
forall dec. Ord dec => PatternT dec -> PatternT dec -> Ordering
forall dec. Ord dec => PatternT dec -> PatternT dec -> PatternT dec
min :: PatternT dec -> PatternT dec -> PatternT dec
$cmin :: forall dec. Ord dec => PatternT dec -> PatternT dec -> PatternT dec
max :: PatternT dec -> PatternT dec -> PatternT dec
$cmax :: forall dec. Ord dec => PatternT dec -> PatternT dec -> PatternT dec
>= :: PatternT dec -> PatternT dec -> Bool
$c>= :: forall dec. Ord dec => PatternT dec -> PatternT dec -> Bool
> :: PatternT dec -> PatternT dec -> Bool
$c> :: forall dec. Ord dec => PatternT dec -> PatternT dec -> Bool
<= :: PatternT dec -> PatternT dec -> Bool
$c<= :: forall dec. Ord dec => PatternT dec -> PatternT dec -> Bool
< :: PatternT dec -> PatternT dec -> Bool
$c< :: forall dec. Ord dec => PatternT dec -> PatternT dec -> Bool
compare :: PatternT dec -> PatternT dec -> Ordering
$ccompare :: forall dec. Ord dec => PatternT dec -> PatternT dec -> Ordering
Ord, Int -> PatternT dec -> ShowS
[PatternT dec] -> ShowS
PatternT dec -> String
(Int -> PatternT dec -> ShowS)
-> (PatternT dec -> String)
-> ([PatternT dec] -> ShowS)
-> Show (PatternT dec)
forall dec. Show dec => Int -> PatternT dec -> ShowS
forall dec. Show dec => [PatternT dec] -> ShowS
forall dec. Show dec => PatternT dec -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PatternT dec] -> ShowS
$cshowList :: forall dec. Show dec => [PatternT dec] -> ShowS
show :: PatternT dec -> String
$cshow :: forall dec. Show dec => PatternT dec -> String
showsPrec :: Int -> PatternT dec -> ShowS
$cshowsPrec :: forall dec. Show dec => Int -> PatternT dec -> ShowS
Show, PatternT dec -> PatternT dec -> Bool
(PatternT dec -> PatternT dec -> Bool)
-> (PatternT dec -> PatternT dec -> Bool) -> Eq (PatternT dec)
forall dec. Eq dec => PatternT dec -> PatternT dec -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PatternT dec -> PatternT dec -> Bool
$c/= :: forall dec. Eq dec => PatternT dec -> PatternT dec -> Bool
== :: PatternT dec -> PatternT dec -> Bool
$c== :: forall dec. Eq dec => PatternT dec -> PatternT dec -> Bool
Eq)
instance Semigroup (PatternT dec) where
Pattern [PatElemT dec]
cs1 [PatElemT dec]
vs1 <> :: PatternT dec -> PatternT dec -> PatternT dec
<> Pattern [PatElemT dec]
cs2 [PatElemT dec]
vs2 = [PatElemT dec] -> [PatElemT dec] -> PatternT dec
forall dec. [PatElemT dec] -> [PatElemT dec] -> PatternT dec
Pattern ([PatElemT dec]
cs1 [PatElemT dec] -> [PatElemT dec] -> [PatElemT dec]
forall a. [a] -> [a] -> [a]
++ [PatElemT dec]
cs2) ([PatElemT dec]
vs1 [PatElemT dec] -> [PatElemT dec] -> [PatElemT dec]
forall a. [a] -> [a] -> [a]
++ [PatElemT dec]
vs2)
instance Monoid (PatternT dec) where
mempty :: PatternT dec
mempty = [PatElemT dec] -> [PatElemT dec] -> PatternT dec
forall dec. [PatElemT dec] -> [PatElemT dec] -> PatternT dec
Pattern [] []
instance Functor PatternT where
fmap :: forall a b. (a -> b) -> PatternT a -> PatternT b
fmap = (a -> b) -> PatternT a -> PatternT b
forall (t :: * -> *) a b. Traversable t => (a -> b) -> t a -> t b
fmapDefault
instance Foldable PatternT where
foldMap :: forall m a. Monoid m => (a -> m) -> PatternT a -> m
foldMap = (a -> m) -> PatternT a -> m
forall (t :: * -> *) m a.
(Traversable t, Monoid m) =>
(a -> m) -> t a -> m
foldMapDefault
instance Traversable PatternT where
traverse :: forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> PatternT a -> f (PatternT b)
traverse a -> f b
f (Pattern [PatElemT a]
ctx [PatElemT a]
vals) =
[PatElemT b] -> [PatElemT b] -> PatternT b
forall dec. [PatElemT dec] -> [PatElemT dec] -> PatternT dec
Pattern ([PatElemT b] -> [PatElemT b] -> PatternT b)
-> f [PatElemT b] -> f ([PatElemT b] -> PatternT b)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (PatElemT a -> f (PatElemT b)) -> [PatElemT a] -> f [PatElemT b]
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse ((a -> f b) -> PatElemT a -> f (PatElemT b)
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse a -> f b
f) [PatElemT a]
ctx f ([PatElemT b] -> PatternT b) -> f [PatElemT b] -> f (PatternT b)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (PatElemT a -> f (PatElemT b)) -> [PatElemT a] -> f [PatElemT b]
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse ((a -> f b) -> PatElemT a -> f (PatElemT b)
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse a -> f b
f) [PatElemT a]
vals
type Pattern lore = PatternT (LetDec lore)
data StmAux dec = StmAux
{ forall dec. StmAux dec -> Certificates
stmAuxCerts :: !Certificates,
forall dec. StmAux dec -> Attrs
stmAuxAttrs :: Attrs,
forall dec. StmAux dec -> dec
stmAuxDec :: dec
}
deriving (Eq (StmAux dec)
Eq (StmAux dec)
-> (StmAux dec -> StmAux dec -> Ordering)
-> (StmAux dec -> StmAux dec -> Bool)
-> (StmAux dec -> StmAux dec -> Bool)
-> (StmAux dec -> StmAux dec -> Bool)
-> (StmAux dec -> StmAux dec -> Bool)
-> (StmAux dec -> StmAux dec -> StmAux dec)
-> (StmAux dec -> StmAux dec -> StmAux dec)
-> Ord (StmAux dec)
StmAux dec -> StmAux dec -> Bool
StmAux dec -> StmAux dec -> Ordering
StmAux dec -> StmAux dec -> StmAux dec
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
forall {dec}. Ord dec => Eq (StmAux dec)
forall dec. Ord dec => StmAux dec -> StmAux dec -> Bool
forall dec. Ord dec => StmAux dec -> StmAux dec -> Ordering
forall dec. Ord dec => StmAux dec -> StmAux dec -> StmAux dec
min :: StmAux dec -> StmAux dec -> StmAux dec
$cmin :: forall dec. Ord dec => StmAux dec -> StmAux dec -> StmAux dec
max :: StmAux dec -> StmAux dec -> StmAux dec
$cmax :: forall dec. Ord dec => StmAux dec -> StmAux dec -> StmAux dec
>= :: StmAux dec -> StmAux dec -> Bool
$c>= :: forall dec. Ord dec => StmAux dec -> StmAux dec -> Bool
> :: StmAux dec -> StmAux dec -> Bool
$c> :: forall dec. Ord dec => StmAux dec -> StmAux dec -> Bool
<= :: StmAux dec -> StmAux dec -> Bool
$c<= :: forall dec. Ord dec => StmAux dec -> StmAux dec -> Bool
< :: StmAux dec -> StmAux dec -> Bool
$c< :: forall dec. Ord dec => StmAux dec -> StmAux dec -> Bool
compare :: StmAux dec -> StmAux dec -> Ordering
$ccompare :: forall dec. Ord dec => StmAux dec -> StmAux dec -> Ordering
Ord, Int -> StmAux dec -> ShowS
[StmAux dec] -> ShowS
StmAux dec -> String
(Int -> StmAux dec -> ShowS)
-> (StmAux dec -> String)
-> ([StmAux dec] -> ShowS)
-> Show (StmAux dec)
forall dec. Show dec => Int -> StmAux dec -> ShowS
forall dec. Show dec => [StmAux dec] -> ShowS
forall dec. Show dec => StmAux dec -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StmAux dec] -> ShowS
$cshowList :: forall dec. Show dec => [StmAux dec] -> ShowS
show :: StmAux dec -> String
$cshow :: forall dec. Show dec => StmAux dec -> String
showsPrec :: Int -> StmAux dec -> ShowS
$cshowsPrec :: forall dec. Show dec => Int -> StmAux dec -> ShowS
Show, StmAux dec -> StmAux dec -> Bool
(StmAux dec -> StmAux dec -> Bool)
-> (StmAux dec -> StmAux dec -> Bool) -> Eq (StmAux dec)
forall dec. Eq dec => StmAux dec -> StmAux dec -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StmAux dec -> StmAux dec -> Bool
$c/= :: forall dec. Eq dec => StmAux dec -> StmAux dec -> Bool
== :: StmAux dec -> StmAux dec -> Bool
$c== :: forall dec. Eq dec => StmAux dec -> StmAux dec -> Bool
Eq)
instance Semigroup dec => Semigroup (StmAux dec) where
StmAux Certificates
cs1 Attrs
attrs1 dec
dec1 <> :: StmAux dec -> StmAux dec -> StmAux dec
<> StmAux Certificates
cs2 Attrs
attrs2 dec
dec2 =
Certificates -> Attrs -> dec -> StmAux dec
forall dec. Certificates -> Attrs -> dec -> StmAux dec
StmAux (Certificates
cs1 Certificates -> Certificates -> Certificates
forall a. Semigroup a => a -> a -> a
<> Certificates
cs2) (Attrs
attrs1 Attrs -> Attrs -> Attrs
forall a. Semigroup a => a -> a -> a
<> Attrs
attrs2) (dec
dec1 dec -> dec -> dec
forall a. Semigroup a => a -> a -> a
<> dec
dec2)
data Stm lore = Let
{
forall lore. Stm lore -> Pattern lore
stmPattern :: Pattern lore,
forall lore. Stm lore -> StmAux (ExpDec lore)
stmAux :: StmAux (ExpDec lore),
forall lore. Stm lore -> Exp lore
stmExp :: Exp lore
}
deriving instance Decorations lore => Ord (Stm lore)
deriving instance Decorations lore => Show (Stm lore)
deriving instance Decorations lore => Eq (Stm lore)
type Stms lore = Seq.Seq (Stm lore)
oneStm :: Stm lore -> Stms lore
oneStm :: forall lore. Stm lore -> Stms lore
oneStm = Stm lore -> Seq (Stm lore)
forall a. a -> Seq a
Seq.singleton
stmsFromList :: [Stm lore] -> Stms lore
stmsFromList :: forall lore. [Stm lore] -> Stms lore
stmsFromList = [Stm lore] -> Seq (Stm lore)
forall a. [a] -> Seq a
Seq.fromList
stmsToList :: Stms lore -> [Stm lore]
stmsToList :: forall lore. Stms lore -> [Stm lore]
stmsToList = Seq (Stm lore) -> [Stm lore]
forall (t :: * -> *) a. Foldable t => t a -> [a]
toList
stmsHead :: Stms lore -> Maybe (Stm lore, Stms lore)
stmsHead :: forall lore. Stms lore -> Maybe (Stm lore, Stms lore)
stmsHead Stms lore
stms = case Stms lore -> ViewL (Stm lore)
forall a. Seq a -> ViewL a
Seq.viewl Stms lore
stms of
Stm lore
stm Seq.:< Stms lore
stms' -> (Stm lore, Stms lore) -> Maybe (Stm lore, Stms lore)
forall a. a -> Maybe a
Just (Stm lore
stm, Stms lore
stms')
ViewL (Stm lore)
Seq.EmptyL -> Maybe (Stm lore, Stms lore)
forall a. Maybe a
Nothing
type Result = [SubExp]
data BodyT lore = Body
{ forall lore. BodyT lore -> BodyDec lore
bodyDec :: BodyDec lore,
forall lore. BodyT lore -> Stms lore
bodyStms :: Stms lore,
forall lore. BodyT lore -> Result
bodyResult :: Result
}
deriving instance Decorations lore => Ord (BodyT lore)
deriving instance Decorations lore => Show (BodyT lore)
deriving instance Decorations lore => Eq (BodyT lore)
type Body = BodyT
data DimChange d
=
DimCoercion d
|
DimNew d
deriving (Eq (DimChange d)
Eq (DimChange d)
-> (DimChange d -> DimChange d -> Ordering)
-> (DimChange d -> DimChange d -> Bool)
-> (DimChange d -> DimChange d -> Bool)
-> (DimChange d -> DimChange d -> Bool)
-> (DimChange d -> DimChange d -> Bool)
-> (DimChange d -> DimChange d -> DimChange d)
-> (DimChange d -> DimChange d -> DimChange d)
-> Ord (DimChange d)
DimChange d -> DimChange d -> Bool
DimChange d -> DimChange d -> Ordering
DimChange d -> DimChange d -> DimChange d
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
forall {d}. Ord d => Eq (DimChange d)
forall d. Ord d => DimChange d -> DimChange d -> Bool
forall d. Ord d => DimChange d -> DimChange d -> Ordering
forall d. Ord d => DimChange d -> DimChange d -> DimChange d
min :: DimChange d -> DimChange d -> DimChange d
$cmin :: forall d. Ord d => DimChange d -> DimChange d -> DimChange d
max :: DimChange d -> DimChange d -> DimChange d
$cmax :: forall d. Ord d => DimChange d -> DimChange d -> DimChange d
>= :: DimChange d -> DimChange d -> Bool
$c>= :: forall d. Ord d => DimChange d -> DimChange d -> Bool
> :: DimChange d -> DimChange d -> Bool
$c> :: forall d. Ord d => DimChange d -> DimChange d -> Bool
<= :: DimChange d -> DimChange d -> Bool
$c<= :: forall d. Ord d => DimChange d -> DimChange d -> Bool
< :: DimChange d -> DimChange d -> Bool
$c< :: forall d. Ord d => DimChange d -> DimChange d -> Bool
compare :: DimChange d -> DimChange d -> Ordering
$ccompare :: forall d. Ord d => DimChange d -> DimChange d -> Ordering
Ord, Int -> DimChange d -> ShowS
[DimChange d] -> ShowS
DimChange d -> String
(Int -> DimChange d -> ShowS)
-> (DimChange d -> String)
-> ([DimChange d] -> ShowS)
-> Show (DimChange d)
forall d. Show d => Int -> DimChange d -> ShowS
forall d. Show d => [DimChange d] -> ShowS
forall d. Show d => DimChange d -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DimChange d] -> ShowS
$cshowList :: forall d. Show d => [DimChange d] -> ShowS
show :: DimChange d -> String
$cshow :: forall d. Show d => DimChange d -> String
showsPrec :: Int -> DimChange d -> ShowS
$cshowsPrec :: forall d. Show d => Int -> DimChange d -> ShowS
Show)
instance Eq d => Eq (DimChange d) where
DimCoercion d
x == :: DimChange d -> DimChange d -> Bool
== DimNew d
y = d
x d -> d -> Bool
forall a. Eq a => a -> a -> Bool
== d
y
DimCoercion d
x == DimCoercion d
y = d
x d -> d -> Bool
forall a. Eq a => a -> a -> Bool
== d
y
DimNew d
x == DimCoercion d
y = d
x d -> d -> Bool
forall a. Eq a => a -> a -> Bool
== d
y
DimNew d
x == DimNew d
y = d
x d -> d -> Bool
forall a. Eq a => a -> a -> Bool
== d
y
instance Functor DimChange where
fmap :: forall a b. (a -> b) -> DimChange a -> DimChange b
fmap a -> b
f (DimCoercion a
d) = b -> DimChange b
forall d. d -> DimChange d
DimCoercion (b -> DimChange b) -> b -> DimChange b
forall a b. (a -> b) -> a -> b
$ a -> b
f a
d
fmap a -> b
f (DimNew a
d) = b -> DimChange b
forall d. d -> DimChange d
DimNew (b -> DimChange b) -> b -> DimChange b
forall a b. (a -> b) -> a -> b
$ a -> b
f a
d
instance Foldable DimChange where
foldMap :: forall m a. Monoid m => (a -> m) -> DimChange a -> m
foldMap a -> m
f (DimCoercion a
d) = a -> m
f a
d
foldMap a -> m
f (DimNew a
d) = a -> m
f a
d
instance Traversable DimChange where
traverse :: forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> DimChange a -> f (DimChange b)
traverse a -> f b
f (DimCoercion a
d) = b -> DimChange b
forall d. d -> DimChange d
DimCoercion (b -> DimChange b) -> f b -> f (DimChange b)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> a -> f b
f a
d
traverse a -> f b
f (DimNew a
d) = b -> DimChange b
forall d. d -> DimChange d
DimNew (b -> DimChange b) -> f b -> f (DimChange b)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> a -> f b
f a
d
type ShapeChange d = [DimChange d]
data BasicOp
=
SubExp SubExp
|
Opaque SubExp
|
ArrayLit [SubExp] Type
|
UnOp UnOp SubExp
|
BinOp BinOp SubExp SubExp
|
CmpOp CmpOp SubExp SubExp
|
ConvOp ConvOp SubExp
|
Assert SubExp (ErrorMsg SubExp) (SrcLoc, [SrcLoc])
|
Index VName (Slice SubExp)
|
Update VName (Slice SubExp) SubExp
|
Concat Int VName [VName] SubExp
|
Copy VName
|
Manifest [Int] VName
|
Iota SubExp SubExp SubExp IntType
|
Replicate Shape SubExp
|
Scratch PrimType [SubExp]
|
Reshape (ShapeChange SubExp) VName
|
Rearrange [Int] VName
|
Rotate [SubExp] VName
|
UpdateAcc VName [SubExp] [SubExp]
deriving (BasicOp -> BasicOp -> Bool
(BasicOp -> BasicOp -> Bool)
-> (BasicOp -> BasicOp -> Bool) -> Eq BasicOp
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BasicOp -> BasicOp -> Bool
$c/= :: BasicOp -> BasicOp -> Bool
== :: BasicOp -> BasicOp -> Bool
$c== :: BasicOp -> BasicOp -> Bool
Eq, Eq BasicOp
Eq BasicOp
-> (BasicOp -> BasicOp -> Ordering)
-> (BasicOp -> BasicOp -> Bool)
-> (BasicOp -> BasicOp -> Bool)
-> (BasicOp -> BasicOp -> Bool)
-> (BasicOp -> BasicOp -> Bool)
-> (BasicOp -> BasicOp -> BasicOp)
-> (BasicOp -> BasicOp -> BasicOp)
-> Ord BasicOp
BasicOp -> BasicOp -> Bool
BasicOp -> BasicOp -> Ordering
BasicOp -> BasicOp -> BasicOp
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: BasicOp -> BasicOp -> BasicOp
$cmin :: BasicOp -> BasicOp -> BasicOp
max :: BasicOp -> BasicOp -> BasicOp
$cmax :: BasicOp -> BasicOp -> BasicOp
>= :: BasicOp -> BasicOp -> Bool
$c>= :: BasicOp -> BasicOp -> Bool
> :: BasicOp -> BasicOp -> Bool
$c> :: BasicOp -> BasicOp -> Bool
<= :: BasicOp -> BasicOp -> Bool
$c<= :: BasicOp -> BasicOp -> Bool
< :: BasicOp -> BasicOp -> Bool
$c< :: BasicOp -> BasicOp -> Bool
compare :: BasicOp -> BasicOp -> Ordering
$ccompare :: BasicOp -> BasicOp -> Ordering
Ord, Int -> BasicOp -> ShowS
[BasicOp] -> ShowS
BasicOp -> String
(Int -> BasicOp -> ShowS)
-> (BasicOp -> String) -> ([BasicOp] -> ShowS) -> Show BasicOp
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BasicOp] -> ShowS
$cshowList :: [BasicOp] -> ShowS
show :: BasicOp -> String
$cshow :: BasicOp -> String
showsPrec :: Int -> BasicOp -> ShowS
$cshowsPrec :: Int -> BasicOp -> ShowS
Show)
data ExpT lore
=
BasicOp BasicOp
| Apply Name [(SubExp, Diet)] [RetType lore] (Safety, SrcLoc, [SrcLoc])
| If SubExp (BodyT lore) (BodyT lore) (IfDec (BranchType lore))
|
DoLoop [(FParam lore, SubExp)] [(FParam lore, SubExp)] (LoopForm lore) (BodyT lore)
|
WithAcc [(Shape, [VName], Maybe (Lambda lore, [SubExp]))] (Lambda lore)
| Op (Op lore)
deriving instance Decorations lore => Eq (ExpT lore)
deriving instance Decorations lore => Show (ExpT lore)
deriving instance Decorations lore => Ord (ExpT lore)
data LoopForm lore
= ForLoop VName IntType SubExp [(LParam lore, VName)]
| WhileLoop VName
deriving instance Decorations lore => Eq (LoopForm lore)
deriving instance Decorations lore => Show (LoopForm lore)
deriving instance Decorations lore => Ord (LoopForm lore)
data IfDec rt = IfDec
{ forall rt. IfDec rt -> [rt]
ifReturns :: [rt],
forall rt. IfDec rt -> IfSort
ifSort :: IfSort
}
deriving (IfDec rt -> IfDec rt -> Bool
(IfDec rt -> IfDec rt -> Bool)
-> (IfDec rt -> IfDec rt -> Bool) -> Eq (IfDec rt)
forall rt. Eq rt => IfDec rt -> IfDec rt -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IfDec rt -> IfDec rt -> Bool
$c/= :: forall rt. Eq rt => IfDec rt -> IfDec rt -> Bool
== :: IfDec rt -> IfDec rt -> Bool
$c== :: forall rt. Eq rt => IfDec rt -> IfDec rt -> Bool
Eq, Int -> IfDec rt -> ShowS
[IfDec rt] -> ShowS
IfDec rt -> String
(Int -> IfDec rt -> ShowS)
-> (IfDec rt -> String) -> ([IfDec rt] -> ShowS) -> Show (IfDec rt)
forall rt. Show rt => Int -> IfDec rt -> ShowS
forall rt. Show rt => [IfDec rt] -> ShowS
forall rt. Show rt => IfDec rt -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IfDec rt] -> ShowS
$cshowList :: forall rt. Show rt => [IfDec rt] -> ShowS
show :: IfDec rt -> String
$cshow :: forall rt. Show rt => IfDec rt -> String
showsPrec :: Int -> IfDec rt -> ShowS
$cshowsPrec :: forall rt. Show rt => Int -> IfDec rt -> ShowS
Show, Eq (IfDec rt)
Eq (IfDec rt)
-> (IfDec rt -> IfDec rt -> Ordering)
-> (IfDec rt -> IfDec rt -> Bool)
-> (IfDec rt -> IfDec rt -> Bool)
-> (IfDec rt -> IfDec rt -> Bool)
-> (IfDec rt -> IfDec rt -> Bool)
-> (IfDec rt -> IfDec rt -> IfDec rt)
-> (IfDec rt -> IfDec rt -> IfDec rt)
-> Ord (IfDec rt)
IfDec rt -> IfDec rt -> Bool
IfDec rt -> IfDec rt -> Ordering
IfDec rt -> IfDec rt -> IfDec rt
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
forall {rt}. Ord rt => Eq (IfDec rt)
forall rt. Ord rt => IfDec rt -> IfDec rt -> Bool
forall rt. Ord rt => IfDec rt -> IfDec rt -> Ordering
forall rt. Ord rt => IfDec rt -> IfDec rt -> IfDec rt
min :: IfDec rt -> IfDec rt -> IfDec rt
$cmin :: forall rt. Ord rt => IfDec rt -> IfDec rt -> IfDec rt
max :: IfDec rt -> IfDec rt -> IfDec rt
$cmax :: forall rt. Ord rt => IfDec rt -> IfDec rt -> IfDec rt
>= :: IfDec rt -> IfDec rt -> Bool
$c>= :: forall rt. Ord rt => IfDec rt -> IfDec rt -> Bool
> :: IfDec rt -> IfDec rt -> Bool
$c> :: forall rt. Ord rt => IfDec rt -> IfDec rt -> Bool
<= :: IfDec rt -> IfDec rt -> Bool
$c<= :: forall rt. Ord rt => IfDec rt -> IfDec rt -> Bool
< :: IfDec rt -> IfDec rt -> Bool
$c< :: forall rt. Ord rt => IfDec rt -> IfDec rt -> Bool
compare :: IfDec rt -> IfDec rt -> Ordering
$ccompare :: forall rt. Ord rt => IfDec rt -> IfDec rt -> Ordering
Ord)
data IfSort
=
IfNormal
|
IfFallback
|
IfEquiv
deriving (IfSort -> IfSort -> Bool
(IfSort -> IfSort -> Bool)
-> (IfSort -> IfSort -> Bool) -> Eq IfSort
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IfSort -> IfSort -> Bool
$c/= :: IfSort -> IfSort -> Bool
== :: IfSort -> IfSort -> Bool
$c== :: IfSort -> IfSort -> Bool
Eq, Int -> IfSort -> ShowS
[IfSort] -> ShowS
IfSort -> String
(Int -> IfSort -> ShowS)
-> (IfSort -> String) -> ([IfSort] -> ShowS) -> Show IfSort
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IfSort] -> ShowS
$cshowList :: [IfSort] -> ShowS
show :: IfSort -> String
$cshow :: IfSort -> String
showsPrec :: Int -> IfSort -> ShowS
$cshowsPrec :: Int -> IfSort -> ShowS
Show, Eq IfSort
Eq IfSort
-> (IfSort -> IfSort -> Ordering)
-> (IfSort -> IfSort -> Bool)
-> (IfSort -> IfSort -> Bool)
-> (IfSort -> IfSort -> Bool)
-> (IfSort -> IfSort -> Bool)
-> (IfSort -> IfSort -> IfSort)
-> (IfSort -> IfSort -> IfSort)
-> Ord IfSort
IfSort -> IfSort -> Bool
IfSort -> IfSort -> Ordering
IfSort -> IfSort -> IfSort
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: IfSort -> IfSort -> IfSort
$cmin :: IfSort -> IfSort -> IfSort
max :: IfSort -> IfSort -> IfSort
$cmax :: IfSort -> IfSort -> IfSort
>= :: IfSort -> IfSort -> Bool
$c>= :: IfSort -> IfSort -> Bool
> :: IfSort -> IfSort -> Bool
$c> :: IfSort -> IfSort -> Bool
<= :: IfSort -> IfSort -> Bool
$c<= :: IfSort -> IfSort -> Bool
< :: IfSort -> IfSort -> Bool
$c< :: IfSort -> IfSort -> Bool
compare :: IfSort -> IfSort -> Ordering
$ccompare :: IfSort -> IfSort -> Ordering
Ord)
type Exp = ExpT
data LambdaT lore = Lambda
{ forall lore. LambdaT lore -> [LParam lore]
lambdaParams :: [LParam lore],
forall lore. LambdaT lore -> BodyT lore
lambdaBody :: BodyT lore,
forall lore. LambdaT lore -> [Type]
lambdaReturnType :: [Type]
}
deriving instance Decorations lore => Eq (LambdaT lore)
deriving instance Decorations lore => Show (LambdaT lore)
deriving instance Decorations lore => Ord (LambdaT lore)
type Lambda = LambdaT
type FParam lore = Param (FParamInfo lore)
type LParam lore = Param (LParamInfo lore)
data FunDef lore = FunDef
{
forall lore. FunDef lore -> Maybe EntryPoint
funDefEntryPoint :: Maybe EntryPoint,
forall lore. FunDef lore -> Attrs
funDefAttrs :: Attrs,
forall lore. FunDef lore -> Name
funDefName :: Name,
forall lore. FunDef lore -> [RetType lore]
funDefRetType :: [RetType lore],
forall lore. FunDef lore -> [FParam lore]
funDefParams :: [FParam lore],
forall lore. FunDef lore -> BodyT lore
funDefBody :: BodyT lore
}
deriving instance Decorations lore => Eq (FunDef lore)
deriving instance Decorations lore => Show (FunDef lore)
deriving instance Decorations lore => Ord (FunDef lore)
type EntryPoint = ([EntryPointType], [EntryPointType])
data EntryPointType
=
TypeUnsigned
|
TypeOpaque String Int
|
TypeDirect
deriving (EntryPointType -> EntryPointType -> Bool
(EntryPointType -> EntryPointType -> Bool)
-> (EntryPointType -> EntryPointType -> Bool) -> Eq EntryPointType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EntryPointType -> EntryPointType -> Bool
$c/= :: EntryPointType -> EntryPointType -> Bool
== :: EntryPointType -> EntryPointType -> Bool
$c== :: EntryPointType -> EntryPointType -> Bool
Eq, Int -> EntryPointType -> ShowS
[EntryPointType] -> ShowS
EntryPointType -> String
(Int -> EntryPointType -> ShowS)
-> (EntryPointType -> String)
-> ([EntryPointType] -> ShowS)
-> Show EntryPointType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EntryPointType] -> ShowS
$cshowList :: [EntryPointType] -> ShowS
show :: EntryPointType -> String
$cshow :: EntryPointType -> String
showsPrec :: Int -> EntryPointType -> ShowS
$cshowsPrec :: Int -> EntryPointType -> ShowS
Show, Eq EntryPointType
Eq EntryPointType
-> (EntryPointType -> EntryPointType -> Ordering)
-> (EntryPointType -> EntryPointType -> Bool)
-> (EntryPointType -> EntryPointType -> Bool)
-> (EntryPointType -> EntryPointType -> Bool)
-> (EntryPointType -> EntryPointType -> Bool)
-> (EntryPointType -> EntryPointType -> EntryPointType)
-> (EntryPointType -> EntryPointType -> EntryPointType)
-> Ord EntryPointType
EntryPointType -> EntryPointType -> Bool
EntryPointType -> EntryPointType -> Ordering
EntryPointType -> EntryPointType -> EntryPointType
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: EntryPointType -> EntryPointType -> EntryPointType
$cmin :: EntryPointType -> EntryPointType -> EntryPointType
max :: EntryPointType -> EntryPointType -> EntryPointType
$cmax :: EntryPointType -> EntryPointType -> EntryPointType
>= :: EntryPointType -> EntryPointType -> Bool
$c>= :: EntryPointType -> EntryPointType -> Bool
> :: EntryPointType -> EntryPointType -> Bool
$c> :: EntryPointType -> EntryPointType -> Bool
<= :: EntryPointType -> EntryPointType -> Bool
$c<= :: EntryPointType -> EntryPointType -> Bool
< :: EntryPointType -> EntryPointType -> Bool
$c< :: EntryPointType -> EntryPointType -> Bool
compare :: EntryPointType -> EntryPointType -> Ordering
$ccompare :: EntryPointType -> EntryPointType -> Ordering
Ord)
data Prog lore = Prog
{
forall lore. Prog lore -> Stms lore
progConsts :: Stms lore,
forall lore. Prog lore -> [FunDef lore]
progFuns :: [FunDef lore]
}
deriving (Prog lore -> Prog lore -> Bool
(Prog lore -> Prog lore -> Bool)
-> (Prog lore -> Prog lore -> Bool) -> Eq (Prog lore)
forall lore. Decorations lore => Prog lore -> Prog lore -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Prog lore -> Prog lore -> Bool
$c/= :: forall lore. Decorations lore => Prog lore -> Prog lore -> Bool
== :: Prog lore -> Prog lore -> Bool
$c== :: forall lore. Decorations lore => Prog lore -> Prog lore -> Bool
Eq, Eq (Prog lore)
Eq (Prog lore)
-> (Prog lore -> Prog lore -> Ordering)
-> (Prog lore -> Prog lore -> Bool)
-> (Prog lore -> Prog lore -> Bool)
-> (Prog lore -> Prog lore -> Bool)
-> (Prog lore -> Prog lore -> Bool)
-> (Prog lore -> Prog lore -> Prog lore)
-> (Prog lore -> Prog lore -> Prog lore)
-> Ord (Prog lore)
Prog lore -> Prog lore -> Bool
Prog lore -> Prog lore -> Ordering
Prog lore -> Prog lore -> Prog lore
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
forall lore. Decorations lore => Eq (Prog lore)
forall lore. Decorations lore => Prog lore -> Prog lore -> Bool
forall lore. Decorations lore => Prog lore -> Prog lore -> Ordering
forall lore.
Decorations lore =>
Prog lore -> Prog lore -> Prog lore
min :: Prog lore -> Prog lore -> Prog lore
$cmin :: forall lore.
Decorations lore =>
Prog lore -> Prog lore -> Prog lore
max :: Prog lore -> Prog lore -> Prog lore
$cmax :: forall lore.
Decorations lore =>
Prog lore -> Prog lore -> Prog lore
>= :: Prog lore -> Prog lore -> Bool
$c>= :: forall lore. Decorations lore => Prog lore -> Prog lore -> Bool
> :: Prog lore -> Prog lore -> Bool
$c> :: forall lore. Decorations lore => Prog lore -> Prog lore -> Bool
<= :: Prog lore -> Prog lore -> Bool
$c<= :: forall lore. Decorations lore => Prog lore -> Prog lore -> Bool
< :: Prog lore -> Prog lore -> Bool
$c< :: forall lore. Decorations lore => Prog lore -> Prog lore -> Bool
compare :: Prog lore -> Prog lore -> Ordering
$ccompare :: forall lore. Decorations lore => Prog lore -> Prog lore -> Ordering
Ord, Int -> Prog lore -> ShowS
[Prog lore] -> ShowS
Prog lore -> String
(Int -> Prog lore -> ShowS)
-> (Prog lore -> String)
-> ([Prog lore] -> ShowS)
-> Show (Prog lore)
forall lore. Decorations lore => Int -> Prog lore -> ShowS
forall lore. Decorations lore => [Prog lore] -> ShowS
forall lore. Decorations lore => Prog lore -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Prog lore] -> ShowS
$cshowList :: forall lore. Decorations lore => [Prog lore] -> ShowS
show :: Prog lore -> String
$cshow :: forall lore. Decorations lore => Prog lore -> String
showsPrec :: Int -> Prog lore -> ShowS
$cshowsPrec :: forall lore. Decorations lore => Int -> Prog lore -> ShowS
Show)