{-# LANGUAGE TypeFamilies #-}
module Drasil.GOOL.CodeInfoOO (CodeInfoOO(..)) where
import Drasil.Shared.InterfaceCommon (UnRepr(..), VSBinder, Variable, Value,
SValue, BodySym(..), BlockSym(..), TypeSym(..), TypeElim(..), VariableSym(..),
VariableElim(..), ValueSym(..), Argument(..), Literal(..), MathConstant(..),
VariableValue(..), CommandLineArgs(..), NumericExpression(..),
BooleanExpression(..), Comparison(..), ValueExpression(..),
IndexTranslator(..), Reference(..), Array(..), List(..), ListStatement(..),
Set(..), InternalList(..), EmptyStatement(..), MultiStatement(..),
ValueStatement(..), AssignStatement(..), DeclStatement(..), PrintConsole(..),
ReadConsole(..), FileHandling(..), PrintFile(..), ReadFile(..),
StringStatement(..), FunctionSym, FuncAppStatement(..), CommentStatement(..),
ControlStatement(..), ScopeSym(..), ParameterSym(..), MethodSym(..),
VisibilitySym(..), BinderSym(..))
import Drasil.GOOL.InterfaceGOOL (OOProg, ProgramSym(..), FileSym(..),
ModuleSym(..), ClassSym(..), OOMethodSym(..), OOTypeSym(..), OOVariableSym(..),
SelfSym(..), AttachmentSym(..), StateVarSym(..), OOValueSym, OOVariableValue,
OOValueExpression(..), InternalValueExp(..), OOFunctionSym(..), GetSet(..),
OODeclStatement(..), OOFuncAppStatement(..), ObserverPattern(..),
StrategyPattern(..))
import Drasil.Shared.CodeType (CodeType(Void))
import Drasil.Shared.AST (qualName, td, ScopeData, ScopeTag(..), sd, bindFormD)
import Drasil.Shared.CodeAnalysis (ExceptionType(..))
import Drasil.Shared.Helpers (toCode, toState)
import Drasil.Shared.State (GOOLState, MS, VS, lensGStoFS, lensFStoCS,
lensFStoMS, lensCStoMS, lensMStoVS, lensVStoFS, lensCStoFS, modifyReturn,
setClassName, getClassName, setModuleName, getModuleName, addClass,
updateClassMap, addException, updateMethodExcMap, updateCallMap, addCall,
callMapTransClosure, updateMEMWithCalls)
import Control.Monad.State (State, modify)
import qualified Control.Monad.State as S (get)
import Control.Lens.Zoom (zoom)
import Data.Maybe (fromMaybe)
import Text.PrettyPrint.HughesPJ (empty)
newtype CodeInfoOO a = CI {forall a. CodeInfoOO a -> a
unCI :: a} deriving CodeInfoOO a -> CodeInfoOO a -> Bool
(CodeInfoOO a -> CodeInfoOO a -> Bool)
-> (CodeInfoOO a -> CodeInfoOO a -> Bool) -> Eq (CodeInfoOO a)
forall a. Eq a => CodeInfoOO a -> CodeInfoOO a -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: forall a. Eq a => CodeInfoOO a -> CodeInfoOO a -> Bool
== :: CodeInfoOO a -> CodeInfoOO a -> Bool
$c/= :: forall a. Eq a => CodeInfoOO a -> CodeInfoOO a -> Bool
/= :: CodeInfoOO a -> CodeInfoOO a -> Bool
Eq
instance Functor CodeInfoOO where
fmap :: forall a b. (a -> b) -> CodeInfoOO a -> CodeInfoOO b
fmap a -> b
f (CI a
x) = b -> CodeInfoOO b
forall a. a -> CodeInfoOO a
CI (a -> b
f a
x)
instance Applicative CodeInfoOO where
pure :: forall a. a -> CodeInfoOO a
pure = a -> CodeInfoOO a
forall a. a -> CodeInfoOO a
CI
(CI a -> b
f) <*> :: forall a b. CodeInfoOO (a -> b) -> CodeInfoOO a -> CodeInfoOO b
<*> (CI a
x) = b -> CodeInfoOO b
forall a. a -> CodeInfoOO a
CI (a -> b
f a
x)
instance Monad CodeInfoOO where
CI a
x >>= :: forall a b. CodeInfoOO a -> (a -> CodeInfoOO b) -> CodeInfoOO b
>>= a -> CodeInfoOO b
f = a -> CodeInfoOO b
f a
x
instance OOProg CodeInfoOO () () () () () GOOLState () () () ()
instance UnRepr CodeInfoOO contents where
unRepr :: CodeInfoOO contents -> contents
unRepr = CodeInfoOO contents -> contents
forall a. CodeInfoOO a -> a
unCI
instance ProgramSym CodeInfoOO GOOLState () where
prog :: String
-> String -> [FS (CodeInfoOO ())] -> GSProgram CodeInfoOO GOOLState
prog String
_ String
_ [FS (CodeInfoOO ())]
fs = do
(FS (CodeInfoOO ()) -> StateT GOOLState Identity (CodeInfoOO ()))
-> [FS (CodeInfoOO ())] -> StateT GOOLState Identity ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ (LensLike'
(Zoomed (StateT FileState Identity) (CodeInfoOO ()))
GOOLState
FileState
-> FS (CodeInfoOO ()) -> StateT GOOLState Identity (CodeInfoOO ())
forall c.
LensLike'
(Zoomed (StateT FileState Identity) c) GOOLState FileState
-> StateT FileState Identity c -> StateT GOOLState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT FileState Identity) (CodeInfoOO ()))
GOOLState
FileState
(FileState -> Focusing Identity (CodeInfoOO ()) FileState)
-> GOOLState -> Focusing Identity (CodeInfoOO ()) GOOLState
Lens' GOOLState FileState
lensGStoFS) [FS (CodeInfoOO ())]
fs
(GOOLState -> GOOLState) -> StateT GOOLState Identity ()
forall s (m :: * -> *). MonadState s m => (s -> s) -> m ()
modify (GOOLState -> GOOLState
updateMEMWithCalls (GOOLState -> GOOLState)
-> (GOOLState -> GOOLState) -> GOOLState -> GOOLState
forall b c a. (b -> c) -> (a -> b) -> a -> c
. GOOLState -> GOOLState
callMapTransClosure)
s <- StateT GOOLState Identity GOOLState
forall s (m :: * -> *). MonadState s m => m s
S.get
toState $ toCode s
instance FileSym CodeInfoOO () () where
fileDoc :: FS (CodeInfoOO ()) -> FS (CodeInfoOO ())
fileDoc FS (CodeInfoOO ())
m = do
_ <- FS (CodeInfoOO ())
m
return $ return $ error "[fileDoc] The return value of this isn't used, and the thunk shouldn't fire."
docMod :: String
-> String
-> [String]
-> String
-> FS (CodeInfoOO ())
-> FS (CodeInfoOO ())
docMod String
_ String
_ [String]
_ String
_ FS (CodeInfoOO ())
fl = do
_ <- FS (CodeInfoOO ())
fl
return $ return $ error "[docMod] The return value of this isn't used, and the thunk shouldn't fire."
instance AttachmentSym CodeInfoOO () where
classLevel :: CodeInfoOO ()
classLevel = () -> CodeInfoOO ()
forall (r :: * -> *) a. Monad r => a -> r a
toCode ()
instanceLevel :: CodeInfoOO ()
instanceLevel = () -> CodeInfoOO ()
forall (r :: * -> *) a. Monad r => a -> r a
toCode ()
instance BodySym CodeInfoOO () () where
body :: [MS (CodeInfoOO ())] -> MS (CodeInfoOO ())
body [MS (CodeInfoOO ())]
b = do
[MS (CodeInfoOO ())] -> StateT MethodState Identity ()
forall (t :: * -> *) (m :: * -> *) a.
(Foldable t, Monad m) =>
t (m a) -> m ()
sequence_ [MS (CodeInfoOO ())]
b
CodeInfoOO () -> MS (CodeInfoOO ())
forall a. a -> StateT MethodState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO () -> MS (CodeInfoOO ()))
-> CodeInfoOO () -> MS (CodeInfoOO ())
forall a b. (a -> b) -> a -> b
$ () -> CodeInfoOO ()
forall a. a -> CodeInfoOO a
forall (m :: * -> *) a. Monad m => a -> m a
return (() -> CodeInfoOO ()) -> () -> CodeInfoOO ()
forall a b. (a -> b) -> a -> b
$ String -> ()
forall a. HasCallStack => String -> a
error String
"[body] The return value of this isn't used, and the thunk shouldn't fire."
addComments :: String -> MS (CodeInfoOO ()) -> MS (CodeInfoOO ())
addComments String
_ MS (CodeInfoOO ())
_ = CodeInfoOO () -> MS (CodeInfoOO ())
forall a. a -> StateT MethodState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO () -> MS (CodeInfoOO ()))
-> CodeInfoOO () -> MS (CodeInfoOO ())
forall a b. (a -> b) -> a -> b
$ () -> CodeInfoOO ()
forall a. a -> CodeInfoOO a
forall (m :: * -> *) a. Monad m => a -> m a
return (() -> CodeInfoOO ()) -> () -> CodeInfoOO ()
forall a b. (a -> b) -> a -> b
$ String -> ()
forall a. HasCallStack => String -> a
error String
"[addComments] The return value of this isn't used, and the thunk shouldn't fire."
instance BlockSym CodeInfoOO () () where
block :: [MS (CodeInfoOO ())] -> MS (CodeInfoOO ())
block [MS (CodeInfoOO ())]
b = do
[MS (CodeInfoOO ())] -> StateT MethodState Identity ()
forall (t :: * -> *) (m :: * -> *) a.
(Foldable t, Monad m) =>
t (m a) -> m ()
sequence_ [MS (CodeInfoOO ())]
b
CodeInfoOO () -> MS (CodeInfoOO ())
forall a. a -> StateT MethodState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO () -> MS (CodeInfoOO ()))
-> CodeInfoOO () -> MS (CodeInfoOO ())
forall a b. (a -> b) -> a -> b
$ () -> CodeInfoOO ()
forall a. a -> CodeInfoOO a
forall (m :: * -> *) a. Monad m => a -> m a
return (() -> CodeInfoOO ()) -> () -> CodeInfoOO ()
forall a b. (a -> b) -> a -> b
$ String -> ()
forall a. HasCallStack => String -> a
error String
"[block] The return value of this isn't used, and the thunk shouldn't fire."
instance TypeSym CodeInfoOO where
bool :: VS (CodeInfoOO TypeData)
bool = CodeInfoOO TypeData -> VS (CodeInfoOO TypeData)
forall a. a -> StateT ValueState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO TypeData -> VS (CodeInfoOO TypeData))
-> CodeInfoOO TypeData -> VS (CodeInfoOO TypeData)
forall a b. (a -> b) -> a -> b
$ TypeData -> CodeInfoOO TypeData
forall a. a -> CodeInfoOO a
forall (m :: * -> *) a. Monad m => a -> m a
return (TypeData -> CodeInfoOO TypeData)
-> TypeData -> CodeInfoOO TypeData
forall a b. (a -> b) -> a -> b
$ String -> TypeData
forall a. HasCallStack => String -> a
error String
"[bool] The return value of this isn't used, and the thunk shouldn't fire."
int :: VS (CodeInfoOO TypeData)
int = CodeInfoOO TypeData -> VS (CodeInfoOO TypeData)
forall a. a -> StateT ValueState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO TypeData -> VS (CodeInfoOO TypeData))
-> CodeInfoOO TypeData -> VS (CodeInfoOO TypeData)
forall a b. (a -> b) -> a -> b
$ TypeData -> CodeInfoOO TypeData
forall a. a -> CodeInfoOO a
forall (m :: * -> *) a. Monad m => a -> m a
return (TypeData -> CodeInfoOO TypeData)
-> TypeData -> CodeInfoOO TypeData
forall a b. (a -> b) -> a -> b
$ String -> TypeData
forall a. HasCallStack => String -> a
error String
"[int] The return value of this isn't used, and the thunk shouldn't fire."
float :: VS (CodeInfoOO TypeData)
float = CodeInfoOO TypeData -> VS (CodeInfoOO TypeData)
forall a. a -> StateT ValueState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO TypeData -> VS (CodeInfoOO TypeData))
-> CodeInfoOO TypeData -> VS (CodeInfoOO TypeData)
forall a b. (a -> b) -> a -> b
$ TypeData -> CodeInfoOO TypeData
forall a. a -> CodeInfoOO a
forall (m :: * -> *) a. Monad m => a -> m a
return (TypeData -> CodeInfoOO TypeData)
-> TypeData -> CodeInfoOO TypeData
forall a b. (a -> b) -> a -> b
$ String -> TypeData
forall a. HasCallStack => String -> a
error String
"[float] The return value of this isn't used, and the thunk shouldn't fire."
double :: VS (CodeInfoOO TypeData)
double = CodeInfoOO TypeData -> VS (CodeInfoOO TypeData)
forall a. a -> StateT ValueState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO TypeData -> VS (CodeInfoOO TypeData))
-> CodeInfoOO TypeData -> VS (CodeInfoOO TypeData)
forall a b. (a -> b) -> a -> b
$ TypeData -> CodeInfoOO TypeData
forall a. a -> CodeInfoOO a
forall (m :: * -> *) a. Monad m => a -> m a
return (TypeData -> CodeInfoOO TypeData)
-> TypeData -> CodeInfoOO TypeData
forall a b. (a -> b) -> a -> b
$ String -> TypeData
forall a. HasCallStack => String -> a
error String
"[double] The return value of this isn't used, and the thunk shouldn't fire."
char :: VS (CodeInfoOO TypeData)
char = CodeInfoOO TypeData -> VS (CodeInfoOO TypeData)
forall a. a -> StateT ValueState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO TypeData -> VS (CodeInfoOO TypeData))
-> CodeInfoOO TypeData -> VS (CodeInfoOO TypeData)
forall a b. (a -> b) -> a -> b
$ TypeData -> CodeInfoOO TypeData
forall a. a -> CodeInfoOO a
forall (m :: * -> *) a. Monad m => a -> m a
return (TypeData -> CodeInfoOO TypeData)
-> TypeData -> CodeInfoOO TypeData
forall a b. (a -> b) -> a -> b
$ String -> TypeData
forall a. HasCallStack => String -> a
error String
"[char] The return value of this isn't used, and the thunk shouldn't fire."
string :: VS (CodeInfoOO TypeData)
string = CodeInfoOO TypeData -> VS (CodeInfoOO TypeData)
forall a. a -> StateT ValueState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO TypeData -> VS (CodeInfoOO TypeData))
-> CodeInfoOO TypeData -> VS (CodeInfoOO TypeData)
forall a b. (a -> b) -> a -> b
$ TypeData -> CodeInfoOO TypeData
forall a. a -> CodeInfoOO a
forall (m :: * -> *) a. Monad m => a -> m a
return (TypeData -> CodeInfoOO TypeData)
-> TypeData -> CodeInfoOO TypeData
forall a b. (a -> b) -> a -> b
$ String -> TypeData
forall a. HasCallStack => String -> a
error String
"[string] The return value of this isn't used, and the thunk shouldn't fire."
infile :: VS (CodeInfoOO TypeData)
infile = CodeInfoOO TypeData -> VS (CodeInfoOO TypeData)
forall a. a -> StateT ValueState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO TypeData -> VS (CodeInfoOO TypeData))
-> CodeInfoOO TypeData -> VS (CodeInfoOO TypeData)
forall a b. (a -> b) -> a -> b
$ TypeData -> CodeInfoOO TypeData
forall a. a -> CodeInfoOO a
forall (m :: * -> *) a. Monad m => a -> m a
return (TypeData -> CodeInfoOO TypeData)
-> TypeData -> CodeInfoOO TypeData
forall a b. (a -> b) -> a -> b
$ String -> TypeData
forall a. HasCallStack => String -> a
error String
"[infile] The return value of this isn't used, and the thunk shouldn't fire."
outfile :: VS (CodeInfoOO TypeData)
outfile = CodeInfoOO TypeData -> VS (CodeInfoOO TypeData)
forall a. a -> StateT ValueState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO TypeData -> VS (CodeInfoOO TypeData))
-> CodeInfoOO TypeData -> VS (CodeInfoOO TypeData)
forall a b. (a -> b) -> a -> b
$ TypeData -> CodeInfoOO TypeData
forall a. a -> CodeInfoOO a
forall (m :: * -> *) a. Monad m => a -> m a
return (TypeData -> CodeInfoOO TypeData)
-> TypeData -> CodeInfoOO TypeData
forall a b. (a -> b) -> a -> b
$ String -> TypeData
forall a. HasCallStack => String -> a
error String
"[outfile] The return value of this isn't used, and the thunk shouldn't fire."
referenceType :: VS (CodeInfoOO TypeData) -> VS (CodeInfoOO TypeData)
referenceType VS (CodeInfoOO TypeData)
_ = CodeInfoOO TypeData -> VS (CodeInfoOO TypeData)
forall a. a -> StateT ValueState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO TypeData -> VS (CodeInfoOO TypeData))
-> CodeInfoOO TypeData -> VS (CodeInfoOO TypeData)
forall a b. (a -> b) -> a -> b
$ TypeData -> CodeInfoOO TypeData
forall a. a -> CodeInfoOO a
forall (m :: * -> *) a. Monad m => a -> m a
return (TypeData -> CodeInfoOO TypeData)
-> TypeData -> CodeInfoOO TypeData
forall a b. (a -> b) -> a -> b
$ String -> TypeData
forall a. HasCallStack => String -> a
error String
"[referenceType] The return value of this isn't used, and the thunk shouldn't fire."
setType :: VS (CodeInfoOO TypeData) -> VS (CodeInfoOO TypeData)
setType VS (CodeInfoOO TypeData)
_ = CodeInfoOO TypeData -> VS (CodeInfoOO TypeData)
forall a. a -> StateT ValueState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO TypeData -> VS (CodeInfoOO TypeData))
-> CodeInfoOO TypeData -> VS (CodeInfoOO TypeData)
forall a b. (a -> b) -> a -> b
$ TypeData -> CodeInfoOO TypeData
forall a. a -> CodeInfoOO a
forall (m :: * -> *) a. Monad m => a -> m a
return (TypeData -> CodeInfoOO TypeData)
-> TypeData -> CodeInfoOO TypeData
forall a b. (a -> b) -> a -> b
$ String -> TypeData
forall a. HasCallStack => String -> a
error String
"[setType] The return value of this isn't used, and the thunk shouldn't fire."
listType :: VS (CodeInfoOO TypeData) -> VS (CodeInfoOO TypeData)
listType VS (CodeInfoOO TypeData)
_ = CodeInfoOO TypeData -> VS (CodeInfoOO TypeData)
forall a. a -> StateT ValueState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO TypeData -> VS (CodeInfoOO TypeData))
-> CodeInfoOO TypeData -> VS (CodeInfoOO TypeData)
forall a b. (a -> b) -> a -> b
$ TypeData -> CodeInfoOO TypeData
forall a. a -> CodeInfoOO a
forall (m :: * -> *) a. Monad m => a -> m a
return (TypeData -> CodeInfoOO TypeData)
-> TypeData -> CodeInfoOO TypeData
forall a b. (a -> b) -> a -> b
$ String -> TypeData
forall a. HasCallStack => String -> a
error String
"[listType] The return value of this isn't used, and the thunk shouldn't fire."
arrayType :: VS (CodeInfoOO TypeData) -> VS (CodeInfoOO TypeData)
arrayType VS (CodeInfoOO TypeData)
_ = CodeInfoOO TypeData -> VS (CodeInfoOO TypeData)
forall a. a -> StateT ValueState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO TypeData -> VS (CodeInfoOO TypeData))
-> CodeInfoOO TypeData -> VS (CodeInfoOO TypeData)
forall a b. (a -> b) -> a -> b
$ TypeData -> CodeInfoOO TypeData
forall a. a -> CodeInfoOO a
forall (m :: * -> *) a. Monad m => a -> m a
return (TypeData -> CodeInfoOO TypeData)
-> TypeData -> CodeInfoOO TypeData
forall a b. (a -> b) -> a -> b
$ String -> TypeData
forall a. HasCallStack => String -> a
error String
"[arrayType] The return value of this isn't used, and the thunk shouldn't fire."
innerType :: VS (CodeInfoOO TypeData) -> VS (CodeInfoOO TypeData)
innerType VS (CodeInfoOO TypeData)
_ = CodeInfoOO TypeData -> VS (CodeInfoOO TypeData)
forall a. a -> StateT ValueState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO TypeData -> VS (CodeInfoOO TypeData))
-> CodeInfoOO TypeData -> VS (CodeInfoOO TypeData)
forall a b. (a -> b) -> a -> b
$ TypeData -> CodeInfoOO TypeData
forall a. a -> CodeInfoOO a
forall (m :: * -> *) a. Monad m => a -> m a
return (TypeData -> CodeInfoOO TypeData)
-> TypeData -> CodeInfoOO TypeData
forall a b. (a -> b) -> a -> b
$ String -> TypeData
forall a. HasCallStack => String -> a
error String
"[innerType] The return value of this isn't used, and the thunk shouldn't fire."
funcType :: [VS (CodeInfoOO TypeData)]
-> VS (CodeInfoOO TypeData) -> VS (CodeInfoOO TypeData)
funcType [VS (CodeInfoOO TypeData)]
_ VS (CodeInfoOO TypeData)
_ = CodeInfoOO TypeData -> VS (CodeInfoOO TypeData)
forall a. a -> StateT ValueState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO TypeData -> VS (CodeInfoOO TypeData))
-> CodeInfoOO TypeData -> VS (CodeInfoOO TypeData)
forall a b. (a -> b) -> a -> b
$ TypeData -> CodeInfoOO TypeData
forall a. a -> CodeInfoOO a
forall (m :: * -> *) a. Monad m => a -> m a
return (TypeData -> CodeInfoOO TypeData)
-> TypeData -> CodeInfoOO TypeData
forall a b. (a -> b) -> a -> b
$ String -> TypeData
forall a. HasCallStack => String -> a
error String
"[funcType] The return value of this isn't used, and the thunk shouldn't fire."
void :: VS (CodeInfoOO TypeData)
void = CodeInfoOO TypeData -> VS (CodeInfoOO TypeData)
forall a. a -> StateT ValueState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO TypeData -> VS (CodeInfoOO TypeData))
-> CodeInfoOO TypeData -> VS (CodeInfoOO TypeData)
forall a b. (a -> b) -> a -> b
$ TypeData -> CodeInfoOO TypeData
forall a. a -> CodeInfoOO a
forall (m :: * -> *) a. Monad m => a -> m a
return (TypeData -> CodeInfoOO TypeData)
-> TypeData -> CodeInfoOO TypeData
forall a b. (a -> b) -> a -> b
$ String -> TypeData
forall a. HasCallStack => String -> a
error String
"[void] The return value of this isn't used, and the thunk shouldn't fire."
instance OOTypeSym CodeInfoOO where
obj :: String -> VS (CodeInfoOO TypeData)
obj String
_ = CodeInfoOO TypeData -> VS (CodeInfoOO TypeData)
forall a. a -> StateT ValueState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO TypeData -> VS (CodeInfoOO TypeData))
-> CodeInfoOO TypeData -> VS (CodeInfoOO TypeData)
forall a b. (a -> b) -> a -> b
$ TypeData -> CodeInfoOO TypeData
forall a. a -> CodeInfoOO a
forall (m :: * -> *) a. Monad m => a -> m a
return (TypeData -> CodeInfoOO TypeData)
-> TypeData -> CodeInfoOO TypeData
forall a b. (a -> b) -> a -> b
$ String -> TypeData
forall a. HasCallStack => String -> a
error String
"[obj] The return value of this isn't used, and the thunk shouldn't fire."
instance TypeElim CodeInfoOO where
getCodeType :: CodeInfoOO TypeData -> CodeType
getCodeType CodeInfoOO TypeData
_ = CodeType
Void
instance ScopeSym CodeInfoOO where
global :: CodeInfoOO ScopeData
global = CodeInfoOO ScopeData
noInfoScope
mainFn :: CodeInfoOO ScopeData
mainFn = CodeInfoOO ScopeData
noInfoScope
local :: CodeInfoOO ScopeData
local = CodeInfoOO ScopeData
noInfoScope
instance VariableSym CodeInfoOO where
var :: String -> VS (CodeInfoOO TypeData) -> SVariable CodeInfoOO
var String
_ VS (CodeInfoOO TypeData)
_ = CodeInfoOO Variable -> SVariable CodeInfoOO
forall a. a -> StateT ValueState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO Variable -> SVariable CodeInfoOO)
-> CodeInfoOO Variable -> SVariable CodeInfoOO
forall a b. (a -> b) -> a -> b
$ Variable -> CodeInfoOO Variable
forall a. a -> CodeInfoOO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Variable -> CodeInfoOO Variable)
-> Variable -> CodeInfoOO Variable
forall a b. (a -> b) -> a -> b
$ String -> Variable
forall a. HasCallStack => String -> a
error String
"[var] The return value of this isn't used, and the thunk shouldn't fire."
constant :: String -> VS (CodeInfoOO TypeData) -> SVariable CodeInfoOO
constant String
_ VS (CodeInfoOO TypeData)
_ = CodeInfoOO Variable -> SVariable CodeInfoOO
forall a. a -> StateT ValueState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO Variable -> SVariable CodeInfoOO)
-> CodeInfoOO Variable -> SVariable CodeInfoOO
forall a b. (a -> b) -> a -> b
$ Variable -> CodeInfoOO Variable
forall a. a -> CodeInfoOO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Variable -> CodeInfoOO Variable)
-> Variable -> CodeInfoOO Variable
forall a b. (a -> b) -> a -> b
$ String -> Variable
forall a. HasCallStack => String -> a
error String
"[constant] The return value of this isn't used, and the thunk shouldn't fire."
extVar :: String
-> String -> VS (CodeInfoOO TypeData) -> SVariable CodeInfoOO
extVar String
_ String
_ VS (CodeInfoOO TypeData)
_ = CodeInfoOO Variable -> SVariable CodeInfoOO
forall a. a -> StateT ValueState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO Variable -> SVariable CodeInfoOO)
-> CodeInfoOO Variable -> SVariable CodeInfoOO
forall a b. (a -> b) -> a -> b
$ Variable -> CodeInfoOO Variable
forall a. a -> CodeInfoOO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Variable -> CodeInfoOO Variable)
-> Variable -> CodeInfoOO Variable
forall a b. (a -> b) -> a -> b
$ String -> Variable
forall a. HasCallStack => String -> a
error String
"[extVar] The return value of this isn't used, and the thunk shouldn't fire."
instance OOVariableSym CodeInfoOO where
classVar :: String -> VS (CodeInfoOO TypeData) -> SVariable CodeInfoOO
classVar String
_ VS (CodeInfoOO TypeData)
_ = CodeInfoOO Variable -> SVariable CodeInfoOO
forall a. a -> StateT ValueState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO Variable -> SVariable CodeInfoOO)
-> CodeInfoOO Variable -> SVariable CodeInfoOO
forall a b. (a -> b) -> a -> b
$ Variable -> CodeInfoOO Variable
forall a. a -> CodeInfoOO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Variable -> CodeInfoOO Variable)
-> Variable -> CodeInfoOO Variable
forall a b. (a -> b) -> a -> b
$ String -> Variable
forall a. HasCallStack => String -> a
error String
"[classVar] The return value of this isn't used, and the thunk shouldn't fire."
classConst :: String -> VS (CodeInfoOO TypeData) -> SVariable CodeInfoOO
classConst String
_ VS (CodeInfoOO TypeData)
_ = CodeInfoOO Variable -> SVariable CodeInfoOO
forall a. a -> StateT ValueState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO Variable -> SVariable CodeInfoOO)
-> CodeInfoOO Variable -> SVariable CodeInfoOO
forall a b. (a -> b) -> a -> b
$ Variable -> CodeInfoOO Variable
forall a. a -> CodeInfoOO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Variable -> CodeInfoOO Variable)
-> Variable -> CodeInfoOO Variable
forall a b. (a -> b) -> a -> b
$ String -> Variable
forall a. HasCallStack => String -> a
error String
"[classConst] The return value of this isn't used, and the thunk shouldn't fire."
classVarAccess :: VS (CodeInfoOO TypeData)
-> SVariable CodeInfoOO -> SVariable CodeInfoOO
classVarAccess VS (CodeInfoOO TypeData)
_ SVariable CodeInfoOO
_ = CodeInfoOO Variable -> SVariable CodeInfoOO
forall a. a -> StateT ValueState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO Variable -> SVariable CodeInfoOO)
-> CodeInfoOO Variable -> SVariable CodeInfoOO
forall a b. (a -> b) -> a -> b
$ Variable -> CodeInfoOO Variable
forall a. a -> CodeInfoOO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Variable -> CodeInfoOO Variable)
-> Variable -> CodeInfoOO Variable
forall a b. (a -> b) -> a -> b
$ String -> Variable
forall a. HasCallStack => String -> a
error String
"[classVarAccess] The return value of this isn't used, and the thunk shouldn't fire."
extClassVarAccess :: VS (CodeInfoOO TypeData)
-> SVariable CodeInfoOO -> SVariable CodeInfoOO
extClassVarAccess VS (CodeInfoOO TypeData)
_ SVariable CodeInfoOO
_ = CodeInfoOO Variable -> SVariable CodeInfoOO
forall a. a -> StateT ValueState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO Variable -> SVariable CodeInfoOO)
-> CodeInfoOO Variable -> SVariable CodeInfoOO
forall a b. (a -> b) -> a -> b
$ Variable -> CodeInfoOO Variable
forall a. a -> CodeInfoOO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Variable -> CodeInfoOO Variable)
-> Variable -> CodeInfoOO Variable
forall a b. (a -> b) -> a -> b
$ String -> Variable
forall a. HasCallStack => String -> a
error String
"[extClassVarAccess] The return value of this isn't used, and the thunk shouldn't fire."
instanceVarAccess :: SValue CodeInfoOO -> SVariable CodeInfoOO -> SVariable CodeInfoOO
instanceVarAccess SValue CodeInfoOO
_ SVariable CodeInfoOO
_ = CodeInfoOO Variable -> SVariable CodeInfoOO
forall a. a -> StateT ValueState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO Variable -> SVariable CodeInfoOO)
-> CodeInfoOO Variable -> SVariable CodeInfoOO
forall a b. (a -> b) -> a -> b
$ Variable -> CodeInfoOO Variable
forall a. a -> CodeInfoOO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Variable -> CodeInfoOO Variable)
-> Variable -> CodeInfoOO Variable
forall a b. (a -> b) -> a -> b
$ String -> Variable
forall a. HasCallStack => String -> a
error String
"[instanceVarAccess] The return value of this isn't used, and the thunk shouldn't fire."
instance SelfSym CodeInfoOO where
self :: SVariable CodeInfoOO
self = CodeInfoOO Variable -> SVariable CodeInfoOO
forall a. a -> StateT ValueState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO Variable -> SVariable CodeInfoOO)
-> CodeInfoOO Variable -> SVariable CodeInfoOO
forall a b. (a -> b) -> a -> b
$ Variable -> CodeInfoOO Variable
forall a. a -> CodeInfoOO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Variable -> CodeInfoOO Variable)
-> Variable -> CodeInfoOO Variable
forall a b. (a -> b) -> a -> b
$ String -> Variable
forall a. HasCallStack => String -> a
error String
"[self] The return value of this isn't used, and the thunk shouldn't fire."
instance VariableElim CodeInfoOO where
variableName :: CodeInfoOO Variable -> String
variableName CodeInfoOO Variable
_ = String
""
variableType :: CodeInfoOO Variable -> CodeInfoOO TypeData
variableType CodeInfoOO Variable
_ = TypeData -> CodeInfoOO TypeData
forall a. a -> CodeInfoOO a
forall (m :: * -> *) a. Monad m => a -> m a
return (TypeData -> CodeInfoOO TypeData)
-> TypeData -> CodeInfoOO TypeData
forall a b. (a -> b) -> a -> b
$ String -> TypeData
forall a. HasCallStack => String -> a
error String
"[variableType] The return value of this isn't used, and the thunk shouldn't fire."
instance ValueSym CodeInfoOO where
valueType :: CodeInfoOO Value -> CodeInfoOO TypeData
valueType CodeInfoOO Value
_ = TypeData -> CodeInfoOO TypeData
forall a. a -> CodeInfoOO a
forall (m :: * -> *) a. Monad m => a -> m a
return (TypeData -> CodeInfoOO TypeData)
-> TypeData -> CodeInfoOO TypeData
forall a b. (a -> b) -> a -> b
$ String -> TypeData
forall a. HasCallStack => String -> a
error String
"[valueType] The return value of this isn't used, and the thunk shouldn't fire."
instance OOValueSym CodeInfoOO
instance Argument CodeInfoOO where
pointerArg :: SValue CodeInfoOO -> SValue CodeInfoOO
pointerArg = SValue CodeInfoOO -> SValue CodeInfoOO
forall a. a -> a
id
instance Literal CodeInfoOO where
litTrue :: SValue CodeInfoOO
litTrue = CodeInfoOO Value -> SValue CodeInfoOO
forall a. a -> StateT ValueState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO Value -> SValue CodeInfoOO)
-> CodeInfoOO Value -> SValue CodeInfoOO
forall a b. (a -> b) -> a -> b
$ String -> CodeInfoOO Value
forall a. HasCallStack => String -> a
error String
"[litTrue] The return value of this isn't used, and the thunk shouldn't fire."
litFalse :: SValue CodeInfoOO
litFalse = CodeInfoOO Value -> SValue CodeInfoOO
forall a. a -> StateT ValueState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO Value -> SValue CodeInfoOO)
-> CodeInfoOO Value -> SValue CodeInfoOO
forall a b. (a -> b) -> a -> b
$ String -> CodeInfoOO Value
forall a. HasCallStack => String -> a
error String
"[litFalse] The return value of this isn't used, and the thunk shouldn't fire."
litChar :: Char -> SValue CodeInfoOO
litChar Char
_ = CodeInfoOO Value -> SValue CodeInfoOO
forall a. a -> StateT ValueState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO Value -> SValue CodeInfoOO)
-> CodeInfoOO Value -> SValue CodeInfoOO
forall a b. (a -> b) -> a -> b
$ String -> CodeInfoOO Value
forall a. HasCallStack => String -> a
error String
"[litChar] The return value of this isn't used, and the thunk shouldn't fire."
litDouble :: Double -> SValue CodeInfoOO
litDouble Double
_ = CodeInfoOO Value -> SValue CodeInfoOO
forall a. a -> StateT ValueState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO Value -> SValue CodeInfoOO)
-> CodeInfoOO Value -> SValue CodeInfoOO
forall a b. (a -> b) -> a -> b
$ String -> CodeInfoOO Value
forall a. HasCallStack => String -> a
error String
"[litDouble] The return value of this isn't used, and the thunk shouldn't fire."
litFloat :: Float -> SValue CodeInfoOO
litFloat Float
_ = CodeInfoOO Value -> SValue CodeInfoOO
forall a. a -> StateT ValueState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO Value -> SValue CodeInfoOO)
-> CodeInfoOO Value -> SValue CodeInfoOO
forall a b. (a -> b) -> a -> b
$ String -> CodeInfoOO Value
forall a. HasCallStack => String -> a
error String
"[litFloat] The return value of this isn't used, and the thunk shouldn't fire."
litInt :: Integer -> SValue CodeInfoOO
litInt Integer
_ = CodeInfoOO Value -> SValue CodeInfoOO
forall a. a -> StateT ValueState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO Value -> SValue CodeInfoOO)
-> CodeInfoOO Value -> SValue CodeInfoOO
forall a b. (a -> b) -> a -> b
$ String -> CodeInfoOO Value
forall a. HasCallStack => String -> a
error String
"[litInt] The return value of this isn't used, and the thunk shouldn't fire."
litString :: String -> SValue CodeInfoOO
litString String
_ = CodeInfoOO Value -> SValue CodeInfoOO
forall a. a -> StateT ValueState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO Value -> SValue CodeInfoOO)
-> CodeInfoOO Value -> SValue CodeInfoOO
forall a b. (a -> b) -> a -> b
$ String -> CodeInfoOO Value
forall a. HasCallStack => String -> a
error String
"[litString] The return value of this isn't used, and the thunk shouldn't fire."
litArray :: VS (CodeInfoOO TypeData)
-> [SValue CodeInfoOO] -> SValue CodeInfoOO
litArray VS (CodeInfoOO TypeData)
_ = [SValue CodeInfoOO] -> SValue CodeInfoOO
forall a b c. [State a (CodeInfoOO b)] -> State a (CodeInfoOO c)
executeListErr
litList :: VS (CodeInfoOO TypeData)
-> [SValue CodeInfoOO] -> SValue CodeInfoOO
litList VS (CodeInfoOO TypeData)
_ = [SValue CodeInfoOO] -> SValue CodeInfoOO
forall a b c. [State a (CodeInfoOO b)] -> State a (CodeInfoOO c)
executeListErr
litSet :: VS (CodeInfoOO TypeData)
-> [SValue CodeInfoOO] -> SValue CodeInfoOO
litSet VS (CodeInfoOO TypeData)
_ = [SValue CodeInfoOO] -> SValue CodeInfoOO
forall a b c. [State a (CodeInfoOO b)] -> State a (CodeInfoOO c)
executeListErr
instance MathConstant CodeInfoOO where
pi :: SValue CodeInfoOO
pi = CodeInfoOO Value -> SValue CodeInfoOO
forall a. a -> StateT ValueState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO Value -> SValue CodeInfoOO)
-> CodeInfoOO Value -> SValue CodeInfoOO
forall a b. (a -> b) -> a -> b
$ String -> CodeInfoOO Value
forall a. HasCallStack => String -> a
error String
"[pi] The return value of this isn't used, and the thunk shouldn't fire."
instance VariableValue CodeInfoOO where
valueOf :: SVariable CodeInfoOO -> SValue CodeInfoOO
valueOf SVariable CodeInfoOO
_ = CodeInfoOO Value -> SValue CodeInfoOO
forall a. a -> StateT ValueState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO Value -> SValue CodeInfoOO)
-> CodeInfoOO Value -> SValue CodeInfoOO
forall a b. (a -> b) -> a -> b
$ String -> CodeInfoOO Value
forall a. HasCallStack => String -> a
error String
"[valueOf] The return value of this isn't used, and the thunk shouldn't fire."
instance OOVariableValue CodeInfoOO
instance CommandLineArgs CodeInfoOO where
arg :: Integer -> SValue CodeInfoOO
arg Integer
_ = CodeInfoOO Value -> SValue CodeInfoOO
forall a. a -> StateT ValueState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO Value -> SValue CodeInfoOO)
-> CodeInfoOO Value -> SValue CodeInfoOO
forall a b. (a -> b) -> a -> b
$ String -> CodeInfoOO Value
forall a. HasCallStack => String -> a
error String
"[arg] The return value of this isn't used, and the thunk shouldn't fire."
argsList :: SValue CodeInfoOO
argsList = CodeInfoOO Value -> SValue CodeInfoOO
forall a. a -> StateT ValueState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO Value -> SValue CodeInfoOO)
-> CodeInfoOO Value -> SValue CodeInfoOO
forall a b. (a -> b) -> a -> b
$ String -> CodeInfoOO Value
forall a. HasCallStack => String -> a
error String
"[argsList] The return value of this isn't used, and the thunk shouldn't fire."
argExists :: Integer -> SValue CodeInfoOO
argExists Integer
_ = CodeInfoOO Value -> SValue CodeInfoOO
forall a. a -> StateT ValueState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO Value -> SValue CodeInfoOO)
-> CodeInfoOO Value -> SValue CodeInfoOO
forall a b. (a -> b) -> a -> b
$ String -> CodeInfoOO Value
forall a. HasCallStack => String -> a
error String
"[argExists] The return value of this isn't used, and the thunk shouldn't fire."
instance NumericExpression CodeInfoOO where
#~ :: SValue CodeInfoOO -> SValue CodeInfoOO
(#~) = SValue CodeInfoOO -> SValue CodeInfoOO
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1
#/^ :: SValue CodeInfoOO -> SValue CodeInfoOO
(#/^) = SValue CodeInfoOO -> SValue CodeInfoOO
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1
#| :: SValue CodeInfoOO -> SValue CodeInfoOO
(#|) = SValue CodeInfoOO -> SValue CodeInfoOO
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1
#+ :: SValue CodeInfoOO -> SValue CodeInfoOO -> SValue CodeInfoOO
(#+) = SValue CodeInfoOO -> SValue CodeInfoOO -> SValue CodeInfoOO
forall a b c d.
State a (CodeInfoOO b)
-> State a (CodeInfoOO c) -> State a (CodeInfoOO d)
execute2
#- :: SValue CodeInfoOO -> SValue CodeInfoOO -> SValue CodeInfoOO
(#-) = SValue CodeInfoOO -> SValue CodeInfoOO -> SValue CodeInfoOO
forall a b c d.
State a (CodeInfoOO b)
-> State a (CodeInfoOO c) -> State a (CodeInfoOO d)
execute2
#* :: SValue CodeInfoOO -> SValue CodeInfoOO -> SValue CodeInfoOO
(#*) = SValue CodeInfoOO -> SValue CodeInfoOO -> SValue CodeInfoOO
forall a b c d.
State a (CodeInfoOO b)
-> State a (CodeInfoOO c) -> State a (CodeInfoOO d)
execute2
#/ :: SValue CodeInfoOO -> SValue CodeInfoOO -> SValue CodeInfoOO
(#/) = SValue CodeInfoOO -> SValue CodeInfoOO -> SValue CodeInfoOO
forall a b c d.
State a (CodeInfoOO b)
-> State a (CodeInfoOO c) -> State a (CodeInfoOO d)
execute2
#% :: SValue CodeInfoOO -> SValue CodeInfoOO -> SValue CodeInfoOO
(#%) = SValue CodeInfoOO -> SValue CodeInfoOO -> SValue CodeInfoOO
forall a b c d.
State a (CodeInfoOO b)
-> State a (CodeInfoOO c) -> State a (CodeInfoOO d)
execute2
#^ :: SValue CodeInfoOO -> SValue CodeInfoOO -> SValue CodeInfoOO
(#^) = SValue CodeInfoOO -> SValue CodeInfoOO -> SValue CodeInfoOO
forall a b c d.
State a (CodeInfoOO b)
-> State a (CodeInfoOO c) -> State a (CodeInfoOO d)
execute2
log :: SValue CodeInfoOO -> SValue CodeInfoOO
log = SValue CodeInfoOO -> SValue CodeInfoOO
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1
ln :: SValue CodeInfoOO -> SValue CodeInfoOO
ln = SValue CodeInfoOO -> SValue CodeInfoOO
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1
exp :: SValue CodeInfoOO -> SValue CodeInfoOO
exp = SValue CodeInfoOO -> SValue CodeInfoOO
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1
sin :: SValue CodeInfoOO -> SValue CodeInfoOO
sin = SValue CodeInfoOO -> SValue CodeInfoOO
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1
cos :: SValue CodeInfoOO -> SValue CodeInfoOO
cos = SValue CodeInfoOO -> SValue CodeInfoOO
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1
tan :: SValue CodeInfoOO -> SValue CodeInfoOO
tan = SValue CodeInfoOO -> SValue CodeInfoOO
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1
csc :: SValue CodeInfoOO -> SValue CodeInfoOO
csc = SValue CodeInfoOO -> SValue CodeInfoOO
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1
sec :: SValue CodeInfoOO -> SValue CodeInfoOO
sec = SValue CodeInfoOO -> SValue CodeInfoOO
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1
cot :: SValue CodeInfoOO -> SValue CodeInfoOO
cot = SValue CodeInfoOO -> SValue CodeInfoOO
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1
arcsin :: SValue CodeInfoOO -> SValue CodeInfoOO
arcsin = SValue CodeInfoOO -> SValue CodeInfoOO
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1
arccos :: SValue CodeInfoOO -> SValue CodeInfoOO
arccos = SValue CodeInfoOO -> SValue CodeInfoOO
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1
arctan :: SValue CodeInfoOO -> SValue CodeInfoOO
arctan = SValue CodeInfoOO -> SValue CodeInfoOO
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1
floor :: SValue CodeInfoOO -> SValue CodeInfoOO
floor = SValue CodeInfoOO -> SValue CodeInfoOO
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1
ceil :: SValue CodeInfoOO -> SValue CodeInfoOO
ceil = SValue CodeInfoOO -> SValue CodeInfoOO
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1
instance BooleanExpression CodeInfoOO where
?! :: SValue CodeInfoOO -> SValue CodeInfoOO
(?!) = SValue CodeInfoOO -> SValue CodeInfoOO
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1
?&& :: SValue CodeInfoOO -> SValue CodeInfoOO -> SValue CodeInfoOO
(?&&) = SValue CodeInfoOO -> SValue CodeInfoOO -> SValue CodeInfoOO
forall a b c d.
State a (CodeInfoOO b)
-> State a (CodeInfoOO c) -> State a (CodeInfoOO d)
execute2
?|| :: SValue CodeInfoOO -> SValue CodeInfoOO -> SValue CodeInfoOO
(?||) = SValue CodeInfoOO -> SValue CodeInfoOO -> SValue CodeInfoOO
forall a b c d.
State a (CodeInfoOO b)
-> State a (CodeInfoOO c) -> State a (CodeInfoOO d)
execute2
instance Comparison CodeInfoOO where
?< :: SValue CodeInfoOO -> SValue CodeInfoOO -> SValue CodeInfoOO
(?<) = SValue CodeInfoOO -> SValue CodeInfoOO -> SValue CodeInfoOO
forall a b c d.
State a (CodeInfoOO b)
-> State a (CodeInfoOO c) -> State a (CodeInfoOO d)
execute2
?<= :: SValue CodeInfoOO -> SValue CodeInfoOO -> SValue CodeInfoOO
(?<=) = SValue CodeInfoOO -> SValue CodeInfoOO -> SValue CodeInfoOO
forall a b c d.
State a (CodeInfoOO b)
-> State a (CodeInfoOO c) -> State a (CodeInfoOO d)
execute2
?> :: SValue CodeInfoOO -> SValue CodeInfoOO -> SValue CodeInfoOO
(?>) = SValue CodeInfoOO -> SValue CodeInfoOO -> SValue CodeInfoOO
forall a b c d.
State a (CodeInfoOO b)
-> State a (CodeInfoOO c) -> State a (CodeInfoOO d)
execute2
?>= :: SValue CodeInfoOO -> SValue CodeInfoOO -> SValue CodeInfoOO
(?>=) = SValue CodeInfoOO -> SValue CodeInfoOO -> SValue CodeInfoOO
forall a b c d.
State a (CodeInfoOO b)
-> State a (CodeInfoOO c) -> State a (CodeInfoOO d)
execute2
?== :: SValue CodeInfoOO -> SValue CodeInfoOO -> SValue CodeInfoOO
(?==) = SValue CodeInfoOO -> SValue CodeInfoOO -> SValue CodeInfoOO
forall a b c d.
State a (CodeInfoOO b)
-> State a (CodeInfoOO c) -> State a (CodeInfoOO d)
execute2
?!= :: SValue CodeInfoOO -> SValue CodeInfoOO -> SValue CodeInfoOO
(?!=) = SValue CodeInfoOO -> SValue CodeInfoOO -> SValue CodeInfoOO
forall a b c d.
State a (CodeInfoOO b)
-> State a (CodeInfoOO c) -> State a (CodeInfoOO d)
execute2
instance ValueExpression CodeInfoOO where
inlineIf :: SValue CodeInfoOO
-> SValue CodeInfoOO -> SValue CodeInfoOO -> SValue CodeInfoOO
inlineIf = SValue CodeInfoOO
-> SValue CodeInfoOO -> SValue CodeInfoOO -> SValue CodeInfoOO
forall a b c d e.
State a (CodeInfoOO b)
-> State a (CodeInfoOO c)
-> State a (CodeInfoOO d)
-> State a (CodeInfoOO e)
execute3
funcAppMixedArgs :: MixedCall CodeInfoOO
funcAppMixedArgs String
n VS (CodeInfoOO TypeData)
_ = do
_ <- String
-> [SValue CodeInfoOO] -> NamedArgs CodeInfoOO -> SValue CodeInfoOO
currModCall String
n
return $ return $ return $ error "[funcAppMixedArgs] The return value of this isn't used, and the thunk shouldn't fire."
extFuncAppMixedArgs :: String -> MixedCall CodeInfoOO
extFuncAppMixedArgs String
l String
n VS (CodeInfoOO TypeData)
_ [SValue CodeInfoOO]
vs NamedArgs CodeInfoOO
ns = do
[SValue CodeInfoOO] -> StateT ValueState Identity ()
forall (t :: * -> *) (m :: * -> *) a.
(Foldable t, Monad m) =>
t (m a) -> m ()
sequence_ [SValue CodeInfoOO]
vs
((SVariable CodeInfoOO, SValue CodeInfoOO) -> SVariable CodeInfoOO)
-> NamedArgs CodeInfoOO -> StateT ValueState Identity ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ (SVariable CodeInfoOO, SValue CodeInfoOO) -> SVariable CodeInfoOO
forall a b. (a, b) -> a
fst NamedArgs CodeInfoOO
ns
((SVariable CodeInfoOO, SValue CodeInfoOO) -> SValue CodeInfoOO)
-> NamedArgs CodeInfoOO -> StateT ValueState Identity ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ (SVariable CodeInfoOO, SValue CodeInfoOO) -> SValue CodeInfoOO
forall a b. (a, b) -> b
snd NamedArgs CodeInfoOO
ns
String -> String -> SValue CodeInfoOO
addExternalCallVal String
l String
n
libFuncAppMixedArgs :: String -> MixedCall CodeInfoOO
libFuncAppMixedArgs = String -> MixedCall CodeInfoOO
forall (r :: * -> *). ValueExpression r => String -> MixedCall r
extFuncAppMixedArgs
lambda :: [VSBinder CodeInfoOO] -> SValue CodeInfoOO -> SValue CodeInfoOO
lambda [VSBinder CodeInfoOO]
_ = SValue CodeInfoOO -> SValue CodeInfoOO
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1
notNull :: SValue CodeInfoOO -> SValue CodeInfoOO
notNull = SValue CodeInfoOO -> SValue CodeInfoOO
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1
instance OOValueExpression CodeInfoOO where
newObjMixedArgs :: MixedCtorCall CodeInfoOO
newObjMixedArgs VS (CodeInfoOO TypeData)
_ [SValue CodeInfoOO]
vs NamedArgs CodeInfoOO
ns = do
[SValue CodeInfoOO] -> StateT ValueState Identity ()
forall (t :: * -> *) (m :: * -> *) a.
(Foldable t, Monad m) =>
t (m a) -> m ()
sequence_ [SValue CodeInfoOO]
vs
((SVariable CodeInfoOO, SValue CodeInfoOO) -> SVariable CodeInfoOO)
-> NamedArgs CodeInfoOO -> StateT ValueState Identity ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ (SVariable CodeInfoOO, SValue CodeInfoOO) -> SVariable CodeInfoOO
forall a b. (a, b) -> a
fst NamedArgs CodeInfoOO
ns
((SVariable CodeInfoOO, SValue CodeInfoOO) -> SValue CodeInfoOO)
-> NamedArgs CodeInfoOO -> StateT ValueState Identity ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ (SVariable CodeInfoOO, SValue CodeInfoOO) -> SValue CodeInfoOO
forall a b. (a, b) -> b
snd NamedArgs CodeInfoOO
ns
CodeInfoOO Value -> SValue CodeInfoOO
forall a. a -> StateT ValueState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO Value -> SValue CodeInfoOO)
-> CodeInfoOO Value -> SValue CodeInfoOO
forall a b. (a -> b) -> a -> b
$ String -> CodeInfoOO Value
forall a. HasCallStack => String -> a
error String
"[newObjMixedArgs] The return value of this isn't used, and the thunk shouldn't fire."
extNewObjMixedArgs :: MixedCall CodeInfoOO
extNewObjMixedArgs String
_ VS (CodeInfoOO TypeData)
_ [SValue CodeInfoOO]
vs NamedArgs CodeInfoOO
ns = do
[SValue CodeInfoOO] -> StateT ValueState Identity ()
forall (t :: * -> *) (m :: * -> *) a.
(Foldable t, Monad m) =>
t (m a) -> m ()
sequence_ [SValue CodeInfoOO]
vs
((SVariable CodeInfoOO, SValue CodeInfoOO) -> SVariable CodeInfoOO)
-> NamedArgs CodeInfoOO -> StateT ValueState Identity ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ (SVariable CodeInfoOO, SValue CodeInfoOO) -> SVariable CodeInfoOO
forall a b. (a, b) -> a
fst NamedArgs CodeInfoOO
ns
((SVariable CodeInfoOO, SValue CodeInfoOO) -> SValue CodeInfoOO)
-> NamedArgs CodeInfoOO -> StateT ValueState Identity ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ (SVariable CodeInfoOO, SValue CodeInfoOO) -> SValue CodeInfoOO
forall a b. (a, b) -> b
snd NamedArgs CodeInfoOO
ns
CodeInfoOO Value -> SValue CodeInfoOO
forall a. a -> StateT ValueState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO Value -> SValue CodeInfoOO)
-> CodeInfoOO Value -> SValue CodeInfoOO
forall a b. (a -> b) -> a -> b
$ String -> CodeInfoOO Value
forall a. HasCallStack => String -> a
error String
"[extNewObjMixedArgs] The return value of this isn't used, and the thunk shouldn't fire."
libNewObjMixedArgs :: MixedCall CodeInfoOO
libNewObjMixedArgs = MixedCall CodeInfoOO
forall (r :: * -> *).
OOValueExpression r =>
String -> MixedCtorCall r
extNewObjMixedArgs
instance InternalValueExp CodeInfoOO where
objMethodCallMixedArgs' :: String
-> VS (CodeInfoOO TypeData)
-> SValue CodeInfoOO
-> [SValue CodeInfoOO]
-> NamedArgs CodeInfoOO
-> SValue CodeInfoOO
objMethodCallMixedArgs' String
n VS (CodeInfoOO TypeData)
_ SValue CodeInfoOO
v [SValue CodeInfoOO]
vs NamedArgs CodeInfoOO
ns = do
_ <- SValue CodeInfoOO
v
_ <- currModCall n vs ns
return $ return $ error "[objMethodCallMixedArgs'] The return value of this isn't used, and the thunk shouldn't fire."
classMethodCallMixedArgs' :: String -> VS (CodeInfoOO TypeData) -> MixedCtorCall CodeInfoOO
classMethodCallMixedArgs' String
n VS (CodeInfoOO TypeData)
_ VS (CodeInfoOO TypeData)
cls [SValue CodeInfoOO]
vs NamedArgs CodeInfoOO
ns = VS (CodeInfoOO TypeData)
cls VS (CodeInfoOO TypeData) -> SValue CodeInfoOO -> SValue CodeInfoOO
forall a b.
StateT ValueState Identity a
-> StateT ValueState Identity b -> StateT ValueState Identity b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> String
-> [SValue CodeInfoOO] -> NamedArgs CodeInfoOO -> SValue CodeInfoOO
currModCall String
n [SValue CodeInfoOO]
vs NamedArgs CodeInfoOO
ns
instance FunctionSym CodeInfoOO where
instance OOFunctionSym CodeInfoOO where
func :: String
-> VS (CodeInfoOO TypeData)
-> [SValue CodeInfoOO]
-> VS (CodeInfoOO FuncData)
func String
_ VS (CodeInfoOO TypeData)
_ [SValue CodeInfoOO]
l = do
[SValue CodeInfoOO] -> StateT ValueState Identity ()
forall (t :: * -> *) (m :: * -> *) a.
(Foldable t, Monad m) =>
t (m a) -> m ()
sequence_ [SValue CodeInfoOO]
l
CodeInfoOO FuncData -> VS (CodeInfoOO FuncData)
forall a. a -> StateT ValueState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO FuncData -> VS (CodeInfoOO FuncData))
-> CodeInfoOO FuncData -> VS (CodeInfoOO FuncData)
forall a b. (a -> b) -> a -> b
$ FuncData -> CodeInfoOO FuncData
forall a. a -> CodeInfoOO a
forall (m :: * -> *) a. Monad m => a -> m a
return (FuncData -> CodeInfoOO FuncData)
-> FuncData -> CodeInfoOO FuncData
forall a b. (a -> b) -> a -> b
$ String -> FuncData
forall a. HasCallStack => String -> a
error String
"The return value of this isn't used, and the thunk shouldn't fire."
objAccess :: SValue CodeInfoOO -> VS (CodeInfoOO FuncData) -> SValue CodeInfoOO
objAccess SValue CodeInfoOO
s1 VS (CodeInfoOO FuncData)
s2 = do
_ <- SValue CodeInfoOO
s1
_ <- s2
return $ return $ error "The return value of this isn't used, and the thunk shouldn't fire."
instance GetSet CodeInfoOO where
get :: SValue CodeInfoOO -> SVariable CodeInfoOO -> SValue CodeInfoOO
get SValue CodeInfoOO
v SVariable CodeInfoOO
_ = SValue CodeInfoOO -> SValue CodeInfoOO
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1 SValue CodeInfoOO
v
set :: SValue CodeInfoOO
-> SVariable CodeInfoOO -> SValue CodeInfoOO -> SValue CodeInfoOO
set SValue CodeInfoOO
v SVariable CodeInfoOO
_ = SValue CodeInfoOO -> SValue CodeInfoOO -> SValue CodeInfoOO
forall a b c d.
State a (CodeInfoOO b)
-> State a (CodeInfoOO c) -> State a (CodeInfoOO d)
execute2 SValue CodeInfoOO
v
instance IndexTranslator CodeInfoOO where
intToIndex :: SValue CodeInfoOO -> SValue CodeInfoOO
intToIndex = SValue CodeInfoOO -> SValue CodeInfoOO
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1
indexToInt :: SValue CodeInfoOO -> SValue CodeInfoOO
indexToInt = SValue CodeInfoOO -> SValue CodeInfoOO
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1
instance Reference CodeInfoOO where
makeRef :: SValue CodeInfoOO -> SValue CodeInfoOO
makeRef = SValue CodeInfoOO -> SValue CodeInfoOO
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1
maybeDeref :: SValue CodeInfoOO -> SValue CodeInfoOO
maybeDeref = SValue CodeInfoOO -> SValue CodeInfoOO
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1
instance Array CodeInfoOO where
arrayElem :: SValue CodeInfoOO -> SValue CodeInfoOO -> SVariable CodeInfoOO
arrayElem SValue CodeInfoOO
_ SValue CodeInfoOO
_ = CodeInfoOO Variable -> SVariable CodeInfoOO
forall a. a -> StateT ValueState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO Variable -> SVariable CodeInfoOO)
-> CodeInfoOO Variable -> SVariable CodeInfoOO
forall a b. (a -> b) -> a -> b
$ Variable -> CodeInfoOO Variable
forall a. a -> CodeInfoOO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Variable -> CodeInfoOO Variable)
-> Variable -> CodeInfoOO Variable
forall a b. (a -> b) -> a -> b
$ String -> Variable
forall a. HasCallStack => String -> a
error String
"[arrayElem] The return value of this isn't used, and the thunk shouldn't fire."
arrayLength :: SValue CodeInfoOO -> SValue CodeInfoOO
arrayLength SValue CodeInfoOO
_ = CodeInfoOO Value -> SValue CodeInfoOO
forall a. a -> StateT ValueState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO Value -> SValue CodeInfoOO)
-> CodeInfoOO Value -> SValue CodeInfoOO
forall a b. (a -> b) -> a -> b
$ String -> CodeInfoOO Value
forall a. HasCallStack => String -> a
error String
"[arrayLength] The return value of this isn't used, and the thunk shouldn't fire."
arrayCopy :: SValue CodeInfoOO -> SValue CodeInfoOO
arrayCopy SValue CodeInfoOO
_ = CodeInfoOO Value -> SValue CodeInfoOO
forall a. a -> StateT ValueState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO Value -> SValue CodeInfoOO)
-> CodeInfoOO Value -> SValue CodeInfoOO
forall a b. (a -> b) -> a -> b
$ String -> CodeInfoOO Value
forall a. HasCallStack => String -> a
error String
"[arrayCopy] The return value of this isn't used, and the thunk shouldn't fire."
instance List CodeInfoOO where
listSize :: SValue CodeInfoOO -> SValue CodeInfoOO
listSize = SValue CodeInfoOO -> SValue CodeInfoOO
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1
listAccess :: SValue CodeInfoOO -> SValue CodeInfoOO -> SValue CodeInfoOO
listAccess = SValue CodeInfoOO -> SValue CodeInfoOO -> SValue CodeInfoOO
forall a b c d.
State a (CodeInfoOO b)
-> State a (CodeInfoOO c) -> State a (CodeInfoOO d)
execute2
indexOf :: SValue CodeInfoOO -> SValue CodeInfoOO -> SValue CodeInfoOO
indexOf = SValue CodeInfoOO -> SValue CodeInfoOO -> SValue CodeInfoOO
forall a b c d.
State a (CodeInfoOO b)
-> State a (CodeInfoOO c) -> State a (CodeInfoOO d)
execute2
instance ListStatement CodeInfoOO () where
listAdd :: SValue CodeInfoOO
-> SValue CodeInfoOO -> SValue CodeInfoOO -> MS (CodeInfoOO ())
listAdd SValue CodeInfoOO
l SValue CodeInfoOO
i SValue CodeInfoOO
v = State MethodState (CodeInfoOO Value)
-> State MethodState (CodeInfoOO Value)
-> State MethodState (CodeInfoOO Value)
-> MS (CodeInfoOO ())
forall a b c d e.
State a (CodeInfoOO b)
-> State a (CodeInfoOO c)
-> State a (CodeInfoOO d)
-> State a (CodeInfoOO e)
execute3 (LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO Value))
MethodState
ValueState
-> SValue CodeInfoOO -> State MethodState (CodeInfoOO Value)
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO Value))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO Value) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO Value) MethodState
Lens' MethodState ValueState
lensMStoVS SValue CodeInfoOO
l) (LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO Value))
MethodState
ValueState
-> SValue CodeInfoOO -> State MethodState (CodeInfoOO Value)
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO Value))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO Value) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO Value) MethodState
Lens' MethodState ValueState
lensMStoVS SValue CodeInfoOO
i) (LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO Value))
MethodState
ValueState
-> SValue CodeInfoOO -> State MethodState (CodeInfoOO Value)
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO Value))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO Value) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO Value) MethodState
Lens' MethodState ValueState
lensMStoVS SValue CodeInfoOO
v)
listAppend :: SValue CodeInfoOO -> SValue CodeInfoOO -> MS (CodeInfoOO ())
listAppend SValue CodeInfoOO
l SValue CodeInfoOO
v = State MethodState (CodeInfoOO Value)
-> State MethodState (CodeInfoOO Value) -> MS (CodeInfoOO ())
forall a b c d.
State a (CodeInfoOO b)
-> State a (CodeInfoOO c) -> State a (CodeInfoOO d)
execute2 (LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO Value))
MethodState
ValueState
-> SValue CodeInfoOO -> State MethodState (CodeInfoOO Value)
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO Value))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO Value) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO Value) MethodState
Lens' MethodState ValueState
lensMStoVS SValue CodeInfoOO
l) (LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO Value))
MethodState
ValueState
-> SValue CodeInfoOO -> State MethodState (CodeInfoOO Value)
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO Value))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO Value) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO Value) MethodState
Lens' MethodState ValueState
lensMStoVS SValue CodeInfoOO
v)
listSet :: SValue CodeInfoOO
-> SValue CodeInfoOO -> SValue CodeInfoOO -> MS (CodeInfoOO ())
listSet SValue CodeInfoOO
l SValue CodeInfoOO
i SValue CodeInfoOO
v = State MethodState (CodeInfoOO Value)
-> State MethodState (CodeInfoOO Value)
-> State MethodState (CodeInfoOO Value)
-> MS (CodeInfoOO ())
forall a b c d e.
State a (CodeInfoOO b)
-> State a (CodeInfoOO c)
-> State a (CodeInfoOO d)
-> State a (CodeInfoOO e)
execute3 (LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO Value))
MethodState
ValueState
-> SValue CodeInfoOO -> State MethodState (CodeInfoOO Value)
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO Value))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO Value) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO Value) MethodState
Lens' MethodState ValueState
lensMStoVS SValue CodeInfoOO
l) (LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO Value))
MethodState
ValueState
-> SValue CodeInfoOO -> State MethodState (CodeInfoOO Value)
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO Value))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO Value) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO Value) MethodState
Lens' MethodState ValueState
lensMStoVS SValue CodeInfoOO
i) (LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO Value))
MethodState
ValueState
-> SValue CodeInfoOO -> State MethodState (CodeInfoOO Value)
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO Value))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO Value) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO Value) MethodState
Lens' MethodState ValueState
lensMStoVS SValue CodeInfoOO
v)
instance Set CodeInfoOO where
contains :: SValue CodeInfoOO -> SValue CodeInfoOO -> SValue CodeInfoOO
contains = SValue CodeInfoOO -> SValue CodeInfoOO -> SValue CodeInfoOO
forall a b c d.
State a (CodeInfoOO b)
-> State a (CodeInfoOO c) -> State a (CodeInfoOO d)
execute2
setAdd :: SValue CodeInfoOO -> SValue CodeInfoOO -> SValue CodeInfoOO
setAdd = SValue CodeInfoOO -> SValue CodeInfoOO -> SValue CodeInfoOO
forall a b c d.
State a (CodeInfoOO b)
-> State a (CodeInfoOO c) -> State a (CodeInfoOO d)
execute2
setRemove :: SValue CodeInfoOO -> SValue CodeInfoOO -> SValue CodeInfoOO
setRemove = SValue CodeInfoOO -> SValue CodeInfoOO -> SValue CodeInfoOO
forall a b c d.
State a (CodeInfoOO b)
-> State a (CodeInfoOO c) -> State a (CodeInfoOO d)
execute2
setUnion :: SValue CodeInfoOO -> SValue CodeInfoOO -> SValue CodeInfoOO
setUnion = SValue CodeInfoOO -> SValue CodeInfoOO -> SValue CodeInfoOO
forall a b c d.
State a (CodeInfoOO b)
-> State a (CodeInfoOO c) -> State a (CodeInfoOO d)
execute2
instance InternalList CodeInfoOO () where
listSlice' :: Maybe (SValue CodeInfoOO)
-> Maybe (SValue CodeInfoOO)
-> Maybe (SValue CodeInfoOO)
-> SVariable CodeInfoOO
-> SValue CodeInfoOO
-> MS (CodeInfoOO ())
listSlice' Maybe (SValue CodeInfoOO)
b Maybe (SValue CodeInfoOO)
e Maybe (SValue CodeInfoOO)
s SVariable CodeInfoOO
_ SValue CodeInfoOO
vl = LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
-> StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ())
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO ()) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO ()) MethodState
Lens' MethodState ValueState
lensMStoVS (StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ()))
-> StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ())
forall a b. (a -> b) -> a -> b
$ do
(Maybe (SValue CodeInfoOO) -> SValue CodeInfoOO)
-> [Maybe (SValue CodeInfoOO)] -> StateT ValueState Identity ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ (SValue CodeInfoOO -> Maybe (SValue CodeInfoOO) -> SValue CodeInfoOO
forall a. a -> Maybe a -> a
fromMaybe (CodeInfoOO Value -> SValue CodeInfoOO
forall a. a -> StateT ValueState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO Value -> SValue CodeInfoOO)
-> CodeInfoOO Value -> SValue CodeInfoOO
forall a b. (a -> b) -> a -> b
$ String -> CodeInfoOO Value
forall a. HasCallStack => String -> a
error String
"[listSlice'] The return value of this isn't used, and the thunk shouldn't fire.")) [Maybe (SValue CodeInfoOO)
b,Maybe (SValue CodeInfoOO)
e,Maybe (SValue CodeInfoOO)
s]
_ <- SValue CodeInfoOO
vl
return $ return $ error "[bool] The return value of this isn't used, and the thunk shouldn't fire."
instance BinderSym CodeInfoOO where
binder :: String -> VS (CodeInfoOO TypeData) -> VSBinder CodeInfoOO
binder String
_ VS (CodeInfoOO TypeData)
_ = VSBinder CodeInfoOO
noInfoBinder
instance EmptyStatement CodeInfoOO () where
emptyStmt :: MS (CodeInfoOO ())
emptyStmt = MS (CodeInfoOO ())
forall s. State s (CodeInfoOO ())
noInfo
instance MultiStatement CodeInfoOO () where
multi :: [MS (CodeInfoOO ())] -> MS (CodeInfoOO ())
multi = [MS (CodeInfoOO ())] -> MS (CodeInfoOO ())
forall a. [State a (CodeInfoOO ())] -> State a (CodeInfoOO ())
executeList
instance ValueStatement CodeInfoOO () where
valStmt :: SValue CodeInfoOO -> MS (CodeInfoOO ())
valStmt = LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
-> StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ())
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO ()) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO ()) MethodState
Lens' MethodState ValueState
lensMStoVS (StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ()))
-> (SValue CodeInfoOO
-> StateT ValueState Identity (CodeInfoOO ()))
-> SValue CodeInfoOO
-> MS (CodeInfoOO ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SValue CodeInfoOO -> StateT ValueState Identity (CodeInfoOO ())
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1
instance AssignStatement CodeInfoOO () where
assign :: SVariable CodeInfoOO -> SValue CodeInfoOO -> MS (CodeInfoOO ())
assign SVariable CodeInfoOO
_ = LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
-> StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ())
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO ()) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO ()) MethodState
Lens' MethodState ValueState
lensMStoVS (StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ()))
-> (SValue CodeInfoOO
-> StateT ValueState Identity (CodeInfoOO ()))
-> SValue CodeInfoOO
-> MS (CodeInfoOO ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SValue CodeInfoOO -> StateT ValueState Identity (CodeInfoOO ())
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1
&-= :: SVariable CodeInfoOO -> SValue CodeInfoOO -> MS (CodeInfoOO ())
(&-=) SVariable CodeInfoOO
_ = LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
-> StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ())
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO ()) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO ()) MethodState
Lens' MethodState ValueState
lensMStoVS (StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ()))
-> (SValue CodeInfoOO
-> StateT ValueState Identity (CodeInfoOO ()))
-> SValue CodeInfoOO
-> MS (CodeInfoOO ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SValue CodeInfoOO -> StateT ValueState Identity (CodeInfoOO ())
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1
&+= :: SVariable CodeInfoOO -> SValue CodeInfoOO -> MS (CodeInfoOO ())
(&+=) SVariable CodeInfoOO
_ = LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
-> StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ())
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO ()) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO ()) MethodState
Lens' MethodState ValueState
lensMStoVS (StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ()))
-> (SValue CodeInfoOO
-> StateT ValueState Identity (CodeInfoOO ()))
-> SValue CodeInfoOO
-> MS (CodeInfoOO ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SValue CodeInfoOO -> StateT ValueState Identity (CodeInfoOO ())
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1
&++ :: SVariable CodeInfoOO -> MS (CodeInfoOO ())
(&++) SVariable CodeInfoOO
_ = MS (CodeInfoOO ())
forall s. State s (CodeInfoOO ())
noInfo
&-- :: SVariable CodeInfoOO -> MS (CodeInfoOO ())
(&--) SVariable CodeInfoOO
_ = MS (CodeInfoOO ())
forall s. State s (CodeInfoOO ())
noInfo
instance DeclStatement CodeInfoOO () () where
varDec :: SVariable CodeInfoOO -> CodeInfoOO ScopeData -> MS (CodeInfoOO ())
varDec SVariable CodeInfoOO
_ CodeInfoOO ScopeData
_ = MS (CodeInfoOO ())
forall s. State s (CodeInfoOO ())
noInfo
varDecDef :: SVariable CodeInfoOO
-> CodeInfoOO ScopeData -> SValue CodeInfoOO -> MS (CodeInfoOO ())
varDecDef SVariable CodeInfoOO
_ CodeInfoOO ScopeData
_ = LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
-> StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ())
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO ()) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO ()) MethodState
Lens' MethodState ValueState
lensMStoVS (StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ()))
-> (SValue CodeInfoOO
-> StateT ValueState Identity (CodeInfoOO ()))
-> SValue CodeInfoOO
-> MS (CodeInfoOO ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SValue CodeInfoOO -> StateT ValueState Identity (CodeInfoOO ())
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1
setDec :: SVariable CodeInfoOO -> CodeInfoOO ScopeData -> MS (CodeInfoOO ())
setDec SVariable CodeInfoOO
_ CodeInfoOO ScopeData
_ = MS (CodeInfoOO ())
forall s. State s (CodeInfoOO ())
noInfo
setDecDef :: SVariable CodeInfoOO
-> CodeInfoOO ScopeData -> SValue CodeInfoOO -> MS (CodeInfoOO ())
setDecDef SVariable CodeInfoOO
_ CodeInfoOO ScopeData
_ = LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
-> StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ())
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO ()) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO ()) MethodState
Lens' MethodState ValueState
lensMStoVS (StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ()))
-> (SValue CodeInfoOO
-> StateT ValueState Identity (CodeInfoOO ()))
-> SValue CodeInfoOO
-> MS (CodeInfoOO ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SValue CodeInfoOO -> StateT ValueState Identity (CodeInfoOO ())
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1
listDec :: Integer
-> SVariable CodeInfoOO
-> CodeInfoOO ScopeData
-> MS (CodeInfoOO ())
listDec Integer
_ SVariable CodeInfoOO
_ CodeInfoOO ScopeData
_ = MS (CodeInfoOO ())
forall s. State s (CodeInfoOO ())
noInfo
listDecDef :: SVariable CodeInfoOO
-> CodeInfoOO ScopeData
-> [SValue CodeInfoOO]
-> MS (CodeInfoOO ())
listDecDef SVariable CodeInfoOO
_ CodeInfoOO ScopeData
_ = LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
-> StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ())
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO ()) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO ()) MethodState
Lens' MethodState ValueState
lensMStoVS (StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ()))
-> ([SValue CodeInfoOO]
-> StateT ValueState Identity (CodeInfoOO ()))
-> [SValue CodeInfoOO]
-> MS (CodeInfoOO ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [SValue CodeInfoOO] -> StateT ValueState Identity (CodeInfoOO ())
forall a b c. [State a (CodeInfoOO b)] -> State a (CodeInfoOO c)
executeListErr
arrayDec :: Integer
-> SValue CodeInfoOO
-> SVariable CodeInfoOO
-> CodeInfoOO ScopeData
-> MS (CodeInfoOO ())
arrayDec Integer
_ SValue CodeInfoOO
_ SVariable CodeInfoOO
_ CodeInfoOO ScopeData
_ = MS (CodeInfoOO ())
forall s. State s (CodeInfoOO ())
noInfo
arrayDecDef :: SVariable CodeInfoOO
-> CodeInfoOO ScopeData
-> [SValue CodeInfoOO]
-> MS (CodeInfoOO ())
arrayDecDef SVariable CodeInfoOO
_ CodeInfoOO ScopeData
_ = LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
-> StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ())
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO ()) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO ()) MethodState
Lens' MethodState ValueState
lensMStoVS (StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ()))
-> ([SValue CodeInfoOO]
-> StateT ValueState Identity (CodeInfoOO ()))
-> [SValue CodeInfoOO]
-> MS (CodeInfoOO ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [SValue CodeInfoOO] -> StateT ValueState Identity (CodeInfoOO ())
forall a b c. [State a (CodeInfoOO b)] -> State a (CodeInfoOO c)
executeListErr
constDecDef :: SVariable CodeInfoOO
-> CodeInfoOO ScopeData -> SValue CodeInfoOO -> MS (CodeInfoOO ())
constDecDef SVariable CodeInfoOO
_ CodeInfoOO ScopeData
_ = LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
-> StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ())
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO ()) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO ()) MethodState
Lens' MethodState ValueState
lensMStoVS (StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ()))
-> (SValue CodeInfoOO
-> StateT ValueState Identity (CodeInfoOO ()))
-> SValue CodeInfoOO
-> MS (CodeInfoOO ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SValue CodeInfoOO -> StateT ValueState Identity (CodeInfoOO ())
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1
funcDecDef :: SVariable CodeInfoOO
-> CodeInfoOO ScopeData
-> [SVariable CodeInfoOO]
-> MS (CodeInfoOO ())
-> MS (CodeInfoOO ())
funcDecDef SVariable CodeInfoOO
_ CodeInfoOO ScopeData
_ [SVariable CodeInfoOO]
_ MS (CodeInfoOO ())
bod = do
_ <- MS (CodeInfoOO ())
bod
return $ return $ error "[funcDecDef] The return value of this isn't used, and the thunk shouldn't fire."
instance OODeclStatement CodeInfoOO () () where
objDecDef :: SVariable CodeInfoOO
-> CodeInfoOO ScopeData -> SValue CodeInfoOO -> MS (CodeInfoOO ())
objDecDef SVariable CodeInfoOO
_ CodeInfoOO ScopeData
_ = LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
-> StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ())
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO ()) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO ()) MethodState
Lens' MethodState ValueState
lensMStoVS (StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ()))
-> (SValue CodeInfoOO
-> StateT ValueState Identity (CodeInfoOO ()))
-> SValue CodeInfoOO
-> MS (CodeInfoOO ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SValue CodeInfoOO -> StateT ValueState Identity (CodeInfoOO ())
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1
objDecNew :: SVariable CodeInfoOO
-> CodeInfoOO ScopeData
-> [SValue CodeInfoOO]
-> MS (CodeInfoOO ())
objDecNew SVariable CodeInfoOO
_ CodeInfoOO ScopeData
_ = LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
-> StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ())
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO ()) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO ()) MethodState
Lens' MethodState ValueState
lensMStoVS (StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ()))
-> ([SValue CodeInfoOO]
-> StateT ValueState Identity (CodeInfoOO ()))
-> [SValue CodeInfoOO]
-> MS (CodeInfoOO ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [SValue CodeInfoOO] -> StateT ValueState Identity (CodeInfoOO ())
forall a b c. [State a (CodeInfoOO b)] -> State a (CodeInfoOO c)
executeListErr
extObjDecNew :: String
-> SVariable CodeInfoOO
-> CodeInfoOO ScopeData
-> [SValue CodeInfoOO]
-> MS (CodeInfoOO ())
extObjDecNew String
_ SVariable CodeInfoOO
_ CodeInfoOO ScopeData
_ = LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
-> StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ())
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO ()) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO ()) MethodState
Lens' MethodState ValueState
lensMStoVS (StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ()))
-> ([SValue CodeInfoOO]
-> StateT ValueState Identity (CodeInfoOO ()))
-> [SValue CodeInfoOO]
-> MS (CodeInfoOO ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [SValue CodeInfoOO] -> StateT ValueState Identity (CodeInfoOO ())
forall a b c. [State a (CodeInfoOO b)] -> State a (CodeInfoOO c)
executeListErr
instance PrintConsole CodeInfoOO () where
print :: SValue CodeInfoOO -> MS (CodeInfoOO ())
print = LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
-> StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ())
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO ()) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO ()) MethodState
Lens' MethodState ValueState
lensMStoVS (StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ()))
-> (SValue CodeInfoOO
-> StateT ValueState Identity (CodeInfoOO ()))
-> SValue CodeInfoOO
-> MS (CodeInfoOO ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SValue CodeInfoOO -> StateT ValueState Identity (CodeInfoOO ())
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1
printLn :: SValue CodeInfoOO -> MS (CodeInfoOO ())
printLn = LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
-> StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ())
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO ()) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO ()) MethodState
Lens' MethodState ValueState
lensMStoVS (StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ()))
-> (SValue CodeInfoOO
-> StateT ValueState Identity (CodeInfoOO ()))
-> SValue CodeInfoOO
-> MS (CodeInfoOO ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SValue CodeInfoOO -> StateT ValueState Identity (CodeInfoOO ())
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1
printStr :: String -> MS (CodeInfoOO ())
printStr String
_ = MS (CodeInfoOO ())
forall s. State s (CodeInfoOO ())
noInfo
printStrLn :: String -> MS (CodeInfoOO ())
printStrLn String
_ = MS (CodeInfoOO ())
forall s. State s (CodeInfoOO ())
noInfo
instance ReadConsole CodeInfoOO () where
getInput :: SVariable CodeInfoOO -> MS (CodeInfoOO ())
getInput SVariable CodeInfoOO
_ = MS (CodeInfoOO ())
forall s. State s (CodeInfoOO ())
noInfo
discardInput :: MS (CodeInfoOO ())
discardInput = MS (CodeInfoOO ())
forall s. State s (CodeInfoOO ())
noInfo
instance FileHandling CodeInfoOO () where
openFileR :: SVariable CodeInfoOO -> SValue CodeInfoOO -> MS (CodeInfoOO ())
openFileR SVariable CodeInfoOO
_ SValue CodeInfoOO
v = (MethodState -> MethodState) -> StateT MethodState Identity ()
forall s (m :: * -> *). MonadState s m => (s -> s) -> m ()
modify (ExceptionType -> MethodState -> MethodState
addException ExceptionType
FileNotFound) StateT MethodState Identity ()
-> MS (CodeInfoOO ()) -> MS (CodeInfoOO ())
forall a b.
StateT MethodState Identity a
-> StateT MethodState Identity b -> StateT MethodState Identity b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>>
State MethodState (CodeInfoOO Value) -> MS (CodeInfoOO ())
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1 (LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO Value))
MethodState
ValueState
-> SValue CodeInfoOO -> State MethodState (CodeInfoOO Value)
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO Value))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO Value) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO Value) MethodState
Lens' MethodState ValueState
lensMStoVS SValue CodeInfoOO
v)
openFileW :: SVariable CodeInfoOO -> SValue CodeInfoOO -> MS (CodeInfoOO ())
openFileW SVariable CodeInfoOO
_ SValue CodeInfoOO
v = (MethodState -> MethodState) -> StateT MethodState Identity ()
forall s (m :: * -> *). MonadState s m => (s -> s) -> m ()
modify (ExceptionType -> MethodState -> MethodState
addException ExceptionType
IO) StateT MethodState Identity ()
-> MS (CodeInfoOO ()) -> MS (CodeInfoOO ())
forall a b.
StateT MethodState Identity a
-> StateT MethodState Identity b -> StateT MethodState Identity b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> State MethodState (CodeInfoOO Value) -> MS (CodeInfoOO ())
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1 (LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO Value))
MethodState
ValueState
-> SValue CodeInfoOO -> State MethodState (CodeInfoOO Value)
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO Value))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO Value) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO Value) MethodState
Lens' MethodState ValueState
lensMStoVS SValue CodeInfoOO
v)
openFileA :: SVariable CodeInfoOO -> SValue CodeInfoOO -> MS (CodeInfoOO ())
openFileA SVariable CodeInfoOO
_ SValue CodeInfoOO
v = (MethodState -> MethodState) -> StateT MethodState Identity ()
forall s (m :: * -> *). MonadState s m => (s -> s) -> m ()
modify (ExceptionType -> MethodState -> MethodState
addException ExceptionType
IO) StateT MethodState Identity ()
-> MS (CodeInfoOO ()) -> MS (CodeInfoOO ())
forall a b.
StateT MethodState Identity a
-> StateT MethodState Identity b -> StateT MethodState Identity b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> State MethodState (CodeInfoOO Value) -> MS (CodeInfoOO ())
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1 (LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO Value))
MethodState
ValueState
-> SValue CodeInfoOO -> State MethodState (CodeInfoOO Value)
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO Value))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO Value) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO Value) MethodState
Lens' MethodState ValueState
lensMStoVS SValue CodeInfoOO
v)
closeFile :: SValue CodeInfoOO -> MS (CodeInfoOO ())
closeFile = LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
-> StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ())
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO ()) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO ()) MethodState
Lens' MethodState ValueState
lensMStoVS (StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ()))
-> (SValue CodeInfoOO
-> StateT ValueState Identity (CodeInfoOO ()))
-> SValue CodeInfoOO
-> MS (CodeInfoOO ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SValue CodeInfoOO -> StateT ValueState Identity (CodeInfoOO ())
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1
instance PrintFile CodeInfoOO () where
printFile :: SValue CodeInfoOO -> SValue CodeInfoOO -> MS (CodeInfoOO ())
printFile SValue CodeInfoOO
v = LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
-> StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ())
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO ()) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO ()) MethodState
Lens' MethodState ValueState
lensMStoVS (StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ()))
-> (SValue CodeInfoOO
-> StateT ValueState Identity (CodeInfoOO ()))
-> SValue CodeInfoOO
-> MS (CodeInfoOO ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SValue CodeInfoOO
-> SValue CodeInfoOO -> StateT ValueState Identity (CodeInfoOO ())
forall a b c d.
State a (CodeInfoOO b)
-> State a (CodeInfoOO c) -> State a (CodeInfoOO d)
execute2 SValue CodeInfoOO
v
printFileLn :: SValue CodeInfoOO -> SValue CodeInfoOO -> MS (CodeInfoOO ())
printFileLn SValue CodeInfoOO
v = LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
-> StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ())
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO ()) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO ()) MethodState
Lens' MethodState ValueState
lensMStoVS (StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ()))
-> (SValue CodeInfoOO
-> StateT ValueState Identity (CodeInfoOO ()))
-> SValue CodeInfoOO
-> MS (CodeInfoOO ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SValue CodeInfoOO
-> SValue CodeInfoOO -> StateT ValueState Identity (CodeInfoOO ())
forall a b c d.
State a (CodeInfoOO b)
-> State a (CodeInfoOO c) -> State a (CodeInfoOO d)
execute2 SValue CodeInfoOO
v
printFileStr :: SValue CodeInfoOO -> String -> MS (CodeInfoOO ())
printFileStr SValue CodeInfoOO
v String
_ = LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
-> StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ())
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO ()) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO ()) MethodState
Lens' MethodState ValueState
lensMStoVS (StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ()))
-> StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ())
forall a b. (a -> b) -> a -> b
$ SValue CodeInfoOO -> StateT ValueState Identity (CodeInfoOO ())
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1 SValue CodeInfoOO
v
printFileStrLn :: SValue CodeInfoOO -> String -> MS (CodeInfoOO ())
printFileStrLn SValue CodeInfoOO
v String
_ = LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
-> StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ())
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO ()) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO ()) MethodState
Lens' MethodState ValueState
lensMStoVS (StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ()))
-> StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ())
forall a b. (a -> b) -> a -> b
$ SValue CodeInfoOO -> StateT ValueState Identity (CodeInfoOO ())
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1 SValue CodeInfoOO
v
instance ReadFile CodeInfoOO () where
getFileInput :: SValue CodeInfoOO -> SVariable CodeInfoOO -> MS (CodeInfoOO ())
getFileInput SValue CodeInfoOO
v SVariable CodeInfoOO
_ = LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
-> StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ())
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO ()) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO ()) MethodState
Lens' MethodState ValueState
lensMStoVS (StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ()))
-> StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ())
forall a b. (a -> b) -> a -> b
$ SValue CodeInfoOO -> StateT ValueState Identity (CodeInfoOO ())
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1 SValue CodeInfoOO
v
discardFileInput :: SValue CodeInfoOO -> MS (CodeInfoOO ())
discardFileInput = LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
-> StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ())
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO ()) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO ()) MethodState
Lens' MethodState ValueState
lensMStoVS (StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ()))
-> (SValue CodeInfoOO
-> StateT ValueState Identity (CodeInfoOO ()))
-> SValue CodeInfoOO
-> MS (CodeInfoOO ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SValue CodeInfoOO -> StateT ValueState Identity (CodeInfoOO ())
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1
getFileInputLine :: SValue CodeInfoOO -> SVariable CodeInfoOO -> MS (CodeInfoOO ())
getFileInputLine SValue CodeInfoOO
v SVariable CodeInfoOO
_ = LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
-> StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ())
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO ()) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO ()) MethodState
Lens' MethodState ValueState
lensMStoVS (StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ()))
-> StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ())
forall a b. (a -> b) -> a -> b
$ SValue CodeInfoOO -> StateT ValueState Identity (CodeInfoOO ())
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1 SValue CodeInfoOO
v
discardFileLine :: SValue CodeInfoOO -> MS (CodeInfoOO ())
discardFileLine = LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
-> StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ())
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO ()) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO ()) MethodState
Lens' MethodState ValueState
lensMStoVS (StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ()))
-> (SValue CodeInfoOO
-> StateT ValueState Identity (CodeInfoOO ()))
-> SValue CodeInfoOO
-> MS (CodeInfoOO ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SValue CodeInfoOO -> StateT ValueState Identity (CodeInfoOO ())
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1
getFileInputAll :: SValue CodeInfoOO -> SVariable CodeInfoOO -> MS (CodeInfoOO ())
getFileInputAll SValue CodeInfoOO
v SVariable CodeInfoOO
_ = State MethodState (CodeInfoOO Value) -> MS (CodeInfoOO ())
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1 (LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO Value))
MethodState
ValueState
-> SValue CodeInfoOO -> State MethodState (CodeInfoOO Value)
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO Value))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO Value) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO Value) MethodState
Lens' MethodState ValueState
lensMStoVS SValue CodeInfoOO
v)
instance StringStatement CodeInfoOO () where
stringSplit :: Char
-> SVariable CodeInfoOO -> SValue CodeInfoOO -> MS (CodeInfoOO ())
stringSplit Char
_ SVariable CodeInfoOO
_ = LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
-> StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ())
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO ()) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO ()) MethodState
Lens' MethodState ValueState
lensMStoVS (StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ()))
-> (SValue CodeInfoOO
-> StateT ValueState Identity (CodeInfoOO ()))
-> SValue CodeInfoOO
-> MS (CodeInfoOO ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SValue CodeInfoOO -> StateT ValueState Identity (CodeInfoOO ())
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1
stringListVals :: [SVariable CodeInfoOO] -> SValue CodeInfoOO -> MS (CodeInfoOO ())
stringListVals [SVariable CodeInfoOO]
_ = LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
-> StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ())
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO ()) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO ()) MethodState
Lens' MethodState ValueState
lensMStoVS (StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ()))
-> (SValue CodeInfoOO
-> StateT ValueState Identity (CodeInfoOO ()))
-> SValue CodeInfoOO
-> MS (CodeInfoOO ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SValue CodeInfoOO -> StateT ValueState Identity (CodeInfoOO ())
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1
stringListLists :: [SVariable CodeInfoOO] -> SValue CodeInfoOO -> MS (CodeInfoOO ())
stringListLists [SVariable CodeInfoOO]
_ = LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
-> StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ())
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO ()) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO ()) MethodState
Lens' MethodState ValueState
lensMStoVS (StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ()))
-> (SValue CodeInfoOO
-> StateT ValueState Identity (CodeInfoOO ()))
-> SValue CodeInfoOO
-> MS (CodeInfoOO ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SValue CodeInfoOO -> StateT ValueState Identity (CodeInfoOO ())
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1
instance FuncAppStatement CodeInfoOO () where
inOutCall :: InOutCall CodeInfoOO ()
inOutCall String
n [SValue CodeInfoOO]
vs [SVariable CodeInfoOO]
_ [SVariable CodeInfoOO]
_ = LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
-> StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ())
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO ()) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO ()) MethodState
Lens' MethodState ValueState
lensMStoVS (StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ()))
-> StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ())
forall a b. (a -> b) -> a -> b
$ do
[SValue CodeInfoOO] -> StateT ValueState Identity ()
forall (t :: * -> *) (m :: * -> *) a.
(Foldable t, Monad m) =>
t (m a) -> m ()
sequence_ [SValue CodeInfoOO]
vs
String -> StateT ValueState Identity (CodeInfoOO ())
addCurrModCallSmt String
n
extInOutCall :: String -> InOutCall CodeInfoOO ()
extInOutCall String
l String
n [SValue CodeInfoOO]
vs [SVariable CodeInfoOO]
_ [SVariable CodeInfoOO]
_ = LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
-> StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ())
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO ()) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO ()) MethodState
Lens' MethodState ValueState
lensMStoVS (StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ()))
-> StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ())
forall a b. (a -> b) -> a -> b
$ do
[SValue CodeInfoOO] -> StateT ValueState Identity ()
forall (t :: * -> *) (m :: * -> *) a.
(Foldable t, Monad m) =>
t (m a) -> m ()
sequence_ [SValue CodeInfoOO]
vs
String -> String -> StateT ValueState Identity (CodeInfoOO ())
addExternalCallSmt String
l String
n
instance OOFuncAppStatement CodeInfoOO () where
selfInOutCall :: InOutCall CodeInfoOO ()
selfInOutCall String
n [SValue CodeInfoOO]
vs [SVariable CodeInfoOO]
_ [SVariable CodeInfoOO]
_ = LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
-> StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ())
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO ()) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO ()) MethodState
Lens' MethodState ValueState
lensMStoVS (StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ()))
-> StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ())
forall a b. (a -> b) -> a -> b
$ do
[SValue CodeInfoOO] -> StateT ValueState Identity ()
forall (t :: * -> *) (m :: * -> *) a.
(Foldable t, Monad m) =>
t (m a) -> m ()
sequence_ [SValue CodeInfoOO]
vs
String -> StateT ValueState Identity (CodeInfoOO ())
addCurrModCallSmt String
n
instance CommentStatement CodeInfoOO () where
comment :: String -> MS (CodeInfoOO ())
comment String
_ = MS (CodeInfoOO ())
forall s. State s (CodeInfoOO ())
noInfo
instance ControlStatement CodeInfoOO () () where
break :: MS (CodeInfoOO ())
break = MS (CodeInfoOO ())
forall s. State s (CodeInfoOO ())
noInfo
continue :: MS (CodeInfoOO ())
continue = MS (CodeInfoOO ())
forall s. State s (CodeInfoOO ())
noInfo
returnStmt :: SValue CodeInfoOO -> MS (CodeInfoOO ())
returnStmt = LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
-> StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ())
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO ()))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO ()) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO ()) MethodState
Lens' MethodState ValueState
lensMStoVS (StateT ValueState Identity (CodeInfoOO ()) -> MS (CodeInfoOO ()))
-> (SValue CodeInfoOO
-> StateT ValueState Identity (CodeInfoOO ()))
-> SValue CodeInfoOO
-> MS (CodeInfoOO ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SValue CodeInfoOO -> StateT ValueState Identity (CodeInfoOO ())
forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1
throw :: String -> MS (CodeInfoOO ())
throw String
_ = (MethodState -> MethodState) -> CodeInfoOO () -> MS (CodeInfoOO ())
forall s a. (s -> s) -> a -> State s a
modifyReturn (ExceptionType -> MethodState -> MethodState
addException ExceptionType
Standard) (() -> CodeInfoOO ()
forall (r :: * -> *) a. Monad r => a -> r a
toCode ())
ifCond :: [(SValue CodeInfoOO, MS (CodeInfoOO ()))]
-> MS (CodeInfoOO ()) -> MS (CodeInfoOO ())
ifCond = [(SValue CodeInfoOO, MS (CodeInfoOO ()))]
-> MS (CodeInfoOO ()) -> MS (CodeInfoOO ())
evalConds
switch :: SValue CodeInfoOO
-> [(SValue CodeInfoOO, MS (CodeInfoOO ()))]
-> MS (CodeInfoOO ())
-> MS (CodeInfoOO ())
switch SValue CodeInfoOO
v [(SValue CodeInfoOO, MS (CodeInfoOO ()))]
cs MS (CodeInfoOO ())
b = do
_ <- LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO Value))
MethodState
ValueState
-> SValue CodeInfoOO -> State MethodState (CodeInfoOO Value)
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO Value))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO Value) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO Value) MethodState
Lens' MethodState ValueState
lensMStoVS SValue CodeInfoOO
v
evalConds cs b
ifExists :: SValue CodeInfoOO
-> MS (CodeInfoOO ()) -> MS (CodeInfoOO ()) -> MS (CodeInfoOO ())
ifExists SValue CodeInfoOO
v MS (CodeInfoOO ())
t MS (CodeInfoOO ())
f = do
_ <- LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO Value))
MethodState
ValueState
-> SValue CodeInfoOO -> State MethodState (CodeInfoOO Value)
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO Value))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO Value) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO Value) MethodState
Lens' MethodState ValueState
lensMStoVS SValue CodeInfoOO
v
_ <- t
_ <- f
return $ return $ error "[bool] The return value of this isn't used, and the thunk shouldn't fire."
for :: MS (CodeInfoOO ())
-> SValue CodeInfoOO
-> MS (CodeInfoOO ())
-> MS (CodeInfoOO ())
-> MS (CodeInfoOO ())
for MS (CodeInfoOO ())
dec SValue CodeInfoOO
v MS (CodeInfoOO ())
stmt MS (CodeInfoOO ())
bod = do
_ <- MS (CodeInfoOO ())
dec
_ <- zoom lensMStoVS v
_ <- stmt
_ <- bod
return $ return $ error "[bool] The return value of this isn't used, and the thunk shouldn't fire."
forRange :: SVariable CodeInfoOO
-> SValue CodeInfoOO
-> SValue CodeInfoOO
-> SValue CodeInfoOO
-> MS (CodeInfoOO ())
-> MS (CodeInfoOO ())
forRange SVariable CodeInfoOO
_ SValue CodeInfoOO
b SValue CodeInfoOO
e SValue CodeInfoOO
s MS (CodeInfoOO ())
bod = do
_ <- LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO Value))
MethodState
ValueState
-> SValue CodeInfoOO -> State MethodState (CodeInfoOO Value)
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO Value))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO Value) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO Value) MethodState
Lens' MethodState ValueState
lensMStoVS SValue CodeInfoOO
b
_ <- zoom lensMStoVS e
_ <- zoom lensMStoVS s
_ <- bod
return $ return $ error "[bool] The return value of this isn't used, and the thunk shouldn't fire."
forEach :: SVariable CodeInfoOO
-> SValue CodeInfoOO -> MS (CodeInfoOO ()) -> MS (CodeInfoOO ())
forEach SVariable CodeInfoOO
_ SValue CodeInfoOO
v MS (CodeInfoOO ())
bod = do
_ <- LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO Value))
MethodState
ValueState
-> SValue CodeInfoOO -> State MethodState (CodeInfoOO Value)
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO Value))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO Value) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO Value) MethodState
Lens' MethodState ValueState
lensMStoVS SValue CodeInfoOO
v
_ <- bod
return $ return $ error "[bool] The return value of this isn't used, and the thunk shouldn't fire."
while :: SValue CodeInfoOO -> MS (CodeInfoOO ()) -> MS (CodeInfoOO ())
while SValue CodeInfoOO
v MS (CodeInfoOO ())
bod = do
_ <- LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO Value))
MethodState
ValueState
-> SValue CodeInfoOO -> State MethodState (CodeInfoOO Value)
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO Value))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO Value) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO Value) MethodState
Lens' MethodState ValueState
lensMStoVS SValue CodeInfoOO
v
_ <- bod
return $ return $ error "[bool] The return value of this isn't used, and the thunk shouldn't fire."
tryCatch :: MS (CodeInfoOO ()) -> MS (CodeInfoOO ()) -> MS (CodeInfoOO ())
tryCatch MS (CodeInfoOO ())
_ MS (CodeInfoOO ())
cb = do
_ <- MS (CodeInfoOO ())
cb
noInfo
assert :: SValue CodeInfoOO -> SValue CodeInfoOO -> MS (CodeInfoOO ())
assert SValue CodeInfoOO
cond SValue CodeInfoOO
msg = do
_ <- LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO Value))
MethodState
ValueState
-> SValue CodeInfoOO -> State MethodState (CodeInfoOO Value)
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO Value))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO Value) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO Value) MethodState
Lens' MethodState ValueState
lensMStoVS SValue CodeInfoOO
cond
_ <- zoom lensMStoVS msg
noInfo
instance ObserverPattern CodeInfoOO () where
notifyObservers :: VS (CodeInfoOO FuncData)
-> VS (CodeInfoOO TypeData) -> MS (CodeInfoOO ())
notifyObservers VS (CodeInfoOO FuncData)
f VS (CodeInfoOO TypeData)
_ = do
_ <- LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO FuncData))
MethodState
ValueState
-> VS (CodeInfoOO FuncData)
-> StateT MethodState Identity (CodeInfoOO FuncData)
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO FuncData))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO FuncData) ValueState)
-> MethodState
-> Focusing Identity (CodeInfoOO FuncData) MethodState
Lens' MethodState ValueState
lensMStoVS VS (CodeInfoOO FuncData)
f
return $ return $ error "The return value of this isn't used, and the thunk shouldn't fire."
instance StrategyPattern CodeInfoOO () () where
runStrategy :: String
-> [(String, MS (CodeInfoOO ()))]
-> Maybe (SValue CodeInfoOO)
-> Maybe (SVariable CodeInfoOO)
-> MS (CodeInfoOO ())
runStrategy String
_ [(String, MS (CodeInfoOO ()))]
ss Maybe (SValue CodeInfoOO)
vl Maybe (SVariable CodeInfoOO)
_ = do
((String, MS (CodeInfoOO ())) -> MS (CodeInfoOO ()))
-> [(String, MS (CodeInfoOO ()))] -> StateT MethodState Identity ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ (String, MS (CodeInfoOO ())) -> MS (CodeInfoOO ())
forall a b. (a, b) -> b
snd [(String, MS (CodeInfoOO ()))]
ss
_ <- LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO Value))
MethodState
ValueState
-> SValue CodeInfoOO -> State MethodState (CodeInfoOO Value)
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO Value))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO Value) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO Value) MethodState
Lens' MethodState ValueState
lensMStoVS (SValue CodeInfoOO -> State MethodState (CodeInfoOO Value))
-> SValue CodeInfoOO -> State MethodState (CodeInfoOO Value)
forall a b. (a -> b) -> a -> b
$ SValue CodeInfoOO -> Maybe (SValue CodeInfoOO) -> SValue CodeInfoOO
forall a. a -> Maybe a -> a
fromMaybe (CodeInfoOO Value -> SValue CodeInfoOO
forall a. a -> StateT ValueState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO Value -> SValue CodeInfoOO)
-> CodeInfoOO Value -> SValue CodeInfoOO
forall a b. (a -> b) -> a -> b
$ Value -> CodeInfoOO Value
forall a. a -> CodeInfoOO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Value -> CodeInfoOO Value) -> Value -> CodeInfoOO Value
forall a b. (a -> b) -> a -> b
$ String -> Value
forall a. HasCallStack => String -> a
error String
"[runStrategy] The return value of this isn't used, and the thunk shouldn't fire.") Maybe (SValue CodeInfoOO)
vl
return $ return $ error "[runStrategy] The return value of this isn't used, and the thunk shouldn't fire."
instance VisibilitySym CodeInfoOO () where
private :: CodeInfoOO ()
private = () -> CodeInfoOO ()
forall a. a -> CodeInfoOO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
public :: CodeInfoOO ()
public = () -> CodeInfoOO ()
forall a. a -> CodeInfoOO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
instance ParameterSym CodeInfoOO where
param :: SVariable CodeInfoOO -> MS (CodeInfoOO ParamData)
param SVariable CodeInfoOO
_ = CodeInfoOO ParamData -> MS (CodeInfoOO ParamData)
forall a. a -> StateT MethodState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO ParamData -> MS (CodeInfoOO ParamData))
-> CodeInfoOO ParamData -> MS (CodeInfoOO ParamData)
forall a b. (a -> b) -> a -> b
$ ParamData -> CodeInfoOO ParamData
forall a. a -> CodeInfoOO a
forall (m :: * -> *) a. Monad m => a -> m a
return (ParamData -> CodeInfoOO ParamData)
-> ParamData -> CodeInfoOO ParamData
forall a b. (a -> b) -> a -> b
$ String -> ParamData
forall a. HasCallStack => String -> a
error String
"The return value of this isn't used, and the thunk shouldn't fire."
pointerParam :: SVariable CodeInfoOO -> MS (CodeInfoOO ParamData)
pointerParam SVariable CodeInfoOO
_ = CodeInfoOO ParamData -> MS (CodeInfoOO ParamData)
forall a. a -> StateT MethodState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO ParamData -> MS (CodeInfoOO ParamData))
-> CodeInfoOO ParamData -> MS (CodeInfoOO ParamData)
forall a b. (a -> b) -> a -> b
$ ParamData -> CodeInfoOO ParamData
forall a. a -> CodeInfoOO a
forall (m :: * -> *) a. Monad m => a -> m a
return (ParamData -> CodeInfoOO ParamData)
-> ParamData -> CodeInfoOO ParamData
forall a b. (a -> b) -> a -> b
$ String -> ParamData
forall a. HasCallStack => String -> a
error String
"The return value of this isn't used, and the thunk shouldn't fire."
instance MethodSym CodeInfoOO () () () where
docMain :: MS (CodeInfoOO ()) -> MS (CodeInfoOO ())
docMain = String -> MS (CodeInfoOO ()) -> MS (CodeInfoOO ())
updateMEMandCM String
"main"
function :: String
-> CodeInfoOO ()
-> VS (CodeInfoOO TypeData)
-> [MS (CodeInfoOO ParamData)]
-> MS (CodeInfoOO ())
-> MS (CodeInfoOO ())
function String
n CodeInfoOO ()
_ VS (CodeInfoOO TypeData)
_ [MS (CodeInfoOO ParamData)]
_ = String -> MS (CodeInfoOO ()) -> MS (CodeInfoOO ())
updateMEMandCM String
n
mainFunction :: MS (CodeInfoOO ()) -> MS (CodeInfoOO ())
mainFunction = String -> MS (CodeInfoOO ()) -> MS (CodeInfoOO ())
updateMEMandCM String
"main"
docFunc :: String
-> [String]
-> Maybe String
-> MS (CodeInfoOO ())
-> MS (CodeInfoOO ())
docFunc String
_ [String]
_ Maybe String
_ MS (CodeInfoOO ())
f = do
_ <- MS (CodeInfoOO ())
f
noInfo
inOutFunc :: String -> CodeInfoOO () -> InOutFunc CodeInfoOO () ()
inOutFunc String
n CodeInfoOO ()
_ [SVariable CodeInfoOO]
_ [SVariable CodeInfoOO]
_ [SVariable CodeInfoOO]
_ = String -> MS (CodeInfoOO ()) -> MS (CodeInfoOO ())
updateMEMandCM String
n
docInOutFunc :: String -> CodeInfoOO () -> DocInOutFunc CodeInfoOO () ()
docInOutFunc String
n CodeInfoOO ()
_ String
_ [(String, SVariable CodeInfoOO)]
_ [(String, SVariable CodeInfoOO)]
_ [(String, SVariable CodeInfoOO)]
_ = String -> MS (CodeInfoOO ()) -> MS (CodeInfoOO ())
updateMEMandCM String
n
instance OOMethodSym CodeInfoOO () () () () where
method :: String
-> CodeInfoOO ()
-> CodeInfoOO ()
-> VS (CodeInfoOO TypeData)
-> [MS (CodeInfoOO ParamData)]
-> MS (CodeInfoOO ())
-> MS (CodeInfoOO ())
method String
n CodeInfoOO ()
_ CodeInfoOO ()
_ VS (CodeInfoOO TypeData)
_ [MS (CodeInfoOO ParamData)]
_ = String -> MS (CodeInfoOO ()) -> MS (CodeInfoOO ())
updateMEMandCM String
n
getMethod :: SVariable CodeInfoOO -> MS (CodeInfoOO ())
getMethod SVariable CodeInfoOO
_ = MS (CodeInfoOO ())
forall s. State s (CodeInfoOO ())
noInfo
setMethod :: SVariable CodeInfoOO -> MS (CodeInfoOO ())
setMethod SVariable CodeInfoOO
_ = MS (CodeInfoOO ())
forall s. State s (CodeInfoOO ())
noInfo
constructor :: [MS (CodeInfoOO ParamData)]
-> NamedArgs CodeInfoOO -> MS (CodeInfoOO ()) -> MS (CodeInfoOO ())
constructor [MS (CodeInfoOO ParamData)]
_ NamedArgs CodeInfoOO
il MS (CodeInfoOO ())
b = do
((SVariable CodeInfoOO, SValue CodeInfoOO)
-> State MethodState (CodeInfoOO Value))
-> NamedArgs CodeInfoOO -> StateT MethodState Identity ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ (LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO Value))
MethodState
ValueState
-> SValue CodeInfoOO -> State MethodState (CodeInfoOO Value)
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO Value))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO Value) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO Value) MethodState
Lens' MethodState ValueState
lensMStoVS (SValue CodeInfoOO -> State MethodState (CodeInfoOO Value))
-> ((SVariable CodeInfoOO, SValue CodeInfoOO) -> SValue CodeInfoOO)
-> (SVariable CodeInfoOO, SValue CodeInfoOO)
-> State MethodState (CodeInfoOO Value)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (SVariable CodeInfoOO, SValue CodeInfoOO) -> SValue CodeInfoOO
forall a b. (a, b) -> b
snd) NamedArgs CodeInfoOO
il
_ <- MS (CodeInfoOO ())
b
cn <- getClassName
modify (updateCallMap cn . updateMethodExcMap cn)
noInfo
inOutMethod :: String
-> CodeInfoOO () -> CodeInfoOO () -> InOutFunc CodeInfoOO () ()
inOutMethod String
n CodeInfoOO ()
_ CodeInfoOO ()
_ [SVariable CodeInfoOO]
_ [SVariable CodeInfoOO]
_ [SVariable CodeInfoOO]
_ = String -> MS (CodeInfoOO ()) -> MS (CodeInfoOO ())
updateMEMandCM String
n
docInOutMethod :: String
-> CodeInfoOO () -> CodeInfoOO () -> DocInOutFunc CodeInfoOO () ()
docInOutMethod String
n CodeInfoOO ()
_ CodeInfoOO ()
_ String
_ [(String, SVariable CodeInfoOO)]
_ [(String, SVariable CodeInfoOO)]
_ [(String, SVariable CodeInfoOO)]
_ = String -> MS (CodeInfoOO ()) -> MS (CodeInfoOO ())
updateMEMandCM String
n
instance StateVarSym CodeInfoOO () () () where
stateVar :: CodeInfoOO ()
-> CodeInfoOO ()
-> SVariable CodeInfoOO
-> CSStateVar CodeInfoOO ()
stateVar CodeInfoOO ()
_ CodeInfoOO ()
_ SVariable CodeInfoOO
_ = CSStateVar CodeInfoOO ()
forall s. State s (CodeInfoOO ())
noInfo
stateVarDef :: CodeInfoOO ()
-> CodeInfoOO ()
-> SVariable CodeInfoOO
-> SValue CodeInfoOO
-> CSStateVar CodeInfoOO ()
stateVarDef CodeInfoOO ()
_ CodeInfoOO ()
_ SVariable CodeInfoOO
_ SValue CodeInfoOO
_ = CSStateVar CodeInfoOO ()
forall s. State s (CodeInfoOO ())
noInfo
constVar :: CodeInfoOO ()
-> SVariable CodeInfoOO
-> SValue CodeInfoOO
-> CSStateVar CodeInfoOO ()
constVar CodeInfoOO ()
_ SVariable CodeInfoOO
_ SValue CodeInfoOO
_ = CSStateVar CodeInfoOO ()
forall s. State s (CodeInfoOO ())
noInfo
instance ClassSym CodeInfoOO () () () () where
buildClass :: Maybe String
-> [CSStateVar CodeInfoOO ()]
-> [MS (CodeInfoOO ())]
-> [MS (CodeInfoOO ())]
-> CS (CodeInfoOO Class)
buildClass Maybe String
_ [CSStateVar CodeInfoOO ()]
_ [MS (CodeInfoOO ())]
cs [MS (CodeInfoOO ())]
ms = do
n <- LensLike'
(Zoomed (StateT FileState Identity) String) ClassState FileState
-> StateT FileState Identity String
-> StateT ClassState Identity String
forall c.
LensLike'
(Zoomed (StateT FileState Identity) c) ClassState FileState
-> StateT FileState Identity c -> StateT ClassState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT FileState Identity) String) ClassState FileState
(FileState -> Focusing Identity String FileState)
-> ClassState -> Focusing Identity String ClassState
Lens' ClassState FileState
lensCStoFS StateT FileState Identity String
getModuleName
implementingClass n [] [] cs ms
extraClass :: String
-> Maybe String
-> [CSStateVar CodeInfoOO ()]
-> [MS (CodeInfoOO ())]
-> [MS (CodeInfoOO ())]
-> CS (CodeInfoOO Class)
extraClass String
n Maybe String
_ [CSStateVar CodeInfoOO ()]
_ [MS (CodeInfoOO ())]
cs [MS (CodeInfoOO ())]
ms = do
(ClassState -> ClassState) -> StateT ClassState Identity ()
forall s (m :: * -> *). MonadState s m => (s -> s) -> m ()
modify (String -> ClassState -> ClassState
setClassName String
n)
(MS (CodeInfoOO ()) -> CSStateVar CodeInfoOO ())
-> [MS (CodeInfoOO ())] -> StateT ClassState Identity ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ (LensLike'
(Zoomed (StateT MethodState Identity) (CodeInfoOO ()))
ClassState
MethodState
-> MS (CodeInfoOO ()) -> CSStateVar CodeInfoOO ()
forall c.
LensLike'
(Zoomed (StateT MethodState Identity) c) ClassState MethodState
-> StateT MethodState Identity c -> StateT ClassState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT MethodState Identity) (CodeInfoOO ()))
ClassState
MethodState
(MethodState -> Focusing Identity (CodeInfoOO ()) MethodState)
-> ClassState -> Focusing Identity (CodeInfoOO ()) ClassState
Lens' ClassState MethodState
lensCStoMS) [MS (CodeInfoOO ())]
cs
(MS (CodeInfoOO ()) -> CSStateVar CodeInfoOO ())
-> [MS (CodeInfoOO ())] -> StateT ClassState Identity ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ (LensLike'
(Zoomed (StateT MethodState Identity) (CodeInfoOO ()))
ClassState
MethodState
-> MS (CodeInfoOO ()) -> CSStateVar CodeInfoOO ()
forall c.
LensLike'
(Zoomed (StateT MethodState Identity) c) ClassState MethodState
-> StateT MethodState Identity c -> StateT ClassState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT MethodState Identity) (CodeInfoOO ()))
ClassState
MethodState
(MethodState -> Focusing Identity (CodeInfoOO ()) MethodState)
-> ClassState -> Focusing Identity (CodeInfoOO ()) ClassState
Lens' ClassState MethodState
lensCStoMS) [MS (CodeInfoOO ())]
ms
CodeInfoOO Class -> CS (CodeInfoOO Class)
forall a. a -> StateT ClassState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO Class -> CS (CodeInfoOO Class))
-> CodeInfoOO Class -> CS (CodeInfoOO Class)
forall a b. (a -> b) -> a -> b
$ String -> CodeInfoOO Class
forall a. HasCallStack => String -> a
error String
"[extraClass] The return value of this isn't used, and the thunk shouldn't fire."
implementingClass :: String
-> [String]
-> [CSStateVar CodeInfoOO ()]
-> [MS (CodeInfoOO ())]
-> [MS (CodeInfoOO ())]
-> CS (CodeInfoOO Class)
implementingClass String
n [String]
_ [CSStateVar CodeInfoOO ()]
_ [MS (CodeInfoOO ())]
cs [MS (CodeInfoOO ())]
ms = do
(ClassState -> ClassState) -> StateT ClassState Identity ()
forall s (m :: * -> *). MonadState s m => (s -> s) -> m ()
modify (String -> ClassState -> ClassState
addClass String
n (ClassState -> ClassState)
-> (ClassState -> ClassState) -> ClassState -> ClassState
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> ClassState -> ClassState
setClassName String
n)
(MS (CodeInfoOO ()) -> CSStateVar CodeInfoOO ())
-> [MS (CodeInfoOO ())] -> StateT ClassState Identity ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ (LensLike'
(Zoomed (StateT MethodState Identity) (CodeInfoOO ()))
ClassState
MethodState
-> MS (CodeInfoOO ()) -> CSStateVar CodeInfoOO ()
forall c.
LensLike'
(Zoomed (StateT MethodState Identity) c) ClassState MethodState
-> StateT MethodState Identity c -> StateT ClassState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT MethodState Identity) (CodeInfoOO ()))
ClassState
MethodState
(MethodState -> Focusing Identity (CodeInfoOO ()) MethodState)
-> ClassState -> Focusing Identity (CodeInfoOO ()) ClassState
Lens' ClassState MethodState
lensCStoMS) [MS (CodeInfoOO ())]
cs
(MS (CodeInfoOO ()) -> CSStateVar CodeInfoOO ())
-> [MS (CodeInfoOO ())] -> StateT ClassState Identity ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ (LensLike'
(Zoomed (StateT MethodState Identity) (CodeInfoOO ()))
ClassState
MethodState
-> MS (CodeInfoOO ()) -> CSStateVar CodeInfoOO ()
forall c.
LensLike'
(Zoomed (StateT MethodState Identity) c) ClassState MethodState
-> StateT MethodState Identity c -> StateT ClassState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT MethodState Identity) (CodeInfoOO ()))
ClassState
MethodState
(MethodState -> Focusing Identity (CodeInfoOO ()) MethodState)
-> ClassState -> Focusing Identity (CodeInfoOO ()) ClassState
Lens' ClassState MethodState
lensCStoMS) [MS (CodeInfoOO ())]
ms
CodeInfoOO Class -> CS (CodeInfoOO Class)
forall a. a -> StateT ClassState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO Class -> CS (CodeInfoOO Class))
-> CodeInfoOO Class -> CS (CodeInfoOO Class)
forall a b. (a -> b) -> a -> b
$ String -> CodeInfoOO Class
forall a. HasCallStack => String -> a
error String
"[implementingClass] The return value of this isn't used, and the thunk shouldn't fire."
docClass :: String -> CS (CodeInfoOO Class) -> CS (CodeInfoOO Class)
docClass String
_ CS (CodeInfoOO Class)
c = do
_ <- CS (CodeInfoOO Class)
c
return $ error "[docClass] The return value of this isn't used, and the thunk shouldn't fire."
instance ModuleSym CodeInfoOO () () where
buildModule :: String
-> [String]
-> [MS (CodeInfoOO ())]
-> [CS (CodeInfoOO Class)]
-> FS (CodeInfoOO ())
buildModule String
n [String]
_ [MS (CodeInfoOO ())]
funcs [CS (CodeInfoOO Class)]
classes = do
(FileState -> FileState) -> StateT FileState Identity ()
forall s (m :: * -> *). MonadState s m => (s -> s) -> m ()
modify (String -> FileState -> FileState
setModuleName String
n)
(CS (CodeInfoOO Class)
-> StateT FileState Identity (CodeInfoOO Class))
-> [CS (CodeInfoOO Class)] -> StateT FileState Identity ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ (LensLike'
(Zoomed (StateT ClassState Identity) (CodeInfoOO Class))
FileState
ClassState
-> CS (CodeInfoOO Class)
-> StateT FileState Identity (CodeInfoOO Class)
forall c.
LensLike'
(Zoomed (StateT ClassState Identity) c) FileState ClassState
-> StateT ClassState Identity c -> StateT FileState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ClassState Identity) (CodeInfoOO Class))
FileState
ClassState
(ClassState -> Focusing Identity (CodeInfoOO Class) ClassState)
-> FileState -> Focusing Identity (CodeInfoOO Class) FileState
Lens' FileState ClassState
lensFStoCS) [CS (CodeInfoOO Class)]
classes
(MS (CodeInfoOO ()) -> FS (CodeInfoOO ()))
-> [MS (CodeInfoOO ())] -> StateT FileState Identity ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ (LensLike'
(Zoomed (StateT MethodState Identity) (CodeInfoOO ()))
FileState
MethodState
-> MS (CodeInfoOO ()) -> FS (CodeInfoOO ())
forall c.
LensLike'
(Zoomed (StateT MethodState Identity) c) FileState MethodState
-> StateT MethodState Identity c -> StateT FileState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT MethodState Identity) (CodeInfoOO ()))
FileState
MethodState
(MethodState -> Focusing Identity (CodeInfoOO ()) MethodState)
-> FileState -> Focusing Identity (CodeInfoOO ()) FileState
Lens' FileState MethodState
lensFStoMS) [MS (CodeInfoOO ())]
funcs
(FileState -> FileState) -> CodeInfoOO () -> FS (CodeInfoOO ())
forall s a. (s -> s) -> a -> State s a
modifyReturn (String -> FileState -> FileState
updateClassMap String
n) (() -> CodeInfoOO ()
forall a. a -> CodeInfoOO a
forall (m :: * -> *) a. Monad m => a -> m a
return (() -> CodeInfoOO ()) -> () -> CodeInfoOO ()
forall a b. (a -> b) -> a -> b
$ String -> ()
forall a. HasCallStack => String -> a
error String
"[buildModule] The return value of this isn't used, and the thunk shouldn't fire.")
noInfo :: State s (CodeInfoOO ())
noInfo :: forall s. State s (CodeInfoOO ())
noInfo = CodeInfoOO () -> State s (CodeInfoOO ())
forall a s. a -> State s a
toState (CodeInfoOO () -> State s (CodeInfoOO ()))
-> CodeInfoOO () -> State s (CodeInfoOO ())
forall a b. (a -> b) -> a -> b
$ () -> CodeInfoOO ()
forall (r :: * -> *) a. Monad r => a -> r a
toCode ()
noInfoScope :: CodeInfoOO ScopeData
noInfoScope :: CodeInfoOO ScopeData
noInfoScope = ScopeData -> CodeInfoOO ScopeData
forall a. a -> CodeInfoOO a
forall (m :: * -> *) a. Monad m => a -> m a
return (ScopeData -> CodeInfoOO ScopeData)
-> ScopeData -> CodeInfoOO ScopeData
forall a b. (a -> b) -> a -> b
$ ScopeTag -> ScopeData
sd ScopeTag
Global
noInfoBinder :: VSBinder CodeInfoOO
noInfoBinder :: VSBinder CodeInfoOO
noInfoBinder = CodeInfoOO BinderD -> VSBinder CodeInfoOO
forall a. a -> StateT ValueState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO BinderD -> VSBinder CodeInfoOO)
-> CodeInfoOO BinderD -> VSBinder CodeInfoOO
forall a b. (a -> b) -> a -> b
$ BinderD -> CodeInfoOO BinderD
forall a. a -> CodeInfoOO a
forall (m :: * -> *) a. Monad m => a -> m a
return (BinderD -> CodeInfoOO BinderD) -> BinderD -> CodeInfoOO BinderD
forall a b. (a -> b) -> a -> b
$ String -> TypeData -> BinderD
bindFormD String
"" (CodeType -> String -> Class -> TypeData
td CodeType
Void String
"" Class
empty)
updateMEMandCM :: String -> MS (CodeInfoOO ()) -> MS (CodeInfoOO ())
updateMEMandCM :: String -> MS (CodeInfoOO ()) -> MS (CodeInfoOO ())
updateMEMandCM String
n MS (CodeInfoOO ())
b = do
_ <- MS (CodeInfoOO ())
b
modify (updateCallMap n . updateMethodExcMap n)
noInfo
evalConds :: [(SValue CodeInfoOO, MS (CodeInfoOO ()))] -> MS (CodeInfoOO ()) ->
MS (CodeInfoOO ())
evalConds :: [(SValue CodeInfoOO, MS (CodeInfoOO ()))]
-> MS (CodeInfoOO ()) -> MS (CodeInfoOO ())
evalConds [(SValue CodeInfoOO, MS (CodeInfoOO ()))]
cs MS (CodeInfoOO ())
def = do
((SValue CodeInfoOO, MS (CodeInfoOO ()))
-> State MethodState (CodeInfoOO Value))
-> [(SValue CodeInfoOO, MS (CodeInfoOO ()))]
-> StateT MethodState Identity ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ (LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO Value))
MethodState
ValueState
-> SValue CodeInfoOO -> State MethodState (CodeInfoOO Value)
forall c.
LensLike'
(Zoomed (StateT ValueState Identity) c) MethodState ValueState
-> StateT ValueState Identity c -> StateT MethodState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT ValueState Identity) (CodeInfoOO Value))
MethodState
ValueState
(ValueState -> Focusing Identity (CodeInfoOO Value) ValueState)
-> MethodState -> Focusing Identity (CodeInfoOO Value) MethodState
Lens' MethodState ValueState
lensMStoVS (SValue CodeInfoOO -> State MethodState (CodeInfoOO Value))
-> ((SValue CodeInfoOO, MS (CodeInfoOO ())) -> SValue CodeInfoOO)
-> (SValue CodeInfoOO, MS (CodeInfoOO ()))
-> State MethodState (CodeInfoOO Value)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (SValue CodeInfoOO, MS (CodeInfoOO ())) -> SValue CodeInfoOO
forall a b. (a, b) -> a
fst) [(SValue CodeInfoOO, MS (CodeInfoOO ()))]
cs
((SValue CodeInfoOO, MS (CodeInfoOO ())) -> MS (CodeInfoOO ()))
-> [(SValue CodeInfoOO, MS (CodeInfoOO ()))]
-> StateT MethodState Identity ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ (SValue CodeInfoOO, MS (CodeInfoOO ())) -> MS (CodeInfoOO ())
forall a b. (a, b) -> b
snd [(SValue CodeInfoOO, MS (CodeInfoOO ()))]
cs
_ <- MS (CodeInfoOO ())
def
noInfo
addCurrModCallVal :: String -> SValue CodeInfoOO
addCurrModCallVal :: String -> SValue CodeInfoOO
addCurrModCallVal String
n = do
mn <- LensLike'
(Zoomed (StateT FileState Identity) String) ValueState FileState
-> StateT FileState Identity String
-> StateT ValueState Identity String
forall c.
LensLike'
(Zoomed (StateT FileState Identity) c) ValueState FileState
-> StateT FileState Identity c -> StateT ValueState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT FileState Identity) String) ValueState FileState
(FileState -> Focusing Identity String FileState)
-> ValueState -> Focusing Identity String ValueState
Lens' ValueState FileState
lensVStoFS StateT FileState Identity String
getModuleName
modify (addCall (qualName mn n))
return $ error "[addCurrModCallSmt] The return value of this isn't used, and the thunk shouldn't fire."
addCurrModCallSmt :: String -> VS (CodeInfoOO ())
addCurrModCallSmt :: String -> StateT ValueState Identity (CodeInfoOO ())
addCurrModCallSmt String
n = do
mn <- LensLike'
(Zoomed (StateT FileState Identity) String) ValueState FileState
-> StateT FileState Identity String
-> StateT ValueState Identity String
forall c.
LensLike'
(Zoomed (StateT FileState Identity) c) ValueState FileState
-> StateT FileState Identity c -> StateT ValueState Identity c
forall (m :: * -> *) (n :: * -> *) s t c.
Zoom m n s t =>
LensLike' (Zoomed m c) t s -> m c -> n c
zoom LensLike'
(Zoomed (StateT FileState Identity) String) ValueState FileState
(FileState -> Focusing Identity String FileState)
-> ValueState -> Focusing Identity String ValueState
Lens' ValueState FileState
lensVStoFS StateT FileState Identity String
getModuleName
modify (addCall (qualName mn n))
return $ error "[addCurrModCallSmt] The return value of this isn't used, and the thunk shouldn't fire."
addExternalCallSmt :: String -> String -> VS (CodeInfoOO ())
addExternalCallSmt :: String -> String -> StateT ValueState Identity (CodeInfoOO ())
addExternalCallSmt String
l String
n = do
(ValueState -> ValueState) -> StateT ValueState Identity ()
forall s (m :: * -> *). MonadState s m => (s -> s) -> m ()
modify (QualifiedName -> ValueState -> ValueState
addCall (String -> String -> QualifiedName
qualName String
l String
n))
CodeInfoOO () -> StateT ValueState Identity (CodeInfoOO ())
forall a. a -> StateT ValueState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO () -> StateT ValueState Identity (CodeInfoOO ()))
-> CodeInfoOO () -> StateT ValueState Identity (CodeInfoOO ())
forall a b. (a -> b) -> a -> b
$ String -> CodeInfoOO ()
forall a. HasCallStack => String -> a
error String
"[addExternalCall] The return value of this isn't used, and the thunk shouldn't fire."
addExternalCallVal :: String -> String -> SValue CodeInfoOO
addExternalCallVal :: String -> String -> SValue CodeInfoOO
addExternalCallVal String
l String
n = do
(ValueState -> ValueState) -> StateT ValueState Identity ()
forall s (m :: * -> *). MonadState s m => (s -> s) -> m ()
modify (QualifiedName -> ValueState -> ValueState
addCall (String -> String -> QualifiedName
qualName String
l String
n))
CodeInfoOO Value -> SValue CodeInfoOO
forall a. a -> StateT ValueState Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO Value -> SValue CodeInfoOO)
-> CodeInfoOO Value -> SValue CodeInfoOO
forall a b. (a -> b) -> a -> b
$ String -> CodeInfoOO Value
forall a. HasCallStack => String -> a
error String
"[addExternalCall] The return value of this isn't used, and the thunk shouldn't fire."
executeList :: [State a (CodeInfoOO ())] -> State a (CodeInfoOO ())
executeList :: forall a. [State a (CodeInfoOO ())] -> State a (CodeInfoOO ())
executeList [State a (CodeInfoOO ())]
l = do
[State a (CodeInfoOO ())] -> StateT a Identity ()
forall (t :: * -> *) (m :: * -> *) a.
(Foldable t, Monad m) =>
t (m a) -> m ()
sequence_ [State a (CodeInfoOO ())]
l
State a (CodeInfoOO ())
forall s. State s (CodeInfoOO ())
noInfo
executeListErr :: [State a (CodeInfoOO b)] -> State a (CodeInfoOO c)
executeListErr :: forall a b c. [State a (CodeInfoOO b)] -> State a (CodeInfoOO c)
executeListErr [State a (CodeInfoOO b)]
l = do
[State a (CodeInfoOO b)] -> StateT a Identity ()
forall (t :: * -> *) (m :: * -> *) a.
(Foldable t, Monad m) =>
t (m a) -> m ()
sequence_ [State a (CodeInfoOO b)]
l
CodeInfoOO c -> StateT a Identity (CodeInfoOO c)
forall a. a -> StateT a Identity a
forall (m :: * -> *) a. Monad m => a -> m a
return (CodeInfoOO c -> StateT a Identity (CodeInfoOO c))
-> CodeInfoOO c -> StateT a Identity (CodeInfoOO c)
forall a b. (a -> b) -> a -> b
$ c -> CodeInfoOO c
forall a. a -> CodeInfoOO a
forall (m :: * -> *) a. Monad m => a -> m a
return (c -> CodeInfoOO c) -> c -> CodeInfoOO c
forall a b. (a -> b) -> a -> b
$ String -> c
forall a. HasCallStack => String -> a
error String
"[executeListErr] The return value of this isn't used, and the thunk shouldn't fire."
execute1 :: State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1 :: forall a b c. State a (CodeInfoOO b) -> State a (CodeInfoOO c)
execute1 State a (CodeInfoOO b)
s = do
_ <- State a (CodeInfoOO b)
s
return $ return $ error "[execute1] The return value of this isn't used, and the thunk shouldn't fire."
execute2 :: State a (CodeInfoOO b) -> State a (CodeInfoOO c) ->
State a (CodeInfoOO d)
execute2 :: forall a b c d.
State a (CodeInfoOO b)
-> State a (CodeInfoOO c) -> State a (CodeInfoOO d)
execute2 State a (CodeInfoOO b)
s1 State a (CodeInfoOO c)
s2 = do
_ <- State a (CodeInfoOO b)
s1
execute1 s2
execute3 :: State a (CodeInfoOO b) -> State a (CodeInfoOO c) ->
State a (CodeInfoOO d) -> State a (CodeInfoOO e)
execute3 :: forall a b c d e.
State a (CodeInfoOO b)
-> State a (CodeInfoOO c)
-> State a (CodeInfoOO d)
-> State a (CodeInfoOO e)
execute3 State a (CodeInfoOO b)
s1 State a (CodeInfoOO c)
s2 State a (CodeInfoOO d)
s3 = do
_ <- State a (CodeInfoOO b)
s1
execute2 s2 s3
currModCall :: String -> [VS (CodeInfoOO Value)] ->
[(VS (CodeInfoOO Variable), VS (CodeInfoOO Value))] -> VS (CodeInfoOO Value)
currModCall :: String
-> [SValue CodeInfoOO] -> NamedArgs CodeInfoOO -> SValue CodeInfoOO
currModCall String
n [SValue CodeInfoOO]
ps NamedArgs CodeInfoOO
ns = do
[SValue CodeInfoOO] -> StateT ValueState Identity ()
forall (t :: * -> *) (m :: * -> *) a.
(Foldable t, Monad m) =>
t (m a) -> m ()
sequence_ [SValue CodeInfoOO]
ps
((SVariable CodeInfoOO, SValue CodeInfoOO) -> SVariable CodeInfoOO)
-> NamedArgs CodeInfoOO -> StateT ValueState Identity ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ (SVariable CodeInfoOO, SValue CodeInfoOO) -> SVariable CodeInfoOO
forall a b. (a, b) -> a
fst NamedArgs CodeInfoOO
ns
((SVariable CodeInfoOO, SValue CodeInfoOO) -> SValue CodeInfoOO)
-> NamedArgs CodeInfoOO -> StateT ValueState Identity ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ (SVariable CodeInfoOO, SValue CodeInfoOO) -> SValue CodeInfoOO
forall a b. (a, b) -> b
snd NamedArgs CodeInfoOO
ns
String -> SValue CodeInfoOO
addCurrModCallVal String
n