Skip to content

Commit 8a05e56

Browse files
committed
Format type error examples.
1 parent 5109069 commit 8a05e56

11 files changed

+96
-21
lines changed

examples/type-errors/FontFaceMissingFontFamily.purs

+5-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ See https://www.w3.org/TR/css-fonts-4/#font-family-desc for more information.
99

1010
module TypeError.FontFaceMissingFontFamily where
1111

12-
import Tecton (CSS, fontFace, fontFamily, src, url, (?), (:=))
12+
import Tecton (CSS, fontFace, fontFamily, src, url, (:=), (?))
13+
import Tecton.Rule as Rule
1314

1415
css :: CSS
15-
css = fontFace ? src := url "foo.woff"
16+
css =
17+
fontFace ? Rule.do
18+
src := url "foo.woff"

examples/type-errors/GradientConsecutiveTransitionHints.purs

+13-2
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,23 @@ information.
1111
module TypeError.GradientConsecutiveTransitionHints where
1212

1313
import Prelude
14+
1415
import Color (black, white)
1516
import Data.Tuple.Nested ((/\))
16-
import Tecton (CSS, backgroundImage, deg, linearGradient, pct, universal, (:=), (?))
17+
import Tecton
18+
( CSS
19+
, backgroundImage
20+
, deg
21+
, linearGradient
22+
, pct
23+
, universal
24+
, (:=)
25+
, (?)
26+
)
27+
import Tecton.Rule as Rule
1728

1829
css :: CSS
1930
css =
20-
universal ?
31+
universal ? Rule.do
2132
backgroundImage :=
2233
linearGradient (deg 180) $ black /\ pct 40 /\ pct 50 /\ white

examples/type-errors/GradientInsufficientColorStops.purs

+5-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ information.
1111
module TypeError.GradientInsufficientColorStops where
1212

1313
import Color (black, white)
14-
import Tecton (CSS, backgroundImage, deg, linearGradient, universal, (?), (:=))
14+
import Tecton (CSS, backgroundImage, deg, linearGradient, universal, (:=), (?))
15+
import Tecton.Rule as Rule
1516

1617
css :: CSS
17-
css = universal ? backgroundImage := linearGradient (deg 180) black
18+
css =
19+
universal ? Rule.do
20+
backgroundImage := linearGradient (deg 180) black

examples/type-errors/GridTemplateColumnsAutoRepeatWithFlex.purs

+14-2
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,21 @@ information.
1212
module TypeError.GridTemplateColumnsAutoRepeatWithFlex where
1313

1414
import Data.Tuple.Nested ((/\))
15-
import Tecton (CSS, autoFill, fr, gridTemplateColumns, pct, px, repeat, universal, (?), (:=))
15+
import Tecton
16+
( CSS
17+
, autoFill
18+
, fr
19+
, gridTemplateColumns
20+
, pct
21+
, px
22+
, repeat
23+
, universal
24+
, (:=)
25+
, (?)
26+
)
27+
import Tecton.Rule as Rule
1628

1729
css :: CSS
1830
css =
19-
universal ?
31+
universal ? Rule.do
2032
gridTemplateColumns := fr 1 /\ repeat autoFill (px 100 /\ pct 10)

examples/type-errors/GridTemplateColumnsMultipleAutoRepeat.purs

+14-2
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,21 @@ information.
1212
module TypeError.GridTemplateColumnsMultipleAutoRepeat where
1313

1414
import Data.Tuple.Nested ((/\))
15-
import Tecton (CSS, autoFill, autoFit, gridTemplateColumns, pct, px, repeat, universal, (?), (:=))
15+
import Tecton
16+
( CSS
17+
, autoFill
18+
, autoFit
19+
, gridTemplateColumns
20+
, pct
21+
, px
22+
, repeat
23+
, universal
24+
, (:=)
25+
, (?)
26+
)
27+
import Tecton.Rule as Rule
1628

1729
css :: CSS
1830
css =
19-
universal ?
31+
universal ? Rule.do
2032
gridTemplateColumns := repeat autoFit (px 100) /\ repeat autoFill (pct 10)

examples/type-errors/KeyframesNonAnimatableProperty.purs

+4-2
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@ for more information.
1212
module TypeError.KeyframesNonAnimatableProperty where
1313

1414
import Prelude
15+
1516
import Tecton (CSS, content, keyframes, keyframesName, nil, pct, (:=), (?))
17+
import Tecton.Rule as Rule
1618

1719
css :: CSS
1820
css = do
1921
keyframes (keyframesName "foo") ? do
20-
pct 0 ?
22+
pct 0 ? Rule.do
2123
content := ""
22-
pct 100 ?
24+
pct 100 ? Rule.do
2325
content := "hello"

examples/type-errors/RulesetPropertyAppearsTwice.purs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ reviewed.
1010
module TypeError.RulesetPropertyAppearsTwice where
1111

1212
import Color (black, white)
13-
import Tecton (CSS, color, universal, (?), (:=))
13+
import Tecton (CSS, color, universal, (:=), (?))
1414
import Tecton.Rule as Rule
1515

1616
css :: CSS

examples/type-errors/SelectorMultiplePseudoElements.purs

+15-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,20 @@ unclear. Google it: https://www.google.com/search?q=%22sub+pseudo+elements%22
1414

1515
module TypeError.SelectorMultiplePseudoElements where
1616

17-
import Tecton (CSS, after, color, currentColor, placeholder, universal, (&:), (?), (:=))
17+
import Tecton
18+
( CSS
19+
, after
20+
, color
21+
, currentColor
22+
, placeholder
23+
, universal
24+
, (&:)
25+
, (:=)
26+
, (?)
27+
)
28+
import Tecton.Rule as Rule
1829

1930
css :: CSS
20-
css = universal &: placeholder &: after ? color := currentColor
31+
css =
32+
universal &: placeholder &: after ? Rule.do
33+
color := currentColor

examples/type-errors/SelectorPseudoClassingPseudoElement.purs

+15-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,20 @@ nor Firefox 107, supports this notion of "pseudo-classing pseudo-elements".
1212

1313
module TypeError.SelectorPseudoClassingPseudoElement where
1414

15-
import Tecton (CSS, after, hover, textDecorationLine, underline, universal, (&:), (?), (:=))
15+
import Tecton
16+
( CSS
17+
, after
18+
, hover
19+
, textDecorationLine
20+
, underline
21+
, universal
22+
, (&:)
23+
, (:=)
24+
, (?)
25+
)
26+
import Tecton.Rule as Rule
1627

1728
css :: CSS
18-
css = universal &: after &: hover ? textDecorationLine := underline
29+
css =
30+
universal &: after &: hover ? Rule.do
31+
textDecorationLine := underline

examples/type-errors/SelectorPseudoElementDescendant.purs

+5-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ information.
1010

1111
module TypeError.SelectorPseudoElementDescendant where
1212

13-
import Tecton (CSS, after, nil, universal, width, (&:), (|*), (?), (:=))
13+
import Tecton (CSS, after, nil, universal, width, (&:), (:=), (?), (|*))
14+
import Tecton.Rule as Rule
1415

1516
css :: CSS
16-
css = universal &: after |* universal ? width := nil
17+
css =
18+
universal &: after |* universal ? Rule.do
19+
width := nil

examples/type-errors/TransitionPropertyNotAnimatable.purs

+5-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ for more information.
1111

1212
module TypeError.TransitionPropertyNotAnimatable where
1313

14-
import Tecton (CSS, alignContent, transitionProperty, universal, (?), (:=))
14+
import Tecton (CSS, alignContent, transitionProperty, universal, (:=), (?))
15+
import Tecton.Rule as Rule
1516

1617
css :: CSS
17-
css = universal ? transitionProperty := alignContent
18+
css =
19+
universal ? Rule.do
20+
transitionProperty := alignContent

0 commit comments

Comments
 (0)