{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE Strict #-}
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE TypeFamilies #-}
module Futhark.IR.Syntax
( module Language.Futhark.Core,
pretty,
module Futhark.IR.Rep,
module Futhark.IR.Syntax.Core,
Uniqueness (..),
NoUniqueness (..),
Rank (..),
ArrayShape (..),
Space (..),
TypeBase (..),
Diet (..),
Ident (..),
SubExp (..),
PatElem (..),
Pat (..),
StmAux (..),
Stm (..),
Stms,
SubExpRes (..),
Result,
Body (..),
BasicOp (..),
UnOp (..),
BinOp (..),
CmpOp (..),
ConvOp (..),
OpaqueOp (..),
DimChange (..),
ShapeChange,
WithAccInput,
Exp (..),
LoopForm (..),
IfDec (..),
IfSort (..),
Safety (..),
Lambda (..),
Param (..),
FParam,
LParam,
FunDef (..),
EntryPoint,
EntryParam (..),
EntryPointType (..),
Prog (..),
oneStm,
stmsFromList,
stmsToList,
stmsHead,
subExpRes,
subExpsRes,
varRes,
varsRes,
)
where
import Control.Category
import Data.Foldable
import Data.List.NonEmpty (NonEmpty (..))
import qualified Data.Sequence as Seq
import Data.String
import Data.Traversable (fmapDefault, foldMapDefault)
import Futhark.IR.Rep
import Futhark.IR.Syntax.Core
import Futhark.Util.Pretty (pretty)
import Language.Futhark.Core
import Prelude hiding (id, (.))
newtype Pat dec = Pat {Pat dec -> [PatElem dec]
patElems :: [PatElem dec]}
deriving (Eq (Pat dec)
Eq (Pat dec)
-> (Pat dec -> Pat dec -> Ordering)
-> (Pat dec -> Pat dec -> Bool)
-> (Pat dec -> Pat dec -> Bool)
-> (Pat dec -> Pat dec -> Bool)
-> (Pat dec -> Pat dec -> Bool)
-> (Pat dec -> Pat dec -> Pat dec)
-> (Pat dec -> Pat dec -> Pat dec)
-> Ord (Pat dec)
Pat dec -> Pat dec -> Bool
Pat dec -> Pat dec -> Ordering
Pat dec -> Pat dec -> Pat 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 (Pat dec)
forall dec. Ord dec => Pat dec -> Pat dec -> Bool
forall dec. Ord dec => Pat dec -> Pat dec -> Ordering
forall dec. Ord dec => Pat dec -> Pat dec -> Pat dec
min :: Pat dec -> Pat dec -> Pat dec
$cmin :: forall dec. Ord dec => Pat dec -> Pat dec -> Pat dec
max :: Pat dec -> Pat dec -> Pat dec
$cmax :: forall dec. Ord dec => Pat dec -> Pat dec -> Pat dec
>= :: Pat dec -> Pat dec -> Bool
$c>= :: forall dec. Ord dec => Pat dec -> Pat dec -> Bool
> :: Pat dec -> Pat dec -> Bool
$c> :: forall dec. Ord dec => Pat dec -> Pat dec -> Bool
<= :: Pat dec -> Pat dec -> Bool
$c<= :: forall dec. Ord dec => Pat dec -> Pat dec -> Bool
< :: Pat dec -> Pat dec -> Bool
$c< :: forall dec. Ord dec => Pat dec -> Pat dec -> Bool
compare :: Pat dec -> Pat dec -> Ordering
$ccompare :: forall dec. Ord dec => Pat dec -> Pat dec -> Ordering
$cp1Ord :: forall dec. Ord dec => Eq (Pat dec)
Ord, Int -> Pat dec -> ShowS
[Pat dec] -> ShowS
Pat dec -> String
(Int -> Pat dec -> ShowS)
-> (Pat dec -> String) -> ([Pat dec] -> ShowS) -> Show (Pat dec)
forall dec. Show dec => Int -> Pat dec -> ShowS
forall dec. Show dec => [Pat dec] -> ShowS
forall dec. Show dec => Pat dec -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Pat dec] -> ShowS
$cshowList :: forall dec. Show dec => [Pat dec] -> ShowS
show :: Pat dec -> String
$cshow :: forall dec. Show dec => Pat dec -> String
showsPrec :: Int -> Pat dec -> ShowS
$cshowsPrec :: forall dec. Show dec => Int -> Pat dec -> ShowS
Show, Pat dec -> Pat dec -> Bool
(Pat dec -> Pat dec -> Bool)
-> (Pat dec -> Pat dec -> Bool) -> Eq (Pat dec)
forall dec. Eq dec => Pat dec -> Pat dec -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Pat dec -> Pat dec -> Bool
$c/= :: forall dec. Eq dec => Pat dec -> Pat dec -> Bool
== :: Pat dec -> Pat dec -> Bool
$c== :: forall dec. Eq dec => Pat dec -> Pat dec -> Bool
Eq)
instance Semigroup (Pat dec) where
Pat [PatElem dec]
xs <> :: Pat dec -> Pat dec -> Pat dec
<> Pat [PatElem dec]
ys = [PatElem dec] -> Pat dec
forall dec. [PatElem dec] -> Pat dec
Pat ([PatElem dec]
xs [PatElem dec] -> [PatElem dec] -> [PatElem dec]
forall a. Semigroup a => a -> a -> a
<> [PatElem dec]
ys)
instance Monoid (Pat dec) where
mempty :: Pat dec
mempty = [PatElem dec] -> Pat dec
forall dec. [PatElem dec] -> Pat dec
Pat [PatElem dec]
forall a. Monoid a => a
mempty
instance Functor Pat where
fmap :: (a -> b) -> Pat a -> Pat b
fmap = (a -> b) -> Pat a -> Pat b
forall (t :: * -> *) a b. Traversable t => (a -> b) -> t a -> t b
fmapDefault
instance Foldable Pat where
foldMap :: (a -> m) -> Pat a -> m
foldMap = (a -> m) -> Pat a -> m
forall (t :: * -> *) m a.
(Traversable t, Monoid m) =>
(a -> m) -> t a -> m
foldMapDefault
instance Traversable Pat where
traverse :: (a -> f b) -> Pat a -> f (Pat b)
traverse a -> f b
f (Pat [PatElem a]
xs) =
[PatElem b] -> Pat b
forall dec. [PatElem dec] -> Pat dec
Pat ([PatElem b] -> Pat b) -> f [PatElem b] -> f (Pat b)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (PatElem a -> f (PatElem b)) -> [PatElem a] -> f [PatElem b]
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse ((a -> f b) -> PatElem a -> f (PatElem b)
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse a -> f b
f) [PatElem a]
xs
data StmAux dec = StmAux
{ StmAux dec -> Certs
stmAuxCerts :: !Certs,
StmAux dec -> Attrs
stmAuxAttrs :: Attrs,
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
$cp1Ord :: forall dec. Ord dec => Eq (StmAux dec)
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 Certs
cs1 Attrs
attrs1 dec
dec1 <> :: StmAux dec -> StmAux dec -> StmAux dec
<> StmAux Certs
cs2 Attrs
attrs2 dec
dec2 =
Certs -> Attrs -> dec -> StmAux dec
forall dec. Certs -> Attrs -> dec -> StmAux dec
StmAux (Certs
cs1 Certs -> Certs -> Certs
forall a. Semigroup a => a -> a -> a
<> Certs
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 rep = Let
{
Stm rep -> Pat (LetDec rep)
stmPat :: Pat (LetDec rep),
Stm rep -> StmAux (ExpDec rep)
stmAux :: StmAux (ExpDec rep),
Stm rep -> Exp rep
stmExp :: Exp rep
}
deriving instance RepTypes rep => Ord (Stm rep)
deriving instance RepTypes rep => Show (Stm rep)
deriving instance RepTypes rep => Eq (Stm rep)
type Stms rep = Seq.Seq (Stm rep)
oneStm :: Stm rep -> Stms rep
oneStm :: Stm rep -> Stms rep
oneStm = Stm rep -> Stms rep
forall a. a -> Seq a
Seq.singleton
stmsFromList :: [Stm rep] -> Stms rep
stmsFromList :: [Stm rep] -> Stms rep
stmsFromList = [Stm rep] -> Stms rep
forall a. [a] -> Seq a
Seq.fromList
stmsToList :: Stms rep -> [Stm rep]
stmsToList :: Stms rep -> [Stm rep]
stmsToList = Stms rep -> [Stm rep]
forall (t :: * -> *) a. Foldable t => t a -> [a]
toList
stmsHead :: Stms rep -> Maybe (Stm rep, Stms rep)
stmsHead :: Stms rep -> Maybe (Stm rep, Stms rep)
stmsHead Stms rep
stms = case Stms rep -> ViewL (Stm rep)
forall a. Seq a -> ViewL a
Seq.viewl Stms rep
stms of
Stm rep
stm Seq.:< Stms rep
stms' -> (Stm rep, Stms rep) -> Maybe (Stm rep, Stms rep)
forall a. a -> Maybe a
Just (Stm rep
stm, Stms rep
stms')
ViewL (Stm rep)
Seq.EmptyL -> Maybe (Stm rep, Stms rep)
forall a. Maybe a
Nothing
data SubExpRes = SubExpRes
{ SubExpRes -> Certs
resCerts :: Certs,
SubExpRes -> SubExp
resSubExp :: SubExp
}
deriving (SubExpRes -> SubExpRes -> Bool
(SubExpRes -> SubExpRes -> Bool)
-> (SubExpRes -> SubExpRes -> Bool) -> Eq SubExpRes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SubExpRes -> SubExpRes -> Bool
$c/= :: SubExpRes -> SubExpRes -> Bool
== :: SubExpRes -> SubExpRes -> Bool
$c== :: SubExpRes -> SubExpRes -> Bool
Eq, Eq SubExpRes
Eq SubExpRes
-> (SubExpRes -> SubExpRes -> Ordering)
-> (SubExpRes -> SubExpRes -> Bool)
-> (SubExpRes -> SubExpRes -> Bool)
-> (SubExpRes -> SubExpRes -> Bool)
-> (SubExpRes -> SubExpRes -> Bool)
-> (SubExpRes -> SubExpRes -> SubExpRes)
-> (SubExpRes -> SubExpRes -> SubExpRes)
-> Ord SubExpRes
SubExpRes -> SubExpRes -> Bool
SubExpRes -> SubExpRes -> Ordering
SubExpRes -> SubExpRes -> SubExpRes
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 :: SubExpRes -> SubExpRes -> SubExpRes
$cmin :: SubExpRes -> SubExpRes -> SubExpRes
max :: SubExpRes -> SubExpRes -> SubExpRes
$cmax :: SubExpRes -> SubExpRes -> SubExpRes
>= :: SubExpRes -> SubExpRes -> Bool
$c>= :: SubExpRes -> SubExpRes -> Bool
> :: SubExpRes -> SubExpRes -> Bool
$c> :: SubExpRes -> SubExpRes -> Bool
<= :: SubExpRes -> SubExpRes -> Bool
$c<= :: SubExpRes -> SubExpRes -> Bool
< :: SubExpRes -> SubExpRes -> Bool
$c< :: SubExpRes -> SubExpRes -> Bool
compare :: SubExpRes -> SubExpRes -> Ordering
$ccompare :: SubExpRes -> SubExpRes -> Ordering
$cp1Ord :: Eq SubExpRes
Ord, Int -> SubExpRes -> ShowS
[SubExpRes] -> ShowS
SubExpRes -> String
(Int -> SubExpRes -> ShowS)
-> (SubExpRes -> String)
-> ([SubExpRes] -> ShowS)
-> Show SubExpRes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SubExpRes] -> ShowS
$cshowList :: [SubExpRes] -> ShowS
show :: SubExpRes -> String
$cshow :: SubExpRes -> String
showsPrec :: Int -> SubExpRes -> ShowS
$cshowsPrec :: Int -> SubExpRes -> ShowS
Show)
subExpRes :: SubExp -> SubExpRes
subExpRes :: SubExp -> SubExpRes
subExpRes = Certs -> SubExp -> SubExpRes
SubExpRes Certs
forall a. Monoid a => a
mempty
varRes :: VName -> SubExpRes
varRes :: VName -> SubExpRes
varRes = SubExp -> SubExpRes
subExpRes (SubExp -> SubExpRes) -> (VName -> SubExp) -> VName -> SubExpRes
forall k (cat :: k -> k -> *) (b :: k) (c :: k) (a :: k).
Category cat =>
cat b c -> cat a b -> cat a c
. VName -> SubExp
Var
subExpsRes :: [SubExp] -> Result
subExpsRes :: [SubExp] -> [SubExpRes]
subExpsRes = (SubExp -> SubExpRes) -> [SubExp] -> [SubExpRes]
forall a b. (a -> b) -> [a] -> [b]
map SubExp -> SubExpRes
subExpRes
varsRes :: [VName] -> Result
varsRes :: [VName] -> [SubExpRes]
varsRes = (VName -> SubExpRes) -> [VName] -> [SubExpRes]
forall a b. (a -> b) -> [a] -> [b]
map VName -> SubExpRes
varRes
type Result = [SubExpRes]
data Body rep = Body
{ Body rep -> BodyDec rep
bodyDec :: BodyDec rep,
Body rep -> Stms rep
bodyStms :: Stms rep,
Body rep -> [SubExpRes]
bodyResult :: Result
}
deriving instance RepTypes rep => Ord (Body rep)
deriving instance RepTypes rep => Show (Body rep)
deriving instance RepTypes rep => Eq (Body rep)
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
$cp1Ord :: forall d. Ord d => Eq (DimChange d)
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 :: (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 :: (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 :: (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 OpaqueOp
=
OpaqueNil
|
OpaqueTrace String
deriving (OpaqueOp -> OpaqueOp -> Bool
(OpaqueOp -> OpaqueOp -> Bool)
-> (OpaqueOp -> OpaqueOp -> Bool) -> Eq OpaqueOp
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OpaqueOp -> OpaqueOp -> Bool
$c/= :: OpaqueOp -> OpaqueOp -> Bool
== :: OpaqueOp -> OpaqueOp -> Bool
$c== :: OpaqueOp -> OpaqueOp -> Bool
Eq, Eq OpaqueOp
Eq OpaqueOp
-> (OpaqueOp -> OpaqueOp -> Ordering)
-> (OpaqueOp -> OpaqueOp -> Bool)
-> (OpaqueOp -> OpaqueOp -> Bool)
-> (OpaqueOp -> OpaqueOp -> Bool)
-> (OpaqueOp -> OpaqueOp -> Bool)
-> (OpaqueOp -> OpaqueOp -> OpaqueOp)
-> (OpaqueOp -> OpaqueOp -> OpaqueOp)
-> Ord OpaqueOp
OpaqueOp -> OpaqueOp -> Bool
OpaqueOp -> OpaqueOp -> Ordering
OpaqueOp -> OpaqueOp -> OpaqueOp
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 :: OpaqueOp -> OpaqueOp -> OpaqueOp
$cmin :: OpaqueOp -> OpaqueOp -> OpaqueOp
max :: OpaqueOp -> OpaqueOp -> OpaqueOp
$cmax :: OpaqueOp -> OpaqueOp -> OpaqueOp
>= :: OpaqueOp -> OpaqueOp -> Bool
$c>= :: OpaqueOp -> OpaqueOp -> Bool
> :: OpaqueOp -> OpaqueOp -> Bool
$c> :: OpaqueOp -> OpaqueOp -> Bool
<= :: OpaqueOp -> OpaqueOp -> Bool
$c<= :: OpaqueOp -> OpaqueOp -> Bool
< :: OpaqueOp -> OpaqueOp -> Bool
$c< :: OpaqueOp -> OpaqueOp -> Bool
compare :: OpaqueOp -> OpaqueOp -> Ordering
$ccompare :: OpaqueOp -> OpaqueOp -> Ordering
$cp1Ord :: Eq OpaqueOp
Ord, Int -> OpaqueOp -> ShowS
[OpaqueOp] -> ShowS
OpaqueOp -> String
(Int -> OpaqueOp -> ShowS)
-> (OpaqueOp -> String) -> ([OpaqueOp] -> ShowS) -> Show OpaqueOp
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OpaqueOp] -> ShowS
$cshowList :: [OpaqueOp] -> ShowS
show :: OpaqueOp -> String
$cshow :: OpaqueOp -> String
showsPrec :: Int -> OpaqueOp -> ShowS
$cshowsPrec :: Int -> OpaqueOp -> ShowS
Show)
data BasicOp
=
SubExp SubExp
|
Opaque OpaqueOp 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 Safety VName (Slice SubExp) SubExp
| FlatIndex VName (FlatSlice SubExp)
| FlatUpdate VName (FlatSlice SubExp) VName
|
Concat Int (NonEmpty 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
$cp1Ord :: Eq BasicOp
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)
type WithAccInput rep =
(Shape, [VName], Maybe (Lambda rep, [SubExp]))
data Exp rep
=
BasicOp BasicOp
| Apply Name [(SubExp, Diet)] [RetType rep] (Safety, SrcLoc, [SrcLoc])
| If SubExp (Body rep) (Body rep) (IfDec (BranchType rep))
|
DoLoop [(FParam rep, SubExp)] (LoopForm rep) (Body rep)
|
WithAcc [WithAccInput rep] (Lambda rep)
| Op (Op rep)
deriving instance RepTypes rep => Eq (Exp rep)
deriving instance RepTypes rep => Show (Exp rep)
deriving instance RepTypes rep => Ord (Exp rep)
data LoopForm rep
= ForLoop VName IntType SubExp [(LParam rep, VName)]
| WhileLoop VName
deriving instance RepTypes rep => Eq (LoopForm rep)
deriving instance RepTypes rep => Show (LoopForm rep)
deriving instance RepTypes rep => Ord (LoopForm rep)
data IfDec rt = IfDec
{ IfDec rt -> [rt]
ifReturns :: [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
$cp1Ord :: forall rt. Ord rt => Eq (IfDec rt)
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
$cp1Ord :: Eq IfSort
Ord)
data Lambda rep = Lambda
{ Lambda rep -> [LParam rep]
lambdaParams :: [LParam rep],
Lambda rep -> Body rep
lambdaBody :: Body rep,
Lambda rep -> [Type]
lambdaReturnType :: [Type]
}
deriving instance RepTypes rep => Eq (Lambda rep)
deriving instance RepTypes rep => Show (Lambda rep)
deriving instance RepTypes rep => Ord (Lambda rep)
type FParam rep = Param (FParamInfo rep)
type LParam rep = Param (LParamInfo rep)
data FunDef rep = FunDef
{
FunDef rep -> Maybe EntryPoint
funDefEntryPoint :: Maybe EntryPoint,
FunDef rep -> Attrs
funDefAttrs :: Attrs,
FunDef rep -> Name
funDefName :: Name,
FunDef rep -> [RetType rep]
funDefRetType :: [RetType rep],
FunDef rep -> [FParam rep]
funDefParams :: [FParam rep],
FunDef rep -> Body rep
funDefBody :: Body rep
}
deriving instance RepTypes rep => Eq (FunDef rep)
deriving instance RepTypes rep => Show (FunDef rep)
deriving instance RepTypes rep => Ord (FunDef rep)
data EntryPointType
=
TypeUnsigned Uniqueness
|
TypeOpaque Uniqueness String Int
|
TypeDirect Uniqueness
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
$cp1Ord :: Eq EntryPointType
Ord)
data EntryParam = EntryParam
{ EntryParam -> Name
entryParamName :: Name,
EntryParam -> EntryPointType
entryParamType :: EntryPointType
}
deriving (EntryParam -> EntryParam -> Bool
(EntryParam -> EntryParam -> Bool)
-> (EntryParam -> EntryParam -> Bool) -> Eq EntryParam
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EntryParam -> EntryParam -> Bool
$c/= :: EntryParam -> EntryParam -> Bool
== :: EntryParam -> EntryParam -> Bool
$c== :: EntryParam -> EntryParam -> Bool
Eq, Int -> EntryParam -> ShowS
[EntryParam] -> ShowS
EntryParam -> String
(Int -> EntryParam -> ShowS)
-> (EntryParam -> String)
-> ([EntryParam] -> ShowS)
-> Show EntryParam
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EntryParam] -> ShowS
$cshowList :: [EntryParam] -> ShowS
show :: EntryParam -> String
$cshow :: EntryParam -> String
showsPrec :: Int -> EntryParam -> ShowS
$cshowsPrec :: Int -> EntryParam -> ShowS
Show, Eq EntryParam
Eq EntryParam
-> (EntryParam -> EntryParam -> Ordering)
-> (EntryParam -> EntryParam -> Bool)
-> (EntryParam -> EntryParam -> Bool)
-> (EntryParam -> EntryParam -> Bool)
-> (EntryParam -> EntryParam -> Bool)
-> (EntryParam -> EntryParam -> EntryParam)
-> (EntryParam -> EntryParam -> EntryParam)
-> Ord EntryParam
EntryParam -> EntryParam -> Bool
EntryParam -> EntryParam -> Ordering
EntryParam -> EntryParam -> EntryParam
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 :: EntryParam -> EntryParam -> EntryParam
$cmin :: EntryParam -> EntryParam -> EntryParam
max :: EntryParam -> EntryParam -> EntryParam
$cmax :: EntryParam -> EntryParam -> EntryParam
>= :: EntryParam -> EntryParam -> Bool
$c>= :: EntryParam -> EntryParam -> Bool
> :: EntryParam -> EntryParam -> Bool
$c> :: EntryParam -> EntryParam -> Bool
<= :: EntryParam -> EntryParam -> Bool
$c<= :: EntryParam -> EntryParam -> Bool
< :: EntryParam -> EntryParam -> Bool
$c< :: EntryParam -> EntryParam -> Bool
compare :: EntryParam -> EntryParam -> Ordering
$ccompare :: EntryParam -> EntryParam -> Ordering
$cp1Ord :: Eq EntryParam
Ord)
type EntryPoint = (Name, [EntryParam], [EntryPointType])
data Prog rep = Prog
{
Prog rep -> Stms rep
progConsts :: Stms rep,
Prog rep -> [FunDef rep]
progFuns :: [FunDef rep]
}
deriving (Prog rep -> Prog rep -> Bool
(Prog rep -> Prog rep -> Bool)
-> (Prog rep -> Prog rep -> Bool) -> Eq (Prog rep)
forall rep. RepTypes rep => Prog rep -> Prog rep -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Prog rep -> Prog rep -> Bool
$c/= :: forall rep. RepTypes rep => Prog rep -> Prog rep -> Bool
== :: Prog rep -> Prog rep -> Bool
$c== :: forall rep. RepTypes rep => Prog rep -> Prog rep -> Bool
Eq, Eq (Prog rep)
Eq (Prog rep)
-> (Prog rep -> Prog rep -> Ordering)
-> (Prog rep -> Prog rep -> Bool)
-> (Prog rep -> Prog rep -> Bool)
-> (Prog rep -> Prog rep -> Bool)
-> (Prog rep -> Prog rep -> Bool)
-> (Prog rep -> Prog rep -> Prog rep)
-> (Prog rep -> Prog rep -> Prog rep)
-> Ord (Prog rep)
Prog rep -> Prog rep -> Bool
Prog rep -> Prog rep -> Ordering
Prog rep -> Prog rep -> Prog rep
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 rep. RepTypes rep => Eq (Prog rep)
forall rep. RepTypes rep => Prog rep -> Prog rep -> Bool
forall rep. RepTypes rep => Prog rep -> Prog rep -> Ordering
forall rep. RepTypes rep => Prog rep -> Prog rep -> Prog rep
min :: Prog rep -> Prog rep -> Prog rep
$cmin :: forall rep. RepTypes rep => Prog rep -> Prog rep -> Prog rep
max :: Prog rep -> Prog rep -> Prog rep
$cmax :: forall rep. RepTypes rep => Prog rep -> Prog rep -> Prog rep
>= :: Prog rep -> Prog rep -> Bool
$c>= :: forall rep. RepTypes rep => Prog rep -> Prog rep -> Bool
> :: Prog rep -> Prog rep -> Bool
$c> :: forall rep. RepTypes rep => Prog rep -> Prog rep -> Bool
<= :: Prog rep -> Prog rep -> Bool
$c<= :: forall rep. RepTypes rep => Prog rep -> Prog rep -> Bool
< :: Prog rep -> Prog rep -> Bool
$c< :: forall rep. RepTypes rep => Prog rep -> Prog rep -> Bool
compare :: Prog rep -> Prog rep -> Ordering
$ccompare :: forall rep. RepTypes rep => Prog rep -> Prog rep -> Ordering
$cp1Ord :: forall rep. RepTypes rep => Eq (Prog rep)
Ord, Int -> Prog rep -> ShowS
[Prog rep] -> ShowS
Prog rep -> String
(Int -> Prog rep -> ShowS)
-> (Prog rep -> String) -> ([Prog rep] -> ShowS) -> Show (Prog rep)
forall rep. RepTypes rep => Int -> Prog rep -> ShowS
forall rep. RepTypes rep => [Prog rep] -> ShowS
forall rep. RepTypes rep => Prog rep -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Prog rep] -> ShowS
$cshowList :: forall rep. RepTypes rep => [Prog rep] -> ShowS
show :: Prog rep -> String
$cshow :: forall rep. RepTypes rep => Prog rep -> String
showsPrec :: Int -> Prog rep -> ShowS
$cshowsPrec :: forall rep. RepTypes rep => Int -> Prog rep -> ShowS
Show)