Skip to content

Instantly share code, notes, and snippets.

module WronglyTypedContractId where
template T1
with
p : Party
where
signatory p
template T2
with
module FoldOverParties where
import DA.Action
template ContractB
with
p : Party
data1 : Text
data2 : Text
where
{-# LANGUAGE MagicHash, UnboxedTuples #-}
module Main(main) where
import GHC.Exts ( addrToAny# )
import GHC.Ptr ( Ptr(..) )
import System.Info ( os, arch )
import Encoding
import ObjLink
main :: IO ()
;;; core-modeline.el
;; This file tries to be an almost self-contained configuration of my mode-line.
;;
;; It depends on the following external packages:
;; + REQUIRED
;; + powerline
;; + evil-mode
;; + projectile
;; + DejaVu Mono for Powerline font <https://github.com/powerline/fonts>
* Free form cobol is for hipsters, we use proper fixed form cobol.
IDENTIFICATION DIVISION.
PROGRAM-ID. gobl.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 hostname PIC X(10) VALUE "localhost" & x"00".
01 port BINARY-SHORT VALUE 7575.
01 gethostbyname-result POINTER SYNC.
01 hostent BASED.
{-# LANGUAGE OverloadedStrings #-}
module Test where
import qualified Data.ByteArray
import qualified Data.ByteString
import qualified Data.ByteString.Char8
import qualified Data.ByteString.Base16
import qualified Data.Text
import qualified Data.Text.Encoding
import qualified Crypto.Hash
-- Copyright (c) 2019 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
-- SPDX-License-Identifier: Apache-2.0
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE ViewPatterns #-}
daml 1.2
module Main where
import DA.Generics
import DA.Next.Map
import DA.List
{-# LANGUAGE RecursiveDo #-}
{-# LANGUAGE OverloadedStrings #-}
import qualified Data.ByteString.Char8 as BS
import Control.Monad.Fix
import LLVM
import LLVM.Context
import LLVM.AST hiding (function)
import LLVM.AST.Type as AST
import LLVM.IRBuilder.Constant
import LLVM.IRBuilder.Instruction
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE UndecidableInstances #-}
module ReflectOrd where
import Data.Reflection
import Data.Proxy
newtype Ordable s a = Ordable { unordable :: a }
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE UndecidableInstances #-}
module Convertible where
import Control.Applicative
import Data.Proxy