Re: [Haskell-cafe] Propositions in Haskell

2013-05-16 Thread Patrick Browne
I do understand the difference between theorem provers and Haskell programs.Logic can be used to reason 'about' Haskell programs and logic can be used 'within' Haskell programs.I am trying to clarify the difference between 'about' and 'within'Is approach 1 concerned with  |= (model based

Re: [Haskell-cafe] Propositions in Haskell

2013-05-16 Thread Dan Mead
maybe this will help? Haskell code in and of itself isn't special. proofs can happen with the type system, but typically you'd want to define a target language and do assertions about it, similar to how a compiler inspects it's input programs. Haskell is not homoiconic nor is it like coq or

[Haskell-cafe] Infrastructure for testing the impact of a Functor/Applicative/Monad hierarchy

2013-05-16 Thread Niklas Hambüchen
Reading the other thread (Adding Applicative/Functor instances to all Monads in GHC) I was wondering if there was infrastructure for testing what effect making the often-discussed Functor/Monad change would have: How many packages on hackage would break etc. I have read a few times that people

Re: [Haskell-cafe] Infrastructure for testing the impact of a Functor/Applicative/Monad hierarchy

2013-05-16 Thread Stephen Tetley
Has anyone surveyed the in-print textbooks, tutorials, or tried to assess how much Haskell (H98, H2010, Glasgow Haskell?) is used in teaching? Having the wrong hierarchy is a minor annoyance to us members of the cognoscenti, but a change outside a revision of the language standard could leave a

Re: [Haskell-cafe] Infrastructure for testing the impact of a Functor/Applicative/Monad hierarchy

2013-05-16 Thread Edward Kmett
There is a chicken and the egg problem with this argument. Historically Haskell' has only considered changes that have been actually implemented. I would encourage the language standard to follow suit, but we survived a similar autocratic minor change to Num with very little ecosystem

[Haskell-cafe] Library for drawing simple user interface

2013-05-16 Thread Emanuel Koczwara
Hi, Which library should I use for simple user interface? Should I use opengl directly (through HOpenGL)? Or Gloss? Or something else? I want to create small ui library from scratch in haskell. Emanuel ___ Haskell-Cafe mailing list

[Haskell-cafe] List comprehensions with Word8

2013-05-16 Thread Jose A. Lopes
Hello everyone, I was playing with Word8 and list comprehensions and the following examples came up. I have to admit the behavior looks quite strange because it does not seem to be consistent. Can someone shed some light on reason behind some of these outputs? By the way, I have abbreviated

Re: [Haskell-cafe] List comprehensions with Word8

2013-05-16 Thread Felipe Almeida Lessa
Prelude 10 `mod` 256 0 So [1..10] == [1..0]. Cheers, On Thu, May 16, 2013 at 6:15 PM, Jose A. Lopes jose.lo...@ist.utl.pt wrote: Hello everyone, I was playing with Word8 and list comprehensions and the following examples came up. I have to admit the behavior looks quite

Re: [Haskell-cafe] List comprehensions with Word8

2013-05-16 Thread Tikhon Jelvis
This happens because of how fromInteger is defined for Word8. It maps integers to integers mod 256. Also remember that 10 is actually fromInteger 10, in all of your examples. So your example is actually equivalent to [0..1 `mod` 256]. On May 16, 2013 2:19 PM, Jose A. Lopes

Re: [Haskell-cafe] List comprehensions with Word8

2013-05-16 Thread Steve Schafer
On Thu, 16 May 2013 23:15:33 +0200, you wrote: Hello everyone, I was playing with Word8 and list comprehensions and the following examples came up. I have to admit the behavior looks quite strange because it does not seem to be consistent. Can someone shed some light on reason behind some of

Re: [Haskell-cafe] List comprehensions with Word8

2013-05-16 Thread Casey McCann
At risk of belaboring the now-obvious, note that the empty lists begin at 1, which is 10^8, and thus the first power of 10 evenly divisible by 2^8. The largest value in the list for each 10^n is likewise 0 modulo 2^n. (Figuring out why the sequence has those particular multiples of 2^n is

Re: [Haskell-cafe] A use case for *real* existential types

2013-05-16 Thread Roman Cheplyaka
* o...@okmij.org o...@okmij.org [2013-05-11 05:26:55-] I must say though that I'd rather prefer Adres solution because his init init :: (forall a. Inotify a - IO b) - IO b ensures that Inotify does not leak, and so can be disposed of at the end. So his init enforces the region

[Haskell-cafe] Lambda expressions (core) to categorical form

2013-05-16 Thread Conal Elliott
I want to convert lambda expressions into a vocabulary of monoidal categories, so that they can be given multiple interpretations, including circuit generation and timing analysis, and hopefully some other far-out alternatives (3D visualization, animated evaluation, etc). More specifically, I want