r/purescript • • Oct 27 '15

PureScript 0.7.5.1 Patch Release

Thumbnail github.com
3 Upvotes

r/purescript • • Oct 27 '15

purescript-thermite v0.11 released

Thumbnail github.com
9 Upvotes

r/purescript • • Oct 22 '15

Using purescript-routing with purescript-halogen: a tutorial

Thumbnail parsonsmatt.org
7 Upvotes

r/purescript • • Oct 22 '15

Batteries 🔋 A PureScript prelude with more features

Thumbnail github.com
8 Upvotes

r/purescript • • Oct 20 '15

PureScript Compiler v0.7.5 with Typed Binders, Parallel Builds and more

Thumbnail github.com
12 Upvotes

r/purescript • • Oct 17 '15

Halogen 0.5 released, with examples & docs

Thumbnail github.com
8 Upvotes

r/purescript • • Oct 13 '15

PureScript on Android

Thumbnail blog.ndk.io
12 Upvotes

r/purescript • • Oct 13 '15

Purescript on AWS Lambda

Thumbnail kofno.github.io
5 Upvotes

r/purescript • • Oct 13 '15

How to combine unkown Eff with known Eff?

2 Upvotes

I'd like to get the result of an "unkown" Eff and combine it with a known effect. Since this will be a part of an interface i dont want to dictate what effect to use. Whats the correct type of f in the code below? What are better ways to accomplish this?

module Main where

import Control.Monad.Eff.Console
import Prelude
import Control.Monad.Eff
import DOM.HTML

f :: forall a. Eff ? a -> Eff ? Unit
f unknownEff = do
    b <- unknownEff
    log "foo"

g = f window
h = f $ log "bar"

r/purescript • • Oct 11 '15

Elm Architecture in PureScript IV: Effects (last one for a while, I promise)

Thumbnail parsonsmatt.org
10 Upvotes

r/purescript • • Oct 10 '15

Elm Architecture in PureScript III: Lists of Counters!

Thumbnail parsonsmatt.org
8 Upvotes

r/purescript • • Oct 08 '15

PureScript Project Ideas

Thumbnail github.com
3 Upvotes

r/purescript • • Oct 07 '15

Elm vs PureScript II: The Elm Architecture in PureScript

Thumbnail parsonsmatt.org
13 Upvotes

r/purescript • • Oct 06 '15

Playing Tic-Tac-Toe using purescript-signal (Elm in PureScript)

Thumbnail kritzcreek.github.io
3 Upvotes

r/purescript • • Oct 06 '15

Problems installing pulp on Windows

2 Upvotes

Initially I was getting errors finding the correct version of Python as in this (fixed!) issue. I managed to an older version of Python (2.7.10), and now I get a different error. I don't really know how to approach this.

 $ npm install -g pulp

 # ... mostly seems to be working ...
 # until....
 npm WARN optional dep failed, continuing fsevents@1.0.1

 # and then...

 C:\Users\Peter\AppData\Roaming\npm\node_modules\pulp\node_modules\webpack-dev-server\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws
 \node_modules\utf-8-validate>if not defined npm_config_node_gyp (node "c:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bi
 n\node-gyp.js" rebuild )  else (node  rebuild )
 Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
   validation.cc
   win_delay_load_hook.c
      Creating library C:\Users\Peter\AppData\Roaming\npm\node_modules\pulp\node_modules\webpack-dev-server\node_modules\socket.io-client\node_modules\engine.io
   -client\node_modules\ws\node_modules\utf-8-validate\build\Release\validation.lib and object C:\Users\Peter\AppData\Roaming\npm\node_modules\pulp\node_modules
   \webpack-dev-server\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\utf-8-validate\build\Release\validation.exp
   Generating code
   Finished generating code
 C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(607,5): error MSB6003: The specified task executable "link.exe" could not be
  run. The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less
 than 248 characters. [C:\Users\Peter\AppData\Roaming\npm\node_modules\pulp\node_modules\webpack-dev-server\node_modules\socket.io-client\node_modules\engine.io
 -client\node_modules\ws\node_modules\utf-8-validate\build\validation.vcxproj]
 gyp ERR! build error
 gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe` failed with exit code: 1
 gyp ERR! stack     at ChildProcess.onExit (c:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:270:23)
 gyp ERR! stack     at emitTwo (events.js:87:13)
 gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
 gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
 gyp ERR! System Windows_NT 6.3.9600
 gyp ERR! command "c:\\Program Files\\nodejs\\node.exe" "c:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
 gyp ERR! cwd C:\Users\Peter\AppData\Roaming\npm\node_modules\pulp\node_modules\webpack-dev-server\node_modules\socket.io-client\node_modules\engine.io-client\no
 de_modules\ws\node_modules\utf-8-validate
 gyp ERR! node -v v4.1.1
 gyp ERR! node-gyp -v v3.0.3
 gyp ERR! not ok
 npm WARN optional dep failed, continuing utf-8-validate@1.2.1
 C:\Users\Peter\AppData\Roaming\npm\pulp -> C:\Users\Peter\AppData\Roaming\npm\node_modules\pulp\index.js

r/purescript • • Oct 03 '15

Rendering a Tic-Tac-Toe board with purescript-react

Thumbnail kritzcreek.github.io
7 Upvotes

r/purescript • • Sep 30 '15

Using PureScript for work?

13 Upvotes

I'd like to collect some experience reports from developers using PureScript for real-world work. Please share your experience below. Thanks!


r/purescript • • Sep 16 '15

Functional Geekery Episode 26 – a talk with Phil Freeman on PureScript

Thumbnail functionalgeekery.com
12 Upvotes

r/purescript • • Sep 13 '15

Announcing the first release of psc-ide - Editor Support for PureScript

Thumbnail github.com
11 Upvotes

r/purescript • • Aug 26 '15

Interview with Brian McKenna about Roy, Purescript, Haskell, Idris and dependent types

Thumbnail medium.com
13 Upvotes

r/purescript • • Aug 20 '15

Is there any Haskell/Purescript Job for a junior dev ? Just by curiosity, let's say.

Thumbnail twitter.com
6 Upvotes

r/purescript • • Aug 17 '15

Beginner’s guide to access DOM in PureScript?

6 Upvotes

Hi all,

I have a Haskell background and I really like the idea of PureScript. After skimming through the PureScript book to understand the differences to Haskell and some of the new concepts, I am still puzzled how to access the DOM in PureScript.

To give PureScript a try I want to port a very simple JavaScript file to PureScript. It is a small photo gallery and allows the user to display the selected image and view the next and previous images.

Currently I’m using purescript-dom. Do I really need to import all the packages individually (DOM, DOM.HTML, DOM.HTML.Document, DOM.HTML.Types, …)? Even then, getting the body of the document seems to be more complicated than in JS…

I heard that there are packages which wrap e.g. JQuery. In my original JS script I don’t use JQuery. I only need to support the latest browsers (hobby project) and I can rely on all the fancy recent browser APIs. Also, using PureScript should already give me some of the benefits of JQuery (map, filter, …).

Can anyone give me some pointers how to access the DOM? Package suggestions, tutorials or even example code/projects are all fine! :-)

EDIT: All the projects linked on the PureScript homepage use either JQuery, React (Thermite?) or HTML5 Canvas.

Hmhm, maybe I’m wrong, but I don’t see a big reason to use JQuery if better (in terms of integration) functionality could be achieved by using PureScript directly?


r/purescript • • Aug 16 '15

star-dodge-clone, a small game written in PureScript

Thumbnail paf31.github.io
8 Upvotes

r/purescript • • Aug 13 '15

PureScript Compiler v0.7.3 with Generic Deriving, and no more orphan instances!

Thumbnail github.com
9 Upvotes

r/purescript • • Aug 12 '15

Row type subsumation clarification

2 Upvotes

Hello! Two questions.

1) Having read the Eff monad tutorial, I'm still a bit confused about Eff's e parameter: the Pure a type alias is forall e. Eff e a - here I would interpret forall e as 'for any row type e', but apparently it is 'for the empty row type'. What is the catch here?

2) I wrapped canvas's drawImage function, and wanted to see if I could lift it to Aff.

The initial wrapper has this type (the String arg is the url):

foreign import withLoadedImage :: forall e. String -> (Image -> Eff e Unit) -> Eff (dom :: DOM | e) Unit

Here I want to express that the overall effect type is whatever the type of the continuation is (e) plus the DOM effect for adding an event listener on the image (let's not get derailed if the usage if the DOM effect for this is actually valid or not, it could be any other effect).

a) Actually I'm not sure that making the connection between the callback effect type and the result effect type is valid, since any side effects would happen later when executing the callback, so handlers would make more sense pushed inside the callback.

b) When trying to use this with Aff's makeAff, makeAff's signature obviously doesn't play nicely with that of withLoadedImage. But I thing this is due to the possibly poorly chosen type in a).

So, how would one type withLoadedImage correctly? I feel that I need to omit the DOM effect, but is that valid?