Skip to content

Instantly share code, notes, and snippets.

View chessai's full-sized avatar

chessai chessai

View GitHub Profile
This file has been truncated, but you can view the full file.
/nix/store/ks30q9pvvwwz9qnfv1jny85fgh6kmhxl-interface-0.2.drv
+---/nix/store/9krlzvny65gdc8s7kpb6lkx8cd02c25b-default-builder.sh
+---/nix/store/2ff99ggdn452nrz8fylk2r80783ap2px-gnugrep-3.1.drv
| +---/nix/store/136pix4jkygp9vz7h33gqlaghsydwvhy-grep-3.1.tar.xz.drv
| +---/nix/store/9krlzvny65gdc8s7kpb6lkx8cd02c25b-default-builder.sh [...]
| +---/nix/store/w3xksy5k5rywl4z27v7gi8yafb7ci2sw-bootstrap-tools.drv
| | +---/nix/store/b7irlwi2wjlx5aj1dghx4c8k3ax6m56q-busybox.drv
| | +---/nix/store/drsdq2ca1q1dj1hd0r1w2hl4s0fak1vh-bootstrap-tools.tar.xz.drv
| | +---/nix/store/pvn8nrg8aziwsc7yy8wkgxf4s9amnl3d-unpack-bootstrap-tools.sh
| +---/nix/store/w4s5n5za125y8hyqyqzi57v6hajvrwp2-bootstrap-stage4-stdenv-linux.drv
uses String instead of Text
lawless AND useless typeclasses
uses things like [(String,String)] instead of Map Text Text
has hand-written typeclass instances that are strictly worse than their derived versions
no explicit import lists
no explicit export lists
Some places should use Set instead of List (e.g. Subscription)
diff --git a/compiler/typecheck/TcRnExports.hs b/compiler/typecheck/TcRnExports.hs
index dbe2b4b22b..1b57608a41 100644
--- a/compiler/typecheck/TcRnExports.hs
+++ b/compiler/typecheck/TcRnExports.hs
@@ -33,7 +33,7 @@ import DataCon
import PatSyn
import Maybes
import Util (capitalise)
-
+import FastString (fsLit)
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE TypeInType #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE QuantifiedConstraints #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE ScopedTypeVariables #-}
{ frontend ? false # Whether or not to enable the frontend
, compiler ? if frontend then "ghcjs84" else "ghc843" # compiler we are using
, closure ? false # Whether or not to use the closure compiler
, prepack ? false # Whether or not to use prepack
, gzipJS ? false # Whether or not to compress the JS
, gzipCSS ? false # Whether or not to compress the CSS
}:
with rec {
fetchNixpkgs = import ./fetchNixpkgs.nix;
{ frontend ? false # Whether or not to enable the frontend
, compiler ? if frontend then "ghcjs84" else "ghc843" # compiler we are using
, closure ? false # Whether or not to use the closure compiler
, prepack ? false # Whether or not to use prepack
, gzipJS ? false # Whether or not to compress the JS
, gzipCSS ? false # Whether or not to compress the CSS
}:
with rec {
fetchNixpkgs = import ./fetchNixpkgs.nix;
-- Copyright (c) 2014, Ryan Trinkle
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
--
-- * Redistributions of source code must retain the above copyright notice, this
-- list of conditions and the following disclaimer.
--
-- * Redistributions in binary form must reproduce the above copyright notice,
-- Copyright (c) 2014, Ryan Trinkle
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
--
-- * Redistributions of source code must retain the above copyright notice, this
-- list of conditions and the following disclaimer.
--
-- * Redistributions in binary form must reproduce the above copyright notice,
#include <iostream>
#include <stdlib.h>
#include <fstream>
#include <string>
#include <stdio.h>
#include <cstring>
int main ()
{
std::ifstream in("infile.txt");
{ rev # The Git revision of nixpkgs to fetch
, sha256 # The SHA256 hash of the unpacked archive
}:
builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/${rev}.tar.gz";
inherit sha256;
}