Stream

Join this community to post or comment

Brendon Williams

Haskell Platform  - 
 
I think GHCi is bugged
I just updated the Haskell Platform, and GHCi is acting weird.
Whenever I tried editing a module by either clicking the pencil button or typing ":e", and I had an error in the module, my editor (Notepad++) brings up a dialog attempting to create  a file named after the line number of my first error (if I had an error or line 20, it would try to create a file called "+20".
Confused, I decided to play around with it for a bit. I created a simple script that prints out whatever arguments it receives, and set it as my editor of choice for GHCi. When I attempted to "edit" a file with it, this is what it printed out:
"["GravityTest.hs","+20"]"
So the line number of the error is being passed as an argument to the editor! I'm fairly certain that this is new.
Suffice to say, the dialog popping up every time I need to edit a source file is becoming extremely annoying. Does anyone know how to fix this? The only thing I could think of was creating an intermediate program that filters out the garbage arguments, then passes the path to Notepad++, but I don't even know if that would work.
Thanks.
1
Brendon Williams's profile photo
 
I ended up writing a small script that filters out the non-paths. Its fragile, but should hopefully cover me.
http://pastebin.com/61SSXKNa
Add a comment...

John Cook

Discussion  - 
 
"stack is a cross-platform program for developing Haskell projects. ... stack has the capability to be your one-stop shop for all Haskell tooling you need."
9
3
Shishir Pandey's profile photoVlatko Bašić's profile photo
Add a comment...

sorin cristea

Help and Advice  - 
 
Hi all,
I have a silly question, I'm sure, I use vim with haskell-mode plugin to develop on haskell but I'm not sure how to enable the keys combination define on the haskellmode -vim, for example:

  |_ct| create |tags| file
  |_si| show info for id under cursor
  |_t| show type for id under cursor
  |_T| insert type declaration for id under cursor |balloon| show type for id under mouse pointer
  |_?| browse Haddock entry for id under cursor
  |_?1| search Hoogle for id under cursor
  |_?2| search Hayoo! for id under cursor

how to type a command on vim that start with '_' (I know there said that this represent cursor and than I suppose that I just have to type 'si' for that field but nothing is happened) on which mode have to type it, I suppose on normal mode. I work on Mac but the same problem I have on linux.

Thanks
Sorin.
1
Trevor Thompson's profile photosorin cristea's profile photo
6 comments
 
yes actually the problem was that i didn't have a 'leader' defined, so I had to defined :let mapleader = "_" and after that at least when I type '_ct' I get the message 'creating tag file'

Thanks Trevor, have a nice day .
Add a comment...

Sean Leather

Announcement  - 
 
 
Haskell for Mac is already in the Mac App Store in Asia, Europe, Australia & NZ (US & CA soon). Check out the launch website.
Haskell for Mac is an easy-to-use integrated programming environment for the functional programming language Haskell. It features interactive Haskell playgrounds to explore and experiment with code. It is ideal to learn functional programming, prototype Haskell code, interactively visualize data ...
16
5
Mark Derricutt's profile photoKain Anderer's profile photo정도현 (Charlie Dohyun Jung)'s profile photoDavid Roberts's profile photo
 
Seems great, can't wait to try it...
Add a comment...
 
Hi there guys, I have a date generation algorithm which I generate all the dates from one point in the past up till infinity. I have everything but I cant seem to make it past the 28th of February 2011 without GHCi hanging. I used the same approach as I did with the other cases and all of a sudden it began to hang and the memory began to build up however up to that point I have used the same technique and don't know what is wrong...? Can anybody help me out here ?
1
Alex Parker's profile photoAdrian “Boom” Nwk's profile photo
34 comments
 
+Alex Parker Thanks it was my first physical programming book and I can say it was by far the best never learnt so much so quickly! Compared to other books it really is the holy grail enjoy! 😊😊
Add a comment...

John Cook

Haskell Platform  - 
 
State of the Haskell ecosystem - August 2015
18
2
Vlatko Bašić's profile photoZaal Lianov's profile photo
Add a comment...

Zsolt Szatmári

Help and Advice  - 
 
Hi!

Given you need a browser-based gui on localhost, which one do you prefer and why: Elm, or Threepenny (or something else?)
Thanks!
2
Anton Ekblad's profile photoIC Rainbow's profile photo
3 comments
 
Sometimes a good old backend framework will do just fine.
Add a comment...

JP Moresmau

Discussion  - 
 
Playing around with recurrent neural networks. I learned more than my networks did!
16
2
Mark Watson's profile photoIvan Čukić's profile photoLevente Varga's profile photoDiego D.M.'s profile photo
2 comments
 
Nice :)

And the comment "I learned more than my networks did!" cracked me up.
Add a comment...

Thomas Løcke

Help and Advice  - 
 
A very nice introduction on how to use Haskell to write client-side browser applications.
17
2
Michael Chavinda's profile photoyogesh sajanikar's profile photo
Add a comment...

Zsolt Szatmári

Help and Advice  - 
 
Hi!

   I am trying something like this:

import Data.Vec.Base
import Data.Vec.Nat

data Geometry d = Geometry { spaceSize :: Vec d Int
                             -- , other fields will go here
}

The idea is that I would like to have 1,2, and 3 dimensional versions of Geometry (like Geometry N1, Geometry N2, ...). I get error:

Expecting one more argument to ‘Vec d Int’
    Expected a type,
      but ‘Vec d Int’ has kind ‘* -> GHC.Prim.Constraint’
    In the type ‘Vec d Int’
    In the definition of data constructor ‘Geometry’
    In the data declaration for ‘Geometry’

Could you help me out?
Thank You!
1
Timmy Tofu's profile photoZsolt Szatmári's profile photo
14 comments
 
+Timmy Tofu That was it! Not necessary to seperate it to mkIt, just specifying explicitly 7::Int does the trick.
Thanks for the gist, it's inspiring :) (Although the link itself gives 404 (you might have improved upon it after posting, so hash might have changed), but I've found it anyway)
Yes, I understand your concern about all these, basically that's what I referred to as 'keep it simple' :)
Thanks again!
 
Add a comment...

Sean Leather

Discussion  - 
 
+Edward Yang: Over this summer, Vishal Agrawal has been working on a GSoC project to move Cabal to more Nix-like package management system. [...] However, these patches change a nontrivial number of moving parts in Cabal and cabal-install, so it would be very helpful to have willing guinea pigs to help us iron out some bugs before we merge it into Cabal HEAD. As your prize, you'll get to run "no-reinstall Cabal": Cabal should never tell you it can't install a package because some reinstalls would be necessary.
Over this summer, Vishal Agrawal has been working on a GSoC project to move Cabal to more Nix-like package management system. More simply, he is working to make it so that you'll never get one of these errors from cabal-install again: Resolving dependencies... In order, the following would be ...
14
1
Lennart Kolmodin's profile photo
Add a comment...
 
I'm curious here, what option looks or feels best? I'm thinking one for readability. 2 for quick hack up. 3 for somewhere in the middle (clean hack)?

Top left *
Bottom left*
Right*
33 votes  -  votes visible to Public
Option 1 (Top right)
30%
Option 2 (Bottom right)
30%
Option 3 (Left)
39%
1
1
Daniel Gee's profile photoAdrian “Boom” Nwk's profile photo
8 comments
Add a comment...

sorin cristea

Help and Advice  - 
 
Hi all,
 I have a problem when I work with cabal sandbox, I created a sandbox  for a 'hello world' application but when I try to run cabal install --only-dependencies I get the following error:

cabal install --only-dependencies
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: haskeline-0.7.2.1/installed-dad... (user goal)
next goal: helloworld (user goal)
rejecting: helloworld-0.1.0.0 (conflict: haskeline =>
base==4.7.0.2/installed-918..., helloworld => base>=4.8 && <4.9)
Dependency tree exhaustively searched.

Note: when using a sandbox, all packages are required to have consistent
dependencies. Try reinstalling/unregistering the offending packages or
recreating the sandbox.

I want to mention the if I try to run on this sandbox cabal repl I get the  errror.

cabal repl
Package has never been configured. Configuring with default flags. If this
fails, please run configure manually.
Resolving dependencies...
Configuring helloworld-0.1.0.0...
cabal: At least the following dependencies are missing:
base ==4.8.*

If I run cabal repl outside of sandbox everything is working ok.

If any of you have an idea pls share with me :),

thanks
sorin
1
sorin cristea's profile photo
3 comments
 
change in *.cabal file, working now, thanks ;)
Add a comment...

dolph das

Discussion  - 
 
An emacs package let u befriend with emacs and ur keyboard, it changes emacs key bindings to more usual one
icon-cog icon-white Features; icon-book icon-white Documentation. Included Key Themes and Keyboard Layouts · Preserving Emacs Commands while maintaining familiar shortcuts · Key Themes · Keyboard Layouts · Changes to Modes · Design Basis · FAQ · Bug report. icon-file icon-white Tips ...
2
Joshua Underwood's profile photo
 
I'd be much more forgiving of the poor grammar, if you'd just spell out "you" and "your"
Although, if you don't like pressing keys, I know a great text editor to help with that : http://www.vim.org
Add a comment...
 
An excerpt from my book project which demonstrates how to use startcodes in Alex to parse comments and strings.
This is an excerpt from my ongoing book project on Alex and Happy — which are Haskell tools for building parsers and lexers. The code examples are available here on GitHub. In this chapter we discuss how to parse two features of programming language grammars: strings and comments. Given the text ...
2
Add a comment...

Devang Vázquez

Help and Advice  - 
 
I started to learn Haskell because i need to make a guide for beginners users in spanish (school stuffs), and my teacher told me that i should read "Programming in Haskell" by Graham Hutton. I couldn't run many examples that the books offer (in hugs), instead i try to solve some them in a very practical way, but now i'm stuck with "Functional Parsers", i can't run them and i can't understand them very well. So, can anyone explain them to me? or give me some nice code in order to understanding, i really need to see them in action.  Thank you
1
Devang Vázquez's profile photoDemetrio Vilela's profile photo
8 comments
 
Devang, mi dirección de correo electrónico es demetriomeister cosito gmail puntito com.
Puedo dedicar un tiempo a explicarte parsers funcionales y /o algún otro tema. (Años de experiencia con mis estudiantes...)
No estoy seguro si el tema específico de parsing es apropiado para principiantes. ¿Conoces el libro Learn You a Haskell for Great Good/ Aprenda Haskell por el Bien de Todos (Miran Lipovaca)?
Es más moderno y beginner-friendly.
Entiendo (y escribo) inglés y castellano.
Suerte.
 ·  Translate
Add a comment...

Ivan Miljenovic

Discussion  - 
 
Dammit, GHC-Head... stop giving me piecemeal redundant constraint warnings!

I push a change to GitHub, Travis builds it with GHC-Head, I get warnings, I fix them, rinse and repeat.

/me gives up and calls it a day.
1
Add a comment...

Thomas Løcke

Discussion  - 
 
In my spare time I'm trying to teach myself Haskell. One of my projects is to port a couple of small Dart servers that are running on Google Compute Engine using the Google Cloud Datastore for storage.

Are any of you guys aware of any Haskell libraries for the Google Cloud Datastore?
3
Add a comment...

Iago Abal

Announcement  - 
 
New release of the (unofficial) #Haskell #bindings to #Z3 SMT solver.

Changelog here: https://bitbucket.org/iago/z3-haskell/src/tip/CHANGES.md
Bindings for the (now open source!) Z3 4.x Theorem Prover (https://github.com/Z3Prover/z3). Z3.Base.C provides the raw foreign imports from Z3's C API. Z3.Base does the marshaling of values between Haskell and C, and transparently handles reference counting of Z3 objects for you.
8
Add a comment...

Ivan Miljenovic

Announcement  - 
 
Please read if you use FGL:

As you may now, for the past few months I've been (finally!) cleaning up FGL, adding tests, etc.

One of the issues that has arisen with this is that the behaviour of the delLEdge function is not well specified when dealing with multiple edges.

Specifically, the documentation states that the purpose is to "Remove an LEdge from the Graph." (emphasis added)... but the behaviour when dealing with multiple edges is to remove all such edges from the graph.

The current version on GitHub is to instead just delete a single such labelled edge, with a new function "delAllLEdge" that replicates the current behaviour.

Before releasing this change, however, I wanted to make sure that I wouldn't break people's code if they rely upon this functionality; I did try and search through GitHub to see who - if anyone - is using this function, but primarily found various copies of fgl embedded into other people's repositories.

As such, please check your code and let me know if this change in behaviour might affect you (if this is the case, I might let delLEdge keep the current behaviour and have a new function delete just one edge).
Synopsis. type Node = Int; type LNode a = (Node, a); type UNode = LNode (); type Edge = (Node, Node); type LEdge b = (Node, Node, b); type UEdge = LEdge (); type Adj b = [(b, Node)]; type Context a b = (Adj b, Node, a, Adj b); type MContext a b = Maybe (Context a b); type Decomp g a b ...
4
1
Neil Mayhew's profile photoIvan Miljenovic's profile photo
3 comments
 
I'd already decided just to change my code to match whatever you did, and having it already on Hackage makes things much easier :-) I've now rebuilt and tested my code with no problems. My app is using fgl to explore Debian package dependencies, and doesn't need to delete edges. I mostly use the higher-level algorithms such as dff, rdff and topsort. I haven't gotten around to putting my code on github yet, but I will do it soon.
Add a comment...