Skip to content

Commit

Permalink
Make Queriable instances OVERLAPPABLE. Addresses #719
Browse files Browse the repository at this point in the history
  • Loading branch information
LeventErkok committed Aug 8, 2024
1 parent 7e236c4 commit 9290b1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Data/SBV/Control/Utils.hs
Original file line number Diff line number Diff line change
Expand Up @@ -219,14 +219,14 @@ inNewContext act = do st@State{rconstMap, rProgInfo} <- queryState
return r

-- | Generic 'Queriable' instance for 'SymVal' values
instance (MonadIO m, SymVal a) => Queriable m (SBV a) where
instance {-# OVERLAPPABLE #-} (MonadIO m, SymVal a) => Queriable m (SBV a) where
type QueryResult (SBV a) = a
create = freshVar_
project = getValue
embed = return . literal

-- | Generic 'Queriable' instance for things that are 'Fresh' and look like containers:
instance (MonadIO m, SymVal a, Foldable t, Traversable t, Fresh m (t (SBV a))) => Queriable m (t (SBV a)) where
instance {-# OVERLAPPABLE #-} (MonadIO m, SymVal a, Foldable t, Traversable t, Fresh m (t (SBV a))) => Queriable m (t (SBV a)) where
type QueryResult (t (SBV a)) = t a
create = fresh
project = mapM getValue
Expand Down

0 comments on commit 9290b1e

Please sign in to comment.