Commit 006c9bc5 authored by Michael Hanus 's avatar Michael Hanus
Browse files

Avoid use of ReadShowterm

parent 51fa20ee
{-# OPTIONS_FRONTEND -F --pgmF=currypp --optF=defaultrules #-}
{-# OPTIONS_FRONTEND -Wnone #-}
import Control.SetFunctions -- required by default rules
import Test.Prop
-- We test whether our definition of zip with default rules is
......
......@@ -5,6 +5,8 @@
--- CurryCheck generates and check properties which states
--- that the original operations are indeed deterministic.
import Control.SetFunctions -- required by default rules
-- Computes the last element of a list.
last :: Data a => [a] ->DET a
last (_ ++ [x]) = x
......
......@@ -19,6 +19,7 @@
{-# OPTIONS_FRONTEND -F --pgmF=currypp --optF=defaultrules #-}
import Control.SetFunctions -- required by default rules
import qualified Data.List
import Test.Prop
......
......@@ -11,7 +11,7 @@
--- theorem'sorted xs = always (sorted (sort xs))
---
--- @author Michael Hanus
--- @version October 2016
--- @version March 2021
------------------------------------------------------------------------
module SimplifyPostConds
......@@ -21,7 +21,6 @@ module SimplifyPostConds
import Control.Monad ( unless, when )
import Data.List ( last, maximum )
import Data.Maybe ( maybeToList )
import ReadShowTerm ( readQTerm )
import AbstractCurry.Types
import AbstractCurry.Select
......@@ -218,8 +217,8 @@ term2acy cvars (TermCons (mn,fn) args)
const2literal :: QName -> CLiteral
const2literal sl = case sl of
("i",s) -> CIntc (readQTerm s)
("f",s) -> CFloatc (readQTerm s)
("i",s) -> CIntc (read s)
("f",s) -> CFloatc (read s)
("c",s) -> CCharc (head s)
("s",s) -> CStringc s
_ -> error "const2literal: unknown literal"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment