On Mon, Jun 28, 2010 at 08:51:45AM +0400, Victor Nazarov wrote:
What we get with this instances is following code.
main =
do print (sizeof :: Sizeof Word16)
Let's try it.
$ runhaskell this.lhs
this.lhs:78:14:
Couldn't match expected type `Int'
against
I've allways found code like
-- maxBound (undefined :: Int)
a bit strange as any usage of undefined is.
Being Ruby on Rails developer
I've personally found that one of the main
Rails motos is being as readable as possible.
Code must be as close to english as possible.
Embeded DSLs like rspec
On Sunday 27 June 2010 21:52:18, Victor Nazarov wrote:
I've allways found code like
-- maxBound (undefined :: Int)
a bit strange
Well, that would indeed be a bit strange since
maxBound :: (Bounded a) = a
and function types aren't instances of Bounded, so it'd be
maxBound :: Int
maxBound
On 28 June 2010 05:52, Victor Nazarov asviraspossi...@gmail.com wrote:
Having this in my mind I've decided that this code should be
rewritten without undefined being mentioned. But I need some
type signature and it should mention Int type. So I've got an
idea about what I've called fantom type
On Mon, Jun 28, 2010 at 12:33 AM, Daniel Fischer
daniel.is.fisc...@web.de wrote:
On Sunday 27 June 2010 21:52:18, Victor Nazarov wrote:
I've allways found code like
-- maxBound (undefined :: Int)
a bit strange
Well, that would indeed be a bit strange since
maxBound :: (Bounded a) = a