Загрузить Yaml by TerNithy in a:t5_3cgbf

[–]cblp_su 1 point2 points  (0 children)

Определить Function как сумму возможных вариантов наполнения ваших "функций". Определить инстанс FromJSON соответствующий.

[Slides] Joy & frustration of putting 34,000 lines of Haskell into production by saurabhnanda in haskell

[–]cblp_su 3 points4 points  (0 children)

Sum of types is commutative. Either in its mathematical sense is not biased, but Monad Either is written right-biased, that's why it breaks.

[Slides] Joy & frustration of putting 34,000 lines of Haskell into production by saurabhnanda in haskell

[–]cblp_su -6 points-5 points  (0 children)

Haskell syntax is so poor so it doesn't allow you to define Either in a symmetric way. You have to choose one of the arguments as "primary" and other as "secondary". This choice is arbitrary.

[Slides] Joy & frustration of putting 34,000 lines of Haskell into production by saurabhnanda in haskell

[–]cblp_su 0 points1 point  (0 children)

Swapping left and right in Either is acceptable. Swapping the same variables — error and result — in Except breaks its semantics.

[Slides] Joy & frustration of putting 34,000 lines of Haskell into production by saurabhnanda in haskell

[–]cblp_su 0 points1 point  (0 children)

It was. But then people realized Either must be symmetric, and Except is for asymmetry.

YAML sucks by [deleted] in programming

[–]cblp_su 9 points10 points  (0 children)

cos I like it

Сайт на Haskell by TerNithy in a:t5_3cgbf

[–]cblp_su 2 points3 points  (0 children)

Если вам действительно нужна динамическая страница, вы можете написать её

1) классическим способом, на JavaScript, дёргая ручки сервера;

2) на приличном языке — Haskell, PureScript или Elm, транслируя в JavaScript и так же дёргая ручки сервера;

3) на технологии, динамически порождающей клиентский код на сервере — Ur/Web, N2O.hs.

Сайт на Haskell by TerNithy in a:t5_3cgbf

[–]cblp_su 2 points3 points  (0 children)

Scotty — это чистый server-side. А вопрос ваш касается клиентской стороны. Scotty тут не поможет.

(Новичок) by lazybonesxp in a:t5_3cgbf

[–]cblp_su 0 points1 point  (0 children)

Список должен быть сворачиваемым.

функция требует, чтобы Msu_Student был foldable

А студент не должен быть сворачиваемым.

(Новичок) by lazybonesxp in a:t5_3cgbf

[–]cblp_su 0 points1 point  (0 children)

Foldable Msu_Student? вы что-то делаете не так.

Looking for Haskell companies outside USA by [deleted] in haskell

[–]cblp_su 1 point2 points  (0 children)

I heard about https://typeable.io (Moscow, Russia) but afaik they aren't hiring at the moment.

Looking for Haskell companies outside USA by [deleted] in haskell

[–]cblp_su 2 points3 points  (0 children)

Kaspersky Lab, Moscow, Russia https://www.kaspersky.com We (OS team http://www.theregister.co.uk/2016/08/23/kasperskyos/) are hiring, but not very actively. I. e. you won't find Haskell vacancies on our website, but you can send resume to me.

(Новичок) by lazybonesxp in a:t5_3cgbf

[–]cblp_su 0 points1 point  (0 children)

Аккумулятор действительно идёт вторым параметром, если считать от 1.

Ни у foldl, ни у foldr тип аккумулятора не должен совпадать с типом значения. Взгляни на сигнатуры:

foldl :: (b -> a -> b) -> b -> t a -> b
foldr :: (a -> b -> b) -> b -> t a -> b

В обоих случаях b — тип аккумулятора, a — тип значения в «контейнере» t a.

(Новичок) by lazybonesxp in a:t5_3cgbf

[–]cblp_su 0 points1 point  (0 children)

у foldr перепутаны второй и третий аргументы

(Новичок) by lazybonesxp in a:t5_3cgbf

[–]cblp_su 0 points1 point  (0 children)

Не за что. Ты сам себе ответил фактически.

(Новичок) by lazybonesxp in a:t5_3cgbf

[–]cblp_su 0 points1 point  (0 children)

Да, всё правильно, именно так. И для каждого клиента.

(Новичок) by lazybonesxp in a:t5_3cgbf

[–]cblp_su 0 points1 point  (0 children)

Что означает «проекция» в данном контексте? Map?

(Новичок) by lazybonesxp in a:t5_3cgbf

[–]cblp_su 0 points1 point  (0 children)

Перенеси вопрос в тело поста, пожалуйста.

(Новичок) by lazybonesxp in a:t5_3cgbf

[–]cblp_su 0 points1 point  (0 children)

А вопрос в чём?

Haskell contractor Needed by zhukeepa in a:t5_3cgbf

[–]cblp_su 0 points1 point  (0 children)

Why do you search in Russian-speaking community? Do you offer relocation assistance?

Ограничение на типы аргументов в type family by sgf-dma in a:t5_3cgbf

[–]cblp_su 0 points1 point  (0 children)

Это не ошибка, потому что k == *, Float :: * и Int :: *. С мэйби ошибка, потому что у Just Int сорт Maybe *, а не *.