Skip to content

Commit a5ee9d2

Browse files
committed
Create smart constructor for System.
1 parent 71fd055 commit a5ee9d2

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

code/drasil-system/lib/System/Drasil.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module System.Drasil (
55
-- ** Lenses
66
HasSystem(..),
77
-- ** Functions
8-
whatsTheBigIdea,
8+
whatsTheBigIdea, mkSystem,
99
-- * Reference Database
1010
-- ** Types
1111
Purpose, Background, Scope, Motivation,

code/drasil-system/lib/System/Drasil/System.hs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ module System.Drasil.System (
1212
-- ** Lenses
1313
HasSystem(..),
1414
-- ** Functions
15-
whatsTheBigIdea,
15+
whatsTheBigIdea, mkSystem,
1616
-- * Reference Database
1717
-- ** Types
1818
Purpose, Background, Scope, Motivation,
@@ -84,3 +84,13 @@ data System where
8484
} -> System
8585

8686
makeClassy ''System
87+
88+
mkSystem :: (CommonIdea a, Idea a,
89+
Quantity e, Eq e, MayHaveUnit e,
90+
Quantity h, MayHaveUnit h,
91+
Quantity i, MayHaveUnit i,
92+
HasUID j, Constrained j) =>
93+
a -> SystemKind -> People -> Purpose -> Background -> Scope -> Motivation ->
94+
[e] -> [TheoryModel] -> [GenDefn] -> [DataDefinition] -> [InstanceModel] ->
95+
[String] -> [h] -> [i] -> [j] -> [ConstQDef] -> ChunkDB -> System
96+
mkSystem = SI

0 commit comments

Comments
 (0)