From 21e6e5940ecb462436b8dc94428c5cee5cdc9072 Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Fri, 27 Sep 2024 16:20:32 -0600 Subject: Add import resolution phase and also add a more abstractions around compliation phases. --- src/Language/Fiddle/Internal/Scopes.hs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/Language/Fiddle/Internal/Scopes.hs') diff --git a/src/Language/Fiddle/Internal/Scopes.hs b/src/Language/Fiddle/Internal/Scopes.hs index 302eab2..83ea144 100644 --- a/src/Language/Fiddle/Internal/Scopes.hs +++ b/src/Language/Fiddle/Internal/Scopes.hs @@ -14,6 +14,7 @@ data Scope k v = Scope { subScopes :: Map k (Scope k v), -- Nested sub-scopes scopeValues :: Map k v -- Values stored in the current scope } + deriving (Eq, Ord, Show, Read) -- | 'ScopePath' keeps track of the current scope path as a list of keys, -- and also includes any additional paths (like imported modules or @@ -22,6 +23,7 @@ data ScopePath k = ScopePath { currentScope :: [k], -- Current path within the scope hierarchy usingPaths :: [[k]] -- Additional paths for resolving symbols } + deriving (Eq, Ord, Show, Read) -- | The 'Semigroup' instance for 'Scope' allows combining two scopes, -- where sub-scopes and values are merged together. -- cgit