symantic-base-0.2.0.20210731: Commonly useful symantics for Embedded Domain-Specific Languages (EDSL)
Safe HaskellNone
LanguageHaskell2010

Symantic.Data

Synopsis

Type SomeData

data SomeData repr a Source #

Constructors

forall able.(Derivable (Data able repr), Typeable able) => SomeData (Data able repr a) 

Instances

Instances details
(Constantable c repr, Typeable c) => Constantable c (SomeData repr) Source # 
Instance details

Defined in Symantic.Data

Methods

constant :: c -> SomeData repr c Source #

Derivable (SomeData repr) Source # 
Instance details

Defined in Symantic.Data

Methods

derive :: SomeData repr a -> Derived (SomeData repr) a Source #

Maybeable repr => Maybeable (SomeData repr) Source # 
Instance details

Defined in Symantic.Data

Methods

nothing :: SomeData repr (Maybe a) Source #

just :: SomeData repr (a -> Maybe a) Source #

Listable repr => Listable (SomeData repr) Source # 
Instance details

Defined in Symantic.Data

Methods

cons :: SomeData repr (a -> [a] -> [a]) Source #

nil :: SomeData repr [a] Source #

IfThenElseable repr => IfThenElseable (SomeData repr) Source # 
Instance details

Defined in Symantic.Data

Methods

ifThenElse :: SomeData repr Bool -> SomeData repr a -> SomeData repr a -> SomeData repr a Source #

Equalable repr => Equalable (SomeData repr) Source # 
Instance details

Defined in Symantic.Data

Methods

equal :: Eq a => SomeData repr (a -> a -> Bool) Source #

Eitherable repr => Eitherable (SomeData repr) Source # 
Instance details

Defined in Symantic.Data

Methods

left :: SomeData repr (l -> Either l r) Source #

right :: SomeData repr (r -> Either l r) Source #

Anythingable (SomeData repr) Source # 
Instance details

Defined in Symantic.Data

Methods

anything :: SomeData repr a -> SomeData repr a Source #

Abstractable repr => Abstractable (SomeData repr) Source # 
Instance details

Defined in Symantic.Data

Methods

(.@) :: SomeData repr (a -> b) -> SomeData repr a -> SomeData repr b Source #

lam :: (SomeData repr a -> SomeData repr b) -> SomeData repr (a -> b) Source #

lam1 :: (SomeData repr a -> SomeData repr b) -> SomeData repr (a -> b) Source #

const :: SomeData repr (a -> b -> a) Source #

flip :: SomeData repr ((a -> b -> c) -> b -> a -> c) Source #

id :: SomeData repr (a -> a) Source #

(.) :: SomeData repr ((b -> c) -> (a -> b) -> a -> c) Source #

($) :: SomeData repr ((a -> b) -> a -> b) Source #

var :: SomeData repr a -> SomeData repr a Source #

Show (SomeData View a) Source # 
Instance details

Defined in Symantic.View

type Derived (SomeData repr) Source # 
Instance details

Defined in Symantic.Data

type Derived (SomeData repr) = repr

Type Data

data family Data (able :: ReprKind -> Constraint) :: ReprKind -> ReprKind infixr 4 Source #

Instances

Instances details
Constantable c (Data (Constantable c) repr) Source # 
Instance details

Defined in Symantic.Data

Methods

constant :: c -> Data (Constantable c) repr c Source #

Maybeable repr => Derivable (Data Maybeable repr) Source # 
Instance details

Defined in Symantic.Data

Methods

derive :: Data Maybeable repr a -> Derived (Data Maybeable repr) a Source #

Listable repr => Derivable (Data Listable repr) Source # 
Instance details

Defined in Symantic.Data

Methods

derive :: Data Listable repr a -> Derived (Data Listable repr) a Source #

IfThenElseable repr => Derivable (Data IfThenElseable repr) Source # 
Instance details

Defined in Symantic.Data

Equalable repr => Derivable (Data Equalable repr) Source # 
Instance details

