Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- class Abstractable repr where
- (.@) :: repr (a -> b) -> repr a -> repr b
- lam :: (repr a -> repr b) -> repr (a -> b)
- lam1 :: (repr a -> repr b) -> repr (a -> b)
- const :: repr (a -> b -> a)
- flip :: repr ((a -> b -> c) -> b -> a -> c)
- id :: repr (a -> a)
- (.) :: repr ((b -> c) -> (a -> b) -> a -> c)
- ($) :: repr ((a -> b) -> a -> b)
- var :: repr a -> repr a
- class Anythingable repr where
- anything :: repr a -> repr a
- class Bottomable repr where
- bottom :: repr a
- class Constantable c repr where
- constant :: c -> repr c
- bool :: Constantable Bool repr => Bool -> repr Bool
- char :: Constantable Char repr => Char -> repr Char
- unit :: Constantable () repr => repr ()
- class Eitherable repr where
- class Equalable repr where
- (==) :: (Abstractable repr, Equalable repr, Eq a) => repr (a -> a -> Bool)
- class IfThenElseable repr where
- ifThenElse :: repr Bool -> repr a -> repr a -> repr a
- class Listable repr where
- class Maybeable repr where
Class Abstractable
class Abstractable repr where Source #
Nothing
(.@) :: repr (a -> b) -> repr a -> repr b infixl 9 Source #
Application, aka. unabstract.
default (.@) :: FromDerived2 Abstractable repr => repr (a -> b) -> repr a -> repr b Source #
lam :: (repr a -> repr b) -> repr (a -> b) Source #
Lambda term abstraction, in HOAS (Higher-Order Abstract Syntax) style.
default lam :: FromDerived Abstractable repr => Derivable repr => (repr a -> repr b) -> repr (a -> b) Source #
lam1 :: (repr a -> repr b) -> repr (a -> b) Source #
Like lam
but whose argument is used only once,
hence safe to beta-reduce (inline) without duplicating work.
default lam1 :: FromDerived Abstractable repr => Derivable repr => (repr a -> repr b) -> repr (a -> b) Source #
const :: repr (a -> b -> a) Source #
default const :: FromDerived Abstractable repr => repr (a -> b -> a) Source #
flip :: repr ((a -> b -> c) -> b -> a -> c) Source #
default flip :: FromDerived Abstractable repr => repr ((a -> b -> c) -> b -> a -> c) Source #
default id :: FromDerived Abstractable repr => repr (a -> a) Source #
(.) :: repr ((b -> c) -> (a -> b) -> a -> c) infixr 9 Source #
default (.) :: FromDerived Abstractable repr => repr ((b -> c) -> (a -> b) -> a -> c) Source #
($) :: repr ((a -> b) -> a -> b) infixr 0 Source #
default ($) :: FromDerived Abstractable repr => repr ((a -> b) -> a -> b) Source #
var :: repr a -> repr a Source #
default var :: FromDerived1 Abstractable repr => repr a -> repr a Source #
Instances
Abstractable View Source # | |
Defined in Symantic.Typed.View (.@) :: View (a -> b) -> View a -> View b Source # lam :: (View a -> View b) -> View (a -> b) Source # lam1 :: (View a -> View b) -> View (a -> b) Source # const :: View (a -> b -> a) Source # flip :: View ((a -> b -> c) -> b -> a -> c) Source # (.) :: View ((b -> c) -> (a -> b) -> a -> c) Source # | |
Abstractable repr => Abstractable (SomeData repr) Source # | |
Defined in Symantic.Typed.Data (.@) :: 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 # | |
Abstractable repr => Derivable (Data Abstractable repr) Source # | |
Defined in Symantic.Typed.Data derive :: Data Abstractable repr a -> Derived (Data Abstractable repr) a Source # | |
data Data Abstractable repr a Source # | |
Defined in Symantic.Typed.Data data Data Abstractable repr a where
|
Class Anythingable
class Anythingable repr where Source #
Nothing
Instances
Anythingable View Source # | |
Anythingable (SomeData repr) Source # | |
Anythingable repr => Derivable (Data Anythingable repr) Source # | |
Defined in Symantic.Typed.Data derive :: Data Anythingable repr a -> Derived (Data Anythingable repr) a Source # | |
Anythingable (Data Anythingable repr) Source # | |
Defined in Symantic.Typed.Data anything :: Data Anythingable repr a -> Data Anythingable repr a Source # | |
data Data Anythingable repr a Source # | |
Defined in Symantic.Typed.Data data Data Anythingable repr a where
|
Class Bottomable
class Bottomable repr where Source #
Instances
Bottomable View Source # | |
Defined in Symantic.Typed.View | |
Bottomable repr => Derivable (Data Bottomable repr) Source # | |
Defined in Symantic.Typed.Data derive :: Data Bottomable repr a -> Derived (Data Bottomable repr) a Source # | |
data Data Bottomable repr a Source # | |
Defined in Symantic.Typed.Data |
Class Constantable
class Constantable c repr where Source #
Nothing
constant :: c -> repr c Source #
default constant :: FromDerived (Constantable c) repr => c -> repr c Source #
Instances
Show c => Constantable c View Source # | |
Defined in Symantic.Typed.View | |
(Constantable c repr, Typeable c) => Constantable c (SomeData repr) Source # | |
Defined in Symantic.Typed.Data | |
Constantable c (Data (Constantable c) repr) Source # | |
Defined in Symantic.Typed.Data constant :: c -> Data (Constantable c) repr c Source # | |
Constantable c repr => Derivable (Data (Constantable c) repr) Source # | |
Defined in Symantic.Typed.Data derive :: Data (Constantable c) repr a -> Derived (Data (Constantable c) repr) a Source # | |
data Data (Constantable c) repr a Source # | |
Defined in Symantic.Typed.Data data Data (Constantable c) repr a where
|
unit :: Constantable () repr => repr () Source #
Class Eitherable
class Eitherable repr where Source #
Nothing
left :: repr (l -> Either l r) Source #
default left :: FromDerived Eitherable repr => repr (l -> Either l r) Source #
right :: repr (r -> Either l r) Source #
default right :: FromDerived Eitherable repr => repr (r -> Either l r) Source #
Instances
Eitherable View Source # | |
Eitherable repr => Eitherable (SomeData repr) Source # | |
Eitherable repr => Derivable (Data Eitherable repr) Source # | |
Defined in Symantic.Typed.Data derive :: Data Eitherable repr a -> Derived (Data Eitherable repr) a Source # | |
Eitherable (Data Eitherable repr) Source # | |
Defined in Symantic.Typed.Data | |
data Data Eitherable repr a Source # | |
Defined in Symantic.Typed.Data data Data Eitherable repr a where
|
Class Equalable
class Equalable repr where Source #
Nothing
Class IfThenElseable
class IfThenElseable repr where Source #
Nothing
ifThenElse :: repr Bool -> repr a -> repr a -> repr a Source #
default ifThenElse :: FromDerived3 IfThenElseable repr => repr Bool -> repr a -> repr a -> repr a Source #
Instances
IfThenElseable repr => IfThenElseable (SomeData repr) Source # | |
Defined in Symantic.Typed.Data | |
IfThenElseable repr => Derivable (Data IfThenElseable repr) Source # | |
Defined in Symantic.Typed.Data derive :: Data IfThenElseable repr a -> Derived (Data IfThenElseable repr) a Source # | |
IfThenElseable repr => IfThenElseable (Data IfThenElseable repr) Source # | |
Defined in Symantic.Typed.Data ifThenElse :: Data IfThenElseable repr Bool -> Data IfThenElseable repr a -> Data IfThenElseable repr a -> Data IfThenElseable repr a Source # | |
data Data IfThenElseable repr a Source # | |
Defined in Symantic.Typed.Data data Data IfThenElseable repr a where
|
Class Listable
class Listable repr where Source #
Nothing
cons :: repr (a -> [a] -> [a]) Source #
default cons :: FromDerived Listable repr => repr (a -> [a] -> [a]) Source #
default nil :: FromDerived Listable repr => repr [a] Source #