Closed ozgurakgun closed 7 years ago
Original comment by Özgür Akgün (Bitbucket: ozgurakgun, GitHub: ozgurakgun):
Not a bug, but a question.
Original comment by Özgür Akgün (Bitbucket: ozgurakgun, GitHub: ozgurakgun):
This isn't a bug.
Save the following in a file and call it via:
runhaskell src/Temp.hs b5.essence
{-# LANGUAGE QuasiQuotes, ViewPatterns, OverloadedStrings #-}
import Language.E
import Language.E.Pipeline.ReadIn
import System.Environment(getArgs)
main :: IO ()
main = do
args <- getArgs
specFilename <- case filter (".essence" `isSuffixOf`) args of
[t] -> return t
_ -> error "Only 1 *.essence file."
specPair <- pairWithContents specFilename
[spec ] <- runCompEIO (readSpec specPair)
let lettings = [ x | let Spec _ xs = spec
, x@[xMatch| _ := topLevel.letting |] <- xs
]
mapM_ (print . pretty) lettings
mapM_ print lettings
(Also update your repo NOW, because I created a branch by mistake and merged it back with yours.)
Originally reported by: Bilal Hussain (Bitbucket: Bilalh, GitHub: Bilalh)
When using xMatch on b5.essence
I can get the such that part by using
and the declaration by using
why does
return no results
b5.essence haskell representation