Skip to content

Instantly share code, notes, and snippets.

error[E0277]: the trait bound `implicit_clone::unsync::IMap<_, _>: From<indexmap::IndexMap<K, V>>` is not satisfied
--> /Users/dr/.cargo/registry/src/index.crates.io-6f17d22bba15001f/yew-0.21.0/src/html/conversion/into_prop_value.rs:216:9
|
216 | IMap::from(self)
| ^^^^ the trait `From<indexmap::IndexMap<K, V>>` is not implemented for `implicit_clone::unsync::IMap<_, _>`
|
= help: the following other types implement trait `From<T>`:
<implicit_clone::unsync::IMap<K, V> as From<indexmap::map::IndexMap<K, V>>>
<implicit_clone::unsync::IMap<K, V> as From<std::rc::Rc<indexmap::map::IndexMap<K, V>>>>
<implicit_clone::unsync::IMap<K, V> as From<&'static [(K, V)]>>
Configuring ghc-pkg-6.9...
Configuring ghc-8.11.0.20200619...
"/usr/local/bin/ghc-pkg" update -v0 --force --package-db=libraries/bootstrapping.conf compiler/stage1/inplace-pkg-config
"inplace/bin/ghc-cabal" configure ghc stage1 --with-ghc="/usr/local/bin/ghc" --with-ghc-pkg="/usr/local/bin/ghc-pkg" --flags=stage1 --package-db=/Users/dr/workspace/ghc/libraries/bootstrapping.conf --disable-library-for-ghci --disable-library-vanilla --disable-library-profiling --disable-shared --configure-option=CFLAGS="-Wall -Wno-unknown-pragmas -iquote /Users/dr/workspace/ghc/ghc" --configure-option=LDFLAGS=" " --configure-option=CPPFLAGS=" " --gcc-options="-Wall -Wno-unknown-pragmas -iquote /Users/dr/workspace/ghc/ghc " --configure-option=--with-gmp --constraint "binary == 0.8.7.0" --constraint "transformers == 0.5.6.2" --constraint "mtl == 2.2.2" --constraint "hpc == 0.6.1.0" --constraint "ghc-boot-th == 8.11.0.20200619" --constraint "ghc-boot == 8.11.0.20200619" --constraint "template-haskell ==
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TypeApplications #-}
module ALaCarte where
#!/usr/bin/env bash
# Installs NixOS on a Hetzner server, wiping the server.
#
# This is for a specific server configuration; adjust where needed.
#
# Prerequisites:
# * Update the script to adjust SSH pubkeys, hostname, NixOS version etc.
#
# Usage:
fun echo r =
if blobSize (fileData r.File) > 100000 then
return <xml>Whoa! That one's too big.</xml>
else
returnBlob (fileData r.File) (blessMime (fileMimeType r.File))
fun main () = return <xml><body>
<h1>The Amazing File Echoer!</h1>
<form>Upload a file: <upload{#File}/> <submit action={echo}/></form>
3601:-- RHS size: {terms: 4, types: 702, coercions: 29,601}
3675:-- RHS size: {terms: 4, types: 682, coercions: 28,007}
3746:-- RHS size: {terms: 4, types: 662, coercions: 26,457}
3814:-- RHS size: {terms: 4, types: 642, coercions: 24,951}
3882:-- RHS size: {terms: 4, types: 622, coercions: 23,489}
3950:-- RHS size: {terms: 4, types: 602, coercions: 22,071}
4015:-- RHS size: {terms: 4, types: 582, coercions: 20,697}
4077:-- RHS size: {terms: 4, types: 562, coercions: 19,367}
4145:-- RHS size: {terms: 4, types: 522, coercions: 16,839}
4207:-- RHS size: {terms: 4, types: 502, coercions: 15,641}
type I = Data.Vinyl.Functor.Identity
 (Identity (3 :: Int) :& Identity "foo" :& RNil) ^. rlens (Proxy @Int)
<interactive>:100:2: error:
Ambiguous occurrence ‘Identity’
It could refer to either ‘Control.Lens.Identity’,
imported from ‘Control.Lens’
(and originally defined in ‘Data.Functor.Identity’)
or ‘Data.Vinyl.Functor.Identity’,
imported from ‘Data.Vinyl.Functor’
printf :: ((String -> IO ()) -> a) -> a
printf format = format putStrLn
c :: String -> (String -> a) -> a
c s k = k s
d :: (String -> a) -> Int -> a
d k n = k $ show n
warning: dumping very large path (> 256 MiB); this may run out of memory
these derivations will be built:
/nix/store/0x9vzzw07lpzpnn8r9xjgfv7bgqrgcin-quickcheck-instances-0.3.12.drv
/nix/store/c9rg3s4qck6756dvr8g14cgww7y0wib3-case-insensitive-1.2.0.7.drv
/nix/store/xqb33xay4n3d9kvnr90qa3kcqlph742g-blaze-builder-0.4.0.2.drv
/nix/store/7fm276fd0qfcqhxfbr21ifj9k2wf6dsc-http-types-0.9.1.drv
/nix/store/7scyc48xdnmz9z7yds9y1kdyrw1iz1n6-aeson-0.9.0.1.drv
/nix/store/01l9j7fdg8x42jz9jkmriysjza3zbxns-hjsonpointer-0.3.0.2.drv
/nix/store/02a21zaclvqwskjij4flwi79bbrmr2m4-inflections-0.2.0.1.drv
/nix/store/ddn9x6yprf8cy0sn67hp6drz22csqrhl-mwc-random-0.13.4.0.drv
{ nixpkgs ? (import <nixpkgs> {}), haskellPackages ? nixpkgs.haskell.packages.lts-5_14 }:
let
common = import ../common/common.nix { inherit haskellPackages; };
...
servant07 = nixpkgs.haskell.packages.ghc7103.servant_0_7;
servant-server07 = nixpkgs.haskell.packages.ghc7103.servant-server_0_7;
customizedPackages = haskellPackages.override {
overrides = self: super: {
servant = nixpkgs.haskell.packages.ghc7103.servant_0_7