diff --git a/AmpersandData/FormalAmpersand/Generics.adl b/AmpersandData/FormalAmpersand/Generics.adl index 8ecd3b00d..e0386965c 100644 --- a/AmpersandData/FormalAmpersand/Generics.adl +++ b/AmpersandData/FormalAmpersand/Generics.adl @@ -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] diff --git a/src/Ampersand/Core/A2P_Converters.hs b/src/Ampersand/Core/A2P_Converters.hs index 2a11efe23..9399aba1e 100644 --- a/src/Ampersand/Core/A2P_Converters.hs +++ b/src/Ampersand/Core/A2P_Converters.hs @@ -18,6 +18,7 @@ module Ampersand.Core.A2P_Converters aPattern2pPattern, aRoleRule2pRoleRule, aInterface2pInterface, + aPairView2pPairView, ) where diff --git a/src/Ampersand/Core/ShowAStruct.hs b/src/Ampersand/Core/ShowAStruct.hs index b4ba7bc80..299b1b5e5 100644 --- a/src/Ampersand/Core/ShowAStruct.hs +++ b/src/Ampersand/Core/ShowAStruct.hs @@ -1,3 +1,7 @@ +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE UndecidableInstances #-} + module Ampersand.Core.ShowAStruct (AStruct (..)) where import Ampersand.Basics @@ -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 diff --git a/src/Ampersand/FSpec/Transformers.hs b/src/Ampersand/FSpec/Transformers.hs index 0b8d7b4f5..77e92676b 100644 --- a/src/Ampersand/FSpec/Transformers.hs +++ b/src/Ampersand/FSpec/Transformers.hs @@ -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 + ] ) ]