Skip to content

Commit 5279913

Browse files
author
Oskar Lundström
committed
Brus i bilaga
1 parent 635befa commit 5279913

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

Physics/src/Dimensions/Quantity.lhs

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -215,20 +215,10 @@ The following example shows that during a multiplication, the types will change,
215215
< width :: Quantity Length Double
216216
< ghci> area
217217
< 0.15 m^2
218-
< ghci> :t area
219-
< area
220-
< :: Quantity
221-
< ('Dim
222-
< 'Numeric.NumType.DK.Integers.Pos2 -- The interesting line
223-
< 'Numeric.NumType.DK.Integers.Zero
224-
< 'Numeric.NumType.DK.Integers.Zero
225-
< 'Numeric.NumType.DK.Integers.Zero
226-
< 'Numeric.NumType.DK.Integers.Zero
227-
< 'Numeric.NumType.DK.Integers.Zero
228-
< 'Numeric.NumType.DK.Integers.Zero)
229-
< Double
230-
231-
Which is the same as `Area`.
218+
< ghci> :i area
219+
< area :: Quantity Area Double
220+
221+
(Try out `:t` instead of `:i` on the last one and see what happens!)
232222

233223
The type-level dimensions are used below to enforce, at compile-time, that only allowed operations are attempted.
234224

1.54 KB
Binary file not shown.

0 commit comments

Comments
 (0)