Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type family Output (repr :: Type -> Type) :: Type -> Type
- class Trans from to where
- trans :: from a -> to a
- type BiTrans from to = (Trans from to, Trans to from)
- type Liftable repr = Trans (Output repr) repr
- lift :: forall repr a. Liftable repr => Output repr a -> repr a
- unlift :: forall repr a. Trans repr (Output repr) => repr a -> Output repr a
- type Unliftable repr = Trans repr (Output repr)
- class Trans1 from to where
- trans1 :: (from a -> from b) -> to a -> to b
- type Liftable1 repr = Trans1 (Output repr) repr
- lift1 :: forall repr a b. Liftable1 repr => (Output repr a -> Output repr b) -> repr a -> repr b
- class Trans2 from to where
- trans2 :: (from a -> from b -> from c) -> to a -> to b -> to c
- type Liftable2 repr = Trans2 (Output repr) repr
- lift2 :: forall repr a b c. Liftable2 repr => (Output repr a -> Output repr b -> Output repr c) -> repr a -> repr b -> repr c
- class Trans3 from to where
- trans3 :: (from a -> from b -> from c -> from d) -> to a -> to b -> to c -> to d
- type Liftable3 repr = Trans3 (Output repr) repr
- lift3 :: forall repr a b c d. Liftable3 repr => (Output repr a -> Output repr b -> Output repr c -> Output repr d) -> repr a -> repr b -> repr c -> repr d
- newtype Any repr a = Any {
- unAny :: repr a
Type family Output
type family Output (repr :: Type -> Type) :: Type -> Type Source #
Instances
type Output Haskell Source # | |
Defined in Symantic.Parser.Haskell | |
type Output (Any repr) Source # | |
Defined in Symantic.Univariant.Trans | |
type Output (Comb repr) Source # | |
Defined in Symantic.Parser.Grammar.Optimize | |
type Output (CleanDefs _letName repr) Source # | |
Defined in Symantic.Univariant.Letable | |
type Output (ObserveSharing letName repr) Source # | |
Defined in Symantic.Univariant.Letable | |
type Output (OptimizeComb _letName repr) Source # | |
Defined in Symantic.Parser.Grammar.Optimize |
Class Trans
class Trans from to where Source #
A trans
lation from an interpreter (from)
to an interpreter (to)
.
Instances
Class BiTrans
Class Liftable
type Liftable repr = Trans (Output repr) repr Source #
Convenient type class synonym for using Output
Class Unliftable
type Unliftable repr = Trans repr (Output repr) Source #
Convenient type class synonym for using Output
Class Trans1
class Trans1 from to where Source #
Nothing
trans1 :: (from a -> from b) -> to a -> to b Source #
trans1 :: BiTrans from to => (from a -> from b) -> to a -> to b Source #
Instances
Trans1 repr (Any repr) Source # | |
Trans1 repr (CleanDefs letName repr) Source # | |
Trans1 (Any repr) repr Source # | |
Trans1 (Comb repr) (OptimizeComb letName repr) Source # | |
Defined in Symantic.Parser.Grammar.Optimize trans1 :: (Comb repr a -> Comb repr b) -> OptimizeComb letName repr a -> OptimizeComb letName repr b Source # | |
(Letable letName repr, MakeLetName letName, Eq letName, Hashable letName) => Trans1 (CleanDefs letName repr) (ObserveSharing letName repr) Source # | |
Defined in Symantic.Univariant.Letable trans1 :: (CleanDefs letName repr a -> CleanDefs letName repr b) -> ObserveSharing letName repr a -> ObserveSharing letName repr b Source # |
Class Liftable1
type Liftable1 repr = Trans1 (Output repr) repr Source #
Convenient type class synonym for using Output
lift1 :: forall repr a b. Liftable1 repr => (Output repr a -> Output repr b) -> repr a -> repr b Source #
Class Trans2
class Trans2 from to where Source #
Nothing
trans2 :: (from a -> from b -> from c) -> to a -> to b -> to c Source #
trans2 :: BiTrans from to => (from a -> from b -> from c) -> to a -> to b -> to c Source #
Instances
Trans2 repr (Any repr) Source # | |
Trans2 repr (CleanDefs letName repr) Source # | |
Trans2 (Any repr) repr Source # | |
Trans2 (Comb repr) (OptimizeComb letName repr) Source # | |
Defined in Symantic.Parser.Grammar.Optimize trans2 :: (Comb repr a -> Comb repr b -> Comb repr c) -> OptimizeComb letName repr a -> OptimizeComb letName repr b -> OptimizeComb letName repr c Source # | |
(Letable letName repr, MakeLetName letName, Eq letName, Hashable letName) => Trans2 (CleanDefs letName repr) (ObserveSharing letName repr) Source # | |
Defined in Symantic.Univariant.Letable trans2 :: (CleanDefs letName repr a -> CleanDefs letName repr b -> CleanDefs letName repr c) -> ObserveSharing letName repr a -> ObserveSharing letName repr b -> ObserveSharing letName repr c Source # |
Class Liftable2
type Liftable2 repr = Trans2 (Output repr) repr Source #
Convenient type class synonym for using Output
lift2 :: forall repr a b c. Liftable2 repr => (Output repr a -> Output repr b -> Output repr c) -> repr a -> repr b -> repr c Source #
Class Trans3
class Trans3 from to where Source #
Nothing
trans3 :: (from a -> from b -> from c -> from d) -> to a -> to b -> to c -> to d Source #
trans3 :: BiTrans from to => (from a -> from b -> from c -> from d) -> to a -> to b -> to c -> to d Source #
Instances
Trans3 repr (Any repr) Source # | |
Trans3 repr (CleanDefs letName repr) Source # | |
Trans3 (Any repr) repr Source # | |
Trans3 (Comb repr) (OptimizeComb letName repr) Source # | |
Defined in Symantic.Parser.Grammar.Optimize trans3 :: (Comb repr a -> Comb repr b -> Comb repr c -> Comb repr d) -> OptimizeComb letName repr a -> OptimizeComb letName repr b -> OptimizeComb letName repr c -> OptimizeComb letName repr d Source # | |
(Letable letName repr, MakeLetName letName, Eq letName, Hashable letName) => Trans3 (CleanDefs letName repr) (ObserveSharing letName repr) Source # | |
Defined in Symantic.Univariant.Letable trans3 :: (CleanDefs letName repr a -> CleanDefs letName repr b -> CleanDefs letName repr c -> CleanDefs letName repr d) -> ObserveSharing letName repr a -> ObserveSharing letName repr b -> ObserveSharing letName repr c -> ObserveSharing letName repr d Source # |
Class Liftable3
type Liftable3 repr = Trans3 (Output repr) repr Source #
Convenient type class synonym for using Output
lift3 :: forall repr a b c d. Liftable3 repr => (Output repr a -> Output repr b -> Output repr c -> Output repr d) -> repr a -> repr b -> repr c -> repr d Source #
Type Any
A newtype to disambiguate the Trans
instance to any other interpreter when there is also one or more Trans
s to other interpreters with a different interpretation than the generic one.
Instances
Trans3 repr (Any repr) Source # | |
Trans2 repr (Any repr) Source # | |
Trans1 repr (Any repr) Source # | |
Trans repr (Any repr) Source # | |
Defined in Symantic.Univariant.Trans | |
Trans3 (Any repr) repr Source # | |
Trans2 (Any repr) repr Source # | |
Trans1 (Any repr) repr Source # | |
Trans (Any repr) repr Source # | |
Defined in Symantic.Univariant.Trans | |
type Output (Any repr) Source # | |
Defined in Symantic.Univariant.Trans |