mirror of
https://github.com/github/semantic.git
synced 2024-11-28 10:15:55 +03:00
Domain is scope-safe.
This commit is contained in:
parent
40d3e5ece6
commit
24f6159acc
@ -1,13 +1,19 @@
|
||||
{-# LANGUAGE QuantifiedConstraints, StandaloneDeriving #-}
|
||||
module Analysis.Domain
|
||||
( Domain(..)
|
||||
) where
|
||||
|
||||
import Data.Text (Text)
|
||||
import Syntax.Scope
|
||||
|
||||
data Domain name a
|
||||
data Domain name f a
|
||||
= Unit
|
||||
| Bool Bool
|
||||
| String Text
|
||||
| Record [(name, a)]
|
||||
| Lam name a
|
||||
deriving (Eq, Ord, Show)
|
||||
| Record [(name, f a)]
|
||||
| Lam name (Scope () f a)
|
||||
|
||||
deriving instance (Eq name, Eq a, forall a . Eq a => Eq (f a), Monad f) => Eq (Domain name f a)
|
||||
deriving instance (Ord name, Ord a, forall a . Eq a => Eq (f a)
|
||||
, forall a . Ord a => Ord (f a), Monad f) => Ord (Domain name f a)
|
||||
deriving instance (Show name, Show a, forall a . Show a => Show (f a)) => Show (Domain name f a)
|
||||
|
Loading…
Reference in New Issue
Block a user