Questions tagged [ihp]

Questions related to the Haskell web framework IHP (integrated Haskell Platform). https://ihp.digitallyinduced.com/

81 questions
1
vote
1 answer

OverloadedLabels in IHP

Context The IHP Guide has a section that describes their use of hash symbols: https://ihp.digitallyinduced.com/Guide/helpful-tips.html It mentions the following: Writing #companyId is equivalent to writing fromLabel @"companyId". Experiment In the…
dharmatech
  • 8,979
  • 8
  • 42
  • 88
1
vote
1 answer

how to intall IHP on windows using ubuntu 20.04

I tried to install IHP on windows using the doc : https://ihp.digitallyinduced.com/Guide/installation.html I installed : WSL Ubuntu 20.04 Made : sudo update and sudo upgrade then sudo apt install git curl make xdg-utils -y Created : sudo mkdir -p…
Mlier
  • 111
  • 1
  • 4
1
vote
1 answer

SHA-256 hash mismatch error installing nix for IHP

I am trying to install IHP on Mac according to https://ihp.digitallyinduced.com/Guide/installation.html When running installation command for nix: sh <(curl https://abathur-nix-install-tests.cachix.org/serve/yihf8zbs0jwph2rs9qfh80dnilijxdi2/install)…
DmitriyV
  • 21
  • 3
1
vote
1 answer

Data constructor not in scope: Unrecognised pragma

After going through the website first project, I wanted to add some static pages, I checked the following IHP - Recipes for static pages . That's how I proceded: In web/Types.hs I added the following: data StaticController = WelcomeAction …
0
votes
1 answer

How do I add instances to the Web/Types section?

Currently, I am making program to help book appointments. Part of that includes making timeslots. In my program I have created the following instance for a selectField option in a form instance CanSelect User where type SelectValue User = Id…
adon
  • 1
  • 2
0
votes
1 answer

IHP Haskell Framework: can postgres columns of type int8range be used?

Is it possible to use columns of type int8range? The code editor cannot parse "int8range". Can a preexisisting postgres schema be used with IHP? I need those for a bitemporal model.
0
votes
1 answer

How to qualify name of a field when using generated types

How do you qualify the name of a field within a function like this: let sortedIssues :: [Issue] = sortOn updatedAt issues I have an issues table with an updated_at column. However, I also have another table with an updated_at column so the compiler…
0
votes
0 answers

IHP: How to fetch IS NULL rows from database?

How to fetch first from all IS NULL rows from database? Ex: Task-UserID 1-9 2-5 3-NULL 4-NULL I would like to request database to fetch: 3 NULL <- and assign a user to the task 3 With this: |> filterWhereSql (#UserID, "IS NULL") It is now working…
0
votes
0 answers

IHP: How can I save multi-select html element values in database?

Let's say, I have a custom form in frontView, with "txtroles" multi-select HTML element. I submit it to my "UpdateProjectUsersAction" and would like to save it to my "project_user_roles" which have project_id (foreign id), role_name (text), userid…
0
votes
1 answer

IHP: Can I still use formFor if I want to include a field that's not a column of the record?

Say I've got some NewView for a record Order which is table order in the database with columns qt and item, but when users submit to create a order row I'd like to also send along some extra data to CreateOrderAction which will be stored elsewhere…
unhammer
  • 4,306
  • 2
  • 39
  • 52
0
votes
1 answer

Can IHP be used for an app backend with JWT authentication?

Has anyone used IHP for an app backend and if so, what changes need to be made for that to be doable? Is there a jwt package or something like it that allows IHP to have JWT authentication? Does Digitally Induced support using IHP as an app backend?
Tyler Jones
  • 1,283
  • 4
  • 18
  • 38
0
votes
2 answers

Prevent IHP RunDevServer from automatically opening a window or tab

Is there a way to start the server without it automatically opening a tab? Something similar to webpack serve --no-open
technoY2K
  • 2,442
  • 1
  • 24
  • 38
0
votes
1 answer

Is there a specific pattern for tracking Header Referrer Data in IHP apps?

Anyone have a recommendation/pattern for tracking HTTP: Referrer header data in an IHP app? I was thinking it might be best to add it to the beforeAction in the Static Controller for the app landing page but it could just as well go in the…
Montmorency
  • 412
  • 3
  • 11
0
votes
1 answer

Does IHP support a Ubuntu Server for ARM?

Does IHP support a Ubuntu Server for ARM? https://ubuntu.com/download/server/arm Major Operating Systems Supported: Windows (via Linux Subsystem), macOS, NixOS, Debian, Ubuntu https://ihp.digitallyinduced.com/release.html For Apple M1, there is an…
moodtwo
  • 11
  • 2
0
votes
1 answer

How would I test IHP my CanRoute instance (parse route for beautiful URLs)?

If you want beautiful URLs in an IHP app you need to write your own CanRoute instance and parse the route string. -- Web.Routes.hs module Web.Routes where import Generated.Types import IHP.RouterPrelude import Web.Types instance CanRoute…