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

Commit 70f67c0

Browse files
committed
🔥 the Syntax class.
1 parent 2743895 commit 70f67c0

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

semantic-core/src/Data/Term.hs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
{-# LANGUAGE DeriveTraversable, FlexibleInstances, LambdaCase, MultiParamTypeClasses, QuantifiedConstraints, RankNTypes, ScopedTypeVariables, StandaloneDeriving, TypeOperators, UndecidableInstances #-}
22
module Data.Term
33
( Term(..)
4-
, Syntax(..)
54
) where
65

76
import Control.Effect.Carrier
87
import Control.Monad (ap)
98
import Control.Monad.Module
10-
import Data.Scope
119

1210
data Term sig a
1311
= Var a
@@ -43,18 +41,3 @@ instance RightModule sig => Monad (Term sig) where
4341

4442
instance RightModule sig => Carrier sig (Term sig) where
4543
eff = Term
46-
47-
48-
class (HFunctor sig, forall g . Functor g => Functor (sig g)) => Syntax sig where
49-
foldSyntax :: (forall x y . (x -> m y) -> f x -> n y)
50-
-> (forall a . Incr () (n a) -> m (Incr () (n a)))
51-
-> (a -> m b)
52-
-> sig f a
53-
-> sig n b
54-
55-
instance Syntax (Scope ()) where
56-
foldSyntax go bound free = Scope . go (bound . fmap (go free)) . unScope
57-
58-
instance (Syntax l, Syntax r) => Syntax (l :+: r) where
59-
foldSyntax go bound free (L l) = L (foldSyntax go bound free l)
60-
foldSyntax go bound free (R r) = R (foldSyntax go bound free r)

0 commit comments

Comments
 (0)