Skip to content

Commit

Permalink
Add nominal role annotation for TaggedUnion
Browse files Browse the repository at this point in the history
  • Loading branch information
ysangkok committed Feb 23, 2024
1 parent 7302555 commit bc76b21
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Shrubbery/TaggedUnion.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RoleAnnotations #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
Expand Down Expand Up @@ -40,6 +41,8 @@ import Shrubbery.Union (Union, dissectUnion)
newtype TaggedUnion (taggedTypes :: [Tag])
= TaggedUnion (Union (TaggedTypes taggedTypes))

type role TaggedUnion nominal

instance
( TaggedTypes taggedTypes ~ types
, ShowBranches types
Expand Down

0 comments on commit bc76b21

Please sign in to comment.