This file contains hidden or 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
use std::sync::Arc; | |
enum Octree<B, A> | |
{ Branch | |
{ preview : B | |
, subtrees : [Arc<Octree<B, A>>; 8] | |
} | |
, Atom | |
{ leaf : A |
This file contains hidden or 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
{- | A chunk of 16x16x16 atoms. | |
-} | |
module Chunk where | |
import Prelude hiding (read) | |
import Control.Monad | |
import Control.Monad.Primitive |
This file contains hidden or 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
module Union where | |
import Control.Monad | |
import qualified Control.Monad.Reader as MTL | |
data Union fs (m :: * -> *) x where | |
Here :: f m x -> Union (f : fs) m x | |
There :: Union fs m x -> Union (f : fs) m x |
This file contains hidden or 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
module AST where | |
import Data.Constraint | |
import Data.Functor.Compose | |
import Data.Fix | |
import Data.Text (Text) | |
import qualified Data.Text as Text | |
import GHC.TypeLits |
This file contains hidden or 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 DerivingStrategies #-} | |
{-# language DeriveFunctor #-} | |
{-# language FlexibleContexts #-} | |
{-# language FlexibleInstances #-} | |
{-# language FunctionalDependencies #-} | |
{-# language GADTs #-} | |
{-# language KindSignatures #-} | |
{-# language MultiParamTypeClasses #-} | |
{-# language ScopedTypeVariables #-} |
This file contains hidden or 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
module Weld where | |
import Control.Arrow | |
import Data.Bifunctor as B | |
import Text.PrettyPrint as PP hiding ((<>)) | |
infix 1 \/ |
This file contains hidden or 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
module Optics.Core exposing | |
( Optic | |
, id | |
, o | |
, lens | |
, prism | |
, traversal | |
, view |
This file contains hidden or 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 LambdaCase #-} | |
{-# language BlockArguments #-} | |
{-# language GADTs #-} | |
{-# language DataKinds #-} | |
{-# language TypeApplications #-} | |
{-# language DuplicateRecordFields #-} | |
{-| |
This file contains hidden or 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
module type FUNCTOR = sig | |
type 'a t | |
val map : ('a -> 'b) -> 'a t -> 'b t | |
end | |
module type APPLY = sig | |
include FUNCTOR | |
val ap : ('a -> 'b) t -> 'a t -> 'b t | |
end |
This file contains hidden or 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
{- | The union of functors and utilities. | |
-} | |
module Union | |
( -- * Union type | |
Union(..) | |
, eliminate |