git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Fix #365
8d006d9Phil Freeman
examples/failing/365.pursnew file+11
@@ -0,0 +1,11 @@
1+module Main where
2+
3+class C a where
4+ f :: a -> a
5+ g :: a -> a
6+
7+instance cS :: C String where
8+ f s = s
9+ g = f
10+
11+main = g "Done"
src/Language/PureScript/Sugar/BindingGroups.hs−1
@@ -157,7 +157,6 @@ getProperName _ = error "Expected DataDeclaration"
157--
157--
158toBindingGroup :: (Functor m, MonadError MultipleErrors m) => ModuleName -> SCC Declaration -> m Declaration
158toBindingGroup :: (Functor m, MonadError MultipleErrors m) => ModuleName -> SCC Declaration -> m Declaration
159toBindingGroup _ (AcyclicSCC d) = return d
159toBindingGroup _ (AcyclicSCC d) = return d
160−toBindingGroup _ (CyclicSCC [d]) = return d
161toBindingGroup moduleName (CyclicSCC ds') =
160toBindingGroup moduleName (CyclicSCC ds') =
162 -- Once we have a mutually-recursive group of declarations, we need to sort
161 -- Once we have a mutually-recursive group of declarations, we need to sort
163 -- them further by their immediate dependencies (those outside function
162 -- them further by their immediate dependencies (those outside function