From bb21771f700bdbd9842615ff4682fc4fb5129077 Mon Sep 17 00:00:00 2001 From: Nikolai Kudasov Date: Tue, 6 Feb 2024 09:49:38 +0300 Subject: [PATCH 1/3] Fix grammar to support terms generated from EO --- eo-phi-normalizer/grammar/EO/Phi/Syntax.cf | 6 +- .../src/Language/EO/Phi/Normalize.hs | 14 +- .../src/Language/EO/Phi/Rules/Common.hs | 4 +- .../src/Language/EO/Phi/Rules/Yaml.hs | 10 +- .../src/Language/EO/Phi/Syntax/Abs.hs | 4 +- .../src/Language/EO/Phi/Syntax/Doc.txt | 196 +++++++++--------- .../src/Language/EO/Phi/Syntax/Lex.x | 2 +- .../src/Language/EO/Phi/Syntax/Par.y | 4 +- .../src/Language/EO/Phi/Syntax/Print.hs | 4 +- 9 files changed, 121 insertions(+), 123 deletions(-) diff --git a/eo-phi-normalizer/grammar/EO/Phi/Syntax.cf b/eo-phi-normalizer/grammar/EO/Phi/Syntax.cf index 6072cef50..5253ffad3 100644 --- a/eo-phi-normalizer/grammar/EO/Phi/Syntax.cf +++ b/eo-phi-normalizer/grammar/EO/Phi/Syntax.cf @@ -6,7 +6,7 @@ token Bytes ({"--"} | ["0123456789ABCDEF"] ["0123456789ABCDEF"] {"-"} | ["0123456789ABCDEF"] ["0123456789ABCDEF"] ({"-"} ["0123456789ABCDEF"] ["0123456789ABCDEF"])+) ; token Function upper (char - [" \r\n\t,.|':;!-?][}{)(⟧⟦"])* ; -token LabelId lower (char - [" \r\n\t,.|':;!-?][}{)(⟧⟦"])* ; +token LabelId lower (char - [" \r\n\t,.|':;!?][}{)(⟧⟦"])* ; token AlphaIndex ({"α0"} | {"α"} (digit - ["0"]) (digit)* ) ; token MetaId {"!"} (char - [" \r\n\t,.|':;!-?][}{)(⟧⟦"])* ; @@ -15,8 +15,8 @@ Program. Program ::= "{" [Binding] "}" ; Formation. Object ::= "⟦" [Binding] "⟧" ; Application. Object ::= Object "(" [Binding] ")" ; ObjectDispatch. Object ::= Object "." Attribute ; -GlobalDispatch. Object ::= "Φ" "." Attribute ; -ThisDispatch. Object ::= "ξ" "." Attribute ; +GlobalObject. Object ::= "Φ"; +ThisObject. Object ::= "ξ"; Termination. Object ::= "⊥" ; MetaObject. Object ::= MetaId ; diff --git a/eo-phi-normalizer/src/Language/EO/Phi/Normalize.hs b/eo-phi-normalizer/src/Language/EO/Phi/Normalize.hs index e042e483c..82173e869 100644 --- a/eo-phi-normalizer/src/Language/EO/Phi/Normalize.hs +++ b/eo-phi-normalizer/src/Language/EO/Phi/Normalize.hs @@ -80,7 +80,7 @@ normalizeObject object = do case object of -- Rule 1 obj@(Formation _) -> rule1 obj - ThisDispatch a -> pure $ fromMaybe object (lookupBinding a this) + ObjectDispatch ThisObject a -> pure $ fromMaybe object (lookupBinding a this) _ -> pure object -- | Split compound object into its head and applications/dispatch actions. @@ -89,8 +89,8 @@ peelObject = \case Formation bindings -> PeeledObject (HeadFormation bindings) [] Application object bindings -> peelObject object `followedBy` ActionApplication bindings ObjectDispatch object attr -> peelObject object `followedBy` ActionDispatch attr - GlobalDispatch attr -> PeeledObject HeadGlobal [ActionDispatch attr] - ThisDispatch attr -> PeeledObject HeadThis [ActionDispatch attr] + GlobalObject -> PeeledObject HeadGlobal [] + ThisObject -> PeeledObject HeadThis [] Termination -> PeeledObject HeadTermination [] MetaObject _ -> PeeledObject HeadTermination [] where @@ -102,12 +102,12 @@ unpeelObject (PeeledObject head_ actions) = HeadFormation bindings -> go (Formation bindings) actions HeadGlobal -> case actions of - ActionDispatch a : as -> go (GlobalDispatch a) as - _ -> error "impossible: global object without dispatch!" + ActionApplication{} : _ -> error "impossible: application for a global object!" + _ -> go GlobalObject actions HeadThis -> case actions of - ActionDispatch a : as -> go (ThisDispatch a) as - _ -> error "impossible: this object without dispatch!" + ActionApplication{} : _ -> error "impossible: application for a global object!" + _ -> go ThisObject actions HeadTermination -> go Termination actions where go = foldl applyAction diff --git a/eo-phi-normalizer/src/Language/EO/Phi/Rules/Common.hs b/eo-phi-normalizer/src/Language/EO/Phi/Rules/Common.hs index 768219f12..a379786f9 100644 --- a/eo-phi-normalizer/src/Language/EO/Phi/Rules/Common.hs +++ b/eo-phi-normalizer/src/Language/EO/Phi/Rules/Common.hs @@ -61,8 +61,8 @@ withSubObject f root = , Application obj <$> withSubObjectBindings f bindings ] ObjectDispatch obj a -> ObjectDispatch <$> withSubObject f obj <*> pure a - GlobalDispatch{} -> [] - ThisDispatch{} -> [] + GlobalObject{} -> [] + ThisObject{} -> [] Termination -> [] MetaObject _ -> [] diff --git a/eo-phi-normalizer/src/Language/EO/Phi/Rules/Yaml.hs b/eo-phi-normalizer/src/Language/EO/Phi/Rules/Yaml.hs index 3863834e2..6a0a8e374 100644 --- a/eo-phi-normalizer/src/Language/EO/Phi/Rules/Yaml.hs +++ b/eo-phi-normalizer/src/Language/EO/Phi/Rules/Yaml.hs @@ -82,8 +82,8 @@ objectHasMetavars :: Object -> Bool objectHasMetavars (Formation bindings) = any bindingHasMetavars bindings objectHasMetavars (Application object bindings) = objectHasMetavars object || any bindingHasMetavars bindings objectHasMetavars (ObjectDispatch object attr) = objectHasMetavars object || attrHasMetavars attr -objectHasMetavars (GlobalDispatch attr) = attrHasMetavars attr -objectHasMetavars (ThisDispatch attr) = attrHasMetavars attr +objectHasMetavars GlobalObject = False +objectHasMetavars ThisObject = False objectHasMetavars Termination = False objectHasMetavars (MetaObject _) = True @@ -172,10 +172,8 @@ applySubst subst@Subst{..} = \case Application (applySubst subst obj) (applySubstBindings subst bindings) ObjectDispatch obj a -> ObjectDispatch (applySubst subst obj) (applySubstAttr subst a) - GlobalDispatch a -> - GlobalDispatch (applySubstAttr subst a) - ThisDispatch a -> - ThisDispatch (applySubstAttr subst a) + GlobalObject -> GlobalObject + ThisObject -> ThisObject obj@(MetaObject x) -> fromMaybe obj $ lookup x objectMetas obj -> obj diff --git a/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Abs.hs b/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Abs.hs index 6f6411170..e5d238899 100644 --- a/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Abs.hs +++ b/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Abs.hs @@ -22,8 +22,8 @@ data Object = Formation [Binding] | Application Object [Binding] | ObjectDispatch Object Attribute - | GlobalDispatch Attribute - | ThisDispatch Attribute + | GlobalObject + | ThisObject | Termination | MetaObject MetaId deriving (C.Eq, C.Ord, C.Show, C.Read, C.Data, C.Typeable, C.Generic) diff --git a/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Doc.txt b/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Doc.txt index aa3861088..cbf58b07a 100644 --- a/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Doc.txt +++ b/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Doc.txt @@ -1,98 +1,98 @@ -The Language Syntax -BNF Converter - - -%Process by txt2tags to generate html or latex - - - -This document was automatically generated by the //BNF-Converter//. It was generated together with the lexer, the parser, and the abstract syntax module, which guarantees that the document matches with the implementation of the language (provided no hand-hacking has taken place). - -==The lexical structure of Syntax== - -===Literals=== - - - - - - -Bytes literals are recognized by the regular expression -`````{"--"} | ["0123456789ABCDEF"] ["0123456789ABCDEF"] '-' | ["0123456789ABCDEF"] ["0123456789ABCDEF"] ('-' ["0123456789ABCDEF"] ["0123456789ABCDEF"])+````` - -Function literals are recognized by the regular expression -`````upper (char - [" - !'(),-.:;?[]{|}⟦⟧"])*````` - -LabelId literals are recognized by the regular expression -`````lower (char - [" - !'(),-.:;?[]{|}⟦⟧"])*````` - -AlphaIndex literals are recognized by the regular expression -`````{"α0"} | 'α' (digit - '0') digit*````` - -MetaId literals are recognized by the regular expression -`````'!' (char - [" - !'(),-.:;?[]{|}⟦⟧"])*````` - - -===Reserved words and symbols=== -The set of reserved words is the set of terminals appearing in the grammar. Those reserved words that consist of non-letter characters are called symbols, and they are treated in a different way from those that are similar to identifiers. The lexer follows rules familiar from languages like Haskell, C, and Java, including longest match and spacing conventions. - -The reserved words used in Syntax are the following: - | ``Δ`` | ``Φ`` | ``λ`` | ``ν`` - | ``ξ`` | ``ρ`` | ``σ`` | ``φ`` - -The symbols used in Syntax are the following: - | { | } | ⟦ | ⟧ - | ( | ) | . | ⊥ - | ↦ | ∅ | ⤍ | , - -===Comments=== -There are no single-line comments in the grammar.There are no multiple-line comments in the grammar. - -==The syntactic structure of Syntax== -Non-terminals are enclosed between < and >. -The symbols -> (production), **|** (union) -and **eps** (empty rule) belong to the BNF notation. -All other symbols are terminals. - - | //Program// | -> | ``{`` //[Binding]// ``}`` - | //Object// | -> | ``⟦`` //[Binding]// ``⟧`` - | | **|** | //Object// ``(`` //[Binding]// ``)`` - | | **|** | //Object// ``.`` //Attribute// - | | **|** | ``Φ`` ``.`` //Attribute// - | | **|** | ``ξ`` ``.`` //Attribute// - | | **|** | ``⊥`` - | | **|** | //MetaId// - | //Binding// | -> | //Attribute// ``↦`` //Object// - | | **|** | //Attribute// ``↦`` ``∅`` - | | **|** | ``Δ`` ``⤍`` //Bytes// - | | **|** | ``λ`` ``⤍`` //Function// - | | **|** | //MetaId// - | //[Binding]// | -> | **eps** - | | **|** | //Binding// - | | **|** | //Binding// ``,`` //[Binding]// - | //Attribute// | -> | ``φ`` - | | **|** | ``ρ`` - | | **|** | ``σ`` - | | **|** | ``ν`` - | | **|** | //LabelId// - | | **|** | //AlphaIndex// - | | **|** | //MetaId// - | //RuleAttribute// | -> | //Attribute// - | | **|** | ``Δ`` - | | **|** | ``λ`` - | //PeeledObject// | -> | //ObjectHead// //[ObjectAction]// - | //ObjectHead// | -> | ``⟦`` //[Binding]// ``⟧`` - | | **|** | ``Φ`` - | | **|** | ``ξ`` - | | **|** | ``⊥`` - | //ObjectAction// | -> | ``(`` //[Binding]// ``)`` - | | **|** | ``.`` //Attribute// - | //[ObjectAction]// | -> | **eps** - | | **|** | //ObjectAction// //[ObjectAction]// - - - -%% File generated by the BNF Converter (bnfc 2.9.5). +The Language Syntax +BNF Converter + + +%Process by txt2tags to generate html or latex + + + +This document was automatically generated by the //BNF-Converter//. It was generated together with the lexer, the parser, and the abstract syntax module, which guarantees that the document matches with the implementation of the language (provided no hand-hacking has taken place). + +==The lexical structure of Syntax== + +===Literals=== + + + + + + +Bytes literals are recognized by the regular expression +`````{"--"} | ["0123456789ABCDEF"] ["0123456789ABCDEF"] '-' | ["0123456789ABCDEF"] ["0123456789ABCDEF"] ('-' ["0123456789ABCDEF"] ["0123456789ABCDEF"])+````` + +Function literals are recognized by the regular expression +`````upper (char - [" + !'(),-.:;?[]{|}⟦⟧"])*````` + +LabelId literals are recognized by the regular expression +`````lower (char - [" + !'(),.:;?[]{|}⟦⟧"])*````` + +AlphaIndex literals are recognized by the regular expression +`````{"α0"} | 'α' (digit - '0') digit*````` + +MetaId literals are recognized by the regular expression +`````'!' (char - [" + !'(),-.:;?[]{|}⟦⟧"])*````` + + +===Reserved words and symbols=== +The set of reserved words is the set of terminals appearing in the grammar. Those reserved words that consist of non-letter characters are called symbols, and they are treated in a different way from those that are similar to identifiers. The lexer follows rules familiar from languages like Haskell, C, and Java, including longest match and spacing conventions. + +The reserved words used in Syntax are the following: + | ``Δ`` | ``Φ`` | ``λ`` | ``ν`` + | ``ξ`` | ``ρ`` | ``σ`` | ``φ`` + +The symbols used in Syntax are the following: + | { | } | ⟦ | ⟧ + | ( | ) | . | ⊥ + | ↦ | ∅ | ⤍ | , + +===Comments=== +There are no single-line comments in the grammar.There are no multiple-line comments in the grammar. + +==The syntactic structure of Syntax== +Non-terminals are enclosed between < and >. +The symbols -> (production), **|** (union) +and **eps** (empty rule) belong to the BNF notation. +All other symbols are terminals. + + | //Program// | -> | ``{`` //[Binding]// ``}`` + | //Object// | -> | ``⟦`` //[Binding]// ``⟧`` + | | **|** | //Object// ``(`` //[Binding]// ``)`` + | | **|** | //Object// ``.`` //Attribute// + | | **|** | ``Φ`` + | | **|** | ``ξ`` + | | **|** | ``⊥`` + | | **|** | //MetaId// + | //Binding// | -> | //Attribute// ``↦`` //Object// + | | **|** | //Attribute// ``↦`` ``∅`` + | | **|** | ``Δ`` ``⤍`` //Bytes// + | | **|** | ``λ`` ``⤍`` //Function// + | | **|** | //MetaId// + | //[Binding]// | -> | **eps** + | | **|** | //Binding// + | | **|** | //Binding// ``,`` //[Binding]// + | //Attribute// | -> | ``φ`` + | | **|** | ``ρ`` + | | **|** | ``σ`` + | | **|** | ``ν`` + | | **|** | //LabelId// + | | **|** | //AlphaIndex// + | | **|** | //MetaId// + | //RuleAttribute// | -> | //Attribute// + | | **|** | ``Δ`` + | | **|** | ``λ`` + | //PeeledObject// | -> | //ObjectHead// //[ObjectAction]// + | //ObjectHead// | -> | ``⟦`` //[Binding]// ``⟧`` + | | **|** | ``Φ`` + | | **|** | ``ξ`` + | | **|** | ``⊥`` + | //ObjectAction// | -> | ``(`` //[Binding]// ``)`` + | | **|** | ``.`` //Attribute// + | //[ObjectAction]// | -> | **eps** + | | **|** | //ObjectAction// //[ObjectAction]// + + + +%% File generated by the BNF Converter (bnfc 2.9.5). diff --git a/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Lex.x b/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Lex.x index 6b01ba126..bc087772b 100644 --- a/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Lex.x +++ b/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Lex.x @@ -48,7 +48,7 @@ $c [$u # [\t \n \r \ \! \' \( \) \, \- \. \: \; \? \[ \] \{ \| \} \⟦ \⟧]] * { tok (eitherResIdent T_Function) } -- token LabelId -$s [$u # [\t \n \r \ \! \' \( \) \, \- \. \: \; \? \[ \] \{ \| \} \⟦ \⟧]] * +$s [$u # [\t \n \r \ \! \' \( \) \, \. \: \; \? \[ \] \{ \| \} \⟦ \⟧]] * { tok (eitherResIdent T_LabelId) } -- token AlphaIndex diff --git a/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Par.y b/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Par.y index ddb206275..73f3876bc 100644 --- a/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Par.y +++ b/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Par.y @@ -93,8 +93,8 @@ Object : '⟦' ListBinding '⟧' { Language.EO.Phi.Syntax.Abs.Formation $2 } | Object '(' ListBinding ')' { Language.EO.Phi.Syntax.Abs.Application $1 $3 } | Object '.' Attribute { Language.EO.Phi.Syntax.Abs.ObjectDispatch $1 $3 } - | 'Φ' '.' Attribute { Language.EO.Phi.Syntax.Abs.GlobalDispatch $3 } - | 'ξ' '.' Attribute { Language.EO.Phi.Syntax.Abs.ThisDispatch $3 } + | 'Φ' { Language.EO.Phi.Syntax.Abs.GlobalObject } + | 'ξ' { Language.EO.Phi.Syntax.Abs.ThisObject } | '⊥' { Language.EO.Phi.Syntax.Abs.Termination } | MetaId { Language.EO.Phi.Syntax.Abs.MetaObject $1 } diff --git a/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Print.hs b/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Print.hs index 810c2e1e1..0a781b042 100644 --- a/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Print.hs +++ b/eo-phi-normalizer/src/Language/EO/Phi/Syntax/Print.hs @@ -156,8 +156,8 @@ instance Print Language.EO.Phi.Syntax.Abs.Object where Language.EO.Phi.Syntax.Abs.Formation bindings -> prPrec i 0 (concatD [doc (showString "\10214"), prt 0 bindings, doc (showString "\10215")]) Language.EO.Phi.Syntax.Abs.Application object bindings -> prPrec i 0 (concatD [prt 0 object, doc (showString "("), prt 0 bindings, doc (showString ")")]) Language.EO.Phi.Syntax.Abs.ObjectDispatch object attribute -> prPrec i 0 (concatD [prt 0 object, doc (showString "."), prt 0 attribute]) - Language.EO.Phi.Syntax.Abs.GlobalDispatch attribute -> prPrec i 0 (concatD [doc (showString "\934"), doc (showString "."), prt 0 attribute]) - Language.EO.Phi.Syntax.Abs.ThisDispatch attribute -> prPrec i 0 (concatD [doc (showString "\958"), doc (showString "."), prt 0 attribute]) + Language.EO.Phi.Syntax.Abs.GlobalObject -> prPrec i 0 (concatD [doc (showString "\934")]) + Language.EO.Phi.Syntax.Abs.ThisObject -> prPrec i 0 (concatD [doc (showString "\958")]) Language.EO.Phi.Syntax.Abs.Termination -> prPrec i 0 (concatD [doc (showString "\8869")]) Language.EO.Phi.Syntax.Abs.MetaObject metaid -> prPrec i 0 (concatD [prt 0 metaid]) From 4c7089aac6920bc94d3ce35b8a1352b470b62a0c Mon Sep 17 00:00:00 2001 From: Nikolai Kudasov Date: Tue, 6 Feb 2024 10:48:46 +0300 Subject: [PATCH 2/3] Add test for terms generated from EO --- eo-phi-normalizer/test/Language/EO/PhiSpec.hs | 19 ++++++++++++++++++- .../test/eo/phi/from-eo/as-phi.yaml | 9 +++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 eo-phi-normalizer/test/eo/phi/from-eo/as-phi.yaml diff --git a/eo-phi-normalizer/test/Language/EO/PhiSpec.hs b/eo-phi-normalizer/test/Language/EO/PhiSpec.hs index 503540606..2df5e9b2a 100644 --- a/eo-phi-normalizer/test/Language/EO/PhiSpec.hs +++ b/eo-phi-normalizer/test/Language/EO/PhiSpec.hs @@ -8,6 +8,8 @@ module Language.EO.PhiSpec where import Control.Monad (forM_) +import Data.Char (isSpace) +import Data.List (dropWhileEnd) import Data.String.Interpolate (i) import Language.EO.Phi import Language.EO.Phi.Rules.Common (Context (..), Rule) @@ -24,7 +26,7 @@ applyRule rule = \case spec :: Spec spec = do - describe "Pre-defined rules unit tests" $ + describe "Pre-defined rules" $ forM_ ([(1, rule1), (6, rule6)] :: [(Int, Rule)]) $ \(idx, rule) -> do PhiTestGroup{..} <- runIO (fileTests [i|test/eo/phi/rule-#{idx}.yaml|]) @@ -33,3 +35,18 @@ spec = do \PhiTest{..} -> it name $ applyRule (rule (Context [])) input `shouldBe` [normalized] + describe "Programs translated from EO" $ do + phiTests <- runIO (allPhiTests "test/eo/phi/from-eo/") + forM_ phiTests $ \PhiTestGroup{..} -> + describe title $ + forM_ tests $ + \PhiTest{..} -> do + describe "normalize" $ + it name $ + normalize input `shouldBe` normalized + describe "pretty-print" $ + it name $ + printTree input `shouldBe` trim prettified + +trim :: String -> String +trim = dropWhileEnd isSpace diff --git a/eo-phi-normalizer/test/eo/phi/from-eo/as-phi.yaml b/eo-phi-normalizer/test/eo/phi/from-eo/as-phi.yaml new file mode 100644 index 000000000..1469533f9 --- /dev/null +++ b/eo-phi-normalizer/test/eo/phi/from-eo/as-phi.yaml @@ -0,0 +1,9 @@ +title: Processing terms generated from EO +tests: + - name: "A program that prints itself" + input: | + {org ↦ ⟦eolang ↦ ⟦prints-itself ↦ ⟦φ ↦ Φ.org.eolang.as-phi(α0 ↦ ξ).length.gt(α0 ↦ Φ.org.eolang.int(α0 ↦ Φ.org.eolang.bytes(Δ ⤍ 00-00-00-00-00-00-00-00)))⟧, prints-itself-to-console ↦ ⟦x ↦ Φ.org.eolang.int(α0 ↦ Φ.org.eolang.bytes(Δ ⤍ 00-00-00-00-00-00-00-2A)), φ ↦ Φ.org.eolang.io.stdout(α0 ↦ Φ.org.eolang.as-phi(α0 ↦ ξ))⟧, λ ⤍ Package⟧, λ ⤍ Package⟧} + normalized: | + { ν ↦ ⟦ Δ ⤍ 04- ⟧, org ↦ ⟦ ν ↦ ⟦ Δ ⤍ 03- ⟧, eolang ↦ ⟦ ν ↦ ⟦ Δ ⤍ 02- ⟧, prints-itself ↦ ⟦ ν ↦ ⟦ Δ ⤍ 00- ⟧, φ ↦ Φ.org.eolang.as-phi (α0 ↦ ξ).length.gt (α0 ↦ Φ.org.eolang.int (α0 ↦ Φ.org.eolang.bytes (Δ ⤍ 00-00-00-00-00-00-00-00))) ⟧, prints-itself-to-console ↦ ⟦ ν ↦ ⟦ Δ ⤍ 01- ⟧, x ↦ Φ.org.eolang.int (α0 ↦ Φ.org.eolang.bytes (Δ ⤍ 00-00-00-00-00-00-00-2A)), φ ↦ Φ.org.eolang.io.stdout (α0 ↦ Φ.org.eolang.as-phi (α0 ↦ ξ)) ⟧, λ ⤍ Package ⟧, λ ⤍ Package ⟧ } + prettified: | + { org ↦ ⟦ eolang ↦ ⟦ prints-itself ↦ ⟦ φ ↦ Φ.org.eolang.as-phi (α0 ↦ ξ).length.gt (α0 ↦ Φ.org.eolang.int (α0 ↦ Φ.org.eolang.bytes (Δ ⤍ 00-00-00-00-00-00-00-00))) ⟧, prints-itself-to-console ↦ ⟦ x ↦ Φ.org.eolang.int (α0 ↦ Φ.org.eolang.bytes (Δ ⤍ 00-00-00-00-00-00-00-2A)), φ ↦ Φ.org.eolang.io.stdout (α0 ↦ Φ.org.eolang.as-phi (α0 ↦ ξ)) ⟧, λ ⤍ Package ⟧, λ ⤍ Package ⟧ } From 497a831bd179adc55b537249e6d8632286e86c05 Mon Sep 17 00:00:00 2001 From: Nikolai Kudasov Date: Tue, 6 Feb 2024 10:50:25 +0300 Subject: [PATCH 3/3] Upgrade to stack-action@v5 --- .github/workflows/ghc.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ghc.yml b/.github/workflows/ghc.yml index 12f72d480..4ca298037 100644 --- a/.github/workflows/ghc.yml +++ b/.github/workflows/ghc.yml @@ -36,8 +36,7 @@ jobs: !eo-phi-normalizer/Setup.hs - name: 🧰 Setup Stack - # FIXME use freckle/stack-action@v5 when https://github.com/freckle/stack-action/pull/36 is merged - uses: freckle/stack-action@pb/v5 + uses: freckle/stack-action@v5 with: stack-build-arguments: --${{ github.ref_name != 'master' && 'fast' || '' }} --pedantic @@ -54,8 +53,7 @@ jobs: uses: actions/checkout@v4 - name: 🧰 Setup Stack - # FIXME use freckle/stack-action@v5 when https://github.com/freckle/stack-action/pull/36 is merged - uses: freckle/stack-action@pb/v5 + uses: freckle/stack-action@v5 with: stack-build-arguments: --${{ github.ref_name != 'master' && 'fast' || '' }} --pedantic