Browse files

Don't allow more than one instance for the same expression.

  • Loading branch information...
1 parent 4aa4180 commit c3f640ad25631f2a220b45f8c8255103cfdc324e @marcotmarcot committed Oct 11, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/Tc/TcSat.hs
View
5 src/Tc/TcSat.hs
@@ -58,7 +58,10 @@ satone phi p
liftIO (putStrLn (concat ["Testing:", prettyPrint p]))
delta <- sats p
-- liftIO (putStrLn (concat ["delta:", show delta]))
- foldM (satstep phi p) [[]] delta
+ case delta of
+ [delta_] -> satstep phi p [[]] delta_
+ [] -> error "No instances found."
+ _ -> error "More than one instance found."
satstep :: Phi -> Asst -> [Subst] -> (Subst,Context,Asst) -> TcM [Subst]

0 comments on commit c3f640a

Please sign in to comment.