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
| import Control.Monad ((>=>)) | |
| import Data.Map (Map) | |
| import qualified Data.Map as M | |
| import GHC.Generics (Generic) | |
| import Optics | |
| data MLens m s a = MLens | |
| { mview :: s -> m a | |
| , mset :: a -> s -> m s | |
| } |
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 Main where | |
| import Data.Maybe (fromJust) | |
| data Expr | |
| = Var String | |
| | Lam String Expr | |
| | App Expr Expr | |
| | Lit Int | |
| | Prim PrimOp Expr Expr | |
| | Let (String, Expr) Expr |
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 Main where | |
| import Data.Either.Extra (maybeToEither) | |
| data Expr | |
| = Var String | |
| | Lam String Expr | |
| | App Expr Expr | |
| | Lit Int | |
| | Prim PrimOp Expr Expr |
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 GADTs #-} | |
| {-# LANGUAGE LambdaCase #-} | |
| {-# LANGUAGE TupleSections #-} | |
| module Calc ( | |
| Calc, call, runCalc, runCalcM, extractCalls, | |
| runCalcSortBy, runCalcSortOn, runCalcSort, | |
| contramapRes, mapInit, traverseInit | |
| ) where |
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 FlexibleContexts #-} | |
| {-# LANGUAGE FlexibleInstances #-} | |
| {-# LANGUAGE FunctionalDependencies #-} | |
| {-# LANGUAGE PartialTypeSignatures #-} | |
| {-# LANGUAGE RankNTypes #-} | |
| {-# LANGUAGE TypeFamilies #-} | |
| {-# LANGUAGE UndecidableInstances #-} | |
| {-# OPTIONS_GHC -Wall #-} | |
| {-# OPTIONS_GHC -Wno-partial-type-signatures #-} |
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 ConstraintKinds #-} | |
| {-# LANGUAGE FlexibleContexts #-} | |
| {-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
| -- | This module contains usage example of suggested `MonadParsecDbg` type class, | |
| -- minimized, but, I hope, demonstrative | |
| -- | |
| -- If someone have better solution, I would like to see it | |
| module Main where |
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 LookAhead | |
| ( Pattern (..), | |
| ConflictPatterns, | |
| checkUniquePatSplit, | |
| checkUniquePatSplit', | |
| ) | |
| where | |
| import Control.Monad (guard, when) | |
| import Data.Bifunctor (Bifunctor (..)) |
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 ApplicativeDo #-} | |
| module Main where | |
| import Data.Void (Void) | |
| import Text.Megaparsec (Parsec, parseTest) | |
| import Text.Megaparsec.Char (char) | |
| import Text.Megaparsec.Char.Lexer (decimal) | |
| import UnordApp (liftApp, runUnord) |
NewerOlder