Search Haskell Channel Logs

Saturday, March 4, 2017

#haskell channel featuring eklavya, lambdafan, S11001001, ertes,

lambdafan 2017-03-04 17:53:23
can we have dependently typed pairs in haskell?
ertes 2017-03-04 17:53:54
lambdafan: see the dependent-sum library
lambdafan 2017-03-04 17:54:38
nice, thanks :)
lambdafan 2017-03-04 17:56:56
perfect!
eklavya 2017-03-04 18:37:24
what is ~() here "~(f, s') <- mf s" ?
eklavya 2017-03-04 18:39:29
if this is not something in the syntax
eklavya 2017-03-04 18:39:34
context:
eklavya 2017-03-04 18:39:38
StateT mf <*> StateT mx = StateT $ \ s -> do
eklavya 2017-03-04 18:39:38
~(f, s') <- mf s
eklavya 2017-03-04 18:39:39
~(x, s'') <- mx s'
eklavya 2017-03-04 18:39:40
return (f x, s'')
S11001001 2017-03-04 18:43:01
eklavya: it means, don't force the tuple as part of pattern matching; instead, that f x gets turned into (fst theFirstTuple) (fst theSecondTuple)
eklavya 2017-03-04 18:43:35
S11001001: sorry, not getting you
S11001001 2017-03-04 18:43:39
eklavya: https://en.wikibooks.org/wiki/Haskell/Laziness#Lazy_pattern_matching
eklavya 2017-03-04 18:43:56
S11001001: thanks :) let me read that