Re: [Haskell-cafe] Compilers: Why do we need a core language?

2012-11-25 Thread wren ng thornton
On 11/25/12 11:08 PM, Richard O'Keefe wrote: On 24/11/2012, at 5:26 PM, wren ng thornton wrote: On 11/20/12 6:54 AM, c...@lavabit.com wrote: Hello, I know nothing about compilers and interpreters. I checked several books, but none of them explained why we have to translate a high-level langu

Re: [Haskell-cafe] Compilers: Why do we need a core language?

2012-11-25 Thread Richard O'Keefe
On 24/11/2012, at 5:26 PM, wren ng thornton wrote: > On 11/20/12 6:54 AM, c...@lavabit.com wrote: >> Hello, >> >> I know nothing about compilers and interpreters. I checked several >> books, but none of them explained why we have to translate a >> high-level language into a small (core) language

Re: [Haskell-cafe] Is there a tool like ri from ruby?

2012-11-25 Thread Magicloud Magiclouds
Thank you two. I have got it working. Compared to ri, I think: The pro is I could find the package that I want even I do not know it. The con is I'd have to manually update its data. On Mon, Nov 26, 2012 at 9:21 AM, John Wiegley wrote: > > Tikhon Jelvis writes: > > > Have you tried Hoogle?

Re: [Haskell-cafe] Category Theory and Haskell

2012-11-25 Thread John Wiegley
> Gytis Žilinskas writes: > How difficult would it be to study category theory and simultaneously come > up with Haskell examples of various results that it presents? There are some aspects of CT that you will not be able to express in Haskell easily (try encoding the forgetful functor, for

Re: [Haskell-cafe] Is there a tool like ri from ruby?

2012-11-25 Thread John Wiegley
> Tikhon Jelvis writes: > Have you tried Hoogle? I know you can install it locally and use it from > GHCi or Emacs. I'm not familiar with ri, but from your description I think a > local Hoogle would serve the same purpose with the added benefit of being > able to search by types. > Here's th

Re: [Haskell-cafe] Category Theory and Haskell

2012-11-25 Thread Alexander Solla
The general idea of category theory is to come up with formalizations of common abstract "patterns" found in mathematical constructs. For example, there are homomorphisms of groups, vector spaces (under linear transformations), topological spaces (under continuous functions), etc. Category theory

Re: [Haskell-cafe] cabal configure && cabal build && cabal install

2012-11-25 Thread Brent Yorgey
On Sun, Nov 25, 2012 at 06:09:26PM -0500, Albert Y. C. Lai wrote: > > If you begin with "cabal configure", the correct idiom is: > > cabal configure [flags] > cabal build > [cabal haddock, if you want] > cabal copy > cabal register Even this does not do the same thing as 'cabal install', because

Re: [Haskell-cafe] Quasiquotation page on HaskellWiki needs updating

2012-11-25 Thread adam vogt
On Sat, Nov 24, 2012 at 1:32 AM, Erik de Castro Lopo wrote: > Hi all, > > It seems the Quasiquotation page on HaskellWiki > > http://www.haskell.org/haskellwiki/Quasiquotation > > has fallen behind the actually Quasiquotation implementation that > is in ghc-7.4.2 and later. > > Specifically, t

[Haskell-cafe] cabal configure && cabal build && cabal install

2012-11-25 Thread Albert Y. C. Lai
Among many programmers, and/or users who manually unpack source tarball before installing, this idiom is very common: cabal configure cabal build cabal install This idiom is an urban legend, i.e., a popular error. "cabal install" re-does the "configure" and the "build" steps, among other thin

[Haskell-cafe] Category Theory and Haskell

2012-11-25 Thread Gytis Žilinskas
Greetings, I'm only taking my very first steps learning Haskell, but I believe that this mailing list might be appropriate for my question. How difficult would it be to study category theory and simultaneously come up with Haskell examples of various results that it presents? I believe some back

[Haskell-cafe] Munich Haskell Meeting

2012-11-25 Thread Heinrich Hördegen
Dear all, next Tuesday, 27. November 2012, will be our Haskell Meeting in Munich at 19h30 at Cafe Puck. Please go to http://www.haskell-munich.de/dates and hit the button, if you intend to join. Have a good start into your week, Heinrich -- -- Funktionale Programmierung Dr. Heinrich Hörde

Re: [Haskell-cafe] Equality test between types that returns type-level Bool ?

2012-11-25 Thread Gábor Lehel
On Sun, Nov 25, 2012 at 9:36 AM, Takayuki Muranushi wrote: > Is it possible to write > > type family SameType a b :: Bool > > which returns True if a and b are the same type, and False otherwise? > > I encountered this problem when I was practicing promoted lists and > tuples in ghc-7.6.1. One of

[Haskell-cafe] GHC 7.4.1 hangs and memory usage shoots ups to 100% when compiling with -O2

2012-11-25 Thread magesh b
I'm facing this problem only when I compiled the code using -O2 Flag. I tried the following, * Compiled with -O1 Flag (7.4.1), It compiled fine * Compiled with ghc-7.0.4 with -O2, it's getting compiled successfully but with the Warning, SpecConstr Function `$wa{v s27vx} [lid]' has one cal

Re: [Haskell-cafe] Problem with benchmarking FFI calls with Criterion

2012-11-25 Thread Janek S.
Well, it seems that this only happens on my machine. I will try to test this code on different computer and see if I can reproduce it. I don't think using existing vector is a good idea - it would make the code impure. Janek Dnia sobota, 24 listopada 2012, Branimir Maksimovic napisał: > I don

[Haskell-cafe] Equality test between types that returns type-level Bool ?

2012-11-25 Thread Takayuki Muranushi
Is it possible to write type family SameType a b :: Bool which returns True if a and b are the same type, and False otherwise? I encountered this problem when I was practicing promoted lists and tuples in ghc-7.6.1. One of my goal for practice is to write more "modular" version of extensible-dim