After creating the first table in the schema editor, I see Default-related errors:
~/src$ ihp-new paste2
Updating build/Generated/Types.hs
Application created in Web
🚀 Project created, happy coding :)
You can start the server by running:
cd paste2
./start
~/src$ cd paste2
~/src/paste2$ ./start
direnv: loading ~/src/paste2/.envrc
direnv: export ~PATH
The files belonging to this database system will be owned by user "simon".
This user must also own the server process.
The database cluster will be initialized with locale "C".
The default text search configuration will be set to "english".
Data page checksums are disabled.
creating directory build/db/state ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default timezone ... America/Los_Angeles
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok
WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
Success. You can now start the database server using:
pg_ctl -D build/db/state -l logfile start
Loaded package environment from /Users/simon/.ghc/x86_64-darwin-8.8.3/environments/default
GHCi, version 8.8.3: https://www.haskell.org/ghc/ :? for help
Warning: -debug, -threaded and -ticky are ignored by GHCi
Pager usage is off.
CREATE EXTENSION
Pager usage is off.
package flags have changed, resetting and loading new packages...
package flags have changed, resetting and loading new packages...
package flags have changed, resetting and loading new packages...
package flags have changed, resetting and loading new packages...
package flags have changed, resetting and loading new packages...
package flags have changed, resetting and loading new packages...
package flags have changed, resetting and loading new packages...
Loaded GHCi configuration from /Users/simon/src/paste2/.ghci
Loaded GHCi configuration from /Users/simon/.ghci
Prelude> package flags have changed, resetting and loading new packages...
package flags have changed, resetting and loading new packages...
package flags have changed, resetting and loading new packages...
package flags have changed, resetting and loading new packages...
package flags have changed, resetting and loading new packages...
package flags have changed, resetting and loading new packages...
package flags have changed, resetting and loading new packages...
Prelude> Prelude ClassyPrelude> [1 of 6] Compiling Application.Helper.Controller ( Application/Helper/Controller.hs, interpreted )
[2 of 6] Compiling Config ( Config/Config.hs, interpreted )
[3 of 6] Compiling Generated.Types ( build/Generated/Types.hs, interpreted )
[4 of 6] Compiling Web.Types ( Web/Types.hs, interpreted )
[5 of 6] Compiling Web.FrontController ( Web/FrontController.hs, interpreted )
[6 of 6] Compiling Main ( Main.hs, interpreted )
Ok, six modules loaded.
*Main Prelude ClassyPrelude> *Main Prelude ClassyPrelude> Server started
./start
Updating build/Generated/Types.hs
*Main Prelude ClassyPrelude> [3 of 6] Compiling Generated.Types ( build/Generated/Types.hs, interpreted )
build/Generated/Types.hs:31:83: error:
• No instance for (Default MetaBag) arising from a use of ‘def’
• In the first argument of ‘pure’, namely ‘def’
In the second argument of ‘(<*>)’, namely ‘pure def’
In a stmt of a 'do' block: Paste <$> pure id <*> pure def
|
Failed, two modules loaded.
31 | instance FromRow Paste where fromRow = do id <- field; Paste <$> pure id <*> pure def;
| ^^^
build/Generated/Types.hs:53:23: error:
• No instance for (Default (Id' "pastes"))
arising from a use of ‘def’
• In the first argument of ‘Paste’, namely ‘def’
In the expression: Paste def def
In an equation for ‘newRecord’: newRecord = Paste def def
|
53 | newRecord = Paste def def
| ^^^
build/Generated/Types.hs:53:28: error:
• No instance for (Default MetaBag) arising from a use of ‘def’
• In the second argument of ‘Paste’, namely ‘def’
In the expression: Paste def def
In an equation for ‘newRecord’: newRecord = Paste def def
|
53 | newRecord = Paste def def
| ^^^