diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2024-10-03 18:23:50 -0600 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2024-10-03 18:23:50 -0600 |
commit | 407e41489cc22fbf0518fd370530f8857b8c3ed0 (patch) | |
tree | 8c5f3fceb7c9e083033e06c818556eba1dcf9a06 /src/Language/Fiddle/Internal | |
parent | 72eeba5fd6178409b4aab5eb8dbfaf4460f6841c (diff) | |
download | fiddle-407e41489cc22fbf0518fd370530f8857b8c3ed0.tar.gz fiddle-407e41489cc22fbf0518fd370530f8857b8c3ed0.tar.bz2 fiddle-407e41489cc22fbf0518fd370530f8857b8c3ed0.zip |
Clean up warnings and remove unused files.
Diffstat (limited to 'src/Language/Fiddle/Internal')
-rw-r--r-- | src/Language/Fiddle/Internal/Scopes.hs | 9 | ||||
-rw-r--r-- | src/Language/Fiddle/Internal/UnitInterface.hs | 6 |
2 files changed, 7 insertions, 8 deletions
diff --git a/src/Language/Fiddle/Internal/Scopes.hs b/src/Language/Fiddle/Internal/Scopes.hs index 02c9a5a..70cadee 100644 --- a/src/Language/Fiddle/Internal/Scopes.hs +++ b/src/Language/Fiddle/Internal/Scopes.hs @@ -2,10 +2,9 @@ module Language.Fiddle.Internal.Scopes where -import Control.Monad (forM) import Data.Aeson import Data.Aeson.Key -import Data.List (inits, intercalate) +import Data.List (inits) import Data.List.NonEmpty (NonEmpty (..), prependList) import Data.Map (Map) import qualified Data.Map as Map @@ -129,10 +128,10 @@ lookupScopeWithPath (ScopePath current others) key scope = Nothing -> [] instance (ToJSONKey k, ToJSON v, Ord k) => ToJSON (Scope k v) where - toJSON (Scope subScopes scopeValues) = + toJSON scope = object - [ fromString "subScopes" .= toJSON subScopes, - fromString "scopeValues" .= toJSON scopeValues + [ fromString "subScopes" .= toJSON (subScopes scope), + fromString "scopeValues" .= toJSON (scopeValues scope) ] instance (FromJSONKey k, FromJSON v, Ord k) => FromJSON (Scope k v) where diff --git a/src/Language/Fiddle/Internal/UnitInterface.hs b/src/Language/Fiddle/Internal/UnitInterface.hs index 4244121..aacb71d 100644 --- a/src/Language/Fiddle/Internal/UnitInterface.hs +++ b/src/Language/Fiddle/Internal/UnitInterface.hs @@ -67,10 +67,10 @@ data ExportedValue where deriving (Show, Eq, Ord, Generic, FromJSON, ToJSON) instance ToJSON UnitInterface where - toJSON (UnitInterface rootScope dependencies) = + toJSON ui = object - [ "rootScope" .= rootScope, - "dependencies" .= dependencies + [ "rootScope" .= rootScope ui, + "dependencies" .= dependencies ui ] instance FromJSON UnitInterface where |