From 31ba6be9d88e2069452a9a30dc19ec596cc9bae5 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Tue, 8 Oct 2019 15:40:23 -0400 Subject: [PATCH] Note the custom error message. --- semantic-tags/src/AST/Element.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/semantic-tags/src/AST/Element.hs b/semantic-tags/src/AST/Element.hs index 6500e0724..5779870aa 100644 --- a/semantic-tags/src/AST/Element.hs +++ b/semantic-tags/src/AST/Element.hs @@ -7,7 +7,7 @@ module AST.Element import GHC.Generics ((:+:)(..)) import GHC.TypeLits (ErrorMessage(..), TypeError) --- | Projection of an element out of a tree of sums, particularly suitable for use with highly branching (e.g. balanced) trees. +-- | Projection of an element out of a tree of sums, particularly suitable for use with highly branching (e.g. balanced) trees. This provides custom type errors when the tree is known statically, rather than provided via a constraint passed on to callers. class Element sub sup where -- | Project one element out of a sum type. prj :: sup a -> Maybe (sub a)