Commit 87aa7928 authored by Hans-Peter Deifel's avatar Hans-Peter Deifel
Browse files

Remove old RefinementTypes from Polynomial

parent a720d495
......@@ -18,9 +18,6 @@ module MA.Functors.Polynomial
, Factor(..)
, ConstSet(..)
, Exponent(..)
, SumValue(..)
, ProductValue(..)
, FactorValue(..)
) where
import Data.Foldable
......@@ -148,35 +145,6 @@ parseExplicitExp = L.braces $ do
parseFiniteNatExp :: MonadParser m => m Exponent
parseFiniteNatExp = FiniteNatExp <$> L.decimal
-- Index into coproduct and corresponding product value
data SumValue a = SumValue Int (ProductValue a)
deriving (Eq, Ord, Show, Functor, Generic, NFData)
instance PrettyShow a => PrettyShow (SumValue a) where
prettyShow (SumValue i p) = "inj" <> prettyShow i <> " " <> prettyShow p
data ProductValue a =
ProductValue (Vector (FactorValue a))
deriving (Eq, Ord, Show, Functor, Generic, NFData)
instance PrettyShow a => PrettyShow (ProductValue a) where
prettyShow (ProductValue v) =
"(" <> mconcat (intersperse ", " (map prettyShow (V.toList v))) <> ")"
data FactorValue a
= -- | Index of constant in vector of possible values
ConstValue Int
-- | One placeholder
| IdValue a
-- | Essentially the same as a product of "IdValue"s
| ExponentialValue (Vector a)
deriving (Eq, Ord, Show, Functor, Generic, NFData)
instance PrettyShow a => PrettyShow (FactorValue a) where
prettyShow (ConstValue i) = prettyShow i
prettyShow (IdValue a) = prettyShow a
prettyShow (ExponentialValue v) =
"[" <> mconcat (intersperse ", " (map prettyShow (V.toList v))) <> "]"
-- | Morally the type '3'.
--
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment