Data instance
This commit is contained in:
parent
864b359f44
commit
1f3cc7e4f9
|
@ -113,7 +113,7 @@ data Syntax c
|
||||||
= List (Context c) [Syntax c]
|
= List (Context c) [Syntax c]
|
||||||
| Symbol (Context c) Id
|
| Symbol (Context c) Id
|
||||||
| Literal (Context c) Literal
|
| Literal (Context c) Literal
|
||||||
deriving stock (Generic)
|
deriving stock (Generic,Typeable)
|
||||||
|
|
||||||
|
|
||||||
instance Eq (Syntax c) where
|
instance Eq (Syntax c) where
|
||||||
|
@ -123,7 +123,7 @@ instance Eq (Syntax c) where
|
||||||
(==) _ _ = False
|
(==) _ _ = False
|
||||||
|
|
||||||
deriving instance (Data (Context ())) => Data (Syntax ())
|
deriving instance (Data (Context ())) => Data (Syntax ())
|
||||||
-- deriving instance (Data (Context ())) => Data (Syntax ())
|
deriving instance (Data (Context C)) => Data (Syntax C)
|
||||||
|
|
||||||
instance Pretty (Syntax c) where
|
instance Pretty (Syntax c) where
|
||||||
pretty (Literal _ ast) = pretty ast
|
pretty (Literal _ ast) = pretty ast
|
||||||
|
|
|
@ -20,7 +20,6 @@ import qualified Data.Set as Set
|
||||||
import Prettyprinter
|
import Prettyprinter
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
import Text.InterpolatedString.Perl6 (qc,q)
|
import Text.InterpolatedString.Perl6 (qc,q)
|
||||||
import Control.Monad.Identity
|
|
||||||
import Test.Hspec
|
import Test.Hspec
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue