Commit 8c6a353e authored by Hans-Peter Deifel's avatar Hans-Peter Deifel 🐢
Browse files

parser: Don't expose CoalgebraSpecification type

This type should only be an artifact of the fromJSON machinery.
parent a38eacf3
......@@ -63,7 +63,7 @@ deriving instance Show SomeEncoding
parseSomeEncoding :: SomeRefinementInterface -> Vector Yaml.Value -> Yaml.Parser SomeEncoding
parseSomeEncoding (SRI ri) value = SomeEncoding <$> parse ri value
newtype CoalgebraSpecification = CoalgebraSpecification (Vector SomeEncoding)
newtype CoalgebraSpecification = CoalgebraSpecification { fromCoalg :: Vector SomeEncoding }
deriving (Show)
instance Yaml.FromJSON CoalgebraSpecification where
......@@ -77,5 +77,5 @@ instance Yaml.FromJSON CoalgebraSpecification where
return (CoalgebraSpecification encodings)
decodeCoalgebra :: ByteString -> Either String CoalgebraSpecification
decodeCoalgebra = Yaml.decodeEither
decodeCoalgebra :: ByteString -> Either String (Vector SomeEncoding)
decodeCoalgebra = fmap fromCoalg . Yaml.decodeEither
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