X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.district.network%2Fscl%2FSimantics%2FDistrict.scl;h=f96ed607da33ee705fd591a08c946f401b3522ae;hb=0f88160c295af4ba04ce434bbe58ffea1d3d651d;hp=36dee3979b74ea97dbc7fc2e15fa507518332a11;hpb=70e529e0e17e2ad55462a303afa268d53c51c3a0;p=simantics%2Fdistrict.git diff --git a/org.simantics.district.network/scl/Simantics/District.scl b/org.simantics.district.network/scl/Simantics/District.scl index 36dee397..f96ed607 100644 --- a/org.simantics.district.network/scl/Simantics/District.scl +++ b/org.simantics.district.network/scl/Simantics/District.scl @@ -82,8 +82,8 @@ translateElement elem = do () importJava "org.simantics.district.network.DistrictNetworkUtil" where - createVertex :: Resource -> Vector Double -> Resource -> Resource - createEdge :: Resource -> Resource -> Resource + createVertex :: Resource -> Vector Double -> Double -> Resource -> Resource + createEdge :: Resource -> Resource -> Vector Double -> Resource """ Tries to look for the Resource representing the configuration component @@ -112,14 +112,14 @@ possibleMappedComponentVariable r = match possibleMappedComponent r with """ """ -possibleMappedComponentPropertyValue :: String -> Resource -> Maybe Double +possibleMappedComponentPropertyValue :: Serializable a => Typeable a => String -> Resource -> Maybe a possibleMappedComponentPropertyValue propName r = match possibleMappedComponentVariable r with Nothing -> Nothing Just mv -> possiblePropertyValue mv propName """ """ -mappedComponentPropertyValue :: Double -> String -> Resource -> Double +mappedComponentPropertyValue :: Serializable a => Typeable a => a -> String -> Resource -> a mappedComponentPropertyValue def propName r = match possibleMappedComponentVariable r with Nothing -> def Just mv -> match possiblePropertyValue mv propName with