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
* 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
{-# LANGUAGE GADTs #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TupleSections #-}
import Control.Monad
import Data.Text (Text)
import Data.Void
import Text.Megaparsec
import Text.Megaparsec.Char
import qualified Text.Megaparsec.Char.Lexer as Lexer
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecursiveDo #-}
import Control.Monad
import Data.Text (Text)
import Data.Void
import Text.Megaparsec
import qualified Text.Megaparsec.Char.Lexer as Lexer
import Text.Megaparsec.Expr
type Parser = Parsec Void Text