@@ -61,9 +61,13 @@ desugarTypeDeclarationsModule ms = forM ms $ \(Module ss coms name ds exps) ->
6161 let (_, f, _) = everywhereOnValuesTopDownM return go return
6262 f' (Left gs) = Left <$> mapM (pairM return f) gs
6363 f' (Right v) = Right <$> f v
64− (:) <$> (ValueDeclaration name nameKind bs <$> f' val) <*> desugarTypeDeclarations rest
64+ (:) <$> (ValueDeclaration name nameKind bs <$> f' val)
65+ <*> desugarTypeDeclarations rest
6566 where
6667 go (Let ds val') = Let <$> desugarTypeDeclarations ds <*> pure val'
6768 go other = return other
69+ desugarTypeDeclarations (TypeInstanceDeclaration nm deps cls args (ExplicitInstance ds) : rest) =
70+ (:) <$> (TypeInstanceDeclaration nm deps cls args . ExplicitInstance <$> desugarTypeDeclarations ds)
71+ <*> desugarTypeDeclarations rest
6872 desugarTypeDeclarations (d:ds) = (:) d <$> desugarTypeDeclarations ds
6973 desugarTypeDeclarations [] = return []