git.iko.soy/type-level-sets
on master help sign in
Merge branch 'master' of github.com:dorchard/type-level-sets
commit0f3dbf3693914285c493f6a046a022034e53079e authorDominic <dom.orchard@gmail.com> dateWed 12 Aug 2015, 16:13 (11 years ago) parentb4275b78430c23
1 file changed+13−1
TySet.hs+13−1
TySet.hs+13−1
@@ -77,6 +77,18 @@ pluginSolve () given derived wanted =
7777 -- For the sake of debugging
7878 tcPluginIO $ putStrLn "Running Set equality plugin"
7979 return $ TcPluginOk solved []
80+
81+-- Possible eqations for the solver
82+-- Union a b ~ a => b ~ '[]
83+-- Union a b ~ b => a ~ '[]
84+
85+-- Union (Union a b) c ~ d => Union a (Union b c) ~ d
86+-- Union '[] a ~ b => a ~ b
87+-- Union a '[] ~ b => a ~ b
88+-- Union a a ~ b => a ~ b (can do in a reduce phases that looks through a tree of union terms..)
89+
90+-- Reqires an `ordering'
91+-- Union a b ~ c => Union b a ~ c [for the purpose of normalisation]
8092
8193-- Pretty print constraints
8294ppCts [] = text "(empty)"
@@ -158,4 +170,4 @@ findSetEquality (ct : xs) = let x = (do (Nominal,t1,t2) <- getEqPredTys_maybe (c
158170 Nothing -> findSetEquality xs
159171
160172pluginStop :: () -> TcPluginM ()
161−pluginStop _ = return ()
173+pluginStop _ = return ()