This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE ViewPatterns #-} | |
{-# LANGUAGE DeriveGeneric #-} | |
{-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
{-# LANGUAGE DerivingStrategies #-} | |
{-# LANGUAGE BinaryLiterals #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE TypeOperators #-} | |
module RISCV.SingleCycle (topEntity) where |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE DeriveGeneric #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
module Issue where | |
import Data.Typeable (Typeable) | |
import GHC.Generics (Generic) | |
import Unbound.Generics.LocallyNameless | |
-- | Variables in type-inferable terms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE PolyKinds #-} | |
{-# LANGUAGE RankNTypes #-} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE PolyKinds #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
module FizzBuzz where | |
import Data.Kind (Type) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ nixpkgs ? (import <nixpkgs> { config = { | |
packageOverrides = nixpkgs: rec { | |
flow = nixpkgs.flow.override { | |
installPhase = '' | |
cp frontend/classroom/node_modules/flow-bin/flow-linux64-v*/flow flow | |
chmod a+rw flow | |
patchelf \ | |
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ | |
--set-rpath ".:${nixpkgs.stdenv.cc.libc}/lib" \ | |
flow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global account issuer = 'CssRnWaxBhRRwhVL7ESgXkP7cgZ9vjFzV5nmr4jj3ZAh'; | |
global account borrower = 'vVVq8PMEa9qGLL7LEmHUZKM78ze5JUgDPnjSE6FES63'; | |
global assetFrac2 asset_ = 'HjdMu5LtF7BW6pGzvZGsV7ABUA4dkZFB2TmXQiymNpue'; | |
global fixed2 interest= 0.05f; | |
global fixed2 principal; | |
global fixed2 payout; | |
global datetime maturityDate = "2018-03-08T10:12:00+00:00"; | |
transition initial -> amountConfirmed; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data Query' f r where | |
AccountInfo' :: f A.Account -> Query' f A.Account | |
AccountByName' :: Text -> Query' f A.Account | |
QId' :: (ToJSON a, FromJSON a) => a -> Query' f a | |
QAnd' :: (ToJSON a, FromJSON a, ToJSON b, FromJSON b) => Query' f a -> Query' f b -> Query' f (a,b) | |
data QueryBox' where | |
Qbox :: (ToJSON r, FromJSON r) => Query' Keyed r -> QueryBox' | |
defineToJSONQuery ''Query' ''Keyed |