{-# LANGUAGE CPP, GADTs #-}
#if __GLASGOW_HASKELL__ >= 701
{-# LANGUAGE Safe #-}
#endif
module Compiler.Hoopl.Shape {-# DEPRECATED "not ready to migrate to this yet" #-}
where
-- | Used at the type level to indicate an "open" structure with -- a unique, unnamed control-flow edge flowing in or out. -- "Fallthrough" and concatenation are permitted at an open point.
data O-- | Used at the type level to indicate a "closed" structure which-- supports control transfer only through the use of named-- labels---no "fallthrough" is permitted. The number of control-flow-- edges is unconstrained.
data Cdata HalfShape s where
ShapeO :: HalfShape O
ShapeC :: HalfShape C
data Shape e x where
ShapeOO :: Shape O O
ShapeCO :: Shape C O
ShapeOC :: Shape O C
ShapeCC :: Shape C C
class Shapelyn where
shape :: nex -> ShapeexshapeAtEntry :: nex -> HalfShapeeshapeAtExit :: nex -> HalfShapexshapeAtEntry = entryHalfShape.shapeshapeAtExit = exitHalfShape.shapeentryHalfShape :: Shapeex -> HalfShapeeexitHalfShape :: Shapeex -> HalfShapexentryHalfShapeShapeOO = ShapeOentryHalfShapeShapeOC = ShapeOentryHalfShapeShapeCO = ShapeCentryHalfShapeShapeCC = ShapeCexitHalfShapeShapeOO = ShapeOexitHalfShapeShapeOC = ShapeCexitHalfShapeShapeCO = ShapeOexitHalfShapeShapeCC = ShapeC