Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sean/typed core fn #20

Open
wants to merge 49 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
04eece1
flake
gnumonik Nov 29, 2023
c6c8930
shell
gnumonik Nov 29, 2023
3e3562c
Added uplc command line option for , pulled in plutus-core dep from C…
gnumonik Nov 30, 2023
99c51cb
PlutusIR dependency sorted out
gnumonik Nov 30, 2023
75012d1
Typed CoreFn conversion & pretty printer (messy)
gnumonik Dec 6, 2023
62c4685
More detailed tracing to investigate type reprs
gnumonik Dec 6, 2023
b173baf
Switched to a typed CoreFn data type (instead of stashing type info i…
Jan 12, 2024
5b02fe1
Preserving ForAll quantifiers in output CoreFn AST (WIP/maybe broken)
Jan 17, 2024
822c6d4
Let bindings/declaration groups debugging, working on quantifier pres…
gnumonik Jan 18, 2024
23fac0a
Working on conversion of typeclass dictionaries. (Pretty messy, using…
gnumonik Jan 20, 2024
f3a86eb
Adjusted typeclass desugaring to use real source locations in the cas…
gnumonik Jan 24, 2024
28a850e
Conversion to typed CoreFn for desugared typeclass dictionaries seems…
gnumonik Jan 24, 2024
282d951
Typed CoreFn conversion now works with MPTCs, cleaned up a bunch of u…
gnumonik Jan 25, 2024
cdd4bb1
Substantial cleanup + documentation pass
gnumonik Jan 25, 2024
766b580
Merge pull request #17 from mlabs-haskell/sean/typedCoreFn.typeclasse…
gnumonik Jan 25, 2024
6e2ca01
Nested 'let' expressions w/ mix of type sigs/no type sigs w/ quantifiers
gnumonik Jan 25, 2024
51344c8
Mutually recursive binding groups, binders, attempt at generalizing T…
gnumonik Feb 1, 2024
9ffcbcf
Merge pull request #19 from mlabs-haskell/sean/typedCoreFn.wip
gnumonik Feb 1, 2024
722a0cc
fixed small mistake, deleted some traces, added comment or two
gnumonik Feb 1, 2024
e6237d8
Merge branch 'sean/typedCoreFn.wip' into sean/typedCoreFn
gnumonik Feb 1, 2024
02129dd
Fixed mutual recursion bug in declToCoreFn, removed let generalizatio…
gnumonik Feb 3, 2024
b2befc1
Fixed problem w/ object literal binders, cleaned up the interface of …
gnumonik Feb 6, 2024
5a70555
Nix setup
t4ccer Feb 18, 2024
86ec038
Trigger CI
t4ccer Feb 18, 2024
acbc49d
Remove unused configs
t4ccer Feb 18, 2024
43bea5a
Disable typos check
t4ccer Feb 18, 2024
5f464c5
Primitive infrastructure for golden tests, removed some dead options
gnumonik Feb 21, 2024
aa95066
testing infrastructure, ported some tests/purs/passing tests to debug…
gnumonik Feb 22, 2024
df4b8b8
Remove Nix Plutarch wrapper
t4ccer Feb 23, 2024
5a83437
Fixed bug discovered in test #4301 (I hope...)
gnumonik Feb 27, 2024
c99c476
Fixed issue w/ transitive imports resulting from explicitly desguarin…
gnumonik Feb 29, 2024
293acc9
Documenting/Explaining the use of new utils
gnumonik Feb 29, 2024
1e17804
Type inference/checking machinery removed from CoreFn desugaring mach…
gnumonik Mar 1, 2024
161bdef
Added some empty list tests
gnumonik Mar 1, 2024
f35cdb0
Prettyprinter replacement implemented (still needs some tweaking)
gnumonik Mar 2, 2024
b4f557e
prettyprinter improvements
gnumonik Mar 2, 2024
7876fdb
even prettier
gnumonik Mar 2, 2024
c862bd5
extremely pretty
gnumonik Mar 2, 2024
4b6112c
Refactored pretty printer update to use Reader monad (hopefully makes…
gnumonik Mar 5, 2024
cb11738
Final cleanup/tweaks to pretty printer
gnumonik Mar 5, 2024
d295a01
Module-ized prettyprinter + some small tweaks
gnumonik Mar 6, 2024
ae4f703
Nix setup
t4ccer Feb 18, 2024
991c758
Trigger CI
t4ccer Feb 18, 2024
4214ae6
Remove unused configs
t4ccer Feb 18, 2024
6349472
Disable typos check
t4ccer Feb 18, 2024
ed35645
Remove Nix Plutarch wrapper
t4ccer Feb 23, 2024
a9f7a14
Removed some dead comments, testing pre-commit hooks
gnumonik Mar 6, 2024
fcce0c8
Merge pull request #22 from mlabs-haskell/sean/typedCoreFn.test-infra
gnumonik Mar 6, 2024
a9fb17a
Merge pull request #21 from mlabs-haskell/t4/ci-nix
klntsky Mar 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use nix
12 changes: 12 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
@@ -1,2 +1,14 @@
repository cardano-haskell-packages
url: https://input-output-hk.github.io/cardano-haskell-packages
secure: True
root-keys:
3e0cce471cf09815f930210f7827266fd09045445d65923e6d0238a6cd15126f
443abb7fb497a134c343faf52f0b659bd7999bc06b7f63fa76dc99d631f9bea1
a86a1f6ce86c449c46666bda44268677abf29b5b2d2eb5ec7af903ec2f117a82
bcec67e8e99cabfa7764d75ad9b158d72bfacf70ca1d0ec8bc6b4406d1bf8413
c00aae8461a256275598500ea0e187588c35a5d5d7454fb57eac18d9edb86a56
d4a35cd3121aa00d18544bb0ac01c3e1691d618f462c46129271bccf39f7e8ee


packages:
purescript.cabal
43 changes: 43 additions & 0 deletions hie.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
cradle:
cabal:
- path: "src"
component: "lib:purescript"

- path: "app/Main.hs"
component: "purescript:exe:purs"

- path: "app/Command/Bundle.hs"
component: "purescript:exe:purs"

- path: "app/Command/Compile.hs"
component: "purescript:exe:purs"

- path: "app/Command/Docs.hs"
component: "purescript:exe:purs"

- path: "app/Command/Docs/Html.hs"
component: "purescript:exe:purs"

- path: "app/Command/Docs/Markdown.hs"
component: "purescript:exe:purs"

- path: "app/Command/Graph.hs"
component: "purescript:exe:purs"

- path: "app/Command/Hierarchy.hs"
component: "purescript:exe:purs"

- path: "app/Command/Ide.hs"
component: "purescript:exe:purs"

- path: "app/Command/Publish.hs"
component: "purescript:exe:purs"

- path: "app/Command/REPL.hs"
component: "purescript:exe:purs"

- path: "app/Version.hs"
component: "purescript:exe:purs"

- path: "tests"
component: "purescript:test:tests"
20 changes: 11 additions & 9 deletions purescript.cabal
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cabal-version: 2.4
cabal-version: 3.0

name: purescript
-- Note: don't add prerelease identifiers here! Add them in app/Version.hs and npm-package/package.json instead.
Expand Down Expand Up @@ -34,7 +34,7 @@ extra-source-files:
tests/support/pscide/src/**/*.purs
tests/support/pscide/src/**/*.js
tests/support/pscide/src/**/*.fail
stack.yaml
-- stack.yaml
README.md
INSTALL.md
CONTRIBUTORS.md
Expand Down Expand Up @@ -157,7 +157,7 @@ common defaults
aeson-better-errors >=0.9.1.1 && <0.10,
ansi-terminal >=0.11.3 && <0.12,
array >=0.5.4.0 && <0.6,
base >=4.16.2.0 && <4.17,
base >=4.16.2.0 && <4.18,
blaze-html >=0.9.1.2 && <0.10,
bower-json >=1.1.0.0 && <1.2,
boxes >=0.1.5 && <0.2,
Expand Down Expand Up @@ -191,6 +191,7 @@ common defaults
parsec >=3.1.15.0 && <3.2,
pattern-arrows >=0.0.2 && <0.1,
process ==1.6.13.1,
pretty-simple,
protolude >=0.3.1 && <0.4,
regex-tdfa >=1.3.1.2 && <1.4,
safe >=0.3.19 && <0.4,
Expand All @@ -201,14 +202,16 @@ common defaults
stm >=2.5.0.2 && <2.6,
stringsearch >=0.3.6.6 && <0.4,
template-haskell >=2.18.0.0 && <2.19,
text >=1.2.5.0 && <1.3,
text >=1.2.5.0 && <2.3,
these >=1.1.1.1 && <1.2,
time >=1.11.1.1 && <1.12,
transformers >=0.5.6.2 && <0.6,
transformers-base >=0.4.6 && <0.5,
utf8-string >=1.0.2 && <1.1,
vector >=0.12.3.1 && <0.13,
witherable >=0.4.2 && <0.5
witherable >=0.4.2 && <0.5,
plutus-core,
plutus-core:plutus-ir

library
import: defaults
Expand All @@ -230,21 +233,20 @@ library
Language.PureScript.AST.Utils
Language.PureScript.Bundle
Language.PureScript.CodeGen
Language.PureScript.CodeGen.JS
Language.PureScript.CodeGen.JS.Common
Language.PureScript.CodeGen.JS.Printer
Language.PureScript.CodeGen.UPLC
Language.PureScript.Constants.Libs
Language.PureScript.CoreFn
Language.PureScript.CoreFn.Ann
Language.PureScript.CoreFn.Binders
Language.PureScript.CoreFn.CSE
Language.PureScript.CoreFn.Desugar
Language.PureScript.CoreFn.Desugar.Utils
Language.PureScript.CoreFn.Expr
Language.PureScript.CoreFn.FromJSON
Language.PureScript.CoreFn.Laziness
Language.PureScript.CoreFn.Meta
Language.PureScript.CoreFn.Module
Language.PureScript.CoreFn.Optimizer
Language.PureScript.CoreFn.Pretty
Language.PureScript.CoreFn.ToJSON
Language.PureScript.CoreFn.Traversals
Language.PureScript.CoreImp
Expand Down
21 changes: 21 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
with (import <nixpkgs> {});
let haskell928 = haskell.packages.ghc928;
ghc928 = haskell.compiler.ghc928;
in mkShell {
nativeBuildInputs = [
pkg-config
haskell928.haskell-language-server
ghc928
cabal-install
];

buildInputs = [
zlib
libsodium
secp256k1
];

shellHook = ''
export LC_ALL=C.utf8
'';
}
8 changes: 7 additions & 1 deletion src/Language/PureScript/AST/Literals.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ module Language.PureScript.AST.Literals where
import Prelude
import Language.PureScript.PSString (PSString)

-- For serializing/deserializing Typed CoreFn
import GHC.Generics ( Generic )
import Data.Aeson (FromJSON, ToJSON)
-- |
-- Data type for literal values. Parameterised so it can be used for Exprs and
-- Binders.
Expand Down Expand Up @@ -35,4 +38,7 @@ data Literal a
-- An object literal
--
| ObjectLiteral [(PSString, a)]
deriving (Eq, Ord, Show, Functor)
deriving (Eq, Ord, Show, Functor, Generic)

instance FromJSON a => FromJSON (Literal a)
instance ToJSON a => ToJSON (Literal a)
2 changes: 1 addition & 1 deletion src/Language/PureScript/CodeGen.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
--
module Language.PureScript.CodeGen (module C) where

import Language.PureScript.CodeGen.JS as C
import Language.PureScript.CodeGen.UPLC as C
Loading
Loading