Skip to content

Commit

Permalink
Bump version and update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
fizruk committed Jun 18, 2024
1 parent 00e0eb4 commit 02d82f4
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 55 deletions.
12 changes: 12 additions & 0 deletions haskell/free-foil/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# CHANGELOG for `free-foil`

# 0.0.2 — 2024-06-18

- Improve TH to support parametrized data types (see [#11](https://github.com/fizruk/free-foil/pull/11))
- Split `lambda-pi` into its own package (see [#10](https://github.com/fizruk/free-foil/pull/10))
- Switch to `template-haskell >= 2.21.0.0` (to support latest Stackage Nightly)
- Fix doctests (see [#9](https://github.com/fizruk/free-foil/pull/9))

# 0.0.1 — 2024-06-08

First release, corresponding to
8 changes: 4 additions & 4 deletions haskell/free-foil/free-foil.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cabal-version: 1.12
-- see: https://github.com/sol/hpack

name: free-foil
version: 0.0.1
version: 0.0.2
synopsis: Efficient Type-Safe Capture-Avoiding Substitution for Free (Scoped Monads)
description: Please see the README on GitHub at <https://github.com/fizruk/free-foil#readme>
category: Parsing
Expand Down Expand Up @@ -50,7 +50,7 @@ library
, bifunctors
, containers
, deepseq
, template-haskell
, template-haskell >=2.21.0.0
, text >=1.2.3.1
default-language: Haskell2010

Expand All @@ -69,7 +69,7 @@ test-suite doctests
, deepseq
, doctest-parallel
, free-foil
, template-haskell
, template-haskell >=2.21.0.0
, text >=1.2.3.1
default-language: Haskell2010

Expand All @@ -88,6 +88,6 @@ test-suite spec
, containers
, deepseq
, free-foil
, template-haskell
, template-haskell >=2.21.0.0
, text >=1.2.3.1
default-language: Haskell2010
4 changes: 2 additions & 2 deletions haskell/free-foil/package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: free-foil
version: 0.0.1
version: 0.0.2
github: "fizruk/free-foil"
license: BSD3
author: "Nikolai Kudasov"
Expand All @@ -24,7 +24,7 @@ dependencies:
text: ">= 1.2.3.1"
containers:
bifunctors:
template-haskell:
template-haskell: ">= 2.21.0.0"
deepseq:

ghc-options:
Expand Down
10 changes: 5 additions & 5 deletions haskell/lambda-pi/lambda-pi.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cabal-version: 1.24
-- see: https://github.com/sol/hpack

name: lambda-pi
version: 0.0.1
version: 0.0.2
synopsis: λΠ-calculus implemented in a few different ways.
description: Please see the README on GitHub at <https://github.com/fizruk/free-foil#readme>
category: Language
Expand Down Expand Up @@ -59,7 +59,7 @@ library
, bifunctors
, containers
, deepseq
, free-foil
, free-foil >=0.0.2
, template-haskell
, text >=1.2.3.1
default-language: Haskell2010
Expand All @@ -82,7 +82,7 @@ executable lambda-pi
, bifunctors
, containers
, deepseq
, free-foil
, free-foil >=0.0.2
, lambda-pi
, template-haskell
, text >=1.2.3.1
Expand All @@ -107,7 +107,7 @@ test-suite doctests
, containers
, deepseq
, doctest-parallel
, free-foil
, free-foil >=0.0.2
, lambda-pi
, template-haskell
, text >=1.2.3.1
Expand All @@ -132,7 +132,7 @@ test-suite spec
, bifunctors
, containers
, deepseq
, free-foil
, free-foil >=0.0.2
, lambda-pi
, template-haskell
, text >=1.2.3.1
Expand Down
4 changes: 2 additions & 2 deletions haskell/lambda-pi/package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: lambda-pi
version: 0.0.1
version: 0.0.2
github: "fizruk/free-foil"
license: BSD3
author: "Nikolai Kudasov"
Expand Down Expand Up @@ -39,7 +39,7 @@ dependencies:
bifunctors:
template-haskell:
deepseq:
free-foil:
free-foil: ">= 0.0.2"

ghc-options:
- -Wall
Expand Down
71 changes: 29 additions & 42 deletions haskell/lambda-pi/src/Language/LambdaPi/Syntax/Lex.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{-# OPTIONS_GHC -fno-warn-unused-binds -fno-warn-missing-signatures #-}
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
{-# OPTIONS_GHC -fno-warn-tabs #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# LANGUAGE CPP #-}
{-# LINE 4 "Lex.x" #-}
{-# OPTIONS -fno-warn-incomplete-patterns #-}
Expand All @@ -14,20 +17,12 @@ import qualified Data.Bits
import Data.Char (ord)
import Data.Function (on)
import Data.Word (Word8)
#if __GLASGOW_HASKELL__ >= 603
#include "ghcconfig.h"
#elif defined(__GLASGOW_HASKELL__)
#include "config.h"
#endif
#if __GLASGOW_HASKELL__ >= 503
import Data.Array
#else
import Array
#endif
import qualified Data.Array
alex_tab_size :: Int
alex_tab_size = 8
alex_base :: Array Int Int
alex_base = listArray (0 :: Int, 39)
alex_base :: Data.Array.Array Int Int
alex_base = Data.Array.listArray (0 :: Int, 39)
[ -8
, 105
, -122
Expand Down Expand Up @@ -70,8 +65,8 @@ alex_base = listArray (0 :: Int, 39)
, 0
]

alex_table :: Array Int Int
alex_table = listArray (0 :: Int, 2172)
alex_table :: Data.Array.Array Int Int
alex_table = Data.Array.listArray (0 :: Int, 2172)
[ 0
, 29
, 29
Expand Down Expand Up @@ -2247,8 +2242,8 @@ alex_table = listArray (0 :: Int, 2172)
, -1
]

alex_check :: Array Int Int
alex_check = listArray (0 :: Int, 2172)
alex_check :: Data.Array.Array Int Int
alex_check = Data.Array.listArray (0 :: Int, 2172)
[ -1
, 9
, 10
Expand Down Expand Up @@ -4424,8 +4419,8 @@ alex_check = listArray (0 :: Int, 2172)
, 255
]

alex_deflt :: Array Int Int
alex_deflt = listArray (0 :: Int, 39)
alex_deflt :: Data.Array.Array Int Int
alex_deflt = Data.Array.listArray (0 :: Int, 39)
[ -1
, -1
, -1
Expand Down Expand Up @@ -4468,7 +4463,7 @@ alex_deflt = listArray (0 :: Int, 39)
, 38
]

alex_accept = listArray (0 :: Int, 39)
alex_accept = Data.Array.listArray (0 :: Int, 39)
[ AlexAccNone
, AlexAccNone
, AlexAccNone
Expand Down Expand Up @@ -4511,7 +4506,7 @@ alex_accept = listArray (0 :: Int, 39)
, AlexAccNone
]

alex_actions = array (0 :: Int, 2)
alex_actions = Data.Array.array (0 :: Int, 2)
[ (1,alex_action_4)
, (0,alex_action_3)
]
Expand All @@ -4536,8 +4531,8 @@ alex_action_5 = tok (eitherResIdent TV)
# define FAST_INT Int#
-- Do not remove this comment. Required to fix CPP parsing when using GCC and a clang-compiled alex.
# if __GLASGOW_HASKELL__ > 706
# define GTE(n,m) (tagToEnum# (n >=# m))
# define EQ(n,m) (tagToEnum# (n ==# m))
# define GTE(n,m) (GHC.Exts.tagToEnum# (n >=# m))
# define EQ(n,m) (GHC.Exts.tagToEnum# (n ==# m))
# else
# define GTE(n,m) (n >=# m)
# define EQ(n,m) (n ==# m)
Expand All @@ -4563,9 +4558,6 @@ alex_action_5 = tok (eitherResIdent TV)
#ifdef ALEX_GHC
data AlexAddr = AlexA# Addr#
-- Do not remove this comment. Required to fix CPP parsing when using GCC and a clang-compiled alex.
#if __GLASGOW_HASKELL__ < 503
uncheckedShiftL# = shiftL#
#endif

{-# INLINE alexIndexInt16OffAddr #-}
alexIndexInt16OffAddr :: AlexAddr -> Int# -> Int#
Expand All @@ -4579,12 +4571,12 @@ alexIndexInt16OffAddr (AlexA# arr) off =
off' = off *# 2#
#else
#if __GLASGOW_HASKELL__ >= 901
int16ToInt#
GHC.Exts.int16ToInt#
#endif
(indexInt16OffAddr# arr off)
#endif
#else
alexIndexInt16OffAddr arr off = arr ! off
alexIndexInt16OffAddr = (Data.Array.!)
#endif

#ifdef ALEX_GHC
Expand All @@ -4604,24 +4596,19 @@ alexIndexInt32OffAddr (AlexA# arr) off =
off' = off *# 4#
#else
#if __GLASGOW_HASKELL__ >= 901
int32ToInt#
GHC.Exts.int32ToInt#
#endif
(indexInt32OffAddr# arr off)
#endif
#else
alexIndexInt32OffAddr arr off = arr ! off
alexIndexInt32OffAddr = (Data.Array.!)
#endif

#ifdef ALEX_GHC

#if __GLASGOW_HASKELL__ < 503
quickIndex arr i = arr ! i
#else
-- GHC >= 503, unsafeAt is available from Data.Array.Base.
quickIndex = unsafeAt
#endif
#else
quickIndex arr i = arr ! i
quickIndex = (Data.Array.!)
#endif

-- -----------------------------------------------------------------------------
Expand All @@ -4643,26 +4630,26 @@ alexScanUser user__ input__ IBOX(sc)
case alexGetByte input__ of
Nothing ->
#ifdef ALEX_DEBUG
trace ("End of input.") $
Debug.Trace.trace ("End of input.") $
#endif
AlexEOF
Just _ ->
#ifdef ALEX_DEBUG
trace ("Error.") $
Debug.Trace.trace ("Error.") $
#endif
AlexError input__'

(AlexLastSkip input__'' len, _) ->
#ifdef ALEX_DEBUG
trace ("Skipping.") $
Debug.Trace.trace ("Skipping.") $
#endif
AlexSkip input__'' len

(AlexLastAcc k input__''' len, _) ->
#ifdef ALEX_DEBUG
trace ("Accept.") $
Debug.Trace.trace ("Accept.") $
#endif
AlexToken input__''' len (alex_actions ! k)
AlexToken input__''' len ((Data.Array.!) alex_actions k)


-- Push the input through the DFA, remembering the most recent accepting
Expand All @@ -4678,7 +4665,7 @@ alex_scan_tkn user__ orig_input len input__ s last_acc =
Nothing -> (new_acc, input__)
Just (c, new_input) ->
#ifdef ALEX_DEBUG
trace ("State: " ++ show IBOX(s) ++ ", char: " ++ show c) $
Debug.Trace.trace ("State: " ++ show IBOX(s) ++ ", char: " ++ show c ++ " " ++ (show . chr . fromIntegral) c) $
#endif
case fromIntegral c of { IBOX(ord_c) ->
let
Expand Down Expand Up @@ -4749,7 +4736,7 @@ alexPrevCharIs c _ input__ _ _ = c == alexInputPrevChar input__
alexPrevCharMatches f _ input__ _ _ = f (alexInputPrevChar input__)

--alexPrevCharIsOneOfPred :: Array Char Bool -> AlexAccPred _
alexPrevCharIsOneOf arr _ input__ _ _ = arr ! alexInputPrevChar input__
alexPrevCharIsOneOf arr _ input__ _ _ = arr Data.Array.! alexInputPrevChar input__

--alexRightContext :: Int -> AlexAccPred _
alexRightContext IBOX(sc) user__ _ _ input__ =
Expand Down

0 comments on commit 02d82f4

Please sign in to comment.