Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 650d7b1

Browse files
Fix typos in PolyKinds exercise
1 parent 1ea0570 commit 650d7b1

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

‎exercise08/src/Exercises.hs‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ data Strings (n :: Nat) where
144144
-- example
145145
-- = [ Sigma SZ SNil
146146
-- , Sigma (SS SZ) ("hi" :> SNil)
147-
-- , Sigma (SS (SS SZ)) ("hello" :> "world")
147+
-- , Sigma (SS (SS SZ)) ("hello" :> ("world" :> SNil))
148148
-- ]
149149
-- @
150150

@@ -166,7 +166,14 @@ data Vector (a :: Type) (n :: Nat) where -- @n@ and @a@ flipped... Hmm, a clue!
166166
VNil :: Vector a 'Z
167167
VCons :: a -> Vector a n -> Vector a ('S n)
168168

169-
-- | d. Our sigma type is actually very useful. Let's imagine we're looking at
169+
170+
171+
172+
173+
174+
{- SIX -}
175+
176+
-- | Our sigma type is actually very useful. Let's imagine we're looking at
170177
-- a communication protocol over some network, and we label our packets as
171178
-- @Client@ or @Server@:
172179

‎exercise08/src/PolyKinds.hs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ smuggle a = a
105105
Once you enable the extensions as GHC tells you, the error is that we
106106
couldn't match @IO (Secrets, a)@ with @a@. Because we said this function
107107
will work /for all/ a, we therefore can't know anything about the value! With
108-
type families, however, we can look at the intuitively kinds involved as more
108+
type families, however, we can look at the kinds involved as more
109109
arguments to the function. The 'Smuggler' family has two inputs: the /type/
110110
@x@, and the /kind/ @k@.
111111

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /