Skip to content

Commit

Permalink
make compile with 9.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Rekihyt committed Oct 18, 2022
1 parent 405609a commit 6aa76f7
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 20 deletions.
6 changes: 3 additions & 3 deletions ptghci.cabal
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
cabal-version: 1.12

-- This file has been generated from package.yaml by hpack version 0.34.4.
-- This file has been generated from package.yaml by hpack version 0.35.0.
--
-- see: https://github.com/sol/hpack
--
-- hash: af5d4c08d5bdf87ae8de1c143eb468cfd7280e01f5163ee7953c86d6bc265b0b
-- hash: c35a86189a98da5437e4adaf3cffc7055a184128f0256e9e33334184758dd618

name: ptghci
version: 0.1.0.0
Expand Down Expand Up @@ -135,13 +135,13 @@ library
, unordered-containers
, yaml
, zeromq4-haskell
default-language: Haskell2010
if flag(use-python-embed)
pkgconfig-depends:
python3-embed
else
pkgconfig-depends:
python
default-language: Haskell2010

executable ptghci
main-is: Main.hs
Expand Down
35 changes: 19 additions & 16 deletions src/Language/Haskell/PtGhci/Prelude.hs
Original file line number Diff line number Diff line change
@@ -1,32 +1,35 @@
module Language.Haskell.PtGhci.Prelude
( module P,
module MicroLens,
module Language.Haskell.PtGhci.Prelude,
String,
StringConv,
toS,
-- , unwords
)
where

module Language.Haskell.PtGhci.Prelude
( module P
, module MicroLens
, module Language.Haskell.PtGhci.Prelude
, String
-- , unwords
) where

import Protolude as P hiding ((%), to, trace)
-- import Prelude (unwords)
import Control.Exception (throw)
import qualified Data.Text as T
import GHC.Base (String)
import Lens.Micro as MicroLens
import Protolude as P hiding (to, toS, trace, (%))
import qualified Protolude as P
import qualified Data.Text as T
import Protolude.Conv (StringConv, toS)
import Text.Printf
import Control.Exception (throw)
import GHC.Base (String)

tail :: [a] -> Maybe [a]
tail [] = Nothing
tail (a:as) = Just as
tail (a : as) = Just as

(!?) :: [a] -> Int -> Maybe a
(!?) [] _ = Nothing
(!?) (x:ls) 0 = Just x
(!?) (x:ls) i = ls !? (i-1)
(!?) (x : ls) 0 = Just x
(!?) (x : ls) i = ls !? (i - 1)

-- tryP :: (Exception e) => Ptg a -> Ptg (Either e a)
-- tryP (Ptg action) = do
-- r <- ask
-- runReaderT r action
-- return $ Ptg $
-- return $ Ptg $
2 changes: 1 addition & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#
# resolver: ./custom-snapshot.yaml
# resolver: https://example.com/snapshots/2018-01-01.yaml
resolver: lts-16.0
resolver: lts-19.29

# User packages to be built.
# Various formats can be used as shown in the example below.
Expand Down
12 changes: 12 additions & 0 deletions stack.yaml.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This file was autogenerated by Stack.
# You should not edit this file by hand.
# For more information, please see the documentation at:
# https://docs.haskellstack.org/en/stable/lock_files

packages: []
snapshots:
- completed:
sha256: 0ced7f93245307212900d760c1322dfb527c4b902868c11ccac37f48b7d4ebb9
size: 619200
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/19/29.yaml
original: lts-19.29

0 comments on commit 6aa76f7

Please sign in to comment.