Search Haskell Channel Logs

Thursday, February 9, 2017

#haskell channel featuring krey, roxxik, mangustt, ralu, lambdabot, lc__,

mniip 2017-02-09 06:54:39
I always forget, is Hom internal and hom to Set?
mniip 2017-02-09 06:54:43
or is it vice versa
mniip 2017-02-09 06:56:20
yes I was correct
krey 2017-02-09 06:56:52
hey, I'm looking for a function Maybe (IO a) -> IO (Maybe a). does such a thing exist? hoogle didn't help
kadoban 2017-02-09 06:57:46
:t sequence :: Maybe (IO a) -> IO (Maybe a)
lambdabot 2017-02-09 06:57:48
Maybe (IO a) -> IO (Maybe a)
kadoban 2017-02-09 06:57:56
:t sequence
lambdabot 2017-02-09 06:57:58
(Traversable t, Monad m) => t (m a) -> m (t a)
kadoban 2017-02-09 06:58:22
Hoogle doesn't do so good when what you want is more polymorphic than what you're asking for it seems.
lc__ 2017-02-09 06:58:41
hoogle found sequence fine for me
lc__ 2017-02-09 06:58:51
when searching for Maybe (IO a) -> IO (Maybe a)
kadoban 2017-02-09 06:59:05
Oh
lc__ 2017-02-09 06:59:06
https://www.haskell.org/hoogle/?hoogle=Maybe+%28IO+a%29+-%3E+IO+%28Maybe+a%29
krey 2017-02-09 06:59:16
kadoban: thanks
krey 2017-02-09 06:59:35
lc__: yes, this is actually my bad, I skipped that hit because it seemed like an unlikely name
lc__ 2017-02-09 06:59:59
the fact that Maybe is Traversable is a good intuition to have
lc__ 2017-02-09 07:00:07
it just has at most one element
lc__ 2017-02-09 07:00:47
it means you can use it in forM and other things
lc__ 2017-02-09 07:00:58
:t forM_
lambdabot 2017-02-09 07:01:01
(Foldable t, Monad m) => t a -> (a -> m b) -> m ()
mangustt 2017-02-09 07:05:21
hi, is anyone familiar with the FEN notation?
roxxik 2017-02-09 07:16:48
mangustt: is that a chess thing?
mangustt 2017-02-09 07:21:28
roxxik yeah or this http://www.pjb.com.au/laska/play_laska.html
mangustt 2017-02-09 07:22:18
roxxik was just wondering if someone had an code example of parsin a FEN string (b,b,b,b/b,b,b/b,b,b,/,,/w,w,bw,w/w,w,w/w,w,w,w w g5-f4-e3)
roxxik 2017-02-09 07:23:20
this should be rather simple
roxxik 2017-02-09 07:23:34
but i don't have code for it
roxxik 2017-02-09 07:23:46
parsing is a real delight in haskell ;)
ralu 2017-02-09 07:30:17
mangustt: take a look at chesshs https://hackage.haskell.org/package/chesshs
mangustt 2017-02-09 07:41:26
ralu thanks, will do now
mangustt 2017-02-09 07:41:50
ralu i found a few examples but it was quite comprehensive and i didnt really get the idea behind the functions
pie__ 2017-02-09 07:44:32
hi guys, anyone here have anything to do with program analysis / formal methods?
pie__ 2017-02-09 07:44:47
im interested in the area and would like to know "wat do"