Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Commit 82cb7e4

Browse files
committed
📝 the Semigroup instance for Term Monotype a.
1 parent 559a7aa commit 82cb7e4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

semantic-core/src/Analysis/Typecheck.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ data Monotype f a
4646
deriving (Foldable, Functor, Generic1, Traversable)
4747

4848
-- FIXME: Union the effects/annotations on the operands.
49+
50+
-- | We derive the 'Semigroup' instance for types to take the second argument. This is equivalent to stating that the type of an imperative sequence of statements is the type of its final statement.
4951
deriving via (Last (Term Monotype a)) instance Semigroup (Term Monotype a)
5052

5153
deriving instance (Eq a, forall a . Eq a => Eq (f a), Monad f) => Eq (Monotype f a)

0 commit comments

Comments
 (0)