Skip to content

Commit ff41b07

Browse files
authored
revert haskell jun3 changes
1 parent 5332376 commit ff41b07

File tree

1 file changed

+60
-61
lines changed

1 file changed

+60
-61
lines changed

backend/junior-3/haskell.md

Lines changed: 60 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,29 @@
9999
* [Type Constraints in Data Declaration Haskell](https://stackoverflow.com/questions/40825878/type-constraints-in-data-declaration-haskell)
100100
* [GADTs vs. MultiParamTypeClasses](https://stackoverflow.com/questions/10994508/gadts-vs-multiparamtypeclasses)
101101

102+
## DataKinds
103+
104+
* What is kind?
105+
* What is the kind `*`? What is the kind `Type`?
106+
* What is the data type promotion?
107+
* What is the main goal for using `DataKinds`?
108+
* Is apostrophe (' symbol) required in a name of a promoted data type?
109+
* Are types with promoted kinds inhabited?
110+
* Can we create a function from a regular data type into promoted one and vice versa?
111+
* What are types which can't be promoted?
112+
* How can heterogenous lists be implemented with `DataKinds` and `GADTs`?
113+
* What are the dependent types and how `DataKinds` allow us to get closer to them?
114+
115+
#### Resources
116+
117+
* [GHC docs](https://downloads.haskell.org/~ghc/8.8-latest/docs/html/users_guide/glasgow_exts.html#extension-DataKinds)
118+
* [Paper - Giving Haskell a Promotion](https://www.seas.upenn.edu/~sweirich/papers/tldi12.pdf)
119+
* [Basic Type Level Programming in Haskell](http://www.parsonsmatt.org/2017/04/26/basic_type_level_programming_in_haskell.html)
120+
* [Haskell's kind system - a primer](https://diogocastro.com/blog/2018/10/17/haskells-kind-system-a-primer/)
121+
* [The Future of Programming is Dependent Types — Programming Word of the Day](https://medium.com/background-thread/the-future-of-programming-is-dependent-types-programming-word-of-the-day-fcd5f2634878)
122+
* [What is dependent typing?](https://stackoverflow.com/questions/9338709/what-is-dependent-typing)
123+
* [Does haskell have dependent types?](https://softwareengineering.stackexchange.com/questions/182066/does-haskell-have-dependent-types)
124+
102125
## ScopedTypeVariables, Higher ranked types
103126

104127
* `ScopedTypeVariables`
@@ -117,6 +140,41 @@
117140
* [Higher-rank and higher-kinded types](https://www.stephanboyer.com/post/115/higher-rank-and-higher-kinded-types)
118141
* [Haskell wiki](https://wiki.haskell.org/Rank-N_types)
119142

143+
## ExistentialQuantification
144+
145+
* What is the main goal of the `ExistentialQuantification` extension?
146+
* Can we use constraints for types of quantified constructor parameters?
147+
* Can we use different constraints for different constructor?
148+
* Could we use existentially quantified types in record constructors?
149+
* What is the scope of existential type variables?
150+
* Can we use `ExistentialQuantification` when declaring `newtype`?
151+
* Can we pattern-match on an existentially quantified constructor in `let` or `where` block?
152+
* Can we pattern-match on an existentially quantified constructor in `case` block?
153+
* Can we use `deriving` with existentially quantified data types?
154+
* Why is there no `exist` keyword in Haskell?
155+
* What are the situations which require using `ScopedTypeVariables`, `ExistentialQuantification`, `RankNTypes`? Compare the use cases of these extensions.
156+
* Could existential type be promoted with `DataKinds` extension?
157+
158+
#### Resources
159+
160+
* [Haskell Wiki](https://wiki.haskell.org/Existential_type)
161+
* [GHC docs](https://downloads.haskell.org/~ghc/8.8-latest/docs/html/users_guide/glasgow_exts.html#existentially-quantified-data-constructors)
162+
* [WikiBooks](https://en.wikibooks.org/wiki/Haskell/Existentially_quantified_types)
163+
* [Why there is no an "Exist" keyword](https://stackoverflow.com/questions/28545545/why-there-is-no-an-exist-keyword-in-haskell-for-existential-quantification)
164+
* [What's the theoretical basis for existential types](https://stackoverflow.com/questions/10753073/whats-the-theoretical-basis-for-existential-types)
165+
* [What does the `forall` keyword in Haskell/GHC do](https://stackoverflow.com/questions/3071136/what-does-the-forall-keyword-in-haskell-ghc-do)
166+
167+
## Extensions Practice
168+
169+
* Solve kata.
170+
* [Count them all!](https://www.codewars.com/kata/5b1bdc2bccef79e948000086)
171+
* [Singletons](https://www.codewars.com/kata/54750ed320c64c64e20002e2)
172+
* Write your own tiny implementation of servant.
173+
For reference use this [guide](https://www.well-typed.com/blog/2015/11/implementing-a-minimal-version-of-haskell-servant/).
174+
* Solve practice exercises. You may ask your interviewers if you have difficulties.
175+
* [Test understanding of functional dependencies](../../backend/junior-3/Practice/FunctionalDependencies.hs)
176+
* [Test understanding of DataKinds used with TypeFamilies and FunctionalDependencies](../../backend/junior-3/Practice/DataKinds.hs)
177+
* [Test understanding of ExistentialQuantification and RankNTypes](../../backend/junior-3/Practice/ExistentialQuantification.hs)
120178

121179
## Laziness
122180

@@ -238,71 +296,12 @@ Should we ban using this pattern?
238296
#### Exceptions resources
239297

240298
* [Defining exceptions in Haskell](https://www.fpcomplete.com/blog/defining-exceptions-in-haskell)
241-
* [Exceptions Best Practices in Haskell.](https://www.fpcomplete.com/blog/2016/11/exceptions-best-practices-haskell)
299+
* [Exceptions Best Practices in Haskell.](https://www.fpcomplete.com/blog/2016/11/exceptions-best-practices-haskell)
242300
* [Catching all exceptions](https://www.schoolofhaskell.com/user/snoyberg/general-haskell/exceptions/catching-all-exceptions#transformers)
243301
* [Exceptions tutorial from IH book](https://markkarpov.com/tutorial/exceptions.html)
244302
Quite hard to read for this level, you would better reread it later.
245303

246-
## [Optional] DataKinds
247-
248-
* What is kind?
249-
* What is the kind `*`? What is the kind `Type`?
250-
* What is the data type promotion?
251-
* What is the main goal for using `DataKinds`?
252-
* Is apostrophe (' symbol) required in a name of a promoted data type?
253-
* Are types with promoted kinds inhabited?
254-
* Can we create a function from a regular data type into promoted one and vice versa?
255-
* What are types which can't be promoted?
256-
* How can heterogenous lists be implemented with `DataKinds` and `GADTs`?
257-
* What are the dependent types and how `DataKinds` allow us to get closer to them?
258-
259-
#### Resources
260-
261-
* [GHC docs](https://downloads.haskell.org/~ghc/8.8-latest/docs/html/users_guide/glasgow_exts.html#extension-DataKinds)
262-
* [Paper - Giving Haskell a Promotion](https://www.seas.upenn.edu/~sweirich/papers/tldi12.pdf)
263-
* [Basic Type Level Programming in Haskell](http://www.parsonsmatt.org/2017/04/26/basic_type_level_programming_in_haskell.html)
264-
* [Haskell's kind system - a primer](https://diogocastro.com/blog/2018/10/17/haskells-kind-system-a-primer/)
265-
* [The Future of Programming is Dependent Types Programming Word of the Day](https://medium.com/background-thread/the-future-of-programming-is-dependent-types-programming-word-of-the-day-fcd5f2634878)
266-
* [What is dependent typing?](https://stackoverflow.com/questions/9338709/what-is-dependent-typing)
267-
* [Does haskell have dependent types?](https://softwareengineering.stackexchange.com/questions/182066/does-haskell-have-dependent-types)
268-
269-
## [Optional] ExistentialQuantification
270-
271-
* What is the main goal of the `ExistentialQuantification` extension?
272-
* Can we use constraints for types of quantified constructor parameters?
273-
* Can we use different constraints for different constructor?
274-
* Could we use existentially quantified types in record constructors?
275-
* What is the scope of existential type variables?
276-
* Can we use `ExistentialQuantification` when declaring `newtype`?
277-
* Can we pattern-match on an existentially quantified constructor in `let` or `where` block?
278-
* Can we pattern-match on an existentially quantified constructor in `case` block?
279-
* Can we use `deriving` with existentially quantified data types?
280-
* Why is there no `exist` keyword in Haskell?
281-
* What are the situations which require using `ScopedTypeVariables`, `ExistentialQuantification`, `RankNTypes`? Compare the use cases of these extensions.
282-
* Could existential type be promoted with `DataKinds` extension?
283-
284-
#### Resources
285-
286-
* [Haskell Wiki](https://wiki.haskell.org/Existential_type)
287-
* [GHC docs](https://downloads.haskell.org/~ghc/8.8-latest/docs/html/users_guide/glasgow_exts.html#existentially-quantified-data-constructors)
288-
* [WikiBooks](https://en.wikibooks.org/wiki/Haskell/Existentially_quantified_types)
289-
* [Why there is no an "Exist" keyword](https://stackoverflow.com/questions/28545545/why-there-is-no-an-exist-keyword-in-haskell-for-existential-quantification)
290-
* [What's the theoretical basis for existential types](https://stackoverflow.com/questions/10753073/whats-the-theoretical-basis-for-existential-types)
291-
* [What does the `forall` keyword in Haskell/GHC do](https://stackoverflow.com/questions/3071136/what-does-the-forall-keyword-in-haskell-ghc-do)
292-
293-
## [Optional] Extensions Practice
294-
295-
* Solve kata.
296-
* [Count them all!](https://www.codewars.com/kata/5b1bdc2bccef79e948000086)
297-
* [Singletons](https://www.codewars.com/kata/54750ed320c64c64e20002e2)
298-
* Write your own tiny implementation of servant.
299-
For reference use this [guide](https://www.well-typed.com/blog/2015/11/implementing-a-minimal-version-of-haskell-servant/).
300-
* Solve practice exercises. You may ask your interviewers if you have difficulties.
301-
* [Test understanding of functional dependencies](../../backend/junior-3/Practice/FunctionalDependencies.hs)
302-
* [Test understanding of DataKinds used with TypeFamilies and FunctionalDependencies](../../backend/junior-3/Practice/DataKinds.hs)
303-
* [Test understanding of ExistentialQuantification and RankNTypes](../../backend/junior-3/Practice/ExistentialQuantification.hs)
304-
305-
## [Optional] Debugging
304+
## Debugging
306305

307306
* `Debug.Trace`
308307
* How is it useful?

0 commit comments

Comments
 (0)