purescript Questions
0
At this point in my learning journey, I simply accepted that this function is called pure (both in Haskell and in PureScript), but it would have helped a lot if I had known the reasoning behind thi...
Photocomposition asked 1/6, 2024 at 12:6
2
In real world application I noticed a pattern that could be generalized to something like:
purescript:
class Profunctor p <= Zero p where
pzero :: forall a b. p a b -- such that `forall f g. di...
Jetport asked 5/3, 2024 at 16:34
3
Solved
Issue
Following is a minimal, contrived example:
read :: FilePath -> Aff String
read f = do
log ("File: " <> f) -- (1)
readTextFile UTF8 f -- (2)
I would like to do some debug...
Javier asked 29/12, 2020 at 12:41
2
Solved
I'm using purescript-halogen to build a spreadsheet-like table (similar to Handsontable). If you double-click a cell, an html input element is rendered as a child of the respective table cell (and ...
Shawndashawnee asked 27/8, 2015 at 12:7
2
Solved
I saw this question:
Force show a record in PureScript
where I found out I can use purescript-debug to print it, e.g. by using:
> traceAny {a:1} id
{ a: 1 }
unit
I was wondering however w...
Blowpipe asked 16/2, 2017 at 19:30
3
Solved
I'm reading PureScript by Example and got to the part introducing the Reader monad. The example goes like this:
createUser :: Reader Permissions (Maybe User)
createUser = do
permissions <- ask...
Drugstore asked 13/10, 2017 at 21:20
2
Solved
I'm looking for an idiomatic way to write a function List Char -> String in Purescript.
This seems like a simple thing to do, but I'm new to Purescript and have been browsing documentation for ...
Primordium asked 2/1, 2016 at 10:49
2
Solved
Problem: I have different record types with many common fields. How could I "include" the common fields in the record type definitions?
Example:
newtype RecordType1 = RecordType1 { a :: Int, b ::...
Roadhouse asked 23/8, 2018 at 13:25
2
Solved
I am very new to Purescript so this might be a naive question.
I want to write a Purescript function that reads input from HTML input elements on the browser and writes some output to another HTM...
Abundant asked 25/5, 2020 at 11:29
1
Solved
everyone!
I'm a Purescript beginner and have trouble with working on records.
I have one record type:
type Employee =
{ firstName :: String
, lastName :: String
, address :: String
, height ...
Kimberykimble asked 30/12, 2019 at 14:45
2
Solved
I've been trying to develop a component system in Purescript, using a Component typeclass which specifies an eval function. The eval function for can be recursively called by a component for each s...
Paulie asked 19/7, 2018 at 12:14
2
Solved
I am attempting to learn purescript.
I have a button in some HTML that I am trying to print the class name of. I am building and browserifying using pulp.
The function I am using is querySelect...
Sisco asked 10/8, 2018 at 7:22
2
While testing, I’d like to read and write a file from and to disk (JSON in, JSON out). How do I do this in PureScript? In Haskell I have something like
main :: IO ()
main = do
input <- readFil...
Yentai asked 29/2, 2016 at 16:58
0
In their paper on profunctor optics, Pickering et al. state that
The term ‘profunctor’ comes from category theory, although much of the categorical structure gets lost in translation.
That see...
Burrus asked 28/4, 2018 at 9:35
1
Solved
There are several UI libraries for the PureScript, such as purescript-thermite, purescript-halogen, purescript-react-simple and other. Which library is right for the production?
Pickard asked 13/3, 2018 at 6:7
4
Solved
Assume I have User records in my PureScript code with the following type:
{ id :: Number
, username :: String
, email :: Maybe String
, isActive :: Boolean
}
A CommonJS module is derived from th...
Tarim asked 11/1, 2015 at 8:24
1
Solved
In Haskell I can write a multi-line statement on a single line, like
do {x<-[1,2];y<-[3,4];return (x,y)}
but in Purescript even a single-statement do-statement with curly braces will not c...
Cerated asked 28/9, 2017 at 4:57
1
Solved
Tried to use (.) for function composition, but it doesn't work.
import Data.String (length, trim)
trimmedLength :: String -> Int
trimmedLength = length . trim
Courthouse asked 16/9, 2017 at 11:2
1
Solved
I am trying to setup hello world project with purescript on NixOs and have couple questions,
Official purescript website recommend installation via npm but there is no nixos.nodePackages.purescri...
Illnatured asked 7/9, 2017 at 10:38
1
Solved
What does the period / dot mean?
forall a. Num a => a -> a -> a
Is it merely a separator?
Jason asked 9/9, 2017 at 23:30
1
Solved
In PureScript, how does List differ from Array?
What are the reasons to use one over the other?
Melgar asked 27/6, 2017 at 21:15
2
PureScript looks very similar to Haskell. It seems to me that large parts, mostly the pure parts, of a PureScript program should be compilable as well by a Haskell compiler. Is that right?
This le...
Albemarle asked 30/10, 2014 at 20:47
3
Solved
I am trying to build my react-native project and using react-native-fbsdk.
I am using [email protected] and, [email protected].
When I build my project I got this error on execution scr...
Thrawn asked 29/5, 2017 at 5:51
2
Solved
Given I have the folowing records in purescript:
let name = {name: "Jim"}
let age = {age: 37}
is it possible to combine those two records some how in a generic way?
Something like:
name 'comb' ...
Motorboating asked 14/3, 2016 at 10:59
1
Solved
This seems to me a weird question, but I have gone through the purescript-datetime and purescript-js-date and I just cannot find a way to get current DateTime. Is there some hidden library function...
Behindhand asked 10/4, 2017 at 14:0
1 Next >
© 2022 - 2025 — McMap. All rights reserved.