Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/add-showADL-Pairview' into featu…
Browse files Browse the repository at this point in the history
…re/atlas-import
  • Loading branch information
Svroozendaal committed Jun 18, 2024
2 parents bd32036 + a77057e commit 19985a8
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion AmpersandData/FormalAmpersand/Generics.adl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ RELATION srcOrTgt[PairViewSegment*SourceOrTarget] [UNI] -- 'Src' or 'Tgt'. -- IF
-- Unneccessary for the Atlas: RELATION expSQL[PairViewSegment*MySQLQuery] [UNI] -- IFF SegmentType == 'Exp'
RELATION pvsExp[PairViewSegment*Term] [UNI]


RELATION showADL[PairView*ShowADL] [UNI,TOT] -- Temporary relation to enable first attempt to make the atlas editable.

--[Conjuncts]--
RELATION allConjuncts[Context*Conjunct] [INJ]
Expand Down
1 change: 1 addition & 0 deletions src/Ampersand/Core/A2P_Converters.hs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ module Ampersand.Core.A2P_Converters
aPattern2pPattern,
aRoleRule2pRoleRule,
aInterface2pInterface,
aPairView2pPairView,
)
where

Expand Down
7 changes: 7 additions & 0 deletions src/Ampersand/Core/ShowAStruct.hs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE UndecidableInstances #-}

module Ampersand.Core.ShowAStruct (AStruct (..)) where

import Ampersand.Basics
Expand All @@ -23,6 +27,9 @@ instance AStruct AClassify where
instance AStruct Rule where
showA = showP . aRule2pRule

instance AStruct (PairView Expression) where
showA = showP . aPairView2pPairView

instance AStruct Relation where
showA = showP . aRelation2pRelation

Expand Down
7 changes: 7 additions & 0 deletions src/Ampersand/FSpec/Transformers.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1711,6 +1711,13 @@ tmpNewTransformerDefsFA fSpec =
| rel :: Relation <- instanceList fSpec,
mean <- decMean rel
]
),
( "showADL",
"PairView",
"ShowADL",
[ (dirtyId pv, PopAlphaNumeric (showA pv))
| pv :: PairView Expression <- instanceList fSpec
]
)
]

Expand Down

0 comments on commit 19985a8

Please sign in to comment.