Skip to content

Commit

Permalink
Renamed valueize and symbolize.
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanedds committed May 25, 2018
1 parent 8c3c7b4 commit 81b6b12
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Nu/Nu/Reflection.fs
Expand Up @@ -230,7 +230,7 @@ module Reflection =
| Some overlayNameOptProperty ->
match Map.tryFind overlayNameOptProperty.Name propertyDescriptors with
| Some overlayNameOptSymbol ->
let overlayNameOpt = valueize<string option> overlayNameOptSymbol
let overlayNameOpt = symbolToValue<string option> overlayNameOptSymbol
overlayNameOptProperty.SetValue (target, overlayNameOpt)
target
| None -> target
Expand All @@ -250,7 +250,7 @@ module Reflection =
targetProperties
match Map.tryFind facetNamesProperty.Name propertyDescriptors with
| Some facetNamesSymbol ->
let facetNames = valueize<string Set> facetNamesSymbol
let facetNames = symbolToValue<string Set> facetNamesSymbol
facetNamesProperty.SetValue (target, facetNames)
target
| None -> target
Expand Down
2 changes: 1 addition & 1 deletion Nu/Nu/WorldModuleGame.fs
Expand Up @@ -230,7 +230,7 @@ module WorldModuleGame =
let scriptOpt =
match symbolOpt with
| Some symbol ->
try let script = valueize<'a> symbol in Some script
try let script = symbolToValue<'a> symbol in Some script
with exn -> Log.debug ("Failed to convert symbol '" + scstring symbol + "' to value due to: " + scstring exn); None
| None -> None
(scriptOpt, world)
Expand Down
4 changes: 2 additions & 2 deletions Prime/Prime/SymbolicOperators.fs
Expand Up @@ -9,13 +9,13 @@ open Prime
module SymbolicOperators =

/// Convert a value to a symbol.
let symbolize<'a> (value : 'a) =
let valueToSymbol<'a> (value : 'a) =
let ty = if isNull (value :> obj) then typeof<'a> else getType value
let converter = SymbolicConverter (true, None, ty)
converter.ConvertTo (value, typeof<Symbol>) :?> Symbol

/// Convert a symbol to a value.
let valueize<'a> (symbol : Symbol) : 'a =
let symbolToValue<'a> (symbol : Symbol) : 'a =
let converter = SymbolicConverter (false, None, typeof<'a>)
converter.ConvertFrom symbol :?> 'a

Expand Down

0 comments on commit 81b6b12

Please sign in to comment.