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
import Crypto.Hash | |
import Crypto.JWT | |
import Crypto.JOSE.Types | |
import Data.Aeson as J | |
import Data.ByteArray.Encoding qualified as BA | |
import Data.ByteString.Lazy qualified as BL | |
import RIO | |
import Data.X509.File qualified as X509 | |
import Data.Text.IO (putStrLn) |
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
(load "lazier.scm") | |
(load "prelude.scm") | |
(load "prelude-numbers.scm") | |
(lazy-def '(main input) '(parse-unlambda i input)) | |
(lazy-def 'parse-unlambda | |
'((lambda (x) (x x)) | |
(lambda (self cont input) | |
((nth (car input) dispatch-list) (self self) cont (cdr input)) ))) |
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
import Data.Char | |
data Ideal f a = Pure a | Ideal (f a) | |
class Idealize f where | |
(>>~) :: f a -> (a -> Ideal f b) -> f b | |
instance Idealize f => Monad (Ideal f) where | |
return = Pure |
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 AllowAmbiguousTypes #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE PolyKinds #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE TypeApplications #-} | |
module Data.Aeson.Extras where | |
import Data.Aeson |
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 RankNTypes, TemplateHaskell, GeneralizedNewtypeDeriving, DeriveGeneric #-} | |
module Main where | |
import Control.Monad.Reader | |
import Control.Monad.State | |
import Control.Monad.IO.Class | |
import Control.Lens | |
import Data.Barbie | |
import GHC.Generics |
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
class FieldNamesB b where | |
bFieldNames :: IsString a => b (Const a) | |
default bFieldNames :: (Generic1 b, FieldNamesB (Rep b), IsString a) => b (Const a) | |
bFieldNames = to bFieldNames | |
instance FieldNamesB U1 where | |
bFieldNames = U1 |
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 LambdaCase, TypeFamilies, DataKinds, TypeOperators, FlexibleContexts, OverloadedStrings, StandaloneDeriving #-} | |
module Codec.Container.FBX where | |
import qualified Data.Vector.Unboxed as UV | |
import Data.Binary | |
import Data.Binary.Get | |
import Data.Binary.Put | |
import Data.Int | |
import Data.ByteString (ByteString) | |
import qualified Data.ByteString as BS |
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
6 Island (RIX) 193 | |
3 Aviation Pioneer (M19) 46 | |
2 Aven Wind Mage (M19) 45 | |
1 Divination (DAR) 52 | |
3 Waterknot (RIX) 61 | |
1 Riddlemaster Sphinx (M19) 287 | |
1 Murmuring Mystic (GRN) 45 | |
1 Roc Charger (GRN) 24 | |
7 Plains (RIX) 192 | |
4 Azorius Guildgate (RNA) 243 |
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 TemplateHaskell, DataKinds, LambdaCase, KindSignatures, MultiParamTypeClasses, FunctionalDependencies, TypeFamilies, Rank2Types #-} | |
module Idiom.Lens where | |
import Language.Haskell.TH | |
import Language.Haskell.TH.Lens | |
import Data.Proxy | |
import Control.Lens | |
import GHC.TypeLits | |
class Has (s :: Symbol) a 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 TypeOperators #-} | |
import Control.Applicative | |
import Data.Extensible | |
import Control.Monad.Trans.Maybe | |
import Data.Text | |
-- the shape of the problem | |
-- | |
-- we want a list of Parsers, all of different types. | |
-- we will apply each of them, one after another, |
NewerOlder