Skip to content

Commit

Permalink
retemplate
Browse files Browse the repository at this point in the history
  • Loading branch information
ejconlon committed Apr 6, 2023
1 parent ca0daa6 commit d21a3cf
Show file tree
Hide file tree
Showing 42 changed files with 849 additions and 597 deletions.
84 changes: 0 additions & 84 deletions .circleci/config.yml

This file was deleted.

1 change: 0 additions & 1 deletion .ghci-manual

This file was deleted.

14 changes: 14 additions & 0 deletions .github/workflows/haskell-stack.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: haskell-stack
on:
- push
- pull_request
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: |
if [ -f .github/packages.txt ]; then sudo apt-get update && sudo apt-get install -y $(cat .github/packages.txt); fi
- uses: freckle/stack-action@v4
with:
pedantic: false
41 changes: 0 additions & 41 deletions .stylish-haskell.yaml

This file was deleted.

14 changes: 0 additions & 14 deletions Makefile

This file was deleted.

35 changes: 0 additions & 35 deletions Makefile.base

This file was deleted.

2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# blanks

[![CircleCI](https://circleci.com/gh/ejconlon/blanks/tree/master.svg?style=svg)](https://circleci.com/gh/ejconlon/blanks/tree/master)

Fill-in-the-blanks - A library factoring out substitution from ASTs.

It's a pain to track de Bruijn indices yourself to implement capture-avoiding subsititution,
Expand Down
2 changes: 0 additions & 2 deletions Setup.hs

This file was deleted.

15 changes: 15 additions & 0 deletions fourmolu.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
indentation: 2
column-limit: 120
function-arrows: leading
comma-style: leading
import-export-style: leading
indent-wheres: false
record-brace-space: true
newlines-between-decls: 1
haddock-style: single-line
haddock-style-module:
let-style: auto
in-style: left-align
respectful: false
fixities: []
unicode: never
7 changes: 0 additions & 7 deletions hie.yaml

This file was deleted.

39 changes: 39 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
stack_build := "stack build --fast"
src_dirs := "src test"

# No default tasks
default:
just --list

# Build and run tests
test:
{{ stack_build }} --test

# Build only
build:
{{ stack_build }} --test --no-run-tests

# Clean stack work
clean:
stack clean --full

# Enter repl
ghci:
stack ghci --test

# Open browser with generated docs
docs:
stack haddock --open

# Install tool deps
deps:
stack build --copy-compiler-tool hlint fourmolu

# Format with fourmolu
format:
stack exec -- fourmolu --mode inplace {{ src_dirs }}

# Lint with hlint
lint:
stack exec -- hlint {{ src_dirs }}

3 changes: 2 additions & 1 deletion src/Blanks.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
-- for source locations and the like. See the test suite for examples.
module Blanks
( module Blanks
) where
)
where

import Blanks.Conversion as Blanks
import Blanks.Internal.Abstract as Blanks
Expand Down
15 changes: 11 additions & 4 deletions src/Blanks/Conversion.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@ module Blanks.Conversion
( locScopeForget
, scopeAnno
, asLocScope
) where
)
where

import Blanks.LocScope (LocScope, pattern LocScopeAbstract, pattern LocScopeBound, pattern LocScopeEmbed,
pattern LocScopeFree)
import Blanks.LocScope
( LocScope
, pattern LocScopeAbstract
, pattern LocScopeBound
, pattern LocScopeEmbed
, pattern LocScopeFree
)
import Blanks.Scope (Scope, pattern ScopeAbstract, pattern ScopeBound, pattern ScopeEmbed, pattern ScopeFree)

-- | Forget all the annotations and yield a plain 'Scope'.
Expand All @@ -20,7 +26,8 @@ locScopeForget ls =

-- | Annotate every location in the 'Scope' with a given value as a 'LocScope'.
scopeAnno :: (Functor n, Functor f) => l -> Scope n f a -> LocScope l n f a
scopeAnno l = go where
scopeAnno l = go
where
go s =
case s of
ScopeBound b -> LocScopeBound l b
Expand Down
Loading

0 comments on commit d21a3cf

Please sign in to comment.