1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 14:21:31 +03:00

Define the strengthening of a single-member union.

This commit is contained in:
Rob Rix 2017-04-24 13:28:56 -04:00
parent 55934f656b
commit 3dd4d12af8

View File

@ -25,6 +25,11 @@ unwrapU :: (ComonadCofree (Union fs) w, InUnion fs f) => w a -> Maybe (f (w a))
unwrapU = prj . unwrap
strengthen :: Union '[f] a -> f a
strengthen (Here f) = f
strengthen _ = undefined
-- Classes
class InUnion (fs :: [* -> *]) (f :: * -> *) where