From d433728389af7e5449db21f8b42601713ff6bfb9 Mon Sep 17 00:00:00 2001 From: Evgenii Akentev Date: Sat, 12 Nov 2022 01:52:29 +0400 Subject: [PATCH] Update reflex and the code --- .gitignore | 5 ++++- CTT.hs | 2 +- Connections.hs | 2 +- Exp/Abs.hs | 1 + Helpers.hs | 1 + Main.hs | 6 ++++-- Resolver.hs | 1 + TypeChecker.hs | 2 ++ default.nix | 2 +- shell.nix | 2 +- 10 files changed, 17 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index de7a300..fcc0acf 100644 --- a/.gitignore +++ b/.gitignore @@ -15,4 +15,7 @@ cabal.sandbox.config .*.sw? dist-ghcjs dist-newstyle -result \ No newline at end of file +result +*.js_o +*.js_hi +*.jsexe \ No newline at end of file diff --git a/CTT.hs b/CTT.hs index 82a2b19..b738c5a 100644 --- a/CTT.hs +++ b/CTT.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-} +{-# LANGUAGE TypeSynonymInstances, FlexibleInstances, DeriveAnyClass, DeriveGeneric #-} module CTT where import Data.Aeson diff --git a/Connections.hs b/Connections.hs index 47cb2b3..98f6f3f 100644 --- a/Connections.hs +++ b/Connections.hs @@ -1,6 +1,6 @@ {-# LANGUAGE TypeSynonymInstances, FlexibleInstances, GeneralizedNewtypeDeriving, TupleSections, - StandaloneDeriving #-} + StandaloneDeriving, DeriveAnyClass, DeriveGeneric #-} module Connections where import Data.Aeson diff --git a/Exp/Abs.hs b/Exp/Abs.hs index cf66a4f..b06b86d 100644 --- a/Exp/Abs.hs +++ b/Exp/Abs.hs @@ -1,5 +1,6 @@ -- Haskell data types for the abstract syntax. -- Generated by the BNF converter. +{-# LANGUAGE DeriveAnyClass, DeriveGeneric #-} module Exp.Abs where diff --git a/Helpers.hs b/Helpers.hs index bb83312..f1cb1db 100644 --- a/Helpers.hs +++ b/Helpers.hs @@ -1,4 +1,5 @@ {-# LANGUAGE BangPatterns #-} +{-# LANGUAGE OverloadedStrings #-} module Helpers where import Control.Monad diff --git a/Main.hs b/Main.hs index 5152992..e0afe6f 100644 --- a/Main.hs +++ b/Main.hs @@ -3,6 +3,8 @@ {-# LANGUAGE JavaScriptFFI #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE DeriveAnyClass, DeriveGeneric #-} +{-# LANGUAGE OverloadedStrings #-} module Main where @@ -67,7 +69,7 @@ headWidget = do <> "crossorigin" =: "anonymous") blank elAttr "link" ("data-name" =: "vs/editor/editor.main" <> "rel" =: "stylesheet" - <> "href" =: "https://microsoft.github.io/monaco-editor/node_modules/monaco-editor/min/vs/editor/editor.main.css") blank + <> "href" =: "https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.21.0/min/vs/editor/editor.main.css") blank el "style" $ text "html, body { height: 100%; }" bodyWidget :: Widget t () @@ -111,7 +113,7 @@ bodyWidget = do elAttr "button" ("id" =: "eval-button" <> "type" =: "button" <> "class" =: "btn btn-outline-secondary") $ text "Eval" let - vsPath = "https://microsoft.github.io/monaco-editor/node_modules/monaco-editor/min/vs/" + vsPath = "https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.21.0/min/vs/" el "script" $ text $ "var app = {}; var require = { paths: { 'vs': '" <> vsPath <> "'} };" elAttr "script" ("src" =: (vsPath <> "loader.js")) blank elAttr "script" ("src" =: (vsPath <> "editor/editor.main.nls.js")) blank diff --git a/Resolver.hs b/Resolver.hs index d997f80..1ecba8a 100644 --- a/Resolver.hs +++ b/Resolver.hs @@ -1,4 +1,5 @@ {-# LANGUAGE TupleSections #-} +{-# LANGUAGE DeriveAnyClass, DeriveGeneric #-} -- | Convert the concrete syntax into the syntax of cubical TT. module Resolver where diff --git a/TypeChecker.hs b/TypeChecker.hs index 7a3fcfb..b6c4b83 100644 --- a/TypeChecker.hs +++ b/TypeChecker.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE DeriveAnyClass, DeriveGeneric #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE TupleSections #-} module TypeChecker where diff --git a/default.nix b/default.nix index fb7125b..c404047 100644 --- a/default.nix +++ b/default.nix @@ -2,7 +2,7 @@ reflex-platform-args: let reflexPlatformSrc = builtins.fetchTarball { - url = "https://github.com/reflex-frp/reflex-platform/archive/df0bdcca5eb2a3236ec0496e4430d91876b29cf5.tar.gz"; + url = "https://github.com/reflex-frp/reflex-platform/archive/5370095262d4255039223d7ac640c571fc3a05c0.tar.gz"; }; ghcjsIgnoreOverrides = self: super: diff --git a/shell.nix b/shell.nix index ee98cc4..c63cce2 100644 --- a/shell.nix +++ b/shell.nix @@ -1 +1 @@ -(import ./default.nix { }).shells.ghc +(import ./default.nix { }).shells.ghcjs -- 2.34.1