Skip to content

Commit

Permalink
refine nonTrivialInheritanceConstraint
Browse files Browse the repository at this point in the history
  • Loading branch information
marcellussiegburg committed Dec 14, 2023
1 parent 06dedf0 commit 6b52f11
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Modelling/CdOd/CdAndChanges/Transform.hs
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ transformNoChanges config properties withNonTrivialInheritance =
nonTrivialInheritanceConstraint :: String -> String -> Maybe Bool -> String
nonTrivialInheritanceConstraint inheritances assocs withNonTrivialInheritance =
(`foldMap` trivialInh) $ \x -> [i| #{withInheritance}
#{x} i : #{inheritances} | i.to in (#{assocs}.from + #{assocs}.to)|]
#{x} i : #{inheritances} | i.to in ((#{assocs} + #{inheritances}).from + #{assocs}.to)|]
where
trivialInh = withNonTrivialInheritance
<&> bool "no" "all"
withInheritance = maybe
""
(bool "" "some Inheritance")
(bool "" [i|some Inheritance <: #{inheritances}|])

Check failure on line 72 in src/Modelling/CdOd/CdAndChanges/Transform.hs

View workflow job for this annotation

GitHub Actions / run

Error: Parse error: on input `)' ▫︎ Found: " withInheritance = maybe\n \"\"\n> (bool \"\" [i|some Inheritance <: #{inheritances}|])\n withNonTrivialInheritance\n"
withNonTrivialInheritance

transform :: ClassConfig -> RelationshipProperties -> Maybe Bool -> String
Expand Down

0 comments on commit 6b52f11

Please sign in to comment.