Skip to content

Instantly share code, notes, and snippets.

View piq9117's full-sized avatar
💀
Nothing good is happening here

piq9117 piq9117

💀
Nothing good is happening here
View GitHub Profile
{
description = "Basic haskell cabal template";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/23.11";
};
outputs = { self, nixpkgs }:
let
forAllSystems = nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed;
import React, { useState, useReducer } from "react";
import "./App.css";
type ActionType =
| { type: "ADD"; text: string }
| { type: "REMOVE"; id: number };
abstract class Functor<A> {
public abstract map<B>(fn: (a: A) => B): Functor<B>;
}
module Main where
import Prelude
import Effect (Effect)
import Effect.Console (log)
import Web.HTML as Web
import Web.HTML.Window as Window
import Web.HTML.HTMLDocument as HTMLDocument
import Web.DOM.ParentNode
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE OverloadedRecordDot #-}
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Text.Blaze ((!))
import Text.Blaze.Html.Renderer.Text qualified as Html
import Text.Blaze.Html5 qualified as Html
import Text.Blaze.Html5.Attributes qualified as Html
rocksdb-8.3.2/util/string_util.cc: In function ‘std::string rocksdb::NumberToHumanString(int64_t)’:
rocksdb-8.3.2/util/string_util.cc:121:32: error:
error: ‘%li’ directive output may be truncated writing between 1 and 20 bytes into a region of size 19 [-Werror=format-truncation=]
121 | snprintf(buf, sizeof(buf), "%" PRIi64, num);
| ^
|
121 | snprintf(buf, sizeof(buf), "%" PRIi64, num);
| ^
{
description = "Basic haskell cabal template";
inputs.nixpkgs.url = "nixpkgs/nixos-22.11";
outputs = { self, nixpkgs }:
let
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: f system);
@piq9117
piq9117 / example.nix
Created January 1, 2023 07:17 — forked from cdepillabout/example.nix
Example of overriding a GHC core Haskell package with Nix
# This file is an example of overriding a GHC core Haskell library (like
# bytestring, containers, text, unix, etc) when building a Haskell package.
let default-nixpkgs =
builtins.fetchTarball {
# nixpkgs haskell-updates branch as of 2019/09/15.
url = "https://github.com/NixOS/nixpkgs/archive/a51b3367ab6acc72630da0bad50ce14fa86996d0.tar.gz";
sha256 = "05d3jxxk5dxzs9b3nan16lhkrjnzf0bjd4xy66az86fsafnrr9rd";
};
in
self: super: rec {
overriddenHaskellPackages = super.haskellPackages.override rec {
overrides = haskellSelf: haskellSuper: rec {
launchdarkly-server-sdk = self.haskell.lib.unmarkBroken
(haskellSelf.callHackage "launchdarkly-server-sdk" "3.0.3" { });
http-client = haskellSelf.callCabal2nix "http-client" (builtins.fetchGit {
url = "https://github.com/snoyberg/http-client.git";
rev = "4c5c786bd437fd49092e5937c8685b5300913fa8";
libva info: VA-API version 1.8.0
libva info: Trying to open /run/opengl-driver/lib/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_8
libva error: /run/opengl-driver/lib/dri/iHD_drv_video.so init failed
libva info: va_openDriver() returns 1
libva info: Trying to open /run/opengl-driver/lib/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_8
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.8 (libva 2.8.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Haswell Mobile - 2.4.1
{-# LANGUAGE ScopedTypeVariables #-}
module Main where
import Control.Applicative (Alternative, empty, (<|>), liftA2)
import Control.Monad
import Data.Char
main :: IO ()
main =
print $ runParser ( sepBy ( many expressionParser ) endOfLine ) rawInput