Defined in Symantic.Data

Methods

derive :: Data Equalable repr a -> Derived (Data Equalable repr) a Source #

Eitherable repr => Derivable (Data Eitherable repr) Source # 
Instance details

Defined in Symantic.Data

Methods

derive :: Data Eitherable repr a -> Derived (Data Eitherable repr) a Source #

Constantable c repr => Derivable (Data (Constantable c) repr) Source # 
Instance details

Defined in Symantic.Data

Methods

derive :: Data (Constantable c) repr a -> Derived (Data (Constantable c) repr) a Source #

Bottomable repr => Derivable (Data Bottomable repr) Source # 
Instance details

Defined in Symantic.Data

Methods

derive :: Data Bottomable repr a -> Derived (Data Bottomable repr) a Source #

Anythingable repr => Derivable (Data Anythingable repr) Source # 
Instance details

Defined in Symantic.Data

Methods

derive :: Data Anythingable repr a -> Derived (Data Anythingable repr) a Source #

Abstractable repr => Derivable (Data Abstractable repr) Source # 
Instance details

Defined in Symantic.Data

Methods

derive :: Data Abstractable repr a -> Derived (Data Abstractable repr) a Source #

Maybeable (Data Maybeable repr) Source # 
Instance details

Defined in Symantic.Data

Methods

nothing :: Data Maybeable repr (Maybe a) Source #

just :: Data Maybeable repr (a -> Maybe a) Source #

Listable (Data Listable repr) Source # 
Instance details

Defined in Symantic.Data

Methods

cons :: Data Listable repr (a -> [a] -> [a]) Source #

nil :: Data Listable repr [a] Source #

IfThenElseable repr => IfThenElseable (Data IfThenElseable repr) Source # 
Instance details

Defined in Symantic.Data

Equalable (Data Equalable repr) Source # 
Instance details

Defined in Symantic.Data

Methods

equal :: Eq a => Data Equalable repr (a -> a -> Bool) Source #

Eitherable (Data Eitherable repr) Source # 
Instance details

Defined in Symantic.Data

Methods

left :: Data Eitherable repr (l -> Either l r) Source #

right :: Data Eitherable repr (r -> Either l r) Source #

Anythingable (Data Anythingable repr) Source # 
Instance details

Defined in Symantic.Data

Methods

anything :: Data Anythingable repr a -> Data Anythingable repr a Source #

data Data Maybeable repr a Source # 
Instance details

Defined in Symantic.Data

data Data Maybeable repr a where
data Data Listable repr a Source # 
Instance details

Defined in Symantic.Data

data Data Listable repr a where
data Data IfThenElseable repr a Source # 
Instance details

Defined in Symantic.Data

data Data IfThenElseable repr a where
data Data Equalable repr a Source # 
Instance details

Defined in Symantic.Data

data Data Equalable repr a where
data Data Eitherable repr a Source # 
Instance details

Defined in Symantic.Data

data Data Eitherable repr a where
data Data Bottomable repr a Source # 
Instance details

Defined in Symantic.Data

data Data Bottomable repr a where
data Data Anythingable repr a Source # 
Instance details

Defined in Symantic.Data

data Data Anythingable repr a where
data Data Abstractable repr a Source # 
Instance details

Defined in Symantic.Data

data Data Abstractable repr a where
data Data (Constantable c) repr a Source # 
Instance details

Defined in Symantic.Data

data Data (Constantable c) repr a where
type Derived (Data able repr) Source # 
Instance details

Defined in Symantic.Data

type Derived (Data able repr) = repr

pattern Data :: Typeable able => Data able repr a -> SomeData repr a Source #

Convenient utility to pattern-match a SomeData.

unSomeData :: forall able repr a. Typeable able => SomeData repr a -> Maybe (Data able repr a) Source #

(unSomeData c :: Maybe (Data able repr a)) extract the data-constructor from the given SomeData iif. it belongs to the (Data able repr a) data-instance.