diff --git a/semantic-ast/src/AST/Unmarshal.hs b/semantic-ast/src/AST/Unmarshal.hs index 190086c51..169aed615 100644 --- a/semantic-ast/src/AST/Unmarshal.hs +++ b/semantic-ast/src/AST/Unmarshal.hs @@ -220,11 +220,6 @@ class UnmarshalField t where -> [Node] -- ^ nodes -> MatchM (t (f ann)) -instance UnmarshalField Err where - unmarshalField _ _ [] = pure $ Fail "No items provided to unmarshalField." - unmarshalField _ _ [x] = Succeed <$> unmarshalNode x - unmarshalField d f _ = pure $ Fail ("type '" <> d <> "' expected zero or one nodes in field '" <> f <> "' but got multiple") - instance UnmarshalField Maybe where unmarshalField _ _ [] = pure Nothing unmarshalField _ _ [x] = Just <$> unmarshalNode x