diff --git a/src/Visp.Compiler/Syntax/SynWriter.fs b/src/Visp.Compiler/Syntax/SynWriter.fs index 93ca07d..11b7d7d 100644 --- a/src/Visp.Compiler/Syntax/SynWriter.fs +++ b/src/Visp.Compiler/Syntax/SynWriter.fs @@ -1654,22 +1654,6 @@ module Write = writeExpr w WriteState.InlineNoParens arg | _ -> writeSeqLeading w WriteState.Inline space writeExprInParens args - and writeArgsOrEmpty w (args: SynArg list) = - let writeArgs w args = - writeSeq w WriteState.Inline space writeArg args - - if args.IsEmpty then string w "()" else writeArgs w args - - and private writeArg w _ (arg: SynArg) = - match arg with - | SynArg.TypedArg(name, typ, _) -> - char w '(' - symbol w name true - string w ": " - writeType w typ - char w ')' - | SynArg.InferredArg(name, _) -> symbol w name true - and private writeExprToValue w st (expr: SynExpr) = match expr with | SynExpr.Const(cnst, range) -> @@ -1684,7 +1668,6 @@ module Write = writeExpr w WriteState.Inline others char w ')' - and private writeQuotedInParens w (st: WriteState) ex = let needsParens = match ex with diff --git a/src/Visp.Compiler/Syntax/Syntax.fs b/src/Visp.Compiler/Syntax/Syntax.fs index 8aaafcf..c546736 100644 --- a/src/Visp.Compiler/Syntax/Syntax.fs +++ b/src/Visp.Compiler/Syntax/Syntax.fs @@ -515,17 +515,6 @@ and SynLambda = let (SynLambda(_, _, rng)) = this rng -and [] SynArg = - // Argument with explicit type - | TypedArg of name: SynSymbol * argtype: SynType * range: range - // Argument with inferred type - | InferredArg of name: SynSymbol * range: range - - member d.NameText = - match d with - | TypedArg(name = name) - | InferredArg(name = name) -> name.Text - module Coll = let mkList its r = (SynCollection(CollectionKind.Paren, its, r)) @@ -669,16 +658,6 @@ module Syntax = | SynName.Inferred(it, _) -> rangeOfSymbol it | SynName.Typed(it, _, _) -> rangeOfSymbol it - let textOfArg = - function - | SynArg.InferredArg(it, _) -> textOfSymbol it - | SynArg.TypedArg(it, _, _) -> textOfSymbol it - - let rangeOfArg = - function - | SynArg.InferredArg(it, _) -> rangeOfSymbol it - | SynArg.TypedArg(it, _, _) -> rangeOfSymbol it - let mkFunctionCall sym ex range = SynExpr.FunctionCall(sym, ex, range) let mkCons lhs rhs range = SynExpr.Cons(lhs, rhs, range) @@ -709,9 +688,6 @@ module Syntax = let mkUnwrapList v r = mkFunctionCall (mkSynSymbolExpr "unwrapList" r) [ v ] r - let mkInferredArg s range = - SynArg.InferredArg(mkSynSymbol s range, range) - let mkFunctionCallOrCexpr ex args r = match ex with | SynExpr.Symbol(SynSymbol(id) as sym) when id.idText.EndsWith("->") && id.idText.Length > 2 -> diff --git a/src/Visp.Compiler/Syntax/SyntaxPrinter.fs b/src/Visp.Compiler/Syntax/SyntaxPrinter.fs index 323f223..7b2dc51 100644 --- a/src/Visp.Compiler/Syntax/SyntaxPrinter.fs +++ b/src/Visp.Compiler/Syntax/SyntaxPrinter.fs @@ -179,12 +179,6 @@ let patToDoc = | SynPat.Named(it, _) -> text it.Text | it -> failwithf "todo pat: %A" it -let argToDoc = - function - | SynArg.InferredArg(it, _) -> text it.Text - | SynArg.TypedArg(name, typ, _) -> - brackets <| (cat [ text name.Text; colon; space; text "todo types" ]) - let lambdaToDoc (SynLambda(args, body, _)) = //let args = List.map argToDoc args |> hsep |> parens let args = patToDoc args