File tree Expand file tree Collapse file tree 4 files changed +8
-7
lines changed
lambda-buffers-codegen/src/LambdaBuffers/Codegen/Rust Expand file tree Collapse file tree 4 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ instance FromJSON R.ModuleName
2323instance ToJSON R. CrateName
2424instance FromJSON R. CrateName
2525
26- instance ( FromJSON a ) => FromJSON (R. Qualified a ) where
26+ instance FromJSON a => FromJSON (R. Qualified a ) where
2727 parseJSON v = do
2828 A. withArray
2929 " Qualified"
@@ -40,6 +40,6 @@ instance (FromJSON a) => FromJSON (R.Qualified a) where
4040 )
4141 v
4242
43- instance ( ToJSON a ) => ToJSON (R. Qualified a ) where
43+ instance ToJSON a => ToJSON (R. Qualified a ) where
4444 toJSON (R. Qualified'LibRef cn mn a) = A. Array $ Vector. fromList [toJSON cn, toJSON mn, toJSON a]
4545 toJSON (R. Qualified'Builtin a) = A. Array $ Vector. fromList [toJSON a]
Original file line number Diff line number Diff line change @@ -252,8 +252,8 @@ printTraitMethod fnName args returns implDoc =
252252 in indent 4 $
253253 " fn"
254254 <+> R. printRsValName fnName
255- <> " <'a>"
256- <> argsWithTypes
255+ <> " <'a>"
256+ <> argsWithTypes
257257 <+> " ->"
258258 <+> R. printRsQTyName returns
259259 <+> braces (space <> implDoc <> argsLst)
Original file line number Diff line number Diff line change @@ -29,7 +29,8 @@ printInstanceDef rsQTraitName ty =
2929 in case freeVars of
3030 [] -> \ implDoc -> " impl" <+> headDoc <+> braces (line <> implDoc)
3131 _ -> \ implDoc ->
32- " impl" <> printInstanceContext rsQTraitName freeVars
32+ " impl"
33+ <> printInstanceContext rsQTraitName freeVars
3334 <+> headDoc
3435 <+> braces (hardline <> space <> space <> implDoc)
3536
Original file line number Diff line number Diff line change 11module LambdaBuffers.Codegen.Rust.Print.LamVal (printValueE , printInstance ) where
22
33import Control.Lens ((&) , (.~) )
4+ import Control.Monad (replicateM )
45import Control.Monad.Error.Class (MonadError (throwError ))
5- import Control.Monad.Except (replicateM )
66import Data.Foldable (Foldable (toList ))
77import Data.List (sortOn )
88import Data.Map qualified as Map
@@ -302,7 +302,7 @@ printTupleE iTyDefs l r = do
302302printTextE :: MonadPrint m => Text. Text -> m (Doc ann )
303303printTextE = return . fromStr . dquotes . pretty
304304
305- printCaseTextE :: ( MonadPrint m ) => PC. TyDefs -> LV. ValueE -> [(LV. ValueE , LV. ValueE )] -> (LV. ValueE -> LV. ValueE ) -> m (Doc ann )
305+ printCaseTextE :: MonadPrint m => PC. TyDefs -> LV. ValueE -> [(LV. ValueE , LV. ValueE )] -> (LV. ValueE -> LV. ValueE ) -> m (Doc ann )
306306printCaseTextE iTyDefs txtVal cases otherCase = do
307307 caseValDoc <- printValueE iTyDefs txtVal
308308 caseDocs <-
You can’t perform that action at this time.
0 commit comments