summaryrefslogtreecommitdiff
path: root/fig-web/main
diff options
context:
space:
mode:
authorLLLL Colonq <llll@colonq>2026-07-03 05:14:55 -0400
committerLLLL Colonq <llll@colonq>2026-07-03 05:14:55 -0400
commite7ca7dd09fbf8dbfc05fd9b9115e02649e5a2906 (patch)
treeaa52dbaa8c8fb4ad279eb916c36ba05e55d6f73b /fig-web/main
parent8e7e6915ce3d48b74db97a6bbe11e3ae8e5f95ea (diff)
web: Add Maude Code
Diffstat (limited to 'fig-web/main')
-rw-r--r--fig-web/main/Main.hs13
1 files changed, 4 insertions, 9 deletions
diff --git a/fig-web/main/Main.hs b/fig-web/main/Main.hs
index 7e3d509..27e90d9 100644
--- a/fig-web/main/Main.hs
+++ b/fig-web/main/Main.hs
@@ -8,9 +8,9 @@ import Options.Applicative
import Fig.Web.Types
import Fig.Web.Utils
-import qualified Fig.Utils.FFI as FFI
import qualified Fig.Web.Public as Public
import qualified Fig.Web.Secure as Secure
+import qualified Fig.Web.MaudeCode as MaudeCode
parsePublicOptions :: Parser PublicOptions
parsePublicOptions = do
@@ -24,13 +24,13 @@ parseSecureOptions = do
data Command
= Public PublicOptions
| Secure SecureOptions
- | TestFFI
+ | MaudeCode
parseCommand :: Parser Command
parseCommand = hsubparser $ mconcat
[ command "public" $ info (Public <$> parsePublicOptions) (progDesc "Launch the public web server")
, command "secure" $ info (Secure <$> parseSecureOptions) (progDesc "Launch the private web server (intended to be run behind authentication proxy)")
- , command "testffi" $ info (pure TestFFI) (progDesc "Test the FFI")
+ , command "maude-code" $ info (pure MaudeCode) (progDesc "Launch the Maude Code web server")
]
data Opts = Opts
@@ -63,9 +63,4 @@ main = do
case opts.cmd of
Public o -> Public.server o cfg (opts.busHost, opts.busPort)
Secure o -> Secure.server o cfg (opts.busHost, opts.busPort)
- TestFFI -> do
- log "testing FFI"
- res <- FFI.checkAnswer "(lambda (d e) (equal? d e))" "hello computer" "hello computer"
- log $ "result: " <> tshow res
- inpa <- FFI.genInputAnswer "(lambda (x) (cons x x))" "hello computer"
- log $ "input/answer: " <> tshow inpa
+ MaudeCode -> MaudeCode.server cfg (opts.busHost, opts.busPort)