module Csound.Typed.Opcode.Strings (
strfromurl, strget, strset,
puts, sprintf, sprintfk, strcat, strcatk, strcmp, strcmpk, strcpy, strcpyk, strindex, strindexk, strlen, strlenk, strrindex, strrindexk, strsub, strsubk,
strchar, strchark, strlower, strlowerk, strtod, strtodk, strtol, strtolk, strupper, strupperk) where
import Control.Monad.Trans.Class
import Csound.Dynamic
import Csound.Typed
strfromurl :: Str -> Str
strfromurl :: Str -> Str
strfromurl Str
b1 = GE E -> Str
Str (GE E -> Str) -> GE E -> Str
forall a b. (a -> b) -> a -> b
$ E -> E
f (E -> E) -> GE E -> GE E
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Str -> GE E
unStr Str
b1
where f :: E -> E
f E
a1 = Name -> Spec1 -> [E] -> E
opcs Name
"strfromurl" [(Rate
Sr,[Rate
Sr])] [E
a1]
strget :: D -> Str
strget :: D -> Str
strget D
b1 = GE E -> Str
Str (GE E -> Str) -> GE E -> Str
forall a b. (a -> b) -> a -> b
$ E -> E
f (E -> E) -> GE E -> GE E
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> D -> GE E
unD D
b1
where f :: E -> E
f E
a1 = Name -> Spec1 -> [E] -> E
opcs Name
"strget" [(Rate
Sr,[Rate
Ir])] [E
a1]
strset :: D -> D -> SE ()
strset :: D -> D -> SE ()
strset D
b1 D
b2 = Dep () -> SE ()
forall a. Dep a -> SE a
SE (Dep () -> SE ()) -> Dep () -> SE ()
forall a b. (a -> b) -> a -> b
$ (E -> Dep ()
forall (m :: * -> *). Monad m => E -> DepT m ()
depT_ (E -> Dep ()) -> DepT GE E -> Dep ()
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<<) (DepT GE E -> Dep ()) -> DepT GE E -> Dep ()
forall a b. (a -> b) -> a -> b
$ GE E -> DepT GE E
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (GE E -> DepT GE E) -> GE E -> DepT GE E
forall a b. (a -> b) -> a -> b
$ E -> E -> E
f (E -> E -> E) -> GE E -> GE (E -> E)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> D -> GE E
unD D
b1 GE (E -> E) -> GE E -> GE E
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> D -> GE E
unD D
b2
where f :: E -> E -> E
f E
a1 E
a2 = Name -> Spec1 -> [E] -> E
opcs Name
"strset" [(Rate
Xr,[Rate
Ir,Rate
Ir])] [E
a1,E
a2]
puts :: Str -> Sig -> SE ()
puts :: Str -> Sig -> SE ()
puts Str
b1 Sig
b2 = Dep () -> SE ()
forall a. Dep a -> SE a
SE (Dep () -> SE ()) -> Dep () -> SE ()
forall a b. (a -> b) -> a -> b
$ (E -> Dep ()
forall (m :: * -> *). Monad m => E -> DepT m ()
depT_ (E -> Dep ()) -> DepT GE E -> Dep ()
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<<) (DepT GE E -> Dep ()) -> DepT GE E -> Dep ()
forall a b. (a -> b) -> a -> b
$ GE E -> DepT GE E
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (GE E -> DepT GE E) -> GE E -> DepT GE E
forall a b. (a -> b) -> a -> b
$ E -> E -> E
f (E -> E -> E) -> GE E -> GE (E -> E)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Str -> GE E
unStr Str
b1 GE (E -> E) -> GE E -> GE E
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Sig -> GE E
unSig Sig
b2
where f :: E -> E -> E
f E
a1 E
a2 = Name -> Spec1 -> [E] -> E
opcs Name
"puts" [(Rate
Xr,[Rate
Sr,Rate
Kr,Rate
Ir])] [E
a1,E
a2]
sprintf :: Str -> Sig -> Str
sprintf :: Str -> Sig -> Str
sprintf Str
b1 Sig
b2 = GE E -> Str
Str (GE E -> Str) -> GE E -> Str
forall a b. (a -> b) -> a -> b
$ E -> E -> E
f (E -> E -> E) -> GE E -> GE (E -> E)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Str -> GE E
unStr Str
b1 GE (E -> E) -> GE E -> GE E
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Sig -> GE E
unSig Sig
b2
where f :: E -> E -> E
f E
a1 E
a2 = Name -> Spec1 -> [E] -> E
opcs Name
"sprintf" [(Rate
Sr,[Rate
Sr] [Rate] -> [Rate] -> [Rate]
forall a. [a] -> [a] -> [a]
++ (Rate -> [Rate]
forall a. a -> [a]
repeat Rate
Xr))] [E
a1,E
a2]
sprintfk :: Str -> Sig -> Str
sprintfk :: Str -> Sig -> Str
sprintfk Str
b1 Sig
b2 = GE E -> Str
Str (GE E -> Str) -> GE E -> Str
forall a b. (a -> b) -> a -> b
$ E -> E -> E
f (E -> E -> E) -> GE E -> GE (E -> E)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Str -> GE E
unStr Str
b1 GE (E -> E) -> GE E -> GE E
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Sig -> GE E
unSig Sig
b2
where f :: E -> E -> E
f E
a1 E
a2 = Name -> Spec1 -> [E] -> E
opcs Name
"sprintfk" [(Rate
Sr,[Rate
Sr] [Rate] -> [Rate] -> [Rate]
forall a. [a] -> [a] -> [a]
++ (Rate -> [Rate]
forall a. a -> [a]
repeat Rate
Xr))] [E
a1,E
a2]
strcat :: Str -> Str -> Str
strcat :: Str -> Str -> Str
strcat Str
b1 Str
b2 = GE E -> Str
Str (GE E -> Str) -> GE E -> Str
forall a b. (a -> b) -> a -> b
$ E -> E -> E
f (E -> E -> E) -> GE E -> GE (E -> E)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Str -> GE E
unStr Str
b1 GE (E -> E) -> GE E -> GE E
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Str -> GE E
unStr Str
b2
where f :: E -> E -> E
f E
a1 E
a2 = Name -> Spec1 -> [E] -> E
opcs Name
"strcat" [(Rate
Sr,[Rate
Sr,Rate
Sr])] [E
a1,E
a2]
strcatk :: Str -> Str -> Str
strcatk :: Str -> Str -> Str
strcatk Str
b1 Str
b2 = GE E -> Str
Str (GE E -> Str) -> GE E -> Str
forall a b. (a -> b) -> a -> b
$ E -> E -> E
f (E -> E -> E) -> GE E -> GE (E -> E)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Str -> GE E
unStr Str
b1 GE (E -> E) -> GE E -> GE E
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Str -> GE E
unStr Str
b2
where f :: E -> E -> E
f E
a1 E
a2 = Name -> Spec1 -> [E] -> E
opcs Name
"strcatk" [(Rate
Sr,[Rate
Sr,Rate
Sr])] [E
a1,E
a2]
strcmp :: Str -> Str -> D
strcmp :: Str -> Str -> D
strcmp Str
b1 Str
b2 = GE E -> D
D (GE E -> D) -> GE E -> D
forall a b. (a -> b) -> a -> b
$ E -> E -> E
f (E -> E -> E) -> GE E -> GE (E -> E)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Str -> GE E
unStr Str
b1 GE (E -> E) -> GE E -> GE E
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Str -> GE E
unStr Str
b2
where f :: E -> E -> E
f E
a1 E
a2 = Name -> Spec1 -> [E] -> E
opcs Name
"strcmp" [(Rate
Ir,[Rate
Sr,Rate
Sr])] [E
a1,E
a2]
strcmpk :: Str -> Str -> Sig
strcmpk :: Str -> Str -> Sig
strcmpk Str
b1 Str
b2 = GE E -> Sig
Sig (GE E -> Sig) -> GE E -> Sig
forall a b. (a -> b) -> a -> b
$ E -> E -> E
f (E -> E -> E) -> GE E -> GE (E -> E)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Str -> GE E
unStr Str
b1 GE (E -> E) -> GE E -> GE E
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Str -> GE E
unStr Str
b2
where f :: E -> E -> E
f E
a1 E
a2 = Name -> Spec1 -> [E] -> E
opcs Name
"strcmpk" [(Rate
Kr,[Rate
Sr,Rate
Sr])] [E
a1,E
a2]
strcpy :: Str -> Str
strcpy :: Str -> Str
strcpy Str
b1 = GE E -> Str
Str (GE E -> Str) -> GE E -> Str
forall a b. (a -> b) -> a -> b
$ E -> E
f (E -> E) -> GE E -> GE E
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Str -> GE E
unStr Str
b1
where f :: E -> E
f E
a1 = Name -> Spec1 -> [E] -> E
opcs Name
"strcpy" [(Rate
Sr,[Rate
Sr])] [E
a1]
strcpyk :: Str -> Str
strcpyk :: Str -> Str
strcpyk Str
b1 = GE E -> Str
Str (GE E -> Str) -> GE E -> Str
forall a b. (a -> b) -> a -> b
$ E -> E
f (E -> E) -> GE E -> GE E
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Str -> GE E
unStr Str
b1
where f :: E -> E
f E
a1 = Name -> Spec1 -> [E] -> E
opcs Name
"strcpyk" [(Rate
Sr,[Rate
Sr])] [E
a1]
strindex :: Str -> Str -> D
strindex :: Str -> Str -> D
strindex Str
b1 Str
b2 = GE E -> D
D (GE E -> D) -> GE E -> D
forall a b. (a -> b) -> a -> b
$ E -> E -> E
f (E -> E -> E) -> GE E -> GE (E -> E)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Str -> GE E
unStr Str
b1 GE (E -> E) -> GE E -> GE E
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Str -> GE E
unStr Str
b2
where f :: E -> E -> E
f E
a1 E
a2 = Name -> Spec1 -> [E] -> E
opcs Name
"strindex" [(Rate
Ir,[Rate
Sr,Rate
Sr])] [E
a1,E
a2]
strindexk :: Str -> Str -> Sig
strindexk :: Str -> Str -> Sig
strindexk Str
b1 Str
b2 = GE E -> Sig
Sig (GE E -> Sig) -> GE E -> Sig
forall a b. (a -> b) -> a -> b
$ E -> E -> E
f (E -> E -> E) -> GE E -> GE (E -> E)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Str -> GE E
unStr Str
b1 GE (E -> E) -> GE E -> GE E
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Str -> GE E
unStr Str
b2
where f :: E -> E -> E
f E
a1 E
a2 = Name -> Spec1 -> [E] -> E
opcs Name
"strindexk" [(Rate
Kr,[Rate
Sr,Rate
Sr])] [E
a1,E
a2]
strlen :: Str -> D
strlen :: Str -> D
strlen Str
b1 = GE E -> D
D (GE E -> D) -> GE E -> D
forall a b. (a -> b) -> a -> b
$ E -> E
f (E -> E) -> GE E -> GE E
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Str -> GE E
unStr Str
b1
where f :: E -> E
f E
a1 = Name -> Spec1 -> [E] -> E
opcs Name
"strlen" [(Rate
Ir,[Rate
Sr])] [E
a1]
strlenk :: Str -> Sig
strlenk :: Str -> Sig
strlenk Str
b1 = GE E -> Sig
Sig (GE E -> Sig) -> GE E -> Sig
forall a b. (a -> b) -> a -> b
$ E -> E
f (E -> E) -> GE E -> GE E
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Str -> GE E
unStr Str
b1
where f :: E -> E
f E
a1 = Name -> Spec1 -> [E] -> E
opcs Name
"strlenk" [(Rate
Kr,[Rate
Sr])] [E
a1]
strrindex :: Str -> Str -> D
strrindex :: Str -> Str -> D
strrindex Str
b1 Str
b2 = GE E -> D
D (GE E -> D) -> GE E -> D
forall a b. (a -> b) -> a -> b
$ E -> E -> E
f (E -> E -> E) -> GE E -> GE (E -> E)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Str -> GE E
unStr Str
b1 GE (E -> E) -> GE E -> GE E
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Str -> GE E
unStr Str
b2
where f :: E -> E -> E
f E
a1 E
a2 = Name -> Spec1 -> [E] -> E
opcs Name
"strrindex" [(Rate
Ir,[Rate
Sr,Rate
Sr])] [E
a1,E
a2]
strrindexk :: Str -> Str -> Sig
strrindexk :: Str -> Str -> Sig
strrindexk Str
b1 Str
b2 = GE E -> Sig
Sig (GE E -> Sig) -> GE E -> Sig
forall a b. (a -> b) -> a -> b
$ E -> E -> E
f (E -> E -> E) -> GE E -> GE (E -> E)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Str -> GE E
unStr Str
b1 GE (E -> E) -> GE E -> GE E
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Str -> GE E
unStr Str
b2
where f :: E -> E -> E
f E
a1 E
a2 = Name -> Spec1 -> [E] -> E
opcs Name
"strrindexk" [(Rate
Kr,[Rate
Sr,Rate
Sr])] [E
a1,E
a2]
strsub :: Str -> Str
strsub :: Str -> Str
strsub Str
b1 = GE E -> Str
Str (GE E -> Str) -> GE E -> Str
forall a b. (a -> b) -> a -> b
$ E -> E
f (E -> E) -> GE E -> GE E
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Str -> GE E
unStr Str
b1
where f :: E -> E
f E
a1 = Name -> Spec1 -> [E] -> E
opcs Name
"strsub" [(Rate
Sr,[Rate
Sr,Rate
Ir,Rate
Ir])] [E
a1]
strsubk :: Str -> Sig -> Sig -> Str
strsubk :: Str -> Sig -> Sig -> Str
strsubk Str
b1 Sig
b2 Sig
b3 = GE E -> Str
Str (GE E -> Str) -> GE E -> Str
forall a b. (a -> b) -> a -> b
$ E -> E -> E -> E
f (E -> E -> E -> E) -> GE E -> GE (E -> E -> E)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Str -> GE E
unStr Str
b1 GE (E -> E -> E) -> GE E -> GE (E -> E)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Sig -> GE E
unSig Sig
b2 GE (E -> E) -> GE E -> GE E
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Sig -> GE E
unSig Sig
b3
where f :: E -> E -> E -> E
f E
a1 E
a2 E
a3 = Name -> Spec1 -> [E] -> E
opcs Name
"strsubk" [(Rate
Sr,[Rate
Sr,Rate
Kr,Rate
Kr])] [E
a1,E
a2,E
a3]
strchar :: Str -> D
strchar :: Str -> D
strchar Str
b1 = GE E -> D
D (GE E -> D) -> GE E -> D
forall a b. (a -> b) -> a -> b
$ E -> E
f (E -> E) -> GE E -> GE E
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Str -> GE E
unStr Str
b1
where f :: E -> E
f E
a1 = Name -> Spec1 -> [E] -> E
opcs Name
"strchar" [(Rate
Ir,[Rate
Sr,Rate
Ir])] [E
a1]
strchark :: Str -> Sig
strchark :: Str -> Sig
strchark Str
b1 = GE E -> Sig
Sig (GE E -> Sig) -> GE E -> Sig
forall a b. (a -> b) -> a -> b
$ E -> E
f (E -> E) -> GE E -> GE E
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Str -> GE E
unStr Str
b1
where f :: E -> E
f E
a1 = Name -> Spec1 -> [E] -> E
opcs Name
"strchark" [(Rate
Kr,[Rate
Sr,Rate
Kr])] [E
a1]
strlower :: Str -> Str
strlower :: Str -> Str
strlower Str
b1 = GE E -> Str
Str (GE E -> Str) -> GE E -> Str
forall a b. (a -> b) -> a -> b
$ E -> E
f (E -> E) -> GE E -> GE E
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Str -> GE E
unStr Str
b1
where f :: E -> E
f E
a1 = Name -> Spec1 -> [E] -> E
opcs Name
"strlower" [(Rate
Sr,[Rate
Sr])] [E
a1]
strlowerk :: Str -> Str
strlowerk :: Str -> Str
strlowerk Str
b1 = GE E -> Str
Str (GE E -> Str) -> GE E -> Str
forall a b. (a -> b) -> a -> b
$ E -> E
f (E -> E) -> GE E -> GE E
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Str -> GE E
unStr Str
b1
where f :: E -> E
f E
a1 = Name -> Spec1 -> [E] -> E
opcs Name
"strlowerk" [(Rate
Sr,[Rate
Sr])] [E
a1]
strtod :: Str -> D
strtod :: Str -> D
strtod Str
b1 = GE E -> D
D (GE E -> D) -> GE E -> D
forall a b. (a -> b) -> a -> b
$ E -> E
f (E -> E) -> GE E -> GE E
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Str -> GE E
unStr Str
b1
where f :: E -> E
f E
a1 = Name -> Spec1 -> [E] -> E
opcs Name
"strtod" [(Rate
Ir,[Rate
Sr]),(Rate
Ir,[Rate
Ir])] [E
a1]
strtodk :: Str -> Sig
strtodk :: Str -> Sig
strtodk Str
b1 = GE E -> Sig
Sig (GE E -> Sig) -> GE E -> Sig
forall a b. (a -> b) -> a -> b
$ E -> E
f (E -> E) -> GE E -> GE E
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Str -> GE E
unStr Str
b1
where f :: E -> E
f E
a1 = Name -> Spec1 -> [E] -> E
opcs Name
"strtodk" [(Rate
Kr,[Rate
Sr]),(Rate
Kr,[Rate
Kr])] [E
a1]
strtol :: Str -> D
strtol :: Str -> D
strtol Str
b1 = GE E -> D
D (GE E -> D) -> GE E -> D
forall a b. (a -> b) -> a -> b
$ E -> E
f (E -> E) -> GE E -> GE E
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Str -> GE E
unStr Str
b1
where f :: E -> E
f E
a1 = Name -> Spec1 -> [E] -> E
opcs Name
"strtol" [(Rate
Ir,[Rate
Sr]),(Rate
Ir,[Rate
Ir])] [E
a1]
strtolk :: Str -> Sig
strtolk :: Str -> Sig
strtolk Str
b1 = GE E -> Sig
Sig (GE E -> Sig) -> GE E -> Sig
forall a b. (a -> b) -> a -> b
$ E -> E
f (E -> E) -> GE E -> GE E
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Str -> GE E
unStr Str
b1
where f :: E -> E
f E
a1 = Name -> Spec1 -> [E] -> E
opcs Name
"strtolk" [(Rate
Kr,[Rate
Sr]),(Rate
Kr,[Rate
Kr])] [E
a1]
strupper :: Str -> Str
strupper :: Str -> Str
strupper Str
b1 = GE E -> Str
Str (GE E -> Str) -> GE E -> Str
forall a b. (a -> b) -> a -> b
$ E -> E
f (E -> E) -> GE E -> GE E
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Str -> GE E
unStr Str
b1
where f :: E -> E
f E
a1 = Name -> Spec1 -> [E] -> E
opcs Name
"strupper" [(Rate
Sr,[Rate
Sr])] [E
a1]
strupperk :: Str -> Str
strupperk :: Str -> Str
strupperk Str
b1 = GE E -> Str
Str (GE E -> Str) -> GE E -> Str
forall a b. (a -> b) -> a -> b
$ E -> E
f (E -> E) -> GE E -> GE E
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Str -> GE E
unStr Str
b1
where f :: E -> E
f E
a1 = Name -> Spec1 -> [E] -> E
opcs Name
"strupperk" [(Rate
Sr,[Rate
Sr])] [E
a1]