Skip to content

Commit

Permalink
starting with cosmetic changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ozgurakgun committed Jun 27, 2024
1 parent 843ec48 commit 45aed20
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ test:
stack test --test-arguments '--hide-successes --limit-time ${LIMIT_TIME}';\
fi

.PHONY: stack.yaml
stack.yaml: etc/hs-deps/stack-${GHC_VERSION}.yaml
@cp etc/hs-deps/stack-${GHC_VERSION}.yaml stack.yaml

Expand Down
1 change: 1 addition & 0 deletions etc/build/gen_Operator.hs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ main = do

, [ ""
, "instance ( Pretty x"
, " , Data x"
, " , ExpressionLike x"
, " , ReferenceContainer x"
, " , TypeOf x"
Expand Down
6 changes: 6 additions & 0 deletions src/Conjure/Prelude.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
module Conjure.Prelude
( module X
, stringToDoc
, textToDoc
, padRight, padLeft, padCenter
, pairWithContents
, withRest, withAfter, withBefore
Expand Down Expand Up @@ -123,6 +124,7 @@ import Data.List as X ( (\\), intercalate, intersperse, minimumBy, nub,
, inits, tails
, findIndex
, filter, partition
, cycle
)
import Data.List.Split as X ( splitOn, chunksOf )
import Data.Maybe as X ( Maybe(..), catMaybes, listToMaybe, fromMaybe, maybe, maybeToList, mapMaybe
Expand Down Expand Up @@ -170,6 +172,7 @@ import Data.Generics.Uniplate.Data as X
, transformM, transformBiM
, descend, descendM
, descendBi, descendBiM
, rewriteBi
, universe, universeBi
, children, childrenBi
, uniplate
Expand Down Expand Up @@ -257,6 +260,9 @@ textToString = T.unpack
stringToDoc :: String -> Doc
stringToDoc = Pr.text

textToDoc :: T.Text -> Doc
textToDoc = stringToDoc . textToString

padRight :: Int -> Char -> String -> String
padRight n ch s = s ++ replicate (n - length s) ch

Expand Down
2 changes: 1 addition & 1 deletion src/test/Conjure/ModelAllSolveAll.hs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ testSingleDir (TestTimeLimit timeLimitMin timeLimitMax) srOptions t@TestDirFiles
then validateSolutionNoParam step t expectedSols
else validateSolutionWithParams step t [ ( p
, [ s | s <- expectedSols
, dropExtension p `isInfixOf` dropExtension s
, (dropExtension p ++ "-solution") `isInfixOf` dropExtension s
]
)
| p <- paramFiles
Expand Down
1 change: 0 additions & 1 deletion src/test/Conjure/RepresentationsTest.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1234,4 +1234,3 @@ instance Show (Pr (Name, Constant)) where
instance Show (Pr [(Name, Constant)]) where
show (Pr xs) = intercalate "\n" $ map (show . Pr) xs


0 comments on commit 45aed20

Please sign in to comment.