diff --git a/Project.toml b/Project.toml index 7bb35c956..88c9f86ac 100644 --- a/Project.toml +++ b/Project.toml @@ -21,6 +21,7 @@ Setfield = "efcf1570-3423-57d1-acb7-fd33fddbac46" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" +SymbolicIndexingInterface = "2efcf032-c050-4f8e-a9bb-153293bab1f5" TimerOutputs = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f" Unityper = "a7c27f48-0311-42f6-a7f8-2c11e75eb415" @@ -40,6 +41,7 @@ NaNMath = "0.3, 1" Setfield = "0.7, 0.8, 1" SpecialFunctions = "0.10, 1.0, 2" StaticArrays = "0.12, 1.0" +SymbolicIndexingInterface = "0.3" TimerOutputs = "0.5" Unityper = "0.1.2" julia = "1.3" diff --git a/src/SymbolicUtils.jl b/src/SymbolicUtils.jl index fab2b8645..d7e6a6a80 100644 --- a/src/SymbolicUtils.jl +++ b/src/SymbolicUtils.jl @@ -13,6 +13,7 @@ using Unityper using DataStructures using Setfield import Setfield: PropertyLens +using SymbolicIndexingInterface import Base: +, -, *, /, //, \, ^, ImmutableDict using ConstructionBase include("interface.jl") diff --git a/src/types.jl b/src/types.jl index c646ec47c..840f8a6e1 100644 --- a/src/types.jl +++ b/src/types.jl @@ -61,6 +61,10 @@ const EMPTY_DICT_T = typeof(EMPTY_DICT) end end +function SymbolicIndexingInterface.symbolic_type(::Type{<:BasicSymbolic}) + ScalarSymbolic() +end + function exprtype(x::BasicSymbolic) @compactified x::BasicSymbolic begin Term => TERM